# Resurgence and Partial Theta Series

L. Han 1,2, Y. Li 3, D. Sauzin 4,1, S. Sun 1,5

###### Abstract.

We consider partial theta series associated with periodic sequences of
coefficients, of the form
$\Theta(\tau):=\sum_{n>0}n^{\nu}f(n)\mathrm{e}^{{\mathrm{i}}\pi n^{2}\tau/M}$,
with $\nu\in\mathbb{Z}_{\geq 0}$ and an $M$-periodic function
$f:\mathbb{Z}\rightarrow\mathbb{C}$. Such a function is analytic in the half-
plane $\\{\mathop{\Im m}\nolimits\tau>0\\}$ and as $\tau$ tends non-
tangentially to any $\alpha\in\mathbb{Q}$, a formal power series appears in
the asymptotic behaviour of $\Theta(\tau)$, depending on the parity of $\nu$
and $f$. We discuss the summability and resurgence properties of these series
by means of explicit formulas for their formal Borel transforms, and the
consequences for the modularity properties of $\Theta$, or its “quantum
modularity” properties in the sense of Zagier’s recent theory. The Discrete
Fourier Transform of $f$ plays an unexpected role and leads to a number-
theoretic analogue of Écalle’s “Bridge Equations”. The motto is: (quantum)
modularity $=$ Stokes phenomenon $+$ Discrete Fourier Transform.

###### Key words and phrases:

Resurgence, Modularity, Partial Theta Series, Analytic Combinatorics

1 Department of Mathematics, Capital Normal University, Beijing 100048, China

2 Yanqi Lake Beijing Institute of Mathematical Sciences and Applications
(BIMSA), Beijing, China

3 Chern Institute of Mathematics and LPMC, Nankai university, Tianjin 300071,
China

4 CNRS – Observatoire de Paris, PSL Research University, 75014 Paris, France

5 Academy for Multidisciplinary Studies, Capital Normal University, Beijing
100048, China

Corresponding author<EMAIL_ADDRESS>
File: HLSS_arxiv_2022_07_07_v3.tex (Paris time)

This text gathers selected results from our forthcoming paper [8]. Here, we
aim at giving the global picture, omitting the most technical details of the
proofs for the sake of clarity. We are interested in analytic functions
defined in $\mathbb{H}\coloneqq\\{\,\tau\in\mathbb{C}\mid\mathop{\Im
m}\nolimits\tau>0\,\\}$ as _partial theta series_ , _i.e._ of the form

$\tau\in\mathbb{H}\mapsto\Theta(\tau)\coloneqq\sum_{n\geq
1}a_{n}\,\mathrm{e}^{{\mathrm{i}}\pi n^{2}\tau/M},$ (0.1)

mostly in the case when the coefficients $a_{n}$ are of the form $n^{\nu}f(n)$
and $f\colon\thinspace\mathbb{Z}\to\mathbb{C}$ is $M$-periodic. We will show
that their boundary behaviour is better understood when viewed from the
perspective of Écalle’s _Resurgence Theory_ [6, 18].

Resurgence Theory originates in local analytic dynamics (Écalle-Voronin theory
of parabolic points and Stokes phenomena for nonlinear ODEs [6, 5, 4, 19, 13])
and has recently gained recognition in topology and mathematical physics—see
[1] and [14] for the most recent examples. It defines certain subspaces of the
space of all formal series in one indeterminate and shows how to endow them
with a Fréchet algebra structure [20]; it then relies on a systematic use of
the Laplace transform to relate certain analytic functions and their divergent
asymptotic expansions, while providing us with the apparatus of _Alien
calculus_ to analyse Stokes phenomena (linear or nonlinear).

In our case, the Stokes phenomenon will prove to be related to the action of
the Discrete Fourier Transform on $f$ and, according to the parity of $\nu$
and $f$, to classical modularity or quantum modularity properties (in the
sense of Zagier [22]). We shall thus recover and deepen the analytic aspects
of various results found in the literature [1, 3, 10, 12, 15, 21, 24].

##  1\. From partial theta series to generating series

Suppose for the moment that $M\in\mathbb{R}_{>0}$, $(a_{n})_{n\geq 1}$ is a
sequence of complex numbers and there exists $K>0$ such that $\lvert
a_{n}\rvert\leq K^{n}$ for all $n\geq 1$. Since
$\lvert\mathrm{e}^{{\mathrm{i}}\pi n^{2}\tau/M}\rvert=\mathrm{e}^{-\pi
n^{2}(\mathop{\Im m}\nolimits\tau)/M}$, the function $\Theta$ defined by (0.1)
is analytic on $\mathbb{H}$ and exponentially small as $\mathop{\Im
m}\nolimits\tau\to+\infty$.

######  Theorem 1.

Take any $c\in\mathbb{R}_{>0}$ large enough so that the sum of the generating
series

$F(t)\coloneqq\sum_{n\geq 1}a_{n}\,\mathrm{e}^{-nt}$ (1.1)

is bounded on $\\{\mathop{\Re e}\nolimits t\geq c\\}$ and analytic in a
neighbourhood of this half-plane. Then the function

$\hat{\phi}(\xi)\coloneqq\pi^{-1/2}\xi^{-1/2}F(C\,\xi^{1/2})\qquad\text{with}\enspace
C\coloneqq\big{(}\tfrac{4\pi}{M}\big{)}^{1/2}\mathrm{e}^{{\mathrm{i}}\pi/4},$
(1.2)

where the branch of $\xi^{1/2}$ is specified by
$-{\frac{3\pi}{2}}<\arg\xi<{\frac{\pi}{2}}\;\Rightarrow\;-\frac{3\pi}{4}<\arg(\xi^{1/2})<\frac{\pi}{4}$,
is bounded on $\mathcal{P}_{c}\coloneqq\\{\,\mathop{\Re
e}\nolimits(C\,\xi^{1/2})\geq c\,\\}$ and analytic in a neighbourhood of this
set, and we have

$\Theta(\tau)=\tfrac{1}{2}\tau^{-1/2}\int_{\partial\mathcal{P}_{c}}\mathrm{e}^{-\xi/\tau}\hat{\phi}(\xi)\,{\mathrm{d}}\xi\quad\text{for
all}\enspace\tau\in\mathbb{H},$ (1.3)

where the parabola $\partial\mathcal{P}_{c}$ is oriented anticlockwise—see
Figure 1—and we choose the branch of the square root so that
$0<\arg(\tau^{1/2})<{\frac{\pi}{2}}$.

Figure 1. The oriented parabola $\partial\mathcal{P}_{c}$ and the path
${\Gamma}_{\varepsilon}$ in the $\xi$-plane.

Notice that when $\xi$ is on the parabola $\partial\mathcal{P}_{c}$ and
$\lvert\xi\rvert\to\infty$, $\arg\xi$ tends to $-{\frac{3\pi}{2}}$ or
${\frac{\pi}{2}}$ so that $\lvert\mathrm{e}^{-\xi/\tau}\rvert$ decays
exponentially as soon as $0<\arg\tau<\pi$. If
$0<{\varepsilon}<{\frac{\pi}{2}}$ then, for
$\arg\tau\in({\varepsilon},\pi-{\varepsilon})$, the Cauchy theorem allows us
to replace the integration contour $\partial\mathcal{P}_{c}$ with a contour
${\Gamma}_{\varepsilon}\subset\mathcal{P}_{c}$ beginning like a half-line of
direction $-{\frac{3\pi}{2}}+{\varepsilon}$ and finishing like a half-line of
direction ${\frac{\pi}{2}}-{\varepsilon}$, as on Figure 1:

${\varepsilon}<\arg\tau<\pi-{\varepsilon}\enspace\Rightarrow\enspace\Theta(\tau)=\tfrac{1}{2}\tau^{-1/2}\int_{{\Gamma}_{\varepsilon}}\mathrm{e}^{-\xi/\tau}\hat{\phi}(\xi)\,{\mathrm{d}}\xi.$
(1.4)

Theorem 1 is implicit in [12] and [1]. A direct proof is obtained from the
identity

$\tau^{1/2}\,\mathrm{e}^{{\sigma}^{2}\tau}=\tfrac{1}{2}\pi^{-1/2}\Big{(}-\int_{0}^{\mathrm{e}^{{\mathrm{i}}(-{\frac{3\pi}{2}}+{\varepsilon})}\infty}+\int_{0}^{\mathrm{e}^{{\mathrm{i}}({\frac{\pi}{2}}-{\varepsilon})}\infty}\Big{)}\mathrm{e}^{-\xi/\tau}\,\xi^{-1/2}\,\mathrm{e}^{-2{\sigma}\xi^{1/2}}\,{\mathrm{d}}\xi$
(1.5)

(for any ${\sigma}\in\mathbb{C}^{*}$), which follows from Borel-Laplace
summation of the _convergent_ Puiseux expansion
$\sum\frac{{\sigma}^{2p}}{p!}\tau^{p+\frac{1}{2}}$ of the left-hand side at
$0$ (indeed: the Borel transform of this series happens to be the odd part of
$\Psi(\xi^{1/2})\coloneqq\pi^{-1/2}\xi^{-1/2}\,\mathrm{e}^{-2{\sigma}\xi^{1/2}}$,
we thus recover the left-hand side by applying the Laplace transform (3.8) to
$\big{[}\Psi(\xi^{1/2})-\Psi(-\xi^{1/2})\big{]}/2$ in any direction, e.g.
${\frac{\pi}{2}}\pm{\varepsilon}$, but we also have
$\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\big{[}\Psi(-\xi^{1/2})\big{]}=\mathscr{L}^{-{\frac{3\pi}{2}}+{\varepsilon}}\big{[}\Psi(\xi^{1/2})\big{]}$).
Alternatively, one can use Lemma 1 of [9].

##  2\. Partial theta series associated with periodic sequences

From now on, in (0.1) we consider sequences $(a_{n})$ of the form
$a_{n}=n^{\nu}\,f(n)$ with

$\nu\in\mathbb{Z}_{\geq 0},\qquad M\in\mathbb{Z}_{>0},\qquad
f\colon\thinspace\mathbb{Z}\to\mathbb{C}\enspace\text{$M$-periodic function.}$
(2.1)

For each $(\nu,f,M)$, the corresponding partial theta series is

$\tau\in\mathbb{H}\mapsto\Theta(\tau;\nu,f,M)\coloneqq\sum_{n\geq
1}n^{\nu}\,f(n)\,\mathrm{e}^{{\mathrm{i}}\pi n^{2}\tau/M}$ (2.2)

and we are particularly interested in the local behaviour of this analytic
function as $\tau$ approaches a point $\alpha\in\mathbb{Q}$ of the boundary of
$\mathbb{H}$.

######  Remark 2.1.

For any $\alpha\in\mathbb{Q}$, we can write

$\Theta(\alpha+\tau;\nu,f,M)=\Theta\big{(}\tfrac{M_{\alpha}}{M}\tau;\nu,f_{\\!\frac{\alpha}{M}},M_{\alpha}\big{)}\quad\text{with
notation}\enspace f_{\\!\beta}(n)\coloneqq f(n)\,\mathrm{e}^{{\mathrm{i}}\pi
n^{2}\beta}\enspace\text{for $\beta\in\mathbb{Q}$},$ (2.3)

where $M_{\alpha}$ is a period of $f_{\\!\frac{\alpha}{M}}$, for instance
$\operatorname{lcm}\\!\big{(}M,2\operatorname{denominator}(\alpha/M)\big{)}$.
Therefore, the local study near $\tau=0$ of $\Theta(\tau;\nu,f,M)$ with
arbitrary $M$ and $f$ will give us access to the local behaviour of
$\tau\mapsto\Theta(\tau;\nu,f,M)$ near any rational.

Instead of $\Theta(\tau;\nu,f,M)$, we will often write $\Theta(\tau;\nu,f)$ or
$\Theta(\tau)$, omitting some of the parameters if they are clear from the
context. The cases $\nu=0$ and $\nu=1$ will be the most important ones.

######  Remark 2.2.

Note that, for $\mu\geq 0$ and $\nu=2\mu$ or $2\mu+1$,

$\Theta(\tau;2\mu,f,M)=\big{(}\tfrac{M}{{\mathrm{i}}\pi}\,\tfrac{{\mathrm{d}}\,}{{\mathrm{d}}\tau}\\!\big{)}^{\\!\mu}\,\Theta(\tau;0,f,M),\quad\Theta(\tau;2\mu+1,f,M)=\big{(}\tfrac{M}{{\mathrm{i}}\pi}\,\tfrac{{\mathrm{d}}\,}{{\mathrm{d}}\tau}\\!\big{)}^{\\!\mu}\,\Theta(\tau;1,f,M).$
(2.4)

Consequently, even if we state some results with $\nu=0$ or $\nu=1$ as
$\tau\to 0$ only, they entail _results for arbitrary $\nu$ with $\tau$
approaching any $\alpha\in\mathbb{Q}$_, simply by putting together (2.3) and
(2.4).

#### A few examples

  1. –

The classical Jacobi theta function appears as
${\theta}_{3}=1+2\Theta(\tau;0,1,1)$.

  2. –

The even primitive quadratic Dirichlet character
$f(n)=\left(\frac{12}{n}\right)$ (Kronecker symbol), listed as $f=\href
http://www.lmfdb.org/Character/Dirichlet/12/11$ in [16], gives rise to the
Dedekind eta-function $\eta(\tau)=\Theta(\tau;0,f,12)$, and its Eichler
integral $\tilde{\eta}(\tau)=\Theta(\tau;1,f,12)$ has been investigated
particularly in [24] and [3].

  3. –

The Rogers-Ramanujan identity [23] involves
${\theta}_{5,j}(\tau)=\Theta(\tau;0,f_{5,j},20)$, where $f_{5,1}$ and
$f_{5,2}$ respectively are the real and imaginary part of $\href
http://www.lmfdb.org/Character/Dirichlet/20/7$, an even primitive Dirichlet
character [16].

  4. –

In Chern-Simons theory with gauge group $\operatorname{SU}(2)$ or in the
context of Witten-Reshetikhin-Turaev invariants for the Poincaré homology
sphere [15, 12], there is a partition function involving
$\Theta(\tau;0,f_{+},60)$ with $f_{+}\coloneqq\mathop{\Re
e}\nolimits\big{(}\chi_{60}(23,\,\cdot\,)\big{)}$, where $\href
http://www.lmfdb.org/Character/Dirichlet/60/23$ is an odd primitive Dirichlet
character [16].

  5. –

More generally, for any oriented Seifert fibered integral homology sphere with
$r\geq 3$ exceptional fibers, Andersen and Mistegård show in [1] that the
“Gukov-Pei-Putrov-Vafa invariant” is essentially a partial theta series as in
(0.1), whose limit as $\tau\to 1/k$ is related to the level $k$ Witten-
Reshetikhin-Turaev invariant, at least for $k>0$ even. One can check that, in
this case, $a_{n}$ is a finite sum of odd sequences of the form
$n^{\nu}f^{[\nu]}(n)$, with periodic functions $f^{[\nu]}$ of the same period
and $\nu$ ranging from $0$ to $r-3$.

##  3\. A resurgent divergent series that has three canonical sums

Let $\nu,M,f$ be as in (2.1). With a view to applying Theorem 1, we observe
that the generating function has an analytic continuation as a rational
function of $\mathrm{e}^{-t}$:

$F(t)=\sum_{n\geq
1}n^{\nu}\,f(n)\,\mathrm{e}^{-nt}=\big{(}\\!\\!-\tfrac{{\mathrm{d}}\,}{{\mathrm{d}}t}\big{)}^{\\!\nu}F_{0}(t),\enspace
F_{0}(t)=\sum_{n\geq
1}f(n)\,\mathrm{e}^{-nt}=\frac{1}{1-\mathrm{e}^{-Mt}}\sum_{1\leq\ell\leq
M}f(\ell)\,e^{-\ell t},$

hence we can take $c>0$ arbitrarily small and $F(t)$ extends from
$\\{\mathop{\Re e}\nolimits t\geq c\\}$ to a meromorphic function on
$\mathbb{C}$, regular on $\mathbb{C}-\frac{2\pi{\mathrm{i}}}{M}\mathbb{Z}$.
The mean value $\langle
f\rangle=\frac{1}{M}\sum\limits_{\ell\in\mathbb{Z}/M\mathbb{Z}}f(\ell)$
controls the regularity at $t=0$: if $\langle f\rangle\neq 0$, then $0$ is a
simple pole for $F_{0}(t)$ with residue $\langle f\rangle$; all other possible
poles are of the form $t_{n}\coloneqq 2\pi{\mathrm{i}}n/M$,
$n\in\mathbb{Z}^{*}$.

To compute the function $\hat{\phi}(\xi)=\pi^{-1/2}\xi^{-1/2}F(C\,\xi^{1/2})$
of (1.2), we decompose $F$ into

$F(t)=\frac{\nu!\langle f\rangle}{t^{\nu+1}}+F^{+}(t)+F^{-}(t),\qquad
F^{\pm}(t)\in\mathbb{C}\\{t\\},\qquad F^{+}\enspace\text{even},\quad
F^{-}\enspace\text{odd}.$ (3.1)

Defining two functions $\hat{\phi}^{+}$ and $\hat{\phi}^{-}$ by

$\displaystyle
F^{+}(t)=\pi^{1/2}\,\hat{\phi}^{+}\Big{(}\frac{t^{2}}{C^{2}}\Big{)},\qquad
F^{-}(t)=\pi^{1/2}\frac{t}{C}\,\hat{\phi}^{-}\Big{(}\frac{t^{2}}{C^{2}}\Big{)},$
(3.2) we get $\displaystyle\hat{\phi}(\xi)=\frac{\nu!\langle
f\rangle}{\pi^{1/2}C^{\nu+1}}\xi^{-\frac{\nu}{2}-1}+\xi^{-1/2}\hat{\phi}^{+}(\xi)+\hat{\phi}^{-}(\xi),\qquad\hat{\phi}^{\pm}(\xi)\in\mathbb{C}\\{\xi\\}.$
(3.3)

Notice that $\hat{\phi}^{+}$ and $\hat{\phi}^{-}$ are meromorphic on
$\mathbb{C}$ and their possible poles are of the form

$\xi_{n}\coloneqq\frac{t_{n}^{2}}{C^{2}}=\frac{{\mathrm{i}}\pi
n^{2}}{M}\in{\mathrm{i}}\mathbb{R}_{>0},\qquad n\in\mathbb{Z}_{>0}.$ (3.4)

The Laplace-like formula (1.4) thus gives rise to a sum of three terms:

$\displaystyle\Theta(\tau;\nu,f,M)$
$\displaystyle=\boxed{\,\tfrac{1}{2}{\Gamma}\big{(}\tfrac{\nu+1}{2}\big{)}\langle
f\rangle\big{(}\tfrac{\pi}{M}\\!\cdot\\!\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{\nu+1}{2}}+\Theta^{+}(\tau;\nu,f,M)+\Theta^{-}(\tau;\nu,f,M)}$
(3.5) $\displaystyle\text{with}\quad\Theta^{+}$
$\displaystyle\coloneqq\tfrac{\tau^{-1/2}}{2}\int_{{\Gamma}_{\varepsilon}}\mathrm{e}^{-\xi/\tau}\,\xi^{-1/2}\hat{\phi}^{+}(\xi)\,{\mathrm{d}}\xi,\quad\Theta^{-}\coloneqq\tfrac{\tau^{-1/2}}{2}\int_{{\Gamma}_{\varepsilon}}\mathrm{e}^{-\xi/\tau}\,\hat{\phi}^{-}(\xi)\,{\mathrm{d}}\xi,$

where the first term in (3.5) has been obtained from the known value of the
Hankel-type Laplace integral of $\xi^{-\frac{\nu}{2}-1}$, which is
$2\pi{\mathrm{i}}^{\nu+1}\tau^{-\nu/2}/{\Gamma}(1+\nu/2)$, and the Legendre
duplication formula.

Now, the key point is that the Cauchy theorem allows us to raise the
integration contour ${\Gamma}_{\varepsilon}$ until it touches $0$ and to
replace it with the two half-lines
$\mathrm{e}^{{\mathrm{i}}({\frac{\pi}{2}}\pm{\varepsilon})}\mathbb{R}_{\geq
0}$ properly oriented, taking into account the change of branch for
$\xi^{-1/2}$ from
$\mathrm{e}^{{\mathrm{i}}(-{\frac{3\pi}{2}}+{\varepsilon})}\mathbb{R}_{\geq
0}$ to
$\mathrm{e}^{{\mathrm{i}}({\frac{\pi}{2}}+{\varepsilon})}\mathbb{R}_{\geq 0}$
in the case of $\Theta^{+}$, whence

  1. $\bullet$

$\frac{\Theta^{+}}{\tau^{-1/2}}$ is the average of the Laplace transforms of
$\xi^{-1/2}\hat{\phi}^{+}(\xi)$ in the directions
${\frac{\pi}{2}}\pm{\varepsilon}$:

$\Theta^{+}=\tau^{-1/2}\times\frac{1}{2}\big{(}\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}+\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\big{)}\big{[}\xi^{-1/2}\hat{\phi}^{+}(\xi)\big{]},$
(3.6)

  2. $\bullet$

$\frac{\Theta^{-}}{\tau^{-1/2}}$ is the difference of the Laplace transforms
of $\frac{1}{2}\hat{\phi}^{-}(\xi)$ in the directions
${\frac{\pi}{2}}\pm{\varepsilon}$:

$\Theta^{-}=\tau^{-1/2}\times\big{(}\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}-\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\big{)}\big{[}\tfrac{1}{2}\hat{\phi}^{-}\big{]},$
(3.7)

with the notation

$\mathscr{L}^{\theta}\hat{\varphi}(\tau)=\int_{0}^{\mathrm{e}^{{\mathrm{i}}{\theta}}\infty}\mathrm{e}^{-\xi/\tau}\hat{\varphi}(\xi)\,{\mathrm{d}}\xi$
(3.8)

in the half-plane
$\\{\,\arg\tau\in({\theta}-{\tfrac{\pi}{2}},{\theta}+{\tfrac{\pi}{2}})\,\\}$.

In the case of $\Theta^{-}(\tau)$, since $\hat{\phi}^{-}(\xi)$ is regular at
$0$ and meromorphic, we can go on raising the integration contour as long as
we do not hit the first pole on ${\mathrm{i}}\mathbb{R}_{>0}$, which results
in an exponentially small contribution as $\tau\to 0$.

In the case of $\Theta^{+}(\tau)$, it is the Puiseux expansion at $0$ of

$\hat{\varphi}^{+}(\xi)\coloneqq\xi^{-1/2}\hat{\phi}^{+}(\xi)\in\xi^{-1/2}\mathbb{C}\\{\xi\\}$
(3.9)

that governs the asymptotics: the standard properties of the Laplace transform
$\mathscr{L}^{{\frac{\pi}{2}}\pm{\varepsilon}}$ give the asymptotic behaviour
as $\tau\to 0$ non-tangentially, _i.e._ uniformly in any sector
${\varepsilon}<\arg\tau<\pi-{\varepsilon}$, which we denote by
$\tau\xrightarrow{\operatorname{n.t.\,}}0$. A few computations lead to
formulas involving the analytic continuation in $s$ of the $L$-function
$L(s,f)\coloneqq\sum\limits_{n\geq 1}f(n)n^{-s}$ for the Taylor coefficients
of $\hat{\phi}^{+}(\xi)$ (see [8] for the details). The upshot is

######  Theorem 2.

  1. $\bullet$

If the mean value $\langle f\rangle$ is non-zero, then the dominant term in
(3.5) is the first one and
$\lvert\Theta(\tau;\nu,f,M)\rvert\text{\scalebox{0.9}{$\xrightarrow[\tau\xrightarrow{\operatorname{n.t.\,}}0]{}$}}\infty$.

  2. $\bullet$

The term $\Theta^{+}(\tau;\nu,f,M)$ is the median sum in the direction
${\frac{\pi}{2}}$ of the formal series

$\tilde{\Theta}(\tau;\nu,f,M)\coloneqq\sum_{p\geq
0}\frac{1}{p!}L(-2p-\nu,f)\Big{(}\frac{\pi{\mathrm{i}}}{M}\Big{)}^{p}\tau^{p}.$
(3.10)

The formal series $\tilde{\Theta}$ is resurgent in $1/\tau$ and its Borel
transform has multivalued analytic continuation in
$\mathbb{C}-\\{\xi_{n}\\}_{n\geq 1}$. In particular
$\Theta^{+}\sim_{1}\tilde{\Theta}$ as
$\tau\xrightarrow{\operatorname{n.t.\,}}0$.

  3. $\bullet$

The term $\Theta^{-}(\tau;\nu,f,M)$ is exponentially small as
$\tau\xrightarrow{\operatorname{n.t.\,}}0$: it is $O(\mathrm{e}^{-c\mathop{\Im
m}\nolimits(-1/\tau)})$ with any $0<c<\frac{\pi}{M}$ (much more will be said
on it in Section 5).

A few words on the terminology. The concept of resurgence [6] is based on the
Borel transform

$\mathscr{B}\colon\thinspace\tilde{\psi}(\tau)=\sum_{p\in\mathscr{N}}\\!c_{p}\tau^{p}\mapsto\hat{\psi}(\xi)=\sum_{p\in\mathscr{N}}\\!c_{p}\frac{\xi^{p-1}}{{\Gamma}(p)}\quad\text{for}\;\mathscr{N}\\!=a+b\mathbb{Z}_{\geq
0}\enspace\text{with}\enspace a,b\in\mathbb{R}_{>0}.$ (3.11)

The series $\tilde{\psi}(\tau)$ is said to be _resurgent_ in $1/\tau$ if its
Borel transform $\hat{\psi}(\xi)$ has positive radius of convergence and has
“endless analytic continuation”—see [6], or Chapters 5 and 6 of [18]. If
$\lvert\hat{\psi}(\xi)\rvert$ is bounded by an exponential along a
singularity-free sector $\arg\xi\in[{\theta}_{1},{\theta}_{2}]$, then its
Laplace transforms $\mathscr{L}^{\theta}\hat{\psi}$ in the directions
${\theta}\in[{\theta}_{1},{\theta}_{2}]$ are the analytic continuation of one
another and can be glued into one function:

$\mathscr{L}^{[{\theta}_{1},{\theta}_{2}]}\hat{\psi}(\tau)=\int_{0}^{\mathrm{e}^{{\mathrm{i}}{\theta}}\infty}\mathrm{e}^{-\xi/\tau}\hat{\psi}(\xi)\,{\mathrm{d}}\xi,\quad{\theta}\in[{\theta}_{1},{\theta}_{2}]\enspace\text{such
that}\;\arg\tau\in({\theta}-{\tfrac{\pi}{2}},{\theta}+{\tfrac{\pi}{2}}),$
(3.12)

thus yielding the Borel sum
$\mathscr{S}^{[{\theta}_{1},{\theta}_{2}]}\tilde{\psi}\coloneqq\mathscr{L}^{[{\theta}_{1},{\theta}_{2}]}\mathscr{B}\tilde{\psi}$,
that is analytic in a sectorial neighbourhood of $\tau=0$ with arguments
ranging from ${\theta}_{1}-{\tfrac{\pi}{2}}$ to
${\theta}_{2}+{\tfrac{\pi}{2}}$, and has $1$-Gevrey asymptotic expansion
$\tilde{\psi}(\tau)$ in that domain—this is the meaning of the symbol
“$\sim_{1}$” in Theorem 2.

If there are singularities along
$\mathrm{e}^{{\mathrm{i}}{\theta}}\mathbb{R}_{>0}$ but not in the sectors
$\arg\xi\in[{\theta}-{\varepsilon},{\theta})$ and
$({\theta},{\theta}+{\varepsilon}]$, then one may resort to _median_ summation
$\mathscr{S}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\tilde{\psi}=\mathscr{L}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\mathscr{B}\tilde{\psi}$,
where $\mathscr{L}^{\theta}_{\text{\scalebox{0.8}{{med}}}}$ is a variant of
the Laplace operator introduced by J. Écalle; in general,
$\mathscr{L}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\hat{\psi}$ is not the
mere arithmetic average
$\frac{1}{2}(\mathscr{L}^{{\theta}-{\varepsilon}}+\mathscr{L}^{{\theta}+{\varepsilon}})\hat{\psi}$
but something more elaborate that involves, in a symmetric way, with well-
chosen weights, the various branches of the analytic continuation of
$\hat{\psi}$ along
$\mathrm{e}^{{\mathrm{i}}{\theta}}\mathbb{R}_{>0}-\\{\text{singular
points}\\}$; see §1.4 of [7] or [17]. These weights are such that
$\mathscr{S}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\big{(}\tilde{\psi}_{1}\tilde{\psi}_{2}\big{)}=\big{(}\mathscr{S}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\tilde{\psi}_{1}\big{)}\big{(}\mathscr{S}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\tilde{\psi}_{2}\big{)}$,
which means that

$\mathscr{L}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\big{(}\hat{\psi}_{1}*\hat{\psi}_{2}\big{)}=\big{(}\mathscr{L}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\hat{\psi}_{1}\big{)}\big{(}\mathscr{L}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\hat{\psi}_{2}\big{)},$
(3.13)

where
$\hat{\psi}_{1}*\hat{\psi}_{2}(\xi)\coloneqq\mathscr{B}\big{(}\tilde{\psi}_{1}\tilde{\psi}_{2}\big{)}$
is the convolution.111The convolution product $*$ is given by the formula
$\hat{\psi}_{1}*\hat{\psi}_{2}(\xi)=\int_{0}^{\xi}\hat{\psi}_{1}(\xi_{1})\hat{\psi}_{2}(\xi-\xi_{1})\,{\mathrm{d}}\xi_{1}$
for $\lvert\xi\rvert$ small enough and is known to have endless analytic
continuation when both factors have—see [6], or Chapter 6 of [18]. Of course,
$\mathscr{L}^{{\theta}^{\prime}}\big{(}\hat{\psi}_{1}*\hat{\psi}_{2}\big{)}=\big{(}\mathscr{L}^{{\theta}^{\prime}}\hat{\psi}_{1}\big{)}\big{(}\mathscr{L}^{{\theta}^{\prime}}\hat{\psi}_{2}\big{)}$
for a singularity-free direction ${\theta}^{\prime}$, and
$\mathscr{S}^{{\theta}^{\prime}}\big{(}\tilde{\psi}_{1}\tilde{\psi}_{2}\big{)}=\big{(}\mathscr{S}^{{\theta}^{\prime}}\tilde{\psi}_{1}\big{)}\big{(}\mathscr{S}^{{\theta}^{\prime}}\tilde{\psi}_{2}\big{)}$
in that case.

A case in which the median sum coincides with the arithmetic average is when
$\hat{\psi}(\xi)$ is single-valued for
$\arg\xi\in[{\theta}-{\varepsilon},{\theta}+{\varepsilon}]$, e.g. a
meromorphic function, as is $\hat{\varphi}^{+}=\xi^{-1/2}\hat{\phi}^{+}(\xi)$.
Another case is when $\hat{\psi}=\hat{A}*\hat{\varphi}$ with $\hat{\varphi}$
meromorphic and $\hat{A}$ holomorphic in the sector
$\arg\xi\in[{\theta}-{\varepsilon},{\theta}+{\varepsilon}]$; indeed, the
identity
$\mathscr{L}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\hat{\psi}=\frac{1}{2}(\mathscr{L}^{{\theta}-{\varepsilon}}+\mathscr{L}^{{\theta}+{\varepsilon}})\hat{\psi}$
follows from (3.13) because
$\mathscr{L}^{{\theta}-{\varepsilon}}\hat{A}=\mathscr{L}^{{\theta}+{\varepsilon}}\hat{A}$
and
$\mathscr{L}^{\theta}_{\text{\scalebox{0.8}{{med}}}}\hat{\varphi}=\frac{1}{2}(\mathscr{L}^{{\theta}-{\varepsilon}}+\mathscr{L}^{{\theta}+{\varepsilon}})\hat{\varphi}$
in that case.

What happens with Theorem 2 is that (3.9) defines a function
$\hat{\varphi}^{+}(\xi)\in\xi^{-1/2}\mathbb{C}\\{\xi\\}$ that is meromorphic
with singularities in direction ${\frac{\pi}{2}}$ only (in particular it is
endlessly continuable), so (3.6) can be rewritten
$\Theta^{+}(\tau)=\tau^{-1/2}\mathscr{L}^{\frac{\pi}{2}}_{\text{\scalebox{0.8}{{med}}}}\hat{\varphi}^{+}$,
which implies that the function $\psi^{+}\coloneqq\tau\Theta^{+}(\tau)$ can be
written
$\psi^{+}(\tau)=\tau^{1/2}\mathscr{L}^{\frac{\pi}{2}}_{\text{\scalebox{0.8}{{med}}}}\hat{\varphi}^{+}$.
Using $\tau^{1/2}=\mathscr{L}^{\theta}\hat{A}$ with
$\hat{A}(\xi)\coloneqq\frac{\xi^{-1/2}}{{\Gamma}(1/2)}$ for any ${\theta}$
close to ${\frac{\pi}{2}}$, we get
$\psi^{+}(\tau)=\mathscr{L}^{\frac{\pi}{2}}_{\text{\scalebox{0.8}{{med}}}}\hat{\psi}^{+}$
with
$\hat{\psi}^{+}(\xi)\coloneqq\hat{A}*\hat{\varphi}^{+}(\xi)\in\mathbb{C}\\{\xi\\}$.
Multiplying
$\mathscr{L}^{\frac{\pi}{2}}_{\text{\scalebox{0.8}{{med}}}}\hat{\psi}^{+}$ by
$\tau^{-1}$, we finally get

$\Theta^{+}(\tau)=\tau^{-1}\psi^{+}(\tau)=\hat{\psi}^{+}(0)+\mathscr{L}^{\frac{\pi}{2}}_{\text{\scalebox{0.8}{{med}}}}\big{(}\tfrac{{\mathrm{d}}\hat{\psi}^{+}}{{\mathrm{d}}\xi\;\;}\big{)}(\tau)\sim_{1}\hat{\psi}^{+}(0)+\mathscr{B}^{-1}\big{(}\tfrac{{\mathrm{d}}\hat{\psi}^{+}}{{\mathrm{d}}\xi\;\;}\big{)}(\tau)\eqqcolon\tilde{\Theta}(\tau).$
(3.14)

We end up with

$\Theta^{+}(\tau)=\mathscr{L}^{\frac{\pi}{2}}_{\text{\scalebox{0.8}{{med}}}}\hat{\Theta}=\mathscr{S}^{\frac{\pi}{2}}_{\text{\scalebox{0.8}{{med}}}}\tilde{\Theta},\qquad\hat{\Theta}=\hat{\psi}^{+}(0)\,\delta+\frac{{\mathrm{d}}\hat{\psi}^{+}}{{\mathrm{d}}\xi\;\;},\qquad\hat{\psi}^{+}(\xi)=\frac{\xi^{-1/2}}{{\Gamma}(1/2)}*\big{[}\xi^{-1/2}\hat{\phi}^{+}(\xi)\big{]}$
(3.15)

by extending (3.11) and setting $\mathcal{B}1=\delta$ (“Dirac mass at $0$”).

In the Borel plane, $\hat{\phi}^{+}(\xi)$ and $\xi^{-1/2}\hat{\phi}^{+}(\xi)$
are meromorphic and hence endlessly continuable. Now, convolution with
$\xi^{-1/2}$ does not preserve meromorphy, but it preserves endless
continuability, and so does $\tfrac{{\mathrm{d}}\;}{{\mathrm{d}}\xi}$,
therefore $\hat{\Theta}$ is endlessly continuable and the formal series
$\tilde{\Theta}$ is thus proved to be resurgent. To check that
$\tilde{\Theta}$ defined by (3.14) is given by (3.10), one just needs to
compute the Taylor expansion at $\xi=0$ of $\hat{\psi}^{+}$—we omit the
details here and refer the reader to [8].

######  Remark 3.1.

Notice that the resurgent formal series $\tilde{\Theta}(\tau)$ has, for
$\tau\in\mathbb{H}$, three “canonical” sums:
$\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\hat{\Theta}(\tau)$,
$\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}\hat{\Theta}(\tau)$ and
$\mathscr{L}^{\frac{\pi}{2}}_{\text{\scalebox{0.8}{{med}}}}\hat{\Theta}(\tau)$,
the third of which is the function $\Theta^{+}(\tau)$. Interesting phenomena
are observed when one compares these three functions—see Section 5. Notice
also that if $f$ is real-valued, then the coefficients of
$\tilde{\Theta}(\tau)$ with respect to $\tau/{\mathrm{i}}$ are real; the
realness of
$\Theta^{+}(\tau)=\mathscr{S}^{\frac{\pi}{2}}_{\text{\scalebox{0.8}{{med}}}}\tilde{\Theta}(\tau)$
for $\tau\in{\mathrm{i}}\mathbb{R}_{>0}$ in that case can be viewed as a
consequence of a general property of Écalle’s median summation (anyway, the
decomposition (3.5) respects realness).

######  Remark 3.2.

Using Remark 2.2, we get from Theorem 2 the asymptotic behaviour of the
function $\Theta(\tau;\nu,f,M)$ as
$\tau\xrightarrow{\operatorname{n.t.\,}}\alpha\in\mathbb{Q}$:

$\Theta(\alpha+\tau;\nu,f,M)=\tfrac{1}{2}{\Gamma}\big{(}\tfrac{\nu+1}{2}\big{)}\langle
f_{\\!\frac{\alpha}{M}}\rangle\big{(}\tfrac{\pi}{M}\\!\cdot\\!\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{\nu+1}{2}}+\mathscr{S}^{{\frac{\pi}{2}}}_{\text{\scalebox{0.8}{{med}}}}\,\tilde{\Theta}_{\alpha}(\tau)+O(\mathrm{e}^{-c\mathop{\Im
m}\nolimits(-1/\tau)})\quad\text{as}\enspace\tau\xrightarrow{\operatorname{n.t.\,}}0$
(3.16)

with arbitrary $0<c<\frac{\pi M}{M_{\alpha}^{2}}$, and with

$\tilde{\Theta}_{\alpha}(\tau)\coloneqq\sum_{p\geq
0}\frac{1}{p!}L(-2p-\nu,f_{\\!\frac{\alpha}{M}})\Big{(}\frac{\pi{\mathrm{i}}}{M}\Big{)}^{p}\tau^{p}.$
(3.17)

We are thus led to define

$\overline{\mathscr{Q}}_{f,M}\coloneqq\\{\,\alpha\in\mathbb{Q}\mid\langle
f_{\\!\frac{\alpha}{M}}\rangle=0\,\\},$ (3.18)

so that
$\alpha\notin\overline{\mathscr{Q}}_{f,M}\;\Rightarrow\;\lvert\Theta(\tau;\nu,f,M)\rvert\to\infty$
as $\tau\xrightarrow{\operatorname{n.t.\,}}\alpha$,

$\alpha\in\overline{\mathscr{Q}}_{f,M}\;\Rightarrow\;\Theta^{\operatorname{nt}\\!}(\alpha;\nu,f,M)\coloneqq\lim_{\tau\xrightarrow{\operatorname{n.t.\,}}\alpha}\Theta(\tau;\nu,f,M)=L(-\nu,f_{\\!\frac{\alpha}{M}}).$
(3.19)

Note that $f$ and $f_{\\!\frac{\alpha}{M}}$ have same parity, in particular

$\text{$f$ odd}\quad\Rightarrow\quad\overline{\mathscr{Q}}_{f,M}=\mathbb{Q}.$
(3.20)

Note also that the full domain of definition of the boundary function
$\Theta^{\operatorname{nt}\\!}$ is
$\overline{\mathscr{Q}}_{f,M}\cup\\{{\mathrm{i}}\infty\\}$, since
$\Theta(\tau;\nu,f,M)\to 0$ as $\mathop{\Im m}\nolimits\tau\to\infty$. We will
see in the next section that $L(-\nu,f_{\\!\frac{\alpha}{M}})=0$ if $\nu$ and
$f$ are odd, and also if $\nu\geq 2$ and $f$ are even, while
$L(0,f_{\\!\frac{\alpha}{M}})=-f(0)/2$ if $f$ is even.

##  4\. The role of parity

It so happens that the decomposition of $f$ into even and odd parts,

$f=f^{\operatorname{ev}}+f^{\operatorname{od}},\quad
f^{\operatorname{ev}}\\!(n)\coloneqq\tfrac{f(n)+f(-n)}{2},\quad
f^{\operatorname{od}}(n)\coloneqq\tfrac{f(n)-f(-n)}{2},$ (4.1)

relates to the decomposition (3.1): for $\nu=0$ one finds
$F_{0}=F_{0}^{\operatorname{ev}}+F_{0}^{\operatorname{od}}$ with

$F_{0}^{\operatorname{ev}}\\!(t)=-\tfrac{1}{2}f^{\operatorname{ev}}\\!(0)+\tfrac{1}{1-\mathrm{e}^{-Mt}}\sum_{\ell=0}^{M-1}f^{\operatorname{od}}(\ell)\,e^{-\ell
t},\quad
F_{0}^{\operatorname{od}}(t)=\tfrac{1}{1-\mathrm{e}^{-Mt}}\sum_{\ell=0}^{M-1}f^{\operatorname{ev}}\\!(\ell)\,e^{-\ell
t},$ (4.2)

from which one gets $F^{\pm}$ by applying
$\big{(}\\!\\!-\frac{{\mathrm{d}}\,}{{\mathrm{d}}t}\big{)}^{\nu}$ and removing
$\frac{\nu!\langle f\rangle}{t^{\nu+1}}$. Therefore, when $f$ is even or odd,
only one of the two functions $\Theta^{+}$ and $\Theta^{-}$ can be nonzero,
with the sole exception of {$\nu=0$, $f$ even}, in which case
$\Theta^{+}(\tau)=-\frac{1}{2}f(0)$. In general,

  1. $\bullet$

$\tilde{\Theta}(\tau;0,f)=-\frac{1}{2}f^{\operatorname{ev}}\\!(0)+\sum_{p\geq
0}\frac{1}{p!}L(-2p,f^{\operatorname{od}})\big{(}\frac{\pi{\mathrm{i}}}{M}\big{)}^{p}\tau^{p}$
only depends on $f^{\operatorname{od}}$ and $f^{\operatorname{ev}}\\!(0)$ and
gives rise to $\Theta^{+}(\tau;0,f)$ by median summation, while
$\Theta^{-}(\tau;0,f)$ only depends on $f^{\operatorname{ev}}$,

  2. $\bullet$

$\tilde{\Theta}(\tau;1,f)=\sum_{p\geq
0}\frac{1}{p!}L(-2p-1,f^{\operatorname{ev}})\big{(}\frac{\pi{\mathrm{i}}}{M}\big{)}^{p}\tau^{p}$
only depends on $f^{\operatorname{ev}}$ and its median sum is
$\Theta^{+}(\tau;1,f)$, while $\Theta^{-}(\tau;1,f)$ only depends on
$f^{\operatorname{od}}$,

and so on.

######  Remark 4.1.

If $\nu$ is even (resp. odd), unless $f$ is even (resp. odd), the Borel
transform of $\tilde{\Theta}(\tau;\nu,f)$ has singularities in the direction
${\frac{\pi}{2}}$ and $\tilde{\Theta}(\tau;\nu,f)$ is _not_ Borel summable in
that direction, median summation is needed. Moreover, the median sum coincides
with
$\Theta(\tau;\nu,f)-\tfrac{1}{2}{\Gamma}\big{(}\tfrac{\nu+1}{2}\big{)}\langle
f\rangle\big{(}\tfrac{\pi}{M}\\!\cdot\\!\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{\nu+1}{2}}$
only if $f$ is odd (resp. even).

#### Discrete Fourier Transform

The DFT operator $U_{M}$ is defined on the space of $M$-periodic functions
$\mathbb{Z}\to\mathbb{C}$ by

$U_{M}\colon\thinspace
f\mapsto\hat{f},\quad\hat{f}(n)\coloneqq\frac{1}{\sqrt{M}}\,\sum_{\ell\;\textrm{mod}\,M}f(\ell)\mathrm{e}^{-2\pi{\mathrm{i}}\ell
n/M}\enspace\text{for all}\;n\in\mathbb{Z}.$ (4.3)

This is a unitary operator that respects parity:

$\displaystyle\text{$f$
even}\enspace\Rightarrow\enspace\hat{f}=U_{M}f\enspace\text{even},\enspace
U_{M}^{2}f=f,\enspace
U_{M}\big{(}\tfrac{f+\hat{f}}{2}\big{)}=\tfrac{f+\hat{f}}{2},\enspace
U_{M}\big{(}\tfrac{f-\hat{f}}{2}\big{)}=-\tfrac{f-\hat{f}}{2}$
$\displaystyle\text{$f$
odd}\enspace\Rightarrow\enspace\hat{f}=U_{M}f\enspace\text{odd},\enspace
U_{M}^{2}f=-f,\enspace
U_{M}\big{(}\tfrac{f+{\mathrm{i}}\hat{f}}{2}\big{)}=-{\mathrm{i}}\tfrac{f+{\mathrm{i}}\hat{f}}{2},\enspace
U_{M}\big{(}\tfrac{f-{\mathrm{i}}\hat{f}}{2}\big{)}={\mathrm{i}}\tfrac{f-{\mathrm{i}}\hat{f}}{2}.$

All eigenvectors are of one of the four previous forms, with eigenvalue $\pm
1$ or $\pm{\mathrm{i}}$.

It is (4.2) that leads us to consider the DFT, since for all $n\in\mathbb{Z}$,

$\operatorname{Res}\\!\big{(}F_{0}^{\operatorname{ev}}(t),t=\tfrac{2\pi{\mathrm{i}}n}{M}\big{)}=M^{-\frac{1}{2}}\hat{f}^{\operatorname{od}}(n),\quad\operatorname{Res}\\!\big{(}F_{0}^{\operatorname{od}}(t),t=\tfrac{2\pi{\mathrm{i}}n}{M}\big{)}=M^{-\frac{1}{2}}\hat{f}^{\operatorname{ev}}(n).$
(4.4)

##  5\. Number-theoretic Stokes phenomena

According to Section 3, the third term of the decomposition (3.5) is the
difference of two Laplace transforms:

$\Theta^{-}(\tau;\nu,f,M)=\tau^{-\frac{1}{2}}\big{(}\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}-\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\big{)}\big{[}\tfrac{\hat{\phi}^{-}(\xi)}{2}\big{]}=\big{(}\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}-\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\big{)}\big{[}\tfrac{{\mathrm{d}}\hat{\psi}^{-}}{{\mathrm{d}}\xi\;\;}\big{]}\\\\[4.30554pt]
\quad\text{with}\enspace\hat{\psi}^{-}(\xi)\coloneqq\tfrac{\xi^{-1/2}}{{\Gamma}(1/2)}*\tfrac{\hat{\phi}^{-}(\xi)}{2}\in\xi^{\frac{1}{2}}\mathbb{C}\\{\xi\\}.$
(5.1)

Such a difference usually goes under the name of “Stokes phenomenon”. In the
present case, (4.4) gives rise to particularly nice formulas, which we spell
out only when $\nu=0$ or $1$ for the sake of clarity:

######  Theorem 3.

We have

$\displaystyle\Theta(\tau;0,f)$
$\displaystyle=\tfrac{1}{2}\hat{f}^{\operatorname{ev}}\\!(0)\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-1/2}-\tfrac{1}{2}f^{\operatorname{ev}}\\!(0)+\mathscr{S}^{{\frac{\pi}{2}}}_{\text{\scalebox{0.8}{{med}}}}\,\tilde{\Theta}(\tau;0,f^{\operatorname{od}})+\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}}\,\Theta(-\tau^{-1};0,\hat{f}^{\operatorname{ev}})$
(5.2) $\displaystyle\Theta(\tau;1,f)$
$\displaystyle=-\tfrac{M^{1/2}}{2\pi{\mathrm{i}}}\hat{f}^{\operatorname{ev}}\\!(0)\tau^{-1}+\mathscr{S}^{{\frac{\pi}{2}}}_{\text{\scalebox{0.8}{{med}}}}\,\tilde{\Theta}(\tau;1,f^{\operatorname{ev}})+{\mathrm{i}}\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{3}{2}}\,\Theta(-\tau^{-1};1,\hat{f}^{\operatorname{od}}).$
(5.3)

The proof consists in analysing the singularity at
$\xi_{n}=\frac{{\mathrm{i}}\pi n^{2}}{M}$ of the function $\hat{\phi}^{-}$ of
(3.2) so as to write $\Theta^{-}$ as the sum over $n\geq 1$ of one
exponentially small contribution for each singularity. From (4.4) we get

$\tfrac{1}{2}\hat{\phi}^{-}(\xi)=\tfrac{\mathrm{e}^{\frac{{\mathrm{i}}\pi}{4}}\hat{f}^{\operatorname{ev}}(n)}{2\pi{\mathrm{i}}(\xi-\xi_{n})}+\text{reg\quad
if
$\nu=0$,}\qquad\tfrac{1}{2}\hat{\phi}^{-}(\xi)=\tfrac{{\mathrm{i}}\,\mathrm{e}^{\frac{3{\mathrm{i}}\pi}{4}}n\hat{f}^{\operatorname{od}}(n)}{-2\pi{\mathrm{i}}(\xi-\xi_{n})^{2}}+\text{reg\quad
if $\nu=1$,}$ (5.4)

where “reg” denotes a function that is regular at $\xi_{n}$. The last term in
(5.2)/(5.3) thus results from

$\big{(}\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}-\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\big{)}\big{[}\tfrac{1}{2\pi{\mathrm{i}}(\xi-\xi_{n})}\big{]}=\mathrm{e}^{-\xi_{n}/\tau},\quad\big{(}\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}-\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\big{)}\big{[}\tfrac{-1}{2\pi{\mathrm{i}}(\xi-\xi_{n})^{2}}\big{]}=\tau^{-1}\mathrm{e}^{-\xi_{n}/\tau}.$
(5.5)

The other terms in (5.2)/(5.3) are just a rewriting of the first two terms of
(3.5), using $\langle f\rangle=\langle
f^{\operatorname{ev}}\rangle=\frac{1}{M^{1/2}}\hat{f}^{\operatorname{ev}}\\!(0)$
and incorporating the parity information on $\Theta^{+}$. By (2.4),
differentiation with respect to $\tau$ yields a statement for
$\Theta(\tau;\nu,f)$ with $\nu\geq 2$ as well.

We now arrive at the first instance of our motto “(quantum) modularity $=$
Stokes phenomenon $+$ DFT” (according to parity):

### Toward Modularity

The median sum term of (5.2), resp. (5.3), is absent if $f$ is even, resp.
odd. If $f$ is even, we can rewrite (5.2) as a weight $\frac{1}{2}$ modularity
relation for a full theta series as far as the modular transformation under
consideration is the negative inversion
$S\colon\thinspace\tau\mapsto-\tau^{-1}$:

$\text{$f$ even},\;\;{\theta}(\tau;f)\coloneqq
f(0)+2\Theta(\tau;0,f)\\!\enspace\Rightarrow\enspace\\!{\theta}(\tau;f)=\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}}\,{\theta}(-\tau^{-1};\hat{f}),$
(5.6)

while if $f$ is odd (whence $\hat{f}^{\operatorname{ev}}(0)=0$), we can
rewrite (5.3) as a weight $\frac{3}{2}$ modularity relation:

$\text{$f$
odd}\quad\Rightarrow\quad\Theta(\tau;1,f)={\mathrm{i}}\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{3}{2}}\,\Theta(-\tau^{-1};1,\hat{f})\quad\text{(exp.\
small as $\tau\xrightarrow{\operatorname{n.t.\,}}0$),}$ (5.7)

with a caveat: a priori we have different partial theta series on the two
sides of the relation, one associated with $f$ and the other associated with
$\hat{f}$. However, if $f$ is an eigenvector of $U_{M}$, we do end up with
modularity relations with half-integral weight. The classical Jacobi function
${\theta}_{3}$ and the Dedekind $\eta$ function fall in that category.

If $f$ is a primitive Dirichlet character modulo $M$, then $f(-1)=(-1)^{\nu}$
with $\nu=0$ or $1$, and $f$ is even ($\nu=0$) or odd ($\nu=1$). It is then
known that $\hat{f}=\hat{f}(1)\overline{f}$, and (5.6)–(5.7) are related to
the famous results by Shimura on modular forms of half-integral weight [21].

Notice that if $f$ is even or odd but not an eigenvector of $U_{M}$, we still
can write

$F\coloneqq\begin{pmatrix}f\\\ \hat{f}\end{pmatrix},\quad
U_{M}F\coloneqq\begin{pmatrix}U_{M}f\\\ U_{M}\hat{f}\end{pmatrix}=JF,\qquad
J\coloneqq\begin{pmatrix}0&1\\\
(-1)^{\nu}&0\end{pmatrix},\quad\nu\coloneqq\text{parity of~{}$f$},$ (5.8)

which allows one to construct $2$-dimensional vector-valued modular forms of
half-integral weight:

${\theta}(\tau;F)=\begin{pmatrix}{\theta}(\tau;f)\\\
{\theta}(\tau;\hat{f})\end{pmatrix},\qquad\Theta(\tau;1,F)=\begin{pmatrix}\Theta(\tau;1,f)\\\
\Theta(\tau;1,\hat{f})\end{pmatrix},$

$\text{$f$
even}\\!\enspace\Rightarrow\enspace\\!{\theta}(\tau;F)=\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}}\,J\,{\theta}(-\tau^{-1};F),\;\;\text{$f$
odd}\\!\enspace\Rightarrow\enspace\\!\Theta(\tau;1,F)={\mathrm{i}}\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{3}{2}}\,J\,\Theta(-\tau^{-1};1,F)$.

With ${\theta}_{5,1}(\tau)$ or ${\theta}_{5,2}(\tau)$, since the real
$20$-periodic functions $f_{5,j}$ satisfy $f_{5,1}+{\mathrm{i}}f_{5,2}=\chi$
with $\chi=\chi_{20}(7,\,\cdot\,)$ even primitive Dirichlet character, it is
better to use $F^{*}\coloneqq\begin{pmatrix}f_{5,1}\\\ f_{5,2}\end{pmatrix}$
instead of the previous $F$: one finds $U_{20}\,\chi=\lambda\bar{\chi}$,
$\lambda=\big{(}\frac{-3+4{\mathrm{i}}}{5}\big{)}^{1/4}=s_{2}+{\mathrm{i}}s_{1}$
with
$s_{k}\coloneqq\sqrt{\frac{5+(-1)^{k}\sqrt{5}}{10}}=\frac{2}{\sqrt{5}}\sin\frac{k\pi}{5}$,
hence $U_{20}F^{*}=SF^{*}$ with reflection matrix
$S\coloneqq\begin{pmatrix}s_{2}&s_{1}\\\ s_{1}&-s_{2}\end{pmatrix}$. Since
$f_{5,1}(0)=f_{5,2}(0)=0$, (5.6) yields

$\begin{pmatrix}{\theta}_{5,1}(\tau)\\\
{\theta}_{5,2}(\tau)\end{pmatrix}=\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}}\,S\,\begin{pmatrix}{\theta}_{5,1}(-\tau^{-1})\\\
{\theta}_{5,2}(-\tau^{-1})\end{pmatrix}.$

######  Remark 5.1.

Let $\alpha\in\mathbb{Q}^{*}$. For $f$ even, replacing $\tau$ by $\alpha+\tau$
in (5.6), we can use (3.16) and equate the leading order terms in the
asymptotic behaviour of both sides. We get

$\langle
f_{\\!\frac{\alpha}{M}}\rangle=({\mathrm{i}}\alpha)^{1/2}\langle(U_{M}f)_{\\!\frac{-1}{\alpha
M}}\rangle,$ (5.9)

which stays true even if $f$ is not even. This is an identity on quadratic
Gauss sums, since

$\langle
f_{\\!\frac{\alpha}{M}}\rangle=\frac{1}{M_{\alpha}}\,\sum_{n\;\textrm{mod}\,M_{\alpha}}f(n)\mathrm{e}^{{\mathrm{i}}\pi
n^{2}\alpha/M},\qquad\langle(U_{M}f)_{\\!\frac{-1}{\alpha
M}}\rangle=\frac{1}{M_{\frac{-1}{\alpha}}}\,\sum_{n\;\textrm{mod}\,M_{\frac{-1}{\alpha}}}(U_{M}f)(n)\mathrm{e}^{-{\mathrm{i}}\pi
n^{2}/\alpha M},$ (5.10)

which is related to the quadratic reciprocity law. In particular, we see that
the negative inversion $\alpha\mapsto-1/\alpha$ maps
$\overline{\mathscr{Q}}_{f,M}\cap\mathbb{Q}^{*}$ to
$\overline{\mathscr{Q}}_{U_{M}f,M}\cap\mathbb{Q}^{*}$.

### Toward Quantum Modularity

In (3.5), the median sum term $\Theta^{+}(\tau;\nu,f,M)$ itself has an
interesting Stokes phenomenon. In view of (5.2)–(5.3), we restrict our
attention to {$\nu=0$ and $f$ odd} or {$\nu=1$ and $f$ even}, so
$\Theta^{-}\equiv 0$, and we consider the exponentially small difference

$\displaystyle
D(\tau)\coloneqq\big{(}\mathscr{S}^{{\frac{\pi}{2}}-{\varepsilon}}-\mathscr{S}^{{\frac{\pi}{2}}+{\varepsilon}}\big{)}\,\tilde{\Theta}(\tau;\nu,f)=\tau^{-\frac{1}{2}}\big{(}\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}-\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\big{)}\hat{\varphi}^{+}$
(5.11)

with $\hat{\varphi}^{+}=\xi^{-\frac{1}{2}}\hat{\phi}^{+}(\xi)$ (cf. Section
3), so that

$\Theta^{+}=\mathscr{L}^{{\frac{\pi}{2}}}_{\text{\scalebox{0.8}{{med}}}}\mathscr{B}\,\tilde{\Theta}=\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}\mathscr{B}\,\tilde{\Theta}(\tau;\nu,f)-\frac{D(\tau)}{2}=\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}\mathscr{B}\,\tilde{\Theta}(\tau;\nu,f)+\frac{D(\tau)}{2}.$
(5.12)

A residue computation similar to the one that yielded Theorem 3 gives

$\displaystyle\hat{\varphi}^{+}(\xi)=\tfrac{2\mathrm{e}^{\frac{{\mathrm{i}}\pi}{4}}\hat{f}^{\operatorname{od}}(n)}{2\pi{\mathrm{i}}(\xi-\xi_{n})}+\text{reg\quad
if
$\nu=0$,}\qquad\hat{\varphi}^{+}(\xi)=\tfrac{2{\mathrm{i}}\,\mathrm{e}^{\frac{3{\mathrm{i}}\pi}{4}}n\hat{f}^{\operatorname{ev}}(n)}{-2\pi{\mathrm{i}}(\xi-\xi_{n})^{2}}+\text{reg\quad
if $\nu=1$,}$ (5.13) whence, again by (5.5), $\displaystyle\begin{aligned}
\text{\\{$\nu=0$ and $f$ odd\\}}&\quad\Rightarrow\quad
D(\tau)=2\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}}\,\Theta(-\tau^{-1};0,\hat{f})\\\\[4.30554pt]
\text{\\{$\nu=1$ and $f$ even\\}}&\quad\Rightarrow\quad
D(\tau)=2{\mathrm{i}}\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{3}{2}}\,\Theta(-\tau^{-1};1,\hat{f}).\end{aligned}$
(5.14)

Therefore, in view of (5.12), we can rephrase (5.2)–(5.3) as

$f$ odd
$\displaystyle\enspace\Rightarrow\enspace\Theta(\tau;0,f)\pm\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}}\,\Theta(-\tau^{-1};0,\hat{f})=\mathscr{S}^{{\frac{\pi}{2}}\mp{\varepsilon}}\,\tilde{\Theta}(\tau;0,f)$
(5.15) $f$ even
$\displaystyle\enspace\Rightarrow\enspace\Theta(\tau;1,f)\pm{\mathrm{i}}\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{3}{2}}\,\Theta(-\tau^{-1};1,\hat{f})=-\tfrac{M\langle
f\rangle}{2\pi{\mathrm{i}}}\tau^{-1}+\mathscr{S}^{{\frac{\pi}{2}}\mp{\varepsilon}}\,\tilde{\Theta}(\tau;1,f),$
(5.16)

where the right-hand sides involve the Borel-Laplace sums of
$\tilde{\Theta}(\tau;\nu,f)$ in directions close to ${\frac{\pi}{2}}$ instead
of the median sum in the direction ${\frac{\pi}{2}}$. We thus end up with

######  Theorem 4.

Suppose {$\nu=0$, $f$ odd} or {$\nu=1$, $f$ even}. If $f$ is an eigenvector of
$U_{M}$, put $F\coloneqq f$ and
$J\coloneqq\frac{\hat{f}}{f}=\pm{\mathrm{i}}^{\nu+1}$, else
$F\coloneqq\begin{pmatrix}f\\\ \hat{f}\end{pmatrix}$ and
$J\coloneqq\begin{pmatrix}0&1\\\ (-1)^{\nu+1}&0\end{pmatrix}$. Then the
“modular obstruction”

$G_{\pm}(\tau)\coloneqq\Theta(\tau;\nu,F)\pm{\mathrm{i}}^{\nu}\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}-\nu}\,J\,\Theta(-\tau^{-1};\nu,F)+\tfrac{M\langle
F\rangle}{2\pi{\mathrm{i}}\tau}$ (5.17)

can be written $\mathscr{S}^{{\theta}}\,\tilde{\Theta}(\tau;\nu,F)$ with
${\theta}={\frac{\pi}{2}}-{\varepsilon}$ for $G_{+}$ and
${\theta}={\frac{\pi}{2}}+{\varepsilon}$ for $G_{-}$, and thus extends
analytically (by varying ${\theta}$ as in (3.12)) from $\mathbb{H}$ through
the real semi-axis $\mathbb{R}_{>0}$ to the sector $-2\pi<\arg\tau<\pi$ for
$G_{+}$, and through $\mathrm{e}^{{\mathrm{i}}\pi}\mathbb{R}_{>0}$ to the
sector $0<\arg\tau<3\pi$ for $G_{-}$, with $1$-Gevrey asymptotic
$\tilde{\Theta}(\tau;\nu,F)$.

This unexpected regularity property of the modular obstruction $G_{\pm}$ was
first observed in the case of the Eichler integral $\tilde{\eta}$ by D. Zagier
and in the aforementioned case of $\Theta(\tau;0,f_{+},60)$ in [15], and gave
rise to his theory of quantum modular forms [22]. Theorem 4 is related to the
results of [10]—see Section 7.

Note the “built-in modularity”:
$G_{\pm}(\tau)=\pm\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}}\,J\,G_{\mp}(-\tau^{-1})$
if $\nu=0$, and
$G_{\pm}(\tau)=\pm{\mathrm{i}}\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{3}{2}}\,J\,G_{\mp}(-\tau^{-1})$
if $\nu=1$ and $\langle F\rangle=0$. In particular, out of the asymptotics of
$G_{\pm}(\tau)$ as $\tau\to 0$ we get asymptotic expansions for
$G_{\pm}(\tau)$ as $\tau\to\infty$ in terms of
$\tilde{\Theta}(-\tau^{-1};\nu,F)$.

A function of interest is the non-tangential limit
$\alpha\in\mathscr{Q}_{f,M}\mapsto\Theta^{\operatorname{nt}\\!}(\alpha;\nu,F,M)$,
well-defined (according to Remark 3.2) on
$\mathscr{Q}_{f,M}\coloneqq\overline{\mathscr{Q}}_{f,M}\cap\overline{\mathscr{Q}}_{U_{M}f,M}$,
which is $2M$-periodic. In particular, for $k$ integer,
$\Theta^{\operatorname{nt}\\!}(k;\nu,F,M)$ depends on $k$ mod $2M$ only and,
by taking non-tangential limits in (5.17), we get

######  Corollary 5.

If $\alpha\in\mathbb{Q}^{*}$, then
$\alpha\in\mathscr{Q}_{f,M}\Leftrightarrow-\alpha^{-1}\in\mathscr{Q}_{f,M}$.
For $\alpha=\pm\frac{1}{k}$ with $k\in\mathscr{Q}_{f,M}\cap\mathbb{Z}_{>0}$,

$f$ odd
$\displaystyle\quad\Rightarrow\quad\Theta^{\operatorname{nt}\\!}\big{(}\\!\pm\tfrac{1}{k};0,F\big{)}=-{\mathrm{i}}\,\mathrm{e}^{\mp\frac{{\mathrm{i}}\pi}{4}}\,k^{1/2}J\,\Theta^{\operatorname{nt}\\!}(\mp
k;0,F)+G_{\pm}\big{(}\\!\pm\tfrac{1}{k}\big{)},$ (5.18) $f$ even
$\displaystyle\quad\Rightarrow\quad\Theta^{\operatorname{nt}\\!}\big{(}\\!\pm\tfrac{1}{k};1,F\big{)}=\mathrm{e}^{\pm\frac{{\mathrm{i}}\pi}{4}}\,k^{3/2}\,J\,\Theta^{\operatorname{nt}\\!}(\mp
k;1,F)\mp\tfrac{M\langle
F\rangle}{2\pi{\mathrm{i}}}\,k+G_{\pm}\big{(}\\!\pm\tfrac{1}{k}\big{)},$
(5.19)

with $\displaystyle
G_{\pm}\big{(}\\!\pm\tfrac{1}{k}\big{)}\sim_{1}\tilde{\Theta}\big{(}\\!\pm\tfrac{1}{k};\nu,F\big{)}=\sum_{p\geq
0}(\mp
1)^{p}\frac{L(-2p-\nu,F)}{p!}\Big{(}\frac{\pi{\mathrm{i}}}{M}\Big{)}^{\\!p}\frac{1}{k^{p}}$
as $k\to+\infty$.

So, the divergent resurgent series $\tilde{\Theta}$ reappears in the
asymptotics of
$\Theta^{\operatorname{nt}\\!}\big{(}\\!\pm\tfrac{1}{k};\nu,F\big{)}$. Note
that in general the dominant terms in (5.18)–(5.19) are the first terms of the
right-hand sides, which are of the form
$k^{\frac{1}{2}+\nu}\times\text{\\{$2M$-periodic function of~{}$k$\\}}$. There
are similar formulas for
$\Theta^{\operatorname{nt}\\!}(\alpha\pm\frac{1}{k};\nu,F)$. See Section 7 for
more on the sets $\mathscr{Q}_{f,M}$.

Being primitive and real, the Dirichlet character
$f(n)=\left(\frac{12}{n}\right)=\chi_{12}(11,n)$ is an eigenvector of
$U_{12}$; the eigenvalue is $1$, we thus recover weight $\frac{1}{2}$
modularity for the Dedekind $\eta$-function ($\nu=0$) and quantum modularity
for its Eichler integral $\tilde{\eta}$ ($\nu=1$); in the latter case, our
results shed a new light on the resurgence properties already investigated in
[3]. For the Chern-Simons partition function of the Poincaré homology sphere
$\Theta(\tau;0,f_{+},60)$, recalling that $f_{+}=\mathop{\Re
e}\nolimits\big{(}\chi_{60}(23,\,\cdot\,)\big{)}$ and introducing
$f_{-}=\mathop{\Im m}\nolimits\big{(}\chi_{60}(23,\,\cdot\,)\big{)}$, we get

$F^{*}\coloneqq\begin{pmatrix}f_{+}\\\ f_{-}\end{pmatrix}\quad\Rightarrow\quad
U_{60}F^{*}=SF^{*},\quad S\coloneqq-{\mathrm{i}}\begin{pmatrix}s_{1}&s_{2}\\\
s_{2}&-s_{1}\end{pmatrix}$ (5.20)

with $s_{1},s_{2}$ as before (because $\Phi\coloneqq f_{+}+{\mathrm{i}}f_{-}$
is an odd primitive Dirichlet character and one finds
$U_{60}\Phi=(s_{2}-{\mathrm{i}}s_{1})\bar{\Phi}$), whence a $2$D quantum
modular form $\Theta(\tau;0,F^{*},60)$.

##  6\. Alien Derivatives and “Bridge Equation”

In this work, the two resurgent series
$\tilde{\Theta}(\tau)=\hat{\psi}^{+}(0)+\mathscr{B}^{-1}\big{[}\tfrac{{\mathrm{d}}\hat{\psi}^{+}}{{\mathrm{d}}\xi\;\;}\big{]}\in\mathbb{C}[[\tau]]$
and
$\tau^{-1}\tilde{\psi}^{-}=\mathscr{B}^{-1}\big{[}\tfrac{{\mathrm{d}}\hat{\psi}^{-}}{{\mathrm{d}}\xi\;\;}\big{]}\in\tau^{\frac{1}{2}}\mathbb{C}[[\tau]]$
have appeared in the decomposition (3.5) of $\Theta(\tau;\nu,f,M)$:

$\Theta^{+}=\mathscr{S}^{{\frac{\pi}{2}}}_{\text{\scalebox{0.8}{{med}}}}\,\tilde{\Theta}=\hat{\psi}^{+}(0)+\mathscr{L}^{{\frac{\pi}{2}}}_{\text{\scalebox{0.8}{{med}}}}\big{[}\tfrac{{\mathrm{d}}\hat{\psi}^{+}}{{\mathrm{d}}\xi\;\;}\big{]},\qquad\Theta^{-}=\big{(}\mathscr{L}^{{\frac{\pi}{2}}+{\varepsilon}}-\mathscr{L}^{{\frac{\pi}{2}}-{\varepsilon}}\big{)}\big{[}\tfrac{{\mathrm{d}}\hat{\psi}^{-}}{{\mathrm{d}}\xi\;\;}\big{]}$

(cf. Theorem 2, (3.14) and (5.1)). This has led to two interesting Stokes
phenomena, via singularity computations in the Borel plane.

Écalle’s Resurgence Theory provides us with an efficient tool to handle such
singularity computations: with each point $\omega$ of the Riemann surface of
the logarithm is associated the so-called “alien derivation”
$\Delta_{\omega}$. This is an operator which maps a resurgent series
$\tilde{\varphi}$ to a resurgent series whose Borel transform somehow measures
the singularities of certain branches of the analytic continuation of
$\mathscr{B}\tilde{\varphi}$ at $\omega$; in particular,
$\Delta_{\omega}\tilde{\varphi}=0$ if all branches of
$\mathscr{B}\tilde{\varphi}$ are regular at $\omega$, which is the case if
$\tilde{\varphi}$ is a convergent power series. The reader is referred to [6,
7, 18] for more details. In the case of meromorphic singularities, the recipe
is motivated by (5.5) and can be illustrated with $\xi_{n}=\frac{\pi
n^{2}}{M}\mathrm{e}^{\frac{{\mathrm{i}}\pi}{2}}$ for $n\geq 1$: the formulas

$\displaystyle\nu=0\qquad$ $\displaystyle\Rightarrow$
$\displaystyle\Delta_{\xi_{n}}\tilde{\varphi}^{+}$
$\displaystyle=2\,\mathrm{e}^{\frac{{\mathrm{i}}\pi}{4}}\hat{f}^{\operatorname{od}}(n)$
$\displaystyle\Delta_{\xi_{n}}\tilde{\phi}^{-}$
$\displaystyle=2\,\mathrm{e}^{\frac{{\mathrm{i}}\pi}{4}}\hat{f}^{\operatorname{ev}}(n)$
(6.1) $\displaystyle\nu=1\qquad$ $\displaystyle\Rightarrow$
$\displaystyle\Delta_{\xi_{n}}\tilde{\varphi}^{+}$
$\displaystyle=2{\mathrm{i}}\,\mathrm{e}^{\frac{3{\mathrm{i}}\pi}{4}}n\hat{f}^{\operatorname{ev}}(n)\tau^{-1}$
$\displaystyle\Delta_{\xi_{n}}\tilde{\phi}^{-}$
$\displaystyle=2{\mathrm{i}}\,\mathrm{e}^{\frac{3{\mathrm{i}}\pi}{4}}n\hat{f}^{\operatorname{od}}(n)\tau^{-1}$
(6.2)

must be understood as a mere rephrasing of (5.13) and (5.4). For the two
resurgent series of our problem, since
$\tilde{\Theta}=\tau^{-1}\tilde{\psi}^{+}=\tau^{-\frac{1}{2}}\tilde{\varphi}^{+}$
and $\tau^{-1}\tilde{\psi}^{-}=\tau^{-\frac{1}{2}}\tilde{\phi}^{-}/2$, the
operator $\Delta_{\xi_{n}}$ being a _derivation_ annihilating
$\tau^{-\frac{1}{2}}$, we thus get

$\displaystyle\nu=0\qquad$ $\displaystyle\Rightarrow$
$\displaystyle\Delta_{\xi_{n}}\tilde{\Theta}$
$\displaystyle=2\,\mathrm{e}^{\frac{{\mathrm{i}}\pi}{4}}\hat{f}^{\operatorname{od}}(n)\tau^{-\frac{1}{2}}$
$\displaystyle\Delta_{\xi_{n}}(\tau^{-1}\tilde{\psi}^{-})$
$\displaystyle=\mathrm{e}^{\frac{{\mathrm{i}}\pi}{4}}\hat{f}^{\operatorname{ev}}(n)\tau^{-\frac{1}{2}}$
(6.3) $\displaystyle\nu=1\qquad$ $\displaystyle\Rightarrow$
$\displaystyle\Delta_{\xi_{n}}\tilde{\Theta}$
$\displaystyle=2{\mathrm{i}}\,\mathrm{e}^{\frac{3{\mathrm{i}}\pi}{4}}n\hat{f}^{\operatorname{ev}}(n)\tau^{-\frac{3}{2}}$
$\displaystyle\Delta_{\xi_{n}}(\tau^{-1}\tilde{\psi}^{-})$
$\displaystyle={\mathrm{i}}\,\mathrm{e}^{\frac{3{\mathrm{i}}\pi}{4}}n\hat{f}^{\operatorname{od}}(n)\tau^{-\frac{3}{2}}$
(6.4)

which means that their Borel transforms have singularities proportional to
$(\xi-\xi_{n})^{-\frac{3}{2}}$ if $\nu=0$ and $(\xi-\xi_{n})^{-\frac{5}{2}}$
if $\nu=1$.

The Stokes phenomena that we have observed just reflect the action of the
_directional alien derivation_

${\Delta\raisebox{1.20554pt}{$\scriptscriptstyle/$}\hskip
2.5pt_{{\frac{\pi}{2}}}}=\sum\limits_{\arg\omega={\frac{\pi}{2}}}\mathrm{e}^{-\omega/\tau}\Delta_{\omega}.$
(6.5)

Indeed, for $\nu=0$:

$\displaystyle{\Delta\raisebox{1.20554pt}{$\scriptscriptstyle/$}\hskip
2.5pt_{{\frac{\pi}{2}}}}\tilde{\Theta}(\tau;0,f)$
$\displaystyle=2\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}}\,\Theta(-\tau^{-1};0,U_{M}f^{\operatorname{od}}),$
$\displaystyle{\Delta\raisebox{1.20554pt}{$\scriptscriptstyle/$}\hskip
2.5pt_{{\frac{\pi}{2}}}}(\tau^{-1}\tilde{\psi}^{-})$
$\displaystyle=\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{1}{2}}\,\Theta(-\tau^{-1};0,U_{M}f^{\operatorname{ev}}),$
and for $\nu=1$:
$\displaystyle{\Delta\raisebox{1.20554pt}{$\scriptscriptstyle/$}\hskip
2.5pt_{{\frac{\pi}{2}}}}\tilde{\Theta}(\tau;1,f)$
$\displaystyle=2{\mathrm{i}}\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{3}{2}}\,\Theta(-\tau^{-1};1,U_{M}f^{\operatorname{ev}}),$
$\displaystyle{\Delta\raisebox{1.20554pt}{$\scriptscriptstyle/$}\hskip
2.5pt_{{\frac{\pi}{2}}}}(\tau^{-1}\tilde{\psi}^{-})$
$\displaystyle={\mathrm{i}}\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}\\!^{-\frac{3}{2}}\,\Theta(-\tau^{-1};1,U_{M}f^{\operatorname{od}}).$

In the context of dynamical systems, J. Écalle has observed that the action of
the alien derivations on divergent series of natural origin often coincide
with the action of a classical operator, typically a differential operator,
giving rise to a “bridge” between alien calculus and classical diffential
calculus. Here, the equations just obtained can be called _Bridge Equations_
for the problem at hand inasmuch as they show that the action of the
directional alien derivation on our two resurgent series amount to the action
of the DFT operator $U_{M}$ on the even or odd parts of $f$, together with the
modular transformation $S\colon\thinspace\tau\mapsto-\tau^{-1}$.

######  Remark 6.1.

Écalle’s _Alien Calculus_ gives a formula for the commutator of an alien
derivation $\Delta_{\omega}$ and the natural derivation
$\tfrac{{\mathrm{d}}\,}{{\mathrm{d}}\tau}$, which amounts to the fact that
each homogeneous component $\mathrm{e}^{-\omega/\tau}\Delta_{\omega}$ in (6.5)
commutes with the natural derivation
$\tfrac{{\mathrm{d}}\,}{{\mathrm{d}}\tau}$, namely

$\Delta_{\omega}\tfrac{{\mathrm{d}}\,}{{\mathrm{d}}\tau}=\big{(}\tfrac{{\mathrm{d}}\,}{{\mathrm{d}}\tau}+\omega\tau^{-2}\big{)}\Delta_{\omega}.$
(6.6)

We can thus differentiate (6.3)–(6.4) with respect to $\tau$ and, together
with (2.4), this implies

$\displaystyle\nu=2\;$ $\displaystyle\Rightarrow$
$\displaystyle\Delta_{\xi_{n}}\tilde{\Theta}(\tau;2,f,M)$
$\displaystyle=-2\,n^{2}\hat{f}^{\operatorname{od}}(n)\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}^{-\frac{5}{2}}+\tfrac{M}{\pi}\hat{f}^{\operatorname{od}}(n)\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}^{-\frac{3}{2}},$
$\displaystyle\nu=3\;$ $\displaystyle\Rightarrow$
$\displaystyle\Delta_{\xi_{n}}\tilde{\Theta}(\tau;3,f,M)$
$\displaystyle=-2{\mathrm{i}}\,n^{3}\hat{f}^{\operatorname{ev}}(n)\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}^{-\frac{7}{2}}+3{\mathrm{i}}\tfrac{M}{\pi}\,n\hat{f}^{\operatorname{ev}}(n)\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}^{-\frac{5}{2}},$
$\displaystyle\nu=4\;$ $\displaystyle\Rightarrow$
$\displaystyle\Delta_{\xi_{n}}\tilde{\Theta}(\tau;4,f,M)$
$\displaystyle=2\,n^{4}\hat{f}^{\operatorname{od}}(n)\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}^{-\frac{9}{2}}-6\tfrac{M}{\pi}\,n^{2}\hat{f}^{\operatorname{od}}(n)\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}^{-\frac{7}{2}}+3\big{(}\tfrac{M}{\pi})^{2}\hat{f}^{\operatorname{od}}(n)\big{(}\tfrac{\tau}{{\mathrm{i}}}\big{)}^{-\frac{5}{2}},$

etc.

######  Remark 6.2.

The growth as $p\to\infty$ of
$[\tau^{p}]\tilde{\Theta}=\frac{1}{p!}L(-2p-\nu,f)\big{(}\frac{\pi{\mathrm{i}}}{M}\big{)}^{p}=\frac{{\mathrm{d}}^{p}\hat{\psi}^{+}}{{\mathrm{d}}\xi^{p}\;}\\!(0)$
is governed by the nearest-to-origin singularity of
$\hat{\psi}^{+}=\mathscr{B}(\tau\tilde{\Theta})\in\mathbb{C}\\{\xi\\}$; taking
$n^{*}\geq 1$ minimum such that $\hat{f}^{\operatorname{od}}(n^{*})$ or
$\hat{f}^{\operatorname{ev}}(n^{*})\neq 0$, we thus have, by virtue of
(6.3)–(6.4),
$\Delta_{\xi_{n^{*}}}(\tau\tilde{\Theta})=S_{\nu}\tau^{\frac{1}{2}-\nu}$ with
$S_{0}=2\,\mathrm{e}^{\frac{{\mathrm{i}}\pi}{4}}\hat{f}^{\operatorname{od}}(n^{*})$,
$S_{1}=2{\mathrm{i}}\,\mathrm{e}^{\frac{3{\mathrm{i}}\pi}{4}}n^{*}\hat{f}^{\operatorname{ev}}(n^{*})$,
which means

$\hat{\psi}^{+}(\xi)=\tfrac{S_{0}}{2{\Gamma}(\frac{1}{2})}(\xi-\xi_{n^{*}})^{-\frac{1}{2}}+\hat{R}_{0}(\xi)\quad\text{or}\enspace-\tfrac{S_{1}}{4{\Gamma}(\frac{1}{2})}(\xi-\xi_{n^{*}})^{-\frac{3}{2}}+\hat{R}_{1}(\xi)$
(6.7)

with $\hat{R}_{\nu}(\xi)\in\mathbb{C}\\{\xi\\}$ convergent in a disc of radius
larger than $\lvert\xi_{n^{*}}\rvert$. The coefficients of the Taylor
expansion of $(\xi-\xi_{n^{*}})^{-\frac{1}{2}-\nu}$ thus give an asymptotic
equivalent of $[\tau^{p}]\tilde{\Theta}$ up to exponential precision.

Another commonly used variable is $q=\mathrm{e}^{2\pi{\mathrm{i}}\tau}$, and
the resulting asymptotic expansions in powers of $q-1$ as $q\to 1$ (non-
tangentially from within the unit disc) can be handled as follows: put
$Q=\frac{q-1}{2\pi{\mathrm{i}}}=g(\tau)$, so $\tau=g^{-1}(Q)\in
Q+Q^{2}\mathbb{C}\\{Q\\}$, then the new asymptotic expansion is
$\tilde{\Theta}^{*}=\tilde{\Theta}\circ g^{-1}$, hence it must be resurgent
too and the _alien chain rule_ gives
$\Delta_{\xi_{n}}\tilde{\Theta}^{*}(Q)=\big{(}\mathrm{e}^{-\xi_{n}\big{(}\frac{1}{\tau}-\frac{1}{Q}\big{)}}\Delta_{\xi_{n}}\tilde{\Theta}(\tau)\big{)}_{\mid\tau=g^{-1}(Q)}$,
thus providing access to the asymptotics of $[Q^{p}]\tilde{\Theta}^{*}$ as
$p\to\infty$. Applying this with the quadratic character
$f(n)=\left(\frac{12}{n}\right)$, one recovers the asymptotic of Glaisher’s
T-numbers, as well as that of Stoimenow’s numbers, which count regular
linearized chord diagrams of degree $p$ [24].

##  7\. Action of the modular group and (quantum) modularity

The standard action of a general modular transformation
$\gamma=\begin{pmatrix}a&b\\\
c&d\end{pmatrix}\in\operatorname{SL}(2,\mathbb{Z})$ on $\mathbb{H}$,
$\gamma(\tau)=\frac{a\tau+b}{c\tau+d}$, induces an action on our partial theta
series.

### Parabolic Case

The case $\gamma=\begin{pmatrix}1&b\\\ 0&1\end{pmatrix}$ is straightforward;
actually, it is a particular case of (2.3):

$\Theta(\tau+b;\nu,f,M)=\Theta\big{(}\tfrac{M^{\prime}}{M}\tau;\nu,f_{\\!\frac{b}{M}},M^{\prime}\big{)}\quad\text{where}\enspace
f_{\\!\frac{b}{M}}\coloneqq\Lambda_{M}^{b}f,\quad\Lambda_{M}(n)\coloneqq\mathrm{e}^{{\mathrm{i}}\pi
n^{2}/M}$ (7.1)

and $M^{\prime}$ is a period of $f_{\\!\frac{b}{M}}$. We note that
$\Lambda_{M}(n+M)=(-1)^{M}\Lambda_{M}(n)$, hence

$\text{$M$ or $b$
even}\quad\Rightarrow\quad\Theta(\tau+b;\nu,f,M)=\Theta\big{(}\tau;\nu,f_{\\!\frac{b}{M}},M\big{)}$
(7.2)

(because one can then take $M^{\prime}=M$). Notice that if the support of $f$
is such that

$\text{$\exists n_{0}\in\mathbb{Z}$ such that, $\forall
n\in\mathbb{Z}$,}\enspace f(n)\neq
0\;\Rightarrow\;n^{2}=n_{0}^{2}\;\;\textrm{mod}\,2M,$ (7.3)

then $f_{\\!\frac{1}{M}}=\Lambda_{M}(n_{0})f$ and
$f_{\\!\frac{b}{M}}=\Lambda_{M}^{b}(n_{0})f$. Notice also that, since
$\Lambda_{M}^{2M}=1$, in all cases

$b=0\;\;\textrm{mod}\,2M\quad\Rightarrow\quad f_{\\!\frac{b}{M}}=f$ (7.4)

(indeed: $\Theta(\tau;\nu,f,M)$ is $2M$-periodic in $\tau$).

### Non-Parabolic Case

If $\gamma=\begin{pmatrix}a&b\\\ c&d\end{pmatrix}$ with $c\neq 0$, then one
can assume $c>0$ without loss of generality (replacing $\gamma$ with $-\gamma$
if necessary). Using what is known from Section 5 on the action of
$S=\begin{pmatrix}0&-1\\\ 1&0\end{pmatrix}$ and writing

$\gamma(\tau)=c^{-1}\big{(}a+S(c\tau+d)\big{)},$ (7.5)

one can compute $\Theta\big{(}\gamma(\tau);\nu,f,M\big{)}$. Here is what one
finds, assuming for the sake of simplicity

$M$ even, $\nu\in\\{0,1\\}$, $f$ even or odd (7.6)

till the end of this section (otherwise some adjustments are required):

######  Theorem 6.

Assume (7.6) and $\gamma=\begin{pmatrix}a&b\\\
c&d\end{pmatrix}\in\operatorname{SL}(2,\mathbb{Z})$ with $c>0$. Then the
formula

$h(n)\coloneqq(cM)^{-1/2}\Lambda_{M}^{bd}(n)\sum_{r\;\textrm{mod}\,M}f(r+dn)g(r)\mathrm{e}^{2\pi{\mathrm{i}}bnr/M},\quad
g(r)\coloneqq\sum_{\begin{subarray}{c}\ell\;\textrm{mod}\,cM\\\
\text{s.t.}\;\ell=r\;\textrm{mod}\,M\end{subarray}}\Lambda_{cM}^{a}(\ell)$
(7.7)

defines an $M$-periodic function $h$ of the same parity as $f$ and, using the
notation ${\theta}(\cdot\,;\,\cdot)$ introduced in (5.6),

$f$ even
$\displaystyle\quad\Rightarrow\quad\qquad\enspace{\theta}\big{(}\gamma(\tau);f)=\big{(}\tfrac{c\tau+d}{{\mathrm{i}}}\big{)}^{\frac{1}{2}}{\theta}(\tau;h)$
(7.8) $f$ odd
$\displaystyle\quad\Rightarrow\quad\Theta\big{(}\gamma(\tau);1,f,M)={\mathrm{i}}\big{(}\tfrac{c\tau+d}{{\mathrm{i}}}\big{)}^{\frac{3}{2}}\Theta(\tau;1,h,M)$
(7.9) $f$ even
$\displaystyle\quad\Rightarrow\quad\Theta(\tau;1,h,M)\pm{\mathrm{i}}\big{(}\tfrac{c\tau+d}{{\mathrm{i}}}\big{)}^{-\frac{3}{2}}\Theta\big{(}\gamma(\tau);1,f,M\big{)}$
$\displaystyle\qquad\qquad\qquad\qquad\qquad\quad\;=\tfrac{(cM)^{1/2}}{2\pi}f(0)\tfrac{{\mathrm{i}}}{c\tau+d}+\mathscr{S}^{{\frac{\pi}{2}}\mp{\varepsilon}}\,\tilde{\Theta}(c\tau+d;1,\Lambda_{cM}^{-d}h,cM)$
(7.10) $f$ odd
$\displaystyle\quad\Rightarrow\quad\Theta(\tau;0,h,M)\mp\big{(}\tfrac{c\tau+d}{{\mathrm{i}}}\big{)}^{-\frac{1}{2}}\Theta\big{(}\gamma(\tau);0,f,M\big{)}$
$\displaystyle\qquad\qquad\qquad\qquad\qquad\qquad\qquad=\mathscr{S}^{{\frac{\pi}{2}}\mp{\varepsilon}}\,\tilde{\Theta}(c\tau+d;0,\Lambda_{cM}^{-d}h,cM).$
(7.11)

Notice that, in (7.10) and (7.11), the right-hand side has analytic
continuation through the real axis to the right or to the left of
$\gamma^{-1}({\mathrm{i}}\infty)=-d/c$ (according to the $\pm$ sign) by the
standard properties of Borel-Laplace summation.

Imposing to $\gamma$ to belong to a certain congruence subgroup and making use
of classical properties of quadratic Gauss sums, one obtains a relation
between $h$ and $f$ simple enough to allow us to interpret the left-hand side
of (7.10) and (7.11) as a genuine modularity obstruction, with appropriate
automorphy factor. We thus get classical modularity from (7.8)–(7.9) or
quantum modularity from (7.10)–(7.11) according to the parity of $\nu$ and
$f$.

Specifically, if we assume
$\gamma\in{\Gamma}_{0}(2M)\coloneqq\\{\,c=0\;\textrm{mod}\,2M\,\\}$, then
$g(r)=0$ in (7.7) unless $r=0\;\textrm{mod}\,M$ and

$g(0)=(cM)^{1/2}\mathrm{e}^{{\mathrm{i}}\pi/4}{\varepsilon}_{d}^{-1}\big{(}\tfrac{2Mc}{\lvert
d\rvert}\big{)}\quad\text{with}\quad{\varepsilon}_{d}\coloneqq\begin{cases}1&\text{if
$d=1\;\textrm{mod}\,4$}\\\ {\mathrm{i}}&\text{if
$d=3\;\textrm{mod}\,4$}\end{cases}$ (7.12)

and $\big{(}\tfrac{m}{\lvert d\rvert}\big{)}\coloneqq$ Jacobi symbol (notice
that $d$ is necessarily odd since $ad=1\;\textrm{mod}\,2M$), whence

$\gamma\in{\Gamma}_{0}(2M)\quad\Rightarrow\quad
h(n)=\mathrm{e}^{{\mathrm{i}}\pi/4}\,{\varepsilon}_{d}^{-1}\,\big{(}\tfrac{2Mc}{\lvert
d\rvert}\big{)}\Lambda_{M}^{bd}(n)f(dn).$

Since here we assume $M$ even, it follows that

$\gamma\in{\Gamma}(2M)\quad\Rightarrow\quad
h=\mathrm{e}^{{\mathrm{i}}\pi/4}\,\big{(}\tfrac{2Mc}{\lvert d\rvert}\big{)}f,$
(7.13)

where
${\Gamma}(2M)\coloneqq\\{\,a=d=1\;\textrm{mod}\,2M\;\text{and}\;b=c=0\;\textrm{mod}\,2M\,\\}$.

If we use the larger subgroup
${\Gamma}_{1}(2M)\coloneqq\\{\,a=d=1\;\textrm{mod}\,2M\;\text{and}\;c=0\;\textrm{mod}\,2M\,\\}$
instead of ${\Gamma}(2M)$, then we still have a relation similar to one of the
results of [10] under the support assumption (7.3):

$\gamma\in{\Gamma}_{1}(2M)\;\text{and Assumption~{}\eqref{assumptsupp}
holds}\quad\Rightarrow\quad
h=\Lambda_{M}^{b}(n_{0})\,\mathrm{e}^{{\mathrm{i}}\pi/4}\,\big{(}\tfrac{2Mc}{\lvert
d\rvert}\big{)}f.$ (7.14)

Another option available when $f$ is a Dirichlet character modulo $M$ is to
use
${\Gamma}_{0}^{0}(2M)\coloneqq\\{\,b=0\;\textrm{mod}\,2M\;\text{and}\;c=0\;\textrm{mod}\,2M\,\\}$:

$\gamma\in{\Gamma}_{0}^{0}(2M)\;\text{and $f$ Dirichlet character
$\\!\;\textrm{mod}\,M$}\quad\Rightarrow\quad
h=\mathrm{e}^{{\mathrm{i}}\pi/4}\,{\varepsilon}_{d}^{-1}\,\big{(}\tfrac{2Mc}{\lvert
d\rvert}\big{)}f(d)f.$ (7.15)

_The relations ( 7.8)–(7.11) thus give rise to explicit transformation
formulas for the function $\Theta(\,\cdot\,;\nu,f,M)$ under the action of the
congruence subgroup ${\Gamma}$ defined by_

${\Gamma}\coloneqq{\Gamma}(2M)\enspace\textit{or, if
Assumption~{}\eqref{assumptsupp}
holds,}\;{\Gamma}\coloneqq{\Gamma}_{1}(2M)\\\\[4.30554pt] \textit{or, if $f$
is a Dirichlet character
$\\!\;\textrm{mod}\,M$,}\;{\Gamma}\coloneqq{\Gamma}_{0}^{0}(2M).$ (7.16)

### The Boundary Function $\Theta^{\operatorname{nt}\\!}$

Let us give more details on the cases

{$\nu=0$ and $f$ odd} or {$\nu=1$ and $f$ even} (7.17)

(still with $M$ even). Recall that the boundary function
$\Theta^{\operatorname{nt}\\!}(\alpha)=\Theta^{\operatorname{nt}\\!}(\alpha;\nu,f,M)$
is defined for
$\alpha\in\overline{\mathscr{Q}}_{f,M}\cup\\{{\mathrm{i}}\infty\\}$.

If $\gamma=\begin{pmatrix}1&b\\\ 0&1\end{pmatrix}\in{\Gamma}$ is parabolic, we
have
$\Theta\big{(}\gamma(\tau);\nu,f,M\big{)}=\lambda(\gamma)\Theta(\tau;\nu,f,M)$
with $\lambda(\gamma)\coloneqq 1$ or
$\lambda(\gamma)\coloneqq\Lambda_{M}^{b}(n_{0})$ according as which option
holds in (7.16); in particular, $\overline{\mathscr{Q}}_{f,M}$ is stable under
$\gamma$.

If $\gamma=\begin{pmatrix}a&b\\\ c&d\end{pmatrix}\in{\Gamma}$ is non-
parabolic, then we assume $c>0$ and (7.13)–(7.15) say that the function $h$ of
(7.7) is $h=\lambda(\gamma)f$ with
$\lambda(\gamma)\coloneqq\mathrm{e}^{{\mathrm{i}}\pi/4}\,\big{(}\tfrac{2Mc}{\lvert
d\rvert}\big{)}$ or
$\lambda(\gamma)\coloneqq\Lambda_{M}^{b}(n_{0})\,\mathrm{e}^{{\mathrm{i}}\pi/4}\,\big{(}\tfrac{2Mc}{\lvert
d\rvert}\big{)}$ or
$\lambda(\gamma)\coloneqq\mathrm{e}^{{\mathrm{i}}\pi/4}\,{\varepsilon}_{d}^{-1}\,\big{(}\tfrac{2Mc}{\lvert
d\rvert}\big{)}f(d)$. The relations (7.10)–(7.11) thus yield

$\Theta(\tau;\nu,f,M)\mp\tfrac{1}{{\mathrm{i}}\lambda(\gamma)}\big{(}\tfrac{c\tau+d}{{\mathrm{i}}}\big{)}^{-\nu-\frac{1}{2}}\Theta\big{(}\gamma(\tau);\nu,f,M\big{)}\\\\[2.15277pt]
=\tfrac{(cM)^{1/2}}{2\pi\lambda(\gamma)}f(0)\tfrac{{\mathrm{i}}}{c\tau+d}+\mathscr{S}^{{\frac{\pi}{2}}\mp{\varepsilon}}\,\tilde{\Theta}(c\tau+d;\nu,\Lambda_{cM}^{-d}f,cM).$
(7.18)

Assuming $f(0)=0$ and taking the limit as $\tau$ tends non-tangentially to
$\gamma^{-1}({\mathrm{i}}\infty)$ (in which case the second term tends to $0$
exponentially fast), or to a rational $\alpha>\gamma^{-1}({\mathrm{i}}\infty)$
(in which case we use ‘$-$’), or to a rational
$\alpha<\gamma^{-1}({\mathrm{i}}\infty)$ (in which case we use ‘$+$’), we get

######  Theorem 7.

Suppose $M$ is even and $f(0)=0$. If $f$ is even then the domain of definition
$\overline{\mathscr{Q}}_{f,M}\cup\\{{\mathrm{i}}\infty\\}$ of
$\Theta^{\operatorname{nt}\\!}$ is stable under ${\Gamma}$: it is a union of
cusps, which contains at least the cusp at infinity, and also the cusp at $0$
if $\langle f\rangle=0$. If $f$ is odd then
$\overline{\mathscr{Q}}_{f,M}=\mathbb{Q}$. In all cases, the function
$\Theta^{\operatorname{nt}\\!}\colon\thinspace\overline{\mathscr{Q}}_{f,M}\cup\\{{\mathrm{i}}\infty\\}\to\mathbb{C}$
is a quantum modular form with respect to ${\Gamma}$, of weight $\frac{1}{2}$
if {$\nu=0$ and $f$ is odd}, of weight $\frac{3}{2}$ if {$\nu=1$ and $f$ is
even}.

Notice that, as a consequence, $\overline{\mathscr{Q}}_{f,M}$ is dense in
$\mathbb{Q}$ if $f(0)=0$. Indeed, each cusp of ${\Gamma}$ is dense in
$\mathbb{Q}$ because ${\Gamma}$ contains ${\Gamma}(2M)$, which is a normal
subgroup of finite index of $\operatorname{SL}(2,\mathbb{Z})$.

######  Remark 7.1.

The number $\Theta^{\operatorname{nt}\\!}(\alpha)$ is just the limit value of
$\Theta(\tau;\nu,f,M)$ as $\tau\xrightarrow{\operatorname{n.t.\,}}\alpha$, but
we can also consider the whole asymptotic expansion of (7.18) as
$\tau\xrightarrow{\operatorname{n.t.\,}}\alpha$: the formal series
$\big{(}\tilde{\Theta}_{\alpha}\big{)}_{\alpha\in\overline{\mathscr{Q}}_{f,M}}$
introduced in Remark 3.2 make up what is called a _strong quantum modular
form_ in [22].

The case when Assumption (7.3) holds has already been considered (with $M$
even or odd) in [10], and we get the same congruence subgroup as them in that
case. A notable example where this assumption is fulfilled is, following [11]
or [1], the partial theta series giving the Gukov-Pei-Putrov-Vafa invariant
for an oriented Seifert fibered integral homology sphere with $3$ exceptional
fibers (a Brieskorn $3$-sphere).

######  Remark 7.2.

For arbitrary $\nu\geq 2$, since Borel-Laplace (median) summation commutes
with $\tfrac{{\mathrm{d}}\,}{{\mathrm{d}}\tau}$, we can use (2.4) and derive
transformation formulas for $\Theta(\tau;\nu,f,M)$, not as simple as when
$\nu=0$ or $1$, but rather pertaining to the theory of _higher depth quantum
modular forms_ [2].

######  Remark 7.3.

Examples with $f$ even and $\overline{\mathscr{Q}}_{f,M}=\mathbb{Q}$. Suppose
that $\nu=1$ and $f$ is even. If Assumption (7.3) holds for $f$, then we get
$f_{\frac{\alpha+1}{M}}=\Lambda_{M}(n_{0})f_{\frac{\alpha}{M}}$ for every
$\alpha\in\mathbb{Q}$, hence

$\text{Assumption~{}\eqref{assumptsupp}
holds}\quad\Rightarrow\quad\text{$\overline{\mathscr{Q}}_{f,M}$ is invariant
under $T\colon\thinspace\tau\mapsto\tau+1$.}$ (7.19)

Using (5.16), we also have

$\text{$f$ eigenvector of~{}$U_{M}$ and $\langle
f\rangle=0$}\quad\Rightarrow\quad\text{$\overline{\mathscr{Q}}_{f,M}\cup\\{{\mathrm{i}}\infty\\}$
is invariant under $S\colon\thinspace\tau\mapsto-1/\tau$.}$ (7.20)

Since $\langle S,T\rangle=\operatorname{SL}(2,\mathbb{Z})$ acts transitively
on $\mathbb{Q}\cup\\{{\mathrm{i}}\infty\\}$, we deduce that
_$\overline{\mathscr{Q}}_{f,M}=\mathbb{Q}$ whenever $f$ is a zero mean value
even eigenvector of $U_{M}$ such that (7.3) holds_. This is what happens with
the Eichler integral
$\tilde{\eta}(\tau)=\Theta\big{(}\tau;1,\chi_{12}(11,\,\cdot\,),12\big{)}$ of
the Dedekind $\eta$ function.

There are cases where $f$ is not an eigenvector of $U_{M}$, but $U_{M}f$ is a
linear combination of $f$ and $\tilde{f}$ with $f$ satisfying (7.3) with a
certain $n_{0}$ and $\tilde{f}$ satisfying (7.3) with a certain
$\tilde{n}_{0}$, so that
$\overline{\mathscr{Q}}_{f,M}\cap\overline{\mathscr{Q}}_{U_{M}f,M}$ is
invariant under $T$ by (7.19). If moreover $\langle f\rangle=f(0)=0$, then
(5.16) shows that
$\big{(}\overline{\mathscr{Q}}_{f,M}\cup\\{{\mathrm{i}}\infty\\}\big{)}\cap\big{(}\overline{\mathscr{Q}}_{U_{M}f,M}\cup\\{{\mathrm{i}}\infty\\}\big{)}$
is invariant under $S$, whence
$\overline{\mathscr{Q}}_{f,M}=\overline{\mathscr{Q}}_{U_{M}f,M}=\mathbb{Q}$ in
thoses cases. This is what happens with the Eichler integrals
$\Theta(\tau;1,f_{5,j},20)$ of the two modular forms involved in the Rogers-
Ramanujan identity.

#### Acknowledgements

The 2nd and 3rd authors thank Capital Normal University for its hospitality.
The 2nd author aknowledges support from NSFC (No.11771303). The 4th author is
partially supported by National Key R&D Program of China (2020YFA0713300),
NSFC (No.s 11771303, 12171327, 11911530092, 11871045). This paper is partly a
result of the ERC-SyG project, Recursive and Exact New Quantum Theory
(ReNewQuantum) which received funding from the European Research Council (ERC)
under the European Union’s Horizon 2020 research and innovation programme
under grant agreement No 810573.

##  References

  * [1] Jørgen Ellegaard Andersen and William Elbæk Mistegård  “Resurgence analysis of quantum invariants of Seifert fibered homology spheres”  In _J. Lond. Math. Soc., II. Ser._ 105.2, 2022, pp. 709–764
  * [2] Kathrin Bringmann, Jonas Kaszian and Antun Milas  “Higher depth quantum modular forms, multiple Eichler integrals, and $\mathfrak{sl}_{3}$ false theta functions” Id/No 20  In _Res. Math. Sci._ 6.2, 2019, pp. 41
  * [3] Ovidiu Costin and Stavros Garoufalidis  “Resurgence of the Kontsevich-Zagier series”  In _Ann. Inst. Fourier (Grenoble)_ 61.3, 2011, pp. 1225–1258
  * [4] Artem Dudko and David Sauzin  “On the resurgent approach to Écalle-Voronin’s invariants”  In _C. R., Math., Acad. Sci. Paris_ 353.3, 2015, pp. 265–271
  * [5] Artem Dudko and David Sauzin  “The resurgent character of the Fatou coordinates of a simple parabolic germ”  In _C. R., Math., Acad. Sci. Paris_ 352.3, 2014, pp. 255–261
  * [6] Jean Écalle  “Les fonctions résurgentes. Tomes I, II” 5&6, Publications Mathématiques d’Orsay 81  Université de Paris-Sud, Orsay, 1981
  * [7] Jean Écalle  “Six lectures on transseries, analysable functions and the constructive proof of Dulac’s conjecture”  In _Bifurcations and periodic orbits of vector fields (Montreal, PQ, 1992)_ 408, NATO Adv. Sci. Inst. Ser. C: Math. Phys. Sci.  Kluwer Acad. Publ., Dordrecht, 1993, pp. 75–184
  * [8] Li Han, Yong Li, David Sauzin,ΩShanzhong Sun. In preparation __
  * [9] Philippe Flajolet and Marc Noy  “Analytic combinatorics of chord diagrams”  In _Formal power series and algebraic combinatorics (Moscow, 2000)_ Springer, Berlin, 2000, pp. 191–201
  * [10] Ankush Goswami and Robert Osburn  “Quantum modularity of partial theta series with periodic coefficients”  In _Forum Math._ 33.2, 2021, pp. 451–463
  * [11] Sergei Gukov and Ciprian Manolescu  “A two-variable series for knot complements”  In _Quantum Topol._ 12.1, 2021, pp. 1–109
  * [12] Sergei Gukov, Marcos Mariño and Pavel Putrov  “Resurgence in complex Chern-Simons theory” arXiv:1605.07615, 2016
  * [13] “Nonlinear Stokes phenomena. Transl. ed. by A.B. Sossinsky” 14, Adv. Sov. Math.  Providence, RI: American Mathematical Society, 1993
  * [14] Maxim Kontsevich and Yan Soibelman  “Analyticity and resurgence in wall-crossing formulas” Id/No 32  In _Lett. Math. Phys._ 112.2, 2022, pp. 56
  * [15] Ruth Lawrence and Don Zagier  “Modular forms and quantum invariants of $3$-manifolds”  In _Asian J. Math._ 3.1, 1999, pp. 93–107
  * [16] The LMFDB Collaboration  “The L-functions and modular forms database” [Online; accessed 22 April 2022], http://www.lmfdb.org, 2022
  * [17] Frédéric Menous  “Good uniformizing averages and an application to real resummation”  In _Ann. Fac. Sci. Toulouse, Math. (6)_ 8.4, 1999, pp. 579–628
  * [18] Claude Mitschi and David Sauzin  “Divergent series, summability and resurgence. I” 2153, Lecture Notes in Mathematics  Springer, [Cham], 2016, pp. xxi+298
  * [19] David Sauzin  “Mould expansions for the saddle-node and resurgence monomials”  In _Renormalization and Galois theories. Selected papers of the CIRM workshop, Luminy, France, March 2006_ Zürich: European Mathematical Society, 2009, pp. 83–163
  * [20] David Sauzin  “Nonlinear analysis with resurgent functions”  In _Ann. Sci. Éc. Norm. Supér. (4)_ 48.3, 2015, pp. 667–702
  * [21] Goro Shimura  “On modular forms of half integral weight”  In _Ann. of Math. (2)_ 97, 1973, pp. 440–481
  * [22] Don Zagier  “Quantum modular forms”  In _Quanta of maths_ 11, Clay Math. Proc.  Amer. Math. Soc., Providence, RI, 2010, pp. 659–675
  * [23] Don Zagier  “The dilogarithm function”  In _Frontiers in number theory, physics, and geometry. II_ Springer, Berlin, 2007, pp. 3–65
  * [24] Don Zagier  “Vassiliev invariants and a strange identity related to the Dedekind eta-function”  In _Topology_ 40.5, 2001, pp. 945–960