\documentclass[11pt,reqno]{amsart} \usepackage{jaswal} \usepackage{tikz} \newcommand{\Q}{\mathbb{Q}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\GL}{\mathrm{GL}} \newcommand{\SL}{\mathrm{SL}} \newcommand{\tri}[4]{(#1,#2,#3)/#4} \newcommand{\famA}{\mathcal{A}} \newcommand{\famB}{\mathcal{B}} \newcommand{\famC}{\mathcal{C}} \newcommand{\listE}{\mathcal{E}} \begin{document} \title[Orbit closures of scalene rational triangles]{Orbit closures of scalene rational triangles: rank one and prime denominators} \author{Manvir Jaswal} \thanks{This paper is Part~I of a series on orbit closures of unfoldings of rational polygons: Parts~I and~II \cite{P25} treat triangles, Part~III \cite{P29} quadrilaterals and Part~IV \cite{P30} polygons with at least five sides.} \address{Toronto, Canada} \email{manvirjaswal@icloud.com} \urladdr{https://manvirjaswal.github.io} \date{November 24, 2026} \subjclass[2020]{Primary 37C83; Secondary 32G15, 30F30, 11L40} \keywords{Rational billiards, translation surfaces, orbit closures, affine invariant submanifolds, lattice triangles} \hypersetup{pdftitle={Orbit closures of scalene rational triangles: rank one and prime denominators},pdfauthor={Manvir Jaswal},pdfkeywords={Rational billiards, translation surfaces, orbit closures, affine invariant submanifolds, lattice triangles}} \begin{abstract} The unfolding of a rational triangle is a translation surface, and the closure of its $\GL(2,\R)$-orbit has a rank, which is one for lattice surfaces. We determine the scalene rational triangles of rank one: besides the known lattice triangles, which form three infinite families and four further triangles, they are the two triangles found by Delecroix and R\"uth's computer search, with angles $(\pi/10,3\pi/10,3\pi/5)$ and $(\pi/12,\pi/4,2\pi/3)$, whose unfoldings are Prym eigenforms. We also prove that for a scalene triangle with angles $p_i\pi/N$, $N$ prime, the orbit closure of the unfolding is a connected component of its stratum. Delecroix and R\"uth conjectured that the scalene triangles whose unfoldings do not have dense orbits in their ambient strata form an explicit list. The second theorem proves this for prime denominators, and by the first, every scalene triangle of rank one whose unfolding does not have a dense orbit in its ambient stratum is on their list. The proofs differentiate the holomorphic eigenforms of the unfolding's rotational symmetry along every direction of the orbit closure; at a prime denominator this leaves a statement about subgroups of the units modulo $N$, proved with character sums, a count of lattice points and a computation. \end{abstract} \maketitle \contents \section{Introduction}\label{sec:intro} A rational polygon unfolds to a translation surface, glued from the copies of the polygon under the group generated by the linear parts of the reflections in its sides \cite{ZemljakovKatok}. The group $\GL(2,\R)$ acts on each stratum of translation surfaces, and by Eskin, Mirzakhani and Mohammadi the closure $\mathcal M$ of an orbit is an affine invariant submanifold \cite{EskinMirzakhani,EMM}: near a point $(X,\omega)$ it is, in period coordinates, a complex linear subspace $V$ of $H^1(X,\Sigma;\C)$, where $\Sigma$ is the set of zeros of $\omega$. The \emph{rank} of $\mathcal M$ is half the dimension of the image $p(V)$ of $V$ in absolute cohomology. Lattice surfaces, whose orbits are closed, have rank one, the least possible value. At the other end, Mirzakhani and Wright proved that an orbit closure of full rank, $p(V)=H^1(X;\C)$, is a connected component of a stratum or the hyperelliptic locus in one \cite[Theorem~1.1]{MirzakhaniWright}. For triangles, McMullen lists the known lattice triangles and asks whether the list is complete \cite[Theorem~3.9 and Question~3.11]{McMullenBAMS}. Mirzakhani and Wright showed that infinitely many triangles, built from primitive roots modulo primes, unfold to surfaces with dense orbits in components of their strata \cite[Theorem~1.4]{MirzakhaniWright}. We write $\tri{p_1}{p_2}{p_3}N$ for the triangle with angles $p_1\pi/N$, $p_2\pi/N$, $p_3\pi/N$, in any order, where the $p_i$ are positive integers with $\gcd(p_1,p_2,p_3)=1$ and $N=p_1+p_2+p_3$; it is scalene if the $p_i$ are distinct. Its unfolding $(X,\omega)$ is taken with the points of cone angle $2\pi$ unmarked, and the rank of the triangle is the rank of the orbit closure of $(X,\omega)$. A lattice triangle is one whose unfolding is a lattice surface. Delecroix and R\"uth proved with the flatsurf software that the unfolding of every scalene triangle with $N\le58$ has a dense orbit in a connected component of its ambient stratum, apart from an explicit list \cite[Theorem~4.1]{DelecroixRuth}; the ambient stratum is the stratum of $(X,\omega)$ for odd $N$, and for even $N$, when $X$ has the rotation by $\pi$, the locus of holonomy double covers in a stratum of quadratic differentials. The exceptions are lattice triangles from three infinite families and four single ones; $\tri136{10}$ and $\tri138{12}$, which they found in this search and list as of rank one; and $\tri14{11}{16}$, $\tri14{15}{20}$ and $\tri34{13}{20}$, which they list as of rank two. They conjecture that this list of exceptions is complete \cite[\S4]{DelecroixRuth}. We prove the conjecture for prime denominators, and that every scalene exception of rank one is on their list. \begin{theorem}\label{thm:rk1} A scalene rational triangle has rank one if and only if it is $\tri1k{k+1}{(2k+2)}$ with $k\ge2$, $\tri2{2k+1}{2k+3}{(4k+6)}$ with $k\ge1$, $\tri12{2k-3}{2k}$ with $k\ge4$, or one of $\tri147{12}$, $\tri136{10}$, $\tri138{12}$, $\tri234{9}$, $\tri345{12}$, $\tri357{15}$. All of these except $\tri136{10}$ and $\tri138{12}$ are lattice triangles. \end{theorem} \begin{theorem}\label{thm:primeN} Let $N$ be prime. For every scalene rational triangle $\tri{p_1}{p_2}{p_3}N$, the $\GL(2,\R)$-orbit closure of the unfolding is the connected component of the stratum \mbox{$\mathcal H(p_1-1,p_2-1,p_3-1)$} containing it \textup{(}an entry $0$ is omitted: that point is not marked\textup{)}. No such triangle is a lattice triangle. \end{theorem} No triangle on Delecroix and R\"uth's list has a prime denominator, so \cref{thm:primeN} is their conjecture for triangles of prime denominator; their computation covers the primes up to $53$. By \cref{thm:rk1}, the one scalene triangle of rank one that is not on their list is $\tri123{6}$, whose unfolding is a torus; the orbit of a torus is its whole stratum. Both proofs differentiate eigenforms in every direction of the orbit closure. Mirzakhani and Wright follow the holomorphic eigenforms of the unfolding's rotation by $2\pi/N$ along the Teichm\"uller disc. Kahn and Wright's formula, used as they suggest \cite[\S1]{KahnWright}, gives the derivative of such a form along any direction $v$ of the orbit closure: paired with a second eigenform, it is $v$ paired with the class of a meromorphic eigenform on the complement of the zeros of $\omega$. As the unfolding is a cyclic cover of the sphere branched over three points, this class is not zero, and for an eigenvector $v$ with non-zero absolute part the pairing is non-zero whenever the characters match. So each eigenspace in $p(V)$ forces others (\cref{thm:rule}). At a prime denominator the eigenspaces in $p(V)$ form a subgroup of the units modulo $N$, and \cref{thm:subgroups}, proved with character sums, a count of lattice points and a computation below $N=2000$, shows that no proper subgroup satisfies \cref{thm:rule}, apart from $\{\pm1\}$ for two kinds of triangle. For \cref{thm:rk1}, the directions with zero absolute part give a criterion by residues. The lattice triangles of \cref{thm:rk1} are those of Veech \cite{Veech89}, Vorobets \cite{VorobetsNote,Vorobets}, Ward \cite{Ward}, Kenyon and Smillie \cite{KenyonSmillie} and Hooper \cite{Hooper}, so the scalene lattice triangles are exactly the scalene triangles of McMullen's list; with the right, isosceles and obtuse ones this answers his question in the convention of our unfolding (\cref{cor:mcmullen}). The acute scalene ones are $\tri234{9}$, $\tri345{12}$ and $\tri357{15}$. Kenyon and Smillie proved this for denominators up to $10{,}000$ and conjectured it in general \cite[Theorem~1 and \S1]{KenyonSmillie}; it was proved by Puchta under a coprimality assumption \cite{Puchta} and treated in general in his later preprint \cite{SchlagePuchta}. The obtuse lattice triangles were determined in \cite[Theorem~1.1]{P21}, and for the obtuse angles in $(\pi/2,2\pi/3]$ Angdinata, Chen, Ono, Thorner, Zhang and Zhang had excluded all but a proportion $N^{-1+o(1)}$ of the triangles of denominator $N$ \cite{ACOTZZ}. Apisa computed the orbit closures of all right and all isosceles triangles \cite[Theorems~7.6 and~7.7]{Apisa}, so with \cref{thm:rk1} every rational triangle of rank one is known, and with \cref{thm:primeN} the orbit closure of every rational triangle of prime denominator. \begin{corollary}\label{cor:mcmullen} With the unfolding of \cref{sec:unfolding}, which is that of Kenyon and Smillie, a rational triangle is a lattice triangle if and only if it is of one of the types of McMullen's Theorem~3.9 \cite{McMullenBAMS}. So in this convention the answer to his Question~3.11 is yes. \end{corollary} \begin{proof} A right triangle is a lattice triangle if and only if its smallest angle is $\pi/m$ with $m\ge4$, and an acute isosceles triangle if and only if its apex angle is $\pi/m$ with $m\ge3$ \cite[Theorem~2]{KenyonSmillie}. The obtuse lattice triangles are $\tri11{N-2}N$ with $N\ge5$, $\tri12{2k-3}{2k}$ with $k\ge4$, and $\tri147{12}$ \cite[Theorem~1.1]{P21}. A lattice triangle has rank one, so by \cref{thm:rk1} the acute scalene lattice triangles are $\tri234{9}$, $\tri345{12}$ and $\tri357{15}$. In McMullen's notation a type lists integers proportional to the angles. In his type~A, $(1,1,1)$ and $(2,m,m)$ with $m\ge2$ are the acute isosceles triangles with apex $\pi/3$ and $\pi/(m+1)$; $(2,1,1)$, $(1,1,2)$, $(2,1,3)$ and $(2,m,m+2)$ with $m\ge2$ are the right triangles with smallest angle $\pi/4$, $\pi/4$, $\pi/6$ and $\pi/(m+2)$; and $(1,1,m)$ with $m\ge3$ are the obtuse isosceles ones. His types~B and~D, $(1,2,m)$ with $m\ge5$ odd and $(1,4,7)$, are the other obtuse ones, and his type~C consists of the three acute scalene ones. \end{proof} \begin{remark}\label{rem:convention} Like Kenyon and Smillie \cite[\S\S2.1--2.2]{KenyonSmillie}, we take one copy of the triangle for each element of the dihedral group and do not mark the points of cone angle $2\pi$; they ask for a lattice in $\mathrm{SL}^{\pm}(2,\R)$ \cite[\S3]{KenyonSmillie}, whose orientation-preserving part has index at most two, so their lattice triangles are ours. McMullen takes one copy for each coset of the subgroup that preserves the polygon up to translation \cite[(3.1)]{McMullenBAMS}. For a triangle that subgroup is non-trivial only for the equilateral triangle, which still unfolds to a torus, and for isosceles triangles of even denominator, which then unfold to our surface of the right triangle obtained by halving them. So in his convention the acute isosceles triangles with apex angle $2\pi/m$, $m\ge5$ odd, are lattice triangles as well: $\tri334{10}$, for instance, then unfolds to our surface of $\tri235{10}$, a lattice surface, while in ours it is not a lattice triangle \cite[Theorem~2]{KenyonSmillie}. Every other triangle is a lattice triangle in one convention exactly when it is in the other. \end{remark} Delecroix and R\"uth describe the orbit closures of $\tri136{10}$ and $\tri138{12}$ as eigenform loci in a Prym subvariety, referring to work in preparation of Aulicino, Avila and Delecroix \cite[Theorem~4.1]{DelecroixRuth}. We prove that both have rank one; for $\tri136{10}$ the orbit closure is then a component of the eigenform locus $\Omega E_5(2,2,2)$ by Lanneau and Nguyen's theorem \cite[Theorem~1.1]{LanneauNguyen}, and for $\tri138{12}$ it has dimension four and is an irreducible component of $\Omega E_{12}(1,1,1,1)$ (\cref{prop:138}). By Wright's theorem that orbit closures of rank one consist of completely periodic surfaces \cite[Theorem~1.5]{WrightCyl}, billiards in both triangles share a property of the lattice triangles of \cref{thm:rk1}: if one trajectory that starts in a direction is periodic, so is every trajectory that starts in that direction and misses the vertices (\cref{cor:periodic}). The unfoldings of $\tri14{11}{16}$ and $\tri14{15}{20}$ are also unfoldings of quadrilaterals, in invariant subvarieties of rank two and dimension four found by Eskin, McMullen, Mukamel and Wright \cite[Theorem~1.1 and \S5]{EMMW}; by our \cref{thm:rk1} their rank is not one, so these are their orbit closures. For $\tri34{13}{20}$, rank at least two also follows from Delecroix and R\"uth's lower bound for the dimension \cite[Theorem~1.2]{DelecroixRuth}. Delecroix announces that this orbit closure has dimension~$4$, from joint work with Kai Fu \cite[pp.~48--49]{DelecroixHab}; his slides of June 2025, on joint work with K.~Fu and B.~Zykoski, list it with dimension~$4$ and rank~$2$ \cite[slide~12]{DelecroixJHH80}. \subsection{Eigenforms along the orbit closure}\label{ssec:idea} The unfolding of $\tri{p_1}{p_2}{p_3}N$ is the normalization $X$ of the curve $y^N=x^{p_1}(x-1)^{p_2}$ with $\omega=y\,dx/(x(x-1))$ \cite[\S6]{MirzakhaniWright}, and $T(x,y)=(x,\zeta y)$, $\zeta=e^{2\pi i/N}$, generates the deck group of $x$, with $T^*\omega=\zeta\omega$. Let $H^1_a$ be the $\zeta^a$-eigenspace of $T^*$ on $H^1(X;\C)$, let $[m]\in\{0,\dots,N-1\}$ be the residue of an integer $m$ modulo $N$, and \[ \Phi=\bigl\{a\in\Z/N:\ ap_1,ap_2,ap_3\not\equiv0\ \text{and}\ [ap_1]+[ap_2]+[ap_3]=N\bigr\}. \] From the dimension formulas of Mirzakhani and Wright \cite[Lemma~6.1 and Corollary~6.2]{MirzakhaniWright}, $H^1_a$ is a line if $a\in\Phi\cup-\Phi$ and is zero otherwise, $\Phi\cap-\Phi=\emptyset$, and for $a\in\Phi$ the line is spanned by the holomorphic form $\omega_a=x^{[ap_1]/N-1}(x-1)^{[ap_2]/N-1}dx$, so that $\omega_1=\omega$. Rotation by $2\pi/N$ and the deck transformation $T$ take $(X,\omega)$ to the same point, so $T^*V=V$ (\cref{lem:S}; Mirzakhani and Wright prove $T^*p(V)=p(V)$ in this way \cite[proof of Lemma~7.7]{MirzakhaniWright}). Hence \begin{equation}\label{eq:S} p(V)=\bigoplus_{a\in S}H^1_a,\qquad \operatorname{rank}\mathcal M=\tfrac12\lvert S\rvert, \end{equation} for a set $S\subset\Phi\cup-\Phi$ with $S=-S$ and $\pm1\in S$, and the problem is to determine $S$. Here $S=-S$ because $p(V)$ is the complexification of a real subspace and complex conjugation maps $H^1_a$ onto $H^1_{-a}$; the units in $S$ form a subgroup of $(\Z/N)^\times$ containing $-1$ \cite[Lemma~7.6]{MirzakhaniWright}. For a unit $u$ modulo $N$, the Galois conjugate of $p(V)$ under $\zeta\mapsto\zeta^u$ is $\bigoplus_{a\in uS}H^1_a$. By Wright's theorem on the field of definition \cite[Theorem~1.5]{WrightField}, it is the fiber of a flat summand of the cohomology over $\mathcal M$, and by Filip \cite{FilipSemisimplicity} each summand is a variation of Hodge structure. So for $a\in uS\cap\Phi$ the form $\omega_a$ extends to a family $\alpha$ of holomorphic forms on the surfaces of $\mathcal M$ near $(X,\omega)$ that stays in the summand of $uS$, and the derivative of $\alpha$ along any $v\in V$ is orthogonal to $\omega_b$ for every $b\in\Phi$ outside $uS$. Mirzakhani and Wright, after McMullen \cite[Theorem~7.5]{McMullenHilbert}, use the direction $v=[\bar\omega]$ of the Teichm\"uller disc. There the pairing is the second fundamental form $\frac i2\int_X\omega_a\omega_b\,\bar\omega/\omega$ of the Hodge bundle \cite{Forni,FMZ}, which is not zero when $a+b\equiv2$ \cite[Proposition~7.3]{MirzakhaniWright}, and this gives their criterion for rank at least two \cite[Theorem~7.5]{MirzakhaniWright}. We use every direction of $V$. By $T$-invariance $V$ is the sum of its intersections $V_c$ with the eigenspaces of $T^*$ on $H^1(X,\Sigma;\C)$. For $v\in V_c$, Kahn and Wright's formula for the derivative of the projection to moduli space \cite[Theorem~1.1]{KahnWright} takes the form \begin{equation}\label{eq:deriv} \int_X\partial_v\alpha\wedge\omega_b=\bigl\langle v,[\omega_a\omega_b/\omega]\bigr\rangle , \end{equation} where on the right $H^1(X,\Sigma;\C)$ is paired with $H^1(X\setminus\Sigma;\C)$. The meromorphic form $\omega_a\omega_b/\omega$ has character $a+b-1$, so the right side vanishes unless $c\equiv1-a-b$. What makes triangles special is the converse. With three branch points, the eigenspace of $H^1(X\setminus\Sigma;\C)$ of character $-c$, for $c\in\Phi\cup-\Phi$, is a line, and $\omega_a\omega_b/\omega$, which is $y^{-c}$ times a rational function of $x$ times $dx$, has a non-zero class in it. Hence, for such $c$, the right side of \eqref{eq:deriv} is non-zero for every non-zero $v\in V_c$ with $c\equiv1-a-b$. The directions $v\in V_c$ with $c\in S$ give the following rule. The directions in $V\cap\ker p$, where the right side is a sum of residues of $\omega_a\omega_b/\omega$ at the zeros of $\omega$, give a criterion for rank at least two by residues (\cref{sec:derivative}). \needspace{3\baselineskip} \begin{theorem}\label{thm:rule} Let $\tri{p_1}{p_2}{p_3}N$ be a rational triangle whose unfolding has genus at least two. If $u$ is a unit modulo $N$, $a\in uS\cap\Phi$, $a'\in S$ and $b=1-a-a'\in\Phi$, then $b\in uS$. \end{theorem} The case $a'=-1$, $b=2-a$, is always available, and with $u=a$ it is Mirzakhani and Wright's criterion. \emph{We call} a unit $a$ modulo $N$ with $2a\not\equiv2$ and $a,2-a\in\Phi$ a \emph{witness}; for obtuse triangles these are the witnesses of \cite[\S2.3]{P21}, by \cref{lem:witness}. For a witness, \cref{thm:rule} puts $(2-a)/a$ in $S$, and $(2-a)/a\not\equiv\pm1$, so the rank is at least two. The other cases are needed. For $\tri139{13}$, $\Phi=\{1,2,3,5,6,9\}$; the witnesses $6$ and $9$ give $S\supseteq\{\pm1,\pm5\}$, and $S=\{\pm1,\pm5\}$ satisfies every case of \cref{thm:rule} with $a'=-1$. The case $u=a=3$, $a'=5$, $b=6$ puts $2$ in $S$. As $2$ is a primitive root modulo $13$, the subgroup $S$ is all of $(\Z/13)^\times$, and the orbit closure has full rank. \subsection{Prime denominators}\label{ssec:prime-intro} Let $N$ be prime; a scalene triangle then has $N\ge7$. Every non-zero character is a unit, $H^1(X;\C)$ is the sum of the $N-1$ lines $H^1_a$, and $S$ is a subgroup of $G=(\Z/N)^\times$ containing $-1$. In \cref{thm:rule} take $u=x\in\Phi$, so that $x\in uS$, and $a'=h\in S$: whenever $b=1-h-x$ lies in $\Phi$, the quotient $b/x$ lies in $S$. \begin{theorem}\label{thm:subgroups} Let $N\ge7$ be prime and $p_1,p_2,p_3$ distinct positive integers with $p_1+p_2+p_3=N$, and let $\Phi$ be as above. Let $H$ be a subgroup of $(\Z/N)^\times$ with $-1\in H$ and $\lvert H\rvert0$ and $g\in\SL(2,\R)$, multiplies the area by $\lambda^2$, the $\SL(2,\R)$-orbit of $(X,\omega)$ is closed if and only if its $\GL^+(2,\R)$-orbit is, and the latter is the $\GL(2,\R)$-orbit. If $(X,\omega)$ is a lattice surface, its orbit is therefore $\mathcal M$. It is the image of a group of real dimension four, so $\dim_\C\mathcal M\le2$; and $V$ contains $[\omega]$ and $[\bar\omega]$, whose images under $p$ are independent. So $\dim_\C\mathcal M=\dim p(V)=2$ and $V\cap Z=0$. Conversely, if $\dim_\C\mathcal M=2$, every $\GL^+(2,\R)$-orbit in $\mathcal M$ is open in $\mathcal M$, since the group and $\mathcal M$ have the same real dimension; as $\mathcal M$ is connected, it is a single orbit \cite[\S3.2]{WrightSurvey}. So the orbit of $(X,\omega)$ is closed, and $(X,\omega)$ is a lattice surface. \end{proof} The next lemma is the source of every eigenspace argument in the paper. \begin{lemma}\label{lem:S} $T^*V=V$, so $V=\bigoplus_{\ell\in\Z/N}V_\ell$ with $V_\ell=V\cap H^1(X,\Sigma)_\ell$. Let $S$ be the set of $a\in\Z/N$ with $0\ne H^1_a\subset p(V)$. Then $S\subset\Phi\cup-\Phi$, $\pm1\in S$, \[ p(V)=\bigoplus_{a\in S}H^1_a , \] and $V_a=H^1(X,\Sigma)_a$, a line, for every $a\in S$. In particular $\operatorname{rank}\mathcal M=\lvert S\rvert/2$. \end{lemma} \begin{proof} We follow Mirzakhani and Wright, who prove $T^*p(V)=p(V)$ in this way \cite[proof of Lemma~7.7]{MirzakhaniWright}. Rotation by $e^{i\phi}$, $0\le\phi\le2\pi/N$, moves a lift of $(X,\omega)$ in the regular cover of \cref{ssec:orbit} (at an orbifold point, the one fixed there) along a path in the preimage of $\mathcal M$ to a point with period coordinates $\zeta[\omega]$, near which the preimage is $\zeta V=V$, as rotation is the scalar $e^{i\phi}$ on period coordinates. Since $T$ is an isomorphism from $(X,\zeta\omega)$ to $(X,\omega)$, that point is also the image of the lift under the deck transformation given by $T$, which acts on period coordinates by $T^*$ and preserves the preimage of $\mathcal M$; so the preimage is $T^*V$ there as well, and $T^*V=V$. A subspace invariant under a linear map of finite order is the sum of its intersections with the eigenspaces. As $p$ is equivariant, $p(V)=\bigoplus_\ell p(V_\ell)$ with $p(V_\ell)\subset H^1_\ell$, and by \cref{lem:eigen} $H^1_\ell$ is a line if $\ell\in\Phi\cup-\Phi$ and zero otherwise. So $p(V)$ is the sum of the lines $H^1_a$ it contains, and $S\subset\Phi\cup-\Phi$. For $a\in S$, $p(V_a)=H^1_a\ne0$, while $H^1(X,\Sigma)_a$ is a line by \cref{lem:relative}\ref{it:rel-gen}; so $V_a=H^1(X,\Sigma)_a$. Finally $[\omega]\in V_1$ and $[\bar\omega]\in V_{-1}$ have non-zero images. \end{proof} \subsection{Galois conjugates}\label{ssec:galois} Let $H^1$ be the flat bundle over $\mathcal M$ with fiber $H^1(Y;\C)$ at $(Y,\eta)$, and $k(\mathcal M)$ the field of definition of $\mathcal M$. Wright proves that $H^1=\bigoplus_\rho V_\rho\oplus W$, where $\rho$ runs over the field embeddings $k(\mathcal M)\to\C$, $V_{\mathrm{Id}}$ has fiber $p(V)$ at $(X,\omega)$, each $V_\rho$ is a simple flat bundle Galois conjugate to $V_{\mathrm{Id}}$, and $W$ is a semisimple flat bundle with no subbundle isomorphic to any $V_\rho$ \cite[Theorem~1.5]{WrightField}. Here $V_\rho=\sigma(V_{\mathrm{Id}})$ for any automorphism $\sigma$ of $\C$ extending $\rho$, acting on $H^1(Y;\Q)\otimes\C$ through the coefficients: Wright defines $V_\rho$ in this way \cite[proof of Lemma~6.5]{WrightField}, and the choice of $\sigma$ does not matter, as $V_{\mathrm{Id}}$ is defined over $k(\mathcal M)$ \cite[Theorem~1.5]{WrightField}. The $V_\rho$ are pairwise non-isomorphic \cite[Lemma~6.5]{WrightField}. Filip proves that each such summand underlies a variation of Hodge structure \cite[proof of Theorem~7.3, with Theorem~7.2]{FilipSemisimplicity}; in the form used by Mirzakhani and Wright \cite[\S7.1]{MirzakhaniWright}, at each point the fiber of each summand is the sum of its intersections with $H^{1,0}$ and $H^{0,1}$. For a unit $u$ modulo $N$, let $\sigma_u$ be an automorphism of $\C$ with $\sigma_u(\zeta)=\zeta^u$. \needspace{4\baselineskip} \begin{lemma}\label{lem:conj} Let $u$ be a unit modulo $N$. Then $\sigma_u(p(V))=\bigoplus_{a\in uS}H^1_a$, and this is the fiber at $(X,\omega)$ of one of Wright's summands $V_\rho$. At every point of $\mathcal M\cap U$ the fiber of $V_\rho$ is the sum of its intersections with $H^{1,0}$ and $H^{0,1}$. Two such conjugates of $p(V)$ are equal or meet only in $0$. \end{lemma} \begin{proof} $T^*$ is defined over $\Q$, so $\sigma_u(H^1_a)=H^1_{ua}$, and the first statement follows from \cref{lem:S}. With $\rho=\sigma_u|_{k(\mathcal M)}$, $\sigma_u(p(V))$ is the fiber of $V_\rho=\sigma_u(V_{\mathrm{Id}})$, and the second statement is Filip's. If two conjugates $V_\rho$ and $V_{\rho'}$ meet in a non-zero vector at one point, their intersection is a non-zero flat subbundle of both; as both are simple, both equal it, so they are isomorphic and $\rho=\rho'$. \end{proof} \subsection{Witnesses and full rank}\label{ssec:witness} For triangles ($n=3$, $k=N$), Mirzakhani and Wright's criterion \cite[Theorem~7.5]{MirzakhaniWright} says: if there is a unit $a$ modulo $N$ with $2a\not\equiv2$, $t(-a)>1$ and $t(-(2-a))>1$, then $\mathcal M(\theta)$ has rank greater than $n-2=1$. For every $b$, $t(\pm b)$ is an integer, as $\sum_ibp_i/N=b$. If $b\in\Phi\cup-\Phi$, then $t(b)$ and $t(-b)$ are positive with sum $3$, so $t(-b)>1$ means $t(b)=1$, that is, $b\in\Phi$; otherwise some $\{-bp_i/N\}$ is zero, the other two are less than $1$, and $t(-b)\le1$. So, with witnesses as defined in \cref{ssec:idea}: \begin{theorem}[Mirzakhani--Wright {\cite[Theorem~7.5]{MirzakhaniWright}}]\label{thm:MW} If $\Delta$ has a witness, then $\operatorname{rank}\mathcal M\ge2$. \end{theorem} In terms of the residues $r_i=[ap_i]$, a witness is found by comparing $r_i$ with $[2p_i]$, which is $2p_i$ at an angle less than $\pi/2$ and $2p_i-N$ at an obtuse angle. For obtuse triangles the following is the form of the criterion used by Larsen, Norton and Zykoski \cite[Proposition~2.1]{LNZ}. \begin{lemma}\label{lem:witness} Let $a$ be a unit modulo $N$ with $2a\not\equiv2$, and $r_i=[ap_i]$. \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:wit-acute} If $\Delta$ is acute, $a$ is a witness if and only if $r_i<2p_i$ for $i=1,2,3$. \item\label{it:wit-obtuse} If $\Delta$ is obtuse with $p_3>N/2$, $a$ is a witness if and only if at least two of $r_1<2p_1$, $r_2<2p_2$, $r_3<2p_3-N$ hold. \end{enumerate} \end{lemma} \begin{proof} Put $\hat p_i=[2p_i]$. As $a$ is a unit, each $r_i$ lies in $[1,N-1]$ and $r_1+r_2+r_3\in\{N,2N\}$, with $N$ exactly when $a\in\Phi$. Moreover $[(2-a)p_i]=[\hat p_i-r_i]$ is $0$ if $r_i=\hat p_i$, $\hat p_i-r_i$ if $r_i<\hat p_i$, and $\hat p_i-r_i+N$ if $r_i>\hat p_i$. Let $k$ be the number of $i$ with $r_i<\hat p_i$. If no $r_i$ equals $\hat p_i$, then $2-a\in\Phi\cup-\Phi$ and \begin{equation}\label{eq:wit-sum} \textstyle\sum_i[(2-a)p_i]=\sum_i\hat p_i-\sum_ir_i+(3-k)N . \end{equation} \ref{it:wit-acute} Here $\sum_i\hat p_i=2N$. If $a$ is a witness, $\sum_ir_i=N$ and \eqref{eq:wit-sum} equals $N$, so $k=3$. Conversely, if $r_i<2p_i$ for all $i$, then $\sum_ir_i<2N$, so $\sum_ir_i=N$; no $r_i$ equals $\hat p_i$, $k=3$, and \eqref{eq:wit-sum} equals $N$. \ref{it:wit-obtuse} Here $\sum_i\hat p_i=N$. If $a$ is a witness, \eqref{eq:wit-sum} with $\sum_ir_i=N$ gives $k=2$. Conversely, let $k\ge2$. If the remaining index $j$ had $r_j\le\hat p_j$, then $\sum_ir_i<\sum_i\hat p_i=N$, which is impossible. So $r_j>\hat p_j$, $k=2$, and \eqref{eq:wit-sum} equals $2N-\sum_ir_i$, which is positive and a multiple of $N$ only if $\sum_ir_i=N$. So $a$ and $2-a$ lie in $\Phi$. \end{proof} Full rank turns into density by Mirzakhani and Wright's theorem \cite[Theorem~1.1]{MirzakhaniWright}: an affine invariant submanifold of full rank, $\operatorname{rank}\mathcal M=\operatorname{genus}$, is a connected component of a stratum or the locus of hyperelliptic surfaces in one. If $N$ is odd and the three angles are distinct, $\mathcal M$ is not contained in the hyperelliptic locus \cite[Lemma~6.7]{MirzakhaniWright}. \subsection{Cylinder deformations}\label{ssec:cylinders} Our lower bounds for the rank of single triangles, and of one family, come from Wright's cylinder deformations \cite{WrightCyl}. We allow some of the points of cone angle $2\pi$ above the vertices to be marked: let $\Sigma'\supseteq\Sigma$ be $\Sigma$ together with some of them, $\mathcal M'$ the orbit closure of $(X,\omega)$ with the points of $\Sigma'$ marked, and $V'\subset H^1(X,\Sigma';\C)$ its tangent space, a single subspace by \cref{ssec:orbit}. Forgetting the added points is $\GL(2,\R)$-equivariant and linear in period coordinates and commutes with $p$, so it maps $\mathcal M'$ into $\mathcal M$ and $p(V')\subset p(V)$. Let $(Y,\eta)$ be horizontally periodic, with maximal horizontal cylinders $C_1,\dots,C_r$ (bounded by saddle connections between points of $\Sigma'$) of heights $h_i$, circumferences $c_i$ and moduli $m_i=h_i/c_i$. Let $u^{\mathcal C}_{t_1,\dots,t_r}$ apply the shear $\bigl(\begin{smallmatrix}1&t_i\\0&1\end{smallmatrix}\bigr)$ to $C_i$ and nothing to the rest of the surface, so that $u_t=u^{\mathcal C}_{t,\dots,t}$ is the horocycle flow \cite[proof of Lemma~3.1]{WrightCyl}. Let $\Xi_i\in H^1(Y,\Sigma';\Z)$ be the class that vanishes on relative cycles disjoint from the interior of $C_i$ and is one on a path crossing $C_i$ from a point of $\Sigma'$ on its bottom to one on its top. Wright proves that $u^{\mathcal C}_{t_1,\dots,t_r}(Y)$ has period coordinates $[\eta]+\sum_it_ih_i\Xi_i$ for small $t$ \cite[Lemmas~2.3 and~2.4]{WrightCyl}, and that the closure of the horocycle orbit of $(Y,\eta)$ is the set of the $u^{\mathcal C}_{t_1/m_1,\dots,t_r/m_r}(Y)$ with $(t_1,\dots,t_r)$ in the space $\mathcal T\subset\R^r$ of solutions of every homogeneous linear relation with rational coefficients satisfied by $(m_1,\dots,m_r)$ \cite[Corollary~3.4]{WrightCyl}. \begin{lemma}\label{lem:twist} Let $\theta$ be a direction in which the straight-line flow on $(X,\omega)$ is completely periodic, let $C_i$, $c_i$, $\Xi_i$ and $\mathcal T$ be as above for $(Y,\eta)=e^{-i\theta}(X,\omega)$ with the points of $\Sigma'$ marked, and $L=\{\sum_it_ic_i\Xi_i:\ t\in\mathcal T\}$. Then $L\subset V'$, and if $\Sigma'=\Sigma$, then $\operatorname{rank}\mathcal M\ge\dim_\R p(L)$. If $\sum_ib_i\Xi_i$ lies in the kernel of $p$ on $H^1(X,\Sigma';\C)$, there is a function $\lambda$ on $\Sigma'$, real if the $b_i$ are real, with $b_i=\lambda(z^+)-\lambda(z^-)$ for every $i$ and all points $z^-$ of $\Sigma'$ on the bottom and $z^+$ on the top of $C_i$. \end{lemma} \begin{proof} The rotation $e^{-i\theta}$ is a complex scalar on period coordinates, which preserves the orbit closure and $V'$; so we may take $\theta=0$ and $(Y,\eta)=(X,\omega)$. The orbit closure $\mathcal M'$ is closed and invariant under $u_t$, so it contains $u^{\mathcal C}_{t_1/m_1,\dots,t_r/m_r}(X)$ for every $t\in\mathcal T$. For small $t$ this surface has period coordinates $[\omega]+\sum_i(t_i/m_i)h_i\Xi_i=[\omega]+\sum_it_ic_i\Xi_i$, and since $\mathcal M'$ is a single subspace near $(X,\omega)$, $L\subset V'$. On a closed curve, $p(\Xi_i)$ is the algebraic intersection number with the core curve of $C_i$, up to a sign fixed by orientations; so $p(\Xi_i)$ is Poincar\'e dual to that core curve, and $p(\Xi_i)\cup p(\Xi_j)=0$ because the core curves of parallel cylinders are disjoint. So for $\Sigma'=\Sigma$, $p(L)$ is an isotropic subspace of the real symplectic space $p(V)\cap H^1(X;\R)$ of dimension $2\operatorname{rank}\mathcal M$ \cite[Theorem~1.4]{AvilaEskinMoller}, and $\dim_\R p(L)\le\operatorname{rank}\mathcal M$. These two steps are Wright's: $L$ lies in his twist space \cite[Definition~8.1]{WrightCyl}, whose image under $p$ is isotropic by his Lemma~8.10, and the bound is the one in the proof of his Corollary~8.11. Finally, the kernel of $p$ on $H^1(X,\Sigma';\C)$ is $\delta(\C^{\Sigma'})$, as in \cref{lem:relative}. If $\sum_jb_j\Xi_j=\delta\lambda$, evaluate on a path inside $C_i$ from $z^-$ to $z^+$: it gives $b_i=\lambda(z^+)-\lambda(z^-)$. If the $b_j$ are real, $\delta(\operatorname{Re}\lambda)$ is the same class. \end{proof} For single triangles we use the lemma as Delecroix and R\"uth do in their procedure for bounding orbit closures from below \cite[\S3]{DelecroixRuth}. \needspace{3\baselineskip} \begin{lemma}\label{lem:cyl-comp} Let $\Sigma'$ be the set of all points above the vertices. Suppose that there are directions $\theta_1,\dots,\theta_n$ in which the straight-line flow on $(X,\omega)$ is completely periodic such that the spaces $L$ of \cref{lem:twist} for these directions, together with $\operatorname{Re}[\omega]$ and $\operatorname{Im}[\omega]$, span a subspace of $H^1(X,\Sigma';\R)$ whose image in $H^1(X;\R)$ has dimension at least four. Then $\operatorname{rank}\mathcal M\ge2$. \end{lemma} \begin{proof} By \cref{lem:twist} each $L$ lies in $V'$, and so do $\operatorname{Re}[\omega]$ and $\operatorname{Im}[\omega]$, as $V'$ is complex and contains $[\omega]$ and $[\bar\omega]$. So $p(V')$, which is defined over $\R$, has complex dimension at least four, and $p(V')\subset p(V)$. \end{proof} \section{Derivatives of eigenforms}\label{sec:derivative} This section proves \eqref{eq:deriv}, \cref{thm:rule} and the criterion by residues. A holomorphic eigenform that stays in a Galois conjugate of $p(V)$ has a derivative, along every $v\in V$, orthogonal to the eigenforms outside that conjugate (\cref{lem:vanish}); Kahn and Wright's formula turns this orthogonality into the vanishing of $\langle v,[\omega_a\omega_b/\omega]\rangle$ (\cref{lem:derivative}); and with three branch points the class $[\omega_a\omega_b/\omega]$ is never zero (\cref{lem:three}). We keep the notation of \cref{sec:unfolding}, with $\Sigma\ne\emptyset$. \subsection{The pairing and the derivative}\label{ssec:pairing} Classes in $H^1(X,\Sigma;\C)=H^1_c(X\setminus\Sigma;\C)$ are represented by closed smooth $1$-forms with compact support in $X\setminus\Sigma$, and classes in $H^1(X\setminus\Sigma;\C)$ by closed $1$-forms on $X\setminus\Sigma$. By Poincar\'e--Lefschetz duality the pairing \[ \langle[\nu],[\theta]\rangle=\int_X\nu\wedge\theta \] between the two spaces is perfect. It is $T$-invariant, so it pairs $H^1(X,\Sigma)_c$ with $H^1(X\setminus\Sigma)_{c'}$ to zero unless $c+c'\equiv0$. If $\theta$ is closed on all of $X$, then $\langle w,[\theta]\rangle=\int_Xp(w)\wedge\theta$. If $\theta$ is a meromorphic $1$-form on $X$, holomorphic on $X\setminus\Sigma$, and $f\in\C^\Sigma$, then \begin{equation}\label{eq:pair-res} \langle\delta f,[\theta]\rangle=-2\pi i\sum_{z\in\Sigma}f(z)\operatorname{Res}_z\theta : \end{equation} $\delta f$ is represented by $d\bigl(\sum_zf(z)\kappa_z\bigr)$, where $\kappa_z$ equals $1$ near $z$ and is supported in a small disc $D_z$, and Stokes' theorem on $D_z$ minus a smaller disc about $z$ gives the residue. Let $(X_\varpi,\omega_\varpi)$, $\varpi\in U$, be the marked surfaces with period coordinates $\varpi$, and $[\alpha]_{\mathrm{rel}}\in H^1(X,\Sigma;\C)$ the relative class of a holomorphic form $\alpha$ on one of them. For holomorphic $\theta$, the next lemma is Kahn and Wright's formula for the derivative of the projection from a stratum to moduli space \cite[Theorem~1.1, Corollary~2.3 and Remark~2.4]{KahnWright}, written as a pairing. We give the short proof, along their path \cite[Lemma~2.2]{KahnWright}. \needspace{4\baselineskip} \begin{lemma}\label{lem:derivative} Let $v\in H^1(X,\Sigma;\C)$, and let $\varpi\mapsto\alpha_\varpi$ be a family of holomorphic $1$-forms on the surfaces $X_\varpi$, of class $C^1$ in $t$ along the path $[\omega]+tv$, as forms on the fixed surface in the identification of the proof, with $\alpha_{[\omega]}=\alpha$. Let $\theta$ be a meromorphic $1$-form on $X$, holomorphic on $X\setminus\Sigma$, with at most simple poles. Then \[ \bigl\langle\partial_v[\alpha_\varpi]_{\mathrm{rel}},[\theta]\bigr\rangle=\bigl\langle v,[\alpha\theta/\omega]\bigr\rangle . \] \end{lemma} The form $\alpha\theta/\omega$ on the right is meromorphic on $X$ and holomorphic on $X\setminus\Sigma$. For $\theta=\omega_b$ the left side is $\int_X\partial_v\alpha\wedge\omega_b$, which gives \eqref{eq:deriv}. \begin{proof} Represent $v$ by a closed form $\nu$ with compact support in $X\setminus\Sigma$. For small $t$ the form $\omega_t=\omega+t\nu$ is closed, equals $\omega$ near $\Sigma$, and satisfies $i\,\omega_t\wedge\bar\omega_t>0$ off $\Sigma$, so there is a unique complex structure $Y_t$ on the surface, equal to that of $X$ near $\Sigma$, for which $\omega_t$ is of type $(1,0)$, hence holomorphic. With the identity marking, $(Y_t,\omega_t)$ has period coordinates $[\omega]+tv$, so by the local injectivity of period coordinates it is the path of the statement. Pulled back to the fixed surface, $\alpha_t=\alpha_{[\omega]+tv}$ is a $C^1$ family of closed forms of type $(1,0)$ for $Y_t$; so $\alpha_t\wedge\omega_t=0$, and near $\Sigma$ the $\alpha_t$ are holomorphic in a fixed coordinate. Differentiating at $t=0$, \[ \dot\alpha\wedge\omega+\alpha\wedge\nu=0 , \] and since $\omega\ne0$ off $\Sigma$ this says that the $(0,1)$-part of $\dot\alpha$ for $X$ is $(\alpha/\omega)\,\nu^{0,1}$. The form $\dot\alpha$ is closed and holomorphic near $\Sigma$. Its relative class $\partial_v[\alpha_\varpi]_{\mathrm{rel}}$ is represented by $\dot\alpha-d(\kappa\dot A)$, where $\kappa$ is a cut-off function equal to $1$ near $\Sigma$ and $\dot A$ is the primitive of $\dot\alpha$ near each $z\in\Sigma$ with $\dot A(z)=0$. Hence \[ \bigl\langle[\dot\alpha]_{\mathrm{rel}},[\theta]\bigr\rangle=\int_X\dot\alpha\wedge\theta+\sum_{z\in\Sigma}\lim_{\varepsilon\to0}\oint_{\lvert w\rvert=\varepsilon}\dot A\,\theta , \] and the last terms vanish because $\dot A(z)=0$ and $\theta$ has at most a simple pole at $z$. Finally $\dot\alpha\wedge\theta=\dot\alpha^{0,1}\wedge\theta=(\alpha/\omega)\,\nu^{0,1}\wedge\theta=\nu\wedge(\alpha\theta/\omega)$, which is supported where $\nu$ is; integrating gives $\langle v,[\alpha\theta/\omega]\rangle$. \end{proof} The Beltrami differential of the path $(Y_t,\omega_t)$ is $\nu^{0,1}/\omega$, and for holomorphic $\theta$ the right side is, up to a constant, its pairing with the quadratic differential $\alpha\theta$. For $v=[\bar\omega]$ and $\theta=\beta$ holomorphic, it is a multiple of $\int_X\alpha\beta\,\bar\omega/\omega$, which with the factor $i/2$ is the form $B_\omega(\alpha,\beta)$ that Forni, Matheus and Zorich define following Forni \cite[(2.11)]{FMZ}, \cite{Forni}, the second fundamental form of the Hodge bundle along the Teichm\"uller flow \cite[Lemma~2.1]{FMZ}, as Mirzakhani and Wright use it \cite[\S7.1, Lemma~7.2]{MirzakhaniWright}. For $v=\delta f$ it is a sum of residues, by \eqref{eq:pair-res}. \subsection{Three branch points}\label{ssec:three} Let $\hat\Sigma\supseteq\Sigma$ be the set of all points of $X$ above the three vertices. For four or more branch points the eigenspaces are larger and a single class of this kind can pair to zero with a tangent direction; for three it cannot. \begin{lemma}\label{lem:three} Let $c\in\Phi\cup-\Phi$ and $k,l\in\Z$. The meromorphic form $y^{-c}x^k(x-1)^l\,dx$ on $X$, which is holomorphic on $X\setminus\hat\Sigma$, has non-zero class in $H^1(X\setminus\hat\Sigma;\C)$, hence in $H^1(X\setminus\Sigma';\C)$ for every $\Sigma'\subseteq\hat\Sigma$ off which it is holomorphic. \end{lemma} \begin{proof} Call the form $\xi_{k,l}$; on a branch it is $x^{s_1}(x-1)^{s_2}\,dx$ with $s_1=k-cp_1/N$, $s_2=l-cp_2/N$ for a fixed representative $c$. Over $\mathbb P^1\setminus\{0,1,\infty\}$ the equation $y^N=x^{p_1}(x-1)^{p_2}$ defines a connected unramified cyclic cover, as $\gcd(p_1,p_2,N)=1$; so $X\setminus\hat\Sigma$ is the smooth affine curve it defines, $y$ is a unit on it, and the regular functions and $1$-forms of character $-c$ are $y^{-c}R$ and $y^{-c}R\,dx$, with $R=\C[x,1/x,1/(x-1)]$. By the algebraic de Rham theorem, $H^1(X\setminus\hat\Sigma;\C)_{-c}$ is the quotient of $y^{-c}R\,dx$, which the $\xi_{k,l}$ span, by the differentials of $y^{-c}R$. The cokernel of $H^1(X;\C)\to H^1(X\setminus\hat\Sigma;\C)$ is spanned by classes dual to small loops about the points of $\hat\Sigma$, whose characters are multiples of $N/g_i$, and no multiple $\ell$ of $N/g_i$ is $-c$, as $\ell p_i\equiv0$ while $cp_i\not\equiv0$. So $H^1(X\setminus\hat\Sigma;\C)_{-c}\cong H^1_{-c}$, a line by \cref{lem:eigen}. From \[ d\bigl(y^{-c}x^{k+1}(x-1)^{l+1}\bigr)=(s_1+1)\xi_{k,l+1}+(s_2+1)\xi_{k+1,l},\qquad\xi_{k+1,l}-\xi_{k,l+1}=\xi_{k,l}, \] we get, in this line, \[ [\xi_{k+1,l}]=\frac{s_1+1}{s_1+s_2+2}\,[\xi_{k,l}],\qquad[\xi_{k,l+1}]=-\frac{s_2+1}{s_1+s_2+2}\,[\xi_{k,l}] . \] Modulo $\Z$, $s_1+1\equiv-cp_1/N$, $s_2+1\equiv-cp_2/N$ and $s_1+s_2+2\equiv cp_3/N$, and none of these is an integer since $cp_i\not\equiv0$. So all the classes $[\xi_{k,l}]$ are non-zero multiples of one another, and as they span a line, none is zero. \end{proof} \needspace{3\baselineskip} \begin{lemma}\label{lem:nonzero} Let $c\in\Phi\cup-\Phi$ and $a,b\in\Phi$ with $a+b\equiv1-c$. Then $\langle v,[\omega_a\omega_b/\omega]\rangle\ne0$ for every non-zero $v\in V_c$. \end{lemma} \begin{proof} By \eqref{eq:omega-a}, $\omega_a\omega_b/\omega=y^{a+b-1}x^{k}(x-1)^{l}\,dx$ with integers $k$, $l$, and replacing $y^{a+b-1}$ by $y^{-c}$ changes only $k$ and $l$, by a multiple of $y^N=x^{p_1}(x-1)^{p_2}$. The form is holomorphic off the zeros $\Sigma$ of $\omega$, so its class in $H^1(X\setminus\Sigma;\C)_{-c}$ is not zero by \cref{lem:three}; as in the proof of \cref{lem:three}, with $\Sigma$ in place of $\hat\Sigma$, this eigenspace is the line $H^1_{-c}$. Since $c\in\Phi\cup-\Phi$, $H^1(X,\Sigma;\C)_c\cong H^1_c$ is a line (\cref{lem:relative}\ref{it:rel-gen}), and the pairing, being perfect and $T$-invariant, restricts to a perfect pairing between it and the line $H^1(X\setminus\Sigma;\C)_{-c}$; so $\langle v,[\omega_a\omega_b/\omega]\rangle\ne0$ for every non-zero $v\in V_c$. \end{proof} \subsection{The rule}\label{ssec:rule} The real structure of $V$ and the Galois conjugates of $p(V)$ constrain $S$ as follows, at every $N$. \begin{lemma}\label{lem:Sgroup} $S=-S$. If $u$ is a unit modulo $N$ and $S\cap uS\ne\emptyset$, then $uS=S$. If $N$ is prime, $S$ is a subgroup of $(\Z/N)^\times$ containing $-1$. \end{lemma} \begin{proof} Since $V=\overline V$ and $p$ is defined over $\R$, $p(V)$ is the complexification of a real subspace, and complex conjugation maps $H^1_a$ onto $H^1_{-a}$ because $T^*$ is real; so $S=-S$. If $a\in S\cap uS$, then $p(V)$ and $\sigma_u(p(V))$ both contain $H^1_a$, so they are equal by \cref{lem:conj}, which rests on Wright's theorem \cite[Theorem~1.5]{WrightField}, and $uS=S$. If $N$ is prime, every non-zero character is a unit; for $a\in S$ we have $a=a\cdot1\in S\cap aS$, so $aS=S$. Hence $S$ is closed under multiplication, and $-1\in S$. \end{proof} For the set of units in $S$ in place of $S$ this lemma is Mirzakhani and Wright's Lemma~7.6 \cite{MirzakhaniWright}: the units in $S$ form a subgroup of $(\Z/N)^\times$ containing $-1$; at prime $N$ every non-zero character is a unit, so its last clause is theirs. The derivative of an eigenform vanishes against the eigenforms outside its Galois conjugate, because that conjugate is a variation of Hodge structure. \begin{lemma}\label{lem:vanish} Let $u$ be a unit modulo $N$, $a\in uS\cap\Phi$, and $b\in\Phi\setminus uS$. There is a holomorphic family $\alpha_\varpi$ of holomorphic $1$-forms on the surfaces of $\mathcal M\cap U$ with $\alpha_{[\omega]}=\omega_a$ such that \[ \bigl\langle\partial_v[\alpha_\varpi]_{\mathrm{rel}},[\omega_b]\bigr\rangle=0\qquad\text{for every }v\in V . \] \end{lemma} \begin{proof} Let $V_\rho$ be the summand of \cref{lem:conj} with fiber $\bigoplus_{c\in uS}H^1_c$ at $(X,\omega)$. Over $\mathcal M\cap U$ the bundle $H^1$ is the constant bundle $H^1(X;\C)$ and $V_\rho$ is a constant subspace of it, closed under complex conjugation because $uS=-uS$ (\cref{lem:Sgroup}). At $\varpi\in\mathcal M\cap U$, with $H^{1,0}(X_\varpi)\subset H^1(X;\C)$ through the marking, $V_\rho$ is the sum of its intersections with $H^{1,0}(X_\varpi)$ and its conjugate (\cref{lem:conj}); conjugation exchanges the two, so $L_\varpi=V_\rho\cap H^{1,0}(X_\varpi)$ has dimension $\frac12\dim V_\rho$ at every point. Being the kernel of the holomorphic family of maps $V_\rho\to H^1(X;\C)/H^{1,0}(X_\varpi)$ of constant rank, $L$ is a holomorphic bundle, and $L_{[\omega]}=\bigoplus_{c\in uS\cap\Phi}H^{1,0}_c$ contains $\omega_a$. Let $\alpha_\varpi$ be a holomorphic section of $L$ through $\omega_a$. Let $v\in V$. For small $t$ the path $[\omega]+tv$ of the proof of \cref{lem:derivative} lies in $V\cap U=\mathcal M\cap U$. Its Beltrami coefficient $t\nu^{0,1}/(\omega+t\nu^{1,0})$ is holomorphic in $t$, and so are the classes $p[\alpha_{[\omega]+tv}]$, as $\alpha_\varpi$ is a holomorphic section and the path is affine; as a holomorphic form is the harmonic representative of its class, and the harmonic representative of a fixed class depends smoothly on the complex structure, the forms $\alpha_{[\omega]+tv}$, pulled back to the fixed surface, form a $C^1$ family. Their classes lie in the fixed space $V_\rho$, so $p(\partial_v[\alpha_\varpi]_{\mathrm{rel}})=\partial_vp[\alpha_\varpi]\in V_\rho$, and as $\omega_b$ is closed on $X$, \[ \bigl\langle\partial_v[\alpha_\varpi]_{\mathrm{rel}},[\omega_b]\bigr\rangle=\int_X\partial_vp[\alpha_\varpi]\wedge\omega_b . \] The cup product pairs $H^1_c$ with $H^1_b$ only if $c\equiv-b$, and $-b\notin uS$ because $uS=-uS$ and $b\notin uS$. So the integral is zero. \end{proof} \begin{proof}[Proof of \cref{thm:rule}] Let $u$, $a$, $a'$ and $b$ be as in the theorem, and suppose that $b\notin uS$. Take the family $\alpha_\varpi$ of \cref{lem:vanish} and a non-zero $v\in V_{a'}$, which exists because $V_{a'}=H^1(X,\Sigma)_{a'}$ is a line (\cref{lem:S}). By \cref{lem:vanish} and \cref{lem:derivative} with $\theta=\omega_b$, \[ 0=\bigl\langle\partial_v[\alpha_\varpi]_{\mathrm{rel}},[\omega_b]\bigr\rangle=\bigl\langle v,[\omega_a\omega_b/\omega]\bigr\rangle . \] But $a'\in S\subset\Phi\cup-\Phi$ and $a+b\equiv1-a'$, so the right side is not zero by \cref{lem:nonzero}. Hence $b\in uS$. \end{proof} For $a'=-1$ the direction is $[\bar\omega]$, and the non-vanishing is Mirzakhani and Wright's Proposition~7.3(2) \cite{MirzakhaniWright}. \subsection{Residues}\label{ssec:residues} The directions of $V$ in $Z$ are not reached by \cref{thm:rule}. For them the right side of \eqref{eq:deriv} is a sum of residues. Let $\mathcal P$ be the set of pairs $(a,b)$ with $a$ a unit, $a,b\in\Phi$ and $b\not\equiv a$. For $(a,b)\in\mathcal P$ let $F_{ab}=\omega_a\omega_b/\omega$, a meromorphic form holomorphic on $X\setminus\Sigma$, and \[ \lambda_{ab}(f)=\sum_{z\in\Sigma}f(z)\operatorname{Res}_zF_{ab}\qquad(f\in\C^\Sigma), \] a linear form on $\C^\Sigma/\C\cong Z$ by the residue theorem. \begin{lemma}\label{lem:residues} Let $(a,b)\in\mathcal P$. \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:res-vertex} At a point $z$ above vertex $i$, $\operatorname{Res}_zF_{ab}\ne0$ if and only if $[ap_i]+[bp_i]=p_i$. \item\label{it:res-char} $\lambda_{ab}$ vanishes on $(\C^\Sigma)_{c'}$ for every $c'\not\equiv1-a-b$. \item\label{it:res-value} If $c\equiv1-a-b$, $i\in I$ and $(N/g_i)\mid c$, then $\lambda_{ab}(e_{i,c})=g_i\operatorname{Res}_{z_i}F_{ab}$. If $a+b\equiv1$, then $\lambda_{ab}(1_{\Sigma_i})=g_i\operatorname{Res}_{z_i}F_{ab}$ for $i\in I$, and these numbers sum to zero. \end{enumerate} \end{lemma} \begin{proof} \ref{it:res-vertex} As in the proof of \cref{lem:eigen}\ref{it:eigen-form}, in a coordinate $w$ at $z$ with $w^{N/g_i}$ equal to $x$, $x-1$ or $1/x$, we have $\omega_a=w^{[ap_i]/g_i-1}h_a(w^{N/g_i})\,dw$ with $h_a$ holomorphic and $h_a(0)\ne0$, and likewise for $\omega_b$ and $\omega=\omega_1$. So $F_{ab}=w^{m-1}H(w^{N/g_i})\,dw$ with $m=([ap_i]+[bp_i]-p_i)/g_i$ and $H(0)\ne0$, and the residue is the coefficient of $w^{-m}$ in $H(w^{N/g_i})$. It is $H(0)$ if $m=0$ and zero if $m>0$. If $m<0$ it could be non-zero only if $p_i-[ap_i]-[bp_i]=-mg_i$, which lies in $(0,p_i)$, were a multiple of $N$. \ref{it:res-char}, \ref{it:res-value} $T^*F_{ab}=\zeta^{a+b-1}F_{ab}$, so $\operatorname{Res}_{T^kz}F_{ab}=\zeta^{k(a+b-1)}\operatorname{Res}_zF_{ab}$ and $\lambda_{ab}(T^*f)=\zeta^{1-a-b}\lambda_{ab}(f)$, which gives \ref{it:res-char}. For $c\equiv1-a-b$ the terms of $\lambda_{ab}(e_{i,c})=\sum_{k=0}^{g_i-1}\zeta^{kc}\operatorname{Res}_{T^kz_i}F_{ab}$ all equal $\operatorname{Res}_{z_i}F_{ab}$; the case $c\equiv0$ is the same, and the sum is zero by the residue theorem, as $F_{ab}$ has no poles off $\Sigma$. \end{proof} Let $K\subset Z$ be the common kernel of the $\lambda_{ab}$, $(a,b)\in\mathcal P$, and $\bar K$ its complex conjugate. \begin{theorem}\label{thm:residue} Let $\Delta$ be a rational triangle that is not a lattice triangle. If $K\cap\bar K=0$, then $\operatorname{rank}\mathcal M\ge2$. \end{theorem} \begin{proof} Suppose $\operatorname{rank}\mathcal M=1$. Then $S=\{\pm1\}$, $V=\C[\omega]\oplus\C[\bar\omega]\oplus R$ with $R=V\cap Z$, and $R=\bar R$ since $V$ and $Z$ are real. If $R=0$, then $\dim_\C\mathcal M=2$ and $\Delta$ is a lattice triangle by \cref{lem:lattice}; so $R\ne0$. Let $(a,b)\in\mathcal P$ and $u=a$, so that $uS=\{\pm a\}$ and $a\in uS\cap\Phi$. Then $b\notin uS$, as $b\not\equiv a$ and $-a\notin\Phi$. For $\delta f\in R$, \cref{lem:vanish}, \cref{lem:derivative} with $\theta=\omega_b$, and \eqref{eq:pair-res} give \[ 0=\bigl\langle\delta f,[\omega_a\omega_b/\omega]\bigr\rangle=-2\pi i\,\lambda_{ab}(f). \] So $R\subset K$, hence $R=\bar R\subset K\cap\bar K=0$, a contradiction. \end{proof} The criterion is a first-order consequence of Filip's theorem that flat summands are variations of Hodge structure, with Wright's decomposition (\cref{lem:conj}). It bounds $V\cap Z$ itself, while Filip's theorem on the torsion of relative periods \cite[Theorem~1.3]{FilipSplitting} constrains the combinations of zeros that $V\cap Z$ annihilates. For $c\not\equiv0$ with $Z_c\ne0$, the vertex $i\in I$ with $(N/g_i)\mid c$ is unique (\cref{lem:relative}); we call it the vertex of $c$ and write $\mathcal P(c)$ for the set of $(a,b)\in\mathcal P$ with $a+b\equiv1-c$ and $[ap_i]+[bp_i]=p_i$ at that vertex. By \cref{lem:residues}, $\lambda_{ab}(e_{i,c})\ne0$ for $(a,b)\in\mathcal P(c)$. \needspace{4\baselineskip} \begin{corollary}\label{cor:residue} Let $\Delta$ be a rational triangle that is not a lattice triangle, with $\lvert I\rvert\le2$. Suppose that \begin{enumerate}[label=\textup{(\roman*)}] \item\label{it:cr-c} for every $c\not\equiv0$ with $Z_c\ne0$, $\mathcal P(c)$ or $\mathcal P(-c)$ is not empty, and \item\label{it:cr-0} if $\lvert I\rvert=2$, there is $(a,b)\in\mathcal P$ with $a+b\equiv1$ and $[ap_i]+[bp_i]=p_i$ for some $i\in I$. \end{enumerate} Then $\operatorname{rank}\mathcal M\ge2$. \end{corollary} \begin{proof} We show $K\cap\bar K=0$. Let $\delta f\in K\cap\bar K$, with $f=\sum_cf_c$, $f_c\in(\C^\Sigma)_c$. By \cref{lem:residues}\ref{it:res-char}, $\lambda_{ab}(f)=\lambda_{ab}(f_{1-a-b})$. Let $c\not\equiv0$. If $Z_c=0$, then $f_c=0$; otherwise $f_c$ is a multiple of $e_{i,c}$ for the vertex $i$ of $c$. For $(a,b)\in\mathcal P(c)$, $\lambda_{ab}(f)=0$ and $\lambda_{ab}(e_{i,c})\ne0$ then give $f_c=0$. If $\mathcal P(-c)\ne\emptyset$, apply the same to $\bar f$: $\delta\bar f=\overline{\delta f}$ lies in $K$, and the component of $\bar f$ of character $-c$ is $\overline{f_c}$. If $\lvert I\rvert=2$, $Z_0$ is the line spanned by $\delta1_{\Sigma_i}$, and \ref{it:cr-0} with \cref{lem:residues}\ref{it:res-value} gives $\delta f_0=0$; if $\lvert I\rvert=1$, $Z_0=0$. So $\delta f=0$, and \cref{thm:residue} applies. \end{proof} \begin{remark}\label{rem:unit} The condition that $a$ be a unit cannot be dropped. The triangle $\tri136{10}$ is not a lattice triangle and has rank one (\cref{prop:prym}); here $I=\{2,3\}$ and $Z=Z_0\oplus Z_5$, with $3$ the vertex of $5$. The pair $(7,4)\in\mathcal P$ has $7+4\equiv1$ and $[7\cdot3]+[4\cdot3]=3=p_2$, so condition~\ref{it:cr-0} holds. The characters $2,4\in\Phi$, which are not units, have $2+4\equiv1-5$ and $[2\cdot6]+[4\cdot6]=6=p_3$; with such pairs admitted, condition~\ref{it:cr-c} would hold as well. \end{remark} \section{Prime denominators}\label{sec:prime-proof} This section deduces \cref{thm:primeN} from \cref{thm:subgroups}. What remains beyond \cref{thm:rule} is to show that the two kinds of triangle excepted in \cref{thm:subgroups} have rank at least two. For $\tri1{(N-3)/2}{(N+1)/2}N$ we do this with the criterion by residues for every odd $N\ge13$ other than $15$, since \cref{sec:obtuse-tri} needs the composite $N$ as well. \subsection{The family \texorpdfstring{$\tri1{(N-3)/2}{(N+1)/2}N$}{(1,(N-3)/2,(N+1)/2)/N}}\label{ssec:A1} Let $\Delta=\mbox{$\tri1{(N-3)/2}{(N+1)/2}N$}$ with $N$ odd. As $2p_3\equiv1$ and $2p_2\equiv-3$, writing a character as $a\equiv2\alpha$ with $0\le\alpha7\ell>3(\ell+1)+3\ge3\lvert j\rvert+3$. \end{proof} \begin{lemma}\label{lem:A1-third} Let $3\mid N$ with $N\ge21$, and let $a$ be the least odd prime not dividing $N$. Then $(a,2N/3+1-a)\in\mathcal P(N/3)$. \end{lemma} \begin{proof} First $a7a$ as in the previous proof. Now $a=2\beta$ with $\beta=(N+a)/2\in(N/2,2N/3)$, and $b=2N/3+1-a=2\alpha$ with $\alpha=N/3-(a-1)/2\in(0,N/3)$, so $a,b\in\Phi$ by \cref{lem:A1-Phi}; $a$ is a unit, and $a4N(k-1)^2$, then $H$ is not stable. \end{proposition} \begin{proof} The number $\mathcal S_1$ of pairs $(x,y)\in\Phi^2$ with $x+y\in1+H$ is $\sum_{h\in H}\lvert W(1-h)\rvert$. If $H$ is stable, then $\lvert W(1-h)\rvert\le k-1$ for $h\ne1$ by \ref{it:S2}, and $W(0)=\emptyset$, so $\mathcal S_1\le(k-1)^2$. On the other hand, with $F(t)=\sum_{x\in\Phi}\mathrm e(tx/N)$ and $\eta(u)=\sum_{h\in H}\mathrm e(uh/N)$, \[ \mathcal S_1=\frac1N\sum_{t\in\mathbb F_N}F(t)^2\,\mathrm e(-t/N)\,\eta(-t). \] The term $t=0$ is $\lvert\Phi\rvert^2k/N$. For $u\ne0$, $\eta(u)=\frac1m\sum_\chi\bar\chi(u)\,g(\chi)$ with the Gauss sums $g(\chi)=\sum_z\chi(z)\mathrm e(z/N)$, and $g(\chi_0)=-1$, $\lvert g(\chi)\rvert=\sqrt N$ otherwise, so $\lvert\eta(u)\rvert\le\eta^*$. By Parseval, $\sum_{t\ne0}\lvert F(t)\rvert^2=N\lvert\Phi\rvert-\lvert\Phi\rvert^2$. With $\lvert\Phi\rvert=(N-1)/2$, \[ \mathcal S_1\ge\frac{\lvert\Phi\rvert^2k}N-\eta^*\Bigl(\lvert\Phi\rvert-\frac{\lvert\Phi\rvert^2}N\Bigr)=\frac{(N-1)^2k-(N^2-1)\eta^*}{4N}>(k-1)^2 .\qedhere \] \end{proof} \subsection{The lattice of the triangle}\label{ssec:lattice} For $k<\sqrt N$ these bounds are empty, and we count $W(c)$ exactly. Let \[ \Lambda_0=\{s\in\Z^3:\ s_1+s_2+s_3=0\},\qquad\Lambda=\bigl\{s\in\Lambda_0:\ s\equiv y(p_1,p_2,p_3)\bmod N,\ y\in\Z/N\bigr\}. \] For $s\in\Lambda$ the class $y(s)$ is determined by $s$, as $p_1$ is a unit. Let $\lVert s\rVert=\max_l\lvert s_l\rvert$ on $\Lambda_0\otimes\R$; areas are taken in the coordinates $(s_a,s_b)$ for any $a\ne b$, which identify $\Lambda_0$ with $\Z^2$. For $y\in G$ let $\mu(y)$ be the least norm of a vector $s\in\Lambda$ with $y(s)=y$; so $\mu(y)/N$ is the distance from $0$ of the class of $y(p_1,p_2,p_3)/N$ in $\R^3/\Z^3$, which lies in the subtorus $(\Lambda_0\otimes\R)/\Lambda_0$. For $r\ge0$ let $\mathcal Y(r)=\{y\in G:\ \mu(y)\le r\}$ and $\mathcal Y_\Phi(r)=\mathcal Y(r)\cap\Phi$. Let $\lambda=\min_{y\in G}\mu(y)$, attained at $w\in\Lambda$, and $x_0=y(w)$. Lattices of this kind, for the divisors of the denominator and with their duals, are used by Angdinata, Chen, Ono, Thorner, Zhang and Zhang to count witnesses \cite[\S\S4.2--4.3]{ACOTZZ}. \needspace{4\baselineskip} \begin{lemma}\label{lem:lat} \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:lat-min} Let $y\in\Phi$, $d_l=[yp_l]$, and $i$ the index of the largest $d_l$. Then $\mu(y)=N-d_i$, attained by $d-N\mathbf e_i$, whose only negative coordinate is at $i$. Also $\mu(-y)=\mu(y)$, and if $\mu(y)2\sqrt{N/3}$, so $\lambda'$ is attained at some $s$ with $y(s)\ne0$, and $\lambda'=\lambda$. Let $s\in\Lambda$ with $0<\lVert s\rVert2r$. Finally $\mathcal Y(r)=-\mathcal Y(r)$, and exactly one of $\pm y$ lies in $\Phi$. \end{proof} The exact count is in terms of the following numbers. For $l\in\{1,2,3\}$, with $\{l,l',l''\}=\{1,2,3\}$, and an integer $1\le D\le N$, let \[ n_l(D)=\#\{y\in G:\ [yp_{l'}]+[yp_{l''}]N-D$, since a residue sum $2N$ would need $[yp_l]>N$. \needspace{4\baselineskip} \begin{lemma}\label{lem:exact} Let $c\in G$, $c'$ the one of $\pm c$ in $\Phi$, $d_l=[c'p_l]$, $i$ the index of the largest $d_l$, and $\{i,i',i''\}=\{1,2,3\}$. Let $\varepsilon_c$ be $1$ if $c\in\Phi$ and $0$ if not. Then $\mu(c)=N-d_i=d_{i'}+d_{i''}$, and \begin{align} \lvert W(c)\rvert&=\tfrac{N-1}2-\varepsilon_c-n_1(d_1)-n_2(d_2)-n_3(d_3),\label{eq:exact-I}\\ \lvert W(c)\rvert&=\mu(c)-\varepsilon_c-n_i(\mu(c)+1)-n_{i'}(d_{i'})-n_{i''}(d_{i''}).\label{eq:exact-II} \end{align} \end{lemma} \begin{proof} The value of $\mu(c)$ is \cref{lem:lat}\ref{it:lat-min}. For a unit $x\ne c$ write $a_l=[xp_l]$. We first show that \begin{equation}\label{eq:count-Phi} \#\{y\in\Phi:\ [yp_l]N-d_l$ for two indices, since $2N-d_l-d_{l'}>N$, nor $[yp_l]=N-d_l$, which would mean $y=-c'\notin\Phi$. And $y\in\Phi$ has $[yp_l]>N-d_l$ exactly when $[yp_{l'}]+[yp_{l''}]d_l\}$, so $c-x$ has residue sum $N-\sum_la_l+N\nu_x$, with $\nu_x$ the number of $l$ with $x\notin E_l$. So $x,c-x\in\Phi$ exactly when $\nu_x=1$ (then $\sum_la_l=2N$ would give $c-x$ residue sum $0$): $W(c)$ is the set of $x$ in exactly two of the $E_l$, and no $x$ is in all three, as $\nu_x=0$ would give $c-x$ residue sum $N-\sum_la_l\le0$. If $\nu^{(t)}$ counts the $x\in G$ in exactly $t$ of the $E_l$, then $\sum_t\nu^{(t)}=N-1$ and $\nu^{(1)}+2\nu^{(2)}=N-3$, so $\lvert W(c)\rvert=\nu^{(2)}=\nu^{(0)}-2$. The $x$ in none of the $E_l$ are $c$ and the $x$ with $a_l>d_l$ for all $l$, which have $\sum_la_l>N$, so $\sum_la_l=2N$, and are the $-y$ with $y$ as in \eqref{eq:count-Phi}. This gives \eqref{eq:exact-I}. If $c\notin\Phi$, then $[cp_l]=N-d_l$, and $c-x$ has residue sum $2N-\sum_la_l+N\cdot\#\{l:\ a_l>N-d_l\}$. So $x,c-x\in\Phi$ exactly when $a_lN-d_{i'}$, of sum more than $N$; one in the last two would have $[yp_{i'}]+[yp_{i''}]>2N-\mu(c)>N$; and the first and third are like the first two. \end{proof} We bound the sets $\mathcal Y_\Phi$ by counting lattice points. \begin{lemma}\label{lem:count} Let $\mathcal K$ be a compact convex subset of $\Lambda_0\otimes\R$. Then \[ \#(\mathcal K\cap\Lambda)\le\frac{\operatorname{area}\mathcal K}N+\frac{\operatorname{diam}\mathcal K}\lambda+\frac{\lambda\operatorname{diam}\mathcal K}N+1 , \] with the diameter for $\lVert\cdot\rVert$. Consequently: \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:count-ball} for $r0$ for which $\tau v_l$ passes an integer lowers $S_v$ by one, and each with $v_l<0$ raises it by one; if two of the $\tau v_l$ are integers, so is the third. So an arc of $J_v$ can begin only where some $\tau v_l$ with $v_l>0$ passes an integer, at one of at most $\sum_{v_l>0}v_l$ points; for a vector with sum zero and three non-zero coordinates this sum is $\lVert v\rVert$. \ref{it:line-hol} With $t=[x/x_0]\in[1,N-1]$ we have $x(p_1,p_2,p_3)\equiv tw$, so $[xp_l]=N\{tw_l/N\}$ and the residue sum of $x$ is $NS_w(t/N)$; and $t/N\notin B_w$, as $0<\lvert w_l\rvert\le\lambda44.72$. The idea is that each $c\in Q_H$ must have $\mu(c)$ small, and $\Lambda$ has too few short vectors to supply $k-1$ such $c$, except when $\lambda=3$. \emph{Step 1: $\mu(c)0$ for $\sigma\ge44$. If $\lambda\ge10$, then $\mu(c)(N-\mu(c))/N\ge3N/16$, and \cref{lem:plane} with $N/\lambda\le N/10$ and $\lambda\le2\sqrt{N/3}$ gives $\lvert W(c)\rvert\ge7N/80-(2/\sqrt3)\sigma-9/2$, which exceeds $2\sigma$ because $7\sigma^2/80-(16/5)\sigma-9/2>0$ for $\sigma\ge44$. Either way $\lvert W(c)\rvert>2\sqrt N\ge k$. \emph{Step 2: $\lambda=3$.} Replacing $(w,x_0)$ by $(-w,-x_0)$ if needed, $w$ is an ordering of $(-3,1,2)$; let $i$ be the position of $-3$. Let $c\in Q_H$. As $3\mu(c)0$, and $\mathcal Y_\Phi(\mu(c))=\{jx_0:\ 1\le j\le\lvert j_c\rvert\}$. All these elements, $c'$ among them, have their largest residue at $i$, as their vectors $jw$ are negative at $i$; so $i$ is the index of \cref{lem:exact} for $c$. A $y$ counted in \eqref{eq:exact-II} by some $n_l$ has $[yp_l]>N-\mu(c)-1>N/2$, so its largest residue is at $l$, and it lies in $\mathcal Y_\Phi(\mu(c))$ by \cref{cor:exact}; hence $l=i$, and $n_{i'}(d_{i'})=n_{i''}(d_{i''})=0$. Every $y\in\mathcal Y_\Phi(\mu(c))$ has $[yp_{i'}]+[yp_{i''}]=\mu(y)\le\mu(c)$, so $n_i(\mu(c)+1)=\lvert j_c\rvert$. Now \eqref{eq:exact-II} reads \[ \lvert W(c)\rvert=2\lvert j_c\rvert-\mathbf 1\{j_c>0\} . \] As $k$ is even, the bound $\lvert W(c)\rvert\le k-1$ puts $j_c$ in $J^*=\{-(k/2-1),\dots,-1,1,\dots,k/2\}$. The map $c\mapsto j_c$ is injective and $\lvert J^*\rvert=k-1=\lvert Q_H\rvert$, so $Q_H=x_0J^*$ and \[ H=\{1-jx_0:\ -(k/2-1)\le j\le k/2\}. \] The group $H$ is cyclic of order $k$, so $\sum_{h\in H}h^t=0$ in $\mathbb F_N$ for $1\le t\le k-1$. For $t=1$ this is $k-x_0k/2=0$, so $x_0=2$. If $k=2$, then $2(p_1,p_2,p_3)$ is congruent to an ordering of $(-3,1,2)$, and $\{p_1,p_2,p_3\}=\{1,(N-3)/2,(N+1)/2\}$. If $k\ge4$, then $H=\{\pm1,\pm3,\dots,\pm(k-1)\}$, and for $t=2$, \[ \sum_{h\in H}h^2=2\sum_{j=1}^{k/2}(2j-1)^2=\frac{k(k-1)(k+1)}3 , \] which $N$ does not divide, since $N>3$ and $1\le k-10.72418$. Let $c\in Q_H$ and $\mu=\mu(c)1.18k$ and $q(N/4)=N(\xi/4-3/32)>0.0872N>2\sigma\ge k$, and $2k\le4\sigmak$ on $[2k,N/4]$, hence $\mu<2k$, and then $q(\mu)\ge\mu(\xi-3k/N)$ gives \[ \mu(c)\le\mu^*=\frac k{\xi-3k/N}<1.695k\qquad(c\in Q_H). \] If $k=2$, then $Q_H=\{2\}$ and $\lambda\le\mu(2)<4$, a contradiction; so $k\ge4$. (3a) If $\lambda\mu^*\frac{k(N-1)(N-3)}2\ge4Nk^2>4N(k-1)^2 , \] and \cref{prop:large-order} applies. If $k>(N-1)(N-3)/(8N)$, then $m<8N/(N-3)<8.02<11.15<(N-5)/(4\sqrt N)$, and \cref{prop:small-index} applies. It remains to see that in the two exceptional cases $\{\pm1\}$ is stable, that is, that the triangle has no witness. For $\tri1{(N-3)/2}{(N+1)/2}N$, write $a=2\alpha$ and $2-a=2\beta$ with $0\le\alpha,\beta0\}$, which is not empty, as $q\ge2$. If $J=\{j_1\}$, then $q-1=r_{j_1}\le q/2$, so $q=2$, $r_{j_1}=1$, $n_{j_1}=2$ and $E_{j_1}=0$. The other two fibers have $E_j=2$ and contain the three cone points, so one consists of a single cone point with $e=2$ and the other of two cone points with $e=1$, which then have the same angle $2\pi\beta_j$. If $\lvert J\rvert=3$, then $\beta_j=1/n_j$ for all $j$, and $(n_1,n_2,n_3)$ is $(2,3,6)$, $(2,4,4)$ or $(3,3,3)$ up to order. If $J=\{1,2\}$ with $n_1\le n_2$, then $r_1+r_2=q-1$ reads \begin{equation}\label{eq:cover-two} q\Bigl(1-\frac1{n_1}-\frac1{n_2}\Bigr)=1-\frac{E_1}{n_1}-\frac{E_2}{n_2}\le1 , \end{equation} with $1-1/n_1-1/n_2=\beta_3>0$, and $r_2\ge1$ gives $q\ge n_2+E_2$. If $n_1\ge3$, the left side of \eqref{eq:cover-two} is at least $n_2(2/3-1/n_2)\ge1$, with equality only for $n_1=n_2=q=3$, and then $\beta_3=1/3$. If $n_1=2$ and $n_2=n\ge3$, \eqref{eq:cover-two} reads $q(n-2)=2n-nE_1-2E_2$, so $E_1\le1$, and $q\ge n$ gives $n\le4-E_1-2E_2/n$. If $E_1=1$, then $n=3$, $E_2=0$, $q=3$ and $\beta_3=1/6$; if $E_1=0$, then $n=4$, with $E_2=0$, $q=4$ and $\beta_3=1/4$, or $n=3$, with $q=6-2E_2\ge3+E_2$, so $E_2\le1$, and $\beta_3=1/6$. So if $\lvert J\rvert\ge2$, $(\beta_1,\beta_2,\beta_3)$ is $(1/2,1/3,1/6)$, $(1/2,1/4,1/4)$ or $(1/3,1/3,1/3)$ up to order, and each $\alpha_v=e_v\beta_j$ is a multiple of $1/6$, $1/4$ or $1/3$ respectively; three such numbers in $(0,1)$ with sum $1$ are those listed. \end{proof} \needspace{3\baselineskip} \begin{theorem}\label{thm:aut} Let $\Delta$ be scalene and not $\tri123{6}$. Then $\mathcal G=\langle T\rangle$. In particular the identity is the only automorphism $\tau$ of $X$ with $\tau^*\omega=\omega$; for odd $N$ none has $\tau^*\omega=-\omega$, and for even $N$ only $\iota$ does. \end{theorem} \begin{proof} By \eqref{eq:genus} and $g_i\le p_i$, the genus of $X$ is at least two unless $p_1$, $p_2$, $p_3$ all divide $N$, which for a scalene triangle happens only for $\tri123{6}$. So $\mathcal G$ is finite. Writing $\tau^*\omega=c(\tau)\omega$, $c$ is a homomorphism from a finite group to $\C^*$, so $\lvert c(\tau)\rvert=1$ and $\mathcal G$ preserves the flat metric $\lvert\omega\rvert$. If a finite group of automorphisms of a Riemann surface preserves a flat cone metric, the quotient carries a flat cone metric whose angle at the image of $z$ is the angle at $z$ divided by the order of the stabilizer of $z$, since the stabilizer is cyclic and acts on a punctured neighborhood of $z$ freely, by rotations of the cone. The quotient by $\langle T\rangle$ is $x\colon X\to\mathbb P^1$ with the metric $\lvert x^{p_1/N-1}(x-1)^{p_2/N-1}dx\rvert$, the double $D$ of $\Delta$, with three cone points of angles $2\pi p_i/N$. Let $D'=X/\mathcal G$ and $f\colon D\to D'$ the induced map, of degree $q=[\mathcal G:\langle T\rangle]$. For $z\in X$ over $d\in D$, the ramification index of $f$ at $d$ is $\lvert\mathcal G_z\rvert/\lvert\langle T\rangle_z\rvert$, and the angles at $d$ and $f(d)$ are the angle at $z$ divided by $\lvert\langle T\rangle_z\rvert$ and by $\lvert\mathcal G_z\rvert$; this is \eqref{eq:cover-angle}. If $q\ge2$, \cref{lem:cover} says that two of the $p_i$ are equal or that $\Delta$ is $\tri114{6}$, $\tri123{6}$, $\tri112{4}$ or $\tri111{3}$, and only $\tri123{6}$ of these is scalene. So $q=1$. Finally $(T^j)^*\omega=\zeta^j\omega$ is $\omega$ only for $N\mid j$, and $-\omega$ only for $N$ even and $j\equiv N/2\pmod N$. \end{proof} For even $N$ let \[ E^-=\{u\in H^1(X,\Sigma;\C):\ \iota^*u=-u\}=\bigoplus_{\ell\text{ odd}}H^1(X,\Sigma)_\ell , \] since $\iota^*=(T^*)^{N/2}$ acts on $H^1(X,\Sigma)_\ell$ by $(-1)^\ell$, and $Z^-=E^-\cap Z=\bigoplus_{c\text{ odd}}Z_c$. \begin{corollary}\label{cor:odd} Let $N$ be even and $\Delta$ scalene, not $\tri123{6}$. Then $V\subset E^-$. Consequently: \begin{enumerate}[label=\textup{(\roman*)}] \item\label{it:odd-S} every character in $S$ is odd; \item\label{it:odd-rel} $V\cap Z\subset Z^-$, and $\dim Z^-$ is the sum of $g_i/2$ over the $i\in I$ with $N/g_i$ odd, the number of pairs of zeros of $\omega$ that $\iota$ exchanges; in particular $\operatorname{rel}\mathcal M=0$ if $N/g_i$ is even for every $i\in I$; \item\label{it:odd-R} if $\Delta$ is not a lattice triangle, and $\mathcal P(c)$ or $\mathcal P(-c)$ is not empty for every odd $c$ with $Z_c\ne0$, then $\operatorname{rank}\mathcal M\ge2$. \end{enumerate} \end{corollary} \begin{proof} Since $\iota$ is an isomorphism from $(X,-\omega)$ to $(X,\omega)$, it is one from $(-\mathrm{Id})\,g(X,\omega)$ to $g(X,\omega)$ for every $g\in\GL(2,\R)$. So $-\mathrm{Id}$ fixes the orbit of $(X,\omega)$ pointwise, hence also $\mathcal M$. Mark $(X,\omega)$ by $\varphi\colon(S_0,\Sigma_0)\to(X,\Sigma)$. By \cref{thm:aut} the identity is the only automorphism fixing $\omega$, so the period map of marked surfaces is a chart of the stratum at $(X,\omega)$, which we read in $H^1(X,\Sigma;\C)$ through $\varphi$ on a small neighborhood $U'\subset U$ of $[\omega]$ with $\iota^*U'=-U'$. In this chart $-\mathrm{Id}$ lifts to $(Y,\eta,\psi)\mapsto(Y,-\eta,\psi\varphi^{-1}\iota\varphi)$, which fixes $(X,\omega,\varphi)$, as $\iota^2=1$, and acts on periods by the linear map $-\iota^*$. As the chart is injective, $\mathcal M\cap U'$ lies in the fixed space of $-\iota^*$, which is $E^-$; so $V\subset E^-$, as $\mathcal M\cap U=V\cap U$ (\cref{ssec:orbit}). \ref{it:odd-S} For $a\in S$ the line $V_a=H^1(X,\Sigma)_a$ (\cref{lem:S}) lies in $E^-$, while $E^-\cap H^1(X,\Sigma)_a=0$ for even $a$. \ref{it:odd-rel} As $Z$ is $T^*$-stable, $V\cap Z\subset E^-\cap Z=Z^-$. By \cref{lem:relative}, $Z_0$ has the even character $0$, and $Z_c$ for $c\not\equiv0$ is a line if $c$ is a multiple of $N/g_i$ for some $i\in I$, and zero otherwise. An odd multiple of $N/g_i$ exists only if $N/g_i$ is odd; then $g_i$ is even, and the odd multiples are $kN/g_i$ with $k$ odd, $0N/2$. For $\lvert t\rvert<1$ let $X_t$ be the surface with the complex structure in which $\omega+t\bar\omega$ is holomorphic, marked by the identity. Its holomorphic charts are $\vartheta+t\bar\vartheta$ for a local primitive $\vartheta$ of $\omega$; $(X_t)_{\lvert t\rvert<1}$ is the Teichm\"uller disc of $(X,\omega)$ and lies in its $\GL(2,\R)$-orbit, and through the marking $H^{1,0}(X_t)\subset H^1(X;\C)$. We write $d^2x$ for Lebesgue measure on $\C$ and use the coordinate $x$ of \eqref{eq:omega}. \subsection{The pairs and the integral}\label{ssec:second-setting} For an integer $m$ let $\langle m\rangle=1-\{-m/N\}\in(0,1]$, which is $\{m/N\}$ unless $N\mid m$, when it is $1$. For $k\in\Z/N$ put \[ \mathrm w(k)=\langle kp_1\rangle+\langle kp_2\rangle+\langle kp_3\rangle\in\{1,2,3\}. \] By \cref{lem:eigen} and its proof, $\mathrm w(k)=1$ if and only if $k\in\Phi$; $\mathrm w(k)+\mathrm w(-k)=3$ if $k\in\Phi\cup-\Phi$; and if $k\not\equiv0$ is not in $\Phi\cup-\Phi$, then exactly one $\langle kp_i\rangle$ is $1$, so $\mathrm w(k)=2$, and $H^1_k=0$. For $k\in\Phi$, $\omega_k=\varphi_k(x)\,dx$ on the upper half-plane with $\varphi_k(x)=x^{\langle kp_1\rangle-1}(x-1)^{\langle kp_2\rangle-1}$, on one branch of $y$, the same for every $k$. For every $k$ the same formula defines a meromorphic form $\varphi_k\,dx$ of character $k$ on $X$, namely $y^kx^i(x-1)^j\,dx$ with the integers $i$, $j$ for which the exponents are $\langle kp_1\rangle-1$ and $\langle kp_2\rangle-1$. Write $\varphi=\varphi_1$ and \[ \mu=\frac{p_1+p_2}N<\frac12,\qquad\xi=\frac{p_1}{p_1+p_2},\qquad I_0=\int_\C\lvert\varphi\rvert^2\,d^2x,\qquad I_1=\int_\C\lvert\varphi(x)\rvert^2x\,d^2x . \] The map $\int\varphi\,dx$ takes the upper half-plane onto a triangle $\Delta_0$ similar to $\Delta$ and the lower half-plane onto its mirror image, so $I_0$ is twice the area of $\Delta_0$. The integral $I_1$ converges, as $\lvert\varphi\rvert^2=O(\lvert x\rvert^{-2-2p_3/N})$ at infinity and $2p_3/N>1$. \begin{lemma}\label{lem:moment} $I_1=\xi I_0$. \end{lemma} \begin{proof} The function $h(x)=x(x-1)\lvert\varphi(x)\rvert^2=x^{p_1/N}(x-1)^{p_2/N}\,\overline{\varphi(x)}$ has $\partial_xh=\lvert\varphi\rvert^2\bigl(\tfrac{p_1}N(x-1)+\tfrac{p_2}Nx\bigr)=\lvert\varphi\rvert^2(\mu x-p_1/N)$. By Stokes' formula, $\int\partial_xh\,d^2x$ over the region $\epsilon<\lvert x\rvert\epsilon$ is a sum of integrals of $h\,d\bar x$ over three circles. On $\lvert x\rvert=R$, $\lvert h\rvert=O(R^{2\mu-2})$, so that integral is $O(R^{2\mu-1})$, which tends to $0$ because $\mu<1/2$; this is where we use that $\Delta$ is obtuse. On $\lvert x\rvert=\epsilon$, $\lvert h\rvert=O(\epsilon^{2p_1/N-1})$ and the integral is $O(\epsilon^{2p_1/N})$, and likewise at $1$. Hence $\mu I_1=(p_1/N)I_0$. \end{proof} Let $\mathcal P_2$ be the set of ordered pairs $(a,b)$ with $a,b\in\Phi$, $a+b\equiv4$, $a\not\equiv1$, $\mathrm w(c)=2$ for $c=a-2$, and either $b$ a unit with $a\not\equiv\pm b$, or $b$ not a unit, $a$ a unit, and $c$ a unit or $N$ dividing one of $cp_1$, $cp_2$, $cp_3$. The conditions on $c$ and on units keep $H^1_a$ and $H^1_c$ out of the summand containing $H^1_{-b}$ at rank one (step (iv) of the proof of \cref{thm:second}); $\mathrm w(c)=2$ is also the hypothesis of \cref{lem:psi}. For $a,b\in\Phi$ with $a+b\equiv4$ and $\mathrm w(a-2)=2$, and $c=a-2$, let $\epsilon_1=\langle ap_1\rangle-p_1/N$, $\epsilon_2=\langle ap_2\rangle-p_2/N$, \begin{gather*} E_1=\langle bp_1\rangle+\langle cp_1\rangle-\tfrac{2p_1}N,\qquad E_2=\langle bp_2\rangle+\langle cp_2\rangle-\tfrac{2p_2}N,\\ E_1'=\langle ap_1\rangle-\langle cp_1\rangle-\tfrac{2p_1}N+1,\qquad E_2'=\langle ap_2\rangle-\langle cp_2\rangle-\tfrac{2p_2}N+1,\\ P(x)=x^{E_1}(x-1)^{E_2},\qquad Q(x)=x^{E_1'}(x-1)^{E_2'}\bigl(\epsilon_1(x-1)+\epsilon_2x\bigr). \end{gather*} The four exponents are integers, since $b+c\equiv2$ and $a-c=2$. Let $\chi_a(x)=\lvert\varphi(x)\rvert^2Q(x)$ and \[ G(x)=\frac1\pi\int_\C\frac{\chi_a(x')}{x-x'}\,d^2x' . \] A square-integrable form is \emph{closed} if it is closed as a current; for a form that is smooth off finitely many points this is the same as being closed off them, as a point has zero capacity in dimension two. \begin{lemma}\label{lem:psi} Let $a\in\Phi$ with $\mathrm w(a-2)=2$, and $c=a-2$. The integral $G$ converges, and $\psi=(G\circ x)\,\varphi_c\,dx$ is the only square-integrable form of type $(1,0)$ and character $c$ on $X$ such that $\psi+(\omega_a/\omega)\bar\omega$ is closed. \end{lemma} \begin{proof} Write $(\omega_a/\omega)\bar\omega=\Theta_a\,d\bar x$ with $\Theta_a=\lvert\varphi\rvert^2\varphi_a/\varphi^2$, and $\psi=\Psi\,dx$. Off the branch points, $\psi+\Theta_a\,d\bar x$ is closed when $\partial_{\bar x}\Psi=\partial_x\Theta_a$. For $\Psi=\varphi_cH$ this reads $\partial_{\bar x}H=\partial_x\Theta_a/\varphi_c$, and a direct computation gives \[ \frac{\partial_x\Theta_a}{\varphi_c}=\lvert\varphi\rvert^2\,\frac{\varphi_a}{\varphi^2\varphi_c}\Bigl(\frac{\epsilon_1}x+\frac{\epsilon_2}{x-1}\Bigr)=\lvert\varphi\rvert^2x^{E_1'}(x-1)^{E_2'}\bigl(\epsilon_1(x-1)+\epsilon_2x\bigr)=\chi_a . \] At $0$, $\lvert\chi_a\rvert=O(\lvert x\rvert^{\langle ap_1\rangle-\langle cp_1\rangle-1})$, with exponent greater than $-2$, and likewise at $1$. At infinity $\lvert\chi_a\rvert=O(\lvert x\rvert^{\langle cp_3\rangle-\langle ap_3\rangle-2})$, because $\mathrm w(a)=1$ and $\mathrm w(c)=2$ give \[ \bigl(\langle ap_1\rangle+\langle ap_2\rangle\bigr)-\bigl(\langle cp_1\rangle+\langle cp_2\rangle\bigr)=\langle cp_3\rangle-\langle ap_3\rangle-1 , \] and this exponent lies in $(-3,-1)$. So $G$ converges, $\partial_{\bar x}G=\chi_a$ as distributions, $G=O(1+\lvert x\rvert^{\langle ap_1\rangle-\langle cp_1\rangle}\log(1/\lvert x\rvert))$ at $0$ and likewise at $1$, and $G=O(\lvert x\rvert^{\max(\langle cp_3\rangle-\langle ap_3\rangle,0)-1}\log\lvert x\rvert)$ at infinity. Hence \[ \lvert\varphi_cG\rvert^2=O\bigl(\lvert x\rvert^{2\langle cp_1\rangle-2}+\lvert x\rvert^{2\langle ap_1\rangle-2}\log^2\lvert x\rvert\bigr) \] at $0$, likewise at $1$, and, as $\lvert\varphi_c\rvert^2$ has order $\lvert x\rvert^{-2\langle cp_3\rangle}$ at infinity, \[ \lvert\varphi_cG\rvert^2=O\bigl(\lvert x\rvert^{-2\min(\langle ap_3\rangle,\langle cp_3\rangle)-2}\log^2\lvert x\rvert\bigr) \] there. All are integrable, so $\psi$ is square integrable. So is $(\omega_a/\omega)\bar\omega$, as $\omega_a$ is, and their sum is closed off finitely many points, hence closed. If $\psi'$ is another such form, then $\psi'-\psi=\varphi_ch\,dx$ with $h$ holomorphic on $\C\setminus\{0,1\}$ and $\varphi_ch$ square integrable near $0$, $1$ and $\infty$. The terms $x^k$ of the Laurent series of $h$ at $0$ are orthogonal on circles, so each term with a non-zero coefficient has $\lvert x\rvert^{2\langle cp_1\rangle-2+2k}$ integrable at $0$, that is $k>-\langle cp_1\rangle\ge-1$; likewise at $1$. At infinity $\lvert x\rvert^{2k-2\langle cp_3\rangle}$ must be integrable, so $k<\langle cp_3\rangle-1\le0$. Hence $h$ is entire and tends to $0$ at infinity, and $h=0$. \end{proof} For such $a$ and $b\in\Phi$ with $a+b\equiv4$, $(\omega_b/\omega)\bar\omega=\Theta_b\,d\bar x$ with $\Theta_b=\lvert\varphi\rvert^2\varphi_b/\varphi^2$, and $\varphi_cG\,\Theta_b=\lvert\varphi\rvert^2G\,\varphi_c\varphi_b/\varphi^2=\lvert\varphi\rvert^2GP$. Set \[ J(a,b)=\int_\C\lvert\varphi(x)\rvert^2G(x)P(x)\,d^2x . \] The $2$-form $\psi\wedge(\omega_b/\omega)\bar\omega$ has character $c+b-2\equiv0$, so it is pulled back from the sphere; as $x$ has degree $N$ and $dx\wedge d\bar x=-2i\,d^2x$, \begin{equation}\label{eq:I-J} \int_X\psi\wedge\frac{\omega_b}\omega\,\bar\omega=-2iN\,J(a,b). \end{equation} \subsection{The criterion}\label{ssec:second-criterion} At rank one the splitting of \cref{lem:conj} can be written down completely. For a unit $u$ put $H^1_{\pm u}=H^1_u\oplus H^1_{-u}$, and let $H_\times$ be the sum of the $H^1_u$ over the units $u$. \begin{lemma}\label{lem:split} Suppose $\operatorname{rank}\mathcal M=1$. Over the Teichm\"uller disc there are constant subspaces of $H^1(X;\C)$, equal at $X$ to the planes $H^1_{\pm u}$, one for each unit $u$ up to sign, and to \[ H_\times^\perp=\bigoplus_{k\text{ not a unit}}H^1_k , \] whose direct sum is $H^1(X;\C)$, and each of which, at every $X_t$ with $\lvert t\rvert$ small enough, is the direct sum of its intersections with $H^{1,0}(X_t)$ and $\overline{H^{1,0}(X_t)}$. \end{lemma} \begin{proof} By \cref{lem:S}, $S=\{\pm1\}$ and $p(V)=H^1_{\pm1}$. By \cref{lem:conj}, for each unit $u$ the plane $H^1_{\pm u}=\sigma_u(p(V))$ is the fiber at $X$ of a summand $V_\rho$ of Wright's decomposition, and at every point of $\mathcal M\cap U$, in particular at $X_t$ for small $\lvert t\rvert$, the fiber of $V_\rho$ is the sum of its intersections with $H^{1,0}$ and $H^{0,1}$. The disc lies in the orbit of $(X,\omega)$, hence in the smooth part $\mathcal M_0$ (\cref{ssec:orbit}), and it is simply connected, so over it each $V_\rho$ is a constant subspace of $H^1(X;\C)$. For distinct planes these are distinct summands, hence independent, and their sum is the constant space $H_\times$. The cup product is preserved by the flat structure and, being $T^*$-invariant, pairs $H^1_j$ with $H^1_k$ to zero unless $j+k\equiv0$; as it is non-degenerate, it pairs $H^1_k$ perfectly with $H^1_{-k}$. The units are closed under $k\mapsto-k$, so the cup product is non-degenerate on $H_\times$, and the symplectic orthogonal of $H_\times$ is a constant complement, equal at $X$ to the sum of the $H^1_k$ with $k$ not a unit. Finally, $H^{1,0}(X_t)$ and its conjugate are isotropic, so the orthogonal of a subspace $Y=(Y\cap H^{1,0})\oplus(Y\cap H^{0,1})$ is again such a sum: $v=v'+v''$ is orthogonal to $Y$ if and only if $v''\perp Y\cap H^{1,0}$ and $v'\perp Y\cap H^{0,1}$, that is, if and only if $v'$ and $v''$ are both orthogonal to $Y$. With $Y=H_\times$ this gives the last statement for $H_\times^\perp$. \end{proof} \begin{theorem}\label{thm:second} Let $\Delta$ be obtuse and $(a,b)\in\mathcal P_2$. If $\operatorname{rank}\mathcal M=1$, in particular if $\Delta$ is a lattice triangle, then $J(a,b)=0$. \end{theorem} \begin{proof} (i) \emph{The expansion.} The holomorphic $1$-forms on the surfaces $X_t$ form a holomorphic vector bundle over the disc, which is trivial, so there is a holomorphic section $t\mapsto\eta_t$, $\eta_t$ a holomorphic form on $X_t$, with $\eta_0=\omega_a$. Off the zeros of $\omega$, with $\vartheta$ a local primitive of $\omega$, the functions $(t,\vartheta+t\bar\vartheta)$ are holomorphic coordinates on the total space of the family, so $\eta_t=F(t,\vartheta+t\bar\vartheta)\,(d\vartheta+t\,d\bar\vartheta)$ with $F$ holomorphic; that is, $\eta_t=f\,(\omega+t\bar\omega)$ with $f(\cdot,\vartheta)$ holomorphic in $t$ for each $\vartheta$. Write $f=\sum_kt^kf_k$. Closedness of $\eta_t$ is $\partial_{\bar\vartheta}f=t\,\partial_\vartheta f$, that is $\partial_{\bar\vartheta}f_k=\partial_\vartheta f_{k-1}$, with $f_0=\omega_a/\omega$ and $f_{-1}=0$. So $\eta_t=\sum_kt^k\eta_k$ with $\eta_k=f_k\omega+f_{k-1}\bar\omega$ closed off the zeros of $\omega$. For a form $\eta=f(\omega+t\bar\omega)$, pointwise $i\,\eta\wedge\bar\eta=(1-\lvert t\rvert^2)\lvert f\rvert^2\,i\,\omega\wedge\bar\omega$, while the $L^2$ density of $\eta$ for the flat metric of $X$ is $(1+\lvert t\rvert^2)\lvert f\rvert^2\,i\,\omega\wedge\bar\omega$. Hence \[ \lVert\eta_t\rVert^2_{L^2(X)}=\frac{1+\lvert t\rvert^2}{1-\lvert t\rvert^2}\;i\!\int_X\eta_t\wedge\bar\eta_t , \] and $i\int_X\eta_t\wedge\bar\eta_t$ is the cup product of $[\eta_t]$ with its conjugate, which is continuous in $t$. So on $\lvert t\rvert\le\epsilon$ the $\eta_t$ are bounded in $L^2(X)$, and $t\mapsto\eta_t$, being weakly holomorphic (against test forms supported off the zeros of $\omega$) and locally bounded, is a holomorphic map into $L^2(X)$. Each $\eta_t$ is closed as a current on $X$, being square integrable and closed off finitely many points, and the class of a closed square-integrable form depends continuously on it in $L^2$. Hence every $\eta_k$ is square integrable and closed, and $[\eta_t]=\sum_kt^k[\eta_k]$ in $H^1(X;\C)$. (ii) \emph{Characters.} As $T^*(\omega+t\bar\omega)=\zeta(\omega+\zeta^{-2}t\bar\omega)$, $T$ is a holomorphic map from $X_{\zeta^{-2}t}$ to $X_t$, and $(T^j)^*$ maps $H^{1,0}(X_{\zeta^{2j}t})$ to $H^{1,0}(X_t)$. Replacing $\eta_t$ by $\frac1N\sum_j\zeta^{-aj}(T^j)^*\eta_{\zeta^{2j}t}$, again a holomorphic section through $\omega_a$ of the same shape, replaces $\eta_k$ by its projection $\frac1N\sum_j\zeta^{-(a-2k)j}(T^j)^*\eta_k$ to the $\zeta^{a-2k}$-eigenspace of $T^*$. So we may assume $T^*\eta_k=\zeta^{a-2k}\eta_k$, and $[\eta_k]\in H^1_{a-2k}$. (iii) \emph{The first coefficient.} $\eta_1=f_1\omega+(\omega_a/\omega)\bar\omega$ is square integrable and closed, and its two terms are orthogonal, so $f_1\omega$ is a square-integrable form of type $(1,0)$ and character $c$; by \cref{lem:psi}, $f_1\omega=\psi$. (iv) \emph{The splitting.} Suppose $\operatorname{rank}\mathcal M=1$, and let $\mathcal S$ be the summand of \cref{lem:split} that contains $H^1_{-b}$: the one equal to $H^1_{\pm b}$ at $X$ if $b$ is a unit, and $H_\times^\perp$ if not. Each eigenspace $H^1_k$ lies in one summand, so the projection of $[\eta_t]$ to $\mathcal S$ along the others is $\sum_kt^k[\eta_k]$ over the $k$ with $H^1_{a-2k}\subset\mathcal S$, and it lies in $H^{1,0}(X_t)$, as every summand is split at $X_t$. For $k=0$, $[\eta_0]=[\omega_a]\in H^1_a$, which is not in $\mathcal S$: if $b$ is a unit because $a\not\equiv\pm b$, and if not because $a$ is a unit. For $k=1$, $[\eta_1]\in H^1_c$, which is zero or not in $\mathcal S$: if $b$ is a unit, $c\equiv b$ would give $\mathrm w(c)=\mathrm w(b)=1$, and $c\equiv-b$ would give $a+b\equiv2$, against $a+b\equiv4$ and $N\ge3$; if $b$ is not a unit, $c$ is a unit or $H^1_c=0$. For $k=2$, $[\eta_2]\in H^1_{a-4}=H^1_{-b}\subset\mathcal S$. So the projection is $t^2[\eta_2]+O(t^3)$, and $t^{-2}$ times it lies in $H^{1,0}(X_t)$ for $t\ne0$ and tends to $[\eta_2]$. As $H^{1,0}(X_t)$ depends continuously on $t$, $[\eta_2]$ is the class of a holomorphic form $\eta'$ on $X$, and $\int_X\eta_2\wedge\omega_b=\int_X\eta'\wedge\omega_b=0$. (v) \emph{The number.} By (iii) and \eqref{eq:I-J}, \[ \int_X\eta_2\wedge\omega_b=\int_X(f_2\omega+f_1\bar\omega)\wedge\omega_b=\int_Xf_1\bar\omega\wedge\omega_b=-\int_X\psi\wedge\frac{\omega_b}\omega\,\bar\omega=2iN\,J(a,b). \] So $J(a,b)=0$. A lattice triangle has rank one by \cref{lem:lattice}. \end{proof} \subsection{The integral in closed form}\label{ssec:second-closed} \needspace{3\baselineskip} \begin{proposition}\label{prop:closed} Let $a,b\in\Phi$ with $a+b\equiv4$ and $\mathrm w(a-2)=2$. Then $E_1,E_2,E_1',E_2'\in\{0,1\}$, $\deg P\le2$, $\deg Q\le2$, and \[ \frac{\pi J(a,b)}{I_0^2}=\frac{P'(\xi)Q(\xi)-P(\xi)Q'(\xi)}2 . \] \end{proposition} \begin{proof} \emph{Exponents.} As $\langle m\rangle\in(0,1]$ and $0<2p_1/N<1$, $E_1$ and $E_1'$ are integers in $(-1,2)$, and likewise $E_2$, $E_2'$. Then $\deg P=E_1+E_2=1-\langle bp_3\rangle-\langle cp_3\rangle+2p_3/N$, and $\deg Q\le E_1'+E_2'+1=\langle cp_3\rangle-\langle ap_3\rangle+2p_3/N$, an integer less than $3$. Hence $\deg P+\deg Q\le1+4p_3/N-\langle ap_3\rangle-\langle bp_3\rangle<1+4p_3/N$. \emph{Absolute convergence.} We show that $\iint f(x)g(x')/\lvert x-x'\rvert\,d^2x\,d^2x'<\infty$ for $f=\lvert\varphi\rvert^2\lvert P\rvert$ and $g=\lvert\varphi\rvert^2\lvert Q\rvert$. Near $0$, $f=O(\lvert x\rvert^e)$ and $g=O(\lvert x\rvert^{e'})$ with $e=2p_1/N-2+E_1$ and $e'=2p_1/N-2+E_1'$, both greater than $-2$, and $e+e'=\langle ap_1\rangle+\langle bp_1\rangle-3>-3$; likewise near $1$. For $\lvert x\rvert\ge2$, $f=O(\lvert x\rvert^{-\nu})$ and $g=O(\lvert x\rvert^{-\nu'})$ with $\nu=2p_3/N+2-\deg P$ and $\nu'=2p_3/N+2-\deg Q$, both greater than $1$, and $\nu+\nu'>3$ by the degree bound. We use: \emph{if $e,e'>-2$ and $e+e'>-3$, then $\iint_{\lvert x\rvert,\lvert x'\rvert<1}\lvert x\rvert^e\lvert x'\rvert^{e'}/\lvert x-x'\rvert<\infty$.} Indeed, with $x'=\lvert x\rvert v$ the inner integral is $\lvert x\rvert^{e'+1}\int_{\lvert v\rvert<1/\lvert x\rvert}\lvert v\rvert^{e'}/\lvert v_0-v\rvert\,d^2v$ with $\lvert v_0\rvert=1$; the part over $\lvert v\rvert<2$ is a constant, and the rest is at most $2\int_{2\le\lvert v\rvert<1/\lvert x\rvert}\lvert v\rvert^{e'-1}d^2v=O(1+\lvert x\rvert^{-e'-1}+\log(1/\lvert x\rvert))$. So the inner integral is $O((1+\lvert x\rvert^{e'+1})(1+\log(1/\lvert x\rvert)))$, which is integrable against $\lvert x\rvert^e$ as $e>-2$ and $e+e'+1>-2$. Now cover $\C\times\C$ by four regions. If $\lvert x\rvert,\lvert x'\rvert\le4$: near a common point of $\{0,1\}$ use the statement just proved; elsewhere either $\lvert x-x'\rvert$ is bounded below, or one of $f$, $g$ is bounded and $\int d^2x'/\lvert x-x'\rvert$ over a bounded set is bounded. If $\lvert x\rvert>4\ge2\ge\lvert x'\rvert$, then $\lvert x-x'\rvert\ge\lvert x\rvert/2$, and $\int_{\lvert x\rvert>4}f/\lvert x\rvert<\infty$ as $\nu+1>2$. The case $\lvert x'\rvert>4$, $\lvert x\rvert\le2$ is the same with $\nu'$. If $\lvert x\rvert,\lvert x'\rvert>2$, the substitution $x\mapsto1/x$, $x'\mapsto1/x'$ turns the integral into one of $O(\lvert x\rvert^{\nu-3}\lvert x'\rvert^{\nu'-3}/\lvert x-x'\rvert)$ over $\lvert x\rvert,\lvert x'\rvert<1/2$, and the statement applies with exponents $\nu-3,\nu'-3>-2$ of sum $\nu+\nu'-6>-3$. \emph{The value.} By Fubini's theorem, $J=\frac1\pi\iint\lvert\varphi(x)\rvert^2\lvert\varphi(x')\rvert^2P(x)Q(x')/(x-x')\,d^2x\,d^2x'$. The measure is symmetric in $(x,x')$, so the kernel may be replaced by its symmetric part, the Bezoutian \[ \mathrm{Bez}(x,x')=\frac{P(x)Q(x')-P(x')Q(x)}{2(x-x')}, \] a symmetric polynomial of degree at most one in each variable, $h_{00}+h_{10}(x+x')+h_{11}xx'$, as $P$ and $Q$ have degree at most two. By \cref{lem:moment}, $\pi J=h_{00}I_0^2+2h_{10}I_0I_1+h_{11}I_1^2=I_0^2\,\mathrm{Bez}(\xi,\xi)$, and $\mathrm{Bez}(\xi,\xi)=(P'(\xi)Q(\xi)-P(\xi)Q'(\xi))/2$. \end{proof} \subsection{Triangles with \texorpdfstring{$s\mid N$}{s | N} and \texorpdfstring{$N/s$}{N/s} odd}\label{ssec:second-AB} In this subsection $s=2p_3-N$ divides $N$ and $d=N/s$ is odd. Then $d\ge3$, $p_3=s(d+1)/2$, $p_1+p_2=s(d-1)/2$ and $\mu=(d-1)/(2d)$. \begin{lemma}\label{lem:dclass} \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:dc-2} If $k\equiv2\pmod d$ and $\varrho=[kp_1]$, then $\langle kp_3\rangle=1/d$, and $k\in\Phi$ if and only if $1\le\varrho\le N-s-1$; then $\langle kp_1\rangle=\varrho/N$ and $\langle kp_2\rangle=1-1/d-\varrho/N$. \item\label{it:dc-0} If $k\equiv0\pmod d$ and $k\not\equiv0\pmod N$, then $N\mid kp_3$, $\langle kp_1\rangle+\langle kp_2\rangle=1$, $\mathrm w(k)=2$ and $H^1_k=0$. \end{enumerate} \end{lemma} \begin{proof} \ref{it:dc-2} $k(d+1)/2\equiv d+1\equiv1\pmod d$, so $kp_3=s\cdot k(d+1)/2\equiv s\pmod N$ and $\langle kp_3\rangle=s/N$. Then $kp_2\equiv-\varrho-s$. If $\varrho=0$, $\langle kp_1\rangle=1$ and $\mathrm w(k)\ge2$. If $1\le\varrho\le N-s-1$, the representative of $-\varrho-s$ in $(0,N]$ is $N-\varrho-s$ and $\mathrm w(k)=1$; if $\varrho\ge N-s$, it is $2N-\varrho-s$ and $\mathrm w(k)=2$. \ref{it:dc-0} $kp_3=(k/d)\cdot N(d+1)/2$, so $\langle kp_3\rangle=1$, and $\langle kp_1\rangle+\langle kp_2\rangle$ is an integer in $(0,2]$; it is $2$ only if $N$ divides $kp_1$ and $kp_2$, and then $N\mid k$, as $\gcd(p_1,p_2,p_3)=1$. So $\mathrm w(k)=2$, and $H^1_k=0$ by \cref{lem:eigen}. \end{proof} \needspace{3\baselineskip} \begin{proposition}\label{prop:shape} Let $a\equiv2\pmod d$, $a\not\equiv2\pmod N$, $b\equiv4-a$, with $a,b\in\Phi$, and $c=a-2$. Then: \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:sh-exp} $\mathrm w(c)=2$ and $H^1_c=0$; $E_1+E_2=1$, $E_1'+E_2'=1$ and $\epsilon_1+\epsilon_2=\mu$; \item\label{it:sh-table} the number $W=2\pi J(a,b)/I_0^2=(P'Q-PQ')(\xi)$ is given by \begin{center} \begin{tabular}{@{}llll@{}} \toprule $(E_1,E_1')$ & $P$ & $Q$ & $W$\\ \midrule $(1,1)$ & $x$ & $x(\mu x-\epsilon_1)$ & $-(p_1/N)^2/\mu$\\ $(0,0)$ & $x-1$ & $(x-1)(\mu x-\epsilon_1)$ & $-(p_2/N)^2/\mu$\\ $(1,0)$ & $x$ & $(x-1)(\mu x-\epsilon_1)$ & $\langle cp_1\rangle-1+p_1p_2/(N^2\mu)$\\ $(0,1)$ & $x-1$ & $x(\mu x-\epsilon_1)$ & $-\langle cp_1\rangle+p_1p_2/(N^2\mu)$\\ \bottomrule \end{tabular} \end{center} \item\label{it:sh-nonzero} $W\ne0$; \item\label{it:sh-in} $(a,b)\in\mathcal P_2$ if and only if $a\not\equiv2+N/2$ and at least one of $a$, $b$ is a unit. \end{enumerate} \end{proposition} \begin{proof} \ref{it:sh-exp} As $c\equiv0\pmod d$ and $c\not\equiv0\pmod N$, \cref{lem:dclass}\ref{it:dc-0} applies to $c$. By \cref{lem:dclass}\ref{it:dc-2}, $\langle ap_1\rangle+\langle ap_2\rangle=\langle bp_1\rangle+\langle bp_2\rangle=1-1/d=2\mu$, and $\langle cp_1\rangle+\langle cp_2\rangle=1$; so $E_1+E_2=2\mu+1-2\mu=1$, $E_1'+E_2'=2\mu-1-2\mu+2=1$ and $\epsilon_1+\epsilon_2=2\mu-\mu$. By \cref{prop:closed} each exponent is $0$ or $1$, and $\epsilon_1(x-1)+\epsilon_2x=\mu x-\epsilon_1$. \ref{it:sh-table} Let $L=\mu x-\epsilon_1$; recall $\xi=p_1/(N\mu)$ and $\xi-1=-p_2/(N\mu)$. Row $(1,1)$: $P'Q-PQ'=xL-x(L+\mu x)=-\mu x^2$. Row $(0,0)$: likewise $-\mu(x-1)^2$. Row $(1,0)$: $(x-1)L-x(L+\mu(x-1))=-L-\mu x(x-1)$, which at $\xi$ is $\epsilon_1-p_1/N+p_1p_2/(N^2\mu)$; and $E_1'=0$ says $\langle ap_1\rangle=\langle cp_1\rangle+2p_1/N-1$, so $\epsilon_1=\langle cp_1\rangle+p_1/N-1$. Row $(0,1)$: $xL-(x-1)(L+\mu x)=L-\mu x(x-1)$, which at $\xi$ is $p_1/N-\epsilon_1+p_1p_2/(N^2\mu)$; and $E_1'=1$ gives $\epsilon_1=\langle cp_1\rangle+p_1/N$. \ref{it:sh-nonzero} The rows $(1,1)$ and $(0,0)$ are non-zero. In the rows $(1,0)$ and $(0,1)$, $N\langle cp_1\rangle$ is an integer and $N\cdot p_1p_2/(N^2\mu)=p_1p_2/(p_1+p_2)$, so $W=0$ would need $(p_1+p_2)\mid p_1p_2$, that is $(p_1+p_2)\mid p_1^2$, and then $s\mid p_1^2$, as $s\mid p_1+p_2$. If $s\ge2$, a prime dividing $s$ divides $p_1$, $p_1+p_2$ and $p_3=s(d+1)/2$, against $\gcd(p_1,p_2,p_3)=1$. If $s=1$, then $d=N$, and $a\equiv2\pmod N$ is excluded. \ref{it:sh-in} Here $a\not\equiv1$, as $a\equiv2\pmod d$ and $d\ge3$; $\mathrm w(c)=2$; and $N\mid cp_3$. So $(a,b)\in\mathcal P_2$ if and only if $b$ is a unit with $a\not\equiv\pm b$, or $b$ is not a unit and $a$ is. Now $a\equiv-b$ would give $N\mid4$, impossible as $d\ge3$ is odd, and $a\equiv b$ means $2a\equiv4$, that is $a\equiv2$ or $a\equiv2+N/2$; and if $a\equiv2+N/2$, then $b\equiv a$. \end{proof} The family $\famA$ \cite[\S4]{P21} consists of the obtuse triangles with $p_1=1$, $s=2p_3-N$ dividing $N$ and $d=N/s$ odd, that is the triangles $\tri1{(N-s)/2-1}{(N+s)/2}N$. Its members with $s=1$ are the triangles of \cref{ssec:A1}, and those with $s=2$ are treated in \cref{sec:obtuse-tri}. \needspace{4\baselineskip} \begin{theorem}\label{thm:A-second} Let $s\ge3$, $d\ge3$ odd, $N=sd$, and $\Delta=\tri1{s(d-1)/2-1}{s(d+1)/2}{N}$. For $1\le j\le s-1$ put $a_j=2+dj$, so that $4-a_j\equiv a_{s-j}$, and let $j_0=\lceil(s+3)/d\rceil$. \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:A-pairs} The pairs $(a,b)\in\mathcal P_2$ with $a\equiv2\pmod d$ are the $(a_j,a_{s-j})$ with $j_0\le j\le s-j_0$, $j\ne s/2$, and $\gcd(2+dj,s)=1$ or $\gcd(2-dj,s)=1$. \item\label{it:A-value} For each of them $\pi J(a,b)/I_0^2=-d/((d-1)N^2)$. \item\label{it:A-exists} Such a $j$ exists for every $s\ge3$ and odd $d\ge3$ except the twelve pairs $(s,d)=(3,3)$, $(4,3)$, $(5,3)$, $(6,3)$, $(7,3)$, $(8,3)$, $(10,3)$, $(14,3)$, $(3,5)$, $(4,5)$, $(6,5)$, $(6,7)$, that is, except the triangles $\tri126{9}$, $\tri138{12}$, $\tri14{10}{15}$, $\tri15{12}{18}$, $\tri16{14}{21}$, $\tri17{16}{24}$, $\tri19{20}{30}$, $\tri1{13}{28}{42}$, $\tri159{15}$, $\tri17{12}{20}$, $\tri1{11}{18}{30}$, $\tri1{17}{24}{42}$. \end{enumerate} So, apart from these twelve, $\operatorname{rank}\mathcal M\ge2$. \end{theorem} \begin{proof} \ref{it:A-pairs} The characters $a\equiv2\pmod d$ with $a\not\equiv2\pmod N$ are the $a_j$, $1\le j\le s-1$, and $[a_jp_1]=a_jN/2$. Isosceles triangles are allowed; for them the result also follows from Apisa's determination of their orbit closures \cite[Theorems~1.4 and~7.7]{Apisa}. \begin{theorem}\label{thm:obtuse} Every obtuse rational triangle other than $\tri11{N-2}N$, $\tri12{2k-3}{2k}$ with $k\ge4$, $\tri147{12}$, $\tri136{10}$ and $\tri138{12}$ has rank at least two. \end{theorem} The first three are lattice triangles, and every other obtuse triangle is not \cite[Theorem~1.1]{P21}. We sort the triangles by witnesses (\cref{ssec:obtuse-lists}); the families without a witness are treated by residues and the involution (\cref{ssec:obtuse-residue}), by the second-order criterion (\cref{sec:second-order}) and by cylinder deformations (\cref{ssec:obtuse-cyl}), and finitely many triangles by computation (\cref{ssec:obtuse-finite}). \Cref{ssec:obtuse-proof} puts these together. \subsection{Triangles without a witness}\label{ssec:obtuse-lists} By \cref{thm:MW} a triangle with a witness has rank at least two, and for obtuse triangles \cref{lem:witness}\ref{it:wit-obtuse} is the form of the criterion used by Larsen, Norton and Zykoski \cite[Proposition~2.1]{LNZ}. When the obtuse angle exceeds $2\pi/3$ they found the triangles without a witness \cite[Theorem~4.1]{LNZ}: with $p_1\le p_22N/3$, $\Delta$ has no witness if and only if \begin{enumerate}[label=\textup{(\arabic*)},leftmargin=*] \item\label{it:lnz1} $p_1=p_2=1$; or \item\label{it:lnz2} $p_1=1$, $p_2=2$ and $N$ is even; or \item\label{it:lnz3} $p_1=1$, $p_2=4$ and $p_3\equiv7\pmod8$; or \item\label{it:lnz4} $p_1=1$ and $p_3=3p_2+1$; or \item\label{it:lnz5} $p_1=2$ and $p_3=3p_2+2$; or \item\label{it:lnz6} $p_1=4$ and $p_3=3p_2+4$; or \item\label{it:lnz7} $(p_1,p_2,p_3)$ is one of $(1,4,11)$, $(1,3,16)$, $(2,3,17)$, $(1,4,21)$, $(1,8,19)$, $(3,8,29)$, $(2,11,29)$. \end{enumerate} For $N/215$; \ref{it:six-L5}, \ref{it:six-L6}, \ref{it:six-C1}, \ref{it:six-C2}, \ref{it:six-C4} by \cite[Theorems~5.9, 5.11, 5.15, 5.8 and~5.10]{P21} respectively. In \ref{it:six-L3}, \ref{it:six-L5}, \ref{it:six-L6}, \ref{it:six-C2}, \ref{it:six-C4}, and in \ref{it:six-C1} with $4\mid m$, $\operatorname{rel}\mathcal M=0$ by \cref{lem:rel-zero}; so if the rank were one, then $\dim_\C\mathcal M=2$ and $\Delta$ would be a lattice triangle by \cref{lem:lattice}. In \ref{it:six-C1} with $m\equiv2\pmod4$, so $m\ge10$, \cref{lem:C1-pair} and \cref{cor:odd}\ref{it:odd-R} give the conclusion. \end{proof} \subsection{The family \texorpdfstring{$\famA$}{A} with \texorpdfstring{$s=2$}{s=2}}\label{ssec:obtuse-cyl} For these triangles we write down one completely periodic direction and its cylinders. \begin{theorem}\label{thm:A2} For every odd $d\ge7$, $\tri1{d-2}{d+1}{2d}$ has rank at least three. \end{theorem} We use the star model of \cite[\S5.3]{P21}, placed and labeled as in the proof of \cite[Theorem~5.15]{P21}, where the same triangles are treated for even $d$; the derivations there of the gluing rule and of the heights, which we repeat, do not use the parity of $d$, and the cylinder $Y_1$ below is the cylinder $Z'$ there. Let $d\ge5$ be odd, $\psi=\pi/2d$ and $u=2\cos2\psi=2\cos(\pi/d)$, and let the triangle have vertices $A$, $B$, $C$ with angles $\psi$, $(d-2)\psi$, $(d+1)\psi$ and $\lvert BC\rvert=1$. For $j\in\Z/4d$ let \[ v_j=\rho_j\,(\sin j\psi,\cos j\psi),\qquad\rho_j=\frac{\cos2\psi}{\sin\psi}\ (j\text{ even}),\quad\rho_j=\cot\psi\ (j\text{ odd}), \] so that $v_j$ has argument $\pi/2-j\psi$. The star $P_\star$ is the polygon with vertices $v_0,v_{-1},v_{-2},\dots$ in counterclockwise order, the union of $4d$ copies of the triangle with the vertex $A$ at the origin $O$; the even vertices are copies of $C$ and the odd ones copies of $B$. Let $e_j$ be the side from $v_j$ to $v_{j-1}$. In the notation of \cite[\S5.3]{P21}, with $\phi=0$, $n=2d$ and $q=d-2$, $B_k=v_{d-2k}$, $C_k=v_{d-2k-1}$, $b_k=e_{d-2k}$ and $c_k=e_{d-2k-1}$. By \cite[Lemma~5.12]{P21}, $X$ is $P_\star$ with $b_k$ glued by translation to $c_{k-q-1}$, $B_k$ to $B_{k-q}$ and $C_k$ to $C_{k-q-1}$; \cref{fig:star} draws it for $d=9$. In our labels: \begin{equation}\label{eq:star-glue} \text{for even }i,\ e_i\text{ is glued to }e_{i+2d+3},\ \text{with }v_i\leftrightarrow v_{i+2d+2}\ \text{and}\ v_{i-1}\leftrightarrow v_{i+2d+3}. \end{equation} The rule is invariant under $j\mapsto j+2d$, so the half-turn $z\mapsto-z$ of $P_\star$ is an automorphism of $X$ that multiplies $\omega$ by $-1$; by \cref{thm:aut} it is the involution $\iota=T^{N/2}$. The copies of $B$ form one zero $z_B$ of cone angle $2\pi(d-2)$, the copies of $C$ two zeros of cone angle $\pi(d+1)$, and $O$ is a regular point. The star is $(X,\omega)$ rotated and scaled by a positive factor, which multiplies all heights and circumferences by that factor and preserves the moduli, so \cref{lem:twist} applies to the horizontal direction of $P_\star$ with the heights and circumferences measured in $P_\star$. Let $y_j$ be the height of $v_j$, $x(v_j)=\rho_j\sin j\psi$, and $w_j=y_{j-1}-y_j$ for $1\le j\le d$. Then $w_j=\sin((j+1)\psi)$ for even $j$ and $w_j=\sin((j-2)\psi)$ for odd $j$: for even $j$, $\sin\psi\,w_j=\cos\psi\cos((j-1)\psi)-\cos2\psi\cos j\psi=\tfrac12[\cos j\psi-\cos((j+2)\psi)]$, and for odd $j$, $\sin\psi\,w_j=\cos2\psi\cos((j-1)\psi)-\cos\psi\cos j\psi=\tfrac12[\cos((j-3)\psi)-\cos((j-1)\psi)]$. Hence \[ 0=y_d0$ that is not the height of a vertex meets the upper half of $P_\star$ as follows. For $h\in(y_j,y_{j-1})$, $3\le j\le d$, in one chord from $e_{1-j}$ to $e_j$; these chords form a strip $\Pi_j$ of width $w_j$. For $h\in(y_2,y_0)$, in one chord from $e_{-1}$ to $e_2$, passing below $v_0$; these form a strip $\Pi_2$ of width $u\sin\psi$. For $h\in(y_0,y_1)$, in two chords, from $e_1$ to $e_2$ and from $e_{-1}$ to $e_0$, forming strips $\Pi_1^{\mathrm r}$ and $\Pi_1^{\mathrm l}$ of width $\sin\psi$. That these chords lie in $P_\star$ follows from \cite[Lemma~5.13]{P21} and the paragraph after it: for each strip, the vertices on the counterclockwise arc of $\partial P_\star$ between the upper ends of its two sides lie at or above its top; for $\Pi_j$ they are the $v_i$ with $\lvert i\rvert\le j-1$, and for $\Pi_2$ they are $v_1$, $v_0$, $v_{-1}$. The lower half consists of the images of these strips under $\iota$: the $\Pi'_j=\iota(\Pi_j)$, $2\le j\le d$, with left side $e_{2d+j}$ and right side $e_{2d+1-j}$, and the images of $\Pi_1^{\mathrm r}$ and $\Pi_1^{\mathrm l}$. So $P_\star$, minus finitely many horizontal segments, is the disjoint union of these strips. \begin{figure}[t] \centering \begin{tikzpicture}[x=1.00cm,y=1.00cm,line join=round,line cap=round] \fill[black!38] (-1.851,-5.085) -- (1.851,-5.085) -- (2.836,-4.911) -- (-2.836,-4.911) -- cycle; \fill[black!38] (0.000,5.411) -- (1.286,5.411) -- (0.985,5.585) -- (0.985,5.585) -- cycle; \fill[black!38] (-4.044,-3.819) -- (4.044,-3.819) -- (4.344,-3.645) -- (-4.344,-3.645) -- cycle; \fill[black!38] (-1.286,5.411) -- (0.000,5.411) -- (-0.985,5.585) -- (-0.985,5.585) -- cycle; \fill[black!14] (-3.478,-4.145) -- (3.478,-4.145) -- (4.044,-3.819) -- (-4.044,-3.819) -- cycle; \fill[black!14] (-1.851,5.085) -- (1.851,5.085) -- (1.286,5.411) -- (-1.286,5.411) -- cycle; \fill[black!24] (-5.329,0.940) -- (5.329,0.940) -- (5.329,1.940) -- (-5.329,1.940) -- cycle; \fill[black!24] (-4.686,-2.706) -- (4.686,-2.706) -- (5.329,-1.940) -- (-5.329,-1.940) -- cycle; \fill[black!24] (-3.478,4.145) -- (3.478,4.145) -- (2.836,4.911) -- (-2.836,4.911) -- cycle; \fill[black!24] (-5.329,-0.940) -- (5.329,-0.940) -- (5.671,0.000) -- (-5.671,0.000) -- cycle; \fill[black!24] (-4.686,2.706) -- (4.686,2.706) -- (4.344,3.645) -- (-4.344,3.645) -- cycle; \draw[line width=0.2pt,black!55] (0.000,-5.411) -- (1.286,-5.411); \draw[line width=0.2pt,black!55] (-1.286,-5.411) -- (1.286,-5.411); \draw[line width=0.2pt,black!55] (-1.286,-5.411) -- (0.000,-5.411); \draw[line width=0.2pt,black!55] (-1.851,-5.085) -- (1.851,-5.085); \draw[line width=0.2pt,black!55] (-2.836,-4.911) -- (2.836,-4.911); \draw[line width=0.2pt,black!55] (-3.478,-4.145) -- (3.478,-4.145); \draw[line width=0.2pt,black!55] (-4.044,-3.819) -- (4.044,-3.819); \draw[line width=0.2pt,black!55] (-4.344,-3.645) -- (4.344,-3.645); \draw[line width=0.2pt,black!55] (-4.686,-2.706) -- (4.686,-2.706); \draw[line width=0.2pt,black!55] (-5.329,-1.940) -- (5.329,-1.940); \draw[line width=0.2pt,black!55] (-5.329,-0.940) -- (5.329,-0.940); \draw[line width=0.2pt,black!55] (-5.671,0.000) -- (5.671,0.000); \draw[line width=0.2pt,black!55] (-5.329,0.940) -- (5.329,0.940); \draw[line width=0.2pt,black!55] (-5.329,1.940) -- (5.329,1.940); \draw[line width=0.2pt,black!55] (-4.686,2.706) -- (4.686,2.706); \draw[line width=0.2pt,black!55] (-4.344,3.645) -- (4.344,3.645); \draw[line width=0.2pt,black!55] (-4.044,3.819) -- (4.044,3.819); \draw[line width=0.2pt,black!55] (-3.478,4.145) -- (3.478,4.145); \draw[line width=0.2pt,black!55] (-2.836,4.911) -- (2.836,4.911); \draw[line width=0.2pt,black!55] (-1.851,5.085) -- (1.851,5.085); \draw[line width=0.2pt,black!55] (0.000,5.411) -- (1.286,5.411); \draw[line width=0.2pt,black!55] (-1.286,5.411) -- (0.000,5.411); \draw[line width=0.2pt,black!55] (-1.286,5.411) -- (1.286,5.411); \draw[line width=0.5pt] (0.000,5.411) -- (-0.985,5.585) -- (-1.851,5.085) -- (-2.836,4.911) -- (-3.478,4.145) -- (-4.344,3.645) -- (-4.686,2.706) -- (-5.329,1.940) -- (-5.329,0.940) -- (-5.671,0.000) -- (-5.329,-0.940) -- (-5.329,-1.940) -- (-4.686,-2.706) -- (-4.344,-3.645) -- (-3.478,-4.145) -- (-2.836,-4.911) -- (-1.851,-5.085) -- (-0.985,-5.585) -- (0.000,-5.411) -- (0.985,-5.585) -- (1.851,-5.085) -- (2.836,-4.911) -- (3.478,-4.145) -- (4.344,-3.645) -- (4.686,-2.706) -- (5.329,-1.940) -- (5.329,-0.940) -- (5.671,0.000) -- (5.329,0.940) -- (5.329,1.940) -- (4.686,2.706) -- (4.344,3.645) -- (3.478,4.145) -- (2.836,4.911) -- (1.851,5.085) -- (0.985,5.585) -- cycle; \node[inner sep=0pt] at (-1.200,-4.998) {\tiny$Y_1$}; \node[inner sep=0pt] at (-2.600,-3.732) {\tiny$Y_1$}; \node[inner sep=0pt] at (1.200,4.998) {\tiny$Y'_1$}; \node[inner sep=0pt] at (2.600,3.732) {\tiny$Y'_1$}; \node[inner sep=0pt] at (0.000,-3.982) {\scriptsize$Y_2$}; \node[inner sep=0pt] at (0.000,5.248) {\scriptsize$Y_2$}; \node[inner sep=0pt] at (0.000,-5.248) {\scriptsize$Y'_2$}; \node[inner sep=0pt] at (0.000,3.982) {\scriptsize$Y'_2$}; \node[inner sep=0pt] at (0.000,1.440) {\scriptsize$Y_3$}; \node[inner sep=0pt] at (0.000,-1.440) {\scriptsize$Y'_3$}; \node[inner sep=0pt] at (0.000,-2.323) {\scriptsize$Y_4$}; \node[inner sep=0pt] at (0.000,4.528) {\scriptsize$Y_4$}; \node[inner sep=0pt] at (0.000,-4.528) {\scriptsize$Y'_4$}; \node[inner sep=0pt] at (0.000,2.323) {\scriptsize$Y'_4$}; \node[inner sep=0pt] at (0.000,-0.470) {\scriptsize$Y_6$}; \node[inner sep=0pt] at (0.000,3.176) {\scriptsize$Y_6$}; \node[inner sep=0pt] at (0.000,-3.176) {\scriptsize$Y'_6$}; \node[inner sep=0pt] at (0.000,0.470) {\scriptsize$Y'_6$}; \node[inner sep=0pt] at (-5.819,0.497) {\tiny$-8$}; \node[inner sep=0pt] at (-5.638,1.523) {\tiny$-7$}; \node[inner sep=0pt] at (-5.298,2.457) {\tiny$-6$}; \node[inner sep=0pt] at (-4.777,3.360) {\tiny$-5$}; \node[inner sep=0pt] at (-4.138,4.121) {\tiny$-4$}; \node[inner sep=0pt] at (-3.340,4.791) {\tiny$-3$}; \node[inner sep=0pt] at (-2.479,5.288) {\tiny$-2$}; \node[inner sep=0pt] at (-1.500,5.644) {\tiny$-1$}; \node[inner sep=0pt] at (-0.521,5.817) {\tiny$0$}; \node[inner sep=0pt] at (0.521,5.817) {\tiny$1$}; \node[inner sep=0pt] at (1.500,5.644) {\tiny$2$}; \node[inner sep=0pt] at (2.479,5.288) {\tiny$3$}; \node[inner sep=0pt] at (3.340,4.791) {\tiny$4$}; \node[inner sep=0pt] at (4.138,4.121) {\tiny$5$}; \node[inner sep=0pt] at (4.777,3.360) {\tiny$6$}; \node[inner sep=0pt] at (5.298,2.457) {\tiny$7$}; \node[inner sep=0pt] at (5.638,1.523) {\tiny$8$}; \node[inner sep=0pt] at (5.819,0.497) {\tiny$9$}; \node[inner sep=0pt] at (5.819,-0.497) {\tiny$10$}; \node[inner sep=0pt] at (5.638,-1.523) {\tiny$11$}; \node[inner sep=0pt] at (5.298,-2.457) {\tiny$12$}; \node[inner sep=0pt] at (4.777,-3.360) {\tiny$13$}; \node[inner sep=0pt] at (4.138,-4.121) {\tiny$14$}; \node[inner sep=0pt] at (3.340,-4.791) {\tiny$15$}; \node[inner sep=0pt] at (2.479,-5.288) {\tiny$16$}; \node[inner sep=0pt] at (1.500,-5.644) {\tiny$17$}; \node[inner sep=0pt] at (0.521,-5.817) {\tiny$18$}; \node[inner sep=0pt] at (-0.521,-5.817) {\tiny$19$}; \node[inner sep=0pt] at (-1.500,-5.644) {\tiny$20$}; \node[inner sep=0pt] at (-2.479,-5.288) {\tiny$21$}; \node[inner sep=0pt] at (-3.340,-4.791) {\tiny$22$}; \node[inner sep=0pt] at (-4.138,-4.121) {\tiny$23$}; \node[inner sep=0pt] at (-4.777,-3.360) {\tiny$24$}; \node[inner sep=0pt] at (-5.298,-2.457) {\tiny$25$}; \node[inner sep=0pt] at (-5.638,-1.523) {\tiny$26$}; \node[inner sep=0pt] at (-5.819,-0.497) {\tiny$27$}; \fill (0,0) circle[radius=0.8pt]; \node[below right=0.5pt,inner sep=0pt] at (0,0) {\tiny$O$}; \end{tikzpicture} \caption{The star $P_\star$ for $d=9$, the triangle $\tri17{10}{18}$, with the origin $O$. The side $e_j$ is marked $j$; for even $i$ it is glued to $e_{i+21}$, indices modulo $36$. The horizontal lines cut $P_\star$ into the strips $\Pi_1^{\mathrm r}$, $\Pi_1^{\mathrm l}$, $\Pi_2,\dots,\Pi_9$ and their images under $\iota$, with $\Pi_5$ and $\Pi'_5$ cut into two parts. A piece marked $Y$ lies in the cylinder $Y$ of \cref{prop:A2-cyl}; $\Pi_1^{\mathrm r}$ and $\Pi_1^{\mathrm l}$ lie in $Y_1$, and their images in $Y'_1$. The cylinders $Y_1$, $Y_2$, $Y_3$, $Y_4$ and $Y_6$ are shaded.}\label{fig:star} \end{figure} \needspace{4\baselineskip} \begin{proposition}\label{prop:A2-cyl} Let $d\ge5$ be odd. The horizontal direction of $P_\star$, the direction of $AB$, is completely periodic, with exactly $d+1$ maximal cylinders: the cylinders $Y_1$, $Y_2$, $Y_3$ and $Y_j$ for even $j$ with $4\le j\le d-3$ of the table, and their images $Y'_1$, $Y'_2$, $Y'_3$, $Y'_j$ under $\iota$. \begin{center} \small \begin{tabular}{@{}>{\raggedright}p{2.5cm}>{\raggedright}p{4.4cm}l>{\raggedright\arraybackslash}p{3.4cm}@{}} \toprule cylinder & strips & height & circumference\\ \midrule $Y_1$ & $\Pi_1^{\mathrm r}$, top part of $\Pi'_5$, $\Pi_1^{\mathrm l}$, $\Pi'_3$ & $\sin\psi$ & $2u(u+2)\cos\psi$\\ $Y_2$ & $\Pi_2$, bottom part of $\Pi'_5$ & $u\sin\psi$ & $2u(u+1)\cos\psi$\\ $Y_3$ & $\Pi_{d-1}$ & $1$ & $u\cot\psi$\\ $Y_j$, $j$ even, $4\le j\le d-3$ & $\Pi_j$, $\Pi'_{j+3}$ & $\sin((j+1)\psi)$ & $2u\cot\psi\,\sin((j+1)\psi)$\\ \bottomrule \end{tabular} \end{center} There is no $Y_j$ with $j\ge4$ for $d=5$. The moduli are $\tan\psi/(2u(u+2))$, $\tan\psi/(2(u+1))$, $\tan\psi/u$ and $\tan\psi/(2u)$. Let $z_0$ and $z_2$ be the zeros formed by the $v_i$ with $i\equiv0$, respectively $i\equiv2\pmod4$, which $\iota$ exchanges. The zeros on the top and the bottom boundary are $z_B$ and $z_0$ for $Y_1$; $z_0$ and $z_2$ for $Y_2$; $z_B$ and the zero of $v_{d-1}$ for $Y_3$; and $z_B$ and the zero of $v_j$ for $Y_j$. For the images, top and bottom are exchanged and so are $z_0$ and $z_2$. \end{proposition} \begin{proof} Each step uses \eqref{eq:star-glue} and \cite[Lemma~5.14]{P21}: strips glued in a cycle, side to side at equal heights, form an annulus of closed leaves, and it is a maximal cylinder if each boundary component contains a zero. The strip $\Pi'_k$ has top at height $-y_k$ and bottom at $-y_{k-1}$. \Cref{fig:star} shows the strips and the cylinders for $d=9$. $Y_1$: $\Pi_1^{\mathrm r}$ leaves through $e_2\to e_{2d+5}$, the left side of $\Pi'_5$, with $v_1\mapsto v_{2d+5}$, the top of $\Pi'_5$; as $\sin\psi{\raggedright}p{4.6cm}>{\raggedright\arraybackslash}p{7.4cm}@{}} \toprule family & triangles & where\\ \midrule \endhead \ref{it:lnz1} & $\tri11{N-2}N$ & excluded\\ \ref{it:lnz2} & $\tri12{N-3}N$, $N$ even & $N\ge10$; excluded\\ \ref{it:lnz3} & $\tri14{N-5}N$, $N\equiv4\pmod 8$ & $N\ge20$; \cref{thm:six}\ref{it:six-L3}\\ \ref{it:lnz4} & $\tri1q{3q+1}{(4q+2)}$ & $q\ge2$; $q=2$: $\tri127{10}$, excluded; $q=4$: \cref{prop:obtuse-finite}; $q\ge3$, $q\ne4$: \cref{prop:L4}\\ \ref{it:lnz5} & $\tri2q{3q+2}{(4q+4)}$, $q$ odd & $q\ge3$; \cref{thm:six}\ref{it:six-L5}\\ \ref{it:lnz6} & $\tri4q{3q+4}{(4q+8)}$, $q$ odd & $q\ge5$; \cref{thm:six}\ref{it:six-L6}\\ \ref{it:lnz7} & seven triangles & \cref{prop:obtuse-finite}\\ \midrule $\famA$, $s=1$ & $\tri1{(N-3)/2}{(N+1)/2}N$, $N$ odd & $N=5$: $\tri113{5}$, excluded; $N=7,11$: \cref{ssec:prime}; $N=9,15$: \cref{prop:obtuse-finite}; $N\ge13$, $N\ne15$: \cref{prop:A1}\\ $\famA$, $s=2$ & $\tri1{d-2}{d+1}{2d}$, $d$ odd & $d=3$: $\tri114{6}$ and $d=5$: $\tri136{10}$, excluded; $d\ge7$: \cref{thm:A2}\\ $\famA$, $s\ge3$ & & \cref{thm:A-second}, except its twelve triangles: $\tri138{12}$ is excluded, the other eleven are in \cref{prop:obtuse-finite}\\ $\famB$ & & \cref{thm:B-second}\\ $\famC$, $p_1=1$ & $\tri1{m-2}{m+1}{2m}$, $m$ even & $m\ge8$: \cref{thm:six}\ref{it:six-C1}; $m=4$: $\tri125{8}$ and $m=6$: $\tri147{12}$, excluded\\ $\famC$, $p_1=2$ & $\tri2{m-3}{m+1}{2m}$, $m$ even & $m\ge6$: \cref{thm:six}\ref{it:six-C2}; $m=4$: $\tri125{8}$, excluded\\ $\famC$, $p_1=4$ & $\tri4{m-5}{m+1}{2m}$, $m\equiv2\pmod 4$ & $m\ge10$: \cref{thm:six}\ref{it:six-C4}; $m=6$: $\tri147{12}$, excluded\\ $\listE$ & thirty triangles & $\tri236{11}$: \cref{ssec:prime}; the others: \cref{prop:obtuse-finite}\\ \bottomrule \end{longtable}} \noindent In every case $\Delta$ has rank at least two. \qed \section{Acute triangles}\label{sec:acute-tri} This section proves \cref{thm:acute}, which finds the acute triangles without a witness for every denominator, and then shows that the acute scalene triangles of rank one are $\tri234{9}$, $\tri345{12}$ and $\tri357{15}$ (\cref{thm:acute-rank}). Here $\Delta=\tri{p_1}{p_2}{p_3}N$ is acute, written with $p_1\le p_2\le p_3N/2$ and $p_2\ge p_1$; and $N\ge3p_1$. Let $g_1=\gcd(p_1,N)$, $p_1=g_1p_1'$ and $N=g_1N'$, so that $\gcd(p_1',N')=1$. A prime dividing $g_1$ and $p_2$ divides $p_1$, $p_2$ and $N$, hence $p_3$; so $\gcd(p_2,g_1)=\gcd(p_3,g_1)=1$. Put \[ \upsilon=g_1\prod_{\ell\mid g_1,\ \ell\nmid N'}\Bigl(1-\frac1\ell\Bigr)\qquad(\ell\text{ prime}). \] \begin{lemma}\label{lem:shape} Let $a$ be a unit with $r_1=[ap_1]<2p_1$, and $r_2=[ap_2]$. Then $a\in A_2\cap A_3$ if and only if $r_2\in\mathcal I(r_1)$, where \[ \mathcal I(t)=\bigl[\max(1,\gamma_3-t+1),\ N-1-\max(\gamma_2,t)\bigr]. \] For $1\le t\le2p_1-1$ the complement $\mathcal I(t)^{\mathrm c}=[0,\max(0,\gamma_3-t)]\cup[N-\max(\gamma_2,t),N-1]$ of $\mathcal I(t)$ in $[0,N-1]$ is one cyclic interval of at most $2p_1$ residues, containing $0$. \end{lemma} \begin{proof} Let $r_3=[ap_3]$, so that $r_1+r_2+r_3\equiv0$ and $r_3\ge1$. If $r_2<2p_2$ and $r_3<2p_3$, then $r_1+r_2+r_3<2N$, so $r_3=N-r_1-r_2$; then $r_3<2p_3$ means $r_1+r_2>\gamma_3$, $r_3\ge1$ means $r_1+r_2\le N-1$, and $r_2<2p_2$ means $r_2\le N-1-\gamma_2$; so $r_2\in\mathcal I(r_1)$. Conversely, if $r_2\in\mathcal I(r_1)$, then $r_2<2p_2$ and $r_1+r_2\le N-1$, so $r_3=N-r_1-r_2\gamma_2$. \end{proof} \begin{lemma}\label{lem:columns} For an integer $t$ let $D_t=\{a\in\Z/N:\ ap_1\equiv g_1t\pmod N\}$. \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:col-def} $D_t$ is the class $a\equiv tp_1'^{-1}\pmod{N'}$, with $g_1$ elements. The units in $A_1$ are the units in the $D_t$ with $1\le t\le2p_1'-1$, and these $D_t$ are pairwise distinct. \item\label{it:col-bij} $a\mapsto[ap_2]$ maps $D_t$ bijectively onto the $g_1$ residues $\equiv tp_2p_1'^{-1}\pmod{N'}$. \item\label{it:col-unit} $a\in D_t$ is a unit if and only if $\gcd(t,N')=1$ and $\gcd([ap_2],g_1)=1$. If $\gcd(t,N')=1$, $D_t$ contains exactly $\upsilon$ units; $\upsilon=1$ if and only if $g_1=1$, or $g_1=2$ and $N'$ is odd. \item\label{it:col-one} The unit $1$ lies in $D_{p_1'}$. For even $N$, $1+N/2$ lies in $D_{p_1'}$ if $p_1$ is even, and in no $D_t$ with $1\le t\le2p_1'-1$ if $p_1$ is odd. \end{enumerate} \end{lemma} \begin{proof} \ref{it:col-def} $ap_1\equiv g_1t\pmod{g_1N'}$ if and only if $ap_1'\equiv t\pmod{N'}$. For a unit $a$, $[ap_1]$ is a non-zero multiple of $g_1$, so $a\in A_1$ means $[ap_1]=g_1t$ with $1\le t\le2p_1'-1$; and $2p_1'-14N\mathrm j^2$, the triangle has a witness. So a triangle without a witness has $p_1<16\mathrm j^2/3$. \end{lemma} \begin{proof} The map $a\mapsto(ap_1,ap_2)\bmod N$ is injective on $\Z/N$: if $ap_1\equiv ap_2\equiv0$, then $ap_3\equiv0$, and $\gcd(p_1,p_2,p_3)=1$ gives $a\equiv0$. Hence $\Gamma=\{(x,y)\in\Z^2:\ (x,y)\equiv(ap_1,ap_2)\bmod N\text{ for some }a\}$ is a lattice of index $N$ in $\Z^2$. The set $B$ of $(x,y)\in\R^2$ with $\lvert x\rvert4N$, so by Minkowski's theorem $B$ contains a point $(u,v)\ne0$ of $\Gamma$, say $(u,v)\equiv(a'p_1,a'p_2)$. For $1\le i\le\mathrm j$ let $a_i=1+ia'$. Then $(a_ip_1,a_ip_2)\equiv(p_1+iu,p_2+iv)$ with $03p_1N/4$. \end{proof} \Cref{lem:minkowski} is the acute counterpart of Larsen, Norton and Zykoski's Proposition~7.5 \cite{LNZ}; Minkowski's theorem takes the place of their pigeonhole argument. \subsection{Four cases}\label{ssec:acute-cases} For $p_1\ge2$, by \cref{lem:columns}\ref{it:col-unit}, exactly one of the following holds: \emph{Case~1}, $p_1\mid N$; \emph{Case~2}, $p_1\nmid N$ and $\upsilon\ge2$; \emph{Case~3}, $g_1=1$; \emph{Case~4}, $g_1=2$, $N/2$ odd and $p_1'\ge2$. \emph{Case 1.} \begin{lemma}\label{lem:case1} Let $p_1\mid N$, $p_1\ge2$, and $N'=N/p_1$. The triangle has a witness if and only if some integer $k$ with $0<\lvert k\rvert2p_2-1$, as $p_2$ is odd. \end{proof} \begin{lemma}\label{lem:jacobsthal-small} If $n\ge15$ has two distinct odd prime factors, then $\mathrm j(n)\le\lfloor n/4\rfloor$. \end{lemma} \begin{proof} Let $r$ be the number of prime factors of $n$; by \eqref{eq:kanold}, $\mathrm j(n)\le2^r$. If $r=2$: $4\le\lfloor n/4\rfloor$ for $n\ge16$, and $\mathrm j(15)=3$, as of three consecutive integers at most one is a multiple of $3$ and at most one a multiple of $5$. If $r=3$: $8\le\lfloor n/4\rfloor$ for $n\ge32$, and the only smaller such $n$ is $30$, with $\mathrm j(30)=6\le7$, as three consecutive odd integers contain one multiple of $3$ and at most one of $5$, so any six consecutive integers contain one prime to $30$. If $r\ge4$: $n\ge210$, and $2^r\le\lfloor n/4\rfloor$, as the product of the first $r$ primes is at least $4\cdot2^r$ for $r\ge4$. \end{proof} \needspace{4\baselineskip} \begin{proposition}\label{prop:case1} Let $p_1\mid N$ and $p_1\ge2$. The triangle has no witness if and only if $p_1=2$; or $p_1=4$ and $N\equiv4\pmod8$; or it is $\tri345{12}$ or $\tri357{15}$. \end{proposition} \begin{proof} Let $n_0$ be the number of integers $k$ with $0N/2-3$ give $N<18$, so $N\in\{9,12,15\}$; $N=9$ gives $\tri333{9}$, not reduced, $N=12$ gives $p_2=4$, and $N=15$ gives $p_2=5$. (1) Let $n_0\ge1$ and suppose there is no witness. By \cref{lem:case1} there are primes $\ell_+\mid\gcd(p_2+N',p_1)$ and $\ell_-\mid\gcd(p_2-N',p_1)$. An odd prime dividing both would divide $2p_2$ and $p_1$. So either (1a) $p_1$ is even and $N'$ is odd, and then $p_2\pm N'$ are even; or (1b) $p_1$ is odd, or $N'$ is even and $p_2\pm N'$ are odd, and then $\ell_+$, $\ell_-$ are odd and distinct, so $p_1$ has two distinct odd prime factors and $p_1\ge15$. (2) Let $n_0\ge2$ and suppose there is no witness. There are also primes $\ell'_\pm\mid\gcd(p_2\pm2N',p_1)$. They are odd, as $p_2$ is odd when $p_1$ is even, and distinct, as a common one divides $4N'$ and $2p_2$, hence $p_2$. So $p_1$ has two distinct odd prime factors, $p_1\ge15$, and $\mathrm j(p_1)\le\lfloor p_1/4\rfloor\le n_0$ by \cref{lem:jacobsthal-small}. By \cref{lem:progression}, as $\gcd(p_2,N',p_1)=1$, some $k\in\{1,\dots,n_0\}$ has $\gcd(p_2+kN',p_1)=1$, and there is a witness. So a triangle without a witness has $n_0\le1$. (3) Let $n_0=1$ and suppose there is no witness. Then $p_1p_2\le2N$ and $p_2>N/4$ give $p_1<8$, so (1a) holds: $p_1\in\{4,6\}$ and $N'$ is odd. For $p_1=4$, $n_0=1$ always, and $p_2\pm N'$ is even if and only if $N'$ is odd: there is no witness if and only if $N/4$ is odd. For $p_1=6$, $n_0=1$ means $p_2\le N/3$, so $p_3\ge2N/3-6$, and $p_3\lceil2p_1g_1/N\rceil$, then $D_1$ contains a witness. So a triangle without a witness with $p_1\nmid N$ and $\upsilon\ge2$ has $N<2p_1g_1/(\upsilon-1)\le4p_1\mathrm j$. \end{lemma} \begin{proof} Here $p_1'\ge2$, so $D_1\ne D_{p_1'}$, and by \cref{lem:columns}\ref{it:col-one} all $\upsilon$ units of $D_1$ lie in $\mathcal U$. They have $r_1=g_1$, and by \cref{lem:columns}\ref{it:col-bij} their values $r_2$ are distinct residues in one class modulo $N'$. By \cref{lem:shape} the cyclic interval $\mathcal I(g_1)^{\mathrm c}$ has at most $2p_1$ residues, hence at most $\lceil2p_1/N'\rceil=\lceil2p_1g_1/N\rceil$ residues of one class modulo $N'$. So some unit of $D_1$ has $r_2\in\mathcal I(g_1)$ and is a witness. Without a witness, $\upsilon-1<2p_1g_1/N$. Finally $\upsilon\ge\#(\Z/g_1)^\times\ge g_1/\mathrm j(g_1)$, since each of the $g_1$ blocks $\{(k-1)\mathrm j(g_1)+1,\dots,k\mathrm j(g_1)\}$, $1\le k\le g_1$, contains an integer prime to $g_1$, and these $g_1\mathrm j(g_1)$ integers contain exactly $\mathrm j(g_1)\#(\Z/g_1)^\times$ integers prime to $g_1$; moreover $\mathrm j(g_1)\le\mathrm j$ and $\upsilon-1\ge\upsilon/2$. \end{proof} \emph{Case 3.} Here $\gcd(p_1,N)=1$. The units in $A_1$ are the $a_t=tp_1^{-1}$ with $1\le t\le2p_1-1$ and $t$ prime to $N$, and $[a_tp_1]=t$. By \cref{lem:columns}\ref{it:col-one}, $a_t\in\mathcal U$ if and only if $t\ne p_1$; for even $N$, $p_1$ is odd. Let $\nu=[p_2p_1^{-1}]$, so that $[a_tp_2]=[t\nu]$ and $p_1\nu\equiv p_2\pmod N$. By \cref{lem:shape}, $a_t$ with $t\ne p_1$ is a witness if and only if $[t\nu]\notin\mathcal I(t)^{\mathrm c}$. \begin{lemma}\label{lem:case3} Let $\gcd(p_1,N)=1$ and $p_1\ge2$. Exactly one of the following holds. \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:c3-0} $\gamma_3\le\nu\le N-\gamma_2-1$; then $a_1=p_1^{-1}$ is a witness. \item\label{it:c3-i} $1\le\nu\le\gamma_3-1$; then $N<2p_1^2$, and every $a_t$ with $t$ prime to $N$, $t\ne p_1$, $1\le t\le2p_1-1$ and $\gamma_3(2\mathrm j+2)p_1$. \item\label{it:c3-ii} $\nu=N-\nu'$ with $1\le\nu'\le\gamma_2$; then $\nu'\ge2$, $N<4p_1^2$, and every $a_t$ with $t$ prime to $N$, $t\ne p_1$, $1\le t\le2p_1-1$ and $\gamma_22p_1+2\mathrm j(2p_1-1)$. \end{enumerate} So a triangle of Case~3 without a witness has $N<4p_1^2$, and $p_1\le\mathrm j$ or $N\le2p_1+2\mathrm j(2p_1-1)$. \end{lemma} \begin{proof} The three ranges partition $[1,N-1]$, and $\nu\ne0$. \ref{it:c3-0} says $\nu\notin\mathcal I(1)^{\mathrm c}=[0,\gamma_3-1]\cup[N-\gamma_2,N-1]$, and $a_1\in\mathcal U$ as $p_1\ge2$. \ref{it:c3-i} Write $p_1\nu=p_2+hN$ with $h\ge0$. If $h\ge1$, then $\nu>N/p_1$ and $\nu<\gamma_3\le p_1$, so $N\gamma_3-t$; so $[t\nu]\in\mathcal I(t)$. Existence: the allowed $t$ are the integers of $E=\bigl(\gamma_3/(\nu+1),\ \min(2p_1,(N-\gamma_2)/(\nu+1))\bigr)$ prime to $N$ and different from $p_1$, and $\gamma_3/(\nu+1)\le p_1/2$. If $(N-\gamma_2)/(\nu+1)\ge2p_1$, $E$ contains $p_1+1,\dots,2p_1-1$, which are $p_1-1\ge\mathrm j$ consecutive integers, one of them prime to $N$. Otherwise $E$ is an open interval of length $(N-2p_1)/(\nu+1)\ge(N-2p_1)/p_1>2\mathrm j$, so it contains $2\mathrm j$ consecutive integers, hence $\mathrm j$ consecutive integers avoiding $p_1$, one of them prime to $N$. \ref{it:c3-ii} $p_1\nu'+p_2\equiv0$ and is positive, so $p_1\nu'\ge N-p_2>N/2$; so $\nu'>N/(2p_1)>1$ and $N<2p_1\nu'\le2p_1(2p_1-1)$. If $t\nu'2\mathrm j$ in the second alternative. The last sentence: without a witness \ref{it:c3-0} fails, and in \ref{it:c3-i} and \ref{it:c3-ii} the existence statements fail; note $(2\mathrm j+2)p_1\le2p_1+2\mathrm j(2p_1-1)$. \end{proof} \emph{Case 4.} Here $N=2m$ with $m$ odd, $p_1=2p_1'$ with $\gcd(p_1',m)=1$ and $p_1'\ge2$, and $p_2$, $p_3$ are odd, so $4\mid\gamma_2$ and $4\mid\gamma_3$. By \cref{lem:columns}\ref{it:col-unit}, each $D_t$ with $t$ prime to $m$ has one unit, its odd element, and this unit lies in $\mathcal U$ if and only if $t\not\equiv p_1'\pmod m$. Let $a_1$ be the unit of $D_1$ and $\nu=[a_1p_2]$, which is odd; $p_1a_1\equiv2$, so $p_1\nu\equiv2p_2\pmod N$. For odd $t$ the unit of $D_t$ is $a_t=ta_1$, with $[a_tp_2]=[t\nu]$; for even $t$ it is $a_t=ta_1+m$, with $[a_tp_2]=[t\nu+m]$. \begin{lemma}\label{lem:case4-iso} In Case~4, if $\gamma_2=p_1$, so that $p_2=p_3=m-p_1'$ and $p_1'$ is even, then $\nu=N-1$. For $p_1'=2$ the triangle is $\tri4{m-2}{m-2}{2m}$. For $p_1'\ge3$ the unit $a_2=2a_1+m$ is a witness. \end{lemma} \begin{proof} $2p_2=N-p_1$ gives $2p_2a_1\equiv-2$, so $p_2a_1\equiv-1\pmod m$; as $\nu$ is odd, $\nu=N-1$. For $p_1'\ge3$, $t=2\le2p_1'-1$ is prime to $m$ and different from $p_1'$; $[a_2p_1]=4$, $[a_2p_2]=[2\nu+m]=m-2$, and $\mathcal I(4)=[\max(1,p_1-3),N-1-p_1]$, as $\gamma_3=\gamma_2=p_1\ge6$, contains $m-2$, since $p_12p_1+2\mathrm jp_1$. \item\label{it:c4-ii} $\nu=N-\nu'$ with $1\le\nu'\le\gamma_2$; then $\nu'$ is odd, $\nu'\ge5$, $N<2p_1^2$, and every $a_t$ with $t$ odd, prime to $m$, $t\ne p_1'$, $t\le2p_1'-1$ and $\gamma_22p_1+2\mathrm j(2p_1-1)$. \end{enumerate} So a triangle of Case~4 with $\gamma_2\ne p_1$ and without a witness has $N<2p_1^2$, and $p_1'\le\mathrm j$ or $N\le2p_1+2\mathrm j(2p_1-1)$. \end{lemma} \begin{proof} For odd $t$, $[a_tp_1]=2t$, and the condition of \cref{lem:shape} is $[t\nu]\in\mathcal I(2t)$. \ref{it:c4-0} is $\nu\notin\mathcal I(2)^{\mathrm c}=[0,\gamma_3-2]\cup[N-\gamma_2,N-1]$, as $\gamma_3,\gamma_2\ge4$. \ref{it:c4-i} Write $p_1\nu=2p_2+hN$ with $h\ge0$. If $h\ge1$, then $\nu>N/p_1$ and $\nu<\gamma_3\le p_1$, so $N\gamma_3-2t$; so $[t\nu]\in\mathcal I(2t)$. Existence follows as in \cref{lem:case3}, with $E=\bigl(\gamma_3/(\nu+2),\ \min(2p_1',(N-\gamma_2)/(\nu+2))\bigr)$, $\gamma_3/(\nu+2)\le p_1/3N$, $\nu'>N/p_1\ge3$, $\nu'\ge5$, and $NB_{11}=549{,}890{,}031{,}616$, and from $r$ to $r+1$ the left side grows by a factor at least $37$ and the right side by a factor less than $8$. \end{proof} \begin{proof}[Proof of \cref{thm:acute}] We compute $\mathrm j(N)$ exactly, as one more than the longest interval of integers that can be covered by choosing one residue class modulo each prime dividing $N$, for every $N$ allowed by \cref{lem:L-finite}, and test every acute triangle with $N\in\mathcal L$ and $3p_1<16\,\mathrm j(N)^2$ for a witness. We find that $\mathcal L$ has $4{,}627$ elements, the largest being $232{,}050=2\cdot3\cdot5^2\cdot7\cdot13\cdot17$, and that for every $N\in\mathcal L$ the acute triangles of denominator $N$ with $3p_1<16\,\mathrm j(N)^2$ and no witness are exactly the members of $\mathcal F_1,\dots,\mathcal F_4$ of denominator $N$ and those of the nine triangles of \cref{thm:acute} of denominator $N$ \cite{Record}. The families have no witness by \cref{lem:families-blind}. The nine have $N\le42$, so $N\in\mathcal L$, as every $N$ with $2\le N\le213$ lies in $\mathcal L$ because $\mathrm j(N)\ge2$; and they have $3p_1<16\,\mathrm j(N)^2$, as $p_1\le8$, so they have no witness. Conversely, by \cref{prop:acute-reduction} an acute triangle without a witness is in a family, or is $\tri357{15}$, or has $N\in\mathcal L$; in the last case $3p_1<16\,\mathrm j(N)^2$ by \cref{lem:minkowski}, and it is in a family or one of the nine. \end{proof} \subsection{Acute scalene triangles of rank one}\label{ssec:acute-rank} The members of $\mathcal F_1$, $\mathcal F_2$ and $\mathcal F_3$ are isosceles, while those of $\mathcal F_4$ and the nine triangles of \cref{thm:acute} are scalene. So it remains to treat $\mathcal F_4$ and seven of the nine. \begin{lemma}\label{lem:F4-KS} For $m\equiv2\pmod4$ with $m\ge14$, $\tri4{m-3}{m-1}{2m}$ is not a lattice triangle. \end{lemma} \begin{proof} Kenyon and Smillie prove that if an acute rational triangle with angles $\alpha\ge\beta\ge\gamma$ is a lattice triangle and $n$ is the least common denominator of $\alpha/\pi$, $\beta/\pi$, $\gamma/\pi$, then $\cos(k\beta+k\gamma)\sin(k\beta)\sin(k\gamma)<0$ for every $k$ prime to $n$ \cite[Theorem~24]{KenyonSmillie}; their unfolding is ours (\cref{rem:convention}). Here $n=2m$, $\beta=(m-3)\pi/2m$ and $\gamma=4\pi/2m$. Write $m=4t+2$ and $k=m/2-2=2t-1$, which is prime to $2m$, as $\gcd(2t-1,8t+4)=\gcd(2t-1,8)=1$. Then $k\gamma=\pi-4\pi/m$, so $\sin k\gamma=\sin(4\pi/m)>0$; $k\beta=\pi(t-2)+\pi(3/4+3/m)$, so $\sin k\beta=(-1)^t\sin(3\pi/4+3\pi/m)$, with $\sin(3\pi/4+3\pi/m)>0$ as $3/m<1/4$; and $k\beta+k\gamma=\pi(t-1)+\pi(3/4-1/m)$, so $\cos(k\beta+k\gamma)=(-1)^{t-1}\cos(3\pi/4-\pi/m)$, with $\cos(3\pi/4-\pi/m)<0$. The product is $(-1)^{2t-1}$ times a negative number, hence positive, and the condition fails at $k$. \end{proof} At $m=10$, the triangle $\tri479{20}$, the condition of Kenyon and Smillie's Theorem~24 holds for all eight units $k$, and it does not decide. \begin{lemma}\label{lem:F4-rel} For $m\equiv2\pmod4$ with $m\ge6$, with the vertices numbered in the order written, $\tri4{m-3}{m-1}{2m}$ has $g_1=4$, $g_2=\gcd(m-3,6)$, $g_3=1$, and $N/g_i$ is even for every $i\in I$; so $\operatorname{rel}\mathcal M=0$ by \cref{cor:odd}\ref{it:odd-rel}. \end{lemma} \begin{proof} The triangle is scalene, is not $\tri123{6}$, and has $N$ even. $\gcd(p_2,2m)=\gcd(m-3,6)$ and $\gcd(p_3,2m)=\gcd(p_3,2)=1$, as $p_2$ and $p_3$ are odd, and $\gcd(4,2m)=4$ as $m\equiv2\pmod4$. So $g_2$ and $g_3$ are odd, and $N/g_2$, $N/g_3$ are even; and $g_1=p_1$, so $1\notin I$. \end{proof} \begin{proposition}\label{prop:F4} For $m\equiv2\pmod4$ with $m\ge14$, $\tri4{m-3}{m-1}{2m}$ has rank at least two. \end{proposition} \begin{proof} If the rank were one, then $\dim_\C\mathcal M=2$, as $\operatorname{rel}\mathcal M=0$ by \cref{lem:F4-rel}, and the triangle would be a lattice triangle by \cref{lem:lattice}, against \cref{lem:F4-KS}. \end{proof} \begin{proposition}\label{prop:acute-eight} Each of the eight triangles $\tri479{20}$, $\tri356{14}$, $\tri567{18}$, $\tri389{20}$, $\tri58{11}{24}$, $\tri79{14}{30}$, $\tri89{13}{30}$, $\tri5{17}{20}{42}$ has rank at least two. \end{proposition} \begin{proof} For each of them we find, as in the proof of \cref{prop:obtuse-finite}, completely periodic directions for which \cref{lem:cyl-comp} gives rank at least two \cite{Record}. \end{proof} \begin{theorem}\label{thm:acute-rank} An acute scalene rational triangle of rank one is $\tri234{9}$, $\tri345{12}$ or $\tri357{15}$. \end{theorem} \begin{proof} Let $\Delta$ be acute and scalene, and not one of the three. If it has a witness, it has rank at least two by \cref{thm:MW}. Otherwise, by \cref{thm:acute}, it is $\tri4{m-3}{m-1}{2m}$ with $m\equiv2\pmod4$, $m\ge6$, or one of the nine. In the family, $m=6$ gives $\tri345{12}$, excluded; $m=10$ gives $\tri479{20}$, in \cref{prop:acute-eight}; and $m\ge14$ is \cref{prop:F4}. Of the nine, $\tri234{9}$ and $\tri357{15}$ are excluded and the other seven are in \cref{prop:acute-eight}. \end{proof} \section{Right triangles and two Prym eigenforms}\label{sec:right-prym} This section treats the right triangles by witnesses, proves that $\tri136{10}$ and $\tri138{12}$ have rank one, describes their orbit closures, and assembles the proof of \cref{thm:rk1}. \subsection{Right triangles}\label{ssec:right} Let $\Delta$ be a right rational triangle, with the right angle at the third vertex. Then $N=2n$, $p_3=n$, and by Apisa's Lemma~7.1 \cite{Apisa}, after renumbering the two acute vertices, $\Delta=\tri a{n-a}n{2n}$ with $\gcd(a,2n)=1$, so $a$ is odd. For odd $n$, $a$ is determined by $\Delta$; for even $n$, $a$ and $n-a$ both qualify, and the conditions below do not depend on the choice. \needspace{3\baselineskip} \begin{proposition}\label{prop:right} Let $\Delta=\tri a{n-a}n{2n}$ with $a$ odd, $\gcd(a,2n)=1$ and $a\notin\mbox{$\{1,n-1,n-2\}$}$. Put $\varepsilon=1$ if $n$ is even and $\varepsilon=2$ if $n$ is odd, and let \[ \alpha\equiv a^{-1}\pmod{2n}\ \text{ if }2a\le n,\qquad\alpha\equiv(n-\varepsilon)\,a^{-1}\pmod{2n}\ \text{ if }2a>n . \] Then $\alpha$ is a witness, and $\Delta$ has rank at least two. \end{proposition} This is the argument of Apisa's proof of his Lemma~7.4 \cite{Apisa}, written as an instance of \cref{thm:MW}. \begin{proof} Residues are taken in $[0,2n)$. In both cases $\alpha$ is odd and prime to $2n$, as $n-\varepsilon$ is odd and prime to $n$: $\gcd(n-1,n)=1$, and for odd $n$, $\gcd(n-2,n)=\gcd(2,n)=1$. So $\alpha$ is a unit and $[\alpha n]=[(2-\alpha)n]=n$. \emph{Case $2a\le n$.} Then $3\le a\le n/2$. We have $[\alpha a]=1$ and $[\alpha(n-a)]=n-1$, of sum $2n$ with $[\alpha n]=n$; and $[(2-\alpha)a]=2a-1$ and $[(2-\alpha)(n-a)]=[2n-2a-(n-1)]=n-2a+1$, of sum $2n$ with $n$. All six residues are non-zero, so $\alpha,2-\alpha\in\Phi$. If $2\alpha\equiv2\pmod{2n}$, then $\alpha\equiv1\pmod n$ and $a\equiv1\pmod n$, so $a=1$, which is excluded. \emph{Case $2a>n$.} Then $n/20$ let $\mathcal O_D$ be the real quadratic order of discriminant $D$. If $\dim\Omega(Y)^-=2$, the Prym variety has real multiplication by $\mathcal O_D$ if its endomorphisms contain a proper subring isomorphic to $\mathcal O_D$, generated by one endomorphism that is self-adjoint for the intersection pairing; a form $\eta\in\Omega(Y)^-$ with $0\ne\mathcal O_D\cdot\eta\subset\C\eta$ is a Prym eigenform, and $\Omega E_D$ is the locus of Prym eigenforms. McMullen proves that $\Omega E_D$ is a closed $\SL(2,\R)$-invariant subset of $\Omega\mathcal M_g$ \cite[Theorem~3.2]{McMullenPrym}; positive scalars preserve it as well. For a stratum $\mathcal H(\kappa)$ let $\Omega E_D(\kappa)=\Omega E_D\cap\mathcal H(\kappa)$. \needspace{3\baselineskip} \begin{proposition}\label{prop:prym} Let $\Delta$ be $\tri136{10}$ or $\tri138{12}$, and let $\iota=T^{N/2}$ and $\Theta=T^*+(T^*)^{-1}$. \begin{enumerate}[label=\textup{(\alph*)}] \item\label{it:prym-member} $(X,\omega)$ is a Prym eigenform for $\iota$ and real multiplication by $\Z[\Theta]$: it lies in $\Omega E_5(2,2,2)$ for $\tri136{10}$ and in $\Omega E_{12}(1,1,1,1)$ for $\tri138{12}$. \item\label{it:prym-rank} $\operatorname{rank}\mathcal M=1$. \item\label{it:prym-comp} For $\tri136{10}$, $\mathcal M$ is a connected component of $\Omega E_5(2,2,2)$, of complex dimension three, so $\operatorname{rel}\mathcal M=1$. \end{enumerate} Neither triangle is a lattice triangle. \end{proposition} The last sentence is part of the classification of obtuse lattice triangles \cite[Theorem~1.1]{P21}; for $\tri138{12}$ it is also Vorobets' Theorem~4.5 \cite{Vorobets}. \begin{proof} \ref{it:prym-member} We use \cref{lem:eigen}. For $\tri136{10}$ the characters $0$ and $5$ are not in $\Phi\cup-\Phi$ and the other eight are, so $H^1(X;\C)$ is the sum of the eight lines $H^1_a$, $a\ne0,5$, and the genus is $4$, in accordance with \eqref{eq:genus}. The involution $\iota$ acts on $H^1_a$ by $(-1)^a$, and $\iota^*\omega=-\omega$. The odd lines are $a=1,3,7,9$, of which $1$ and $7$ lie in $\Phi$, as $1+3+6=10$ and $7+1+2=10$, and $3$, $9$ do not. So $\Omega(X)^-=H^{1,0}_1\oplus H^{1,0}_7$ has dimension two. $\Theta$ acts on $H^1_a$ by $\zeta^a+\zeta^{-a}=2\cos(2\pi a/10)$, which is $2\cos(\pi/5)$ on the lines $1$, $9$ and $2\cos(3\pi/5)$ on the lines $3$, $7$; both are roots of $x^2-x-1$, which is therefore the minimal polynomial of $\Theta$ on $H^1(X;\Q)^-$. For $\tri138{12}$ the characters $0,3,4,6,8,9$ are not in $\Phi\cup-\Phi$ and the other six are, and the genus is $3$; the odd lines are $1,5,7,11$, of which $1$ and $5$ lie in $\Phi$, as $1+3+8=12$ and $5+3+4=12$; $\Theta$ acts by $\sqrt3$ on the lines $1$, $11$ and by $-\sqrt3$ on the lines $5$, $7$, with minimal polynomial $x^2-3$. In both cases $T^*$ is integral, preserves the intersection pairing and commutes with $\iota^*$; so $\Theta$ preserves $H^1(X;\Z)^-$, is self-adjoint, as $\langle T^*x,y\rangle=\langle x,(T^*)^{-1}y\rangle$, and preserves $\Omega(X)^-$. Dually it acts on $H_1(X;\Z)^-$ as a complex-linear endomorphism of $\operatorname{Prym}(X,\iota)$. As the minimal polynomial is monic and irreducible, $\Z[\Theta]\cong\Z[x]/(x^2-x-1)=\mathcal O_5$, respectively $\Z[x]/(x^2-3)=\mathcal O_{12}$, the ring of integers of $\Q(\sqrt5)$, respectively $\Q(\sqrt3)$. If an endomorphism $F$ has $mF\in\Z[\Theta]$ for an integer $m\ne0$, then $F\in\Q[\Theta]$, and $F$ is integral over $\Z$, as its characteristic polynomial on the lattice is monic with integer coefficients; so $F\in\Z[\Theta]$, and the subring is proper. Finally $\Theta\omega=(\zeta+\zeta^{-1})\omega$, so $\omega$ is a Prym eigenform. The zeros, by the cone angles $2\pi p_i/g_i$ of \cref{ssec:surface}: for $\tri136{10}$, one regular point above the first vertex, one zero of order two above the second and two above the third, so the stratum is $\mathcal H(2,2,2)$; for $\tri138{12}$, regular points above the first two vertices and four simple zeros above the third, so $\mathcal H(1,1,1,1)$. \ref{it:prym-rank} By McMullen's theorem the orbit of $(X,\omega)$ lies in the closed subset $\Omega E_D(\kappa)$ of the stratum, hence so does $\mathcal M$. Take $U$ and $V$ as in \cref{ssec:orbit}, and identify the surfaces of $V\cap U$ with $X$ by the marking. Each $w\in V\cap U$ is a Prym eigenform: there are an involution $\rho_w$, whose action $\rho_w^*$ on $H^1(X,\Sigma;\Z)$ is an integer matrix, as it permutes the zeros; an endomorphism $\Theta_w$ of $H^1(X;\Q)$ that is rational, preserves the $\rho_w$-odd part and vanishes on the even part; and a root $\mu_w$ of its minimal polynomial, such that $\rho_w^*w=-w$ and $p(w)$ is an eigenvector of $\Theta_w$ for $\mu_w$. There are countably many triples $(\rho^*,\Theta',\mu)$, and each condition is linear in $w$; so by Baire's theorem one triple serves for a non-empty open subset of $V\cap U$, hence for all of $V$. The minimal polynomial of $\Theta'$ on the four-dimensional odd part is that of a generator of $\mathcal O_D$, irreducible as $D$ is not a square. So each of its eigenspaces there has dimension two, and $p(V)$ lies in one of them. As $p(V)$ contains the independent classes $[\omega]$ and $[\bar\omega]$, $\dim p(V)=2$ and $\operatorname{rank}\mathcal M=1$. \ref{it:prym-comp} The involution $\iota=T^5$ maps $y$ to $-y$, so its fixed points lie above $0$, $1$ and $\infty$. As $T$ permutes the $g_i$ points above vertex $i$ cyclically, $\iota$ fixes the single points above the first two vertices and exchanges the two above the third. By the Riemann--Hurwitz formula $X/\iota$ has genus two, and $\omega^2$ descends to a quadratic differential on it with a simple pole at the image of the regular fixed point, a simple zero at the image of the fixed double zero, and a zero of order four at the image of the exchanged pair. So $(X,\omega)$ lies in the Prym locus attached to the stratum $\mathcal Q(-1,1,4)$, which Lanneau and Nguyen list in their Table~1 \cite{LanneauNguyen}, as $\operatorname{Prym}(2,2,2)^{\mathrm{even}}$. The same holds for every point of $\Omega E_5(2,2,2)$. A Prym involution $\rho$ of a surface of genus four in $\mathcal H(2,2,2)$ has a quotient of genus two, hence two fixed points by the Riemann--Hurwitz formula; a fixed point is a regular point or a zero of even order, since if $\rho(z)=-z$ and $\eta=z^ku(z)\,dz$ with $u(0)\ne0$, then $\rho^*\eta=-\eta$ forces $k$ even; and the zeros that are not fixed are exchanged in pairs. So $\rho$ fixes one zero and one regular point and exchanges the other two zeros, the quotient lies in $\mathcal Q(-1,1,4)$, and $\Omega E_5(2,2,2)$ is contained in a Prym locus of their Table~1. Lanneau and Nguyen prove that if $\Omega E_D(\kappa)$ has complex dimension three, that is, is contained in one of the Prym loci of their Table~1, then the $\GL^+(2,\R)$-orbit of a Prym eigenform in $\Omega E_D(\kappa)$ is closed, or its closure is a connected component of $\Omega E_D(\kappa)$ \cite[Theorem~1.1]{LanneauNguyen}. As $\tri136{10}$ is not a lattice triangle, the second alternative holds, and $\mathcal M$ has dimension three; with rank one, $\operatorname{rel}\mathcal M=1$. \end{proof} \begin{proposition}\label{prop:138} For $\tri138{12}$, $\operatorname{rank}\mathcal M=1$, $\operatorname{rel}\mathcal M=2$ and $\dim_\C\mathcal M=4$; near $(X,\omega)$, $\mathcal M$ coincides with $\Omega E_{12}(1,1,1,1)$, and it is an irreducible component of $\Omega E_{12}(1,1,1,1)$. \end{proposition} \begin{proof} The rank is one by \cref{prop:prym}, so $p(V)=H^1_1\oplus H^1_{11}$ by \cref{lem:S}. Here $I=\{3\}$ and $\Sigma$ consists of the $g_3=4$ simple zeros above the third vertex, so $Z=Z_3\oplus Z_6\oplus Z_9$, three lines (\cref{lem:relative}). By \cref{lem:S}, $V\cap Z$ is the sum of its intersections with them; it lies in $Z^-=Z_3\oplus Z_9$ by \cref{cor:odd}, and it is not zero by \cref{lem:lattice}, as the triangle is not a lattice triangle. As $V$ and $Z$ are defined over $\R$ and complex conjugation exchanges $Z_3$ and $Z_9$, $V\cap Z=Z^-$. So $\operatorname{rel}\mathcal M=2$, $\dim_\C\mathcal M=4$, and $V$ is the space $L$ of the $w\in E^-$ with $p(w)\in H^1_1\oplus H^1_{11}$, since $L$ contains $V$ and has dimension four, as $p$ maps $E^-$ onto $H^1(X;\C)^-$ with kernel $Z^-$. Every $w\in L\cap U$ is a Prym eigenform for $\mathcal O_{12}$: the involution $\iota$ deforms with the surface, as $w\in E^-$, and $\Theta$ has $p(w)$ as an eigenvector, so it preserves $\Omega(X_w)^-$, which is spanned by $w$ and a form in the other eigenspace of $\Theta$, the symplectic orthogonal of $p(w)$ and $p(\bar w)$ in $H^1(X;\C)^-$ (as $\Omega(X_w)^-$ is isotropic, it lies in the symplectic orthogonal of $p(w)$ in the odd part, which is $\C p(w)$ plus that eigenspace). Conversely, let $w_n\to[\omega]$ be Prym eigenforms for $\mathcal O_{12}$, with involutions $\rho_n$ and generators $\Theta_n$ of $\mathcal O_{12}$ with $\Theta_n^2=3$. The $\rho_n^*$ are bounded, as $\rho_n$ is an isometry of the flat metric, and so are the $\Theta_n$, which are self-adjoint for the Hodge norm with eigenvalues $\pm\sqrt3$; so along a subsequence both are constant, $\rho^*$ and $\Theta'$, and, as in the proof of \cite[Theorem~3.2]{McMullenPrym}, $\rho_n$ converges to an automorphism $\rho$ of $X$ with $\rho^*\omega=-\omega$, which is $\iota$ (\cref{thm:aut}). In the limit $p[\omega]$ is an eigenvector of $\Theta'$; the eigenspace of $\Theta'$ containing it is a plane containing $p[\bar\omega]$, hence $H^1_1\oplus H^1_{11}$, and it contains the $p(w_n)$. So near $[\omega]$ every such eigenform lies in $L$, and $\Omega E_{12}(1,1,1,1)$ and $\mathcal M$ coincide near $(X,\omega)$. The same argument at any point $(Y,\eta)$, in period coordinates of marked surfaces, gives one linear subspace of dimension four for each of the finitely many Prym involutions for which the surface is an eigenform, as, whichever generator of $\mathcal O_{12}$ is used, the eigenspace containing $p[\eta]$ is the span of $p[\eta]$ and $p[\bar\eta]$; so $\Omega E_{12}(1,1,1,1)$ is an analytic set of pure dimension four. Finally $\mathcal M$ is a closed subset of the same dimension, and it is irreducible, as its regular locus contains the smooth part $\mathcal M_0$ of \cref{ssec:orbit}, which contains the dense, connected orbit; so it is one of the irreducible components of $\Omega E_{12}(1,1,1,1)$. \end{proof} \begin{question}\label{qu:138} Is $\Omega E_{12}(1,1,1,1)$ irreducible, so that it is the orbit closure of the unfolding of $\tri138{12}$? If not, is that orbit closure a connected component of it? \end{question} \subsection{Proof of \texorpdfstring{\cref{thm:rk1}}{Theorem 1.1}}\label{ssec:proof-rk1} \emph{The listed triangles have rank one.} The triangles \mbox{$\tri1k{k+1}{(2k+2)}$} and $\tri2{2k+1}{2k+3}{(4k+6)}$ are right triangles with smallest angle $\pi/(2k+2)$, respectively $\pi/(2k+3)$; they are lattice triangles by Veech \cite{Veech89}. The triangles $\tri12{2k-3}{2k}$, $k\ge4$, were announced as lattice triangles by Vorobets \cite[Theorem~5]{VorobetsNote} and proved to be in \cite[Proposition~4.2 and Theorem~4.4]{Vorobets}. The triangle $\tri147{12}$ is a lattice triangle by Hooper \cite[Theorem~1]{Hooper}. Among acute triangles, $\tri345{12}$ was announced by Veech \cite{Veech89} and proved to be a lattice triangle by Vorobets, who also treats $\tri357{15}$ \cite[Theorem~4.4]{Vorobets}; $\tri234{9}$ is a lattice triangle by Kenyon and Smillie \cite[Theorem~25]{KenyonSmillie}. By \cref{lem:lattice} a lattice triangle has rank one. For $k=2$ the first family gives $\tri123{6}$, whose unfolding is a flat torus, outside the setting of \cref{lem:lattice} as it has no zeros; its orbit is its whole stratum, of dimension two, so its rank is one. The triangles $\tri136{10}$ and $\tri138{12}$ have rank one and are not lattice triangles by \cref{prop:prym}. \emph{The other scalene triangles have rank at least two.} A scalene triangle is right, obtuse or acute. A right one is $\tri a{n-a}n{2n}$ as in \cref{ssec:right}; if $a\notin\{1,n-1,n-2\}$ it has rank at least two by \cref{prop:right}, and otherwise it is in one of the two right families of the list. An obtuse one other than $\tri11{N-2}N$, $\tri12{2k-3}{2k}$ with $k\ge4$, $\tri147{12}$, $\tri136{10}$ and $\tri138{12}$ has rank at least two by \cref{thm:obtuse}; the first of these is isosceles, and $\tri12{2k-3}{2k}$ is obtuse if and only if $k\ge4$. An acute scalene triangle of rank one is $\tri234{9}$, $\tri345{12}$ or $\tri357{15}$ by \cref{thm:acute-rank}. So the scalene triangles of rank one are exactly those of \cref{thm:rk1}, and all of them but $\tri136{10}$ and $\tri138{12}$ are lattice triangles. \qed \section{Billiards in the triangles of rank one}\label{sec:billiards} \begin{corollary}\label{cor:periodic} Let $\Delta$ be one of the triangles of \cref{thm:rk1} and $\theta$ a direction. If one billiard trajectory in $\Delta$ that starts in direction $\theta$ is periodic, then so is every billiard trajectory in $\Delta$ that starts in direction $\theta$ and does not hit a vertex. \end{corollary} For the lattice triangles of \cref{thm:rk1}, all but $\tri136{10}$ and $\tri138{12}$ (\cref{prop:prym}), this follows from Veech's Proposition~2.10 \cite{Veech89}. For these two it follows from \cref{prop:prym} and Wright's Corollary~1.6 \cite{WrightCyl}, that every surface in a Prym eigenform locus is completely periodic. \begin{proof} The surface $X$ is glued from the $2N$ copies $g\Delta$, one for each element $g$ of the dihedral group generated by the linear parts of the reflections in the sides of $\Delta$ (\cref{ssec:surface}). Folding $X$ onto $\Delta$, by $g^{-1}$ on the copy $g\Delta$, maps the straight line $\gamma$ on $X$ that starts at a point of the copy $\Delta$ in direction $\theta$ onto the billiard trajectory with the same starting point and direction, as long as $\gamma$ avoids the points above the vertices; and a point of $\Delta$ with a direction comes from at most $2N$ points of $X$ with direction $\theta$. So the trajectory is periodic if and only if $\gamma$ is closed: if the trajectory has period $t$, two of the points $\gamma(kt)$, $0\le k\le2N$, coincide. It is therefore enough to show that if one straight line in direction $\theta$ that avoids the points above the vertices is closed, then so is every such line. If $\Delta=\tri123{6}$, then $X$ is a flat torus (\cref{ssec:surface}), and every straight line parallel to a closed one is closed. Otherwise $\Sigma\ne\emptyset$, and a closed line in direction $\theta$ that avoids $\Sigma$ lies, with the parallel lines near it, in a cylinder in direction $\theta$. By \cref{thm:rk1}, $\operatorname{rank}\mathcal M=1$, that is, $\dim_\C p(V)=2$ for the tangent space $V$ of $\mathcal M$ at $(X,\omega)$ (\cref{ssec:orbit}). So by Wright's theorem \cite[Theorem~1.5]{WrightCyl}, $X$ is the union of the closures of its maximal cylinders in direction $\theta$, which are bounded by saddle connections between points of $\Sigma$ (\cref{ssec:cylinders}). A line in direction $\theta$ that avoids the points above the vertices avoids $\Sigma$, so it does not lie on one of these saddle connections; it lies in the interior of one of the cylinders and is closed. \end{proof} \section*{Declarations}\phantomsection\label{sec:declarations} \subsection*{Use of AI} This paper and its results were produced by an AI research system that the author designed, built and directs, running on Anthropic's Claude Fable~5.2 in Claude Code and OpenAI's GPT-6 Astra in Codex. The author chooses the problems and prioritizes the work. Separate AI agents checked each result, and a second program confirmed the computations the proofs use, with any exceptions listed in the public deposit. The system also searched the literature and checked the citations against reliable sources. The author read the paper, reran the computations from the deposit and takes full responsibility for all of the paper's contents. \subsection*{Data availability} The programs and data used in this paper, with instructions for rerunning them, are deposited at Zenodo~\cite{Record}. \bibliographystyle{amsplain} \bibliography{refs} \end{document}