\section{Introduction}
The Siegel-Weil formual is an identity between an Eisenstein series and an integral of a regularized theta function. The convergent case ($r=0$ or $m>n+r$) was studied first by Weil in \cite{weil}. The case for the classical unitary group ($d=1$) have been extensively studied by Ichino \cite{ichino2001crelle,ichino2004mathz,ichino2007sw} and Gan-Qiu-Takeda \cite{gan2014siegelweil}. When $d>1$, the first term identity in the first term range ($m\leq n$) was proved by Yamana in \cite{yamana2013siegel}. This paper will focus on the sencond term range, i.e., $n+1\leq m\leq n+r$ and $d>1$. The proof is indebted to Gan-Qiu-Takeda \cite{gan2014siegelweil}.

Following \cite{yamana2013siegel}, let $E/F$ be a quadratic extension of number fields and $D$ be a division algebra with center $E$, of dimension $d^2$ over $E$ and provided with an antiautomorphism $\ast$ of order two under which $F$ is the fixed subfield of $E$. Let $\mathbb{A}$ and $\mathbb{A}_E$ be the adele rings of $F$ and $E$ respectively. Let $\omega_{E/F}$ be the quadratic charater of $\mathbb{A}^\times/F^\times$ associated to the extension $E/F$.
 Given a local place $v$ of $F$, let $F_v$ be the $v$-completion of $F$ and set $E_v=E\otimes_F F_v,D_v=D\otimes_F F_v$. Then
\[D_v\cong\begin{cases}
M_{d}(E_v)&\mbox{ if }E_v\mbox{ is a local field},\\
D_{F_v}\oplus D_{F_v}^{op}&\mbox{ if }E_v=F_v\oplus F_v,
\end{cases} \]
where $D_F$ is a central simple algebra with center $F$, of dimension $d^2$ over $F$, $D_{F_v}=D_F\otimes_F F_v$ is a central simple algebra with center  $F_v$ and $D_{F_v}^{op}$ is its opposite algebra (see \cite[Theorem 10.2.4]{scharlau1985}).
 Let $W_{2n}$ be a right $D$-vector space of dimension $2n$ with a nondegenerate skew-Hermitian form that has a complete polarization, and $V_r$ a left $D$-vector space of dimension $m$ with a nondegenerate Hermitian form. Let $\chi_V$ be the quadratic character of $\mathbb{A}_E^\times/E^\times$ associated to $V$ such that $\chi_V|_{\mathbb{A}^\times/F^\times}=\omega_{E/F}^{dm}$.
  Let $V_0$ be a left $D$-vector space of dimension $m_0$ with $U(V_0)$ anisotropic and $V_r=V_0\oplus D^{2r}$, where $D^{2r}$ is a $D$-vector space with Hermtian form
\[\langle x,y\rangle =x J(y^\ast)^t,J=\begin{pmatrix}
0&\mathbf{1}_n\\\mathbf{1}_n&0
\end{pmatrix} \] for $x,y\in D^{2r}$, $\mathbf{1}_n$ is the identity matrix in $M_n(D)$, $x^t$ is the transpose of $x$ and $r$ is called the Witt index of $V_r$.  Let $G_{2n}$ and $H_r$ be the unitary group of $W$ and $V$ respectively. Then
\[G_{2n}(F_v)\cong\begin{cases}
U_{nd,nd}&\mbox{ if }E_v\mbox{ is  a field};\\
\mathrm{GL}_{2n}(D_{F_v})&\mbox{ if }E_v=F_v+F_v.
\end{cases} \]

Let $\alpha_E$ denote the standard norm of 􏳗$\mathbb{A}^\times_E$ .  We denote by $P$ the maximal parabolic subgroup
of $G_{2n}$ that stabilizes a maximal isotropic subspace of $W$􏳞. Note that $P$ has a Levi
decomposition $P = MN$ with $M \cong \mathrm{GL}_n(D)$.  For any unitary character $\chi$ of 􏳗$\mathbb{A}^\times_E /E^\times$
and for any $s\in\mathbb{C}$ 􏳘,we consider the representation $I(s,\chi)=Ind_{P(\mathbb{A})}^{G_{2n}(\mathbb{A})}\chi\alpha_E^s$
 induced
from the character $m 􏰀\rightarrow \chi(\nu(m))\alpha_E(\nu(m))^s$, where $\nu$ is the reduced norm viewed
as a character of the algebraic group $\mathrm{GL}_n(D)$ and the induction is normalized so that $I (s, \chi)$ is naturally unitarizable when $s$ is pure imaginary.
When $E=F+F$, we consider $$I(s,\mathbf{1})=Ind_{P(\mathbb{A})}^{GL_{2n}(D_F(\mathbb{A}))}\alpha_E^s\boxtimes\alpha_E^{-s},$$ where $P=MN$ and $M\cong \mathrm{GL}_n(D_F)\times\mathrm{GL}_n(D_F)$.
 For any holomorphic section $f^{(s)}$ of $I(s,\chi)$, i.e.
\[f^{(s)}(mng)=\chi(\nu(m))\alpha_E(\nu(m))^{s+dn/2}f^{(s)}(g) \]
for $m\in\mathrm{GL}_n(D(\mathbb{A}))$, $n\in N(\mathbb{A})$ and $g\in G_{2n}(\mathbb{A})$,
 the Siegel Eisenstein series
\[E(g;f^{(s)})=\sum_{\gamma\in P(F)\backslash G(F) }f^{(s)}(\gamma g)  \]
is absolutely convergent for $Re(s)>\frac{dn}{2}$
and has a meromorphic continuation to the whole $s$-plane.
\begin{lem}\cite[Theorem 1]{yamana2013siegel}\label{siegeleisenstein}
	If $n+1\leq m\leq n+r$ and $r>0$, then the Siegel Eisenstein series $E(g;f^{(s)})$ has a simple pole at $s=s_0=(m-n)d/2$ where $\chi=\chi_V$.
\end{lem}

Fix a nontrivial additive character $\psi$ of $\mathbb{A}/F$ and a character $\chi_V$ of $\mathbb{A}_E^\times/E^\times$ such that $\chi_V|_{\mathbb{A}^\times}=\omega_{E/F}^{dm}$.
The group $G_{2n}(\mathbb{A}􏳗)\times H_r(\mathbb{A}􏳗)$ acts on the Schwartz space $\mathfrak{S}(V_r^n(\mathbb{A}􏳗)) $
of $V_r^n(\mathbb{A}􏳗)$ via the Weil representation $\omega_{n,r}$. Let $S(V_r^n(\mathbb{A}􏳗))$ be the subspace of $\mathfrak{S}(V_r^n(\mathbb{A}􏳗))$ consisting of functions that correspond to polynomials in the Fock model at every archimedean place of $F$. Given a function  $\phi\in S(V_r^n(\mathbb{A}))$,
set $$\Phi^{n,r}(\phi)(g)=\omega(g)\phi(0).$$ Then $\Phi^{n,r}(\phi)\in I((m-n)d/2,\chi_V)$ which is called the Siegel-Weil section associated to $V_r$. Suppose $f^{(s)}=\Phi^{n,r}(\phi)$ and the Siegel Eisentein series has an expression
\[E(s,\Phi^{n,r}(\phi))= \sum_{j\geq-1}A^{n,r}_j(\phi)(s-s_0)^j, \]
where each Laurent coefficient $A^{n,r}_j(\phi)$ is an automorphic form on $G_{2n}$ and $A_j^{n,r}$ can be viewed as a linear map
\[A_j^{n,r}:\omega_{n,r}\longrightarrow \mathcal{A}(G_{2n}) \]
where $\mathcal{A}(G_{2n})$ is the space of automorphic forms on $G_{2n}$.

The theta function associated to 􏳔 $\phi\in S(V_r^n(􏳗\mathbb{A}))$ is defined by
\[\Theta(g,h;\phi)=\sum_{x\in V_r^n(F)}(\omega(g)\phi)(h^{-1}x)  \]
for $g\in G_{2n}(\mathbb{A})$ and $h\in H_r(\mathbb{A})$. Let $\tau(H_r)$ denote the Tamagawa number of $H_r$. By Weil's criterion \cite{weil}, the integral
\[I_{n,r}(\phi)(g)=\frac{1}{\tau(H_r)}\int_{H_r(F)\backslash H_r(\mathbb{A}) }\Theta(g,h;\phi)dh  \]
is absolutely convergent for all $\phi$ either if $r=0$ or $m>r+n$.
When $m\leq r+n$ and $r>0$, the integral diverges in general.

Let $V_r=X_r\oplus V_0\oplus X_r^\ast$ such that $X_r$ is the maximal isotropic subspace  in $V$ and $U(V_0)$ is anisotropic. Let $P(X_r)=M(X_r)N(X_r)$ be the maximal parabolic subgroup of $H_r$ which stabilizes the spaces $X_r$. Then its Levi factor is
\[M(X_r)\cong\mathrm{GL}_r(D)\times U(V_0). \]
Let us fix the Iwasawa decomposition $$H_r(\mathbb{A})=P(X_r)(\mathbb{A})\cdot K_{H_r}$$ such that $K_{H_r}\cap \mathrm{GL}(X_r)(\mathbb{A})$ is a maximal compact subgroup of $\mathrm{GL}_r(X_r)(\mathbb{A})$.
Let $$I_{H_r}(s)=Ind_{P(X_r)(\mathbb{A})}^{H_r(\mathbb{A})}\alpha_E^s\boxtimes\mathbf{1}_{U(V_0)}$$ be the normalized induced representation of $H_r(\mathbb{A})$ where $\alpha_E^s$ is a character of $\mathrm{GL}_r(D(\mathbb{A}))$ and $\mathbf{1}_{U(V_0)}$ is the trivial representation of $U(V_0)$.

 Following \cite{kudla1994annals}, Ichino \cite{ichino2001crelle} defined a regularization of the integral $I(g,\phi)$ as follow
\begin{equation}\label{regularization}
\mathcal{E}^{n,r}(s,\phi)(g)=\frac{1}{\tau(H_r)\cdot \kappa_r\cdot P_{n,r}(s)}\int_{H_r(F)\backslash H_r(\mathbb{A}) }\Theta(g,h;z.\phi)E_{H_r}(s,\phi)dh, \end{equation}
where
\begin{itemize}
	\item $z$ lies in the spherical Hecke algebra of $G_{2n}(F_v)\cong U_{nd,nd}$ for $v$ non-archimedean and $E_v$ is a field so that the action of $z$ commutes with the action of $G_{2n}(\mathbb{A})\times H_r(\mathbb{A})$ and $\Theta(g,-;z.\phi)$ is rapidly decreasing;
	\item $E_{H_r}(s,h)$ is the Eisenstein series given by
	\[E_{H_r}(s,h)=\sum_{\gamma\in P(X_r)(F)\backslash H(F) }f_s^0(\gamma h)  \]
	where $f_s^0\in I_{H_r}(s)$ is the $K_{H_r}$-spherical standard section with $f_s^0(1)=1$;
	\item $P_{n,r}(s)$ is a scalar such that the Hecke operator $z\ast E_{H_r}(s,-)=P_{n,r}(s)\cdot E_{H_r}(s,-)$, which can be found in \cite[Page 208]{ichino2001crelle}.
\end{itemize}
The regularized integral (\ref{regularization}) converges absolutely at all points $s$ where $E_{H_r}(s,h)$ is holomorphic, and defines a meromorphic function of $s$ (independent of the choice of the Hecke operator $z$). (See \cite{ichino2001crelle}.) We are interested in the behavior of $\mathcal{E}^{n,r}(s,\phi)$ at
\[s=\rho_{H_r}=(m-r)d/2. \]
It turns out that in the first term range, when $m\leq n$, it has a pole of order at most $1$
  whereas in the second term range, it has a pole of order at most $2$ when $n+1\leq m\leq n+r$ and $r>0$.
Thus, the Laurent expansion of (\ref{regularization}) at $s=\rho_{H_r}$ has the form
\[\mathcal{E}^{n,r}(s,\phi)=\sum_{i\geq-2}B^{n,r}_i(\phi)(s-\rho_{H_r})^i  \]
where $B^{n,r}_{-2}(\phi)=0$ if $m\leq n$.
Then each Laurent coefficient $B^{n,r}_i(\phi)$ is an automophic form on $G_{2n}$, and hence we view $B^{n,r}_i$ as a linear map
\[B^{n,r}_i:\omega_{n,r}\longrightarrow \mathcal{A}(G), \]
via $\phi\mapsto B^{n,r}_i(\phi)$,
where $\mathcal{A}(G_{2n})$ is the space of automorphic forms on $G_{2n}$.

 Yamana \cite{yamana2013siegel} showed the first term identity in the first term range, i.e. $m\leq n$. In this paper, we will focus on the sencond term range, i.e. $n+1\leq m\leq n+r$.
 \begin{thm}[Siegel-Weil formula] Suppose that $n+1\leq m\leq n+r$. Then one has:
 	\begin{enumerate}[(i)]\label{secondtermsiegelweil}
 		\item (First term identity) $A^{n,r}_{-1}(\phi)=c\cdot B^{n,r}_{-2}(\phi)$ for a constant $c>0$;
 		\item (Second term identity) $$A^{n,r}_0(\phi)=B^{n,r}_{-1}(\phi)+c'\cdot B_0^{n,r'}(Ik^{n,r}(\pi_{K_{H_r}}\phi))\pmod{\mbox{Im } A_{-1}^{n,r}}.$$
 		Here $c'$ is a constant and $0<r'<r$ is such that $m_0+2r'=2n-m$. Moreover,
 		\[Ik^{n,r}:\omega_{n,r}\longrightarrow\omega_{n,r'} \]
 		is the Ikeda map which is $G_{2n}\times H_{r'}$-equivariant. If $m= n+r$, then
 		\[A_0^{n,r}(\phi)=B_{-1}^{n,r}(\phi)\pmod{\mbox{Im }A_{-1}^{n,r} }. \]
 	\end{enumerate}
 \end{thm}

\begin{rem}
	When $d=1$,  it has been proven by Gan-Qiu-Takeda in \cite[Theorem 1.1]{gan2014siegelweil} and $c=1$.
\end{rem}

Now we briefly describe the contents and the organization of this paper. The basic notation will be set up in \S2. In \S3, we will introduce the Eisenstein series and their various properties.
The proof of Theorem \ref{secondtermsiegelweil} will be given in \S4. We will use the doubling method to sudy the nonvanishing of the global theta lift in the last section.

\section{Preliminaries}
From now on, we will follow the notation of Gan-Qiu-Takeda \cite{gan2014siegelweil} in this section. Let $W_{2n}$ be a $2n$-dimensional right $D$-vector space with a nondegenerate skew-Hermitian form. Assume that $Y_n$ is a maximal isotropic subspace in $W_{2n}$ of dimension $n$, so that
$W_{2n}=Y_n\oplus Y_n^\ast$. We fix an ordered basis $\{y_1,y_2,\cdots,y_n \}$ of $Y_n$ and corresponding dual basis $\{y_1^\ast,\cdots,y_n^\ast \}$ of $Y_n^\ast$, so that $Y_n=\oplus^n_{i=1} y_iD$
and $Y_n^\ast=\oplus_{i=1}^ny_i^\ast D$. For any subspace $Y_r=\oplus_{i=1}^ry_iD\subset Y_n$, let
\[Q(Y_r)=L(Y_r)\cdot U(Y_r) \]
denote the maximal parabolic subgroup fixing $Y_r$. Then its Levi factor is
\[L(Y_r)\cong \mathrm{GL}(Y_r)\times G_{2n-2r}. \]
If $r=n$, then $Q(Y_r)$ is a Siegel parabolic subgroup of $G_{2n}$.

The unipotent radical $U(Y_r)$ of $Q(Y_r)$ sits in a short exact sequence
\[\xymatrix{1\ar[r]&Z(Y_r)\ar[r]&N(Y_r)\ar[r]&Y_r\otimes V_{n-r}\ar[r]&1 } \]
where
\[Z(Y_r)=\{\mbox{Hermitian forms on }Y_r^\ast \}\subset \mathrm{Hom}(Y_r^\ast,Y_r). \]

\subsection{Measures} Let us fix the additive character $\psi$ of $\mathbb{A}/F$ and the Tamagawa measure $dx$ on $\mathbb{A}$. Locally, we fix the Haar measure $dx_v$ on $F_v$ to be self-dual with respect to $\psi_v$. For any algebraic group $G$ over $F$, we always use the Tamagawa measure on $G(\mathbb{A})$ when $G(\mathbb{A})$ is unimodular. This applies to the Levi subgroups and the unipotent radical of their parabolic subgroups. We use $\tau(G)$ to denote the Tamagawa number of $G$.
 For any compact group $K$, we always use the Haar measure $dk$ with respect to which $K$ has volume $1$.
\subsection{Complementary spaces}
With $W_{2n}$ fixed, one may associate to $V_r$ a complementary space $V_{r'}$ such that
\[\dim V_{r'}=m_0+2r'=2n-m \]
and the quadratic character associated to $V_{r'}$ is $\chi_V$. If $m=n+r$, then $r'=0$ and the unitary group $U(V_0)$ is anisotropic. If $r>r'$,
we may write $V_r=X_{r-r'}'\oplus V_{r'}\oplus {X'}_{r-r'}^\ast$ where
\[X_{r-r'}'=\oplus_{i=r'+1}^r  Dx_{i} \]
when $X_r=\oplus_{i=1}^r Dx_{i} $ and $\{x_1,\cdots,x_r \}$ is a basis of $X_r$. We say that $V_r$ and $V_{r'}$ lie in the same Witt tower.

For any maximal parabolic subgroup $P(X_{r-r'})$ of $H_r$, with Levi subgroup $\mathrm{GL}(X_{r-r'})\times H_r'$, we define a constant $\kappa_{r,r'}$ by the requirement that
\[\frac{1}{\tau(H_r)}=\kappa_{r,r'}\cdot\frac{1}{\tau(H_{r'})}\cdot dm\cdot dn\cdot dk \]
where $dm$ and $dn$ are the Tamagawa measures of $M(X_{r-r'})$ and $N(X_{r-r'})$ respectively. In particular $\kappa_r=\kappa_{r,0}$.
\subsection{Ideka's map}
Suppose that $V_r\supset V_{r'}$(not necessarily complementary spaces) and
\[ \dim V_r=m_0+2r=\dim V_{r'}+2(r-r'). \]
Then one may write
\[ V_r=X_{r-r'}'\oplus V_{r'}\oplus {X'}^\ast_{r-r'}. \]
We can define a map
\[Ik^{n,r,r'}:S(Y_n^\ast\otimes V_r )(\mathbb{A}) \longrightarrow S(Y_n^\ast\otimes V_{r'})(\mathbb{A}) \]
given by
\[Ik^{n,r,r'}(\phi)(a)=\int_{(Y_n^\ast\otimes X'_{r-r'} )(\mathbb{A}) }\phi(x,a,0)dx,  \]
for $a\in(Y_n^\ast\otimes V_{r'})(\mathbb{A})$. Thus,
$Ik^{n, r,r'}$ is the composite
\[
 \begin{CD}
S(Y_n^* \otimes V_r)
= S(Y_n^* \otimes V_{r'})\otimes
S(Y_n^* \otimes (X'_{r-r'} + {X'}^*_{r-r'}))\\
@VVId \otimes \mathcal{F}_1V \\
S(Y_n^* \otimes V_{r'})\otimes
S(W_{2n}\otimes X'_{r-r'})\\
@VVId \otimes ev_0V \\
S(Y_n^* \otimes V_{r'})
\end{CD}
\]
where
\[  \mathcal{F}_1 : S(Y_n^* \otimes (X'_{r-r'} +
{X'}^*_{r-r'}))
\longrightarrow S(W_{2n}\otimes X'_{r-r'})\]
is the partial Fourier transform in the subspace $(Y_n^* \otimes
{X'}^*_{r-r'})(mathbb{A})$, and $ev_0$ is  evaluation at $0$. It is clear that
if $r'' < r' < r$, one has
\begin{equation} \label{E:ikeda}
Ik^{n,r', r''} \circ Ik^{n, r, r'}  = Ik^{n, r, r''}.
\end{equation}

In the special case when  $V$ and $V'$ are complementary
spaces, we shall simply write $Ik^{n,r}$ for $Ik^{n,r,r'}$.  We will call
$Ik^{n,r}$ (more generally $Ik^{n,r,r'}$) an Ikeda map.

\subsection{Weil representation}
Let $\omega_{n,r}$ be the Weil representation of $G_{2n}(\mathbb{A})\times H_r(\mathbb{A})$. More precisely, given a Schwartz-Bruhat function $\phi\in S(Y_n^\ast\otimes V_r )(\mathbb{A})$, the $P(Y_n)(\mathbb{A})\times H_r(\mathbb{A})$-action is given by
\[
\begin{cases}
\omega_{n,r}(1, h)\phi(x)  = \phi(h^{-1} \cdot x),  &\text{  if $h \in H_r(\mathbb{A})$;} \\
\omega_{n,r}(a,1) \phi(x)  =  \chi_V(\nu(a)) \cdot \alpha_E(\nu (a))^{md/2}
\cdot \phi( a^{-1} \cdot x),  &\text{  for $a \in L(Y_n)(\mathbb{A}) =
	\mathrm{GL}(Y_n)(\mathbb{A})$;} \\
\omega_{n,r}(u,1) \phi(x)  = \psi(\frac{1}{2} \cdot  \langle  u(x),
x\rangle)\cdot \phi(x),  &\text{  for $u \in N(Y_n)(\mathbb{A})  \subset
	\mathrm{Hom}(Y_n^*, Y_n)(\mathbb{A})$.}
\end{cases} \]

\subsection{The Fourier transform $\mathcal{F}_{n,r}$}
There is a partial Fourier transform
\[\mathcal{F}_{n,r}:S(Y_n^\ast \otimes V_r)(\mathbb{A})\longrightarrow S(W_{2n}\otimes X_r^\ast)(\mathbb{A}) \otimes S(Y_n^\ast \otimes V_0)(\mathbb{A}) \]
which is given by integration over the subspace
$(Y_n^\ast\otimes X_r )(\mathbb{A})$. We may regard $\mathcal{F}_{n,r}(\phi)$ as a function on $(W_{2n}\otimes X_r^\ast)(\mathbb{A})$ taking values in $S(Y_n^\ast \otimes V_0)(\mathbb{A})$.

\section{Eisenstein series}
In this section, we will study the analytic behavior of the Eisenstein series at certain points.
\subsection{The Siegel Eisenstein series}
Let $G_{2n}$ be the unitary group of $W_{2n}$. Let $P(Y_n)$ be the Siegel parabolic subgroup of $G_{2n}$.
Given a normalized induced representation $I(s,\chi_V)=Ind_{P(Y_n)(\mathbb{A})}^{G_{2n}(\mathbb{A})}\chi_V\alpha_E^s$, one can construct an Eisenstein series
\[E(g;f^{(s)})=\sum_{\gamma\in P(Y_n)(F)\backslash G_{2n}(F) }f^{(s)}(\gamma g) \]
for $f^{(s)}\in I(s,\chi_V)$ and $g\in G_{2n}(\mathbb{A})$. Sometimes we write
\[E(g;f^{(s)})= E^{(n,n)}(g;f^{(s)}) \]
when we want to emphasize the rank of the group. It admits a meromorphic continuation to the whole $s$-plane.

Let $a(s,\chi_V)=\prod_{j=1}^{dn}L(2s-j+1,\omega_{E/F}^{j+d(n+m)})$ and
\[b(s,\chi_V)=\prod_{j=1}^{dn}L(2s+j,\omega_{E/F}^{j+d(n+m)}). \]
\begin{proof}[Proof of Lemma \ref{siegeleisenstein}]
 Suppose that $f^{(s)}\in I(s,\chi_V)$. The normalized intertwining operator $M_n(s,\chi_V)$ in \cite{yamana2013siegel} is given  as follow
	\[M_n(s,\chi_V)f^{(s)}(g)=a(s,\chi_V)^{-1}\int_{N(Y_n)(\mathbb{A})} f^{(s)}(\begin{pmatrix}
	0&\mathbf{1}_n\\-\mathbf{1}_n&0
	\end{pmatrix}ng)dn . \]
	Then $M_n(s,\chi_V)$ is entire due to \cite[Lemma 1.2]{yamana2013siegel}. Moreover, at the point $s=s_0=(m-n)d/2$,
	\[ord_{s=s_0} E(g;f^{(s)})=ord_{s=s_0}\frac{a(s,\chi_V)}{b(s,\chi_V)}=-1. \]
	Therefore, $E(s,f^{(s)})$ has a simple pole at $s=s_0=(m-n)d/2$.
\end{proof}
Given a function $\phi\in S(Y_n^\ast\otimes V_r)(\mathbb{A})$,
set $$f^{(s)}(g)=\Phi^{n,r}(\phi)(g)=\omega_{n,r}(g)\phi(0)$$ and then $f^{(s)}\in I(s_0,\chi_V)$ which is called the Siegel-Weil section. Its image in $I(s_0,\chi_V)$ is isomorphic to the maximal $H_r(\mathbb{A})$-invariant quotient of $\omega_{n,r}$ by \cite[Proposition 1.4]{yamana2013siegel}.
 Let $f^{(s)}=\Phi^{n,r}(\phi)$ be the Siegel-Weil section so that
\[E(g;\Phi^{n,r}(\phi))=A^{n,r}_{-1}(\phi)(s-s_0)^{-1}+A^{n,r}_0(\phi)+\cdots. \]
Here $A_0^{n,r}(\phi)$ denotes $Val_{s=s_0}E(g;\Phi^{n,r}(g))$.

There are local analogous notation for the intertwining operator and the Siegel-Weil section. Suppose that $V_r(F_v)$ is a Hermitian vector space over $D_v$. The maximal $H_r(F_v)$-invariant quotient of $(\omega_{n,r,v})_{H_r(F_v)}$ is isomorphic to a subrepresentation of $I_v(s_0,\chi_V)$, denoted by $R_n(V_r(F_v))$.

Let $\mathcal{C}=\{\mathfrak{V}_v \}$ be a collection of local Hermitian spaces of dimension $m$ over $D_v$ such that $\mathfrak{V}_v$ is isometric to $V_{r}(F_v)$ for almost all $v$. We form a restricted tensor product $\Pi(\mathcal{C},\chi_V)=\otimes_v' R_{n}(\mathfrak{V}_v)$, which we can regard as a subrepresentation of $I(s_0,\chi_V)$. If there is a global Hermitian $D$-vector space with $\mathfrak{V}_v$ as its completions, then we call $\mathcal{C}$ coherent. Otherwise, we call the collection $\mathcal{C}$ incoherent. By \cite[Proposition 1.4]{yamana2013siegel}, we see that the maximal semisimple quotient of $I(s_0,\chi_V)$ is given by
\[\bigoplus_\mathcal{C} \Pi(\mathcal{C},\chi_V) \]
where the sum runs over all the collections $\mathcal{C}$ (coherent or incoherent) as defined above.

Due to \cite[Proposition 3.5]{yamana2013siegel}, the image of $A^{n,r}_{-1}(\phi)$ is given by
$$\bigoplus_{\mathcal{C} }\Pi(\mathcal{C},\chi_V)  $$
where $\mathcal{C}$ runs over coherent collections.
\begin{prop}\label{secondterm}
	The leading term $A_{-1}^{n,r}(\phi)$ is $G_{2n}(\mathbb{A})$-equivariant and
	\[A_0^{n,r}(\omega_{n,r}(g)\phi)=g\cdot A_{0}^{n,r}(\phi)\pmod{Im A_{-1}^{n,r}} \]
	for any $g\in G(\mathbb{A})$ and $\phi\in S(Y_n^\ast\otimes V_r)(\mathbb{A})$.
\end{prop}
Note that when $v\in S$, $R_n(V_r(F_v))$ is the full induced representation $I(s_0,\chi_V)$. (See \cite[Proposition 1.4]{yamana2013siegel}.) Then Proposition \ref{secondterm} follows from \cite[Proposition 6.4]{gan2014siegelweil}.

\subsection{The non-Siegel Eisenstein series} Recall that
\begin{align*} \mathcal{E}^{n,r}(s,\phi)(g)&= \frac{1}{\tau(H_r)\cdot\kappa_r\cdot P_{n,r}(s)}\int_{H_r(F)\backslash H_r(\mathbb{A}) }\Theta(g,h;z.\phi)E_{H_r}(s,\phi)dh
\\&=\sum_{i\geq-2}B^{n,r}_i(\phi)(g)(s-\rho_{H_r})^i. \end{align*}
\begin{lem}
	There exists a function $c_r(s)$ such that
	\[E_{H_r}(s,-)=c_r(s)\cdot E_{H_r}(-s,-). \]
\end{lem}
Unfolding the Eisenstein series $E_{H_r}(s,-)$, one can
obtain the following.
\begin{prop}\cite[Proposition 3.3]{gan2014siegelweil}
	Assume that $Re(s)$ is sufficiently large. Then
	\[\mathcal{E}^{n,r}(s,\phi)=E^{(n,r)}(s,f^{n,r}(s,\pi_{K_{H_r}}(\phi))). \]
	The following explains the notation in the above proposition:
	\begin{itemize}
		\item $E^{(n,r)}$ refers to the Eisenstein series associated to the family of induced representations \[I_r^n(s,\chi_V)=Ind_{Q(Y_r)}^{G_{2n}(\mathbb{A})}(\chi_V\alpha_E^s\boxtimes\Theta_{n-r,0}(V_{0})  ) \]
		where we recall that the Levi factor of $Q(Y_r)$ is $L(Y_r)\cong \mathrm{GL}(Y_r)\times G_{2n-2r}$ and $$\Theta_{n-r,0}(V_0)=\langle \frac{1}{\tau(V_0)}\int_{H_0(F)\backslash H_0(\mathbb{A})}\Theta_{n-r,0}(g,h;\phi)dh:\phi\in S(Y_{n-r}^\ast\otimes V_0)(\mathbb{A}) \rangle. $$
		If $m_0=0$, then $\Theta_{n-r,0}(V_0)$ is interpreted to be the character $\chi_V\circ\iota \circ \nu_{G_{2n-2r}}$ where $\iota:E^\times/F^\times\rightarrow E^1$ is the natural isomorphism and $\nu_{G_{2n-2r}}:G_{2n-2r}\rightarrow E^1$ is the reduced norm map.
		\item $\pi_{K_{H_r}}$ is the projection operator onto the $K_{H_r}$-fixed subspace, defined by
		\[\pi_{K_{H_r}}(\phi)=\int_{K_{H_r}}\omega_{n,r}(k)(\phi)dk.  \]
		\item For $\phi\in S(Y_n^\ast\otimes V_r)(\mathbb{A})$,
		\[f^{n,r}(s,\phi)\in I_r^n(s,\chi_V) \]
is a meromorphic section given by

 \begin{align*}   f^{n,r}(s,\phi)(g)  &=
\int_{\mathrm{GL}(X_r)(\mathbb{A})} I_{n-r,0}(\omega_{n,r}(g,a)\mathcal{F}_{n,r}(\phi)
( \beta_0)(0 , -) )\,\cdot   \alpha_E(\nu(a))^{s  - \rho_H} \, da \\
&=  \int_{\mathrm{GL}(X_r)(\mathbb{A})} I_{n-r,0}(\omega_{n,r}(g)\mathcal{F}_{n,r}(\phi)
( \beta_0 \circ a )(0 , -) )\,\cdot   \alpha_E(\nu(a))^{s  +nd -
	\rho_H} \, da.
\end{align*}
Here we note that  $\mathcal{F}_{n,r}(\phi)$ is a Schwartz function on
$X_r^* \otimes W_n = \mathrm{Hom}(X_r, W_n)$ taking values in
\[  \mathcal{S}(Y_n^* \otimes V_0)(\mathbb{A})  =  \mathcal{S}(Y_r^* \otimes V_0)(\mathbb{A})
\otimes \mathcal{S}({Y'}^*_{n-r}\otimes V_0)(\mathbb{A}), \]
and
\[  \beta_0 \in \mathrm{Hom}(X_r, W_{n}) \]
is defined by
\[  \beta_0(x_i)  = y_i  \quad \text{for $i = 1,\dots,r$,} \]
so that
\[  \mathcal{F}_{n,r}(\phi)(\beta_0 \circ a)(0,-) \in \mathcal{S}({Y'}^*_{n-r} \otimes V_0)(\mathbb{A}). \]
The integral defining $f^{n,r}(s,\phi)$ converges when
\[  {\rm Re}(s) > \frac{md}{2} - \frac{(2n-r)d }{2} \]
and extends to  a meromorphic section of $I^n_r(s, \chi)$ (since it
is basically a Tate-Godement-Jacquet zeta integral).
 When $r=0$ and $m_0>0$, we set $f^{n,0}(s,\phi)(g)=I_{n,0}(\phi)(g)$ by convention.
	\end{itemize}
\end{prop}
Following \cite[\S4.2]{gan2014siegelweil}, we express elements of $Y_n^\ast\otimes V_r$ as $3\times 2$ matrices corresponding to the decompositions
\[Y_n^\ast=Y_r^\ast\oplus {Y'}_{n-r}^\ast\mbox{  and  }V_r=X_r\oplus V_0\oplus X_r^\ast, \]
so the first column of the matrix has entries from $Y_r^\ast\otimes X_r,Y_r^\ast\otimes V_0$ and $Y_r^\ast\otimes X_r^\ast$ in this order, and the second column has entries from ${Y'}_{n-r}^\ast\otimes X_r,{Y'}^\ast_{n-r}\otimes V_0$ and ${Y'}_{n-r}^\ast\otimes X_r^\ast$.
\begin{lem}
	\cite[Lemma 4.1]{gan2014siegelweil} One has
	\[f^{n,r}(g)=I_{n-r,0}(\mathfrak{f}^{n,r}(s,\phi)(g) ) \]
	where $\mathfrak{f}^{n,r}(s,\phi)(g)(-)=\int_{\mathrm{GL}(X_r)(\mathbb{A})}\int_{({Y'}_{n-r}^\ast\otimes X_r)(\mathbb{A})}\omega_{n,r}(g)\phi\begin{pmatrix}
	A& X_2\\0&-\\0&0
	\end{pmatrix} \alpha_E(\nu(A))^{-s+rd-dn+\rho_{H_r}}dX_2dA $
\end{lem}
Moreover, one can extend the definition of $f^{n,r}(s,\phi)$ to define functions $F^{n,r}(s,\phi)$ on $G_{2n}\times H_r$ such that $F^{n,r}(s,\phi)\in I_r^n(s,\chi_V)\boxtimes I_{H_r}(-s)$ and $F^{n,r}(s,\phi)|_{G_{2n}}=f^{n,r}(s,\phi)$, see \cite[Remark 4.3]{gan2014siegelweil}.

Now we consider the restriction of the section $f^{n+1,r}(s,\phi)$ from $G_{2n+2}$ to $G_{2n}$ which is closely related to the Ikeda map $Ik^{n,r,r-1}$. More precisely, fix $\phi_1\in S(Y_1^\ast\otimes V_r)(\mathbb{A})$ satisfying:
\begin{itemize}
	\item $\phi_1(0)=1;$
	\item $\phi_1$ is $K_{H_r}$-invariant, so that $\pi_{K_{H_r}}(\phi_1)=\phi_1$.
\end{itemize}
For any $\phi\in S({Y'}_n^\ast\otimes V_r)(\mathbb{A})$, we set
\[\tilde{\phi}=\phi_1\otimes\phi\in S(Y_{n+1}^\ast\otimes V_r )(\mathbb{A}) .\]
Then $\pi_{K_{H_r}}(\tilde{\phi})=\phi_1\otimes\pi_{K_{H_r}}(\phi)$. Let $W_{2n}=\langle y_2,\cdots,y_{n+1},y_{n+1}^\ast,\cdots,y^\ast_2\rangle \subset W_{2n+2}$ and $$G_{2n}=U(W_{2n})\subset U(W_{2n+2})= G_{2n+2}.$$
\begin{prop}\cite[Proposition 4.2]{gan2014siegelweil} Suppose $m_0>0$ when $r=1$. Then
	there is a constant $\alpha_r>0$ such that
	\[ f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}}=\alpha_r Z_1(-s-(n+1-r)d+\rho_{H_r},\phi_1)\cdot f^{n,r-1}(s+d/2,Ik^{n,r,r-1}(\pi_{K_{H_r}}(\phi))), \]
	where $Z_1(s,\phi_1)$ is the Tate zeta integral
	\[Z_1(s,\phi_1)=\int_{\mathrm{GL}_1(Y_1^\ast)(\mathbb{A}) }\phi_1(ty_1^\ast\otimes x_1)\alpha_E(\nu(t))^sdt. \]
	Moreover, the constant $\alpha_r$ is given in \cite[Lemma 9.1]{ichino2004mathz}.\label{functionf(r)}
\end{prop}
\begin{proof} It suffices to consider the function $\mathfrak{f}^{n,r}(s,\phi)(-)$.
	Assume that $r=1$ and $m_0>0$. Observe that
	\begin{align*}&\mathfrak{f}^{n+1,r}(s,\pi_{K_{H_r}}\tilde{\phi})(g)(-)\\
	&=\int_{({Y'}^\ast_{n+1-r}\otimes X_r)(\mathbb{A}) } \int_{\mathrm{GL}_r(D(\mathbb{A}))}\phi_1(A)\alpha_E(\nu(A))^{-s+rd-dn-d+\rho_{H_r}} dA
	 \omega_{n,r}(g)\pi_{K_{H_r}}(\phi)\begin{pmatrix}
	Y\\-\\0
	\end{pmatrix}dY\\
	&=Z_1(-s-(n+1-r)d+\rho_{H_r},\phi_1)\cdot \mathfrak{f}^{n,r-1}(s+d/2,\phi)(g)(-)  \end{align*}
	because $r-1=0$.
	The proposition holds with $\alpha_1=1$.
	\par
	 If $r>1$, then we use the Iwasawa decomposition on $\mathrm{GL}_r(D(\mathbb{A}))$. Namely, we have
	\[A=k\cdot \begin{pmatrix}
	1&u\\&1
	\end{pmatrix}\cdot \begin{pmatrix}
	t&\\&B
	\end{pmatrix}=k\cdot\begin{pmatrix}
	t& uB\\&B
	\end{pmatrix} \]
	with
	\begin{itemize}
		\item 	$t\in\mathrm{GL}_1(D(\mathbb{A}))$;
		\item $u\in D(\mathbb{A})^{r-1}$;
		\item $B\cong \mathrm{GL}_{r-1}(D(\mathbb{A}))$;
		\item $k$ is an element in a maximal compact subgroup $K=K_{H_r}\cap \mathrm{GL}_r(D(\mathbb{A}))$ of $\mathrm{GL}_r(D(\mathbb{A}))$.
	\end{itemize}
Accordingly, we have a constant $\alpha_r$ such that
\[\int_{\mathrm{GL}_r(D(\mathbb{A}))}\varphi(A)dA=\alpha_r\cdot \int_{\mathrm{GL}_1(D(\mathbb{A}))}\int_{\mathrm{GL}_{r-1}(D(\mathbb{A}))}\int_{D(\mathbb{A})^{r-1}}\int_K \varphi(k\cdot\begin{pmatrix}
t&uB\\0&B
\end{pmatrix}) dtdBdudk     \]
for any $\varphi\in C_c^\infty(\mathrm{GL}_r(D(\mathbb{A})))$. Moreover, the explicit formula for $\alpha_r$ is given in \cite[Lemma 9.1]{ichino2004mathz}. Since the function $\pi_{K_{H_r}}\tilde{\phi}$ is $K_{H_r}$-invariant, the integral over $dk$ gives the value $1$ and thus disappears.
 Hence
\begin{align*}
&\mathfrak{f}^{n+1,r}(s,\pi_{K_{H_r}}\tilde{\phi})(g)(-)\\
=&\alpha_r\cdot \int_t\int_B\int_u\int_Y \phi_1\otimes\omega_{n,r}(g)\pi_{K_{H_r}}\phi\begin{pmatrix}\begin{matrix}
t\\0
\end{matrix}&
\begin{matrix}
uB\\ensuremath{{\bf B}}
\end{matrix}&Y\\
0&0&-\\0&0&0
\end{pmatrix} \\
&\times  \alpha_E(\nu(t))^{-s-(n+1-r)d+\rho_{H_r}}\alpha_E(\nu(B))^{-s-(n+1-r)d+\rho_{H_r}}dtdBdudY\\
=&\alpha_r\cdot Z_{1}(-s-(n+1-r)d+\rho_{H_r},\phi_1)\\
&\times \int_u\int_B\int_Y \omega_{n,r}(g)\pi_{K_{H_r}}\phi \begin{pmatrix}
\begin{matrix}
uB\\ B
\end{matrix}&Y\\ 0&-\\0&0
\end{pmatrix}\alpha_E(\nu(B))^{-s-(n+1-r)d+\rho_{H_r}}dYdBdu\\
=&\alpha_r\cdot Z_{1}(-s-(n+1-r)d+\rho_{H_r},\phi_1)\\
&\times \int_B\int_{Y_2}\int_{Y_1}\int_{u}  \omega_{n,r}(g)\pi_{K_{H_r}}\phi \begin{pmatrix}
\begin{matrix}
u\\ B
\end{matrix}&\begin{matrix}
Y_1\\Y_2
\end{matrix}\\ 0&-\\0&0
\end{pmatrix}\alpha_E(\nu(B))^{-s-d-(n+1-r)d+\rho_{H_r}}dudY_1dY_2dB\\
=&\alpha_r Z_1(-s-(n+1-r)d+\rho_{H_r},\phi_1)\mathfrak{f}^{n,r-1}(s+d/2,Ik^{n,r,r-1}(\pi_{K_{H_r}}\phi))(g)(-)
\end{align*}
since $\rho_{H_r}=\rho_{H_{r-1}}+d/2$.
This finishes the proof of Proposition \ref{functionf(r)}.

\end{proof}

\section{The Siegel-Weil formula}
Let $V_{r'}$ be the complementary space of $V_r$.
Suppose that $0<m'=m_0+2r'\leq n$ with $r'>0$.
\begin{thm}
	\cite[Theorem 2]{yamana2013siegel} Fix a function $\phi'\in S(Y_n^\ast\otimes V_{r'})$. Let $f'$ be the Siegel-Weil section associated to $V_{r'}$. Then the Siegel Eisenstein series $E(s,f')$ is holomorphic at $s=(m'-n)d/2 $ and $A_0^{n,r'}(\phi')=2B_{-1}^{n,r'}(\phi')$.
	In particular, if $m=n$ so that $r=r'$, then $A_{0}^{n,r}(\phi)=2B_{-1}^{n,r}(\phi)$ for $\phi\in S(Y_n^\ast\otimes V_r)(\mathbb{A})$.
\end{thm}
This is called the regularized Siegel-Weil formula in the first term range. There is another form:
\[A_{-1}^{n,r}(\phi)=\kappa_{r,r'} B_{-1}^{n,r'}(Ik^{n,r}\pi_{K_{H_r}}\phi) \]
for any $\phi\in S(Y_n^\ast\otimes V_r)(\mathbb{A})$ due to \cite[Theorem 4.1]{ichino2004mathz}. In particular, $A_{-1}^{n,r}(\phi)=\kappa_{r,r'}B^{n,r' }_0(Ik^{n,r}\pi_{K_{H_r}}\phi)$ when $r'=0$.
\begin{thm}
[Weil] Let $U(V_0)$ be the anisotropic unitary group defined over $F$. For $\phi\in S(Y_n^\ast\otimes V_0)(\mathbb{A})$, there exists a constant $c>0$ such that
\[A_0^{n,0}(\phi)=c\cdot I_{n,0}(\phi) \]
\end{thm}
\begin{lem}
	\cite[Proposition 7.2]{gan2014siegelweil}
	For $\phi\in S(Y_n^\ast\otimes V_0)(\mathbb{A})=S(y_1^\ast\otimes V_0)(\mathbb{A})\otimes S({Y'}^\ast_{n-1}\otimes V_0)(\mathbb{A})$, we have
	\[I_{n,0}(\phi)_{U_1(Y_1)}|_{\mathrm{GL}(Y_1)(\mathbb{A})\times G_{2n-2}(\mathbb{A}) }=\chi_V\cdot\alpha_E^{m_0d}\boxtimes I_{n-1,0}(\phi(0,-)) \]
	where $I_{n,0}(\phi)_{U_1}$ is the constant term of $I_{n,0}(\phi)$ with respect to the maximal parabolic $Q_1(Y_1)$.
\end{lem}

\begin{proof}[Proof of Theorem \ref{secondtermsiegelweil}]
	Suppose that we are dealing with the Weil representation of $G_{2n+2}\times H_r$ with $m=n+1$. Then for $\tilde{\phi}\in S(Y_{n+1}^\ast\otimes V_r )(\mathbb{A})$, \cite[Theorem 2]{yamana2013siegel} implies that \[A_0^{n+1,r}(\tilde{\phi})=2B_{-1}^{n+1,r}(\tilde{\phi}). \]
	Let us take the constant term of both sides with respect to the maximal parabolic $Q^{n+1}(Y_1)=L^{n+1}(Y_1)\cdot U^{n+1}(Y_1)$ of $G_{2n+2}$, which gives
	 \[  A^{n+1,r}_0(\tilde{\phi})_{U^{n+1}(Y_1)}  = 2 \cdot
	B^{n+1,r}_{-1}(\tilde{\phi})_{U^{n+1}(Y_1)}, \]
	which is an identity of automorphic forms on $L(Y_1) = \mathrm{GL}(Y_1)
	\times G_{2n}$, where $W_{2n} = Y'_n \oplus {Y'_n}^*$. (Note that the
	superscript $^{n+1}$ in the groups $Q^{n+1}(Y_1)$ etc indicates the
	rank of the ambient group $G_{2n+2}$.)

	Let $f_s$ be the standard section of
	\[I_r^n(s,\chi_V)=Ind_{Q^{n+1}(Y_r)(\mathbb{A})}^{G_{2n+2}(\mathbb{A})}\chi_V\alpha_E^s\boxtimes\Theta_{n+1-r,0}(V_0). \]
	Let $E^{(n+1,r)}(s,f_s)(g)$ be the associated Eisenstein series, i.e.
	\[E^{(n+1,r)}(s,f_s)(g)=\sum_{\gamma\in Q^{n+1}(Y_r)(F)\backslash G_{2n+2}(F) }f_s(\gamma g)  \]
	for $g\in G_{2n+2}(\mathbb{A})$ and $Re(s)$ sufficiently large. Note that
	\[\mathcal{E}^{n,r}(s,\phi)=E^{(n,r)}(s,f^{n,r}(s,\pi_{K_{H_r}}(\phi))) \]
	and $A_0^{n+1,r}(\tilde{\phi})_{U(Y_1)}=Val_{s=0}E^{(n+1,n+1)}(s,\Phi^{n+1,r}(\tilde{\phi}))_{U(Y_1)}$.
	So we are interested in computing the constant term $E^{(n+1,r)}(s,f_s)_{U^{n+1}(Y_1)}$.

	Let us choose the double coset representatives $1,\omega^+$ and $\omega^-$ for the double coset space $Q^{n+1}(Y_r)\backslash G_{2n+2}/Q^{n+1}(Y_1)$, where
	\[\omega^+=\begin{pmatrix}
	J_{r+1}&0\\0&J_{r+1}
	\end{pmatrix} \]
	with $J_{r+1}=\begin{pmatrix}
	0&0&1&0\\0&\mathbf{1}_{r-1}&0&0\\1&0&0&0\\0&0&0&\mathbf{1}_{n-r}
	\end{pmatrix}$
	and \[\omega^-=\begin{pmatrix}
	0&0&1\\0&\mathbf{1}_{2n}&0\\-1&0&0
	\end{pmatrix}. \]
	Associated to the Weyl group element $\omega=\omega^+$ or $\omega^-$ is the standard intertwining operator $M(\omega,s)$:
	\[M(\omega,s)(f_s)(g)= \int_{(U^{n+1}(Y_1)(F)  \cap w Q^{n+1}(Y_r)(F) w^{-1})\backslash U^{n+1}(Y_1)(\mathbb{A})}
	f_s(w^{-1} u  g) \, du. \]
	By the same computation as in \cite[Lemma 8.2]{gan2014siegelweil}, as the automorphic forms on $L^{n+1}(Y_1)=\mathrm{GL}_1(Y_1)\times G_{2n}$,
	\begin{align*}
	E^{(n+1,r)}(s,f_s)_{U^{n+1}(Y_1)}= &\chi_V\alpha_E^{s+(n+1)d-rd/2}E^{(n,r-1)}(s+d/2,f_s|_{G_{2n}})+\chi_V\alpha_E^{md/2}E^{(n,r)}(s,M(\omega^+,s)(f_s)|_{G_{2n}})\\
	&+\chi_V\alpha_E^{-s+nd+d-rd/2}E^{(n,r-1)}(s-d/2,M(\omega^-,s)(f_s)|_{G_{2n}})
	\end{align*}
	and  $E^{(n+1,n+1)}(s,f)_{U^{n+1}(Y_1)}$
	\[=\chi_V\alpha_E^{s+(n+1)d/2}E^{(n,n)}(s+d/2,f|_{G_{2n}})+
	\chi_V\alpha_E^{-s+(n+1)d/2}E^{(n,n)}(s-d/2,M(\omega^-,s)(f)|_{G_{2n}}) \]
	for $f\in I_{n+1}^{n+1}(s,\chi_V)$.

	 Choose once and for all $\phi_1\in \mathcal{S}(Y_1^* \otimes
	V_r)(\mathbb{A})$ satisfying:

	\begin{itemize}
		\item $\phi_1(0) = 1$;
		\item $\phi_1$ is $K_{H_r}$-invariant, so that $\pi_{K_{H_r}} \phi_1 = \phi_1$.
	\end{itemize}

	Let $Y_n' = \langle y_2, ...,y_{n+1} \rangle$ so that ${Y'_n}^* = \langle y_2^*,...,y_{n+1}^* \rangle$.
	For any $\phi \in \mathcal{S}({Y_n'}^* \otimes V_r)(\mathbb{A})$, we set
	\[  \tilde{\phi} := \phi_1 \otimes \phi \in \mathcal{S}(Y_{n+1}^*
	\otimes V_r)(\mathbb{A}). \]
	Then
	\[  \pi_{K_{H_r}}(\tilde{\phi}) = \phi_1 \otimes \pi_{K_{H_r}}
	\phi. \]
	Note that the group $G_{2n}$ acts trivially on $\phi_1$, i.e. for
	$g\in G_{2n}(\mathbb{A})$,
	$$\omega_{n+1,r}(g)\tilde{\phi}=\phi_1\otimes\omega_{n,r}(g)\phi.$$
	\begin{enumerate}[(i)]
		\item We focus on the second term identity first. Observe that
		for $g\in G_{2n}(\mathbb{A})$,
		\[\Phi^{n+1,r}(\tilde{\phi})(g)=\phi_1(0)\cdot\omega_{n,r}(g)\phi(0)=\Phi^{n,r}(\phi)(g). \]
		Thus,
		\[E^{(n,n)}(s+d/2,\Phi^{n+1,r}(\tilde{\phi})|_{G_{2n}})=E^{(n,n)}(s+d/2,\Phi^{n,r}(\phi)) \]
		Note that the functional equation implies that
		\[E^{(n,n)}(s-d/2,M(\omega^-,s)(\Phi^{n+1,r}(\tilde{\phi})|_{G_{2n}})=E^{(n,n)}(d/2-s,M_n(s-d/2,\chi_V)(M(\omega^-,s)(\Phi^{n+1,r}(\tilde{\phi}))|_{G_{2n}})). \]
	where $M_n(s,\chi_V)$ is the normalized intertwining operator for the Siegel principal series. By the result of Kudla-Rallis in \cite[Lemma 1.2.2]{kudlarallis},
		\[M_n(s-d/2,\chi_V)M(\omega^-,s)=M_{n+1}(s,\chi_V) \]
		which is holomorphic at $s=0$.
		Moreover, $M_{n+1}(0,\chi_V)\Phi^{n+1,r}\tilde{\phi}=\Phi^{n+1,r}(\tilde{\phi})$. So
	by a similar computation appearing in \cite[\S9.2]{gan2014siegelweil}, one has
		\[A^{n+1,r}(\tilde{\phi})_{U^{n+1}(Y_1)}= 2A_0^{n,r}(\phi)\pmod{Im(A_{-1}^{n,r})} \]
		as the automorphic forms on $ G_{2n}$.

		Since $$B_{-1}^{n+1,r}(\tilde{\phi})=Res_{s=\rho_{H_r}}\mathcal{E}^{n+1,r}(s,\tilde{\phi})=Res_{s=\rho_{H_r}}E^{(n+1,r)}(s,f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))),$$ $B_{-1}^{n+1,r}(\tilde{\phi})_{U^{n+1}(Y_1)}$ is the residue at $s=\rho_{H_r}=(m-r)d/2$ of the function
		\begin{align*}\chi_V\alpha_E^{s+(n+1)d-rd/2}E^{(n,r-1)}(s+d/2,f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}})+\chi_V\alpha_E^{md/2}E^{(n,r)}(s,M(\omega^+,s)(f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi})))|_{G_{2n}})\\
		+\chi_V\alpha_E^{-s+nd+d-rd/2}E^{(n,r-1)}(s-d/2,M(\omega^-,s)(f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi})))|_{G_{2n}}). \end{align*}
		Note that $m=n+1$, so that $r'=r-1$. Then Proposition \ref{functionf(r)} implies
\[f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}}=\alpha_r Z_1(-s-\rho_{H_r},\phi_1) f^{n,r-1}(s+d/2,Ik^{n,r}(\pi_{K_{H_r}}(\phi))). \]
We will mainly concern the $\chi_V\alpha_E^{md/2}$-part of the residue at $s=\rho_{H_r}$ of
\[E^{(n+1,r)}(s,f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi})))_{U^{n+1}(Y_1)}. \]
 Due to \cite[Lemma 9.1]{gan2014siegelweil},  $E^{(n,r-1)}(s+d/2,f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}})$ is holomorphic at $s=\rho_{H_r}$. Thanks to \cite[Proposition 9.2]{gan2014siegelweil},
\[M(\omega^+,s)(f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}})=f^{n,r}(s,\pi_{K_{H_r}}(\phi)) \]
which implies that \[E^{(n,r)}(s,M(\omega^+,s)(f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}}))=\mathcal{E}^{n,r}(s,\phi).  \]
It has a residue $B_{-1}^{n,r}(\phi)$ at $s=\rho_{H_r}$.

For the last term, the functional equation implies that
\begin{align*}
&E^{(n,r-1)}(s-d/2,M(\omega^-,s)(f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}}))
\\=&E^{(n,r-1)}(d/2-s,M_n(\omega_{r-1},s-d/2)(M(\omega^-,s)f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}}))\\
=&E^{(n,r-1)}(d/2-s,M_{n+1}(\omega_r,s)f^{n+1,r}(s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}})\\
=&c_r(s)\cdot E^{(n,r-1)}(d/2-s,f^{n+1,s}(-s,\pi_{K_{H_r}}(\tilde{\phi}))|_{G_{2n}})\\
=&c_r(s)\cdot \alpha_r Z_1(s-\rho_{H_r},\phi_1)\cdot E^{(n,r-1)}(d/2-s,f^{n,r-1}(-s+d/2,Ik^{n,r}(\pi_{K_{H_r}}(\phi))))\\
=&c_r(s)\cdot\alpha_r Z_1(s-\rho_{H_r},\phi_1)\mathcal{E}^{n,r-1}(d/2-s,Ik^{n,r}(\pi_{K_{H_r}}(\phi)))\\
=&\frac{c_r(s)}{c_{r-1}(s-d/2)}\alpha_r Z_1(s-\rho_{H_r},\phi_1)\mathcal{E}^{n,r-1}(s-d/2,Ik^{n,r}(\pi_{K_{H_r}}(\phi)))
\end{align*}
due to \cite[Lemma 1.2.2]{kudlarallis} and \cite[Remark 9.4]{gan2014siegelweil}, where $$\omega_{r-1}=\begin{pmatrix}
0&0&\mathbf{1}_{r-1}\\0&\mathbf{1}_{2n+2-2r}&0\\-\mathbf{1}_{r-1}&0&0
\end{pmatrix},\quad \omega_r=\begin{pmatrix}
0&0&\mathbf{1}_r\\0&\mathbf{1}_{2n+2-2r}&0\\-\mathbf{1}_r&0&0
\end{pmatrix}$$ and $c_r(s)$ is the meromorphic function satisfying $$E_{H_r}(s,-)=c_r(s)E_{H_r}(-s,-).$$
Note that
\begin{itemize}
	\item $c_r(s)$ has a simple pole at $s=\rho_{H_r}=\rho_{H_{r-1}}+d/2$, then
	$$\frac{c_r(s)}{c_{r-1}(s-d/2)}$$ is holomorphic and nonzero at $s=\rho_{H_r}$ when $r>1$;
	\item the Tate zeta integral $Z_1(s-\rho_{H_r},\phi_1)$ has a simple pole at $s=\rho_{H_r}$;
	\item $$\mathcal{E}^{n,r-1}(s-d/2,Ik^{n,r}(\pi_{K_{H_r}}\phi))=\sum_{i\geq-1}B_{i}^{n,r-1}(Ik^{n,r}\pi_{K_{H_r}}\phi)(s-\rho_{H_{r-1}}-d/2)^i $$ and $B_{-1}^{n,r-1}=0$ if $r=1$.
\end{itemize}
Taking the residue at $s=\rho_{H_r}=\rho_{H_{r-1}}+d/2$, we have
\begin{align*}
A_0^{n,r}(\phi)-B_{-1}^{n,r}(\phi)=a_1B_{-1}^{n,r'}(Ik^{n,r}\pi_{K_{H_r}}\phi)+a_2 B_0^{n,r'}(Ik^{n,r}(\pi_{K_{H_r}}\phi))\pmod{Im A_{-1}^{n,r}}
\end{align*} for some constants $a_1,a_2$.
By the first term identity in the first term range, $$B_{-1}^{n,r'}(Ik^{n,r}\pi_{K_{H_r}}\phi)\in Im(A_{-1}^{n,r}).$$ Then we get the desired identity when $m=n+1$. If $r=1$, then $r'=0$ and
\[B_{-1}^{n,0}(Ik^{n,1}\pi_{K_{H_r}}\phi)\in Im(A_{-1}^{n,1}). \]
		\item Let us focus on the first term identity now.
		In fact,  the last term $$E^{(n,r-1)}(s-d/2,M(\omega^-,s)f^{n+1,r}(s,\pi_{K_{H_r}}\tilde{\phi})|_{G_{2n}})$$
		has a pole of second order at $s=\rho_{H_r}$. It has a leading term
		\begin{equation}B_{-1}^{n,r-1}(Ik^{n,r}\pi_{K_{H_r}}(\phi))\cdot\alpha_r Val_{s=\rho_{H_r}}\frac{c_r(s)}{c_{r-1}(s-d/2)} \cdot Res_{s=\rho_{H_r}}Z_1(s-\rho_{H_r},\phi_1) \label{leadingterm} \end{equation}
		when $r>1$ and $Res_{s=\rho_{H_r}}Z_1(s-\rho_{H_r},\phi_1)$ only depends on the division algebra $D$.
		The leading term (\ref{leadingterm}) must be cancelled with the leading term $B_{-2}^{n,r}(\phi)$ of $\mathcal{E}^{n,r}(s,\phi)$. Moreover
		$$B_{-1}^{n,r-1}(Ik^{n,r}\pi_{K_{H_r}}\phi)=\kappa_{r,r'}\cdot A_{-1}^{n,r}(\phi)$$ by the first term identity in the first term range.
	Hence there exists a constant $c>0$ such that $A_{-1}^{n,r}(\phi)=c \cdot B_{-2}^{n,r}(\phi)$.
	If $r=1$, then $B_{-1}^{n,r-1}=0$ and $\frac{c_r(s)}{c_{r-1}(s-d/2)}$ has a pole at $s=\rho_{H_r}$. This finishes the proof when $m=n+1$.
	\end{enumerate}
	In general, if $n+1< m\leq n+r$, we may assume that
	\[A^{n+1,r}_{-1}(\tilde{\phi})=c\cdot B_{-2}^{n+1,r}(\tilde{\phi}) \]
	and
	\begin{equation}
\label{secondterminduction}
	A_0^{n+1,r}(\tilde{\phi})= B_{-1}^{n+1,r}(\tilde{\phi})+c'\cdot B_{0}^{n+1,r'}(Ik^{n+1,r}(\pi_{K_{H_r}}\tilde{\phi}))+A_{-1}^{n+1,r}(\varphi) \end{equation}
	for some $\varphi\in S(Y_{n+1}^\ast\otimes V_r)(\mathbb{A})$, where $m_0+r+r'=n+1$ and $r'\geq1$.

	We still consider the constant term along $U^{n+1}(Y_1)$ and get
	\[A_{-1}^{n+1,r}(\tilde{\phi})_{U^{n+1}(Y_1)}=c\cdot B_{-2}^{n+1,r}(\tilde{\phi})_{U^{n+1}(Y_1)}. \]
	We concern the terms in
	\[E^{(n+1,r)}(s,f^{n+1,r}(s,\pi_{K_{H_r}}\tilde{\phi}))_{U^{n+1}(Y_1)} \]
	where $\mathrm{GL}_1(Y_1)\subset L(Y_1)$ acts by the character $\chi\cdot \alpha_E^{md/2}$. Then we have
	\[\chi_V\alpha_E^{md/2}\cdot E^{(n,r)}(s,M(\omega^+,s)(f^{n+1,r}(s,\pi_{K_{H_r}}\tilde{\phi}))|_{G_{2n}})=\chi_V\alpha_E^{md/2}\mathcal{E}^{n,r}(s,\phi) \]
	and so the $\chi_V\alpha_E^{md/2}$-part of $B_{-2}^{n+1,r}(\tilde{\phi})_{U^{n+1}(Y_1)}$ equals to
	$B_{-2}^{n,r}(\phi) $. On the other hand, the $\chi_V\alpha_E^{md/2}$-part of $A_{-1}^{n+1,r}(\tilde{\phi})_{U^{n+1}(Y_1)}$ is the residue at $s=(m-1-n)d/2$ of
\[E^{(n,n)}(s+d/2,\Phi^{n+1,r}(\tilde{\phi})|_{G_{2n}})=E^{(n,n)}(s+d/2,\Phi^{n,r}(\phi)), \]
which is nothing but $A_{-1}^{n,r}(\phi)$. Thus there exists a constant $c$ such that
\[A_{-1}^{n,r}(\phi)=(\mbox{the }\chi_V\alpha_E^{md/2}\mbox{-part of } A_{-1}^{n+1,r}(\tilde{\phi})_{U^{n+1}(Y_1)})=c\cdot B_{-2}^{n,r}(\phi). \]
Observe that
\[A_{-1}^{n+1,r}(\tilde{\phi})_{U^{n+1}(Y_1)}=Res_{s=(m-n-1)d/2}E^{(n,n)}(s,\Phi^{n+1,r}(\tilde{\phi}))_{U^{n+1}(Y_1)} \]
and so the $\chi_V\alpha_E^{md/2}$-part of $A_{-1}^{n+1,r}(\tilde{\phi})_{U^{n+1}(Y_1)}$ lies in $Im A_{-1}^{n,r}$.
Similarly, we compute the constant term along $U^{n+1}(Y_1)$ of both sides of (\ref{secondterminduction}) and then extract the terms with $\mathrm{GL}(Y_1)$ acting via $\chi\cdot\alpha_E^{md/2}$. Therefore,
\[A_0^{n,r}(\phi)-B_{-1}^{n,r}(\phi)=c'\cdot (\mbox{the }\chi_V\alpha_E^{md/2}\mbox{-part of }B_0^{n+1,r'}(Ik^{n+1,r}\pi_{K_{H_r}}\tilde{\phi})_{U^{n+1}(Y_1)})\pmod{ Im A_{-1}^{n,r}}. \]
By the definition, $B_0^{n+1,r'}(Ik^{n+1,r}\pi_{K_{H_r}}\tilde{\phi})_{U^{n+1}(Y_1)}$ is the value taking at $s=\rho_{H_{r'}}$ of the function
	\begin{align*}\chi_V\alpha_E^{s+(n+1)d-r'd/2}E^{(n,r'-1)}(s+d/2,\cdots)+\chi_V\alpha_E^{m'd/2}E^{(n,r')}(s,M(\omega^+,s)(\cdots))\\
+\chi_V\alpha_E^{-s+nd+d-r'd/2}E^{(n,r'-1)}(s-d/2,M(\omega^-,s)(\cdots)). \end{align*}

The remaining part of the proof is to show that there exists a nonzero constant $c'$ such that
\[Val_{s=\rho_{H_{r'}}}E^{(n,r'-1)}(s-d/2,M(\omega^-,s)f^{n+1,r'}(s,Ik^{n+1,r}(\pi_{K_{H_r}}\tilde{\phi}))|_{G_{2n}})=c'B_0^{n,r'-1}(Ik^{n,r}\pi_{K_{H_r}}\phi)\pmod{Im A_{-1}^{n,r}} \]
since $r'-1+r+m_0=n$.
Note that
\[Ik^{n+1,r}(\pi_{K_{H_r}}\tilde{\phi})=Ik^{1,r,r'}(\phi_1)\otimes Ik^{n,r,r'}(\pi_{K_{H_r}}\phi). \]
Thus
\begin{align*}
&E^{(n,r'-1)}(s-d/2,M(\omega^-,s)f^{n+1,r'}(s,Ik^{n+1,r}(\pi_{K_{H_r}}\tilde{\phi}))|_{G_{2n}})\\
=&c_{r'}(s)E^{(n,r'-1)}(d/2-s,f^{n+1,r'}(-s,Ik^{n+1,r}\pi_{K_{H_r}}\tilde{\phi})|_{G_{2n}})\\
=&c_{r'}(s)\alpha_{r'} Z_1(s-(n+1-r')d+\rho_{H_{r'}},Ik^{1,r,r'}\phi_1)\\
&\times E^{n,r'-1}(d/2-s, f^{n,r'-1}(-s+d/2,Ik^{n,r',r'-1}\circ Ik^{n,r,r'}\pi_{K_{H_r}}\phi))\\
=&c_{r'}(s)\alpha_{r'} Z_1(s-(n+1-r')d+\rho_{H_{r'}},Ik^{1,r,r'}\phi_1)\\
&\times E^{n,r'-1}(d/2-s,f^{n,r'-1}(-s+d/2,Ik^{n,r,r'-1}\pi_{K_{H_r}}\phi))\\
=&c_{r'}(s)\alpha_{r'} Z_1(s-(n+1-r')d+\rho_{H_{r'}},Ik^{1,r,r'}\phi_1)\cdot \mathcal{E}^{n,r'-1}(d/2-s,Ik^{n,r}\pi_{K_{H_r}}\phi)\\
=&\frac{c_{r'}(s)}{c_{r'-1}(s-d/2)}\alpha_{r'} Z_1(s-(n+1-r')d+\rho_{H_{r'}},Ik^{1,r,r'}\phi_1)\mathcal{E}^{n,r'-1}(s-d/2,Ik^{n,r}\pi_{K_{H_r}}\phi)
\end{align*}
where $V_{r'-1}$ and $V_{r}$ are complementary with respect to $W_{2n}$ and so $Ik^{n,r,r'-1}=Ik^{n,r}$.

If $r'>1$, then both $\frac{c_{r'}(s)}{c_{r'-1}(s-d/2)}$ and $Z_1(s-(n+1-r')d+\rho_{H_{r'}},Ik^{1,r,r'}\phi_1)$ are holomorphic at $s=\rho_{H_{r'}}$. Then
\[ Val_{s=\rho_{H_{r'}}}E^{(n,r'-1)}(s-d/2,M(\omega^-,s)f^{n+1,r'}(s,Ik^{n+1,r}(\pi_{K_{H_r}}\tilde{\phi}))|_{G_{2n}})=c'B_0^{n,r'-1}(Ik^{n,r}\pi_{K_{H_r}}\phi)\]
for some constant $c'$. If $r'=1$, then $m=r+n$ and $B_0^{n,0}(Ik^{n,r}\pi_{K_{H_r}}\phi)\in Im A_{-1}^{n,r}$.
\end{proof}

\section{Applications to the Rallis inner product formula}
In this section, we use the the regularized Siegel-Weil formula to derive the Rallis inner product formula and prove the non-vanishing theorem of global thetal lifts. Yamana \cite{yamana2014theta} has studied the relation between the nonvanishing of theta lift
and the analytic property of its $L$-fucntion in the first term range, i.e. $m\leq n$. We will focus on the second term range.

Suppose that $E_v=F_v\oplus F_v$ for all archimedean places $v|\infty$. Let $W$ be a skew-Hermitian $D$-vector space and $W_{2n}=W\oplus W^-$, where $W^-$ is the space $W$ with the form scaled by $-1$. Let $V_r$ be the Hermitian $D$-vector space with Witt index $r$ as defined before. Suppose that $W\otimes V_r$ has a complete polarization
\[W\otimes V_r=\mathcal{X}\oplus\mathcal{Y}. \]
Let $\omega_\psi$ be the Weil representation of $U(W)\times H_r$ associated to $W\otimes V_r$. Given a function $\phi\in S(\mathcal{X})(\mathbb{A})$, one can define
\[\theta(\phi)(g,h)=\sum_{x\in\mathcal{X}(F)}\omega_\psi(g,h) \phi(x) \]
for $(g,h)\in U(W)(\mathbb{A})\times H_r(\mathbb{A})$. For a cuspidal representation $\pi$ of $U(W)$, we consider its global theta lift $\Theta_{n,r}(\pi)$ to $H_r$, so that $\Theta_{n,r}(\pi)$ is hte automorphic subrepresentation of $H_r$ spanned by the automorphic forms
\[\theta_{n,r}(\phi,f)(h)=\int_{U(W)(F)\backslash U(W)(\mathbb{A}) }\theta(\phi)(g,h)\cdot \overline{f(g)}dg  \]
for $f\in\pi$.

We will use the doubling see-saw diagram
\[\xymatrix{G_{2n}\ar@{-}[d]\ar@{-}[rd]& H_r\times H_r\ar@{-}[d]\\ U(W)\times U(W^-)\ar@{-}[ru] & H_r^{\triangle} } \]
to study the inner product
\[\langle \theta_{n,r}(\phi_1,f_1),\theta_{n,r}(\phi_2,f_2) \rangle \]
for $\phi_i\in\omega_\psi$ and $f_i\in\pi$. Indeed, we choose a Witt decomposition of $W_{2n}$ to be
\[W_{2n}=Y_n\oplus Y_n^\ast \]
with $Y_n=W^\triangle=\{(y,y):y\in W \}$ and $Y_n^\ast=\{(y,-y):y\in W \}$. The Weil representation $\omega_{n,r}$ of $G_{2n}\times H_r$ can be realized on $S(Y_n^\ast\otimes V_r)$ such that $H_{r}^\triangle$ acts by
\[\omega_{n,r}(h)\phi(x)=\phi(h^{-1}\cdot x) \]
for $h\in H_r^\triangle$.
Moreover,
\[\omega_{n,r}|_{U(W)\times U(W)}\cong \omega_\psi\otimes(\omega_\psi^\vee\cdot\chi_V)|_{U(W)\times U(W) }. \]
There exists an isomorphism
\[\delta:\omega_\psi\otimes(\omega_\psi^\vee\cdot\chi_V)\longrightarrow \omega_{n,r} \]
such that $\delta(\phi_1\otimes\overline{\phi_2})(0)=\langle \phi_1,\phi_2 \rangle$
for $\phi_i\in S(\mathcal{X})(\mathcal{A})$.

\begin{thm}\label{fininaltheoremRallis}
	Assume that $1+n\leq m\leq n+r$ and $W$ is a skew-Hermitian $D$-vector space of dimension $n$. Let $\pi$ be an irreducible cuspidal representation of $U(W)$ and consider its global theta lift
	$\Theta_{n,r}(\pi) $ to $U(V_r)=H_r$. Assume that $\Theta_{n,j}(\pi)=0$ for $j< r$, so that $\Theta_{n,r}(\pi) $ is cuspidal. Then $\Theta_{n,r}(\pi)$ is nonzero if and only if
	\begin{enumerate}[(i)]
		\item for all places $v$, $\Theta_{n,r}(\pi_v)\neq0$ and
		\item $L(s_0+1/2,\pi\times\chi_V)\neq0$ where $s_0=(m-n)d/2$.
	\end{enumerate}
\end{thm}
\begin{proof}
	Let us consider the integral
	\begin{equation}\label{innerprod}
		\int_{H_r(F)\backslash H_r(\mathbb{A}) }\theta_{n,r}(\phi_1,f_1)(h)\overline{\theta_{n,r}(\phi_2,f_2)(h)}E_{H_r}(s,h)dh.
	\end{equation}
 By the same computation appearing in \cite{kudla1994annals}, the integral (\ref{innerprod}) equals to
 \[\int_{[U(W)\times U(W)]}f_1(g)\overline{f_2(g)}\mathcal{E}^{n,r}(s,\delta(\phi_1\otimes\overline{\phi_2}))((g_1,g_2))\chi_V^{-1}(\nu(g_1))dg_1dg_2 . \]
 Here \[[U(W)\times U(W) ]=(U(W)\times U(W))(F)\backslash (U(W)\times U(W) )(\mathbb{A}) . \]
 The Eisenstein series $E_{H_r}(s,h)$ has a simple pole at $s=\rho_{H_r}$ with a constant residue. Thus
 \[\langle \theta_{n,r}(\phi_1,f_1),\theta_{n,r}(\phi_2,f_2) \rangle=c\cdot\int_{[U(W)\times U(W)]}f_1(g_1)\overline{f_2(g_2)} B_{-1}^{n,r}(\delta(\phi_1\otimes \overline{\phi_2}))((g_1,g_2))\chi_V^{-1}(\nu(g_2)) dg_1dg_2 \]
 for a nonzero constant $c$. Note that
 \begin{align*}
 &\int_{[U(W)\times U(W)]} f_1(g_1)\overline{f_2(g_2)}A_{-1}^{n,r}(\delta(\phi_1\otimes \overline{\phi_2})(g_1,g_2)\chi_V^{-1}(\nu(g_2))dg_1dg_2\\
 =&\int_{[U(W)\times U(W)]}f_1(g_1)
\overline{f_2(g_2)}B_{-1}^{n,r'}(Ik^{n,r}\pi_{K_{H_r}}\delta(\phi_1\otimes\overline{\phi_2} ))(g_1,g_2)\chi_V^{-1}(\nu(g_2)) dg_1dg_2 \\
=& 0 \end{align*}
since $\theta_{n,r'}(-,f)=0$ for any $f\in \pi$. Similarly,
\[\int_{[U(W)\times U(W)]} f_1(g_1)\overline{f_2(g_2)} B_0^{n,r'}(Ik^{n,r}\pi_{K_{H_r}}\delta(\phi_1\otimes\overline{\phi_2}))(g_1,g_2)\chi_V^{-1}(\nu(g_2)) dg_1dg_2=0. \]
The second term identity in the second term range implies that
\[\langle \theta_{n,r}(\phi_1,f_1),\theta_{n,r}(\phi_2,f_2) \rangle=c\cdot \int_{[U(W)\times U(W)]} f_1(g_1)\overline{f_2(g_2)} A_0^{n,r}(\delta(\phi_1\otimes\overline{\phi_2} ))(g_1,g_2)\chi_V^{-1}(\nu(g_2)) dg_1dg_2. \]
Let $f^{(s)}$ be the holomorphic section of $I_n^n(s,\chi_V)=Ind_{P(Y_n)}^{G_{2n}}\chi_V\alpha_E^s$. Set
\[Z(s,f^{(s)};f_1,f_2)=\int_{[U(W)\times U(W)]} E^{(n,n)}(f^{(s)})(g_1,g_2)\cdot \overline{f_1(g_1)}f_2(g_2)\chi_V^{-1}(\nu(g_2))dg_1dg_2. \]
Thus
\[\langle\theta_{n,r}(\phi_1,f_1),\theta_{n,r}(\phi_2,f_2) \rangle=c\cdot Val_{s=(m-n)d/2}Z(s,\Phi^{n,r}(\delta(\phi_1\otimes\overline{\phi_2}));f_1,f_2) \]
where $\Phi^{n,r}(\delta(\phi_1\otimes\overline{\phi_2}))$ is the Siegel-Weil section associated with $\delta(\phi_1\otimes\overline{\phi_2})$.

For $Re(s)$ sufficiently large, if $f^{(s)}=\otimes_vf_v^{(s)} $ and $f_i=f_{i,v}$ are pure tensors, one has an Euler product
\[Z(s,f^{(s)};f_1,f_2)=\prod_{v}Z_v(s,f_v^{(s)};f_{1,v},f_{2,v}) \]
where $$Z_v(s,f_v^{(s)};f_{1,v},f_{2,v})=\int_{U(W)(F_v)}f_v^{(s)}(g_v,1)\cdot\overline{\langle \pi_v(g_v)f_1,f_2\rangle}dg_v. $$
It gives us the standard $L$-function $L(s+1/2,\pi_v\times\chi_{V,v})$.
If every data involved is unramified (which is the case for almost all $v$), then one has
\[Z_v(s,f_v^{(s)};f_{1,v},f_{2,v})=L(s+1/2,\pi_v\times\chi_{V,v})/b_v(s,\chi_{V}). \]
Note that when $s>0$, $b_v(s,\chi_{V})$ has no poles and the Euler product $b(s,\chi_V)$ is absolutely convergent. In general, we would like to define the normalized local zeta integral
\[Z^\ast_v(s,f_v^{(s)};f_{1,v},f_{2,v})=\frac{Z_v(s,f_v^{(s)};f_{1,v},f_{2,v})}{L(s+1/2,\pi_v\times\chi_{V,v})}. \]
By the hypothesis that $E_v$ splits at all archimedean places $v|\infty$, $Z^\ast_v(s,f_v^{(s)};f_{1,v},f_{2,v})$ at $s=s_0=(m-n)d/2$ is nonzero if and only if the local theta lift
$\Theta_{n,r}(\pi_v)\neq0$. Then Theorem \ref{fininaltheoremRallis} holds due to  the following equality
\[\langle \theta_{n,r}(\phi_1,f_1),\theta_{n,r}(\phi_2,f_2)\rangle=c\cdot Val_{s=s_0}L(s+1/2,\pi\times \chi_V)\cdot Z^\ast(s,\Phi^{n,r}(\delta(\phi_1\otimes\overline{\phi_2}));f_1,f_2)  \]
where $Z^\ast(s,f^{(s)};f_1,f_2)=\prod_v Z^\ast_v(s,f_v^{(s)};f_{1,v},f_{2,v})$ is absolutely convergent.
\end{proof}
\begin{rem}
	If \cite[Conjecture 11.4]{gan2014siegelweil} holds, then we can remove the assumption that $E_v=F_v\oplus F_v$ for all archimedean places $v|\infty$.
\end{rem}

\subsection*{Acknowledgments} The author would like to thank Yuanqing Cai for helpful discussions.


\section{Introduction}
\label{intro}
Analytic continuation is well known to be ill-posed.  To be
precise, suppose a function $f$ is analytic in a connected open
region $\Omega$ of the complex plane and we know its values in a
set $E\subset \overline\Omega$ to an accuracy of $\varepsilon>0$.
(We assume $E$ is a bounded nonempty continuum whose closure
does not enclose any points of $\Omega\backslash \overline E$,
and that $f$ extends analytically to $E$.)  This implies no bounds
whatsoever on the value of $f$ at any point $z\in \Omega\backslash
\overline E$ (see Theorem~\ref{genthm1}).  And yet if we knew
$f$ {\em exactly\/} in~$E$, this would determine its values in
$\Omega$ exactly.

In practice, nevertheless, analytic continuation from inexact
data is carried out all the time, and what makes this possible
is {\em regularization,} the introduction of additional
smoothness assumptions.  Often an extrapolation technique is
applied without such assumptions being made explicit---and
this is understandable, for in applications, often one has a
sense of certain features of one's function without
being able to pin them down precisely.  In this paper, however,
we wish to be completely explicit and show how certain natural
regularizing assumptions lead to upper and lower bounds
on the accuracy of analytic continuation.

Our regularizing assumption will be that $f$ is not only analytic
in $\Omega$, but bounded.  For example, we can take
the bound to be
$\half$ and consider the set of functions
that are analytic in $\Omega$ and satisfy $\|f\|_\Omega^{} \le \half$.
(The symbol $\|\cdot\|_A^{}$ always denotes the supremum
norm over the set $A$.)
If $f,\ft$ are two such functions, then $\|\ft-f\|_\Omega^{} \le 1$.  We shall show
(Theorem~\ref{genthm2}) that
if in addition $\|\ft-f\|_E^{}\le \varepsilon$, then for
each $z\in \Omega\backslash \overline E$,
\begin{equation}
|\ft(z) -f(z)| \le \varepsilon^{\alpha(z)}
\label{bound1}
\end{equation}
for some $\alpha(z)\in (0,1)$ that depends on $\Omega$, $E$,
and $z$ but not on $f$ and $\ft$ or $\varepsilon$.
Another way to say the same thing is
\begin{equation}
\log |\ft(z) -f(z)| \le \alpha(z) \log \varepsilon.
\label{bound2}
\end{equation}
We may interpret (\ref{bound2}) as follows: if we know a function
$f$ satisfying $\|f\|_\Omega\le \half$ to~$d$ digits on $E$,
then it is determined to $\alpha(z) \kern .3pt d$ digits at~$z$.
Even though our theorems are, of course, mathematical rather than
computational results, we shall use the terminology of digits a
good deal in discussing them, for this is an easy way to talk about
logarithmic quantities.

This general framework may sound rather abstract.  It becomes
concrete when we consider the dependence of $\alpha(z)$ on $z$
for particular choices of $\Omega$ and $E$, and after stating
a basic lemma in Section~2, we shall focus on two choices that
are particularly fundamental.  The first is radial geometry,
with analytic continuation outward from the unit disk $E$ into
a disk $\Omega$ of radius $R>1$ (Section~3).  In this setting
analytic continuation is reasonably well-conditioned, with
digits of accuracy being lost only linearly as $|z|$ increases.
This observation possibly goes back to Hadamard himself, and its
numerical implications have been considered by various authors
including Miller~\cite{miller} and Franklin~\cite{franklin}.
An intuitive way to understand the effect is to note that in the
limiting case $R\to\infty$, Liouville's theorem implies that $f$
must be constant, so if we know $f$ to accuracy $\varepsilon$
on~$E$, we know it to the same accuracy everywhere.  The result for
finite $R$ (Theorem~\ref{thm1}) can be derived from the Hadamard
three-circles theorem~\cite{hille}.  The essence of the matter
is that analyticity and boundedness at a large radius imply rapid
exponential decrease of Taylor coefficients, hence good behavior
at smaller radii.

Analytic continuation is much more difficult in the other geometry
we focus on, which is linear (Section~4).  Here we take $\Omega$
to be an infinite half-strip of half-width~$1$ (without loss
of generality), and $E$ as the end segment of the half-strip.  As $z$
moves away from $E$ along the centerline of the strip, digits are
lost exponentially as a function of distance, and we prove this by
reducing the problem to the configuration of Lemma~\ref{thelemma}.
At a point $z$ that is $2\pi$ units away from the end, for
example, the number of accurate digits has shrunk by a factor
$(\pi/4)\exp(\pi^2)\approx \hbox{15,000}$, so if you want to
have $3$ digits of accuracy at such a point, you'll need to
start with 45,000 digits.

Our formulations are conformally invariant, and thus different
regions $\Omega\ne \C$ can be transplanted from one to another.
In particular, analytic continuation in a disk and a half-strip
are essentially equivalent problems,
and the reason the half-strip is exponentially more difficult
than the disk is that the conformal map that relates them is an
exponential.  Section 5 explores results for general regions (not
necessarily simply connected) that follow from these observations,
presenting theorems establishing the behavior asserted in the
opening paragraphs of this introduction.

Along the way, we shall relate our results to numerical algorithms.
Section 3 presents a simple method for numerical analytic
continuation in a disk that approximately achieves the bounds
indicated in Theorem~\ref{thm1}, based on Taylor series on the
disk, and in Section 6 we show that this method is implicit
in Chebfun~\cite{chebfun,atap}.  An algorithm of this kind was
proposed by Franklin~\cite{franklin}, and there is
recent related work by Demanet and coauthors~\cite{batenkov,demtow},
among others.  Further numerical algorithms and associated
mathematical estimates for analytic continuation can be found
in~\cite{cannm,douglas,fdfd,fdfq,fzcm,hen66,henrici,miller,niet,reichel,stef,vessella}.
More generally, there is a large literature of numerical methods for
ill-posed problems, which are often defined by partial differential
or integral equations.  One paper that speaks of the connection
between analytic continuation and more general ill-posed problems
defined by PDE\kern .3pt s is~\cite{miller}.

In Section 7 we turn to the most famous algorithm of analytic
continuation, which goes back to Weierstrass:
marching Taylor expansions from one overlapping disk to another
in a chain.  We show that this method, if carried out
numerically in the half-strip with a certain optimal choice of
parameters, suffers exponential loss of accuracy at a rate $2\kern
.3pt e/\pi$ times faster than the optimal rate in a half-strip,
so that if one marches $2\pi$ units down the half-strip, the
number of accurate digits is divided by $\exp(2\pi e) \approx
\hbox{26,000,000}$.

Before turning to the details, we comment on the relationship
between approximation methods based on multiple derivative values
at a single point, such as chain-of-disks continuation of Taylor
series or Pad\'e approximation~\cite{bgm}, and methods based just
on function values but at multiple points.  Our formulations are
of the latter form, but the two contexts are close.  Thanks to
the standard lemma of complex analysis known as Cauchy's estimate,
knowing a function $f$ on the unit disk to accuracy~$\varepsilon$
is approximately the same as knowing its Taylor coefficients $c_k$
to accuracy~$\varepsilon$, and more generally, if $f$ is known to
accuracy~$\varepsilon$ on the closed disk of radius $r$, this is
approximately the same as knowing its Taylor coefficients $c_k$
to accuracy~$\varepsilon \kern .5pt r^{-k}$.

\section{A lemma}
Our results are based on the following lemma,
the {\em Hadamard three-lines theorem,}
a more general form of which can be found in~\cite[Thm.~12.8]{rudin}.
Numerical algorithms for this geometry are discussed in~\cite{fdfq}.

\begin{lemma}
\label{thelemma}
Let\/ $h$ be an analytic function in the infinite strip
$S = \{ w: \, 0< \Real w < 1\}$
with $\|h\|_S^{}\le 1$ and\/ $\lim_{u\downarrow 0}^{}
\sup_v|h(u+iv)| \le \varepsilon$ for some\/ $\varepsilon \in(0,1)$.  Then
for all $w\in S$,
\begin{equation}
\log|h(w)| \le (1-\Real w)\log\varepsilon,
\hbox{\quad i.e.,\quad}
|h(w)| \le \varepsilon^{1-\Res w}.
\label{lemmaeq}
\end{equation}
Conversely, for any\/ $\varepsilon\in(0,1)$, there is a function\/ $h$
satisfying the given conditions for which the inequalities
$(\ref{lemmaeq})$ hold as equalities for all\/ $z$ with $0 < \Real z
< 1$.
\end{lemma}

\begin{proof}
We begin by noting that without loss of generality, we
may suppose that $h$ is analytic on the closed set
$\overline S$.  If not, we could restrict attention to a smaller
domain $\delta\le \Real w \le 1-\delta$ for $\delta<0$ and then
take the limit $\delta \to 0$.

Set $\nu = -\log\varepsilon$, implying $e^{-\nu} = \varepsilon$.
The function $e^{-\nu \kern .5pt w} h(w)$ is analytic in $\overline
S$ and bounded in absolute value by $\varepsilon$ for $\Real w =
0$ and also for $\Real w = 1$.  Therefore, by the maximum modulus
principle as qualified in the next paragraph, it is bounded
by~$\varepsilon$ for all $w\in \overline S$.  Thus $|h(w)| \le
\varepsilon\kern .5pt e^{\kern .7pt \nu \Res w} = e^{(1-\Res
w)\log \varepsilon}$, as required.

The qualification just mentioned is that the maximum modulus
principle does not apply to arbitrary functions on an unbounded
domain with a gap in the boundary at~$\infty$.  However,
this function is known to be bounded in an infinite strip,
and in such a situation, according to a Phragm\'en--Lindel\"of
theorem~\cite[Thm.~18.1.4]{hille}, the maximum modulus principle
applies after all.

For the converse, it is enough to consider the function
$h(w) = \varepsilon \kern .5pt e^{\kern .7pt \nu w}$.
\qed
\end{proof}

\section{Analytic continuation in a disk}
Figure~\ref{geom1} shows our first fundamental geometry, one that
has been considered by a number of authors.  We take $E$ to be the
closed unit disk and $\Omega$ as the open disk of radius $R>1$.
As always, our concern is obtaining bounds on $|\kern .3pt
g(z)|,$ $z \in \Omega\backslash E$, for an analytic function $g$
($= \ft - f\kern .7pt$) satisfying $\|\kern .3pt g\|_\Omega^{}
\le 1$ and $\|\kern .3pt g\|_E^{}\le \varepsilon$.  Here is the
result, essentially the {\em Hadamard three-circles theorem,} with
$\|\cdot\|_r^{}$ denoting the supremum norm over $\{z:\, |z|< r\}$.

\begin{figure}
\begin{center}
\vskip .6in
\includegraphics[scale=.6]{geom1}
\end{center}
\caption{\label{geom1}Analytic continuation of a function
$f$ from the unit disk\/ $E$ to a larger disk\/~$\Omega$ where it
is bounded.
If $f$ is known to $d$ digits on $E$, the number of digits
determined in\/ $\Omega$ falls off smoothly to $0$ at the outer boundary.}
\end{figure}

\begin{theorem}
Given $R>1$, let $g$ be analytic in $\Omega = \{z\in\C: \,
|z|< R\}$ with $\|\kern
.3pt g\|_R^{}\le 1$ and
$\|\kern .3pt g\|_1^{}\le \varepsilon \in (0,1)$.  Then for
any\/ $z$ with $1< |z|< R$,
\begin{equation}
\log |\kern .3pt g(z)| \le \alpha(z) \log\varepsilon, \hbox{\quad i.e.,\quad}
|\kern .3pt g(z)| \le \varepsilon^{\alpha(z)},
\label{ineq1}
\end{equation}
where
\begin{equation}
\alpha(z) = 1 - {\log |z|\over \log R}.
\label{alfdef}
\end{equation}
Conversely, for an infinite sequence of
values\/ $\varepsilon$ converging to\/ $0$, there are functions~$g$ satisfying
the given conditions for which the inequalities
$(\ref{ineq1})$ hold as equalities for all\/~$z$ with $1<|z|<R$.
\label{thm1}
\end{theorem}

\begin{proof}
As in the proof of Lemma~\ref{thelemma}, we begin by noting that
without loss of generality, we may suppose that $g$ is analytic in
the closed domain $|z| \le R$.  We transplant the problem to
the infinite strip $\overline S$ of the last section by defining
$h(w) = g(z)$ for $z = R^{\kern .8pt w} = e^{w\log R}$, hence $
w = \log z / \log R$ (it doesn't matter which branch of $\log z$ is
used, as they all lead to the same estimate).
By the lemma, we have $\log|\kern
.3pt g(z)|\le (1- \Real w)\log \varepsilon = (1-\log|z|/\log
R)\log\varepsilon$, as claimed.

For the converse result, consider $g(z) = (z/R)^n$ with
$n = -\log\varepsilon / \log R$.  For an infinite sequence of values
$\varepsilon\to 0$, $n$ is an integer, and in these cases $g$ is an
analytic function with the required properties.
\qed
\end{proof}

In words, we can describe Theorem~\ref{thm1} as follows.  If $f$
is known to $d$ digits for $|z|\le 1$, the number of digits
determined for $|z|=r$ diminishes to $0$ as $r\to R\kern
1pt$; as a function of $\log r$, the loss of digits is linear.
At $r=\sqrt R$, for example, $f$ is determined to $d/2$ digits.

It is easy to outline an algorithm for analytic continuation,
based on a finite Taylor series of length $n \approx -\log\varepsilon/\log R$,
that achieves approximately the accuracy promised in
Theorem~\ref{thm1}.
From approximate values
for $|z|=1$ with error at most $\varepsilon$ of a function~$f$
with $\|f\|_\Omega^{}\le \half$,
we compute approximations $\ct_k\approx c_k$ to the
Taylor coefficients $\{c_k\}$ of $f$ for $0\le k \le n$
with $|\ct_k-c_k|\le \varepsilon$.
That this is possible follows from Cauchy's estimate applied
on the circle $|z|=1$; in practice,
we sample $f$ on a grid of $N\gg n$ roots of unity and
use the Fast Fourier Transform~\cite{akt}.  By Cauchy's
estimate applied now for $|z|=R$, the Taylor coefficients
of $f$ satisfy $|c_k| \le \half R^{-k}$.
If we define
\begin{equation}
\ft(z) = \sum_{k=0}^n \ct_k z^k,
\label{ftildeseries}
\end{equation}
then we have
$$
\ft(z)-f(z) = \sum_{k=0}^n (\ct_k-c_k) z^k - \sum_{k=n+1}^\infty
c_kz^k,
$$
implying
$$
|\ft(z)-f(z)| \le \sum_{k=0}^n \varepsilon |z|^k + \half\sum_{k=n+1}^\infty
(|z|/R)^k.
$$
Our choice $n \approx -\log\varepsilon/\log R$ implies
$\varepsilon\approx R^{-n}$, and thus
these two sums are both of size on the order of $(|z|/R)^n$.
We therefore achieve, as required,
$$
|\ft(z)-f(z)| \approx (R/|z|)^{-n} = R^{-\alpha(z)n} \approx
\varepsilon^{\alpha(z)},
$$
with the equality in the middle holding
since the definition (\ref{alfdef}) implies $R^{\kern .8pt\alpha(z)}
= R/|z|$.

In the algorithm just described, the regularization occurred
when we took the series (\ref{ftildeseries}) to be finite rather
than infinite.
In this geometry, the ill-posedness of analytic
continuation resides in the fact that as $k\to\infty$, powers $z^k$
have unbounded discrepancies of absolute value between one radius
$|z|$ and another.  For a fascinating analysis of the implications
of such behavior in the context of computation of
Taylor coefficients, see~\cite{born}.
The importance of truncating a series for numerical analytic
continuation was
recognized at least as early as~\cite{lewis}, and
a detailed error analysis of an algorithm with this flavor can
be found in~\cite{franklin}.

We have described the algorithm as a process for working with
a function known to accuracy $\varepsilon$ on the unit disk.
One way to obtain such data is to take Taylor polynomials of $f$
of successively higher degrees (in exact arithmetic), in which
case (\ref{ineq1}) amounts to the statement that the convergence
of Taylor polynomials to $f(z)$ for $|z|<R$ is exponential at a
rate of order $(|z|/R)^n$.

\section{Analytic continuation in a half-strip}
Our second fundamental geometry is shown in Figure~\ref{geom2}.
Now $E$ is the complex interval $(-i,i\kern .7pt )$ and $\Omega$ is the
half-strip~$H$ of points $z=x+iy$ with $x> 0$, $-1<y<1$.
Our aim is to analytically continue a function $f$ from the end
segment of the strip to real positive values $x$.

\begin{figure}
\begin{center}
\vskip .8in
\includegraphics[scale=.6]{geom2}
\end{center}
\caption{\label{geom2}Analytic continuation of a bounded function
$f$ along the centerline of an infinite half-strip $H$ of
half-width $1$. The number of digits
determined falls off exponentially with distance from the data,
reducing by a factor of\/ $10$ each time\/ $x$ increases by
$(2/\pi)\log 10 \approx 1.47$.}
\end{figure}

To apply Lemma~\ref{thelemma}
in this geometry, we need to map $H$ conformally to the infinite
strip $S$ of Section 2 in such a way that the corner points
$z = \pm \kern .3pt i$ map to the infinite vertices $w = \pm \kern
.3pt i\kern .5pt
\infty$ and
$z=\infty$ maps to $w=1$.
We can construct such a map by composing three simpler maps.
First, $u = \sinh(\pi z/2)$ maps $H$ to the right half-plane with
distinguished points $\pm i$ and~$\infty$.
Next, $v = {(i-u)/(i+u)}$ maps the right half-plane to the
upper half-plane with distinguished points $0$, $\infty$, and $-1$.
Finally, $w = (-i/\pi)\log v$ maps the upper half-plane to
$S$ as required.
Combining these steps, we find that
the map from the half-strip $H$ in the $z$-plane to the
infinite strip $S$ in the $w$-plane is given by
\begin{equation}
\label{map}
w = -{i\over \pi} \log\left( {i - \sinh(\pi z/2)\over i + \sinh(\pi
z/2)} \right) =
{2\kern .3pt i\over \pi}\log\left( {1-i\kern .5pt\exp(\pi z/2)\over
-i + \exp(\pi z/2)} \right).
\end{equation}

The properties of this map are such as to reveal that analytic
continuation into a half-strip where a function is known to
be bounded, while possible in principle, is so ill-conditioned as to
be generally infeasible in practice.  Instead of digits
of accuracy being lost linearly, they are lost exponentially,
as emphasized in Figure~\ref{geom2}.
To see how this comes about,
consider the situation in which $z$ is a real number
$x>0$.  The leading
terms in the asymptotics for $u$, $v$, and $w$ for large $x$
give us
\begin{equation}
u \sim \half e^{\pi x / 2}, \quad
v \sim -1 + 4\kern .3pt i\kern .5pt e^{-\pi x/2}, \quad
w \sim 1 - {4\over \pi} \kern .7pt e^{-\pi x/2}.
\label{asymp1}
\end{equation}
Since $w$ is exponentially close to $1$, Lemma~\ref{thelemma}
implies that the number of digits of accuracy will
be multiplied by an exponentially small factor
${\sim}\kern 1pt (4/\pi) \exp(-\pi x /2)$.
A more careful analysis sharpens (\ref{asymp1}) to
\begin{equation}
{4\over \pi} \kern .7pt e^{-\pi x/2} - \left({4\over \pi} - 1\right)
e^{-\pi x} \,\le\,
1- w \,\le\,  {4\over \pi} \kern .7pt e^{-\pi x/2}
\quad (x \ge 0),
\label{asymp2}
\end{equation}
from which we get the following theorem:

\begin{theorem}
Let $g$ be analytic in the half-strip $H$ with $\|\kern .3pt
g\|_H^{}\le 1$ and
$\|\kern .3pt g\|_E^{}\le \varepsilon$
for some\/ $\varepsilon \in(0,1)$.  Then for
any\/ $x > 0$,
\begin{equation}
\log |\kern .3pt g(x)| \le \alpha(x) \log\varepsilon, \hbox{\quad i.e.,\quad}
|\kern .3pt g(x)| \le \varepsilon^{\alpha(x)},
\label{ineq2}
\end{equation}
where
\begin{equation}
\alpha(x) = {4\over \pi} \kern .7pt e^{-\pi x/2}
- \left({4\over \pi} - 1\right) e^{-\pi x}.
\label{alfdef2}
\end{equation}
Conversely, for any $\varepsilon\in (0,1)$, there is a function
$g$ satisfying the given conditions for which,
for all $x\ge 0$,
\begin{equation}
\log |\kern .3pt g(x)| \ge \beta(x) \log\varepsilon, \hbox{\quad i.e.,\quad}
|\kern .3pt g(x)| \ge \varepsilon^{\beta(x)},
\label{conv}
\end{equation}
with
\begin{equation}
\beta(x) = {4\over \pi} e^{-\pi x/2}.
\label{betadef}
\end{equation}
\label{thm2}
\end{theorem}

\begin{proof}
This follows from Lemma~\ref{thelemma} by the conformal
transplantation (\ref{map}), using the bounds (\ref{asymp2}).
\qed
\end{proof}

\section{General geometries}
For more general geometries than the disk or the half-strip,
let us now justify the claims made in the introduction.
First is the ill-posedness statement of the opening paragraph, which
as usual we formulate as an assertion about an analytic
function $g = \ft - f$.

\begin{theorem}
\label{genthm1}
Let $\Omega$ be a connected open region of the complex plane
$\C$ and let~$E$ be a bounded nonempty continuum in $\overline\Omega$
whose closure $\overline E$ does not enclose any points of\/ $\Omega\backslash
\overline E$.
Let $g$ be an analytic function in\/ $\Omega\cup E$ satisfying
$\|\kern .3pt g\|_E^{} \le \varepsilon$ for some $\varepsilon> 0$.
This condition implies
no bounds whatsoever on the value of\/~$g$ at any point $z\in
\Omega\backslash \overline E$.
\end{theorem}

\begin{proof}
Given $z\in \Omega\backslash\overline E$ and a complex
number $M$, we shall show there is a polynomial $p$ such
that $\|\kern .5pt p\|_E^{}\le\varepsilon$ and $p(z) = M$.
Let $\Et$ denote the
compact set consisting of $\overline E$ together
with all points enclosed by this set; thus the complement of
$\Et$ in the complex plane is connected.
By assumption, $z \not\in \Et$.
According to Runge's theorem~\cite[Thm.~13.7]{rudin},
there is a
polynomial $q$ such that $\|\kern .3pt q\|_{\Et}^{} \le \varepsilon/2$
and $|\kern .3pt q(z)-M| \le \varepsilon/2$.
Now define $p(\zeta) = q(\zeta) + M - q(z)$.
We readily verify $p(z) = M$ and $|\kern .5pt p(\zeta)|
\le |\kern .3pt q(\zeta)| + |M-q(z)| \le
\varepsilon$ for all $\zeta\in E$.
\qed
\end{proof}

The well-posedness statement of the introduction is (\ref{bound1}),
which we formulate as follows.

\begin{theorem}
\label{genthm2}
Let $\Omega$, $E$, $\varepsilon$, and $g$ be as in
Theorem~$\ref{genthm1}$,
but now with $g$ additionally satisfying $\|g\|_\Omega^{}\le 1$,
and let\/ $z$ be a point in $\Omega\backslash \overline E$.
Assume that the boundary of $E$ is piecewise smooth (a finite
union of smooth Jordan arcs).
Then there is a number\/ $\alpha\in (0,1)$, independent
of\/ $g$ though not of~$z$, such that for all\/ $\varepsilon>0$,
\begin{equation}
|\kern .3pt g(z)| \le \varepsilon^{\alpha(z)}.
\label{genthm2eq}
\end{equation}
\end{theorem}

\begin{proof}
Let $\Gamma$ be a smooth open arc in $\Omega$ connecting
a point $e$ in the boundary of $E$, which will
necessarily belong to $\overline \Omega$, to $z$.  For a sufficiently
small $\delta>0$, the intersection of the open $\delta$-neighborhood
of $\Gamma$ with $\Omega$ is a simply-connected region $J$
in $\Omega$ with $z$ in its interior and a piecewise smooth
boundary,
a portion of $E$ making up part of this boundary.  By a conformal
map, we may transplant $J$ to the domain of Figure~\ref{geom2},
whereupon Theorem~\ref{thm2} provides a suitable (if
typically very pessimistic) value of $\alpha$.
\qed
\end{proof}

Theorem~\ref{genthm2} asserts
that analytic continuation in the presence of a boundedness
condition is a well-posed problem in the sense
that there is a unique solution depending continuously
on the data, but this does not mean that its condition
number is finite.  A finite condition number would correspond
to $|\kern .3pt g(z)|$ shrinking linearly with~$\varepsilon$, that is,
to a value $\alpha = 1$ in (\ref{genthm2eq}), or more
generally to the bound
\begin{equation}
|g(z)| \le C\kern .3pt\varepsilon
\label{moregen}
\end{equation}
as $\varepsilon\to 0$ for some constant $C$ depending on $z$ but
not $g$.
But Theorem~\ref{genthm2} only gives
$\alpha < 1$, and in fact, we now show that $\alpha = 1$ cannot occur except
in trivial cases with $\overline \Omega = \C$.

\begin{theorem}
\label{genthm3}
Under the circumstances of Theorem~$\ref{genthm2}$,
a bound of the form $(\ref{moregen})$ can never hold unless
$\overline\Omega$ is the whole complex plane $\C$.
\end{theorem}
\begin{proof}
If $\overline\Omega$ is all of $\C$, we may be in the trivial
situation mentioned in the introduction, where Liouville's theorem
implies that $g$ is constant.  (This will be true, for example,
if $\Omega$ consists of $\C$ with a finite set of points removed.
It won't be true if~$\Omega$ consists of $\C$ with some arcs
removed.)
On the other hand suppose there
is a point $z_0^{}\in\C$ disjoint from $\overline\Omega$.  Then
there is a closed disk $\Delta$ about~$z_0^{}$ that is disjoint
from $\overline\Omega$.
By the conformal map $1/(z-z_0^{})$, we may transplant the problem
so that $\Omega$ and $E$ are bounded.
For any $z \in \Omega\backslash\overline E$,
as in the proof of Theorem~\ref{genthm1}, Runge's theorem
ensures that there is a polynomial $p$ such that
$p(z) = 0$ and $\Real p(\zeta) \le -1$ for all $\zeta\in E$.
Choose $M>0$ such that $\Real p(\zeta) \le M$ for all $\zeta\in \Omega$.
Then $q(z) = p(z)-M$ has real parts $\le -(1+M)$ for $\zeta\in E$,
$-M$ at $z$, and $\le 0$ for $\zeta\in \Omega$.
Given $\varepsilon\in (0,1)$, define
$g(\zeta) = \exp[\kern 1pt\log(\varepsilon)(-q(\zeta))/(1+M)]$.
Then $\|\kern .3pt g\|_\Omega^{}\le 1$
and $\|\kern .3pt g\|_E^{} \le \varepsilon$, but
$|\kern .3pt g(z)| = \varepsilon^{M/(M+1)}$.
This contradicts (\ref{moregen}).
\qed
\end{proof}

Together, Theorems~\ref{genthm2} and \ref{genthm3} assert that
analytic continuation with a boundedness condition in a nontrivial
region is always well-posed but always has an infinite condition
number.  I am not aware if such a general assertion has been
made before.

\section{Analytic continuation in Chebfun}
This project sprang from work with Chebfun, a software system for
numerical computing with functions~\cite{chebfun}.  In its basic
mode of operation, Chebfun works with smooth functions
on an interval that without loss of generality we may take to
be $[-1,1]$.  Chebfun represents each function to ${\approx}\kern
1pt 16$ digit precision by a polynomial in the form of a finite
Chebyshev series, and early in the project, it was realized that
the same series could be used for evaluation at complex points
off the interval.

\begin{figure}
\begin{center}
\smallskip
\vskip .2in
\includegraphics[scale=.7]{chebex}
\end{center}
\caption{\label{chebfig} Chebfun implicitly carries out analytic
continuation within a Bernstein ellipse bounded approximately
by the nearest complex
singularity of a function\/ $f$ defined on a real interval.
For the function $f(x) = \log(1+x^2)$ defined on $[-1,1]$,
the thick outer curve shows the ``Chebfun ellipse'' estimate of the
region of analyticity plotted by \kern 1pt{\tt plotregion} and the
inner curves are contour lines corresponding to errors
$|f(x) - p(x)| = 10^{-2}, 10^{-4}, \dots, 10^{-14}$ (from outside
in), where $p$ is the Chebfun approximation, a polynomial of
degree $38$.  The dots mark the actual branch points of~$f$.}
\end{figure}

Figure~\ref{chebfig} illustrates this effect for the function $f(x)
= \log(1+x^2)$, which has branch points at $x = \pm\kern .5pt  i$.
By an adaptive process described in~\cite{chopping}, the Chebfun
command \verb|p = chebfun('log(1+x^2)')| constructs a polynomial
$p$ that matches $f$ on $[-1,1]$ with a maximal error of about
$2^{-51} \approx 4.44\times 10^{-16}$; the degree of $p$ for this
example is 38.\ \ Typing {\tt p(0)} to evaluate the polynomial
at $x=0$, for example, returns the value $5.5\times 10^{-17}$,
accurate to more than 16 digits.  What is interesting is that
typing {\tt p(i/2)} also gives an accurate value: $-0.2876820630$,
as compared with the true value $\log(0.75) \approx -0.2876820768$.
How can we explain this?

In fact, Chebfun is carrying out the Chebyshev analogue of the
algorithm of Section~3: it computes a finite sequence of Chebyshev
series coefficients, then uses these coefficients to define an
approximation $p = \ft$.  Instead of working outward from the
unit disk $E$ to larger disks, it is working outward from the
unit interval $E$ to so-called Bernstein ellipses, whose algebra
is defined by a transplantation of the results of Section~3 by
the Joukowski map $(z+z^{-1})/2$.  For details, see~\cite{atap},
particularly the discussions of the ``Chebfun ellipse'' and the
command {\tt plotregion}.
According to Theorem~\ref{thm1} as transplanted from disks to
ellipses, we can expect the number of accurate digits to fall
off smoothly, and Figure~\ref{chebfig} shows that this is just
what is observed.

Analytic continuation in a region bounded by an ellipse is
mentioned as Example~3 of~\cite{franklin}, and a detailed analysis
of algorithms in this geometry is presented in~\cite{demtow}.
Results for ellipses analogous to those of~\cite{born} for disks
can be found in~\cite{wang}.

\section{Analytic continuation by a chain of disks}

The classic idea for analytic continuation, going back to
Weierstrass, involves a succession of Taylor expansions,
each with its own disk of convergence.  In principle, this
procedure enables one to track a function along any path where
it is analytic, and we recommend the beautifully illustrated
discussion in Section~3.6 of Wegert's {\em Visual Complex
Functions}~\cite{wegert}.  For inexact function data, however,
the method is far from promising.  There is a small literature
on numerical realizations, and a memorable contribution is a 1966
paper by Henrici in which the necessary transformations of series
coefficients are formulated in terms of matrix multiplications;
see~\cite{hen66} or~\cite[sec.~3.6]{henrici}.

To analyze this idea quantitatively, the simplest setting is
a channel, essentially the same as the
half-strip of Section~4.  Specifically,
consider the finite-length ``stadium'' $G$ shown in
Figure~\ref{stadium}.  Given $L>0$, this is the strip
of half-width $1$ extending from $x=0$ to $x=L$ together with
half-disks of radius~1 at each end.  For some $n>0$ and
$r\in (0,1),$ we define $h=L/n$ and
\begin{equation}
\xk = kh, ~~\Dk = \{z: \, |z-x_k|< 1\}, ~~
\Dkr = \{z: \, |z-x_k|< r\}
\label{kdefs}
\end{equation}
for $0 \le k \le n$.
We assume $n$ is large enough so that $h < 1-r$.

\begin{theorem}
With the definitions of the last paragraph,
let $f$ be analytic in\/ $G$ with $\|f\|_G^{}\le 1$
and let $\fk$ be analytic in $D_k^{}$
with $\|\fk\|_{D_k^{}}^{}\le 1$, $0\le k \le n-1$.
Assume $r\le 1/2$ and $h\le 1/4$.
Given $\varepsilon\in (0,1)$, define
\begin{equation}
\vark = \varepsilon^{\kern .5pt \exp(-\et\kern .8pt \xk)}, \quad
\et = {1+2h\over r\log(1/r)}.
\label{vardef}
\end{equation}
If
\begin{equation}
\|f_0^{}-f\|_{D_0^{(r)}} \le \varepsilon_0^{}
\label{basecase}
\end{equation}
and
\begin{equation}
\|\fk-f_{k-1}^{}\|_{D_k^{(r)}} \le \vark,  \quad 1\le k \le n-1,
\label{ineqs}
\end{equation}
then for all sufficiently small choices of $\varepsilon$,
\begin{equation}
\|f_{k-1}^{}- f\|_{D_k^{(r)}}^{} \le \vark, \quad 1 \le k \le n.
\label{induc2}
\end{equation}
\label{chainthm}
\end{theorem}

\begin{figure}
\begin{center}
\vskip .25in
\includegraphics[scale=.82]{ac2fig.eps}
\end{center}
\caption{\label{stadium} Chain-of-disks analytic continuation of a
function $f$ along a channel $G$ of half-width~$1$
where it is assumed to be bounded
and analytic.  One starts with $f$ known to accuracy
$\varepsilon_0^{}
=\varepsilon$ in the shaded disk \smash{$D_0^{(r)}$} of radius
$r$ about $x_0 = 0$; this is then used
to construct an expansion to accuracy~$\varepsilon_1^{}$ in the next
shaded disk about $x_1^{}=h$, and so on.  The
best accuracy is achieved with $r = 1/e$ and
$h\to 0$, with the number of accurate digits diminishing at
the rate $\exp(-e\kern .3pt x)$.}
\end{figure}

\begin{proof}
We proceed by induction on $k$ in (\ref{induc2}).
The case $k=1$ follows from (\ref{basecase}) by
Theorem~\ref{thm1} (rescaled by a factor $R=1/r$).
Consider step $k+1$, assuming (\ref{induc2}) has been established
for previous steps.
Combining (\ref{ineqs}) and (\ref{induc2}) gives
\begin{equation}
\|\fk - f\|_{\Dkr}^{} \le 2\kern .5pt \vark.
\label{induc4}
\end{equation}
By Theorem~\ref{thm1} (with the same rescaling as
before), (\ref{induc4}) implies
\begin{equation}
\|\fk - f\|_{D_{k+1}^{(r)}}^{} \le
(2\kern .5pt \vark)^\alpha, \quad \alpha =
1 - {\log(1+h/r)\over \log (1/r)}.
\label{induc3}
\end{equation}
(We avoid replacing $\log(1/r)$ by $-\log r$ since it can be
confusing to have to remember that $\log r$ is negative.)
We are done if we can show
\begin{displaymath}
(2\kern .5pt \vark)^\alpha \le \varepsilon_{k+1}^{}.
\end{displaymath}
or by taking logarithms,
\begin{displaymath}
\left( 1 - {\log(1+h/r)\over \log (1/r)}\right)
(\log 2 + \log(\vark)) \le
\log(\varepsilon_{k+1}^{}).
\end{displaymath}
By (\ref{vardef}), if we divide both sides by the negative
quantity $\log(\vark)$, this becomes
\begin{equation}
\left( 1 - {\log(1+h/r)\over \log (1/r)}\right)
\left({\log 2 \over \log(\vark)} + 1\right) \ge
\exp\left({-h-2h^2\over r \log(1/r)}\right) .
\label{toprove}
\end{equation}
Now suppose for a moment that $\vark$ is negligible.  Then
the $\log 2 /\log(\vark)$ term goes away and
the condition we must verify reduces to
\begin{displaymath}
1 - {\log(1+h/r)\over \log (1/r)}
\ge \exp\left({-h-2h^2\over r \log(1/r)}\right) .
\end{displaymath}
A numerical search readily confirms that this holds
with a strict
inequality over the indicated region $r\in(0,1/2)$, $h\in (0,1/4)$
(the coefficient of the term $-2\kern .3pt h^2$ was introduced
to ensure this).
Because of the assumption in the theorem statement that~$\varepsilon$ is
sufficiently small, this establishes (\ref{toprove}).
\qed
\end{proof}

The conclusion of
Theorem~\ref{chainthm} becomes memorable
in the limit $\varepsilon,h\to 0$.
The parameter $\et$ of (\ref{vardef}) is
then minimized with the choice $r=1/e$, for which
it takes the value $\et = e$.
We conclude that with this optimal choice of $r$,
\begin{displaymath}
\hbox{\em The number of accurate digits in chain-of-disks continuation}
\end{displaymath}

\vskip -28pt

\begin{displaymath}
\hbox{\em along a channel of half-width\/ $1$
decays at the rate $\exp(-e\kern .3pt x)$.}
\end{displaymath}

In a field as established as complex analysis, it is hard to be
sure that anything is
entirely new, but I am not aware of a previous estimation of
loss of digits at the rate $\exp(-e \kern .3pt x)$ for
chain-of-disks continuation.  The
general observation of exponential loss of information is more
than a century old.   Henrici~\cite{hen66} writes (his italics)
\begin{displaymath}
\hbox{\em The early vectors$\dots$ must be computed more accurately than
the late ones}
\end{displaymath}
and he gives credit for related work to Mittag-Leffler,
Painlev\'e, Zeller, and Lewis~\cite{lewis}.

It is interesting to note what our estimates suggest for what
might be considered a very natural test problem for analytic continuation.
Suppose we have a function like $f(z) = \sqrt z$
that is known to be known to be bounded and analytically continuable
along any curve in the punctured disk $0 < |z|<2$.  If we start near $z=1$ with a certain
accuracy $\varepsilon$ and go around the origin and back to $z=1$ again, how much
accuracy will remain?
We will not attempt to give a sharp solution to this problem,
but it is the example that motivated our choice of a strip
of length $2\pi$ for the numbers quoted in the introduction.
Our estimates suggest
that the number of accurate digits may be reduced by a
factor as great as
$(\pi/4)\exp(\pi^2) \approx \hbox{15,000}$, or
$\exp(2\kern .4pt \pi e) \approx \hbox{26,000,000}$ for the chain-of-disks method.

\section{Conclusion}

A compelling presentation of the practical side of
analytic continuation can be found in the book to appear
by Fornberg and Piret~\cite{fp}.  In the case of exactly known
functions, although one could use the
chain-of-disks idea in principle, Taylor series play little role
in practice.  A far more
powerful approach is to find an analytical method to transform one
formula defining a function (a formula being after all a finite
object, unlike an infinite set of Taylor coefficients)
into another formula with a new region of validity.
For the most famous of all examples, the
Dirichlet series for the Riemann zeta function converges
only for $\Real z > 1$, but other representations extend $\zeta(z)$
to the whole complex plane.

The present paper has concerned the case of inexactly known
functions.  Here, for continuation of functions from a disk to a
larger disk, or from an interval to an ellipse, algorithms related
to Taylor or Chebyshev series are effective, as has
been discovered by various authors and we have illustrated by
Figure~\ref{chebfig} from Chebfun.
A third equivalent
context would be analytic continuation of a periodic function into
a strip by Fourier series.
The question is, what can one
do to continue a function beyond the disk/ellipse/strip of convergence
of its Taylor/Chebyshev/Fourier series?
Our theorems show that if all one knows is analyticity and boundedness
along certain channels, then
accuracy may be lost at a precipitous exponential
rate, better than the chain-of-disks but only by a constant.
However, the assumption of analyticity just
in a channel is more pessimistic than necessary in many applications.
Functions arising in applications rarely have natural boundaries or
other beautiful pathologies of analytic function theory, however
generic such structures may be from a certain abstract point of
view; they are far more likely to be analytic everywhere apart from
certain poles and branch points.  In practice, rational functions
are the crucial tool for analytic continuation in such cases, and
when they work, their convergence is typically exponential, just as
we have found for series-based methods in a disk~\cite{bgm,eiermann,atap}.
It would be an
interesting challenge to develop theorems for meromorphic functions
analogous to what we have established here in the analytic case,
and a discussion with some of this flavor can be found
in~\cite{millerb}.

\begin{acknowledgements}
The early stages of this work benefited from discussions with Marco
Fasondini, Bengt Fornberg, Yuji Nakatsukasa, and Olivier S\`ete.
The first version of the
paper was written during a sabbatical
visit to the Laboratoire de l'Informatique du Parall\'elisme
at ENS Lyon in 2017--18 hosted by Nicolas Brisebarre, Jean-Michel Muller,
and Bruno Salvy.  It was improved in revision by
suggestions from Marco Fasondini, Daan Huybrechs,
Alex Townsend, Marcus Webb, Kuan Xu, and especially Elias Wegert.
\end{acknowledgements}