% ADOPTED s891: this file is the SINGLE SOURCE of paper III (No arrivals). Edit it here. % The markdown it was converted from (md2tex.py) is archive/paper_method_draft_md_s891.md; every statement, % section, equation and figure number is unchanged (renumber_map.tsv). Do not re-run md2tex.py on this paper. \documentclass[11pt]{amsart} \usepackage{amsmath,amssymb,amsthm,mathtools} \usepackage{graphicx,booktabs,array} \usepackage[hidelinks,pdfstartview={}]{hyperref} \usepackage{url} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{corollary}[theorem]{Corollary} \newtheorem{conjecture}[theorem]{Conjecture} \newtheorem{innerlemma}{Lemma} \newenvironment{taggedlemma}[1]{\renewcommand\theinnerlemma{#1}\innerlemma}{\endinnerlemma} \newcommand{\restatedname}{} \newtheorem*{restated}{\restatedname} \numberwithin{equation}{section} \newtheorem*{main1}{Theorem 1} \newtheorem*{main2}{Theorem 2} \newtheorem*{main3}{Theorem 3} \newtheorem*{main4}{Theorem 4} \newtheorem*{main5}{Theorem 5} \newtheorem*{main6}{Theorem 6} \theoremstyle{definition} \newtheorem{definition}[theorem]{Definition} \theoremstyle{remark} \newtheorem{remark}[theorem]{Remark} \emergencystretch=3em \providecommand{\tightlist}{\setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}} \title[No arrivals]{No arrivals: complete periodicity and degenerate orbits in rational right triangles} \author{Joshua Boorstein} \email{josh.boorstein@outlook.com} \urladdr{https://orcid.org/0009-0007-1291-2321} % the direction-parity class label \newcommand{\epar}{\mathfrak{e}} \begin{document} \begin{abstract} Boshernitzan conjectured in 1992 that in a rational right or isosceles triangle every direction of an explicit finite set is \emph{purely periodic}: every billiard orbit in it that avoids the vertices is periodic. For a right triangle with acute angle $P\pi/2Q$ in lowest terms the set is two classes of directions, each containing the perpendicular to a side, and the conjecture says that both are completely periodic. It fails at one known right triangle, $(4/15, 7/30, 1/2)\pi$. We prove it, when $\min(P, Q - P) \geq 2$, whenever $P + 2$ and $P - 2$ are both prime to $Q$, a set of density about $0.62$, and whenever $Q$ has at most one odd prime factor, with a computer-assisted check of finitely many cases; and, through the fold, for the corresponding isosceles triangles. Everything turns on one object, an orbit from a vertex to a vertex that never strikes a side at a right angle: if there is none, both classes are completely periodic, and at odd $P$ the retracing band of a companion paper exists. Such an orbit satisfies an identity among roots of unity whose coefficients have signs fixed by the geometry, and Galois conjugation --- or, at a single odd prime, a slowest-rotation argument --- makes it impossible. When neither $P + 2$ nor $P - 2$ is a unit modulo $Q$, no argument from these inputs can succeed, and the counterexample lies there. A second method reads the poles of a minimal component as a word of a binary code attached to $Q$; it reaches further composite $Q$ and, with interval arithmetic, the triangles $(4, Q - 4, Q)$ at every $Q \equiv 3 \pmod{4}$. Beyond right triangles we prove, with computer assistance, that Boshernitzan's Conjecture~2.2(a) fails for infinitely many triangles. \end{abstract} \maketitle \section{Introduction}\label{sec:1} \subsection{Boshernitzan's question}\label{sec:1.1} Let $\Delta$ be a rational triangle, with angles $a\pi/d$, $b\pi/d$, $c\pi/d$ in lowest terms. A billiard trajectory in $\Delta$ is \textbf{regular} if it never meets a vertex. A direction is \textbf{periodic} if some orbit in it is periodic, and \textbf{purely periodic} if every regular orbit in it is periodic. Write $\mathcal{P}_0 \subseteq \mathcal{P}$ for the two sets of directions, and $\mathcal{E}$ for the \emph{exceptional} directions, those containing a generalized diagonal (an orbit segment from a vertex to a vertex, the sides included). Then $\mathcal{P}_0 \subseteq \mathcal{P} \subseteq \mathcal{E}$. In a short paper in the \emph{Monthly} \cite{Bos92}, Boshernitzan proved that a polygon has only finitely many rational exceptional directions. For a rational triangle placed with a side at a multiple of $\pi/d'$ (horizontal or vertical, for instance) he located them: with $d' = \operatorname{lcm}(2, d)$ and $S^1(n) = \{z : z^n = 1\}$, \[ \mathcal{E} \cap \mathbb{Q} \subseteq S^1(2d')\text{ (\cite{Bos92}, Corollary 1.7).} \] He then asked when the containment is an equality and all four sets agree, \begin{equation} S^1(2d') = \mathcal{P}_0 \cap \mathbb{Q} = \mathcal{P} \cap \mathbb{Q} = \mathcal{E} \cap \mathbb{Q}, \tag{2.1}\label{eq:2.1} \end{equation} (numbered as in \cite{Bos92}), and conjectured that it often is. His Conjecture~2.2 has five parts. (a) If $d$ is even, $S^1(2d') \subseteq \mathcal{P}_0$. (b) If $d$ is odd, $S^1(2d') \setminus S^1(d') \subseteq \mathcal{P}_0$. (e) If $\Delta$ is isosceles or right, $S^1(2d') \subseteq \mathcal{P}_0$. Parts (c) and (d) concern $d \leq 12$. Each of (a), (c) and (e) implies \eqref{eq:2.1} for the triangles it covers. He checked (a) and (b) by computer for every triangle with $d \leq 16$. The question is interesting because of what it asks of a single direction. Unfold $\Delta$ to a translation surface $X$. A direction on $X$ decomposes $X$ into cylinders of closed leaves and minimal components in which every leaf is dense \cite{Str84}. Pure periodicity of a direction is the statement that there are no minimal components: the direction is \textbf{completely periodic}. Boshernitzan's elementary Proposition~1.8 already gives part of this. An orbit that meets a side perpendicularly retraces itself, so a regular orbit of that kind is periodic. Conjecture~2.2 asks for all the other orbits in the same direction, which is a much stronger statement. When $X$ is a lattice surface, Veech's dichotomy \cite[Propositions 2.10--2.11]{Vee89} answers the question at once: every direction containing a saddle connection is completely periodic. When $d$ is even each of the classes making up $S^1(2d')$ contains the direction of a side, which is a saddle connection, so lattice triangles with $d$ even satisfy \eqref{eq:2.1}. But lattice triangles are rare, and the orbit-closure classification of Apisa \cite{Api21} places the generic rational right triangle's unfolding in a large $GL_2(\mathbb{R})$-orbit closure, about as far from a lattice surface as the setting allows. On such a surface nothing in the general theory predicts that a named direction is completely periodic. Indeed it need not be. Delecroix and R\"uth \cite{DR22} found that the right triangle $T_0$ with angles $(4/15, 7/30, 1/2)\pi$ has a direction of $S^1(2d')$ carrying a minimal component, which refutes (e) and hence (a); the isosceles triangle with angles $(7, 7, 16)\pi/30$ is another counterexample to (e). Their exhaustive search, as recorded in the sage-flatsurf 0.8.0 documentation (November 2025), found nine counterexamples to (a) with $d \leq 153$, and none to (b) with $d \leq 189$. So Conjecture~2.2 is false as stated. What remains is the question it was really asking: \textbf{for which triangles does \eqref{eq:2.1} hold, and why?} For right triangles this paper answers it on a set of density about $0.62$, and on every $Q$ with at most one odd prime factor, by proof rather than search; isosceles triangles follow through their right halves. It also locates where the arguments stop, and $T_0$ lies beyond that line. Off right triangles it gives an infinite family of counterexamples to (a). \subsection{Right triangles, and one object}\label{sec:1.2} For a right triangle the conjecture has a concrete form. Write the acute angle as $\alpha$, with \[ 2\alpha/\pi = P/Q,\quad \gcd(P, Q) = 1, \] so that the angles are $(P, Q - P, Q)\cdot\pi/2Q$, and measure directions in units of $\pi/2Q$. The reflection group of the triangle moves a direction by even multiples of $\pi/2Q$ and reverses it, and the set $S^1(2d')$ is the union of \textbf{two} of its orbits. Each orbit contains the direction perpendicular to some side of the triangle, and each is a \textbf{perpendicular class}, $\epar \in \{0, 1\}$ (\S\ref{sec:2.1}). So \begin{quote} \emph{Conjecture~2.2(e) for a right triangle says that both perpendicular classes are completely periodic.} \end{quote} (At odd $Q$ they are also the classes of the two leg directions, perpendicular to one leg being parallel to the other; at even $Q$ both legs lie in one class, and the other is the class perpendicular to the hypotenuse.) The same statement is the hypothesis of two companion papers. The first, \cite{Orph}, studies the beam launched perpendicularly from a leg. It proves that the leg is cut into finitely many \emph{branches} and that at most one of them is degenerate, an \emph{orphan}, a band of orbits that strike a side head-on and retrace. It proves that the orphan exists when $P$ is odd and $Q$ is a prime power, twice or four times a prime, or at the edges of every row (\cite{Orph}, Theorem A and \S4.5), and conjectures that it exists at every odd $P$ (\cite{Orph} Conjecture 4.12). The second, \cite{Neck}, counts the branches. The quotient of the unfolded surface by its holonomy involution is a sphere, which \cite{Neck} builds explicitly as a \textbf{necklace of $Q$ kites}, each carrying one simple pole. On a completely periodic class it proves the exact identity $Q = h + f + 2p$ (\cite{Neck} Theorem 3.4), where $h$ is the number of sides of the triangle whose direction lies in the class, $f \coloneqq \sum_{\sigma} (n_{\sigma} - 1)$ over the sides $\sigma$ perpendicular to it, $n_{\sigma}$ the number of branches of the beam launched perpendicularly from $\sigma$, and $p$ counts pairs of saddle connections exchanged by the folding (\emph{swapped} pairs); we write $n(P/Q)$ for the number of branches of \cite{Orph}'s leg beam (\cite{Neck} \S 8). $p = 0$ implies complete periodicity (\cite{Neck} Theorem 7.6), and conversely, under the existence of the orphan where \cite{Neck} needs it; then the identity becomes an exact count. So every exact count of \cite{Neck} off the lattice locus and a few families is conditional on complete periodicity, and some also on the orphan. The three questions meet in one object. Call an orbit that leaves the vertex $O$ of the acute angle $\alpha$ and reaches a vertex, without meeting a side at a right angle on the way, a \textbf{head-on-free $O$-launched connection}. When $\min(P, Q - P) \geq 2$, a swapped pair gives one (Proposition~\ref{prop:3-1}: it does not join two poles, it meets no vertical arc of the folding, so it strikes no side head-on, and reversed and with the legs exchanged if need be it starts at $O$); and at odd $P$ the orphan can fail to exist only if such a connection, from a launch direction that is an even multiple of $\pi/2Q$, ends at $A$ (Proposition~\ref{prop:3-7}). Theorem~1 makes both precise. So if no such connection exists, both perpendicular classes are completely periodic with $p = 0$, Conjecture~2.2(e) holds, and at odd $P$ the orphan exists. The rest of the paper proves that no such connection exists on large families, and shows where that statement can fail. \subsection{The methods}\label{sec:1.3} \textbf{The arrival relation (\S\ref{sec:3}).} Unfold an orbit from $O$ by reflecting the triangle in the sides it meets. The orbit becomes a straight ray, and the image of the target vertex lies on it. The images of the vertices are explicit: each reflection in the leg $L_1$ opposite $O$ contributes a term $\pm2(x^{t+1} + x^{t-1})$, $x = e^{i\alpha}$, where the integer $t$, the \emph{frame}, records the rotation of the reflected triangle. An arrival is therefore an identity $\Im(e^{-i\varphi}\mathcal{A}(x)) = 0$, $\varphi$ the launch direction, for a Laurent polynomial $\mathcal{A}$ with integer coefficients: a vanishing sum of roots of unity in $\mathbb{Q}(\zeta_{4Q})$. Two facts of plane geometry constrain it. The lines through the images of $O$ parallel or perpendicular to the launch can be crossed only by a head-on reflection, so all the frames of a head-on-free orbit lie in one \emph{window} of width $Q$ between two of them (Lemma~\ref{lem:the-window}). And the sign of each $L_1$ term is the sign of $\cos(t\alpha - \varphi)$, fixed by its frame (Lemma~\ref{lem:the-sign-of-a-reflection}). So an arrival is a vanishing sum of roots of unity whose exponents lie in a known window and whose coefficients have known signs. \textbf{The Galois certificate (\S\ref{sec:4}).} The identity has rational coefficients, so it survives every automorphism of $\mathbb{Q}(\zeta_{4Q})$. When $P + 2$ and $P - 2$ are prime to $Q$, two automorphisms move $x = e^{i\alpha}$ to $e^{i(\alpha \pm \pi/Q)}$ (to $-e^{i(\alpha \pm \pi/Q)}$ at even $P$). Subtracting the two conjugated identities turns the term at frame $d$ into $2|\cos d\alpha|\cdot\sin(d\pi/Q)$ (or $|\sin d\alpha|$), which has one sign across the window, and the term of the target $A$ acquires the same sign. A non-empty sum of terms of one sign is not zero. This is the whole proof of Theorem~2; it has no case analysis beyond the two targets and the parity of $P$. It is a difference of two specific conjugates, weighed against integer signs that conjugation does not move; it is not a positivity statement about one algebraic number at all its embeddings. \textbf{One slow prime (\S\ref{sec:5}).} Call an odd prime $p | Q$ \emph{slow} if $P \equiv \pm2 \pmod{p}$. At a slow prime the conjugation above does not exist. But there the rotation by $P/2$ modulo $p$ is $\pm1$, the slowest step. Split the frames into \emph{chains}, residue classes modulo $2Q/p$ with $p$ members each. Along a chain the signs are those of $\cos$ at $p$ phases advancing monotonically through less than half a turn, so, read in the order of the rotation, they change at most once (Lemma \ref{lem:one-sign-change}), and a chain is decided by one real phase. When $Q$ has only one odd prime this, together with the window and the step rule (Lemma~\ref{lem:the-step-rule}), decides every case except at $Q = 2p$ and $4p$, where the chains are too short and the code criterion below takes over (Remark~\ref{rem:where-the-two-methods-meet}). The core is short; the edges of the lead's range, the prime $3$, the primes $5$ and $7$ at even $Q$, and even $P$ for the target $O$ are case analyses, in Appendix A, with a certificate (A.4), a direct check (A.5) and a census at $Q \leq 80$ (A.6), all computer-assisted. \textbf{The frontier (\S\ref{sec:6}).} When $P$ has slow primes of both signs, neither conjugation exists, and Theorem~4 shows that nothing of this kind can work. The weights $|\cos d\alpha|\cdot|\sin(d\pi/Q)|$ that made Theorem~2 a contradiction become a strictly positive solution of the relaxed problem, so no certificate built from the window and the signs excludes an arrival at $O$ or $A$, at any launch. $T_0 = 8/15$ has slow primes of both signs, and there the arrival happens: an orbit from $O$ reaches $A$ after $13$ reflections, and computation places it on the boundary of the minimal component (\S\ref{sec:6.3}). \textbf{The code criterion (\S\ref{sec:7}).} The second method is older in our work and works differently. The quotient $D$ of the necklace by the folding is a chain of kites with two ends, one simple pole per kite. A minimal component of a class is a disc (Theorem~\ref{thm:the-shape-of-a-minimal}, from \cite{Neck} \S 7), and the holonomy around its boundary says that the classes $x^{e} + x^{-e}$ of its poles, read in $\mathbb{F}_2[x]/\Phi_{4Q}$, sum to zero. So the poles of a minimal component form a nonzero word of a binary linear code attached to $Q$ and the class. A Dickson-polynomial argument shows that every nonzero word has a pole within $d_T$ positions of each end of the chain, where $d_T$, the dimension of the code, is the excess of the number of poles over $\varphi(2Q)/2$; it is $0$ at an odd prime $Q$. And near an end lying on the fold, the transverse measures increase monotonically toward it, so a run of poles there reaches the fold and lies in no minimal component. When such a run covers the window, there is no minimal component (Theorem~5). The two methods are complementary rather than nested. The conjugate certificate is a residue condition and fails only at $P \equiv \pm2$. The code criterion is positional: it holds near the edges of a row $0 < P < Q$ and fails in the middle of a composite $Q$. At the slow centres of $2p$ and $4p$, where the chains of \S\ref{sec:5} are too short, the code supplies complete periodicity, except at $Q = 20$, which a finite census settles (Remark~\ref{rem:where-the-two-methods-meet}, \S\ref{sec:5.5}). \subsection{Results}\label{sec:1.4} Write a right triangle as $(P, Q - P, Q)$, with angles $P\pi/2Q$, $(Q - P)\pi/2Q$, $\pi/2$. \begin{main1}[\S\ref{sec:3}] Let $\min(P, Q - P) \geq 2$. Every head-on-free $O$-launched connection satisfies an arrival relation, an identity in $\mathbb{Q}(\zeta_{4Q})$ with sign-known coefficients and exponents in a window of width $Q$, and none ends at the right angle. If none of $P/Q$ ends at $O$ or $A$, and none of $(Q - P)/Q$ ends at $O$, both perpendicular classes are completely periodic and Conjecture~2.2(e) holds. If $P$ is odd and none from an even launch ends at $A$, the orphan of \cite{Orph} exists. \end{main1} \begin{main2}[\S\ref{sec:4}] If $\min(P, Q - P) \geq 2$ and $\gcd(P + 2, Q) = \gcd(P - 2, Q) = 1$, there is no head-on-free $O$-launched connection to $O$ or $A$. So both perpendicular classes are completely periodic with $p = 0$, the triangle satisfies Conjecture~2.2(e), and the orphan exists at odd $P$. This holds for any number of odd primes dividing $Q$. \end{main2} \begin{main3}[\S\ref{sec:5}; Appendix A, computer-assisted in part] If $Q$ has at most one odd prime factor and $\min(P, Q - P) \geq 2$, both perpendicular classes are completely periodic with $p = 0$, the triangle satisfies Conjecture~2.2(e), and the orphan exists at odd $P$. \end{main3} The share of right triangles covered by Theorem~2 tends to $(\pi^2/8)\cdot\prod_{p \geq 3}(1 - 3/p^2) \approx 0.619$ (Remark~\ref{rem:how-much-this-covers}). At every centre covered by Theorem~2 or 3, every statement of \cite{Neck} conditional on complete periodicity and the orphan holds outright (Corollaries~\ref{cor:the-conditional-theory-of-neck} and \ref{cor:the-conditional-theory-of-neck-b}); in particular $n(P/Q) = Q - 1$ at every even $P$ covered by Theorem~2 or 3. Theorems~2 and 3 prove \cite{Orph} Conjecture 4.12, the existence of the orphan at every odd $P$, at every odd $P$ with $\min(P, Q - P) \geq 2$ that they cover. The residues of $P$ at the odd primes of $Q$ organise what is proved, at $\min(P, Q - P) \geq 2$: \begin{center} \begin{tabular}{@{}>{\raggedright\arraybackslash}p{0.21\linewidth}>{\raggedright\arraybackslash}p{0.23\linewidth}>{\raggedright\arraybackslash}p{0.49\linewidth}@{}} \toprule slow primes of $P/Q$ & conjugations of \S\ref{sec:4} & what is known \\ \midrule none & both & Theorem~2: complete periodicity and the orphan \\ one sign only, $Q$ with one odd prime & one & Theorem~3: complete periodicity and the orphan \\ one sign only, two or more odd primes & one & found by computation on a finite range (Remark~\ref{rem:c-centres-computation-and-two}); Conjecture~\ref{conj:6-5} (i) \\ both signs (two odd primes at least) & none & no window-and-sign certificate exists (Theorem~4); 2.2(e) fails at $T_0$; Conjecture~\ref{conj:6-5} (ii) \\ \bottomrule \end{tabular} \end{center} \begin{main4}[\S\ref{sec:6}] Let $P$ be odd and prime to $Q$, and suppose that neither $P + 2$ nor $P - 2$ is prime to $Q$. Then the weights $|\cos d\alpha|\cdot|\sin(d\pi/Q)|$ give a strictly positive real solution of the frames-only arrival relation, and every lead at $A$ is balanced by positive frame weights; so no certificate built from the window and the signs excludes an arrival at $O$ or $A$. The triangle $T_0$ has slow primes of both signs at both of its centres and is not completely periodic. \end{main4} On $T_0$ we also give an exact, computer-assisted proof that the direction perpendicular to a leg carries a minimal, uniquely ergodic component (Proposition~\ref{prop:6-4}), and we conjecture that $T_0$ is the only rational right triangle at which Conjecture~2.2(e) fails (Conjecture~\ref{conj:6-5}). \begin{main5}[\S\ref{sec:7}] For a perpendicular class of $P/Q$, $Q$ not a power of $2$, the poles of a minimal component form a nonzero word of a binary linear code of dimension $\max(d_T, 0)$; every nonzero word has a pole among the $d_T$ positions nearest each end of the chain; and at an arc of the fold the $L_A$ nearest poles lie in no minimal component. So the class is completely periodic if $L_A \geq d_T$ at some arc, and at a single arc the test is sharp. \end{main5} At an odd prime $Q$, $d_T = 0$, and Theorem~5 gives complete periodicity at every $P$ in one paragraph. Its other instances (\S\ref{sec:7.3}) reach families at composite $Q$ that Theorems~2 and 3 do not, and following separatrices beyond the runs gives the ladder $(4, Q - 4, Q)$, $Q \equiv 3 \pmod{4}$, at every rung (Theorems~\ref{thm:the-ladder} and \ref{thm:the-paired-class-of-the}, computer-assisted in part, \S\ref{sec:B.4}). \textbf{Boshernitzan's conjecture (\S\ref{sec:8}).} Corollary~\ref{cor:8-1} collects the right triangles: every $Q$ with at most one odd prime factor, every centre with $P \pm 2$ prime to $Q$, two families at composite $Q$ from the code, and the ladder. Through the fold (Lemma~\ref{lem:the-fold}), Corollary~\ref{cor:8-6} gives Conjecture~2.2(e) for the isosceles triangles $(a, a, b)$, $N = 2a + b$, whose right halves are among these, among them every one whose $N$ has at most one odd prime factor (off the lattice locus), and 2.2(b) for further families at odd $N$, in the placements with a side at an even multiple of $\pi/d'$. A right triangle is a lattice triangle only when $\min(P, Q - P) \leq 2$ \cite{KS00}, so off that locus none of this follows from Veech's dichotomy. Before this the conjecture had been checked by computer: \cite{Bos92} for $d \leq 16$ and the flatsurf census \cite{DR22} far beyond. Troubetzkoy remarks that his method verifies it for the perpendicular direction of one side on the right triangles whose perpendicular orbits from the two acute vertices are simple periodic loops \cite{Tro05}. \textbf{The line, and the counterexamples beyond it (\S\ref{sec:9}).} Both methods use the necklace, and the code needs a minimal component to be a disc with poles in it. That rests on the quotient $X/\pm1$ being a sphere. \renewcommand{\restatedname}{Proposition~\ref{prop:9-1}}\begin{restated} Let $\Delta$ have angles $\pi a_i/N$ with $\gcd(a_1, a_2, a_3) = 1$ and $N$ even. Then $X/\pm1$ is a sphere if and only if some $a_i = N/2$. \end{restated} Off right triangles a minimal component can lift to a slit torus with no pole at all, as computed examples show, and then the relation of Theorem~\ref{thm:the-shape-of-a-minimal} (3) says nothing. That line is where the counterexamples live. The triangles $(x, 2x, 1 - 3x)\pi$ lie off it except at $x = 1/6, 1/5, 1/4$. On three short intervals of $x$ we prove that a formal direction class returns to a fixed strip by a three-interval exchange of fixed combinatorics, whose rotation number is irrational at every rational point of the interval: \begin{main6}[\S\ref{sec:9}] For every $a/d$ in lowest terms with $d$ even lying in one of three explicit intervals, near $15/92$, $21/242$ and $23/270$, the triangle with angles $(a, 2a, d - 3a)\pi/d$ has a direction of $S^1(2d')$ that is periodic but not purely periodic. In particular Conjecture~2.2(a) fails for infinitely many triangles. \end{main6} The proof is computer-assisted: exact Laurent-polynomial identities and interval arithmetic. The triangle $(15, 30, 47)$ lies in the first interval and is among the nine of \cite{DR22}. \subsection{Relation to previous work}\label{sec:1.5} \textbf{Galois conjugation.} Galois conjugation together with a sign has excluded configurations before. Kenyon and Smillie \cite{KS00} test the lattice property of a rational triangle by the positivity of a form on Galois-conjugate data, a test that Puchta \cite{Puc01} completed, and Mirzakhani--Wright \cite{MW18} and Apisa \cite{Api21} use the Galois-conjugate eigenforms indexed by $(\mathbb{Z}/2Q)^{\times}$ to compute orbit closures. In tiling problems Laczkovich \cite{Lac90} transports a tiling by a cyclotomic automorphism and reads a contradiction off the signs of the conjugated cotangents, and Freiling--Rinne \cite{FR94} and Laczkovich--Szekeres \cite{LS95} decide which rectangles tile a square by the signs of the real parts of the conjugates of their ratio. Here the automorphisms act on one identity among roots of unity attached to one orbit, and the conclusion comes from the difference of two specific conjugates weighed against signs fixed by the geometry. Galois conjugation has proved periodicity before: McMullen's Galois flux \cite[Corollary 4.3 and \S 8]{McM03} shows that a zero-flux foliation in genus two is periodic (see below). What we know no precedent for is conjugation of an identity attached to an individual orbit, weighed against geometric signs, to exclude a generalized diagonal. \textbf{McMullen's Galois flux.} The code criterion has one ancestor, and it is worth being precise about the relation. McMullen \cite[\S 2]{McM03} attaches to an interval exchange $f(x) = x + t_j$ on $I_j$, with translations in a real quadratic field $K$, the \textbf{Galois flux} $\text{flux}(f) = \Sigma |I_j| t'_j$, $t'$ the Galois conjugate. Since $\text{flux}(f^n) = n\cdot\text{flux}(f)$, a periodic map has zero flux, and \cite[Theorem 2.1]{McM03} shows that a uniquely ergodic one has nonzero flux. With Theorem 2.2 of that paper, its vanishing excludes an aperiodic part that is uniquely ergodic. The relation of Theorem~\ref{thm:the-shape-of-a-minimal} (3) does the same job in characteristic $2$. There are two reasons the characteristic-$0$ invariant cannot be used here. First, the flux is a projection of the Sah--Arnoux--Fathi invariant (\cite{McM03}, Notes to \S\ref{sec:1}), and in every saddle-connection direction of a rational-triangle unfolding that invariant vanishes: such surfaces are completely algebraically periodic (Calta--Smillie \cite[Theorem 1.4]{CS08}). So on our surfaces the flux sees nothing. Second, the lengths of the minimal component of $T_0$ lie in the quartic field $\mathbb{Q}(\zeta_{30})^+$, outside the quadratic setting of \cite[Theorem 2.1]{McM03}. The $\mathbb{F}_2$ relation reads something the SAF invariant does not: the half-turn holonomy at the simple poles, the $2$-torsion of the half-translation structure. In the other direction, the translation data on which the flux is built is exactly what the reduction modulo $2$ discards (Remarks~\ref{rem:why-the-prime-is}--\ref{rem:no-adic-refinement-on-the}). The two invariants are complementary, not competing. \textbf{Lattice surfaces and orbit closures.} Veech's dichotomy \cite{Vee89} gives \eqref{eq:2.1} on the lattice locus. For right triangles that locus is $\min(P, Q - P) \leq 2$ (Kenyon--Smillie \cite{KS00}; Apisa \cite{Api21}), and there our results add nothing. Off it, Apisa \cite{Api21} shows that the unfolding of an unexceptional right triangle has a dense $GL_2(\mathbb{R})$-orbit in a locus of holonomy double covers of a genus-zero stratum, so no rigidity from the $GL_2(\mathbb{R})$ action is available for an individual direction. Our theorems are statements at individual arithmetic points of such a locus. \textbf{Computation.} The sage-flatsurf project decides complete periodicity of a given direction by a flow decomposition, certifying minimal components with a criterion of Boshernitzan, and its census \cite{DR22} is the strongest evidence on Conjecture~2.2. Theorem~6 is the first infinite family of counterexamples that we know of; it was found by computation and proved on intervals. \textbf{Coding theory and cyclotomic arithmetic.} Lemma~\ref{lem:7-2} (a) is equivalent to Dresden's theorem \cite{Dre04} that the middle coefficient of $\Phi_N$ is odd unless $N$ is a power of $2$. We give its short proof because we need it in the form stated. Lemma~\ref{lem:7-2} (b) and the window bound built on it are elementary. The codes that arise are symmetric subcodes of cyclic codes with zeros at primitive roots of unity. Lam and Leung \cite{LL96} study the weights of vanishing sums of roots of unity in characteristic $p$; the codes here are of that kind. We know of no earlier use of a binary code to exclude minimal components or to prove complete periodicity of a direction. \subsection{What the methods cannot do}\label{sec:1.6} We state the limits as remarks beside the results they bound. Each is a theorem about a method, and each says where new ideas are needed. \begin{itemize} \tightlist \item \textbf{Window and signs stop at slow primes of both signs (Theorem~4).} At a centre with slow primes of both signs the relaxed arrival problem has a strictly positive solution, so any proof there must use more than the window, the frame signs and linear algebra over $\mathbb{Q}$. $T_0$ shows that the conclusion itself can fail there. \S\ref{sec:5} uses a fourth input, the step rule (Lemma~\ref{lem:the-step-rule}), which says which sequences of frames an orbit can run through; Theorem~4 concerns the three inputs without it. \item \textbf{The prime is $2$, and only $2$ (Remark~\ref{rem:why-the-prime-is}).} The stabiliser of a line field in $O(2)$ is the Klein four-group, of exponent $2$, and the translations of a reflection group are twice its mirror distances. So once the unknown translations are allowed for, the characteristic-$0$ identity behind Theorem~\ref{thm:the-shape-of-a-minimal} (3) carries, on the class $\epar = 0$ and off $Q = 2^k$, exactly one class in $\mathcal{A}/2\mathcal{A}$, where $\mathcal{A} \coloneqq \{\beta - \bar{\beta} : \beta \in \mathbb{Z}[w]\}$. Reducing modulo an odd prime not dividing $2Q$ gives nothing, and the primes over the odd $p | Q$ are the next bullet. \item \textbf{No $2$-adic refinement on pole classes (Remark~\ref{rem:no-adic-refinement-on-the}).} Off $Q = 2^k$ the unknown translation parts of the poles fill $2\mathbb{Z}[w]^+$ modulo $4$, so the identity modulo $4$ says nothing the identity modulo $2$ does not. \item \textbf{Odd primes enter the code only inhomogeneously (Remark~\ref{rem:odd-primes-enter-only-through}).} \cite{Orph} proves existence of the orphan at every prime-power $Q$ using the prime over $p$, through the constant $1$ of its fan identity. The homogeneous relation of Theorem~\ref{thm:the-shape-of-a-minimal} (3) is automatically satisfied modulo that prime, so the argument gives no complete-periodicity theorem. \item \textbf{The middle of a composite row (Remark~\ref{rem:what-is-not-touched}).} There the runs at both ends are short, relations exist that avoid them, and Theorem~5 says nothing. The ladder (Remark~\ref{rem:part-5-and-the-runs}) shows what following separatrices further can add. \item \textbf{Right triangles and the isosceles fold (\S\ref{sec:9}).} At even $d$ no other triangle has a spherical quotient (Proposition~\ref{prop:9-1}). Other translation covers are left open. \end{itemize} \subsection{What is imported, and organisation}\label{sec:1.7} The paper is the third in a series and imports from the first two; nothing in \cite{Orph} or \cite{Neck} depends on it. From \cite{Orph} it imports the coordinates of \cite{Orph} \S 1.1, the genus and stratum of the unfolding (\cite{Orph} \S 6, Proposition~7.1), the development of the leg beam and its retrace criterion (\cite{Orph} Lemmas 2.1, 3.1 and 3.2, Proposition~3.4), the folded disc of the leg beam (\cite{Orph} Lemma 4.8, and the proof of Lemma~4.9), the absence of the orphan at even $P$ (\cite{Orph} Theorem A), the existence theorems for the orphan (\cite{Orph} Theorems 4.11 and 4.18, Corollary~4.20, Theorem~4.24), the form of the translation parts from the proof of \cite{Orph} Theorem 4.11, and the fan identity (\cite{Orph} Lemmas 4.10 and 4.15). From \cite{Neck} it imports the necklace, its class involution and its interval model (\cite{Neck} \S \S 1.2, 2 and 4, Propositions 2.1, 2.2, 2.3, 6.6 and 6.10), the trichotomy of saddle connections (\cite{Neck} Lemma 3.3), the behaviour of the prong of an interior pole of the quotient, which ends at no interior pole and at no zero (\cite{Neck} Theorems 6.1, 6.3 and 6.7), the results of \cite{Neck} \S 7 that the shape of a minimal component reads (Proposition~7.1, Corollaries~7.3--7.5), the theorem that $p = 0$ implies complete periodicity and its converse under the orphan (\cite{Neck} Theorem 7.6, Corollary~7.11), and the conditional counting theorems that Corollaries~\ref{cor:the-conditional-theory-of-neck}, \ref{cor:the-conditional-theory-of-neck-b} and \ref{cor:the-conditional-theory-of-neck-b-b} make unconditional, with the hypothesis (OB) of \cite{Neck} \S 1.5 and the statement (ZZ) of \cite{Neck} \S 6.2. (OB) at $P/Q$ is the existence of the orphan at $P'/Q$, where $P' \coloneqq P$ if $P$ is odd and $P' \coloneqq Q - P$ if $P$ is even (the beam perpendicular to $L_1$ of $P'/Q$ has an orphan branch); it is the hypothesis under which \cite{Neck} Corollary 7.11 gives $p = 0$ from complete periodicity on the classes with two perpendicular beams off the lattice locus; \cite{Neck} \S 10 proves it in three families, named in Corollary~\ref{cor:the-conditional-theory-of-neck-b-b}. (ZZ) says that no swapped saddle connection joins two zeros (\cite{Neck} Proposition 6.6), so $p = 0$ implies it by definition. Results cited only in remarks are named where they are used. The identification of the unfolding of an isosceles triangle with that of its right half is proved here (Lemma~\ref{lem:the-fold}). \S\ref{sec:2} recalls the setting and develops orbits from a vertex. \S\ref{sec:3} proves Theorem~1. \S\ref{sec:4} proves Theorem~2. \S\ref{sec:5} proves Theorem~3, with the finite case analysis in Appendix A. \S\ref{sec:6} proves Theorem~4 and treats $T_0$. \S\ref{sec:7} proves the code criterion and its instances, with the ladder in Appendix B. \S\ref{sec:8} assembles Boshernitzan's conjecture for right and isosceles triangles, and \S\ref{sec:9} proves Proposition~\ref{prop:9-1} and Theorem~6. \section{Setting}\label{sec:2} \emph{Everything in \S\S\ref{sec:2.1}--\ref{sec:2.2} except Lemma~\ref{lem:2-1} is proved in \cite{Orph} or \cite{Neck} or is immediate from them; \S\ref{sec:2.3} is elementary plane geometry and is proved here.} \subsection{The triangle, its directions and its two classes}\label{sec:2.1} $T$ is the right triangle with vertices $O$, $R$, $A$, right angle at $R$, acute angle $\alpha$ at $O$, legs $L_1 = RA$, $L_2 = OR$ and hypotenuse $H = OA$, in the coordinates of \cite{Orph} \S 1.1: $O = 0$, $R = L \coloneqq \cot \alpha$, $A = L + i$. We assume \[ 2\alpha/\pi = P/Q,\quad \gcd(P, Q) = 1,\quad Q \geq 3, \] and call $P/Q$ the \textbf{centre}. Put $\theta \coloneqq \pi/2Q$, so that $\alpha = P\theta$, and measure directions in units of $\theta$: the sides have directions $0$ ($L_2$), $Q$ ($L_1$) and $P$ ($H$). The group generated by the reflections in the sides moves a direction by even multiples of $\theta$ and reverses it, so the directions that are integer multiples of $\theta$ fall into two orbits up to reversal, by the parity $\epar \in \{0, 1\}$ of the multiple. These are the two \textbf{perpendicular classes}: each contains the direction perpendicular to some side, and every side-perpendicular direction lies in one of them. At odd $Q$ the classes are those of the two legs. At even $Q$ both legs lie in the class $\epar = 0$, and the class $\epar = 1$ is that of the direction perpendicular to the hypotenuse. \textbf{Exchanging the legs} turns the triangle of $P/Q$ into that of $(Q - P)/Q$, with $O$ and $A$ exchanged, and carries the multiples of $\theta$ to themselves. In Boshernitzan's normalisation $d = 2Q$, $d' = 2Q$, and $S^1(2d')$ is the set of multiples of $\theta$; with $L_2$ horizontal, as here, the class $\epar = 0$ is $S^1(d')$ and the class $\epar = 1$ is $S^1(2d') \setminus S^1(d')$. So: \begin{lemma}\label{lem:2-1} A rational right triangle satisfies Conjecture~2.2(e) if and only if both of its perpendicular classes are completely periodic. \end{lemma} \begin{proof} Membership of a direction in $\mathcal{P}_0$ is a property of its orbit under the reflection group, since the orbit is one flow on the unfolding, and $\psi$ and $\psi + \pi$ give the same leaves. $S^1(2d')$ is the union of the two classes, and a class lies in $\mathcal{P}_0$ exactly when its flow on the unfolding has no minimal component \cite[\S 11: Theorem 11.1 and its Corollaries, \S \S 11.2 and 11.4]{Str84}. Any placement allowed by \cite{Bos92} Corollary 1.7 rotates $S^1(2d')$ into itself. \end{proof} \subsection{The necklace, the class involution and swapped connections}\label{sec:2.2} Unfold $T$ to the translation surface $S_{\alpha}$, of genus $\lfloor Q/2\rfloor$ (\cite{Orph} \S 6), and write $-1$ for its rotation through $\pi$. Then $B = S_{\alpha}/\langle-1\rangle$ is a half-translation sphere in the stratum $Q(P - 2, Q - P - 2, -1^Q)$ (\cite{Orph} Proposition 7.1, \cite{Api21}): the images of $O$ and of $A$ are cone points of angles $P\pi$ and $(Q - P)\pi$, and the $Q$ images of $R$ are simple poles. \cite{Neck} builds $B$ explicitly as a \textbf{necklace of $Q$ kites}, each kite two copies of $T$ glued along both legs, with one simple pole at the image of $R$ (\cite{Neck} Propositions 2.1--2.2). Fix a perpendicular class. Its \textbf{class involution} $\iota$ is the reflection of $B$ that preserves the class foliation, a dihedral reflection of the necklace (\cite{Neck} \S \S 1.2, 2), and $D \coloneqq B/\iota$ is a chain of kites. Its fixed set $\operatorname{Fix}(\iota)$ is a union of side-copies, those parallel to the class direction (\textbf{horizontal arcs}) and those perpendicular to it (\textbf{vertical arcs}). A saddle connection $e$ of the class direction is \textbf{swapped} if $\iota(e)$ is a saddle connection different from $e$, and $p$ is the number of swapped pairs. We use three facts from \cite{Neck}. \begin{itemize} \tightlist \item \emph{The trichotomy} (\cite{Neck} Lemma 3.3, with no hypothesis). Exactly one of: $e$ is a horizontal arc; $e$ is $\iota$-invariant, meets $\operatorname{Fix}(\iota)$ in exactly one interior point of $e$, its midpoint, and that point lies in the interior of a vertical arc; $e$ is swapped. Conversely, every point of the critical graph in the interior of a vertical arc lies on an edge of the second kind, so \textbf{a swapped connection meets no vertical arc at an interior point.} \item \emph{No pole-to-pole prong in the quotient} (\cite{Neck} Theorems 6.1 and 6.3, at every $Q \geq 3$). In $D \coloneqq B/\iota$, the prong of an interior simple pole, followed until it meets $\partial D$ (\cite{Neck} \S 6.1), reaches no other interior simple pole (Theorem~6.1) and does not return to its own (Theorem~6.3). \item \emph{$p = 0$ implies complete periodicity} (\cite{Neck} Theorem 7.6). A class with no swapped connection is completely periodic. \end{itemize} A billiard orbit meets a side \textbf{head-on} if it meets it at a right angle, and then retraces itself. Unfolded, a head-on collision is a crossing of a side-copy perpendicular to the class direction, that is, of a vertical arc. So, by the trichotomy, \textbf{a swapped connection is head-on-free.} \subsection{Orbits launched from a vertex}\label{sec:2.3} Let a billiard orbit leave $O$ into $T$ in the direction $\varphi = u_0\theta$, $u_0 \in \mathbb{Z}$, $0 < u_0 < P$. It meets the opposite side $L_1$ first, and we follow it through $n$ reflections, recording the sides met as a \textbf{word} $s_1s_2\cdots s_n$, $s_1 = L_1$. Unfold it: put $T_0 = T$, and let $T_j$ be the reflection of $T_{j-1}$ in its side $s_j$, so that the orbit becomes a straight ray from $O$ crossing $T_0, T_1, \ldots$ in turn. Write $T_j = g_j(T)$ with $g_0 = \mathrm{id}$ and $g_j = g_{j-1} \circ r_{s_j}$, $r_s$ the reflection of the plane in the side $s$ of $T$. Then \[ g_j(z) = e^{iR_j}\cdot z + O_j\text{ (}j\text{ even), }g_j(z) = e^{iR_j}\cdot\bar{z} + O_j\text{ (}j\text{ odd),} \] with $O_j = g_j(O)$, and since $r_{L_2}(z) = \bar{z}$, $r_H(z) = e^{2i\alpha}\bar{z}$ and $r_{L_1}(z) = 2L - \bar{z}$, the angle $R_j$ and the point $O_j$ change only as follows: a letter $H$ at step $j$ adds $(-1)^{j-1}\cdot2\alpha$ to $R$; a letter $L_1$ adds $\pi$ to $R$ and moves $O$ by $2L\cdot e^{iR_{j-1}}$; a letter $L_2$ changes neither. Hence \[ R_j = 2H_j\cdot\alpha + \lambda_j\cdot\pi,\quad H_j \coloneqq \sum_{i \leq j, s_i = H} (-1)^{i-1},\quad \lambda_j \coloneqq \#\{i \leq j : s_i = L_1\}. \] We call $t_j \coloneqq 2H_j$ the \textbf{frame} of $T_j$. Say a line through an image of $O$ has \textbf{index} $m \in \mathbb{Z}$ if it makes the angle $m\alpha$ with $L_2$, modulo $\pi$. The two sides of $T_j$ through $O_j$ have indices $t_j$ (its $L_2$-side) and $t_j + (-1)^j$ (its $H$-side), and we write $I_j$ for the closed integer interval between them; $I_0 = [0, 1]$. The $L_1$-side of $T_j$ is perpendicular to the index-$t_j$ line, at distance $L$ from $O_j$, and $T_j$ lies on the side of it containing $O_j$, so its \textbf{outward normal} there is $e^{iR_j}$. Put $x \coloneqq e^{i\alpha}$. Since $2L = 2\cos \alpha/\sin \alpha = (x + x^{-1})/\sin \alpha$, $R = L$ and $A = L + i = x/\sin \alpha$, the images of the vertices after $n$ reflections are \begin{gather*} \sin \alpha\cdot(O_n - O) = \sum_{i \leq n,\ s_i = L_1} (-1)^{\lambda_{i-1}}(x^{t_{i-1}+1} + x^{t_{i-1}-1}); \\ \sin \alpha\cdot(g_n(R) - O_n) = \tfrac12(-1)^{\lambda_n}(x^{t_n+1} + x^{t_n-1}); \\ \sin \alpha\cdot(g_n(A) - O_n) = (-1)^{\lambda_n}x^{k},\quad k \coloneqq t_n + (-1)^n. \end{gather*} So for each target $V \in \{O, R, A\}$ the vector $2 \sin \alpha\cdot(g_n(V) - O)$ is $\mathcal{A}_V(x)$ for an explicit Laurent polynomial $\mathcal{A}_V$ with integer coefficients, the \textbf{arrival polynomial} of the word: a sum of one term $2(-1)^{\lambda}(x^{t+1} + x^{t-1})$ for each reflection in $L_1$, taken at the frame $t$ of the triangle reflected, plus a \textbf{lead} --- none for $O$, half an $L_1$ term at the frame $t_n$ for $R$, and the monomial $2(-1)^{\lambda_n}x^k$ for $A$. If the orbit reaches the image of $V$ after its $n$-th reflection, then that image lies on the ray of direction $\varphi$, so \begin{equation} \Im(e^{-i\varphi}\cdot\mathcal{A}_V(x)) = 0. \tag{2.4}\label{eq:2.4} \end{equation} An orbit from $O$ that reaches a vertex after $n \geq 1$ reflections without meeting a vertex earlier is an \textbf{$O$-launched connection} of the centre, with \textbf{target} that vertex. It is \textbf{head-on-free} if no reflection is head-on. \section{No arrival}\label{sec:3} \begin{main1} Let $P/Q$ be a centre with $\min(P, Q - P) \geq 2$. \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item Every head-on-free $O$-launched connection satisfies an \textbf{arrival relation} (Proposition~\ref{prop:the-arrival-relation}): an identity with integer coefficients (after doubling) in $\mathbb{Q}(\zeta_{4Q})$, one term for each reflection in $L_1$, whose coefficients carry signs fixed by $P$, $u_0$ and the frames, and whose exponents lie in a window of width $Q$. No head-on-free $O$-launched connection ends at $R$. \item If no head-on-free $O$-launched connection of $P/Q$ ends at $O$ or at $A$, and none of $(Q - P)/Q$ ends at $O$, then neither perpendicular class of $P/Q$ has a swapped connection. Both are completely periodic, and the triangle $(P, Q - P, Q)$ satisfies Boshernitzan's Conjecture~2.2(e). \item If $P$ is odd, and no head-on-free orbit from $O$ in a direction $u_0\theta$ with $u_0$ even, $0 < u_0 < P$, reaches $A$, then the orphan of \cite{Orph} exists at $P/Q$. \end{enumerate} \end{main1} Parts 2 and 3 assume nothing about complete periodicity. Part 1 is what makes the hypotheses of parts 2 and 3 checkable: an arrival is a vanishing sum of roots of unity whose coefficients have known signs, and \S\ref{sec:4} shows that a difference of two Galois conjugates of it is a sum of terms of one sign. That the vertex images lie in a cyclotomic field, and that this constrains generalized diagonals, is the mechanism of Boshernitzan's finiteness theorem \cite[Propositions 3.2 and 5.1, Theorem 1.6]{Bos92}; the window and the signs make it quantitative. \subsection{The reduction}\label{sec:3.1} \begin{proposition}\label{prop:3-1} Let $\min(P, Q - P) \geq 2$. A swapped connection in either perpendicular class of $P/Q$ gives a head-on-free $O$-launched connection, either of $P/Q$ with target $O$, $A$ or $R$, or of $(Q - P)/Q$ with target $O$ or $R$. \end{proposition} \begin{proof} Let $e$ be swapped. Its endpoints are singular points of $B$: images of $O$ or $A$, which are not poles because $P, Q - P \geq 2$ (their cone angles are at least $2\pi$), or simple poles. Suppose both are poles. A pole fixed by $\iota$ has a single separatrix germ, which $\iota$ preserves, so a connection leaving it is $\iota$-invariant; hence neither endpoint of $e$ is fixed. By the trichotomy, and since a swapped connection cannot meet $\operatorname{Fix}(\iota)$ at a regular point or lie along a horizontal arc (\cite{Neck}, after Proposition~6.6), $e$ meets $\operatorname{Fix}(\iota)$ at most at its endpoints, so it projects to a prong of an interior pole of $D$ ending at an interior pole, which \cite{Neck} Theorems 6.1 and 6.3 exclude. So $e$ has an endpoint at an image of $O$ or $A$, and we orient $e$ from it, choosing $O$ if one endpoint is an image of $O$ and the other of $A$. Projected to $T$, $e$ is a billiard orbit from a vertex to a vertex, in a direction that is a multiple of $\theta$, meeting no vertex in between, and head-on-free (\S\ref{sec:2.2}). If it starts at $A$, exchanging the legs makes it an orbit from $O$ at $(Q - P)/Q$; its target is then $O$ or $R$, since a connection from $A$ to $O$ has been oriented from $O$. An orbit from $O$ into $T$ leaves in a direction $u_0\theta$ with $0 \leq u_0 \leq P$, and the ends are excluded: an orbit along $L_2$ or $H$ is a side-copy in the class direction, a horizontal arc, which is not swapped. \end{proof} \subsection{The window}\label{sec:3.2} Fix a launch $\varphi = u_0\theta$, $0 < u_0 < P$. Call an integer $b$ a \textbf{barrier} if the index-$b$ line is parallel to the launch direction ($bP \equiv u_0 \pmod{2Q}$) or perpendicular to it ($bP \equiv u_0 + Q \pmod{2Q}$). \emph{The barriers form one residue class modulo $Q$.} If $P$ is odd, $bP \equiv u_0$ has a single solution $b_0$ modulo $2Q$, and since $QP \equiv Q \pmod{2Q}$ the perpendicular barriers are $b_0 + Q$: the two kinds alternate along the class. If $P$ is even, then $Q$ is odd, exactly one of $u_0$, $u_0 + Q$ is even, and it gives one class modulo $Q$, all barriers of one kind. Neither $0$ nor $1$ is a barrier, because $0 < u_0 < P < Q$. Let $b_-$ be the largest barrier below $0$; the \textbf{window} is $W \coloneqq [b_-, b_- + Q]$, and $I_0 = [0, 1]$ lies in its interior. \begin{lemma}[the window]\label{lem:the-window} Along a head-on-free orbit from $O$ every $I_j$ lies in $W$. The frame of every reflection in $L_1$, and the frame $t_n$ of an arrival at $R$, lie strictly inside $W$. Hence every exponent of the arrival polynomial of a head-on-free $O$-launched connection lies in $W$. \end{lemma} \begin{proof} Crossing the side $L_2$ or $H$ of $T_j$ replaces $I_j$ by the adjacent interval sharing the index of the side crossed; crossing $L_1$ reflects $I_j$ about $t_j$. So $I_j$ can pass from one side of a barrier $b$ to the other only (i) across a side through $O_j$ of index $b$, or (ii) across the $L_1$-side of a $T_j$ with $t_j = b$. If the launch is parallel to the index-$b$ line, (i) is impossible, since a ray does not cross a segment parallel to it, and (ii) is a head-on, since the $L_1$-side is perpendicular to the index-$t_j$ line. If the launch is perpendicular to it, (i) is a head-on and (ii) is impossible. The same two cases show that a reflection in $L_1$ at a frame $t_j = b$ is a head-on or does not occur. An arrival at $R_n$ with $t_n = b$ would run along the $L_2$-side or the $L_1$-side of $T_n$, through $O_n$ or $A_n$, so it does not occur. The exponents of an $L_1$ term are $t \pm 1$ and lie in $W$; the exponent $k$ of an $A$ lead is an endpoint of $I_n$. \end{proof} The window is exactly the stretch between two head-on positions: a head-on is a crossing of a barrier. This is the chain fact behind Hooper's instability theorem for periodic paths of right triangles (\cite{Hoo07}, proof of Proposition~5, where the chain is built for irrational right triangles: a line through a rhombus of the chain leaves by the opposite edge or passes on to the next rhombus), used here for saddle connections. \subsection{Two signs}\label{sec:3.3} \begin{lemma}[the sign of a reflection in $L_1$]\label{lem:the-sign-of-a-reflection} Along any orbit from $O$ in direction $\varphi$, a reflection in $L_1$ at step $i$ carries the sign $(-1)^{\lambda_{i-1}} = \operatorname{sgn} \cos(t_{i-1}\alpha - \varphi)$, which is never $0$. The same holds for the lead of an arrival at $R$ or at $A$, with $\lambda_n$ and $t_n$. \end{lemma} \begin{proof} The orbit leaves $T_{i-1}$ through its $L_1$-side, so its direction has positive component along the outward normal $e^{iR_{i-1}}$: $\cos(\varphi - R_{i-1}) > 0$, and $R_{i-1} = t_{i-1}\alpha + \lambda_{i-1}\pi$. An arrival at $R_n$ or $A_n$ comes from the interior of $T_n$ to a point of the line of its $L_1$-side, and not along that line, so the same inequality holds with $n$. \end{proof} So in \eqref{eq:2.4} \textbf{the signs of the coefficients are determined by $P$, $u_0$ and the frames, and the multiplicities are non-negative.} Galois conjugation will move $x$ and keep these integer signs. \begin{lemma}[the arrival arc at $A$]\label{lem:the-arrival-arc-at} Let a head-on-free orbit from $O$ arrive at $A_n$, and let $b$ be a barrier parallel to the launch (one exists when $P$ is odd, \S\ref{sec:3.2}). Put $\kappa \coloneqq k - b$ and $c(d) \coloneqq \operatorname{sgn} \cos(d\alpha)$. Then $\kappa\alpha \notin (\pi/2)\mathbb{Z}$, and $c(\kappa - 1) = c(\kappa + 1)$, and this common value is $\operatorname{sgn} \cos(b\alpha - \varphi)\cdot(-1)^{\lambda_n}$. \end{lemma} \begin{proof} The orbit enters $A_n$ from inside $T_n$, so in the coordinates of $T$ its direction of travel lies strictly between the directions of $RA$ and $OA$ at $A$: it makes an angle in $(\alpha, \pi/2)$ with $L_2$. In the plane this angle is $(-1)^n(\varphi - R_n)$, and $\varphi \equiv b\alpha$, $R_n \equiv t_n\alpha \pmod{\pi}$, $k = t_n + (-1)^n$, so $-(-1)^n\cdot\kappa\alpha \in (0, \pi/2 - \alpha) \pmod{\pi}$. Then $(\kappa \pm 1)\alpha$ lie in one interval $(-\pi/2, \pi/2) + \pi\ell$, so $\cos((\kappa \pm 1)\alpha)$ have the sign $(-1)^{\ell}$. One of $\kappa \pm 1$ is $t_n - b$, and $\cos(t_n\alpha - \varphi) = \cos(b\alpha - \varphi)\cdot\cos((t_n - b)\alpha)$ with $\cos(b\alpha - \varphi) = \pm1$; Lemma~\ref{lem:the-sign-of-a-reflection} gives the last assertion. \end{proof} \subsection{The arrival relation}\label{sec:3.4} Write $S_e(x) \coloneqq x^e - x^{-e}$ and $C_e(x) \coloneqq x^e + x^{-e}$, and note $S_{e+1} + S_{e-1} = (x + x^{-1})S_e$, and the same for $C$. Let a head-on-free $O$-launched connection be given, let $m(t) \geq 0$ be the number of its reflections in $L_1$ at frame $t$ (so $m(0) \geq 1$, the first letter), and choose an end $b$ of $W$: if $P$ is odd, the end parallel to the launch; if $P$ is even, the even end, whose kind is that of the other end. Put $d \coloneqq t - b$. By Lemma~\ref{lem:the-window} every frame has $d \in \nu\cdot(0, Q)$, where $\nu = +1$ if $b = b_-$ and $\nu = -1$ otherwise; we write $m(d)$ for $m(b + d)$. For the target $A$ put $\kappa \coloneqq k - b$, as in Lemma~\ref{lem:the-arrival-arc-at}, at either kind of end. \begin{proposition}[the arrival relation]\label{prop:the-arrival-relation} If $b$ is parallel to the launch, with $\varepsilon_0 \coloneqq \cos(b\alpha - \varphi) = \pm1$, the connection satisfies, in $\mathbb{Q}(\zeta_{4Q})$, \[ (x + x^{-1})\cdot\sum_d m(d)\cdot c(d)\cdot S_d(x) + \ell = 0, \quad c(d) = \operatorname{sgn} \cos(d\alpha), \] where the lead $\ell$ is $0$ for the target $O$, $\tfrac12(x + x^{-1})\cdot c(d_n)\cdot S_{d_n}(x)$ for the target $R$ ($d_n \coloneqq t_n - b$), and $c^*\cdot S_{\kappa}(x)$ for the target $A$, $c^* \coloneqq \varepsilon_0(-1)^{\lambda_n} = c(\kappa \pm 1)$. If $b$ is perpendicular to the launch, the same holds for the targets $O$ and $R$ with $C_d$ in place of $S_d$ and $s(d) \coloneqq \operatorname{sgn} \sin(d\alpha)$ in place of $c(d)$, and for the target $A$ with the lead $-\varepsilon_0(-1)^{\lambda_n}C_{\kappa}(x)$, where now $e^{i(b\alpha - \varphi)} = i\varepsilon_0$. \end{proposition} \begin{proof} If $b$ is parallel, $e^{-i\varphi} = \varepsilon_0x^{-b}$, so \eqref{eq:2.4} reads $\Im(x^{-b}\mathcal{A}_V(x)) = 0$. By Lemma~\ref{lem:the-sign-of-a-reflection} a reflection in $L_1$ at frame $t$ has sign $\operatorname{sgn} \cos(t\alpha - \varphi) = \varepsilon_0\cdot c(d)$, since $\cos(t\alpha - \varphi) = \cos(d\alpha)\cdot\cos(b\alpha - \varphi)$, and the $A$ lead has $(-1)^{\lambda_n} = \varepsilon_0\cdot c^*$ by Lemma~\ref{lem:the-arrival-arc-at}. So $x^{-b}\mathcal{A}_V = \varepsilon_0\cdot(\sum_d 2m(d)c(d)(x^{d+1} + x^{d-1}) + \ldots)$, and $\Im(\Sigma a_e x^e) = (2i)^{-1}\Sigma a_e S_e$ for real $a_e$ gives the relation. If $b$ is perpendicular, write $e^{i(b\alpha - \varphi)} = i\varepsilon_0$; then the sign of an $L_1$ term is $-\varepsilon_0\cdot s(d)$, \eqref{eq:2.4} reads $\Re(x^{-b}\mathcal{A}_V(x)) = 0$, and $\Re(\Sigma a_e x^e) = \tfrac12\Sigma a_e C_e$. \end{proof} \subsection{No arrival at $R$}\label{sec:3.5} \begin{proposition}\label{prop:3-6} At every centre, no head-on-free $O$-launched connection ends at $R$. \end{proposition} \begin{proof} Divide the relation of Proposition~\ref{prop:the-arrival-relation} by $x + x^{-1}$, which is not $0$ since $\alpha \neq \pi/2$, and double it. In $\sum_d 2\tilde{m}(d)\cdot c(d)\cdot S_d(x) = 0$, with $\tilde{m} = m + \tfrac12[d = d_n]$, the coefficient at $d_n$ is odd and all others are even, so $S_{d_n}(x) = x^{-d_n}(\eta - 1)$ lies in $2\mathbb{Z}[\zeta_{4Q}]$, where $\eta \coloneqq x^{2d_n}$ is a root of unity; since $\mathbb{Z}[\zeta_{4Q}] \cap \mathbb{Q}(\eta) = \mathbb{Z}[\eta]$, $1 - \eta \in 2\mathbb{Z}[\eta]$. If $\eta$ had order $r \geq 3$, the norm of $1 - \eta$ from $\mathbb{Q}(\eta)$, which is $\Phi_r(1)$, would be divisible by $2^{\varphi(r)}$; but $\Phi_r(1)$ is $2$ when $r$ is a power of $2$ (and then $\varphi(r) \geq 2$), an odd prime when $r$ is an odd prime power, and $1$ otherwise. So $\eta = \pm1$. At a perpendicular end the same argument with $C$ in place of $S$ gives $1 + \eta = 1 - (-\eta) \in 2\mathbb{Z}[\eta]$, so again $\eta = \pm1$. Now $x$ has order $4Q$ when $P$ is odd and $2Q$ or $Q$ when $P$ is even (then $Q$ is odd), and in each case $x^{2d_n} = \pm1$ forces $Q | d_n$: the frame $t_n$ is a barrier, against Lemma~\ref{lem:the-window}. \end{proof} \subsection{No arrival at $A$ and the orphan}\label{sec:3.6} The last part of Theorem~1 is the bridge from no-arrival to existence. It is \cite{Orph}'s folded disc read with an arrival in mind, and it is the reason the orphan and complete periodicity are decided by the same certificate. \begin{proposition}\label{prop:3-7} Let $P$ be odd. If no head-on-free orbit from $O$ in a direction $u_0\theta$, $u_0$ even, $0 < u_0 < P$, reaches $A$, then the orphan branch exists. \end{proposition} \begin{proof} Let $\Sigma$ be the fixed development of \cite{Orph} Lemma 3.2, the $4Q$ copies of $T$ labelled by the reflection group, $V_4 = \{1, -1, r_{L_1}, r_{L_2}\}$ the stabiliser of the vertical line, and $D_{\perp} \coloneqq \Sigma/V_4$ the folded disc of \cite{Orph} Lemma 4.8, with its horizontal foliation, the image of the beam perpendicular to $L_1$. By \cite{Orph} Lemma 4.8 its boundary consists of the launch leg $\bar{\Lambda}$, whose ends are $\bar{A}$ and the right angle $\bar{R}$; since $P$ is odd, exactly one further vertical side $\Omega$; the side $L_2$ of $T$; and at even $Q$ one horizontal copy of $L_1$, meeting $\Omega$ at a corner $\bar{R}'$. The images of $O$ and $A$ are single boundary points $\bar{O}$ and $\bar{A}$, every interior singular point is a pole with one prong, and every side-copy perpendicular to the leaves is a boundary fold (proof of \cite{Orph} Lemma 4.8). A leaf from a regular point of $\bar{\Lambda}$ is a beam half-orbit. It crosses non-fold sides as reflections, cannot cross a horizontal fold, and ends on a vertical fold exactly at a head-on collision (\cite{Orph} Lemma 3.1 and the proof of Lemma~4.9): on $\bar{\Lambda}$ that is the perpendicular return, and on $\Omega$ the orbit retraces to its launch height (\cite{Orph} Lemma 2.1), which is the orphan. By \cite{Orph} Proposition 3.4 the regular heights form finitely many branches and the leaves are compact. Suppose there is no orphan. Then every leaf from $\bar{\Lambda}$ returns to $\bar{\Lambda}$. Let $E$ be the closure of the union of these leaves, a finite union of closed bands, which meets $\Omega$ at most at its endpoints, since a band through an interior point of $\Omega$ would carry leaves ending there. Let $K$ be the component of $D_{\perp} \setminus E$ whose closure contains the interior of $\Omega$. $E$ is connected, since it contains $\bar{\Lambda}$ and every band meets $\bar{\Lambda}$, and every other component of $D_{\perp} \setminus E$ has its closure inside itself and $E$; so $D_{\perp} \setminus K$ is connected, and since a closed disc is unicoherent, the frontier of $K$ is connected. It contains $\bar{A}$ and $\bar{O}$, and it meets $\partial D_{\perp}$ only there: the interiors of $\bar{\Lambda}$ and of the horizontal side $L_2$, and the corner $\bar{R}$, have neighbourhoods in $E$ (the bands nearest $\bar{R}$ run along the leaf $L_2$ from $\bar{R}$ to $\bar{O}$), while the interior of $\Omega$ lies in $K$, and at even $Q$ so do the horizontal copy of $L_1$ and the corner $\bar{R}'$ (band leaves running along that copy would reach $\Omega$). The frontier is a finite graph of horizontal edges, so it contains a simple arc from $\bar{A}$ to $\bar{O}$ with interior in the interior of $D_{\perp}$. An interior vertex of that arc would be a pole, of degree $1$ in the graph, which is impossible on a simple arc. So the arc is one horizontal saddle connection from $\bar{O}$ to $\bar{A}$ interior to $D_{\perp}$. Its germ at $\bar{O}$ is a direction from $O$ into $T$ of even multiple $u_0\theta$, $0 < u_0 < P$, and read in $T$ it is a billiard orbit from $O$ that reaches $A$ with no head-on collision on the way. \end{proof} \emph{Where $P$ odd enters:} only through the wall $\Omega$ (\cite{Orph}'s $\bar{W}$). At even $P$ every leaf from $\bar{\Lambda}$ returns to $\bar{\Lambda}$ and nothing separates, as it must not: at $8/15$ an orbit from $O$ reaches $A$ head-on-free and there is no orphan (\S\ref{sec:6}). \subsection{Proof of Theorem~1}\label{sec:3.7} Part 1 is Proposition~\ref{prop:the-arrival-relation} together with Proposition~\ref{prop:3-6}. For part 2, a swapped connection in either class would give, by Proposition~\ref{prop:3-1}, a head-on-free $O$-launched connection of $P/Q$ to $O$, $A$ or $R$, or of $(Q - P)/Q$ to $O$ or $R$. The target $R$ is excluded by Proposition~\ref{prop:3-6} and the others by hypothesis. So $p = 0$ on both classes, both are completely periodic by \cite{Neck} Theorem 7.6, and Lemma~\ref{lem:2-1} gives Conjecture~2.2(e). Part 3 is Proposition~\ref{prop:3-7}. \qed \begin{remark}[orbits on the coset launch]\label{rem:orbits-on-the-coset-launch} Lemma~\ref{lem:the-window}'s argument also shows that the arrival equation of a single word holds along a family of triangles only for a head-on loop. That needs $\mathcal{A}_V(x) = \pm x^{2m}\mathcal{A}_V(x^{-1})$ for some $m \in \tfrac12\mathbb{Z}$ (a torsion coset can give an odd exponent $2m$), and the launch at which \eqref{eq:2.4} then holds for every $\alpha$ makes the line at angle $m\alpha$ a barrier, so every exponent lies on one side of $m$ and $\mathcal{A}_V$ is a monomial (impossible at half-integer $m$). An $O$ or $R$ arrival polynomial is divisible by $x + x^{-1}$, so it is never a monomial; for $A$ a monomial puts the target at distance $|OA|$ from $O$, along a broken path through $L_1$, which the triangle inequality forbids. With the theorem of Ihara, Serre and Tate on torsion points of curves in $\mathbb{G}_m^2$ \cite[p.~201]{Lan83}, in the effective form of Beukers and Smyth \cite{BS02}, it follows that for each $n$ only finitely many centres with $\min(P, Q - P) \geq 2$ carry a swapped perpendicular connection with at most $n$ reflections. We do not use this. \end{remark} \section{The Galois certificate}\label{sec:4} \begin{main2} Let $\min(P, Q - P) \geq 2$ and $\gcd(P + 2, Q) = \gcd(P - 2, Q) = 1$, that is, $P \not\equiv \pm2 \pmod{p}$ for every odd prime $p$ dividing $Q$. Then no head-on-free $O$-launched connection of $P/Q$ ends at $O$ or at $A$, for any integer launch $u_0$. Hence both perpendicular classes of $P/Q$ are completely periodic with $p = 0$, the triangle $(P, Q - P, Q)$ satisfies Boshernitzan's Conjecture~2.2(e), and if $P$ is odd the orphan exists. This holds for any number of odd primes dividing $Q$, of either parity of $Q$. \end{main2} The hypothesis is symmetric under $P \mapsto Q - P$, since $Q - P \pm 2 \equiv -(P \mp 2) \pmod{Q}$. Together with $\min(P, Q - P) \geq 2$ it forces $3 \leq P \leq Q - 3$, and it is empty when $3 | Q$, since every $P$ prime to $3$ is $\equiv \pm2 \pmod{3}$; so $T_0 = 8/15$ lies outside it, as it must (\S\ref{sec:6}). At $Q = 2^k$ it is vacuous. \emph{Idea.} The arrival relation is an identity with integer coefficients in $\mathbb{Q}(\zeta_{4Q})$, so every automorphism of that field preserves it. When $P \pm 2$ are units, two automorphisms move $x = e^{i\alpha}$ to $e^{i(\alpha \pm \pi/Q)}$ (to $-e^{i(\alpha \pm \pi/Q)}$ when $P$ is even). Subtracting the two conjugated relations turns the term at frame $d$ into $2|\cos d\alpha|\cdot\sin(d\pi/Q)$, which has one sign across the window, and Lemma~\ref{lem:the-arrival-arc-at} gives the $A$ lead the same sign. A non-empty sum of terms of one sign is not zero. \begin{proof} \textbf{The target $O$, $P$ odd.} Take $b$ parallel to the launch. Since $P \pm 2$ is odd and prime to $Q$, $g_{\pm} \coloneqq (P \pm 2)P^{-1}$ is a unit modulo $4Q$, and the automorphism $\tau_{\pm} : \zeta \mapsto \zeta^{g_{\pm}}$ of $\mathbb{Q}(\zeta)$, $\zeta = e^{i\pi/2Q}$, sends $x = \zeta^P$ to $e^{i\beta_{\pm}}$, $\beta_{\pm} \coloneqq \alpha \pm \pi/Q$. It sends $x + x^{-1}$ to $2\cos \beta_{\pm}$, which is not $0$, because $P \pm 2 \neq \pm Q$. Applying $\tau_{\pm}$ to Proposition~\ref{prop:the-arrival-relation} and dividing by $4i\cdot\cos \beta_{\pm}$ gives $\sum_d m(d)c(d)\cdot\sin(d\beta_{\pm}) = 0$. Subtract the two: \[ \sum_d m(d)\cdot c(d)\cdot(\sin d\beta_+ - \sin d\beta_-) = 2\sum_d m(d)\cdot|\cos d\alpha|\cdot\sin(d\pi/Q) = 0. \] Every $d$ lies in $\nu\cdot(0, Q)$, so every term has the sign $\nu$ or vanishes. The term of the first reflection, at $d = -b$, does not vanish: $m \geq 1$, $b$ is not a multiple of $Q$, and $|\cos b\alpha| = |\cos \varphi| > 0$. This is a contradiction. \textbf{The target $O$, $P$ even.} Then $Q$ is odd, and we take $b$ the even end of $W$, so every $d$ is even. Let $g_{\pm} \equiv (P/2 \pm 1)(P/2)^{-1} \pmod{Q}$, $g_{\pm} \equiv 1 \pmod{4}$, a unit modulo $4Q$. Then $\tau_{\pm}(i) = i$, $\tau_{\pm}(x) = -e^{i\beta_{\pm}}$, and $\tau_{\pm}(x^d) = e^{\mathrm{id}\beta_{\pm}}$ for even $d$. If $b$ is parallel the computation above applies verbatim. If it is perpendicular, the conjugates give $\Sigma m(d)s(d)\cdot\cos(d\beta_{\pm}) = 0$, and the difference is $-2\Sigma m(d)\cdot|\sin d\alpha|\cdot\sin(d\pi/Q) = 0$, whose launch term has $|\sin b\alpha| = |\cos \varphi| > 0$. \textbf{The target $A$, $P$ odd.} Divide each conjugated relation by $4i\cdot\cos \beta_{\pm}$ before subtracting. The frame terms are as before, and the lead contributes \begin{multline*} c^*\cdot(\sin \kappa\beta_+/2\cos \beta_+ - \sin \kappa\beta_-/2\cos \beta_-) \\ = c^*\cdot\frac{\cos((\kappa + 1)\alpha)\cdot\sin((\kappa - 1)\pi/Q) + \cos((\kappa - 1)\alpha)\cdot\sin((\kappa + 1)\pi/Q)}{2\cos \beta_+\cdot\cos \beta_-}. \end{multline*} By Lemma~\ref{lem:the-arrival-arc-at}, $c^*\cdot\cos((\kappa \pm 1)\alpha) > 0$, and $\kappa$ is neither $0$ nor $\pm Q$, since $\kappa\alpha \notin (\pi/2)\mathbb{Z}$. The lead exponent is an endpoint of $I_n \subset W$, so $\kappa \in \nu\cdot(0, Q)$ and $\kappa \pm 1 \in \nu\cdot[0, Q]$: both sines have the sign $\nu$ or vanish, and not both vanish. The denominator is $\cos^2\alpha - \sin^2(\pi/Q) > 0$, because $Q - P \geq 3$. So the lead has the sign $\nu$ too, and the sum is again a non-empty sum of terms of one sign. \textbf{The target $A$, $P$ even.} Reverse the connection and exchange the legs. It becomes a head-on-free $O$-launched connection of $(Q - P)/Q$, with $Q - P$ odd, ending at $A$, and the hypothesis holds at $Q - P$. \textbf{The conclusions.} The targets $O$ and $A$ are excluded at $P/Q$, and the target $O$ at $(Q - P)/Q$, by the same argument at $Q - P$. Theorem~1 (2) gives complete periodicity of both classes, $p = 0$ and Conjecture~2.2(e). If $P$ is odd, the case $u_0$ even of the target $A$ is the hypothesis of Theorem~1 (3). \end{proof} \emph{Why $P \pm 2$.} At odd $P$ the conjugates of $x$ are $e^{i(\alpha + j\pi/Q)}$ with $P + 2j$ a unit modulo $4Q$ (at even $P$, $\pm e^{i(\alpha + j\pi/Q)}$). An antisymmetric combination with weights $w_j$ turns the frame terms into $2\cos(d\alpha)\cdot\sum_j w_j \sin(jd\pi/Q)$, and the certificate needs the trigonometric sum positive on $(0, \pi)$. The pair $j = \pm1$ is the simplest choice that works, and it is the only one used. It is not a positivity statement about one element at all its embeddings: it is a difference of two specific conjugates, weighed against integer signs (Lemma~\ref{lem:the-sign-of-a-reflection}) that conjugation does not move. \begin{corollary}[the conditional theory of \cite{Neck} at these centres]\label{cor:the-conditional-theory-of-neck} At every centre satisfying the hypothesis of Theorem~2, every statement of \cite{Neck} whose only hypotheses are among complete periodicity, $p = 0$, (ZZ) and the hypothesis (OB) of \cite{Neck} \S 1.5 holds outright, in the range it is stated for. In particular $n(P/Q) = Q - 1$ at every even $P$, and the counting identity of \cite{Neck} holds with $p = 0$ on both classes. \end{corollary} \begin{proof} Theorem~2 supplies complete periodicity and $p = 0$ on both classes, and the orphan at the odd one of $P$, $Q - P$, which is (OB) (\S\ref{sec:1.7}); (ZZ) follows from $p = 0$. \cite{Neck} carries each of its hypotheses on the face of every statement that uses it and lists the statements by hypothesis in the table of its \S\ref{sec:1.5}; the statements meant are those of its rows \emph{(OB) alone}, \emph{CP}, \emph{CP and (OB)}, \emph{CP and (PP)} (with \cite{Neck} Theorem 6.7) and \emph{$p = 0$ alone}. \end{proof} \begin{remark}[how much this covers]\label{rem:how-much-this-covers} Among the right triangles $(P, Q - P, Q)$ with $Q \leq X$, the proportion satisfying the hypothesis of Theorem~2 tends to $(\pi^2/8)\cdot\prod_{p \geq 3}(1 - 3/p^2) \approx 0.619$. For each $Q$ the number of centres $P/Q$ with $\gcd(P \pm 2, Q) = 1$ is $\varphi(Q)\cdot\prod_{p | Q, p odd}(1 - 3/p)/(1 - 1/p)$ (half of it for triangles), and the function $\varphi(Q)/Q\cdot\prod_{p | Q, p odd}(1 - 3/p)/(1 - 1/p)$ has an absolutely convergent mean value. At $Q \leq 5000$ the share is $62 \%$. \end{remark} \section{One odd prime}\label{sec:5} \begin{main3} Let $Q \geq 3$ have at most one odd prime factor, and let $\min(P, Q - P) \geq 2$. Then both perpendicular classes of $P/Q$ are completely periodic with $p = 0$, the triangle $(P, Q - P, Q)$ satisfies Boshernitzan's Conjecture~2.2(e), and if $P$ is odd the orphan exists. \end{main3} At $Q = 2^k$ the hypothesis of Theorem~2 is automatically satisfied, and at $Q = 2^a p^b$ it says $P \not\equiv \pm2 \pmod{p}$; so Theorem~3 is new only at the residues $P \equiv \pm2 \pmod{p}$, where one of the two conjugations of \S\ref{sec:4} is not an automorphism. There we use the structure that a single odd prime gives the arrival relation. It splits into chains of $p$ terms (Lemma~\ref{lem:the-chain-split}), and at the residues $\pm2$ the frames of a chain advance by the smallest possible step, so the sign pattern along a chain changes at most once and is fixed by one phase (Lemma~\ref{lem:one-sign-change}). \S\ref{sec:5.3} excludes the target $O$, and \S\ref{sec:5.4} excludes the target $A$ on the middle of the lead's range and at its top. What remains --- the two edges of the lead's range, the target $O$ at even $P$, the prime $3$, and finitely many small $Q$ --- is case work, collected in Appendix A. At $Q = 2p$ and $Q = 4p$ the arrival theorems of \S\ref{sec:5.4} and Appendix A do not cover every lead, and complete periodicity at the $\pm2$ centres comes instead from the code criterion of \S\ref{sec:7}: the two methods meet there. \emph{Conventions for \S\ref{sec:5} and Appendix A.} $Q = 2^a p^b$ with $p$ an odd prime and $b \geq 1$; $N \coloneqq Q/p$, $h \coloneqq (p - 1)/2$; $P \equiv 2\varepsilon \pmod{p}$ with $\varepsilon = \pm1$, and $P = 2\varepsilon + \mu p$. Except in Appendix A.1 and part of A.5, $P$ is odd. Then $\mu$ is odd and positive, $x = e^{i\alpha}$ is a primitive $4Q$-th root of unity, and the window has an end $b$ parallel to the launch, which we use throughout (Proposition~\ref{prop:the-arrival-relation}). Replacing every $d$ by $-d$ changes the sign of each $S_d$ and of nothing else, so we measure frames by $d \coloneqq \nu(t - b)$, i.e. $t = b + \nu d$: every frame lies in $(0, Q)$, and so does the lead offset $\kappa$ of an arrival at $A$, read the same way. The first reflection, at $t = 0$, has the frame $d_l \coloneqq -\nu b = |b|$. Since $bP \equiv u_0 \pmod{2Q}$ with $P$ odd, $b \equiv u_0 \pmod{2}$, and frames $t$ are even; so \textbf{every frame has the parity of $u_0$, and $\kappa$ the other parity.} As in \S\ref{sec:3}, $c(d) = \operatorname{sgn} \cos(d\alpha)$, and $c(d) \neq 0$ for $|d| < Q$, since a zero needs $dP \equiv Q \pmod{2Q}$, that is $d \equiv Q \pmod{2Q}$. Put $D \coloneqq \pi/\alpha = 2Q/P > 2$. Then $\cos(y\alpha)$ vanishes exactly at $y \in (\mathbb{Z} + \tfrac12)D$ and $\sin(y\alpha)$ exactly at $y \in D\mathbb{Z}$, and no integer of $(0, Q)$ lies in $D\mathbb{Z}$, since $nD = 2Qn/P$ is not an integer for $0 < n < P/2$. \subsection{Chains}\label{sec:5.1} A \textbf{chain} is a residue class modulo $2N$ listed in $(-Q, Q]$: $d_j = d_0 + 2Nj$, $0 \leq j < p$. \begin{lemma}[the chain split]\label{lem:the-chain-split} If $f$ is a rational-valued function on the integers of $(-Q, Q]$ and $\sum_{-Q < d \leq Q} f(d)x^d = 0$, then $(-1)^j f(d_j)$ is constant along every chain. \end{lemma} \begin{proof} Since $x^{2Q} = -1$, $x^Q\cdot\Sigma f(d)x^d = H(x)$ for the polynomial $H(X) = \sum_{0 \leq e < 2Q} h_e X^e$ with $h_e = f(e - Q)$ for $0 < e < 2Q$ and $h_0 = -f(Q)$. The minimal polynomial of $x$ is $\Phi_{4Q}(X) = \Phi_{2p}(X^{2N}) = \Phi_p(-X^{2N})$, because $2p$ is the radical of $4Q$. Write $H(X) = \sum_{0 \leq r < 2N} X^r H_r(X^{2N})$ with each $H_r$ of degree at most $p - 1$. Splitting the quotient $H(X)/\Phi_p(-X^{2N})$ in the same way shows that $\Phi_p(-Y)$ divides every $H_r(Y)$, and comparing degrees, $H_r(Y) = c_r \sum_{0 \leq i < p}(-Y)^i$. For $r \neq 0$ the exponents $r + 2Ni$ belong to the chain $d_j = r - Q + 2Nj$, which therefore carries $f(d_j) = (-1)^j c_r$. The exponents $2Ni$ belong to the chain $d_j = 2N(j + 1) - Q$, which ends at $d_{p-1} = Q$; it carries $f(d_j) = (-1)^{j+1}c_0$ for $j \leq p - 2$, and $f(Q) = -h_0 = -c_0 = (-1)^{p}c_0$. \end{proof} We apply this to relations $\sum_{0 < d \leq Q} n(d)S_d(x) = 0$, through $f(d) \coloneqq n(d)$ and $f(-d) \coloneqq -n(d)$ for $0 < d < Q$, $f(0) \coloneqq 0$, and $f(Q) \coloneqq 2n(Q)$ (since $S_Q = 2x^Q$). So $(-1)^j \operatorname{sgn}(d_j)\cdot n(|d_j|)$ is constant along each chain, the member $Q$ counting twice. The constant is $0$ on the chain through $0$, and on the chain through $Q$ when $n(Q) = 0$: these are the chains of the multiples of $N$ (an even multiple, resp. an odd one, as $Q \equiv N \pmod{2N}$). Every other chain is the reflection $d \mapsto -d$ of another, so it is enough to read, for each $0 < e < N$, the \textbf{chain of $e$}, $d_i \coloneqq e + 2Ni$ with $|i| \leq h$. Its members with $i < 0$ are its negative ones, and the numbers $|d_i|$ form the \textbf{class} \[ K(e) \coloneqq \{0 < d < Q : d \equiv \pm e \pmod{2N}\}, \] of $p$ elements. Every $d \in (0, Q)$ that $N$ does not divide lies in exactly one class, $e$ being its distance to $2N\mathbb{Z}$. \emph{The target $O$.} Dividing Proposition~\ref{prop:the-arrival-relation} by $x + x^{-1}$, an $O$-launched connection gives $\sum_d m(d)c(d)S_d(x) = 0$, which is the relation above with $n(d) = m(d)c(d)$ and $n(Q) = 0$. On the chain of $e$ it says $\chi_i\cdot m(|d_i|) = C_e$ for a constant $C_e$, where \[ \chi_i \coloneqq \operatorname{sgn}(d_i)\cdot(-1)^i\cdot c(d_i) \] is the \textbf{chain sign}. Hence \textbf{$m$ is constant on each class, and it vanishes on $K(e)$ unless $\chi$ is constant on the chain of $e$; and $m$ vanishes at every frame divisible by $N$.} At $Q = p$ every frame is divisible by $N = 1$, so $m \equiv 0$, against the first reflection, at the frame $d_l$: at odd prime $Q$ and odd $P$ no head-on-free $O$-launched connection ends at $O$. \subsection{The slow rotation}\label{sec:5.2} \begin{lemma}[one sign change]\label{lem:one-sign-change} Let $P$ be odd, $P \equiv 2\varepsilon \pmod{p}$, and $0 < e < N$. Put $\omega(i) \coloneqq 2i$ for $i \geq 0$ and $\omega(i) \coloneqq 2i + p$ for $i < 0$, a bijection of $\{-h, \ldots, h\}$ onto $\{0, \ldots, p - 1\}$. Then \[ \chi_i = \operatorname{sgn} \cos(e\alpha + \varepsilon\pi\cdot\omega(i)/p). \] The $p$ arguments are consecutive points of spacing $\pi/p$, spanning less than $\pi$, so in the order of $\omega$ the chain sign changes at most once. In particular $\chi$ is constant on the chain of $e$ if and only if $e\alpha \bmod \pi$ lies in $(\pi/2, \pi/2 + \pi/p)$ when $\varepsilon = +1$, and in $(\pi/2 - \pi/p, \pi/2)$ when $\varepsilon = -1$. \end{lemma} \begin{proof} $2N\alpha = P\pi/p = \mu\pi + 2\varepsilon\pi/p$ with $\mu$ odd, so $(-1)^i \cos(d_i\alpha) = \cos(e\alpha + 2\varepsilon\pi i/p)$. For $i < 0$ the factor $\operatorname{sgn}(d_i) = -1$ adds $\pi$, and $2\varepsilon\pi i/p + \pi \equiv \varepsilon\pi(2i + p)/p \pmod{2\pi}$ for either sign of $\varepsilon$. The arguments $e\alpha + \varepsilon\pi\omega/p$, $0 \leq \omega < p$, fill an arc of length $(p - 1)\pi/p$, and $\chi$ is constant exactly when this arc avoids $\pi/2 + \pi\mathbb{Z}$. \end{proof} So the whole sign pattern of a chain is fixed by where the cosine's zero falls in one arc of $p$ cells: one real phase. \begin{remark}[why the residues $\pm2$]\label{rem:why-the-residues} For any odd $P$ the same computation gives $(-1)^i \cos(d_i\alpha) = \cos(e\alpha + 2\pi ri/p)$ with $2r \equiv P \pmod{p}$: the arguments are the vertices of a regular $p$-gon met with step $r$, and the chain sign is a half-plane section of that $p$-gon read in the order of the step. Only at $r \equiv \pm1$, that is $P \equiv \pm2 \pmod{p}$, is it read in cyclic order; at $|r| \geq 2$ it changes sign often, and for $p \geq 5$ it is never constant on the chain of the first reflection, which excludes the target $O$ by \S\ref{sec:5.1} alone. (By Theorem~2 we do not need that.) The conjugations of \S\ref{sec:4} are $x \mapsto x^{g_{\pm}}$ with $g_{\pm} \equiv (P \pm 2)/P \equiv 1 \pm r^{-1} \pmod{p}$, units exactly when $r \not\equiv \mp1$. So the residues where the conjugate certificate is unavailable are exactly those where every chain rotates slowly, and that slowness is what \S\S\ref{sec:5.3}--\ref{sec:5.4} use. \end{remark} \subsection{The target $O$}\label{sec:5.3} Call a frame $d \in (0, Q)$ \textbf{good} if $N \nmid d$ and $\chi$ is constant on the chain of its class. By \S\ref{sec:5.1} every reflection in $L_1$ of an $O$-launched connection with target $O$ is at a good frame, and by Lemma~\ref{lem:one-sign-change} goodness is a condition on $e\alpha \bmod \pi$ alone, $e$ being the distance from $d$ to $2N\mathbb{Z}$. \begin{proposition}\label{prop:5-4} Let $p \geq 5$, and let $P$ be odd with $P \equiv \pm2 \pmod{p}$. No head-on-free $O$-launched connection of $P/Q$ ends at $O$. \end{proposition} The proof follows the reflections in $L_1$ of the connection: Lemma~\ref{lem:the-step-rule} bounds how far one can be from the next, and Lemma~\ref{lem:straddles} shows that such steps between good frames cannot get across the multiples of $N$ that separate the first reflection from its class-mates. \begin{lemma}[the step rule]\label{lem:the-step-rule} Let $d$ and $d'$ be the frames of two consecutive reflections in $L_1$ of a head-on-free orbit from $O$. Then $c(d') = -c(d)$, and $\sin(y\alpha)$ has constant sign on the integers strictly between $d$ and $d'$. Consequently, if $d < d'$, the interval $(d, d')$ contains exactly one zero $y_0$ of $\cos(y\alpha)$, with $y_0 - D/2 \leq d + 1$ and $y_0 + D/2 \geq d' - 1$; in particular $d' - d \leq D + 2$. \end{lemma} \begin{proof} Let the two reflections be at steps $i < i'$, so that $t_{i-1} = b + \nu d$, $t_{i'-1} = b + \nu d'$, and $\lambda_{i'-1} = \lambda_{i-1} + 1$, since every letter strictly between is $H$ or $L_2$. Lemma~\ref{lem:the-sign-of-a-reflection} gives $\operatorname{sgn} \cos(t_{i'-1}\alpha - \varphi) = -\operatorname{sgn} \cos(t_{i-1}\alpha - \varphi)$. Since $b\alpha - \varphi \in \pi\mathbb{Z}$, $\cos(s\alpha - \varphi) = \varepsilon_0 \cos((s - b)\alpha)$ and $\sin(s\alpha - \varphi) = \varepsilon_0 \sin((s - b)\alpha)$ for every $s$, with $\varepsilon_0 = \pm1$; so $c(d') = -c(d)$. Between the two reflections the orbit is reflected only in $L_2$ and $H$, which pass through $O$. So it crosses triangles $T_i, \ldots, T_{i'-1}$ that share the vertex $O_i$ and the value $\lambda = \lambda_i$, and by \S\ref{sec:2.3} their sides through $O_i$ are segments from $O_i$ in the directions $s\alpha + \lambda\pi$, $s$ being the index. Consecutive triangles share the side crossed, and a line meets each segment from $O_i$ at most once, so the indices crossed are monotone; they include every integer strictly between $t_{i-1} \in I_i$ and $t_{i'-1} \in I_{i'-1}$. The line of the orbit misses $O_i$, so $\Im(e^{-i\varphi}(y - O_i))$ is non-zero and of one sign for all $y$ on it, and at the crossing of the side of index $s$ it has the sign of $\sin(s\alpha + \lambda\pi - \varphi)$. Hence $\sin(s\alpha - \varphi)$, and with it $\sin((s - b)\alpha)$, has constant sign for $s$ strictly between $t_{i-1}$ and $t_{i'-1}$. For the consequence, $c(d') = -c(d)$ puts an odd number of zeros of $\cos(y\alpha)$ in $(d, d')$. Between two of them lies a zero of $\sin(y\alpha)$ at distance at least $D/2 > 1$ from both, hence in $(d + 1, d' - 1)$; not being an integer, it would separate two integers strictly between $d$ and $d'$. So there is exactly one, $y_0$. The zeros $y_0 \pm D/2$ of $\sin(y\alpha)$ are not in $(d + 1, d' - 1)$ for the same reason, which gives the two inequalities. \end{proof} \begin{lemma}[straddles]\label{lem:straddles} Let $p \geq 5$, $P$ odd, $P \equiv 2\varepsilon \pmod{p}$, and $Q \notin \{p, 10\}$. A good step is a pair of good frames $d < d'$ of the same parity satisfying the conclusion of Lemma~\ref{lem:the-step-rule}, and it straddles $y$ if $d < y < d'$. Let $M \in (0, Q)$ be an odd multiple and $L \in (0, Q)$ an even multiple of $N$, with $|M - L| = N$. \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item If $\varepsilon = -1$, no good step straddles $M$. \item If $\varepsilon = +1$ and a good step straddles $M$, then $\mu \geq 3$, $N < P < 2N$, and $f < \tfrac12$, where $D/2 = n + f$ with $n \in \mathbb{Z}$ and $0 \leq f < 1$. \item If $\varepsilon = +1$, it does not happen that one good step straddles $M$ and another straddles $L$. \end{enumerate} \end{lemma} \begin{proof} Write $M = (2j + 1)N$ and $L = 2j'N$, with $0 < 2j + 1 < p$ and $0 < 2j' < p$. Since $N/D = NP/2Q = \varepsilon/p + \mu/2$ with $\mu$ odd, $M/D \equiv \tfrac12 + \theta_M$ and $L/D \equiv \varphi_L \pmod{1}$, where $\theta_M :\equiv \varepsilon(2j + 1)/p$ and $\varphi_L :\equiv 2\varepsilon j'/p$ both lie in $(1/p)\mathbb{Z} \setminus \mathbb{Z}$. So the zeros of $\cos(y\alpha)$ are the points $M + \gamma D$ with $\gamma \in \mathbb{Z} - \theta_M$, and also the points $L + \gamma D$ with $\gamma \in \mathbb{Z} + \tfrac12 - \varphi_L$; in particular no zero lies within $D/p$ of $M$. \emph{Good distances.} Since $N\alpha \equiv \pi/2 + \varepsilon\pi/p \pmod{\pi}$, a frame at distance $\delta < N$ from $M$ is at distance $e = N - \delta$ from $2N\mathbb{Z}$, and by Lemma~\ref{lem:one-sign-change} it is good iff $\delta\alpha \bmod \pi \in (0, \pi/p)$ ($\varepsilon = +1$), resp. $(\pi - \pi/p, \pi)$ ($\varepsilon = -1$); that is, iff $\delta \in \bigcup_{k \geq 0}(kD, kD + D/p)$, resp. $\delta \in \bigcup_{k \geq 1}(kD - D/p, kD)$. A frame at distance $\delta < N$ from $L$ has $e = \delta$, and it is good iff $\delta \in \bigcup_{k \geq 0}((k + \tfrac12)D, (k + \tfrac12)D + D/p)$, resp. $\delta \in \bigcup_{k \geq 0}((k + \tfrac12)D - D/p, (k + \tfrac12)D)$. Let a good step $d < d'$ straddle $M$, and put $\delta_1 \coloneqq M - d$, $\delta_2 \coloneqq d' - M$. \emph{(1)} Here $N/D = \mu/2 - 1/p \geq \tfrac12 - 1/p$. A good frame within $N$ of $M$ is at distance more than $D - D/p$ from it. A good frame beyond a lattice point adjacent to $M$ is at distance more than $N + (\tfrac12 - 1/p)D$ from $M$: if it is within $N$ of that lattice point it is more than $D/2 - D/p$ beyond it, and otherwise more than $N \geq (\tfrac12 - 1/p)D$ beyond it. \begin{itemize} \tightlist \item \emph{Both ends within $N$ of $M$.} If one end is at distance more than $2D - D/p$, then $\delta_1 + \delta_2 > 3D - 2D/p > D + 2$, against Lemma~\ref{lem:the-step-rule}. Otherwise $\delta_1, \delta_2 \in (D - D/p, D)$. The zero of $\cos(y\alpha)$ between them is $M + \gamma D$ with $\gamma \in (1/p)\mathbb{Z} \setminus \mathbb{Z}$, and Lemma~\ref{lem:the-step-rule} gives $\delta_1 \leq D/2 + 1 - \gamma D$ and $\delta_2 \leq D/2 + 1 + \gamma D$. With $\delta_1, \delta_2 > D - D/p$ these give $|\gamma| < 1/D - \tfrac12 + 1/p < 1/p$, a contradiction. \item \emph{One end beyond a lattice point.} Then $\delta_1 + \delta_2 > N + (3/2 - 2/p)D = (\mu/2 + 3/2 - 3/p)D$. At $\mu \geq 3$ this exceeds $(3 - 3/p)D > D + 2$. At $\mu = 1$ we have $P = p - 2$ and $D = 2Np/(p - 2)$, and $(2 - 3/p)D > D + 2$ reads $N(p - 3) > p - 2$, which holds for $N \geq 2$. \item \emph{Both ends beyond.} Then $\delta_1 + \delta_2 > 2N + (1 - 2/p)D$, and $\delta_1 + \delta_2 \leq D + 2$ needs $N < 1 + D/p$. At $\mu \geq 3$, $N \geq (3/2 - 1/p)D > 1 + D/p$. At $\mu = 1$ it reads $N(p - 4) < p - 2$, which with $N \geq 2$ leaves only $p = 5$, $N = 2$, that is $Q = 10$. \end{itemize} \emph{(2)} Here $N/D = \mu/2 + 1/p \geq \tfrac12 + 1/p$. A good frame within $N$ of $M$ is at distance in $(0, D/p)$ or more than $D$, and one beyond an adjacent lattice point is at distance more than $N + D/2 \geq D + D/p$; so the good distances from $M$ lie in $(0, D/p) \cup (D, \infty)$. Two ends at distance more than $D$ give $\delta_1 + \delta_2 > 2D > D + 2$. Two ends within $D/p$ of $M$ leave no zero of $\cos(y\alpha)$ between them. So one end is within $D/p$ of $M$ and the other is more than $D$ from it. Say the near end is $d$ (the other case is the mirror image, with $\gamma$ replaced by $-\gamma$ below). Then $1 \leq \delta_1 < D/p$, so $D > p$, that is $P < 2N$; and $D < \delta_2 \leq D + 2 - \delta_1$. The zero between them is $M + \gamma D$ with $\gamma \in (1/p)\mathbb{Z}$, $\gamma > -1/p$, hence $\gamma \geq 1/p$, and Lemma~\ref{lem:the-step-rule} gives $\gamma D \leq D/2 + 1 - \delta_1 \leq D/2$ and $\gamma D \geq \delta_2 - 1 - D/2 > D/2 - 1$. The largest element of $(1/p)\mathbb{Z}$ not exceeding $\tfrac12$ is $\tfrac12 - 1/(2p)$; it exceeds $\tfrac12 - 1/D$ only if $D < 2p$, that is $P > N$, and then $\gamma = \tfrac12 - 1/(2p)$, so $\theta_M \equiv \tfrac12 + 1/(2p)$ (in the mirror case $\theta_M \equiv \tfrac12 - 1/(2p)$). Now $D/p < 2$ forces $\delta_1 = 1$, and $\delta_2 \leq \gamma D + D/2 + 1 = D + 1 - N/P$, as $D/2p = N/P$. Since frames have one parity, $\delta_2 = (d' - d) - 1$ is odd: an odd integer in $(D, D + 1 - N/P]$, an interval of length $1 - N/P < \tfrac12$. With $D = 2n + 2f$ the only candidate is $2n + 1$, which exceeds $D$ only if $f < \tfrac12$. Finally, $\mu = 1$ is impossible: then $N/D = \tfrac12 + 1/p < 1$, so an end at distance more than $D$ from $M$ is beyond the lattice point, at distance more than $D + D/p > D + 1$. \emph{(3)} Suppose good steps straddle $M$ and $L$. By (2), $\mu \geq 3$ and $N < P < 2N$, so $N \geq (3/2 + 1/p)D$ and $p < D < 2p$. A good frame within $N$ of $L$ is at distance more than $D/2$ from it, and more than $3D/2$ unless it lies in $(D/2, D/2 + D/p)$; a frame beyond the odd multiple $L \pm N$ of $N$ is at distance more than $N > 3D/2$. So, by $d' - d \leq D + 2$, both ends of the step straddling $L$ lie at distances $\delta_1', \delta_2' \in (D/2, D/2 + D/p)$ from $L$. Its zero is $L + \gamma D$, and Lemma~\ref{lem:the-step-rule} gives $\gamma D \leq D/2 + 1 - \delta_1' < 1$ and $\gamma D \geq \delta_2' - 1 - D/2 > -1$, so $|\gamma| < 1/D < 1/p$. As $\gamma \in \tfrac12 + (1/p)\mathbb{Z}$, $\gamma = \pm1/(2p)$, so $\varphi_L \equiv \tfrac12 \mp 1/(2p)$. On the other hand $(M \pm N)/D \equiv \tfrac12 + \theta_M \pm (1/p + \mu/2)$, so $\varphi_{M\pm N} \equiv \theta_M \pm 1/p$, as $\mu$ is odd. If $\theta_M \equiv \tfrac12 + 1/(2p)$, then $\varphi_{M+N} \equiv \tfrac12 + 3/(2p)$ is excluded, and at $L = M - N$, $\varphi_L \equiv \tfrac12 - 1/(2p)$ gives $\gamma = 1/(2p)$; the first inequality becomes $\delta_1' \leq D/2 + 1 - N/P$, so $\delta_1'$ is an integer in $(n + f, n + f + 1 - N/P]$, which needs $f \geq N/P > \tfrac12$, against (2). If $\theta_M \equiv \tfrac12 - 1/(2p)$, then $\varphi_{M-N} \equiv \tfrac12 - 3/(2p)$ is excluded, and at $L = M + N$, $\gamma = -1/(2p)$ and the second inequality gives the same contradiction for $\delta_2'$. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:5-4}] At $Q = p$ there is nothing to prove (\S\ref{sec:5.1}). At $Q = 10$ the two centres are $3/10$ ($\varepsilon = -1$) and $7/10$ ($\varepsilon = +1$); the only class is $K(1)$, and $\alpha = 3\pi/20$, resp. $7\pi/20$, lies outside $(3\pi/10, \pi/2)$, resp. $(\pi/2, 7\pi/10)$, so no frame is good and $m \equiv 0$, which is impossible. Otherwise Lemma~\ref{lem:straddles} applies. Every reflection in $L_1$ is at a good frame, and consecutive ones form good steps by Lemma~\ref{lem:the-step-rule}. The first reflection is at $d_l$, and $m$ is constant on its class, so there is also a reflection at $d^* \coloneqq d_l + 2N$ or $d_l - 2N$, one that lies in $(0, Q)$ (one does, as $Q \geq 5N$). The reflections visit $d_l$ and $d^*$, so every point strictly between them that is not itself a frame of a reflection is straddled by a good step. The open interval between $d_l$ and $d^*$ has length $2N$, so it contains an odd multiple $M$ and an even multiple $L$ of $N$ with $|M - L| = N$; neither is the frame of a reflection, since $N$ divides it. So good steps straddle both, which Lemma~\ref{lem:straddles} excludes. \end{proof} \subsection{The target $A$}\label{sec:5.4} In this section $P$ is odd: the target $A$ at an even $P$ becomes the target $A$ at the odd $Q - P$ on reversing the connection and exchanging the legs, as in the proof of Theorem~2. At an arrival at $A$ the lead offset is $\kappa = d_f + \varepsilon'$, with $d_f \coloneqq \nu(t_n - b)$ the frame of the last triangle and $\varepsilon' = \pm1$; in the coordinates of \S\ref{sec:5}, Lemma~\ref{lem:the-arrival-arc-at} and its proof give $\kappa\alpha \bmod \pi \in -\varepsilon'\cdot(0, \pi/2 - \alpha)$ and $c(\kappa - 1) = c(\kappa + 1) = c^*$, and so $0 < \kappa < Q - 1$ ($\kappa + 1 \neq Q$ because $c(Q) = 0$). \begin{lemma}[the $p$-adic case]\label{lem:the-adic-case} Let $Q = p^b$ be odd and $P$ odd. No orbit from $O$ in a direction $u_0\theta$ with $u_0$ even, $0 < u_0 < P$, reaches $A$ without meeting a vertex on the way, whether or not it meets a side head-on. \end{lemma} \begin{proof} The relation \eqref{eq:2.4} needs no hypothesis on head-ons. At the parallel end, with $\Im(\Sigma a_e x^e) = (2i)^{-1}\Sigma a_e S_e(x)$ for real $a_e$, it reads $(x + x^{-1})\cdot\Sigma \pm S_{t-b}(x) \pm S_{\kappa}(x) = 0$, the sum over the reflections in $L_1$. Here $x + x^{-1} = x^{-1}(1 - \zeta)$ with $\zeta \coloneqq -x^2$ a primitive $Q$-th root of unity, so $x + x^{-1}$ lies in every prime of $\mathbb{Z}[\zeta_{4Q}]$ above $p$. Since $u_0$ is even, $\kappa$ is odd, and $x^{2\kappa}$ has order $2m$ with $m \coloneqq Q/\gcd(Q, \kappa)$ odd. If $m > 1$, then $2m$ is not a prime power, $1 - x^{2\kappa}$ is a unit, and so is $S_{\kappa} = -x^{-\kappa}(1 - x^{2\kappa})$; if $m = 1$, then $S_{\kappa} = -2x^{-\kappa}$. Either way $S_{\kappa}$ lies in no prime above $p$. \end{proof} \emph{The lead on the frames.} Put $\tau(d) \coloneqq (-1)^{(\kappa - 1 - d)/2}$ if $\kappa$ is even and $\tau(d) \coloneqq (-1)^{(d - \kappa - 1)/2}$ if $\kappa$ is odd, for every integer $d \not\equiv \kappa \pmod{2}$. Call an integer $d \in (0, Q)$ of the parity of the frames (a reflection there or not) a \textbf{carrier} if $d < \kappa$ ($\kappa$ even) or $d > \kappa$ ($\kappa$ odd). Since $(x + x^{-1})S_d = S_{d+1} + S_{d-1}$, the sums below telescope, with $S_0 = 0$, resp. with $S_{2Q - d} = S_d$ (as $x^{2Q} = -1$): \begin{gather*} S_{\kappa} = (x + x^{-1})\cdot\sum_{0 < d < \kappa} \tau(d)S_d \quad (\kappa\text{ even}); \\ S_{\kappa} = (x + x^{-1})\cdot\Bigl(\sum_{\kappa < d < Q} \tau(d)S_d + \tfrac12\tau(Q)S_Q\Bigr) \quad (\kappa\text{ odd, } Q\text{ even}), \end{gather*} the sums over $d \not\equiv \kappa \pmod{2}$. For the second, $\sum_{0 \leq i \leq Q - \kappa - 1}(-1)^i(x + x^{-1})S_{\kappa+1+2i} = S_{\kappa} + S_{2Q-\kappa} = 2S_{\kappa}$, the terms at $d$ and $2Q - d$ coincide, and $d = Q$ occurs once. \begin{lemma}[the lead on the frames]\label{lem:the-lead-on-the-frames} Let a head-on-free $O$-launched connection of $P/Q$ end at $A$, with lead offset $\kappa$; if $\kappa$ is odd, let $Q$ be even. On the chain of $e \in (0, N)$ with $e \equiv u_0 \pmod{2}$ put \[ \chi_i \coloneqq \operatorname{sgn}(d_i)(-1)^i c(d_i), \quad \rho_i \coloneqq \operatorname{sgn}(d_i)(-1)^i c^* \tau(|d_i|), \] and $g(d) \coloneqq c^*c(d)\tau(d)$, so that $g(|d_i|) = \chi_i\rho_i$. Then there is an integer $w$ with $m(|d_i|) = \chi_iw - g(|d_i|)$ when $|d_i|$ is a carrier and $m(|d_i|) = \chi_iw$ otherwise. At the frames divisible by $2N$, and, if $\kappa$ is even, at the odd multiples of $N$, $m = -g$ at carriers and $m = 0$ elsewhere. Along a chain whose members have the parity of the frames, \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item if $Q$ is odd (and $\kappa$ even), $\rho$ is constant; \item if $Q$ and $\kappa$ are even, $\rho$ alternates: $\rho_{i+1} = -\rho_i$; \item if $Q$ is even and $\kappa$ odd, $\rho$ alternates except at the step from $i = -1$ to $i = 0$, where it repeats. \end{enumerate} \end{lemma} \begin{proof} By the telescoped lead, Proposition~\ref{prop:the-arrival-relation} divided by $x + x^{-1}$ reads $\sum_d n'(d)S_d(x) = 0$, with $n'(d) \coloneqq c(d)\cdot(m(d) + [d\text{ a carrier}]\cdot g(d))$, plus the term $\tfrac12c^*\tau(Q)S_Q(x)$ when $\kappa$ is odd. The chain of $e$ avoids $0$ and $Q$, so Lemma~\ref{lem:the-chain-split} gives $\chi_i\cdot(m(|d_i|) + [|d_i|\text{ a carrier}]\cdot g(|d_i|)) = w$ for a constant $w$; and $\chi_i\rho_i = c(d_i)c^*\tau(|d_i|) = g(|d_i|)$. On the chains through $0$, and through $Q$ when $\kappa$ is even (then $Q$ is no carrier and carries no term), the constant is $0$, so $m + [\text{carrier}]\cdot g = 0$ there. For the pattern of $\rho$, compare consecutive members. On one side of $0$, $|d_{i+1}| = |d_i| \pm 2N$ multiplies $\tau$ by $(-1)^N$ and $(-1)^i$ changes sign. Across $0$, $|d_0| = e$ and $|d_{-1}| = 2N - e$, so $\tau$ is multiplied by $(-1)^{e - N}$, and $\operatorname{sgn}(d_i)$ and $(-1)^i$ both change sign. In case 1, $N$ and $e$ are odd, so $\rho$ never changes; in case 2, $N$ is even and $e$ odd, so it changes at every step; in case 3, $N$ and $e$ are even, so it changes at every step but the one across $0$. \end{proof} \begin{corollary}[odd $Q$: the signs at the corner $A$]\label{cor:odd-the-signs-at-the} Let $Q = p^b$ be odd and $P$, $u_0$ odd. Let $\beta \coloneqq \pi/2 - \alpha$ be the angle of $T$ at $A$, $h(a) \coloneqq \operatorname{sgn} \sin(a\beta)$ for odd $a$, and $h_0 \coloneqq h(\kappa - 1)$. A head-on-free $O$-launched connection to $A$ with lead offset $\kappa$ does not exist if some class $K(e)$ contains a frame $a < \kappa$ with $h(a) = h_0$ and a frame $a' > \kappa$ with $h(a') = -h_0$, or if some odd multiple $a < \kappa$ of $N$ has $h(a) = h_0$. In particular there is none at $Q = p$. \end{corollary} \begin{proof} Frames are odd and $\kappa$ is even. For odd $a$, $(-1)^{(a-1)/2}\cos(a\alpha) = \sin(a\pi/2 - a\alpha) = \sin(a\beta)$, so $c(a) = (-1)^{(a-1)/2}h(a)$, and $g(a) = c^*c(a)\tau(a) = c^*(-1)^{\kappa/2 - 1}h(a)$ for every odd $a$; since $g(\kappa - 1) = c^*c(\kappa - 1) = 1$, $g = h_0h$. On the chain of an odd $e$, $\rho_i = \chi_i\cdot g(|d_i|)$ is a constant $\rho = \pm1$ (Lemma~\ref{lem:the-lead-on-the-frames} (1)), so $\chi_i = \rho\cdot g(|d_i|)$. With $w' \coloneqq \rho w$, Lemma~\ref{lem:the-lead-on-the-frames} reads $m = g\cdot(w' - 1)$ at carriers and $m = g\cdot w'$ elsewhere. A carrier with $g = +1$ forces $w' \geq 1$, and a non-carrier with $g = -1$ forces $w' \leq 0$. At the odd multiples of $N$, $m = -g$ at carriers. At $Q = p$ every odd number is an odd multiple of $N = 1$, and $\kappa - 1$ is a carrier with $g = +1$. \end{proof} So at the target $A$ the role that the angle $\alpha$ at $O$ plays for the target $O$ passes to the angle $\beta$ at $A$. At odd $Q$ it is convenient to read a class through a residue class modulo $N$. For $0 < e' < N$ let $R_{e'} \coloneqq \{e' + iN : 0 \leq i < p\}$; an odd $x \in R_{e'}$ stands for the frame $x$, and an even one for the frame $Q - x$. Then $R_{e'}$ reads the class $K(e)$, $e$ the odd one of $e'$ and $N - e'$, frame for frame ($R_{N-e'}$ reads the same frames in the mirror order $x \mapsto Q - x$), and $R_0 \coloneqq \{iN : 0 < i < p\}$ reads the odd multiples of $N$, each twice (as $iN$ and $(p - i)N$). \begin{corollary}[even $Q$: the chain criterion]\label{cor:even-the-chain-criterion} Let $Q$ be even, $P$ odd, and $0 < e < N$ with $e \equiv u_0 \pmod{2}$. A head-on-free $O$-launched connection to $A$ with lead offset $\kappa$ exists only if the chain of $e$ satisfies (A) $\chi = -\rho$ on its carriers, or (B) for some $\sigma = \pm1$, $\chi = \sigma$ on its non-carriers and on its carriers with $\rho = -\sigma$. Moreover $\Theta_i \coloneqq (-1)^i c(d_i)$ changes sign between $d_i$ and $d_{i+1}$ exactly when $(d_i, d_{i+1})$ contains a point $y$ with $y - e \equiv \varepsilon(Q - Pe)/2 \pmod{Q}$; that happens at most twice along the chain, at steps $(p \pm 1)/2$ apart. \end{corollary} \begin{proof} By Lemma~\ref{lem:the-lead-on-the-frames}, $m \geq 0$ says $\chi_i(w - \rho_i) \geq 0$ at carriers and $\chi_iw \geq 0$ elsewhere. $w = 0$ gives (A), $w = \sigma$ gives (B), and $|w| \geq 2$ forces $\chi \equiv \operatorname{sgn} w$ on the whole chain, a case of (B). As in Lemma~\ref{lem:one-sign-change}, $\Theta_i = \operatorname{sgn} \cos(e\alpha + \varepsilon\pi(d_i - e)/Q)$, and $\cos(e\alpha + \varepsilon\pi(y - e)/Q)$ vanishes iff $y - e \equiv \varepsilon Q(\tfrac12 - e\alpha/\pi) = \varepsilon(Q - Pe)/2 \pmod{Q}$. The argument advances by $2\pi/p$ per step, so its zeros are $Q$ apart, that is $p/2$ steps. \end{proof} \begin{proposition}[the middle of the lead's range]\label{prop:the-middle-of-the-lead} Let $P$ be odd with $P \equiv \pm2 \pmod{p}$, and let a head-on-free $O$-launched connection of $P/Q$ end at $A$ with lead offset $\kappa$. \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item If $Q = p^b$ with $p \geq 5$, $b \geq 2$, and $u_0$ is odd, then $\kappa \leq 2N$ or $\kappa \geq Q - 2N$. \item If $Q = 2^a p^b$ with $a \geq 1$, $p \geq 11$, and $Q \neq 2p$ when $u_0$ is even, then $\kappa \leq 4N$ or $\kappa \geq Q - 4N$. \end{enumerate} \end{proposition} \begin{proof}[Proof of (1)] For $x \in (0, Q)$ put $S(x) \coloneqq h(x)$ if $x$ is odd and $S(x) \coloneqq h(Q - x)$ if $x$ is even, so that $S$ gives the value of $h$ at the frame that $x$ stands for. Write $M' \coloneqq (N - \mu)/2$, an integer with $0 \leq M' < N/2$ ($\mu \leq N$, both odd). Then $N\beta = M'\pi - \varepsilon\pi/p$, and $Q\beta = (Q - P)\pi/2$ with $(Q - P)/2 = pM' - \varepsilon$, which gives $S(x) = \zeta^{[x even]}\operatorname{sgn} \sin(x\beta)$ with $\zeta \coloneqq (-1)^{M'}$, and, along $R_{e'}$, \[ S(e' + iN) = \zeta^{[e' even]}\cdot\operatorname{sgn} \sin(e'\beta - i\varepsilon\pi/p), \quad 0 \leq i < p. \] The argument moves monotonically through an arc of length $(p - 1)\pi/p < \pi$, so $S$ changes sign at most once along $R_{e'}$ --- Lemma~\ref{lem:one-sign-change} at the corner $A$. Call $R_{e'}$ \textbf{central} if its change falls between $x_i \coloneqq e' + iN$ and $x_{i+1}$ with $1 \leq i \leq p - 3$. \emph{A central class kills every lead with $2N < \kappa < Q - 2N$.} The members $x_0, x_1$ are below $2N$, hence below both $\kappa$ and $Q - \kappa$: the odd one is a frame below $\kappa$, and the even one stands for a frame $Q - x > Q - 2N > \kappa$. Symmetrically $x_{p-2}, x_{p-1}$ exceed $Q - 2N$: the odd one is a frame above $\kappa$, and the even one stands for a frame below $\kappa$. $S$ is constant on each pair, with opposite values on the two. On the pair where $S = h_0$ the frame below $\kappa$ has $h = h_0$, and on the other pair the frame above $\kappa$ has $h = -h_0$; Corollary~\ref{cor:odd-the-signs-at-the} excludes the connection. \emph{A central class exists.} If $M' = 0$, then $P = Q - 2$, $\beta = \pi/Q$, and $h \equiv 1$ on $(0, Q)$. But $h(\kappa + 1)/h(\kappa - 1) = -c(\kappa + 1)/c(\kappa - 1) = -1$, so there is no arrival at all. Otherwise $1 \leq M' < N$, so $\gcd(M', N)$ is a power of $p$ smaller than $N$ and divides $N/p$. Choose $e' \in [1, N)$ with $e'M' \equiv 2N/p \pmod{N}$. Then $e'\beta \equiv 2\pi/p - \varepsilon e'\pi/Q \pmod{\pi}$ with $0 < e'\pi/Q < \pi/p$. At $\varepsilon = +1$ the argument $e'\beta - i\pi/p$ crosses a multiple of $\pi$ between $i = 1$ and $i = 2$, and at $\varepsilon = -1$ between $i = p - 3$ and $i = p - 2$; both are central, as $p \geq 5$. \end{proof} \begin{proof}[Proof of (2)] Let $0 < e < N$ with $e \equiv u_0 \pmod{2}$, and number the steps of its chain by $s$, the step from $d_s$ to $d_{s+1}$ ($-h \leq s \leq h - 1$); the step across $0$ is $s = -1$. Let $B \coloneqq \{i : |d_i| < \kappa\}$, a run of consecutive indices, and $E_L$, $E_R$ the indices before and after it. Since $4N < \kappa < Q - 4N$, $B \supseteq \{-2, -1, 0, 1\}$, $E_L \supseteq \{-h, -h + 1\}$ and $E_R \supseteq \{h - 1, h\}$. As $\chi_i = \operatorname{sgn}(d_i)\Theta_i$, the sign $\chi$ changes at a step iff exactly one of \emph{(it is the step $-1$)} and \emph{($\Theta$ changes there)} holds. The carriers are $B$ if $\kappa$ is even and $E_L \cup E_R$ if $\kappa$ is odd. \begin{itemize} \tightlist \item \emph{$\kappa$ even: a $\Theta$-change at a step $s$ with $|s + 1| \geq 2$ kills the chain.} Under (A), $\chi = -\rho$ on $B$ with $\rho$ alternating, so $\chi$ changes at the steps $-2$, $-1$ and $0$; then $\Theta$ changes at $-2$ and at $0$, which are its only two changes, and $s$ is neither. Under (B), $\chi$ is constant on $E_L$ and on $E_R$, so $s$ touches $B$; and $\chi = \sigma$ at the last index of $E_L$ and the first of $E_R$, so $\chi$ changes an even number of times on the steps touching $B$. If $\Theta$ changes at $-1$, the only such change is at $s$; otherwise the changes are at $-1$ and $s$ and no third, so $\chi = -\sigma$ exactly between them. That stretch contains $0, 1$ (if $s \geq 1$) or $-2, -1$ (if $s \leq -3$), all carriers, and one of the two has $\rho = -\sigma$ and so needs $\chi = \sigma$. \item \emph{$\kappa$ odd: a $\Theta$-change at a step $s \notin \{-h, h - 1, -1\}$ kills the chain.} Under (A), $\chi = -\rho$ on $E_L \cup E_R$, where $\rho$ alternates (its repeat is at $-1$, inside $B$), so $\chi$ changes at every step inside $E_L$ and inside $E_R$; these are $\Theta$-changes, among them the steps $-h$ and $h - 1$, so there is none at $s$. Under (B), $\chi = \sigma$ on $B \ni -1, 0$, so $\Theta$ changes at $-1$, and its changes are exactly $-1$ and $s$. So $\chi$ changes only at $s$, which is not inside $B$, and $\chi = -\sigma$ beyond $s$. There lie at least two consecutive indices of $E_L \cup E_R$, as $s \notin \{-h, h - 1\}$, and $\rho$ alternates on them, so one has $\rho = -\sigma$ and needs $\chi = \sigma$. \end{itemize} \emph{Such a chain exists.} By Corollary~\ref{cor:even-the-chain-criterion}, with $o_e :\equiv \varepsilon(Q - Pe)/2 \pmod{Q}$, $\Theta$ changes at a step $s$ iff some $y - e \equiv o_e$ lies in $(2Ns, 2N(s + 1))$. At $p \geq 7$ the hypothesis for even $\kappa$ therefore reads $o_e \bmod Q \in (N, Q - N)$, i.e. $Pe \bmod 2Q \notin [Q - 2N, Q + 2N]$, and the one for odd $\kappa$ reads $o_e \bmod Q \in (0, Q - 2N)$. \begin{itemize} \tightlist \item \emph{$\kappa$ even ($e$ odd).} If $P < Q - 2N$, take $e = 1$. Otherwise $\delta \coloneqq Q - P \leq 2N$ is odd and $\equiv -2\varepsilon \pmod{p}$, so $\delta \geq p - 2 \geq 9$. For odd $e$, $Pe \equiv Q - e\delta \pmod{2Q}$, and the condition is $e\delta \bmod 2Q \notin [-2N, 2N]$. The least odd $e$ with $e\delta > 2N$ has $e\delta \leq 2N + 2\delta \leq 6N < 2Q - 2N$ and $e \leq 2N/9 + 2 < N$ (here $N \geq 4$; at $N = 2$ this case does not arise, since $\delta \leq 4$). \item \emph{$\kappa$ odd ($e$ even, $N \geq 4$).} With $e = 2$, $o_2 = \varepsilon(Q/2 - P)$, and this fails only for $P - Q/2 \in (0, 2N]$ ($\varepsilon = +1$), resp. $[-2N, 0)$ ($\varepsilon = -1$). There $P = Q/2 + \eta$, and $e = 4$ gives $o_4 \equiv \varepsilon(Q/2 - 2\eta)$, which lies in $[Q/2 - 4N, Q/2) \subset (0, Q - 2N)$; $e = 4 < N$ needs $N \geq 8$. At $N = 4$ ($Q = 4p$) the failing range is empty: $\eta \equiv 2\varepsilon\pmod{p}$ and $|\eta| \leq 8 < p$ force $P = 2p + 2\varepsilon$, which is even. \end{itemize} So the lead dies. \end{proof} \begin{lemma}[the top of the range]\label{lem:the-top-of-the-range} Let $P$ be odd and coprime to $Q$, for any $Q$. No head-on-free $O$-launched connection ends at $A$ with lead offset $\kappa > Q - Q/P$. \end{lemma} \begin{proof} Put $n^* \coloneqq (P - 1)/2$, so that $n^*D = Q - Q/P$ and $(n^* + \tfrac12)D = Q$. Let $d_{\mathrm{last}}$ be the frame of the last reflection in $L_1$ (there is one: the first letter). (i) By Lemma~\ref{lem:the-sign-of-a-reflection} the lead carries $(-1)^{\lambda_n}$ and the last reflection $(-1)^{\lambda_n - 1}$, so $c(d_{\mathrm{last}}) = -c^*$. (ii) After the last reflection the orbit is reflected only in $L_2$ and $H$, and the argument of Lemma~\ref{lem:the-step-rule} shows that $\sin(y\alpha)$ has constant sign on the integers strictly between $d_{\mathrm{last}}$ and $d_f$. (iii) Suppose $\kappa > n^*D$. Then $n^*\pi < \kappa\alpha < Q\alpha = n^*\pi + \pi/2$, so $\kappa\alpha \bmod \pi \in (0, \pi/2)$, and $\kappa\alpha \bmod \pi \in -\varepsilon'\cdot(0, \pi/2 - \alpha)$ forces $\varepsilon' = -1$ and $\kappa\alpha \bmod \pi \in (0, \pi/2 - \alpha)$. So $d_f = \kappa + 1$, and $\kappa + 1 < Q$. If $d_{\mathrm{last}} < d_f$, the integers in $[d_{\mathrm{last}} + 1, \kappa]$ lie between two consecutive zeros of $\sin(y\alpha)$ and include $\kappa > n^*D$, so $d_{\mathrm{last}} + 1 > n^*D$; if $d_{\mathrm{last}} \geq d_f$, then $d_{\mathrm{last}} > n^*D$ directly. Either way $d_{\mathrm{last}} \in (n^*D - 1, Q) \subset ((n^* - \tfrac12)D, (n^* + \tfrac12)D)$, as $D > 2$, an interval on which $c$ is constant and which contains $\kappa + 1$. So $c(d_{\mathrm{last}}) = c(\kappa + 1) = c^*$, against (i). \end{proof} \subsection{Proof of Theorem~3}\label{sec:5.5} If no odd prime divides $Q$, or $P \not\equiv \pm2$ modulo the odd prime $p$ dividing $Q$, this is Theorem~2. So let $Q = 2^a p^b$, $b \geq 1$, and $P \equiv \pm2 \pmod{p}$, so that $Q - P \equiv \mp2$. For $p = 3$, Appendix A.5 shows that no head-on-free $O$-launched connection of any centre of $Q$ ends at $O$ or $A$, and Theorem~1 (2)--(3) gives the conclusions. Let $p \geq 5$. \emph{$Q = 2p$ and $Q = 4p$ (Remark~\ref{rem:where-the-two-methods-meet}).} At $Q = 2p$ both perpendicular classes of every centre are completely periodic by the code criterion (Corollary~\ref{cor:prime-and-twice-prime-denominators} (b)). At $Q = 4p$ the class $\epar = 0$ is, for every centre, and the class $\epar = 1$ whenever $\min(P, Q - P) \leq Q/3$ (Corollary~\ref{cor:the-even-head}); that covers every centre with $P \equiv \pm2 \pmod{p}$ once $p \geq 7$, since then $\min(P, Q - P) = p \pm 2$, and $Q = 20$ is in the census of Appendix A.6. The orphan exists at every odd $P$ by \cite{Orph} Corollary 4.20 ($Q = 2p$) and Theorem~4.24 ($Q = 4p$), so by \cite{Neck} Corollary 7.11 there is no swapped pair (the count written $p$ elsewhere; here $p$ is the prime), and Lemma~\ref{lem:2-1} gives Conjecture~2.2(e). These forward references are not circular: Corollaries~\ref{cor:prime-and-twice-prime-denominators} and \ref{cor:the-even-head} rest on Theorem~5 alone, and \S\ref{sec:7} does not use \S\S\ref{sec:4}--\ref{sec:5}. \emph{Otherwise.} By Theorem~1 (2) it suffices that no head-on-free $O$-launched connection of each odd $P' \in \{P, Q - P\}$ ends at $O$ or at $A$, for any $u_0$, and, when $Q$ is odd, that none of the even one ends at $O$. (A connection of an even $P$ to $A$ becomes one of the odd $Q - P$ by reversal and exchange of the legs.) The target $O$ is Proposition~\ref{prop:5-4} for odd $P'$ and Appendix A.1 for even $P'$. For the target $A$ at odd $P'$: \begin{itemize} \tightlist \item \emph{$Q = p^b$.} At $u_0$ even, Lemma~\ref{lem:the-adic-case}. At $u_0$ odd and $b = 1$, Corollary~\ref{cor:odd-the-signs-at-the}. At $u_0$ odd and $b \geq 2$, Proposition~\ref{prop:the-middle-of-the-lead} (1) leaves $\kappa \leq 2N$ and $\kappa \geq Q - 2N$, Lemma~\ref{lem:the-top-of-the-range} removes $\kappa > Q - Q/P'$, and Appendix A.2 the rest. \item \emph{$Q$ even, so $N \geq 8$.} At $p \geq 11$, Proposition~\ref{prop:the-middle-of-the-lead} (2) leaves $\kappa \leq 4N$ and $\kappa \geq Q - 4N$, Lemma~\ref{lem:the-top-of-the-range} removes $\kappa > Q - Q/P'$, and Appendix A.3 the rest. At $p \in \{5, 7\}$, Appendix A.4. \end{itemize} The orphan at odd $P$ is then Theorem~1 (3); at $Q = p^b$ it is Lemma~\ref{lem:the-adic-case} alone. \qed \begin{corollary}[the conditional theory of \cite{Neck} at one odd prime]\label{cor:the-conditional-theory-of-neck-b} At every centre satisfying the hypotheses of Theorem~3, every statement of \cite{Neck} whose only hypotheses are among complete periodicity, $p = 0$ (no swapped pair; not the prime $p$), (ZZ) and (OB) holds outright, in the range it is stated for. In particular $n(P/Q) = Q - 1$ at every even $P$ with $\min(P, Q - P) \geq 2$ of every odd prime power $Q$. \end{corollary} \begin{proof} As for Corollary~\ref{cor:the-conditional-theory-of-neck}, with Theorem~3 in place of Theorem~2. \end{proof} \begin{remark}[where the two methods meet]\label{rem:where-the-two-methods-meet} At even $Q$ the arrival argument needs $N \geq 8$, that is $Q \geq 8p$: at $N \leq 4$ the edges $\kappa \leq 4N$ and $\kappa \geq Q - 4N$ are most of the range, and at $Q = 2p$ with $u_0$ even Proposition~\ref{prop:the-middle-of-the-lead} (2) has no usable chain at all. There the code criterion of \S\ref{sec:7} supplies complete periodicity, and \cite{Orph} the orphan. The methods are complementary rather than nested: the conjugate certificate is a residue condition and fails only at $P \equiv \pm2$; the chain arguments work there but need $Q \geq 8p$ at even $Q$; and the code criterion is positional and fails only in the middle of a composite $Q$. \end{remark} \section{Where window-and-sign certificates stop}\label{sec:6} Theorem~2 excludes an arrival with three inputs: the window (Lemma~\ref{lem:the-window}), the signs of the frame terms and of the lead (Lemmas~\ref{lem:the-sign-of-a-reflection} and \ref{lem:the-arrival-arc-at}), and linear algebra over $\mathbb{Q}$ in $\mathbb{Q}(\zeta_{4Q})$. The chain arguments of \S\ref{sec:5} start from the same three, and add a fourth, the step rule (Lemma~\ref{lem:the-step-rule}). This section shows that arguments built from the three inputs alone stop at an explicit arithmetic line, and that $T_0$ lies beyond it. \subsection{Three kinds of centre, and the obstruction}\label{sec:6.1} The line is drawn by the residues of $P$ at the odd primes of $Q$. Call an odd prime $p | Q$ \textbf{slow} if $P \equiv \pm2 \pmod{p}$, with \textbf{sign} $\pm$. By Remark~\ref{rem:why-the-residues} these are the primes at which the rotation $r \equiv P/2 \pmod{p}$ is $\pm1$. $P + 2$ is prime to $Q$ exactly when no slow prime has the sign $-$, and $P - 2$ exactly when none has the sign $+$; so the two conjugations of \S\ref{sec:4} sort the centres into three kinds. \begin{itemize} \tightlist \item \emph{No slow prime:} both conjugations exist, and Theorem~2 applies. \item \emph{Slow primes of one sign only} (the centre is \textbf{C}): one conjugation survives. A one-prime $Q$ at $P \equiv \pm2$ is of this kind, and Theorem~3 treats it. \item \emph{Slow primes of both signs} (the centre is \textbf{$\neg$C}): neither conjugation exists. This needs two distinct odd primes; when $3 | Q$ the prime $3$ is always slow, and $\neg$C means that another prime is slow with the opposite sign. \end{itemize} The kinds are unchanged by $P \mapsto Q - P$. At $\neg$C nothing of this kind can work: \begin{main4} Let $P$ be odd and prime to $Q$, and suppose that neither $P + 2$ nor $P - 2$ is prime to $Q$. Fix a launch $u_0$, let $b$ be the end of its window parallel to the launch, $\nu$ as in \S\ref{sec:3.4}, and let $\mathcal{D} \coloneqq \{d \in \nu\cdot(0, Q) : d \equiv b \pmod{2}\}$, the frame offsets that Lemma~\ref{lem:the-window} allows. \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \item The weights $m_T(d) \coloneqq |\cos d\alpha|\cdot|\sin(d\pi/Q)|$ are positive on $\mathcal{D}$, and \[ (x + x^{-1})\cdot\sum_{d\in\mathcal{D}} m_T(d)\cdot c(d)\cdot S_d(x) = 0\ \text{ in } \mathbb{Q}(\zeta_{4Q}) \otimes_{\mathbb{Q}} \mathbb{R}. \] \item For every $\kappa \in \nu\cdot(0, Q)$ with $\kappa \not\equiv b \pmod{2}$ and every sign $c^* = \pm1$ there are weights $m(d) > 0$ on $\mathcal{D}$, with $m(-b) \geq 1$, such that $(x + x^{-1})\cdot\sum_{d\in\mathcal{D}} m(d)\cdot c(d)\cdot S_d(x) + c^*\cdot S_{\kappa}(x) = 0$ in $\mathbb{Q}(\zeta_{4Q}) \otimes_{\mathbb{Q}} \mathbb{R}$. \end{enumerate} So no window-and-sign certificate excludes an arrival at $O$ or at $A$, at any launch and for any lead. The triangle $T_0$ is $\neg$C at both of its centres and is not completely periodic (Proposition~\ref{prop:6-4}). \end{main4} \emph{Window-and-sign certificates.} Fix a launch. Proposition~\ref{prop:the-arrival-relation} says that the multiplicities $m(d) \geq 0$ of a connection, with $m(-b) \geq 1$ (the first reflection, at $t = 0$), make $\sum_d m(d)\cdot c(d)\cdot F_d + \ell$ vanish, where $F_d \coloneqq (x + x^{-1})S_d(x)$ and $\ell$ is the lead. Relax the multiplicities to real numbers. By Farkas' lemma in the finite-dimensional real space $\mathbb{Q}(\zeta_{4Q}) \otimes_{\mathbb{Q}} \mathbb{R}$, the relaxed problem has no solution exactly when some real-linear functional $y$ has $y(c(d)F_d) \geq 0$ for every $d \in \mathcal{D}$ and $y(c(-b)F_{-b}) + y(\ell) > 0$ (for the target $O$, where $\ell = 0$, this is $y(c(-b)F_{-b}) > 0$). We call such a $y$ a \textbf{window-and-sign certificate}. For the target $A$ the condition is not $y(\ell) > 0$: a lead can lie in the cone of the signed frames only with $m(-b) = 0$, and then the relaxed problem has no solution although no $y$ is positive on the lead. The functional of the proof of Theorem~2, the difference of the two conjugated relations, is one. Lemma~\ref{lem:the-chain-split} is a statement about the same relaxed problem: its proof is linear algebra over $\mathbb{Q}$ and holds verbatim for real weights. What a window-and-sign certificate cannot use is that the multiplicities are integers, or which sequences of frames an orbit can actually run through. Theorem~4 then rules out every such certificate. Part 1 gives a feasible point for the target $O$: a certificate would take the value $0 = \sum_d m_T(d)\cdot y(c(d)F_d)$ on it, so $y(c(d)F_d) = 0$ for every $d$, against $y(c(-b)F_{-b}) > 0$. Part 2 gives one for the target $A$, for each lead: there $y(\ell) + m(-b)\cdot y(c(-b)F_{-b}) \leq 0$ with $m(-b) \geq 1$, so $y(\ell) + y(c(-b)F_{-b}) \leq 0$. Theorem~1 (2), applied at either centre of a triangle, needs the target $O$ excluded at both centres, and Theorem~1 (3) needs the target $A$ at an odd one. At even $Q$ both centres are odd; at odd $Q$ one of $P$ and $Q - P$ is odd. Since $\neg$C is unchanged by $P \mapsto Q - P$, Theorem~4 applies at that odd centre, so at no $\neg$C centre can a window-and-sign argument supply the hypothesis of Theorem~1 (2) or of Theorem~1 (3). \begin{proof}[Proof of Theorem~4] Put $\zeta \coloneqq e^{i\pi/2Q}$ and $\beta_r \coloneqq r\pi/2Q$. An element of $\mathbb{Q}(\zeta) \otimes_{\mathbb{Q}} \mathbb{R}$ is $0$ exactly when its image under every embedding of $\mathbb{Q}(\zeta)$ in $\mathbb{C}$ is $0$. The embeddings are $\zeta \mapsto \zeta^g$, $g$ a unit modulo $4Q$. Since $P$ is a unit modulo $4Q$, the embedding sends $x = \zeta^P$ to $e^{i\beta_r}$ with $r \equiv gP$, and $r$ runs over the odd residues modulo $4Q$ prime to $Q$. It sends $F_d$ to $2\cos \beta_r\cdot2i\cdot\sin(d\beta_r)$ and $S_{\kappa}(x)$ to $2i\cdot\sin(\kappa\beta_r)$. \emph{Part 1.} On $\mathcal{D}$, $\sin(d\pi/Q)$ has the sign $\nu$. Also $\cos d\alpha \neq 0$: a zero would need $dP \equiv Q \pmod{2Q}$, so $d \equiv Q \pmod{2Q}$, since the inverse of $P$ modulo $2Q$ is odd. So $m_T > 0$ on $\mathcal{D}$, and $m_T(d)\cdot c(d) = \nu\cdot\cos(d\alpha)\cdot\sin(d\pi/Q)$. The embedding $r$ therefore sends the sum to $4i\nu\cdot\cos \beta_r\cdot\sum_{d\in\mathcal{D}} h_r(d)$, where \[ h_r(d) \coloneqq \cos(d\alpha)\cdot\sin(d\pi/Q)\cdot\sin(d\beta_r). \] $h_r$ is even in $d$. Under $d \mapsto d + 2Q$ its three factors change by $-1$, $+1$ and $-1$ ($P$ and $r$ are odd), so it has period $2Q$. It vanishes at $d = 0$ and at $d = Q$. Let $E$ be the residues modulo $2Q$ with the parity of $b$. They are $\mathcal{D}$, its negatives, and those of $0$ and $Q$ that have the parity of $b$, so $\sum_{\mathcal{D}} h_r = \tfrac12\cdot\sum_E h_r$. Written in exponentials, $h_r$ is a combination of the terms $e^{ikd\pi/2Q}$ with $k \in \{\pm P \pm 2 \pm r\}$, all even, and \[ \sum_{d\in E} e^{ikd\pi/2Q} = e^{ikb\pi/2Q}\cdot\sum_{j \bmod Q} e^{ikj\pi/Q} \] vanishes unless $2Q | k$. So $\sum_{\mathcal{D}} h_r = 0$ unless $r \equiv \pm(P + 2)$ or $r \equiv \pm(P - 2) \pmod{2Q}$, and either congruence would make $P + 2$ or $P - 2$ prime to $Q$, as $r$ is. Every embedding of the sum vanishes. \emph{Part 2.} We show that $S_{\kappa}(x)$ lies in the real span of the $F_d$, $d \in \mathcal{D}$. Then $-c^*\cdot S_{\kappa} = \sum_d \mu(d)\cdot c(d)\cdot F_d$ for some real $\mu$, and $m \coloneqq \mu + \rho\cdot m_T$, which satisfies the relation by part 1, is positive with $m(-b) \geq 1$ once $\rho$ is large. Both images, $2\cos \beta_r\cdot2i\cdot\sin(d\beta_r)$ and $2i\cdot\sin(\kappa\beta_r)$, change sign under $r \mapsto -r$. Under $r \mapsto r + 2Q$ they are multiplied by $-(-1)^d$ and $(-1)^{\kappa}$, which agree because $\kappa \not\equiv d \pmod{2}$. The group generated by these two moves acts freely on the $\varphi(4Q)$ residues ($r + 2Q \equiv -r$ would put $Q | r$), so it is enough to match the images on a set $\mathcal{R}$ of $n_0 \coloneqq \varphi(4Q)/4$ representatives. On $\mathcal{R}$, $\cos \beta_r \neq 0$, since $r \not\equiv Q \pmod{2Q}$. So we need the vector $(\sin(\kappa\beta_r)/\cos \beta_r)_{r\in\mathcal{R}}$ in the column span of $M \coloneqq (\sin(d\beta_r))_{r\in\mathcal{R}, d\in\mathcal{D}}$. That holds for every right-hand side if $MM^T$ is non-singular. Its entry $\sum_{d\in\mathcal{D}} \sin(d\beta_r)\cdot\sin(d\beta_{r'})$ has a summand that is even in $d$, of period $2Q$, $0$ at $d = 0$ and $w_r w_{r'}$ at $d = Q$, where $w_r \coloneqq \sin(r\pi/2) = \pm1$. Hence the entry equals $\tfrac12\cdot\sum_{d\in E} \sin(d\beta_r)\cdot\sin(d\beta_{r'}) - \tfrac12\cdot[Q \equiv b \pmod{2}]\cdot w_r w_{r'}$. The sum over $E$ is $\tfrac12\cdot\sum_E (\cos(d(r - r')\pi/2Q) - \cos(d(r + r')\pi/2Q)) = (Q/2)\cdot\delta_{rr'}$, by the same character sum: $r \pm r' \equiv 0 \pmod{2Q}$ holds for representatives only when $r = r'$, and only with the minus sign. So \[ MM^T = (Q/4)\cdot I - \tfrac12\cdot[Q \equiv b \pmod{2}]\cdot ww^T, \] with eigenvalues $Q/4$ and, when $Q \equiv b \pmod{2}$, $Q/4 - n_0/2$. The latter is positive exactly when $\varphi(4Q) < 2Q$, that is, when $Q$ is not a power of $2$, and $Q$ has two odd prime factors here. \end{proof} \emph{What it says.} $m_T$ is Theorem~2's certificate read backwards. Divided as in that proof, the difference $\tau_+ - \tau_-$ takes the value $2\nu\cdot m_T(d)$ on the signed frame term at $d$: of the sign $\nu$ at every frame, and so a certificate, because both conjugations exist. At $\neg$C neither exists, and the same function is a positive solution instead. The dichotomy is exact. At a centre where $P + 2$ (say) is prime to $Q$, the embeddings with $r \equiv \pm(P + 2) \pmod{2Q}$ survive (two complex places). At $r \equiv P + 2$, of the four frequencies only $k = r - 2 - P$ is $\equiv 0 \pmod{2Q}$, so $|\sum_{\mathcal{D}} h_r| = Q/8$, and $m_T$ is not a solution. Part 2's span statement holds at every $Q$ that is not a power of $2$, which gives the following. \begin{remark}[a certificate at a C centre carries the surviving conjugate]\label{rem:a-certificate-at-a-c} Let $y$ be a window-and-sign certificate at a C centre with $P$ odd. Then $y$ does not vanish on the factor of $\mathbb{Q}(\zeta) \otimes \mathbb{R}$ at the surviving places. Indeed, $y(\sum_d m_T(d)c(d)F_d) = \sum_d m_T(d)\cdot y(c(d)F_d) \geq 0$, and by part 1's computation only those places see the sum. If $y$ vanished there, $y(c(d)F_d) = 0$ for every $d$. That is no certificate for the target $O$, and none for the target $A$ either, because the lead lies in the span of the frames. So a proof at a C centre must use the one conjugate that is left. How, in general, we do not know. \end{remark} \begin{remark}[what computation adds at $\neg$C]\label{rem:what-computation-adds-at-c} Theorem~4's solution is real, not integral. One can also record which sequences of frames an orbit can run through, as a flow condition on the finite automaton that generates head-on-free words. Even then the relaxation for the target $O$ stays feasible at some launch of every $\neg$C centre we computed (every $Q \leq 80$ with two or more odd primes, and $18$ further values up to $221$; $190$ centres), with exact integer solutions. At C centres, by contrast, the same relaxation is infeasible at every launch we computed (Remark~\ref{rem:c-centres-computation-and-two}). So at $\neg$C a proof needs an input that is neither the window, the signs nor the flow, at least on the centres computed. \end{remark} \subsection{The C centres}\label{sec:6.2} \begin{remark}[C centres: computation, and two odd primes]\label{rem:c-centres-computation-and-two} At every C centre $P/Q$, $\min(P, Q - P) \geq 2$, with $Q \leq 80$ having two or more odd prime factors, and at $18$ further values $85 \leq Q \leq 221$ (two primes $\geq 5$; $3 | Q$; a prime power times a prime; even $Q$; three primes), the flow relaxation of Remark~\ref{rem:what-computation-adds-at-c} is infeasible for the targets $O$ and $A$, at every launch and both parities of $P$: at the launches excluded by the window this is the verdict of a floating-point linear program, and at the rest an exact flow certificate. These are $1 204$ centres, and on this computation each is completely periodic on both classes, by Theorem~1 (2). On the orphan side, at all $364$ C centres with $P$ odd, $P \equiv \pm2$, and $Q \leq 275$ that we computed ($21$ values of $Q$), no head-on-free orbit from $O$ at an even launch reaches $A$, so the orphan exists there by Theorem~1 (3). At $356$ of them this rests on a floating-point linear program, at the other $8$ on an exact flow certificate. The methods of \S\ref{sec:5} also go further at two odd primes when exactly one of them, $p$, is slow. Then the classes at $p$ are those of \S\ref{sec:5}, and the second prime $q$ acts on them by a rotation. With an argument that forces each class to be constant along $q$, case analyses on the pattern of Appendix A, partly computer-assisted and not included here, give complete periodicity of both classes, and the orphan at odd $P$, at every centre of $Q = 2^a p^b q^c$ ($b, c \geq 1$) with $q$ large compared with $p$ and $P \bmod q$ outside an explicit set of residues (empty at $p = 3$, $Q$ odd). The thresholds are: $q \geq 73$ at $p = 3$, $Q$ odd ($q \geq 53$ for the orphan); $q \geq 53$ at $p = 3$, $Q$ even; for $p \geq 5$, $q > 6p$ at odd $Q$ and $q \geq 12p + 1$ at even $Q$. We record this reach as an announcement; nothing in this paper uses it. \end{remark} \subsection{The triangle $T_0$}\label{sec:6.3} Let $T_0$ be the right triangle at the centre $8/15$, with angles $(4/15, 7/30, 1/2)\pi$. Both of its centres are $\neg$C: $8 \equiv 2 \pmod{3}$ and $8 \equiv -2 \pmod{5}$, and $7 \equiv -2 \pmod{3}$ and $7 \equiv 2 \pmod{5}$. So neither Theorem~2 nor Theorem~3 reaches $T_0$, and at $7/15$ Theorem~4 shows that no window-and-sign argument could. At $T_0$ the arrival is not only formal. The orbit from $O$ at $8/15$ in the direction $2\theta$ has the word $L_1 H L_2 H L_1 H L_1\allowbreak L_2 H L_1 L_2 H L_2$. It reaches $A$ after $13$ reflections, none of them head-on, and $4$ of them in $L_1$. In degrees ($\theta = 6^\circ$) its relation \eqref{eq:2.4} is twice \[ 2 \sin 12^\circ + 2 \sin 24^\circ + \sin 36^\circ = \sin 60^\circ + \sin 72^\circ. \] Lifted to the necklace it is a saddle connection of the class $\epar = 0$, perpendicular to $L_1$, between images of $O$ and $A$. These are cone points, not poles. It is not a horizontal arc, since it does not run along a side. Its endpoints, the images of $O$ and of $A$, are cone points of different angles ($8\pi$ and $7\pi$), each the only one of its angle, so $\iota$ fixes both; the connection therefore meets $\operatorname{Fix}(\iota)$ in at least two points and is not of the second kind. By the trichotomy of \S\ref{sec:2.2} it is \textbf{swapped}, and $p \neq 0$ on this class. Reversed, with the legs exchanged, it is the orbit from $O$ at $7/15$ in the direction $5\theta$. At $P = 8$ there is no orphan, since $P$ is even (\cite{Orph} Theorem A), so this arrival is consistent with Proposition~\ref{prop:3-7}, which needs $P$ odd. Computation also places the connection on the boundary of the minimal component of Proposition~\ref{prop:6-4}. Leaves launched at distance $10^{-12}$ on its two sides behave differently: one reaches a transversal inside the component, and the other closes. \begin{proposition}\label{prop:6-4} In the direction perpendicular to $L_1$, $T_0$ decomposes, up to measure zero, into three closed cylinders and one minimal, uniquely ergodic component of positive area, in the phase space of the billiard. No further invariant set carries positive measure. \end{proposition} Delecroix and R\"uth \cite{DR22} found by computation that this direction is not completely periodic. We give an exact, computer-assisted proof, because $T_0$ is the witness that some hypothesis is needed, and because the proof is short once the right transversal is chosen. \begin{proof} Place $T_0$ as in \S\ref{sec:2.1}, $\alpha = 4\pi/15$, and read the leg $L_1 = \{(\cot \alpha, s) : s \in [0, 1]\}$ with outgoing direction $\pi - \alpha = 11\pi/15$, the direction of the hypotenuse reflected in $L_1$. (Read in the horizontal direction itself, $L_1$ meets only cylinders, by \cite{Bos92} Proposition 1.8. A transversal that sees a minimal component must be read in another direction of the class.) \emph{The return map.} The reflections act on directions $m\pi/15$ by $m \mapsto 15 - m$, $-m$, $8 - m$, so along a fixed sequence of sides the position is affine in $s$, with coefficients in $\mathbb{Q}(\zeta_{60})$. Each boundary of a return word is a linear equation over that field, and each word's domain of validity is a finite intersection of half-lines with exact endpoints. Seven such domains tile $[0, 1]$, with consecutive endpoints equal as identities, so there is no eighth word. Exactly two of the six internal boundaries change the translation, and the first return is an exchange of three intervals with permutation $(3 2 1)$ and lengths \begin{gather*} \lambda_1 = 1 - 4\sin(\pi/30),\quad \lambda_2 = 3 + 4\cos(\pi/15) - 4\cos(2\pi/15) - 4\cos(\pi/5), \\ \lambda_3 = -3 - 4\cos(\pi/15) + 8\cos(2\pi/15), \end{gather*} all in $K = \mathbb{Q}(\zeta_{30})^+ = \mathbb{Q}(\cos(\pi/15))$, of degree $4$, with $\lambda_1 + \lambda_2 + \lambda_3 = 1$. \emph{Minimality.} In the $\mathbb{Q}$-basis $\{1, \cos(\pi/15), \cos(2\pi/15), \cos(\pi/5)\}$ of $K$ the $\lambda_i$ have coordinates $(1, 0, -4, 4)$, $(3, 4, -4, -4)$, $(-3, -4, 8, 0)$, of rank $3$. So they are rationally independent, the exchange satisfies Keane's condition, and it is minimal \cite{Kea75}. \emph{Unique ergodicity.} The exchange is the first return to $[0, 1)$ of the rotation by $\lambda_2 + \lambda_3$ of the circle $\mathbb{R}/(1 + \lambda_2)\mathbb{Z}$, with return time $1$ or $2$, and that rotation is irrational by the same rank computation. An irrational rotation is uniquely ergodic, and the bounded return time carries this to the exchange. The roof function, the length of the first-return path, is constant on each word and lies between $2.9$ and $27.8$, so the suspension is a minimal, uniquely ergodic flow. \emph{Nothing else.} On $L_1$ read horizontally the direction has three cylinders, whose traces on $L_1$ have lengths $2\cos(2\pi/5)$, $1 - 2\cos(2\pi/5) - 2\sin(\pi/30)$ and $2\sin(\pi/30)$ (each cylinder crosses $L_1$ twice per period). Their areas, divided by $\cot \alpha$, sum to $3 - 4\cos(\pi/15) + 12\cos(2\pi/15) - 4\cos(\pi/5)$. Independently, Kac's formula on the transversal above gives the mass of the minimal component, divided by $\cot \alpha$, as $12 + 4\cos(\pi/15) - 12\cos(2\pi/15) + 4\cos(\pi/5)$. The two add to $15 = Q$ exactly, and $Q\cdot\cot \alpha$ is the total measure of the phase space of the class. So no further invariant set has positive measure. \end{proof} So the direction is periodic but not purely periodic. It is periodic because a regular orbit perpendicular to $L_1$ retraces itself (\cite{Bos92} Proposition 1.8); the three closed cylinders of Proposition~\ref{prop:6-4} are made of such orbits. Only finitely many orbits in a fixed direction meet a vertex, since each cone point emits finitely many separatrices, while the minimal component has positive area and each orbit is null. So the component carries uncountably many regular orbits, and none of them is periodic. $T_0$ therefore refutes Boshernitzan's Conjecture~2.2(e), and with it (a); this is the counterexample of Delecroix and R\"uth \cite{DR22}. \subsection{A conjecture}\label{sec:6.4} Theorems~2 and 3 cover the centres with no slow prime and the $Q$ with one odd prime. Theorem~4 shows that $\neg$C needs a new input, and $T_0$ shows that the conclusion can fail there. No other failure has been found. \begin{conjecture}\label{conj:6-5} (i) At every C centre with $\min(P, Q - P) \geq 2$, no head-on-free $O$-launched connection ends at $O$ or at $A$. (ii) Every $\neg$C rational right triangle other than $T_0$ satisfies Boshernitzan's Conjecture~2.2(e). \end{conjecture} Since C is unchanged by $P \mapsto Q - P$, part (i) at both centres gives complete periodicity of every C triangle by Theorem~1 (2), and the orphan at every odd C centre by Theorem~1 (3). With Theorems~2 and 3 the two parts together say that $T_0$ is the only rational right triangle at which Conjecture~2.2(e) fails. Part (i) rests on the C computations of Remark~\ref{rem:c-centres-computation-and-two}, part (ii) on the $\neg$C census of Remark~\ref{rem:the-evidence}. \begin{remark}[the evidence]\label{rem:the-evidence} On the C side: Remark~\ref{rem:c-centres-computation-and-two}. On the $\neg$C side: every $\neg$C right triangle with $15 \leq Q < 500$ other than $T_0$ ($1 057$ of $1 058$) has its direction perpendicular to $L_1$ completely periodic at both of its centres. We found this by an exact decomposition of the direction into cylinders, following every separatrix to its end. That covers both classes at odd $Q$ ($715$ triangles) and the class $\epar = 0$ at even $Q$ ($343$). The census of \cite{DR22} searches the side-perpendicular directions of every triangle with $d \leq 153$ and finds nine counterexamples to Conjecture~2.2(a); $T_0$ is the only right triangle among them. A right triangle has $d = 2Q$, so this covers both classes at every centre with $Q \leq 76$. What is not covered is the C centres with two or more odd primes outside these computations and outside Remark~\ref{rem:c-centres-computation-and-two}'s families, and the class $\epar = 1$ of the $\neg$C triangles with even $77 \leq Q < 500$. Non-lattice is necessary for a direction to carry both cylinders and a minimal component \cite{Vee89}, and it is a poor predictor of it. Being $\neg$C is a poor predictor too. What distinguishes $T_0$ among the $\neg$C triangles we do not know. \end{remark} \section{The code criterion}\label{sec:7} The arrival theorems are residue conditions: Theorem~2 fails only at $P \equiv \pm2$ modulo an odd prime of $Q$, and \S\ref{sec:5} and \S\ref{sec:6} are about those residues. This section gives the second method, which is positional. It reads the minimal components themselves rather than the connections that would bound them. A minimal component is a disc whose poles satisfy one linear relation over $\mathbb{F}_2$ (\S\ref{sec:7.1}). The relations form a binary code whose nonzero words all reach both ends of the chain $D$, and the geometry clears a run of poles at an end (\S\ref{sec:7.2}). The two methods are complementary rather than nested (Remark~\ref{rem:one-odd-prime-two-odd}). \subsection{The chain and the minimal-disc theorem}\label{sec:7.1} Fix a perpendicular class. The chain $D = B/\iota$ of \S\ref{sec:2.2} runs between two \textbf{ends}, each either an $\iota$-fixed kite (a \textbf{tie kite}) or an $\iota$-fixed interface (\cite{Neck} \S 1.2). The interfaces carry transverse measures \[ \ell = \sin(\pi c/2Q),\quad c \equiv c_0 + 2Pt \pmod{2Q}, \] consecutive interfaces differing by $2P$ in $c$ (\cite{Neck} Proposition 2.2). The interior poles of $D$, one for each $\iota$-orbit of non-tie kites, sit at \textbf{positions} $\mathcal{T} = \{1, \ldots, |\mathcal{T}|\}$ numbered from either end, with \begin{gather*} |\mathcal{T}| = (Q - 1)/2 \ (Q\text{ odd}), \\ Q/2 - 1 \ (Q\text{ even}, \epar = 0), \quad Q/2 \ (Q\text{ even}, \epar = 1). \end{gather*} We write \[ h \coloneqq \varphi(2Q)/2,\quad d_T \coloneqq |\mathcal{T}| - h. \] So $h = \varphi(Q)/2$ at odd $Q$ and $h = \varphi(Q)$ at even $Q$. Also $d_T = 0$ at an odd prime $Q$ and at $Q = 2p$ on the class $\epar = 0$, and $d_T = (Q - 1 - \varphi(Q))/2$ at odd $Q$. An end is an \textbf{arc} if it meets $\operatorname{Fix}(\iota)$ transversally: a tie kite, one of whose two leg copies is a vertical arc of $\operatorname{Fix}(\iota)$, or an interface of measure $1$, which is a vertical arc (\cite{Neck} Corollary 7.4 and its proof). The ends, case by case, are as follows (at odd $Q$ it is enough to take $\epar = 0$, since the class $\epar = 1$ of $P/Q$ is the class $\epar = 0$ of $(Q - P)/Q$): \begin{center} \begin{tabular}{@{}>{\raggedright\arraybackslash}p{0.15\linewidth}>{\raggedright\arraybackslash}p{0.28\linewidth}>{\raggedright\arraybackslash}p{0.30\linewidth}>{\raggedright\arraybackslash}p{0.155\linewidth}@{}} \toprule case & one end & the other end & $\sigma$ at an arc \\ \midrule $Q$ odd, $P$ odd & tie kite (arc) & interface $I_M$ of measure $1$ (arc) & $Q - P$; $\min(P, Q - P)$ \\ $Q$ odd, $P$ even & tie kite (arc) & interface $I_M$, horizontal (not an arc) & $Q - P$ \\ $Q$ even, $\epar = 0$ & tie kite $0$ (arc) & tie kite $Q/2$ (arc) & $Q - P$; $P$ \\ $Q$ even, $\epar = 1$ & interface $J$ of measure $1$ (arc) & interface $J'$, horizontal (not an arc) & $\min(P, Q - P)$ \\ \bottomrule \end{tabular} \end{center} Here $M \coloneqq (Q - 1)/2$. Moving away from an arc $A$, the interfaces have measures $|\cos(j\sigma\pi/2Q)|$, with $j = 2i + 1$ at a tie kite and $j = 2i$ at an interface, for $i = 0, 1, 2, \ldots$. Put $j_A = 0$ at a tie kite and $j_A = 1$ at an interface. \emph{The classes of the poles.} Let $\zeta = e^{i\pi/2Q}$ and $w = \zeta^2$, and let the class direction be $d = \zeta^a$. In this section $X$ is an indeterminate, and $\mathbb{Z}[\zeta]/2 = \mathbb{F}_2[X]/\Phi_{4Q}$. For a pole $p$ of $D$ put \[ \kappa(p) \coloneqq \bar{d}\varepsilon + d\bar{\varepsilon} \in \mathbb{Z}[\zeta]/2, \] where $\varepsilon$ is the linear part of a copy of $T$ whose $R$-corner is $p$. The copies at $p$ have linear parts $\pm\varepsilon$, alone or composed with conjugation, so $\kappa(p)$ is well defined. If $p$ is the pole of the kite between the interfaces $c$ and $c + 2P$, then $\kappa(p) = X^{e} + X^{-e}$ with $e \equiv c + P \pmod{2Q}$, the direction of the kite's axis relative to the class (\cite{Neck} Propositions 2.1--2.2). We write $\kappa_t$ for the class of the pole at position $t$. On the class $\epar = 0$, counted from the tie kite $0$, $\kappa_t = w^{Pt} + w^{-Pt}$. A \textbf{zero} of $B$ is an image of $O$ or of $A$, a cone point of angle at least $2\pi$ when $\min(P, Q - P) \geq 2$; at $\min(P, Q - P) = 1$ one of them is a simple pole, which lies on $\partial D$ as the zeros do (see the proof of Theorem~\ref{thm:the-shape-of-a-minimal}). \begin{theorem}[the shape of a minimal component]\label{thm:the-shape-of-a-minimal} Take any centre and either class, and let $\Omega$ be a minimal component of the class foliation of $D$. Then: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item $\Omega$ is an open disc in the interior of $D$, bounded by a closed chain of saddle connections $e_1, \ldots, e_c$ whose endpoints are zeros, each swapped or a horizontal arc of $\operatorname{Fix}(\iota)$ without a pole endpoint, meeting at corners of angle $a_s\pi$, $a_s \geq 1$; \item the interior poles of $D$ whose separatrix never meets $\operatorname{Fix}(\iota)$ are exactly the poles lying in minimal components, each such separatrix is dense in its component, and $\Omega$ contains $2 + \sum_s (a_s - 1) \geq 2$ poles; \item $\sum_{p \in \Omega} \kappa(p) = 0$ in $\mathbb{Z}[\zeta]/2$. \end{enumerate} \end{theorem} \begin{proof} $\Omega \subset\text{ int }D$ by \cite{Neck} Corollary 7.4. \emph{The boundary.} A saddle connection of the second kind of the trichotomy (\S\ref{sec:2.2}) has a cylinder on each side (\cite{Neck} Corollary 7.3). An edge with a pole endpoint has both sides in one component (\cite{Neck} Proposition 7.1), and none occurs on $\partial\Omega$. The separatrix of an interior pole ends at no other interior pole (\cite{Neck} Theorem 6.1) and at no zero (\cite{Neck} Theorem 6.7). The one germ of a pole on $\operatorname{Fix}(\iota)$ is a horizontal arc of $\operatorname{Fix}(\iota)$ with a pole endpoint, which bounds no minimal component (\cite{Neck} Corollary 7.5). A separatrix returning to its own pole, or to that pole's $\iota$-partner, must reverse, which only a vertical arc of $\operatorname{Fix}(\iota)$ allows, so its edge is of the second kind. A separatrix ending at a pole on $\operatorname{Fix}(\iota)$ would be that pole's one germ, whose other end is a zero. So each $e_s$ joins two zeros and is swapped or a horizontal arc. \emph{A disc.} If $K$ is a component of $D \setminus \Omega$, an edge $e_s$ meeting $K$ is connected and disjoint from $\Omega$, so it lies in $K$, and its endpoints lie on $\partial D$ (\cite{Neck} Proposition 6.6). So every component of $D \setminus \Omega$ meets the connected set $\partial D$, $D \setminus \Omega$ is connected, and $\Omega$ is simply connected. Each $e_s$ has both ends on $\partial D$, so it separates $D$, and $\Omega$ lies on one side of it. \emph{The count.} Apply Gauss--Bonnet to the flat disc $\Omega$. Its boundary is geodesic, with corners between two class germs, so $a_s \in \mathbb{Z}_{\geq1}$. Its only cone points are poles, since the zeros, and the poles of the fixed kites, lie on $\partial D$: $O$ and $A$ each have a single image in $B$, which $\iota$ must fix. So $\pi\cdot\#\text{poles }+ \sum_s (\pi - a_s\pi) = 2\pi$. \emph{Which poles.} A pole of $\Omega$ lies on no saddle connection, so its separatrix never ends and stays in $\Omega$, which misses $\operatorname{Fix}(\iota)$. Conversely, a separatrix that misses $\operatorname{Fix}(\iota)$ is not a horizontal arc and not of the second kind, and by the exclusions above it never ends. An infinite separatrix on the compact surface $B$ is recurrent and dense in a minimal component, which contains its simple poles in its interior \cite[Theorem 11.1 and \S 11.2]{Str84}. \emph{The relation.} Develop $\Omega \setminus \{\text{poles}\}$ through the translation charts of $S_{\alpha}$, where $B = S_{\alpha}/\langle-1\rangle$ has holonomy $z \mapsto \pm z + b$. In the coordinates of \S\ref{sec:2.1} every copy of $T$ is $g(T)$ with $g(z) = \varepsilon z + b$ or $\varepsilon\bar{z} + b$, $\varepsilon$ a root of unity in $\mathbb{Z}[w]$ and $b = 2L\beta$, $\beta \in \mathbb{Z}[w]$ (the proof of \cite{Orph} Theorem 4.11). So a pole develops to some $g(R)$ and a zero to some $g(O)$ or $g(A)$. The loop about the $i$-th pole of $\Omega$ has holonomy the half-turn $z \mapsto -z + 2\cdot Dev(p_i)$, and the product over the $r$ poles is the holonomy of $\partial\Omega$. Developing $\partial\Omega$ from a corner $z_0$ runs along segments of direction $d$ and turns at the corners, so it preserves $\Im(\bar{d}z)$. If $r$ is even, the product is a translation by $2\Sigma \pm Dev(p_i)$, so $\Sigma \pm2\Im(\bar{d}\cdot Dev(p_i)) = 0$. If $r$ is odd, it is $z \mapsto -z + 2\Sigma \pm Dev(p_i)$, and $\Sigma \pm2\Im(\bar{d}\cdot Dev(p_i)) = 2\Im(\bar{d}\cdot Dev(z_0))$, with $z_0$ a zero. Now, with $g(z) = \varepsilon z + b$, \begin{gather*} 2\Im(\bar{d}\cdot g(R)) = (-iL)(\bar{d}\varepsilon - d\bar{\varepsilon}) + 2\Im(\bar{d}b), \\ 2\Im(\bar{d}\cdot g(A)) = (-iL)(\bar{d}\varepsilon - d\bar{\varepsilon}) + (\bar{d}\varepsilon + d\bar{\varepsilon}) + 2\Im(\bar{d}b), \end{gather*} $2\Im(\bar{d}\cdot g(O)) = 2\Im(\bar{d}b)$, and $2\Im(\bar{d}b) = 2(-iL)(\bar{d}\beta - d\bar{\beta})$; the case $g(z) = \varepsilon\bar{z} + b$ is the same up to signs. Here $-iL = (u + 1)/(u - 1) = 1 + 2/(u - 1)$ with $u \coloneqq e^{2i\alpha} = w^P$, a root of unity of order $2Q$ or $Q$. If $Q$ is not a power of $2$, the norm of $1 - u$ is $\Phi_{\operatorname{ord} u}(1)$, which is odd, so $1 - u$ is a unit of $\mathbb{Z}[\zeta]_{(2)}$ (odd denominators allowed) and $-iL \equiv 1 \pmod{2}$ there. If $Q = 2^k$, then $P$ is odd, $(1 - u) = (1 - w)$, and $(-iL)y \equiv y \pmod{2}$ for every $y \in (1 - w)\mathbb{Z}[\zeta]_{(2)}$; both $\bar{d}\varepsilon - d\bar{\varepsilon} = \bar{d}\varepsilon(1 - d^2\bar{\varepsilon}^2)$ and $\bar{d}\beta - d\bar{\beta} = \bar{d}((\beta - \bar{\beta}) + (1 - d^2)\bar{\beta})$ lie in that ideal, since $d^2 = w^a$, $\varepsilon^2 \in \langle w\rangle$ and $\beta - \bar{\beta} \in (1 - w)$ (as $w \equiv \bar{w} \equiv 1$ modulo $1 - w$). In either case, modulo $2$, $2\Im(\bar{d}\cdot g(R)) \equiv \kappa(p)$, $2\Im(\bar{d}\cdot g(O)) \equiv 0$ and $2\Im(\bar{d}\cdot g(A)) \equiv 2\bar{d}\varepsilon \equiv 0$, and the signs are invisible. Since $\mathbb{Z}[\zeta]_{(2)}/2 = \mathbb{Z}[\zeta]/2$, this is (3). \end{proof} So \textbf{the poles of a minimal component form a nonzero relation among the classes $\kappa_t$.} We say a pole \textbf{reaches} $\operatorname{Fix}(\iota)$ if its separatrix meets $\operatorname{Fix}(\iota)$; by part 2, such a pole lies in no minimal component. \subsection{The criterion}\label{sec:7.2} For $n \geq 0$ let $D_n \in \mathbb{Z}[y]$ be the Dickson polynomial with $D_n(\xi + \xi^{-1}) = \xi^n + \xi^{-n}$. It is monic of degree $n$, $D_n(0) = 2\cos(n\pi/2)$ is even, and $D_n(-y) = (-1)^n D_n(y)$. \begin{lemma}\label{lem:7-2} Let $N \geq 3$ not be a power of $2$, $\xi$ a primitive $N$-th root of unity, and $U \subset \mathbb{Z}_{\geq1}$ finite and non-empty with $\sum_{n\in U} (\xi^n + \xi^{-n}) \in 2\mathbb{Z}[\xi]$. Then (a) $\max U \geq \varphi(N)/2 + 1$; (b) if moreover $4 \nmid N$ and every $n \in U$ is odd, then $\max U \geq \varphi(N) + 1$. \end{lemma} Part (a) is equivalent to Dresden's theorem \cite{Dre04} that the middle coefficient of $\Phi_N$ is odd. With $m \coloneqq \max U$, the polynomial $X^m \sum_U (X^n + X^{-n})$ is palindromic of degree $2m$ with middle coefficient $0$, and a relation says that $\Phi_N$ divides it modulo $2$; so $2m \geq \varphi(N)$, with equality only if it is $\Phi_N$ modulo $2$, whose middle coefficient is odd. We give the proof in the form we use. \begin{proof} Put $z \coloneqq \xi + \xi^{-1}$. Since $\xi^2 - z\xi + 1 = 0$ and $[\mathbb{Q}(\xi) : \mathbb{Q}(z)] = 2$, the ring $\mathbb{Z}[\xi]$ is free over $\mathbb{Z}[z]$ on $\{1, \xi\}$, so $\mathbb{Z}[z] \cap 2\mathbb{Z}[\xi] = 2\mathbb{Z}[z]$. Also $\mathbb{Z}[z] = \mathbb{Z}[y]/(\psi)$, where $\psi$ is the minimal polynomial of $z$, monic of degree $\varphi(N)/2$. So $g \coloneqq \sum_{n\in U} D_n$ satisfies $\bar{\psi} | \bar{g}$ in $\mathbb{F}_2[y]$. Here $\bar{g} \neq 0$, since its terms have distinct degrees and are monic, $\deg \bar{g} = \max U$, and $y | \bar{g}$ because every $D_n(0)$ is even. \emph{$\bar{\psi}(0) = 1$.} Up to sign, $\psi(0)$ is the norm of $z$ from $\mathbb{Q}(z)$, and the norm of $z$ from $\mathbb{Q}(\xi)$ is $\pm N(1 + \xi^2)$, which is $\equiv N(1 - \xi^2) \pmod{2}$, conjugate by conjugate (and $2\mathbb{Z}[\xi] \cap \mathbb{Z} = 2\mathbb{Z}$). The root of unity $\xi^2$ has order $N/\gcd(N, 2)$, which is not a power of $2$, so $N(1 - \xi^2)$ is $1$ or a power of an odd prime, and is odd. Hence $y \bar{\psi} | \bar{g}$ with $\bar{\psi}$ prime to $y$, and $\max U = \deg \bar{g} \geq \varphi(N)/2 + 1$. This is (a). \emph{(b).} If $4 \nmid N$, then $\Phi_N$ is separable modulo $2$, because $\Phi_{2m}(X) = \Phi_m(-X)$ for odd $m$. So $\mathbb{Z}[\xi]/2$ is reduced, hence so is its subring $\mathbb{Z}[z]/2 = \mathbb{F}_2[y]/(\bar{\psi})$, and $\bar{\psi}$ is squarefree. If every $n \in U$ is odd, each $D_n$ is odd, so $\bar{g} \in y\mathbb{F}_2[y^2] = y\cdot\mathbb{F}_2[y]^2$ by Frobenius: $\bar{g} = yH^2$. Every irreducible factor of $\bar{\psi}$ divides $H^2$, hence $H$, and these factors are distinct and prime to $y$. So $\bar{\psi} | H$, $\deg H \geq \varphi(N)/2$, and $\max U = 2 \deg H + 1 \geq \varphi(N) + 1$. \end{proof} In the language of codes: the classes $\kappa_t$ lie in the $h$-dimensional algebra $\mathbb{F}_2[z]/(\bar{\psi})$, a relation is a multiple of $\bar{\psi}$, and Lemma~\ref{lem:7-2} says that a nonzero multiple of $\bar{\psi}$ with zero constant term has degree $> \deg \bar{\psi}$. That is a degree bound for the code, and the rest of the proof is putting it at both ends. For an arc $A$ set \[ L_A \coloneqq \min(|\mathcal{T}|, \max\{i \geq 0 : (2i - j_A)\sigma < Q\}), \] that is, $\lfloor Q/2\sigma\rfloor$ at a tie kite and $\lfloor(Q + \sigma)/2\sigma\rfloor$ at an interface, capped at $|\mathcal{T}|$. \begin{main5}[the code criterion] Let $P/Q$ be a centre with $Q \geq 3$ not a power of $2$, and take either perpendicular class. (i) The $|\mathcal{T}|$ pole classes span $\min(h, |\mathcal{T}|)$ dimensions, and the relations among them form a space of dimension $\max(d_T, 0)$. Every nonzero relation has a pole among the $d_T$ positions nearest each end of $D$, and the classes of the positions off either such window form a basis. (ii) At an arc $A$, the poles joined to $A$ by interface measures increasing strictly toward $A$ are exactly the $L_A$ positions nearest $A$, and none of them lies in a minimal component. (iii) Hence the class is completely periodic if $d_T \leq 0$, or if $L_A \geq d_T$ at some arc $A$, or, more generally, if the classes of the positions outside every run are independent. At a single arc the test is sharp: $L_A \geq d_T$ if and only if the classes off $A$'s run are independent. \end{main5} \begin{proof} \textbf{(i)} Theorem~\ref{thm:the-shape-of-a-minimal} (3) gives a relation modulo $2\mathbb{Z}[\zeta]$, and Lemma~\ref{lem:7-2} needs it modulo $2\mathbb{Z}[\xi]$ for a smaller cyclotomic ring. The descent is free: $\mathbb{Z}[\zeta]$ is free over $\mathbb{Z}[w]$ on $\{1, \zeta\}$, so $2\mathbb{Z}[\zeta] \cap \mathbb{Z}[w] = 2\mathbb{Z}[w]$, and likewise from $\mathbb{Z}[w]$ down to $\mathbb{Z}[\xi]$ whenever $\xi$ generates the ring the classes live in. We treat the ends one at a time. In each case the classes counted from that end are Dickson values at a primitive root, up to a unit, and Lemma~\ref{lem:7-2} puts every relation within $d_T$ of the \emph{opposite} end. \begin{itemize} \tightlist \item \emph{$\epar = 0$, counted from the tie kite $0$ (every $Q$).} $\kappa_t = w^{Pt} + w^{-Pt} = D_t(\xi + \xi^{-1})$ with $\xi \coloneqq w^P$, of order $N = 2Q/\gcd(P, 2)$. In both cases $\varphi(N)/2 = h$. Lemma~\ref{lem:7-2} (a) gives $\max U \geq h + 1$, so every relation meets the $d_T$ positions nearest the far end. \item \emph{$\epar = 0$, $Q$ odd, counted from $I_M$.} Put $k \coloneqq M - t$. Modulo $2$, $\mathbb{Z}[w] = \mathbb{Z}[\zeta_Q]$ up to signs and $\kappa_t \equiv \zeta_Q^{bt} + \zeta_Q^{-bt}$ with $b = P(Q + 1)/2$ a unit modulo $Q$. Since $bM \equiv -b/2$, we get $bt \equiv -(b/2)(2k + 1)$, so $\kappa_t \equiv D_{2k+1}(\xi' + \xi'^{-1})$ with $\xi' = \zeta_Q^{b/2}$ of odd order $Q$. Lemma~\ref{lem:7-2} (b) gives $\max(2k + 1) \geq 2h + 1$, so $\min U \leq M - h = d_T$: every relation meets the window at the tie kite. \item \emph{$\epar = 0$, $Q$ even, counted from the tie kite $Q/2$.} With $k \coloneqq Q/2 - t$, $w^{Pt} = i^P w^{-Pk}$ and $i^{-P} = -i^P$, so $\kappa_t \equiv i^P(\xi^k + \xi^{-k})$. This is a unit times the classes counted from the tie kite $0$, and the first case gives the window at the tie kite $0$. \item \emph{$\epar = 1$, $Q$ even, counted from $J'$.} Here $e_t = P(2t - 1)$, with $J$'s kite at $t = Q/2$, so $\kappa_t = D_{2t-1}(\xi + \xi^{-1})$ with $\xi \coloneqq \zeta^P$ of order $4Q$ and $\varphi(4Q)/2 = 2h$. Lemma~\ref{lem:7-2} (a) gives $2 \max U - 1 \geq 2h + 1$: the window at $J$. \item \emph{$\epar = 1$, $Q$ even, counted from $J$.} With $k \coloneqq Q/2 - t$, $\zeta^{P(2t-1)} = i^P \zeta^{-P(2k+1)}$, so $\kappa_t \equiv i^P D_{2k+1}(\xi + \xi^{-1})$. Lemma~\ref{lem:7-2} (a) gives $\max(2k + 1) \geq 2h + 1$, so $\min U \leq Q/2 - h = d_T$: the window at $J'$. \end{itemize} \emph{The span.} On $\epar = 0$ the classes lie in $\mathbb{Z}[\xi + \xi^{-1}]$, free of rank $h$. On $\epar = 1$ the odd Dickson values lie in $z'\mathbb{Z}[z'^2] = z'\mathbb{Z}[w + w^{-1}]$, with $z' = \zeta + \zeta^{-1}$ and $z'^2 = w + w^{-1} + 2$, again free of rank $h$. So the classes span at most $h$ dimensions modulo $2$. The window bound makes the $h$ positions off any window independent. So the rank is $\min(h, |\mathcal{T}|)$ and the relation space has dimension $\max(d_T, 0)$. \textbf{(ii)} Moving away from $A$, the kite at distance $\delta$ has interfaces $\delta - 1$ and $\delta$, with measures $|\cos(j\sigma\pi/2Q)|$ as in \S\ref{sec:7.1}. Its pole runs to $A$ if and only if the measures decrease strictly over $0, \ldots, \delta$, that is, increase strictly toward $A$, that is, if and only if $\delta$ is at most the length of the initial strict descent of the sequence. That length is $\lfloor Q/2\sigma\rfloor$ at a tie kite and $\max\{i : (2i - 1)\sigma < Q\}$ at an interface. Equality, $2i\sigma = Q$ or $(2i - 1)\sigma = Q$, would need $\sigma = 1$ and lies past $|\mathcal{T}|$. The geometry is \cite{Neck}'s. Call the larger of a kite's two interfaces its \emph{far} interface and the smaller its \emph{near} one (\cite{Neck} Proposition 6.10). The separatrix of a pole leaves its kite through the far interface (\cite{Neck} Proposition 2.3). A kite entered through its near interface is crossed (\cite{Neck} \S 4 and Proposition 6.10), so while the measures decrease the separatrix crosses each kite toward $A$ without folding back. At $A$ it meets $\operatorname{Fix}(\iota)$. An interface of measure $1$ lies in $\operatorname{Fix}(\iota)$. In a tie kite the separatrix enters one of the two copies of $T$ through its hypotenuse copy and must leave that copy by another side; it cannot cross the horizontal leg copy, a leaf, so it reaches the vertical leg copy, which lies in $\operatorname{Fix}(\iota)$ (a corner it could reach instead is the tie kite's pole, which also lies on $\operatorname{Fix}(\iota)$, or a zero, where by \cite{Neck} Theorem 6.7 no separatrix of an interior pole ends). By Theorem~\ref{thm:the-shape-of-a-minimal} (2), no pole of the run lies in a minimal component. \textbf{(iii)} If the class is not completely periodic, it has a minimal component \cite[Theorem 11.1 and \S 11.2]{Str84}. By Theorem~\ref{thm:the-shape-of-a-minimal} its poles occupy a non-empty set of positions, none of them in any run by (ii), whose classes sum to $0$. That is a nonzero relation. If $d_T \leq 0$ there is none, by (i). If $L_A \geq d_T$, the run contains $A$'s window, which every relation meets, by (i). The general clause is its own hypothesis. \emph{Sharpness:} if $L_A < d_T$, then more than $h$ classes lie off the run, which exceeds the rank. \end{proof} The geometry of (ii) is the whole geometric input. The algebra of (i) is the whole algebraic input, and it depends on $Q$ and the class, and on $P$ only through a relabelling. The run length $L_A$ depends on $P$ only through $\sigma$, which is $Q - P$, $P$ or $\min(P, Q - P)$. So Theorem~5 turns complete periodicity of a perpendicular class into a comparison of two numbers. Every bound in (i) is $h + 1$, with $h = \varphi(2Q)/2$; the difference between odd and even $Q$ in the families below comes from the arithmetic of $\varphi(2Q)$, not from the lemma. Lemma~\ref{lem:7-2} (b), the doubling available exactly when $\mathbb{Z}[\xi]/2$ is reduced, is used only at the odd-$Q$ end $I_M$; at $J$ the same doubling comes for free from $N = 4Q$. \subsection{Instances}\label{sec:7.3} \emph{Each statement of this subsection up to Theorem~\ref{thm:the-paired-runs} is a case of Theorem~5, or of the argument behind it, with one choice of $Q$, class and arc. $Q = 2^k$ and the two runs of Theorem~\ref{thm:the-paired-runs} need a little more than the theorem as stated. Theorems~\ref{thm:the-ladder} and \ref{thm:the-paired-class-of-the} use no part of Theorem~5's code: they follow each separatrix past the run and conclude by Theorem~\ref{thm:the-shape-of-a-minimal} (2) directly (Appendix B).} \begin{proposition}[powers of two]\label{prop:powers-of-two} Let $Q = 2^k$ with $k \geq 2$, and $P$ odd. Both perpendicular classes of $P/Q$ are completely periodic. \end{proposition} \begin{proof} Theorem~5 excludes $Q = 2^k$, where Lemma~\ref{lem:7-2} fails, and a direct argument is shorter. Suppose a class is not completely periodic, and let $\Omega$ be a minimal component, with poles at distinct positions $t_1, \ldots, t_r$, $r \geq 2$ (Theorem~\ref{thm:the-shape-of-a-minimal}). \emph{The class $\epar = 0$.} Here $\mathbb{Z}[w]/2 = \mathbb{F}_2[X]/\Phi_{2Q}$ and $\Phi_{2Q}(X) = X^Q + 1$, so $\mathbb{Z}[w]/2$ is the group algebra $\mathbb{F}_2[\mathbb{Z}/Q]$. The positions are $1, \ldots, Q/2 - 1$, the two tie kites being $0$ and $Q/2$, and $\kappa_t = X^{Pt} + X^{-Pt}$. The $2r$ exponents $\pm Pt_i$ are distinct residues modulo $Q$, none $0$ or $Q/2$, because $P$ is a unit and the $t_i$ are distinct in $[1, Q/2 - 1]$. So $\sum_i \kappa_{t_i}$ is a sum of $2r$ distinct group elements, which is not $0$. \emph{The class $\epar = 1$.} The interface $J$ has measure $1$, larger than every other interface, so it is the far interface of the kite next to it, whose pole therefore reaches $J \subset \operatorname{Fix}(\iota)$ (\cite{Neck} Proposition 2.3) and lies in no minimal component. The other positions are $t \in [1, Q/2 - 1]$ with $e_t = P(2t - 1)$. After the automorphism $X \mapsto X^{P^{-1}}$ of $\mathbb{F}_2[X]/\Phi_{4Q}$, which exists because $P$ is a unit modulo $4Q$, the classes are $X^{2t-1} + X^{1-2t}$, so $\sum_i \kappa_{t_i} = X\cdot G(X^2)$ with $G$ a sum of $2r$ distinct monomials $Y^s$, the $s$ distinct modulo $Q$. As $\mathbb{F}_2[X]$ is free over $\mathbb{F}_2[X^2]$ on $\{1, X\}$, $\Phi_{4Q}(X) = \Phi_{2Q}(X^2)$ divides $X\cdot G(X^2)$ only if $\Phi_{2Q}(Y) = Y^Q + 1$ divides $G(Y)$, that is, only if $G = 0$ in $\mathbb{F}_2[\mathbb{Z}/Q]$. That is impossible. \end{proof} \begin{corollary}[prime and twice-prime denominators]\label{cor:prime-and-twice-prime-denominators} (a) At an odd prime $Q$, both perpendicular classes of every centre are completely periodic. (b) At $Q = 2p$, $p$ an odd prime, both perpendicular classes of every centre are completely periodic. \end{corollary} \begin{proof} (a) is the case $d_T = 0$ of Theorem~5: $|\mathcal{T}| = (Q - 1)/2 = \varphi(Q)/2 = h$. (b) On the class $\epar = 0$, $|\mathcal{T}| = p - 1 = \varphi(2p) = h$, so again $d_T = 0$. On the class $\epar = 1$, $|\mathcal{T}| = p$, so $d_T = 1$, and the end $J$ is an arc. Its run is never empty: $L_J \geq 1$, since $(2\cdot1 - 1)\sigma = \sigma < Q$. So $L_J \geq d_T$. \end{proof} At an odd prime $Q$ no geometry is used beyond Theorem~\ref{thm:the-shape-of-a-minimal}. The classes $X^t + X^{-t}$, $1 \leq t \leq (Q - 1)/2$, are a basis of the real subalgebra of $\mathbb{F}_2[X]/\Phi_Q$, because the primitive $Q$-th roots of unity are a normal basis. So a minimal component would be a nonzero word of the zero code. At $Q = 2p$ the run on $\epar = 1$ is load-bearing: without it, all $p$ classes of $D$ carry exactly one relation, namely the full set. These are the instances that \S\ref{sec:5.5} uses at the $\pm2$ centres of $2p$. At odd $Q$, $\Phi_{2Q}(X) = \Phi_Q(-X) \equiv \Phi_Q(X) \pmod{2}$, so $\mathbb{Z}[w]/2 = \mathbb{F}_2[X]/\Phi_Q$ with $w \mapsto X$. On the class $\epar = 0$ the classes are $\kappa_t = X^{Pt} + X^{-Pt}$, exponents read modulo $Q$, and $M = |\mathcal{T}|$, $h = \varphi(Q)/2$, $d_T = (Q - 1 - \varphi(Q))/2$. \begin{corollary}[the head of the leg class]\label{cor:the-head-of-the-leg} Let $Q$ be odd, $P$ even, $s \coloneqq Q - P$, and take the class $\epar = 0$, the class perpendicular to $L_1$ (the leg-beam class of \cite{Orph}). If $\lfloor Q/2s\rfloor \geq d_T$, equivalently $2\lfloor Q/2s\rfloor \geq Q - 1 - \varphi(Q)$, the class is completely periodic. \end{corollary} \begin{proof} At even $P$ the end $I_M$ is not an arc, and the tie kite has $\sigma = s$, so $L = \min(M, \lfloor Q/2s\rfloor)$. Theorem~5 (iii). \end{proof} This holds for instance at $Q = p^a$, $a \geq 2$, for every odd $s \leq p - 2$, where $d_T = (p^{a-1} - 1)/2$. It also holds at $s = 3$, $Q = pq$ with $5 \leq p < q$ primes. \begin{corollary}[the tail of the paired class]\label{cor:the-tail-of-the-paired} Let $Q$ be odd, $P$ odd, and take the class $\epar = 0$. With $\sigma \coloneqq \min(P, Q - P)$, the poles at the $L_{I_M} \coloneqq \min(M, \lfloor(Q + \sigma)/2\sigma\rfloor)$ positions nearest $I_M$ reach $\operatorname{Fix}(\iota)$, and the class is completely periodic if $L_{I_M} \geq d_T$. \end{corollary} \begin{proof} At odd $P$ the interface $I_M$ has measure $1$ and is an arc. Theorem~5 (ii)--(iii). \end{proof} At $2P < Q$ the tail is $\lfloor Q/2P\rfloor$, plus $1$ when $Q \bmod 2P > P$. The condition $L_{I_M} \geq d_T$ says that every pole of a minimal component lies in $[1, h]$, where the classes are independent by Theorem~5 (i). \begin{corollary}[the even head]\label{cor:the-even-head} Let $Q$ be even and not a power of $2$, $P$ odd, $s \coloneqq \min(P, Q - P)$ and $d \coloneqq Q/2 - 1 - \varphi(Q)$. The class $\epar = 0$ is completely periodic if $2sd \leq Q$, and the class $\epar = 1$ if $(2d + 1)s \leq Q$. \end{corollary} \begin{proof} On $\epar = 0$ both ends are tie kites, with $\sigma = Q - P$ and $\sigma = P$, so the longer run is $\lfloor Q/2s\rfloor$, and $d_T = d$. Then $\lfloor Q/2s\rfloor \geq d$ if and only if $2sd \leq Q$. On $\epar = 1$ the arc $J$ has $\sigma = s$, $L_J = \lfloor(Q + s)/2s\rfloor$, and $d_T = d + 1$. Then $L_J \geq d + 1$ if and only if $Q + s \geq 2s(d + 1)$, that is, $(2d + 1)s \leq Q$. Theorem~5 (iii). \end{proof} At $Q = 4p$ we have $d = 1$. So the class $\epar = 0$ is completely periodic at every $P$, and the class $\epar = 1$ whenever $s \leq Q/3$, that is, whenever the smaller acute angle is less than $\pi/6$. These are the instances that \S\ref{sec:5.5} uses at $4p$. \begin{corollary}[the numerator three]\label{cor:the-numerator-three} Let $P = 3$, $3 \nmid Q$, and let $Q$ have at most two odd prime factors. Then the class $\epar = 0$ of $3/Q$ is completely periodic, and $n(3/Q) = 2\cdot\text{round}(Q/3) - 1$ (\cite{Neck} Corollary 10.8, whose equality case is complete periodicity). \end{corollary} \begin{proof} Put $t_* \coloneqq \lfloor Q/3\rfloor$. At odd $Q$ the run at $I_M$ is exactly the positions $t_* < t \leq M$ ($L_{I_M} = \lfloor(Q + 3)/6\rfloor = M - t_*$), so Corollary~\ref{cor:the-tail-of-the-paired} reads $2t_* \leq \varphi(Q)$; at even $Q$, Corollary~\ref{cor:the-even-head} on $\epar = 0$ reads $\varphi(Q) \geq t_*$. Both hold, since $\varphi(2Q) \geq (4/5)(6/7)\cdot Q > 2Q/3$ when $Q$ has at most two odd prime factors and $3 \nmid Q$. \end{proof} The centres of Corollary~\ref{cor:the-numerator-three} include the $\pm2$ centres $P = 3$, $5 | Q$, with a second odd prime, which neither Theorem~2 nor Theorem~3 reaches. (The run at $I_M$ is the far beam of \cite{Neck} Theorem 10.7.) The odd form of the condition fails first at $Q = 385 = 5\cdot7\cdot11$, the even form at $Q = 770$. Where it fails, at $Q = 385, 455, 595, 665, 770, 805, 910$ below $1000$, relations exist inside the window and the test is silent; at $Q = 385$ the class is completely periodic by an exact computation, with $n = 255$. On the paired class at odd $Q$ and odd $P$ both ends are arcs, and both runs can be non-empty. The general clause of Theorem~5 (iii) then asks whether the classes in the window between them are independent. The Galois group answers it. \begin{lemma}[multipliers]\label{lem:multipliers} Let $Q$ be odd and $c$ a unit modulo $Q$, and put $\text{fold}(y) \coloneqq \min(y \bmod Q, -y \bmod Q)$. If $\sum_{t\in U} \kappa_t = 0$ in $\mathbb{F}_2[X]/\Phi_Q$, then $\sum_{t\in U} \kappa_{fold(ct)} = 0$, and $t \mapsto\text{ fold}(ct)$ is a permutation of $[1, M]$. Hence the classes of a set $W \subseteq [1, M]$ carry a relation only if, for every unit $c$, the set $\text{fold}(cW)$ meets both $[1, d_T]$ and $[M - d_T + 1, M]$. \end{lemma} \begin{proof} $\Phi_Q(X)$ divides $\Phi_Q(X^c)$ in $\mathbb{Z}[X]$, since $\xi^c$ is a primitive $Q$-th root of unity whenever $\xi$ is. So $X \mapsto X^c$ is a ring endomorphism of $\mathbb{F}_2[X]/\Phi_Q$, and it is an automorphism, with inverse $X \mapsto X^{c'}$ for $cc' \equiv 1$, because $\Phi_Q | X^Q - 1$. It sends $\kappa_t$ to $X^{cPt} + X^{-cPt} = \kappa_{fold(ct)}$. The last clause is Theorem~5 (i) applied to the image. \end{proof} \begin{theorem}[the paired runs]\label{thm:the-paired-runs} Let $Q$ be odd and composite, $P$ odd, $s \coloneqq Q - P$, and on the class $\epar = 0$ let $b \coloneqq \lfloor Q/2s\rfloor$ and $L \coloneqq L_{I_M}$ be the runs at the tie kite and at $I_M$, and $W \coloneqq [b + 1, M - L]$ the window between them. The classes of $W$ are independent if and only if $b + L \geq d_T$. At $2P > Q$, $b + L = \lfloor Q/s\rfloor$. Hence the paired class is completely periodic whenever $\lfloor Q/(Q - P)\rfloor \geq d_T$ ($2P > Q$) or $L_{I_M} \geq d_T$ ($2P < Q$). \end{theorem} \begin{proof} \emph{Only if.} If $b + L < d_T$, then $|W| = M - b - L > M - d_T = h$, which exceeds the rank. \emph{If, at $2P > Q$.} Here $\sigma = s$, which is even and at least $2$, so $L = \lfloor(Q + s)/2s\rfloor$ with the cap inactive. Put $y \coloneqq Q/2s$. Then $b = \lfloor y\rfloor$ and $L = \lfloor y + 1/2\rfloor$, so $L \in \{b, b + 1\}$ and $b + L = \lfloor2y\rfloor = \lfloor Q/s\rfloor$ by Hermite's identity. Take $c = 2$. For $t \in W$, $\text{fold}(2t) = 2t \geq 2b + 2$ if $2t \leq M$, and otherwise $\text{fold}(2t) = Q - 2t \geq Q - 2(M - L) = 2L + 1$. Both bounds are at least $b + L + 1 \geq d_T + 1$, because $b \leq L \leq b + 1$. So $\text{fold}(2W) \subseteq [d_T + 1, M]$ misses the window at the tie kite, and Lemma~\ref{lem:multipliers} leaves no relation on $W$. \emph{If, at $2P < Q$.} Here $2s > Q$, so $b = 0$ and $W = [1, M - L]$, which lies in $[1, h]$ exactly when $L \geq d_T$. Those classes are independent by Theorem~5 (i). Complete periodicity follows by Theorem~5 (iii). \end{proof} The multiplier $c = 2$ is the whole reason the two runs add: doubling folds the middle window past the window at the tie kite. This is a statement about the test. Complete periodicity can hold where it fails, and it does at $7/15$, $13/21$ and $5/21$, among others, each certified by an exact flow decomposition. \begin{figure}[t] \centering \includegraphics[width=\linewidth]{fig1.pdf} \caption{Theorem~5 on the paired class at $Q = 21$ ($d_T = 4$), the positions of $D$ drawn in a row from the tie kite to $I_M$. Green: the runs, $b = \lfloor Q/2s\rfloor$ at the tie kite and $L = \lfloor(Q + s)/2s\rfloor$ at $I_M$, $s = Q - P$ (Theorem~\ref{thm:the-paired-runs}). Boxes: the windows of width $d_T$ at the two ends, each met by every nonzero relation (Theorem~5 (i)). (a) $P = 17$: $b + L = 5 \geq d_T$, and the class is completely periodic. (b) $P = 13$: $b + L = 2$, and the relation $\{2, 5, 9\}$, computed exactly, avoids both runs, so the test is silent; $13/21$ is completely periodic all the same. Schematic layout; the runs and the relation are computed.}\label{fig:1} \end{figure} \emph{Beyond a monotone run.} Some instances need more poles certified than a monotone run provides, by following separatrices further. The ladder $4/Q$ is the one we prove at every rung. \begin{theorem}[the $(4, 3)$ ladder]\label{thm:the-ladder} Let $m \geq 1$, $P = 4$, $Q = 4m + 3$. Then the separatrix of every interior pole of $D$ in the class perpendicular to $L_1$ reaches $L_1$ head-on and retraces, and that class is completely periodic. \end{theorem} \begin{theorem}[the paired class of the ladder]\label{thm:the-paired-class-of-the} Let $P = 4$, and let $Q = 4m + 3$ with $m \geq 1$ or $Q = 4m + 1$ with $m \geq 2$. Then the separatrix of every interior pole of $D$ in the class $\epar = 1$ meets $L_2$ or $H$ head-on, and that class is completely periodic. In particular both perpendicular classes of $4/(4m + 3)$ are completely periodic. \end{theorem} The proofs follow each separatrix through an explicit staircase of kites, and the two smallest rungs, and fourteen inequalities below $m = 3000$, use interval arithmetic; they are in Appendix B. Theorem~2 already gives Theorem~\ref{thm:the-ladder}'s conclusion when $3 \nmid Q$ ($P \pm 2 = 6, 2$), and Theorem~3 when $Q$ is a prime power; what the ladder adds is the rungs with $3 | Q$ and a second odd prime. On the ladder $4/(4m + 1)$ the separatrices of the class perpendicular to $L_1$ ride the same kind of staircase but are reflected at the bottom, and the method does not transfer. \begin{remark}[what is not touched]\label{rem:what-is-not-touched} Two ranges are out of reach of the runs. The first is the leg class at small even $P$, where $s = Q - P$ is large, the head is empty and there is no tail. The second is the middle numerators at composite $Q$, where $\lfloor Q/s\rfloor \geq d_T$ needs $s \leq 2Q/(Q - 1 - \varphi(Q))$. In both the runs are short at both ends, relations exist that avoid them, and Theorem~5 says nothing. New input there must be geometric: more poles certified, by following separatrices further than a monotone run, as for the ladder. \end{remark} \subsection{Two criteria on one linear problem}\label{sec:7.4} The code criterion and the existence theorem of \cite{Orph} read the same data. In both, a simple pole of the folded surface whose kite has axis $j$ carries the class $w^j + w^{-j}$ in $\mathbb{Z}[w]/2$, the reduction modulo $2$ of the doubled height of an image of $R$. If there is no orphan, the leg is tiled by fans about poles, and their doubled heights satisfy an \emph{inhomogeneous} identity, $\sum_{j\in\mathcal{J}} (w^j + w^{-j}) \equiv 1$, when $P$ is odd and $Q$ is not a power of $2$ (\cite{Orph} Lemmas 4.10 and 4.15). A minimal component gives the \emph{homogeneous} identity of Theorem~\ref{thm:the-shape-of-a-minimal} (3). \begin{remark}[one run-step apart]\label{rem:one-run-step-apart} Let $\kappa : \mathcal{T} \to V$ be the classes, $\dim V = h$, and $W \subseteq \mathcal{T}$ the positions the forced runs leave free. Complete periodicity is certified exactly when $\sum_U \kappa = 0$ has no nonzero solution $U \subseteq W$, that is, when $\kappa(W)$ is independent. On the class where both questions are asked (the paired class at odd $Q$ and odd $P$, and the class $\epar = 0$ at even $Q$; $Q$ not a power of $2$), \cite{Orph} Theorem 4.18 and its converse, Proposition~4.19, say that the forced landings alone prove the orphan exists exactly when an inhomogeneous system $\sum_{S'} \kappa = r$ has no solution, that is, when $r \notin\text{ span }\kappa(W)$; the constant $1$ of the fan identity acts as one extra position. In the notation of \cite{Orph} \S 4.5, $Y$ is the set of cells forced onto the leg and $X$ the set of $\ell$ cells forced onto the far wall, and the run lengths agree as closed forms: at odd $Q$ and $P > Q/2$, \cite{Orph} Theorem 4.18 (a) reads $\lfloor Q/s\rfloor = b + \ell$, which is $b + L$ (Theorem~\ref{thm:the-paired-runs}); at $P < Q/2$ its (b) reads $\min(M, \lfloor(Q + P)/2P\rfloor) = L_{I_M}$; at even $Q$ its (c) reads $\min(M, \lfloor Q/2\sigma\rfloor)$, our run at the tie kite ($\sigma = \min(P, Q - P)$ and $d$ as in Corollary~\ref{cor:the-even-head}; $M$ is \cite{Orph}'s cap). So: \begin{center} \begin{tabular}{@{}>{\raggedright\arraybackslash}p{0.19\linewidth}>{\raggedright\arraybackslash}p{0.42\linewidth}>{\raggedright\arraybackslash}p{0.32\linewidth}@{}} \toprule class & complete periodicity certified (Theorem~5) & orphan forced (\cite{Orph} Theorem 4.18) \\ \midrule paired, odd $Q$ & $b + L \geq d_T$ & $b + L \geq d_T + 1$ \\ $\epar = 0$, even $Q$ & $\lfloor Q/2\sigma\rfloor \geq d$ & $\lfloor Q/2\sigma\rfloor \geq d + 1$ \\ \bottomrule \end{tabular} \end{center} Both tests are sharp as tests. In the square case, $|W| = h$ with $\kappa(W)$ a basis, complete periodicity is certified and existence is not decided by the forced landings. \end{remark} So the forced landings decide both questions, and decide complete periodicity one step sooner. The orphan question of \cite{Orph} and the complete-periodicity question of \cite{Neck} are the inhomogeneous and the homogeneous halves of one linear problem over $\mathbb{F}_2$; the first is answered by \cite{Orph} Theorem 4.18, the second by Theorem~5. \begin{corollary}[the conditional theory of \cite{Neck} on certified classes]\label{cor:the-conditional-theory-of-neck-b-b} At every centre whose two perpendicular classes are certified, between them, by Theorem~5, Proposition~\ref{prop:powers-of-two}, Corollaries~\ref{cor:prime-and-twice-prime-denominators}--\ref{cor:the-even-head} and Theorems~\ref{thm:the-paired-runs}--\ref{thm:the-paired-class-of-the}, and at which the orphan exists at each odd one of $P/Q$, $(Q - P)/Q$ (by Theorem~1 (3); by \cite{Orph} Theorem 4.11, Theorem~4.18, Corollary~4.20 or Theorem~4.24; or by \cite{Neck} Theorem 10.3 ($P' = Q - 2$), Corollary~10.9 ($P' = 3$) or Theorem~10.11 ($P' = 5$, $Q \equiv 1 \pmod{5}$, $Q \geq 16$), with $P'$ as in \S\ref{sec:1.7}), every statement of \cite{Neck} whose only hypotheses are among complete periodicity, $p = 0$, (ZZ) and (OB) holds outright, in the range it is stated for. \end{corollary} \begin{proof} As for Corollary~\ref{cor:the-conditional-theory-of-neck}. The orphan of the hypothesis is (OB) (\S\ref{sec:1.7}), which \cite{Neck} Corollary 7.11 needs on the classes with two perpendicular beams; with it, complete periodicity gives $p = 0$ by that corollary, and (ZZ) follows. \end{proof} \subsection{The limits of the code criterion}\label{sec:7.5} We state the limits as remarks, because each is a theorem about the method and says where new ideas are needed. \begin{remark}[why the prime is $2$]\label{rem:why-the-prime-is} The method reduces a characteristic-$0$ identity modulo $2$, and no other reduction would carry information. There are two reasons, one about symmetry and one about arithmetic. Symmetry. The method uses two symmetries of the class foliation: the half-turn $-1$ (with $B = S_{\alpha}/\langle-1\rangle$) and the reflection $\iota$ (with $D = B/\iota$). Both lie in the stabiliser of a line field in $O(2)$, which is the Klein group $\{\pm1,\text{ the two reflections}\}$, of exponent $2$. They preserve the foliation, which is why their fixed points are poles, the one-prong singularities whose loops give the relation of Theorem~\ref{thm:the-shape-of-a-minimal} (3). A rotation of odd order $n$ in the dihedral group of a rational table carries the foliation in direction $\varphi$ to the one in direction $\varphi + 2\pi/n$. So the quotient by it carries no foliation, its cone points are regular points of the flow, and there are no prongs and no relation. Arithmetic. Before reduction, the proof of Theorem~\ref{thm:the-shape-of-a-minimal} (3) (on the class $\epar = 0$) is the identity $\sum_i s_i(-iL)(\varepsilon_i - \bar{\varepsilon}_i) = 2(-iL)(\sum_i s_i(\beta_i - \bar{\beta}_i) + c_0)$, with signs $s_i$, translation parts $\beta_i \in \mathbb{Z}[w]$ and a corner term $c_0$. The translations of a reflection group are twice its mirror distances, which is where the $2$ comes from. Put $\mathcal{A} \coloneqq \{\beta - \bar{\beta} : \beta \in \mathbb{Z}[w]\}$, as in \cite{Orph} Remark 4.13; modulo $2$ it is the real subring, of dimension $\varphi(2Q)/2$. With the $\beta_i$ unknown they range over a lattice which is all of $\mathbb{Z}[w]$ once $Q \neq 2^k$ (Remark~\ref{rem:no-adic-refinement-on-the}), so the right side ranges over all of $2(-iL)\mathcal{A}$. The identity is then equivalent to $\sum_i \kappa(p_i) = 0$ in $\mathcal{A}/2\mathcal{A}$. Modulo an odd prime of $\mathcal{A}$ not dividing $2Q$ its content is $0$, because $2$ is a unit there. \end{remark} \begin{remark}[no $2$-adic refinement on the pole classes]\label{rem:no-adic-refinement-on-the} One could hope to keep more of the identity by reducing modulo $4$. Modulo $2$ the proof discards two unknowns, the signs and the translation parts, and both enter at order $2$. So modulo $4$ the identity holds only up to $2\cdot\operatorname{tr}(\Lambda)$, where $\Lambda \subseteq \mathbb{Z}[w]$ is the lattice of translation parts over $2L$. That lattice is a $\mathbb{Z}[w]$-module containing $1 - w$, the translation part of a product of two half-turns. So it is all of $\mathbb{Z}[w]$ as soon as $1 - w$ is a unit, which is when $Q$ is not a power of $2$. Its traces $\beta + \bar{\beta}$ are spanned by $2$ and the $w^k + w^{-k} = D_k(z)$, $z = w + w^{-1}$, which reduce modulo $2$ to multiples of $z$. So modulo $2$ they fill the ideal $(z)$ of the real subring, and that ideal is everything, because $z$ is a unit modulo $2$ ($\bar{\psi}(0) = 1$ in the proof of Lemma~\ref{lem:7-2}). So the unknown translation parts fill $2\mathbb{Z}[w]^+$ modulo $4$, and the identity modulo $4$ says nothing beyond the identity modulo $2$. What would add information is new data, each pole's translation class $\beta_i \pmod{2}$ and the order in which its half-turn loops compose. That data is a property of the flow, close to tracing it. It is not a better ring. \end{remark} \begin{remark}[odd primes enter only through an inhomogeneous constant]\label{rem:odd-primes-enter-only-through} \cite{Orph} Theorem 4.11 proves existence of the orphan at every prime-power $Q = p^a$ and odd $P$ by working at the prime $\mathfrak{P}$ of $\mathbb{Z}[w]$ over $p$. Every doubled fan height lies in $(-iL)\mathcal{A} \subseteq \mathfrak{P}$, and the constant $1$ of the fan identity does not. The homogeneous relation of Theorem~\ref{thm:the-shape-of-a-minimal} (3) has no constant, and every one of its terms already lies in $(-iL)\mathcal{A}$, so modulo $\mathfrak{P}$ it is automatically satisfied. So the $\mathfrak{P}$-adic argument gives no complete-periodicity theorem at prime powers; complete periodicity at odd prime $Q$ comes from the prime $2$ instead (Corollary~\ref{cor:prime-and-twice-prime-denominators}). When $Q$ has two distinct prime factors, $1 \in (-iL)\mathcal{A}$, and the existence argument stops as well (\cite{Orph} Remark 4.13). The odd primes are reachable by this route only through an inhomogeneous term, and only one prime at a time. (The arrival method of \S\S\ref{sec:3}--\ref{sec:5} reaches them differently, through the Galois action on $\mathbb{Q}(\zeta_{4Q})$ rather than through a reduction.) \end{remark} \begin{remark}[McMullen's flux]\label{rem:mcmullen-s-flux} The relation of Theorem~\ref{thm:the-shape-of-a-minimal} (3) and the vanishing of the Galois flux on a periodic interval exchange \cite[Theorem 2.1]{McM03} are both algebraic consequences of the absence, or presence, of a minimal component. The flux is a characteristic-$0$, real-quadratic invariant, and it is blind on rational-triangle unfoldings (\S\ref{sec:1.5}). The relation of Theorem~\ref{thm:the-shape-of-a-minimal} (3) is a characteristic-$2$ analogue built from the half-turn holonomy, the datum of the half-translation structure that the Sah--Arnoux--Fathi invariant does not see. \end{remark} \begin{remark}[one odd prime, two odd primes, and the two methods]\label{rem:one-odd-prime-two-odd} When $Q = 2^k p^a$ has one odd prime, the code has a basis of disjoint congruence sets, the same for every $P$: for $n$ modulo $2Q/p$ of the parity of the class's exponents $e_t$, with $n \not\equiv 0, Q/p \pmod{2Q/p}$, the positions $t$ with $e_t \equiv \pm n \pmod{2Q/p}$ form a relation of $p$ poles, because $\Phi_{4Q}(X) \equiv \Phi_p(X^{2Q/p}) \pmod{2}$. A minimal component must then swallow whole sets, and complete periodicity is one landing per set. At two odd primes $p, q$ the congruence sets of the two primes still span the code, by de Bruijn's theorem {[}dB53, Theorem~1{]} reduced modulo $2$, but they overlap. At odd $Q = pq$ on the class $\epar = 0$ the relations are exactly the edge cuts of a graph $\Gamma$ with a root $o$, one vertex for each class $\pm c \pmod{q}$ and each class $\pm c' \pmod{p}$ ($c, c' \not\equiv 0$), in which position $t$ is the edge joining the class of $t \bmod q$ to that of $t \bmod p$ (a class $0$ read as $o$); complete periodicity is then the connectivity of the subgraph of the poles that reach $\operatorname{Fix}(\iota)$. With three or more odd primes we have no comparable description. The two methods are complementary rather than nested. The conjugate certificate of \S\ref{sec:4} is a residue condition and fails only at $P \equiv \pm2$; the chain arguments of \S\ref{sec:5} work there but need $Q \geq 8p$ at even $Q$; and the code criterion is positional and fails only in the middle of a composite $Q$. Each reaches centres the others do not: the code supplies the $\pm2$ centres of $2p$ and $4p$ that \S\ref{sec:5.5} needs, and the code, and for the ladder the separatrix tracing of \S\ref{sec:7.3}, supply the triangles of Corollary~\ref{cor:the-numerator-three} and Theorems~\ref{thm:the-ladder}--\ref{thm:the-paired-class-of-the} at two or more odd primes. \end{remark} \begin{remark}[the triangle $T_0$]\label{rem:the-triangle} At $T_0 = 8/15$, on the class perpendicular to $L_1$, $Q = 15$, $d_T = 3$, and the only arc is the tie kite, with run $\lfloor15/14\rfloor = 1 < 3$, so Theorem~5 says nothing; Proposition~\ref{prop:6-4} shows that it could not. By an exact trace of the seven separatrices, the minimal component holds the four poles at positions $\{2, 5, 6, 7\}$ of $D$, and the poles at $1, 3, 4$ reach $\operatorname{Fix}(\iota)$. They form a nonzero codeword, which meets both windows of width $d_T = 3$, $\{1, 2, 3\}$ and $\{5, 6, 7\}$, and misses the run $\{1\}$. In the graph $\Gamma$ of Remark~\ref{rem:one-odd-prime-two-odd} at $Q = 15$ the vertices are $o$, $[1]_5$, $[2]_5$, $[1]_3$; the poles that reach $\operatorname{Fix}(\iota)$, $1, 3, 4$, leave the two components $\{o, [2]_5\}$ and $\{[1]_5, [1]_3\}$, and the cut between them is $\{2, 5, 6, 7\}$. So the algebra of Theorem~5 (i) holds at $T_0$ with a nonzero codeword realised by a minimal component: the run hypothesis is what certifies complete periodicity, and it cannot be dropped. \end{remark} \begin{figure}[t] \centering \includegraphics[width=\linewidth]{fig2.pdf} \caption{$T_0 = 8/15$. (a) The positions of $D$ with the windows of width $d_T = 3$ and the run $\{1\}$, as in Figure~\ref{fig:1}; the poles $\{2, 5, 6, 7\}$ of the minimal component (triangles) meet both windows and miss the run. (b) The graph $\Gamma$ of Remark~\ref{rem:one-odd-prime-two-odd} at $Q = 15$. Solid: the poles that reach $\operatorname{Fix}(\iota)$; they leave two components, $\{o, [2]_5\}$ and $\{[1]_5, [1]_3\}$. Dashed: the edges between them, which are exactly the poles of the minimal component.}\label{fig:2} \end{figure} \section{Boshernitzan's Conjecture~2.2(e) and 2.2(b)}\label{sec:8} \emph{By Lemma~\ref{lem:2-1}, Conjecture~2.2(e) for a right triangle is complete periodicity of its two perpendicular classes. This section collects the right triangles at which \S\S\ref{sec:4}, 5 and 7 prove it, carries them to isosceles triangles through their right halves, and records where the conjecture fails.} \subsection{Right triangles}\label{sec:8.1} \begin{corollary}\label{cor:8-1} The rational right triangle $(P, Q - P, Q)$ with $\min(P, Q - P) \geq 2$ satisfies Boshernitzan's Conjecture~2.2(e), and hence \eqref{eq:2.1}, in each of the following cases. \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item $Q$ has at most one odd prime factor (computer-assisted in part: Appendix A.4--A.6). \item $P \not\equiv \pm2 \pmod{p}$ for every odd prime $p$ dividing $Q$. \item $Q$ is odd and $2\lfloor Q/2s'\rfloor \geq Q - 1 - \varphi(Q)$, where $s'$ is the odd one of $P$ and $Q - P$. \item $Q$ is even, not a power of $2$, and $(2d + 1)s \leq Q$, where $s = \min(P, Q - P)$ and $d = Q/2 - 1 - \varphi(Q)$. \item One of $P$, $Q - P$ is $4$, and $Q \equiv 3 \pmod{4}$ (computer-assisted in part: \S\ref{sec:B.4}). \end{enumerate} \end{corollary} \begin{proof} By Lemma~\ref{lem:2-1} it suffices that both perpendicular classes be completely periodic. Conjecture~2.2(e) then implies \eqref{eq:2.1}, by \cite{Bos92} Corollary 1.7, since $\mathcal{P}_0 \subseteq \mathcal{P} \subseteq \mathcal{E}$. Parts 1 and 2 are Theorems~3 and 2. \emph{Part 3.} Put $d_T \coloneqq (Q - 1 - \varphi(Q))/2$, so the hypothesis is $\lfloor Q/2s'\rfloor \geq d_T$. If $d_T = 0$ then $Q$ is prime, which is part 1, so let $d_T \geq 1$. Then $2s' < Q$. At odd $Q$ the class $\epar = 1$ of a centre is the class $\epar = 0$ of the other centre of the same triangle, since exchanging the legs sends the direction $m$ to $Q - m$. One perpendicular class is therefore the class $\epar = 0$ of the even-numerator centre $(Q - s')/Q$, the class perpendicular to its leg $L_1$, and Corollary~\ref{cor:the-head-of-the-leg} with $s = s'$ makes it completely periodic. The other is the class $\epar = 0$ of $s'/Q$, the paired class. There $\sigma = s'$, and $L_{I_M} = \min(M, \lfloor(Q + s')/2s'\rfloor) \geq \min(M, \lfloor Q/2s'\rfloor) \geq d_T$, since $M = (Q - 1)/2 \geq d_T$. Corollary~\ref{cor:the-tail-of-the-paired} makes it completely periodic. \emph{Part 4.} $(2d + 1)s \leq Q$ implies $2sd \leq Q$, so Corollary~\ref{cor:the-even-head} covers both classes. \emph{Part 5.} Exchanging the legs if necessary, $P = 4$ and $Q = 4m + 3$ with $m \geq 1$. Both classes are completely periodic by Theorems~\ref{thm:the-ladder} and \ref{thm:the-paired-class-of-the}. \end{proof} The triangles with $\min(P, Q - P) \leq 2$ have an angle $\pi/2Q$, or $\pi/Q$ at odd $Q$, and are lattice triangles {[}Vee89, Theorems~1.1 and 1.4{]}, through the isosceles double; see \cite[Theorem 2]{KS00}. They satisfy 2.2(e) by Veech's dichotomy (\S\ref{sec:1.1}). So the hypothesis $\min(P, Q - P) \geq 2$ loses nothing, and the triangles with $\min(P, Q - P) = 2$ that parts 1--5 miss, at $Q$ with two or more odd prime factors, are lattice triangles too. Most of Corollary~\ref{cor:8-1} is part 2: its share of the right triangles tends to $0.619$ (Remark~\ref{rem:how-much-this-covers}). Part 1 adds the centres $P \equiv \pm2$ at one odd prime. Parts 3--5 add triangles only at $Q$ with two or more odd prime factors and $P \equiv \pm2$ modulo one of them, where neither Theorem~2 nor Theorem~3 applies. At $Q \leq 2000$, out of $606 295$ right triangles with $\min(P, Q - P) \geq 2$, parts 1 and 2 cover $383 123$ and parts 3--5 add $569$ more. The first such triangles are $4/15$ (part 5), $3/35$ (part 3) and $3/70$ (part 4). \begin{remark}[part 5 and the runs]\label{rem:part-5-and-the-runs} At composite $Q$, part 5 is not a case of Theorem~5 (at prime $Q$, $d_T = 0$ and Corollary~\ref{cor:prime-and-twice-prime-denominators} (a) covers it). Its leg class, at $P = 4$ with $s = Q - 4$, is the first range of Remark~\ref{rem:what-is-not-touched}: its runs are empty. Its paired class, the class $\epar = 0$ of $(Q - 4)/Q$, is reached by Theorem~\ref{thm:the-paired-runs} exactly when $\lfloor Q/4\rfloor \geq d_T$, that is $\varphi(Q) \geq (Q + 1)/2$. That holds at infinitely many composite $Q$, for instance $Q = 3p$ with $p \equiv 1 \pmod{4}$ prime, $p \geq 5$, and fails at the composite rungs $Q = 195, 315, 495, 735, 975, \ldots$. Theorems~\ref{thm:the-ladder} and \ref{thm:the-paired-class-of-the} follow each separatrix past the run, to a head-on bounce, and need neither condition. There the code has nonzero words that avoid every pole a run certifies, and what excludes them is the path of each separatrix, which the code does not record. \end{remark} \begin{remark}[what is left for right triangles]\label{rem:what-is-left-for-right} Every rational right triangle off the lattice locus and outside Corollary~\ref{cor:8-1} has $Q$ with two or more odd prime factors and $P \equiv \pm2$ modulo one of them. At the C centres among these (one of $P \pm 2$ a unit), complete periodicity is found by computation on the range of Remark~\ref{rem:c-centres-computation-and-two}, and Conjecture~\ref{conj:6-5} (i) would give it everywhere. At the $\neg$C centres no window-and-sign argument can give it (Theorem~4). There $T_0$ is a counterexample (\S\ref{sec:6.3}), every other $\neg$C triangle with $Q < 500$ passes on the classes of Remark~\ref{rem:the-evidence}, and Conjecture~\ref{conj:6-5} (ii) says no other triangle fails. \end{remark} \subsection{Isosceles triangles}\label{sec:8.2} Let $I = (a, a, b)$, with angles $a\pi/N, a\pi/N, b\pi/N$, $\gcd(a, b) = 1$ and $N = 2a + b$. Its axis cuts it into two copies of a right triangle $H$, its \textbf{right half}. \begin{lemma}[the fold]\label{lem:the-fold} (i) If $N$ is odd, $H$ has centre $b/N$, with $Q = N$, and $I$ and $H$ have the same unfolding. $S^1(2d')$ for $I$ is the union of the two perpendicular classes of $H$, and, with directions measured from the base of $I$, $S^1(2d') \setminus S^1(d')$ is the paired class of $H$, the class $\epar = 0$ of $b/N$. (ii) If $N$ is even, then $b$ is even and $a$ odd, and $H$ has centre $a/Q$, with $Q = N/2$. The unfolding of $I$ is a finite translation cover of that of $H$, a direction is completely periodic on one if and only if it is on the other, and $S^1(2d')$ is the same set for both. \end{lemma} \begin{proof} (i) The group of $I$ is $D_N$, of order $2N$; it has index $2$ in the group $D_{2N}$ of $H$, and the reflection $r_{L_2}$ in the axis, which is the side $L_2$ of $H$, lies in $D_{2N}$ but not in $D_N$, since the axis has index $N/2$. So $D_{2N} = D_N \sqcup D_N\cdot r_{L_2}$, and the $2N$ copies of $I$ in its unfolding are the $4N$ copies of $H$, joined in pairs across $L_2$. The gluings agree: across $L_1$ and the hypotenuse of $H$ they are the gluings of $I$ across its sides, and across $L_2$ they are internal to a copy of $I$. The images of the right angle are cone points of angle $2\pi$, so they are regular points, and marking them changes no cylinder and no minimal component. So the unfolding of $I$ is that of $H$, with the images of the right angle unmarked. Measured from the base of $I$, directions are multiples of $\pi/2N$, and the sides of $I$ lie at the even multiples $0$ and $\pm2a$. Under the group of $H$, rotations add even multiples and reflections preserve parity, so there are two orbits. The apex of $I$ is the vertex $O$ of $H$, so $L_2$ runs along the axis, at the odd multiple $N$. The odd multiples therefore contain $L_2$ and form the class $\epar = 0$ of $b/N$, the paired class of $H$ (at odd $P = b$); the even multiples, which contain the base, are the class $\epar = 1$. (In the coordinates of \S\ref{sec:2.1} for $H$ the parities are exchanged, since there $L_2$ has direction $0$.) (ii) $I$ is tiled by two reflected copies of $H$, so its unfolding is a finite translation cover of the unfolding of $H$, and a direction has a minimal component on one exactly when it does on the other. Here $d_H = 2Q = N = d'_I$, so $S^1(2d')$ is the same set. In both cases every placement allowed by \cite{Bos92} Corollary 1.7 for $I$ is one for $H$: the sides of $I$ differ in direction by multiples of $\pi/d'$, and the legs of $H$ lie along the base of $I$ and its perpendicular. \end{proof} \begin{corollary}\label{cor:8-5} If both perpendicular classes of $H$ are completely periodic, $I$ satisfies Conjecture~2.2(e) and \eqref{eq:2.1}, and with them 2.2(b) when $N$ is odd and 2.2(a) when $N$ is even. If $N$ is odd and the paired class of $H$ is completely periodic, $I$ satisfies 2.2(b) in every placement with a side at an even multiple of $\pi/d'$. \end{corollary} \begin{proof} By Lemma~\ref{lem:the-fold}, in either case $S^1(2d')$ for $I$ is the union of the two perpendicular classes of $H$, and a direction in it has a minimal component on the unfolding of $I$ exactly when it has one on that of $H$. So the argument of Lemma~\ref{lem:2-1} applies to $I$. 2.2(e) contains (a) and (b), and implies \eqref{eq:2.1} by \cite{Bos92} Corollary 1.7. For the last clause, in a placement with a side at an even multiple of $\pi/d'$ the set $S^1(2d') \setminus S^1(d')$ is the paired class of $H$, by Lemma~\ref{lem:the-fold} (i). \end{proof} The restriction on the placement in the last clause is needed. $S^1(2d') \setminus S^1(d')$ is invariant under rotation by even multiples of $\pi/d'$ only. With a side at an odd multiple, for instance vertical, the set becomes the side-parallel class, where 2.2(b) is false in general. \begin{corollary}\label{cor:8-6} The isosceles triangle $I = (a, a, b)$ satisfies Conjecture~2.2(e) and \eqref{eq:2.1}, with 2.2(b) when $N$ is odd and 2.2(a) when $N$ is even, in each of the following cases. \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item $N$ has at most one odd prime factor, and $b \geq 3$ ($N$ odd) or $a \geq 2$ and $b \geq 4$ ($N$ even). \item $b \geq 3$ and $a \not\equiv \pm1 \pmod{p}$ ($N$ odd), or $a \geq 2$, $b \geq 4$ and $a \not\equiv \pm2 \pmod{p}$ ($N$ even), for every odd prime $p$ dividing $N$. This is empty when $3 | N$. \item $H$ is one of the right triangles of Corollary~\ref{cor:8-1}, parts 3--5. \end{enumerate} If $N$ is odd, $I$ satisfies 2.2(b) in every placement with a side at an even multiple of $\pi/d'$ also when $N$ is composite and the condition of Theorem~\ref{thm:the-paired-runs} holds at the centre $b/N$ (for $b > 2a$ it reads $\lfloor N/2a\rfloor \geq (N - 1 - \varphi(N))/2$), and when $a = 2$ and $N \geq 7$. \end{corollary} \begin{proof} At odd $N$ the half has centre $b/N$, with $Q = N$, $P = b$ odd and $Q - P = 2a$, so $\min(P, Q - P) \geq 2$ exactly when $b \geq 3$; and $b = N - 2a \equiv -2a \pmod{p}$, so $b \not\equiv \pm2$ exactly when $a \not\equiv \mp1$. At even $N$ the half has centre $a/Q$, $Q = N/2$, $Q - P = b/2$, so $\min(P, Q - P) \geq 2$ exactly when $a \geq 2$ and $b \geq 4$; and $N/2$ has the same odd prime factors as $N$. If $3 | N$, the condition of part 2 forces $3 | a$, hence $3 | b$, against $\gcd(a, b) = 1$. So parts 1 and 2 are parts 1 and 2 of Corollary~\ref{cor:8-1} for $H$, and part 3 is the rest. Corollary~\ref{cor:8-5} gives the conclusions; parts 1 and 3 inherit the computer assistance of Corollary~\ref{cor:8-1}, parts 1 and 5. The last clause: the paired class of $H$ is completely periodic by Theorem~\ref{thm:the-paired-runs} in the first case, and in the second, where $b/N = (N - 4)/N$, by Theorem~\ref{thm:the-paired-class-of-the}, which covers every odd $N \geq 7$. Corollary~\ref{cor:8-5} again. \end{proof} Part 1 contains every isosceles triangle with $N$ an odd prime and $b \geq 3$, and it reaches isosceles triangles with $4 | N$: the smallest non-lattice ones are $(3, 3, 10)$ and $(5, 5, 6)$, whose halves $3/8$ and $5/8$ have $Q = 8$. The ladder of part 5 has two isosceles partners. $(Q - 4, Q - 4, 8)$, with $N = 2Q$, and $(2, 2, Q - 4)$, with $N = Q$ odd, both have the right half of centre $(Q - 4)/Q$, the triangle $(4, Q - 4, Q)$ (Lemma~\ref{lem:the-fold}). At every $Q \equiv 3 \pmod{4}$ both satisfy Conjecture~2.2(e). At $Q \equiv 1 \pmod{4}$, $Q \geq 9$, the triangle $(2, 2, Q - 4)$ satisfies 2.2(b) by the last clause of Corollary~\ref{cor:8-6}. It satisfies 2.2(e) when the leg class of $4/Q$ is completely periodic as well: by Theorem~2 when $3 \nmid Q$, and by Theorem~3 when $Q$ is a prime power. The remaining values, $3 | Q$ with a second odd prime ($Q = 21, 33, 45, 57, \ldots$), are not reached by any theorem here; every $4/Q$ is a C centre, and those below $80$ are found completely periodic by the computation of Remark~\ref{rem:c-centres-computation-and-two}. \subsection{The hypothesis is necessary}\label{sec:8.3} No statement of the shape of Corollary~\ref{cor:8-1} can cover every right triangle: at $T_0 = 8/15$, the class perpendicular to $L_1$ carries a minimal component (Proposition~\ref{prop:6-4}), and 2.2(e) fails. Through Lemma~\ref{lem:the-fold} $T_0$ is the right half of two isosceles triangles: $(4, 4, 7)$, with $N = 15$ and half at $7/15$, and $(7, 7, 16)$, with $N = 30$ and half at $7/15$. In both, $S^1(2d')$ contains the perpendicular classes of $T_0$, so neither satisfies 2.2(e), and $(7, 7, 16)$, with $d$ even, refutes 2.2(a). For $(4, 4, 7)$ the class that fails is not the paired class of the half: the class of $T_0$ perpendicular to $L_1$ is the class $\epar = 0$ of $8/15$, which is the class $\epar = 1$ of $7/15$, while the paired class is the class $\epar = 0$ of $7/15$, and that class is completely periodic by an exact flow-decomposition computation (\S\ref{sec:7.3}, after Theorem~\ref{thm:the-paired-runs}, whose test fails there). So $(4, 4, 7)$ satisfies 2.2(b) in the placements of Corollary~\ref{cor:8-5}. That agrees with the census of \cite{DR22}, which finds no counterexample to (b). \section{Off right triangles, and counterexamples to Conjecture~2.2(a)}\label{sec:9} \emph{Both methods of this paper are built on the right angle. The arrival relation is written in the frames of the right triangle's reflections (\S\ref{sec:2.3}), and the reduction of \S\ref{sec:3.1} runs on its necklace. The code criterion needs a minimal component to be a disc with poles in it (Theorem~\ref{thm:the-shape-of-a-minimal}), and that needs the quotient of the unfolding by $-1$ to be a sphere. For a rational triangle with $d$ even this happens only for right triangles (Proposition~\ref{prop:9-1}). The triangles of Theorem~6, where Conjecture~2.2(a) fails, lie on the other side of that line.} \subsection{The sphere lemma}\label{sec:9.1} Let $\Delta$ have angles $\pi a_1/N, \pi a_2/N, \pi a_3/N$ with $a_1 + a_2 + a_3 = N$ and $\gcd(a_1, a_2, a_3) = 1$, so $N$ is Boshernitzan's $d$. The linear parts of its reflection group form $D_N$, and its unfolding $X$ is glued from $2N$ copies. Put $g_i \coloneqq \gcd(a_i, N)$ and $q_i \coloneqq N/g_i$. Vertex $i$ has $g_i$ lifts in $X$, each a cone point of angle $2\pi a_i/g_i$. When $N$ is even, $-1 \in D_N$ is a deck transformation of $X$ with derivative $-1$, and $B \coloneqq X/\langle-1\rangle$ is a closed half-translation surface. For a right triangle it is the necklace of \S\ref{sec:2.2}. \begin{proposition}[the sphere lemma]\label{prop:9-1} Let $N$ be even. Then $B$ is a sphere if and only if some $a_i = N/2$. \end{proposition} \begin{proof} \emph{(i) The Euler characteristic.} By Gauss--Bonnet on $X$, $\chi(X) = \sum_i g_i(1 - a_i/g_i) = \Sigma g_i - N$. The map $X \to B$ is a double cover branched at the fixed points of $-1$. No interior point of a copy is fixed, since $-1$ moves every copy. No interior point of an edge is fixed: a point on the edge shared by copies $h$ and $hr$, with $r$ a side reflection, is fixed only if $-h = hr$, that is, $r = -1$, as $-1$ is central, and $r$ is a reflection. A lift of vertex $i$ is a coset of its stabiliser, a dihedral group whose rotation part has order $q_i$, and $-1$ fixes it exactly when $q_i$ is even, for all $g_i$ lifts at once. By Riemann--Hurwitz, \[ 2\chi(B) = \sum_i c_i g_i - N,\quad \text{ with }c_i \coloneqq 2\text{ if }q_i\text{ is even and }1\text{ if it is odd.} \] \emph{(ii) Right triangles.} Let $a_3 = N/2$. Then $g_3 = N/2$ and $q_3 = 2$, so $c_3g_3 = N$. Since $a_1 + a_2 = N/2$, $\gcd(a_1, N/2) = \gcd(a_2, N/2) = 1$. If $N/2$ is odd, one of $a_1, a_2$ is even, say $a_1$, with $g_1 = 2$ and $q_1 = N/2$ odd, so $c_1g_1 = 2$; and $a_2$ is odd, with $g_2 = 1$ and $q_2 = N$ even, so $c_2g_2 = 2$. If $N/2$ is even, $a_1$ and $a_2$ are odd, with $g = 1$ and $q = N$ even, so $c_1g_1 = c_2g_2 = 2$. Either way $\Sigma c_i g_i = N + 4$ and $\chi(B) = 2$. \emph{(iii) The converse.} Let $\chi(B) = 2$, that is, $\Sigma c_i g_i = N + 4$. The $g_i$ are pairwise coprime, since a prime dividing $g_i$ and $g_j$ divides $a_i$, $a_j$, $N$ and hence the third $a$. They divide $N$, so $g_1g_2g_3 | N$, and since $c_i \leq 2$, $g_1g_2g_3 + 4 \leq N + 4 \leq 2(g_1 + g_2 + g_3)$. Order $g_1 \leq g_2 \leq g_3$. \begin{itemize} \tightlist \item If $g_1 \geq 2$, then $g_2 \geq 3$ and $g_3 \geq 4$, and $f \coloneqq g_1g_2g_3 + 4 - 2\Sigma g_i$ has positive partial derivatives there and $f(2, 3, 4) = 10 > 0$. So $g_1 = 1$, and the inequality reads $(g_2 - 2)(g_3 - 2) \leq 2$. \item If $g_2 = 1$, then $c_3g_3 \geq N$. But $g_3 | a_3 < N$ and $g_3 | N$ give $g_3 \leq N/2$. So $c_3 = 2$ and $g_3 = N/2$, and $N/2 | a_3 < N$ gives $a_3 = N/2$. \item If $g_2 = 2$, then $g_3 \geq 3$ is odd, $2g_3 | N$, and $c_3g_3 \geq N - 2$. If $N = 2g_3$, then $a_3 = N/2$ as before. Otherwise $N \geq 4g_3 \geq 12$ and $c_3g_3 \leq N/2$, so $N \leq 4$, which is impossible. \item If $g_2 = 3$, then $g_3 = 4$, $12 | N$, and $\Sigma c_i g_i \leq 16$ forces $N = 12$. Then $q_3 = 3$ is odd, $c_3 = 1$, and $\Sigma c_i g_i \leq 12 < 16$, which is impossible. \item If $g_2 \geq 4$, then $(g_2 - 2)(g_3 - 2) \geq 6$, which is impossible. \end{itemize} \end{proof} \begin{corollary}\label{cor:9-2} If $\Delta$ is not right and $N$ is even, then for every orientation-reversing involution $\iota$ of $B$, the quotient $B/\iota$ is not a disc. \end{corollary} \begin{proof} By Proposition~\ref{prop:9-1}, $B$ has genus at least $1$, so $\chi(B) \leq 0$. The fixed set of $\iota$ is a disjoint union of circles, of Euler characteristic $0$, so $\chi(B/\iota) = \chi(B)/2 \leq 0 < 1$. (At odd $N$, $-1 \notin D_N$: there is no $B$ and there are no poles.) \end{proof} \textbf{What this does to the code criterion.} Theorem~\ref{thm:the-shape-of-a-minimal} (1) proves that a minimal component $M$ is simply connected from the fact that every component of $D \setminus M$ meets the connected set $\partial D$, and that needs $D = B/\iota$ to be a disc. Its pole count is Gauss--Bonnet on the disc so obtained. By Corollary~\ref{cor:9-2} neither step is available off right triangles. For a non-right triangle, Gauss--Bonnet on a minimal component reads \[ \pi\cdot\#\text{poles}(M) + \sum_{interior zeros} (2\pi - \theta_z) + \sum_s (\pi - a_s\pi) = 2\pi\chi(\bar{M}), \] which allows $\#\text{poles}(M) = 0$ once $\chi(\bar{M}) \leq 0$. The relation of Theorem~\ref{thm:the-shape-of-a-minimal} (3) is a sum over the poles of $M$, so for such a component it is empty. The obstruction is realised in the known scalene examples, none of which has a pole vertex: their minimal components lift to slit tori in $X$. No non-disc minimal component is known on a triangle with a pole vertex. \textbf{The reach.} The code criterion therefore applies to right triangles and transfers to triangles whose unfolding is a translation cover of a right triangle's, where complete periodicity of a direction is the same on both. Isosceles triangles are the instance (Lemma~\ref{lem:the-fold}), and every isosceles statement of \S\ref{sec:8} goes through it. Which other triangles have such a cover, and in particular whether some scalene triangle does, we leave open. Orbit closures of triangle unfoldings, which detect such covers when they exist, are computed by the methods of \cite{MW18} and, for right and isosceles triangles, in \cite{Api21}. The simplest source of covers, a triangle cut into copies of a right triangle that are mirror images across every shared edge, gives nothing new. \begin{lemma}[reflection tilings]\label{lem:reflection-tilings} Let $T$ be a right triangle with acute angles $\alpha$, $\beta$, and let a triangle $\Delta$ be tiled by $n$ triangles congruent to $T$ so that any two tiles sharing a segment of positive length are mirror images in its line. Then $\Delta$ is similar to $T$, or $\Delta$ is isosceles. Unless $T$ has angles $(\pi/6, \pi/3, \pi/2)$ or $(\pi/4, \pi/4, \pi/2)$, moreover $n \leq 2$. \end{lemma} \begin{proof} If tiles $A$ and $B$ share a segment on a line $\ell$, then $B$ is $A$ reflected in $\ell$, so $B$'s edge on $\ell$ is $A$'s edge: neighbours share whole edges. Also no tile $C$ has a corner $v$ inside an edge $e$ of another tile $A$: the tile $D$ across $e$ at $v$ is $A$ reflected in $e$'s line, so its edge there is $e$ itself and $v$ is not a corner of $D$; then $A$ and $D$ fill a neighbourhood of $v$ (or $A$ alone does, if $e$ lies on $\partial\Delta$), leaving no room for $C$. Around a vertex $v$ of the tiling, consecutive tiles are mirror images in an edge through $v$, so all of them have the same angle $\gamma_v$ at $v$, and the edges they share alternate between the two edges of $T$ at that corner. If $v$ is interior there are $2\pi/\gamma_v$ of them. At an acute corner the two edges are a leg and the hypotenuse, of different lengths, so the alternation forces an even number; at the right corner there are $4$. If $v$ is interior to a side of $\Delta$ there are $\pi/\gamma_v$. So a tile corner of angle $\gamma$ lies at a corner of $\Delta$ unless $\pi/\gamma$ is an integer. Let $x_{\alpha}$, $x_{\beta}$, $x_r$ count the tile corners of each angle at the corners of $\Delta$, so that $\pi = x_{\alpha} \alpha + x_{\beta} \beta + x_r \pi/2$. If neither $\pi/\alpha$ nor $\pi/\beta$ is an integer, every acute corner lies at a corner of $\Delta$, so $x_{\alpha} = x_{\beta} = n$, hence $\pi = n\pi/2 + x_r \pi/2$ and $n = 2 - x_r \leq 2$. If $\pi/\alpha = k$ is an integer and $\pi/\beta$ is not (the other case is the same with $\alpha$ and $\beta$ exchanged), then $k \notin \{3, 4, 6\}$, $k \geq 5$, $x_{\beta} = n$ and $n\beta \leq \pi$, so $n \leq 2k/(k - 2)$. That is below $3$ for $k \geq 7$. At $k = 5$, $n = 3$ would leave $\pi - 3\beta = \pi/10$ for the other corners of $\Delta$, less than any tile angle. So $n \leq 2$. If both are integers, $T$ is one of the two exceptional triangles, and the angles of $\Delta$ are positive multiples of $\pi/6$, respectively $\pi/4$, with sum $\pi$. They are $(\pi/6, \pi/6, 2\pi/3)$, $(\pi/6, \pi/3, \pi/2)$, $(\pi/3, \pi/3, \pi/3)$, respectively $(\pi/4, \pi/4, \pi/2)$. Finally, two tiles sharing a hypotenuse form a quadrilateral, and two sharing a leg form an isosceles triangle. \end{proof} (An enumeration of every reflection patch of at most six tiles, at every $\alpha = \pi P/2Q$ with $Q \leq 24$, finds exactly these triangles there, and all four exceptional triples occur.) So a scalene triangle whose unfolding covers a right triangle's, if one exists, does not come from a tiling of this kind. Such a tiling does give a cover: folding each tile onto $T$ is well defined on shared edges, which a reflection fixes pointwise; the sides of $\Delta$ lie on lines of tile edges, so the reflection group of $\Delta$ lies in that of $T$; and the even count around each interior vertex makes the folding consistent there. (The hypothesis cannot be dropped: the midpoint subdivision of $T$ into four half-size copies is not a reflection tiling, and $2T$ does not translation-cover $T$'s unfolding in general.) \subsection{Infinitely many counterexamples to Conjecture~2.2(a)}\label{sec:9.2} The triangles $\Delta_x$ with angles $(x, 2x, 1 - 3x)\pi$, $0 < x < 1/3$, are scalene and not right except at $x = 1/6, 1/5, 1/4$, none of which lies near the intervals below. They are off the line of \S\ref{sec:9.1}, and on them Conjecture~2.2(a) fails infinitely often. \begin{main6} Let $I$ be one of the intervals \begin{gather*} I_1 = [3749379/23000000, 750069/4600000] \ni 15/92, \\ I_2 = [2099637/24200000, 10503509/121000000] \ni 21/242, \\ I_3 = [1437689/16875000, 23005103/270000000] \subset 23/270 + (1.1, 1.9)\cdot10^{-5}. \end{gather*} For every $x = a/d \in I$ in lowest terms with $d$ even, the triangle $\Delta_x$, with angles $(a, 2a, d - 3a)\pi/d$, has a direction $\theta \in S^1(2d')$ that is periodic but not purely periodic. So Conjecture~2.2(a) fails for each of these triangles, for instance $149/914$ and $179/1098$ in $I_1$. \end{main6} The proof is computer-assisted, and its one idea is to remove the denominator. A direction of $S^1(2d')$ depends on $d$, but on the line $(x, 2x, 1 - 3x)$ it does not have to. \emph{Formal directions.} Every side of $\Delta_x$ has direction a multiple of $A \coloneqq \pi x$ modulo $\pi$, so the reflection class of a side direction consists of the $\theta = jA + m\pi$. The label $(j, m \bmod 2)$ names one direction class for every $x$, rational or not. We use a side-parallel class: $j$ odd on $I_1$ and $I_3$, $j$ even on $I_2$. A flow orbit is then a word in pairs (side, formal direction), and for a fixed word every endpoint is a Laurent polynomial in $z = e^{i\pi x}$ over $\mathbb{Z}[i]$, divided by one common polynomial. At $x = a/d$ the direction $\theta$ is a multiple of $\pi/d$, so it lies in $S^1(2d')$ with a side horizontal, a placement allowed by \cite{Bos92} Corollary 1.7. \emph{The certificate.} For each interval there are a transversal $J$, a sub-interval of one strip, and four words whose first returns tile $J$. On all of $I$, every inequality in every word is either certified positive by interval arithmetic or vanishes identically, the joins of the tiling are exact identities, and the slopes are $+1$. The four words merge into three blocks of equal translation, of lengths $\ell_1, \ell_2, \ell_3$, with translations $\ell_2 + \ell_3$, $\ell_3 - \ell_1$ and $-(\ell_1 + \ell_2)$ identically. So the first return to $J$ is a symmetric exchange of three intervals: the map induced on $J$ by the rotation through $\ell_2 + \ell_3$ of a circle of length $|J| + \ell_2$, with rotation number $\rho(x) = (\ell_2 + \ell_3)/(|J| + \ell_2) = Num/Den$. \emph{Irrationality at every rational point.} After dividing by $i$, $Num$ and $Den$ are integer Laurent polynomials in $w = z^2$. Their greatest common divisor is a product of cyclotomic polynomials vanishing only at $x \in \{0, 1/6, 1/3, 1/2\}$, none of which lies in any $I$, and $Den \neq 0$ on $I$. After the gcd, $Num$ and $Den$ are coprime, their joint exponent span (both taken over one common range of exponents) is at most $20$, and the reduced $Den$ is not a monomial. At $x = a/d$, $w$ is a primitive $d$-th root of unity. If $\rho = p/q$, then $q\cdot Num - p\cdot Den$ --- nonzero, since $Den$ would otherwise divide $q\cdot Num$ and hence be a unit --- would vanish at all $\varphi(d)$ conjugates of $w$, so $\varphi(d) \leq 20$ and $d \leq 66$. No rational in any $I$ has $d \leq 66$: the least denominators are $92$, $242$ and $223$. So $\rho$ is irrational at every rational point of $I$, the exchange is minimal, and no point of $J$ is periodic. All but countably many points of $J$ follow the words with strict inequalities, so their orbits meet no vertex. This gives a regular orbit in direction $\theta$ that is not periodic, so $\theta \notin \mathcal{P}_0$. \emph{A periodic orbit in the same direction.} On each interval a rational starting point on a side, with return translation identically $0$, slope $+1$ and every crossing certified inside, gives a periodic orbit in direction $\theta$, of $282$, $118$ and $126$ bounces respectively. So $\theta \in \mathcal{P} \setminus \mathcal{P}_0$. \qed The certificates and the code that checks them are supplementary material. Each was checked independently, by a second tracer and against direct traces of tens of thousands of orbits inside each interval. The same tests find other words just outside it. \begin{remark}[what was known, and the odd denominators]\label{rem:what-was-known-and-the} Before Theorem~6 only finitely many counterexamples to Conjecture~2.2(a) were known: the census \cite{DR22} finds nine with $d \leq 153$, among them $T_0$ and the isosceles $(7, 7, 16)$, the only right or isosceles ones. Three of the nine lie on the line $(x, 2x, 1 - 3x)$: $(15, 30, 47)$, which lies in $I_1$, and $(11, 22, 103)$ and $(19, 38, 55)$, which lie outside the three intervals. At odd $d$ the same direction class is still not completely periodic, but in the placements with a side at an even multiple of $\pi/d'$ (as in Corollary~\ref{cor:8-5}) it lies in $S^1(d')$, which Conjecture~2.2(b) excludes. So in those placements odd $d$ gives no counterexample to Conjecture~2.2(b), and we do not count it. Theorem~6 says nothing about Conjecture~2.2(e), since these triangles are neither right nor isosceles. It says nothing either about where the intervals end, or about the rest of the line. \end{remark} Taken together, \S\S\ref{sec:8}--\ref{sec:9} locate Boshernitzan's question. On right triangles, and through the fold on isosceles ones, complete periodicity of the directions of $S^1(2d')$ follows wherever no orbit from $O$ arrives at a vertex, which Theorems~2 and 3 prove from residue conditions, and wherever the runs of the code cover its windows. At $T_0$ it fails, with an arrival and a codeword that the runs miss. Off right triangles a minimal component need not carry a pole, the code has nothing to act on, and counterexamples come in families. \appendix \section{The one-prime $\pm2$ case work}\label{sec:A} \emph{Each entry states what it proves, why the case is finite or explicit, and what it computes. The conventions are those of \S\ref{sec:5}; $P \equiv \pm2 \pmod{p}$ throughout.} \textbf{A.1. The target $O$ at even $P$.} \begin{proposition}\label{prop:A-1} Let $Q = p^b$ with $p$ an odd prime, and let $P$ be even and coprime to $Q$, with $\min(P, Q - P) \geq 2$; if $b \geq 2$, let $p \geq 5$. No head-on-free $O$-launched connection of $P/Q$ ends at $O$. \end{proposition} For $P \not\equiv \pm2 \pmod{p}$ this is part of Theorem~2; the argument below is needed at $P \equiv \pm2$, and at $Q = p$ it covers every even $P$ (for $p = 3$, $b \geq 2$, see A.5). Here $Q$ and $N = Q/p$ are odd, $P = 2\varepsilon + \mu p$ with $\mu$ even, and $x = e^{i\alpha}$ has order $2Q$ if $P/2$ is odd and $Q$ if $P/2$ is even, with $x^Q = (-1)^{P/2}$. All barriers are of one kind (\S\ref{sec:3.2}): both ends of the window are parallel to the launch ($u_0$ even) or both perpendicular ($u_0$ odd). Let $b$ be the lower end, so that the frames $d = t - b$ lie in $(0, Q)$ and all have the parity $\pi_0$ of $b$. Put $f \coloneqq \cos$ and $f^* \coloneqq \sin$ at parallel ends, $f \coloneqq \sin$ and $f^* \coloneqq \cos$ at perpendicular ends. By Lemma~\ref{lem:the-sign-of-a-reflection}, the sign of a reflection in $L_1$ at frame $d$ is $\varepsilon_0\cdot\operatorname{sgn} f(d\alpha)$ for a fixed $\varepsilon_0 = \pm1$, and Proposition~\ref{prop:the-arrival-relation}, divided by $x + x^{-1}$, reads $\sum_d m(d)\cdot\operatorname{sgn} f(d\alpha)\cdot F_d(x) = 0$ with $F_d = S_d$ (parallel) or $C_d$ (perpendicular). Neither $f(y\alpha)$ nor $f^*(y\alpha)$ vanishes at an integer of $(0, Q)$: $\sin(d\alpha) = 0$ needs $Q | d$, and $\cos(d\alpha) = 0$ needs $dP \equiv Q \pmod{2Q}$, impossible with $P$ even and $Q$ odd. \emph{The fold.} Since $x^{-d} = (-1)^{P/2}x^{Q-d}$, every $F_d$ has degree $< Q$, and because $Q$ is odd each $e \in (0, Q)$ is exactly one of a frame ($e = d$) or a fold ($e = Q - d$). From $\cos((Q - e)\alpha) = (-1)^{P/2}\cos(e\alpha)$ and $\sin((Q - e)\alpha) = -(-1)^{P/2}\sin(e\alpha)$, the coefficient of $x^e$ is, in both cases, \[ \varepsilon_0\cdot\pi(e)\cdot\operatorname{sgn} f(e\alpha)\cdot\tilde{m}(e), \] with $\pi = +1$ on frames and $-1$ on folds, and $\tilde{m}(e)$ the count $m$ of the frame that $e$ is or is folded from; the exponent $0$ has coefficient $0$. The minimal polynomial of $x$ is $\Phi_p(-X^N)$ (order $2Q$) or $\Phi_p(X^N)$ (order $Q$), so, exactly as in Lemma~\ref{lem:the-chain-split}, the coefficients along each residue class $e_k \coloneqq r + kN$, $0 \leq k < p$, are $c_r\cdot\ell^k$, with $\ell = -1$ for order $2Q$ and $\ell = +1$ for order $Q$. The class $r = 0$ contains $e = 0$, so $c_0 = 0$. At $Q = p$ that is every class, and the first reflection has $m \geq 1$: there is nothing more to prove. Let $b \geq 2$. \emph{Good frames.} If $m(d) \geq 1$, both classes $r \coloneqq d \bmod N$ and $N - r$ have $c \neq 0$, so every member of each has $\tilde{m} \geq 1$ and $\pi(e_k)\cdot\operatorname{sgn} f(e_k\alpha)\cdot\ell^k$ is constant on it. As $N$ is odd, frames and folds alternate along a class, so $\operatorname{sgn} f(e_k\alpha)\cdot(-\ell)^k$ is constant. Now $N\alpha = \varepsilon\pi/p + (\mu/2)\pi$, and $\ell = +1$ exactly when $\mu/2$ is odd, so $\operatorname{sgn} f(e_k\alpha)\cdot(-\ell)^k = \operatorname{sgn} f(r\alpha + k\varepsilon\pi/p)$: $p$ points of spacing $\pi/p$, as in Lemma~\ref{lem:one-sign-change}. So, writing $X \coloneqq d - r \in N\mathbb{Z}$, the frame $d$ is \textbf{good} --- $m(d) \geq 1$ is possible --- only if $\text{frac}((d - X)/D)$ lies in \begin{gather*} B = (\tfrac12, \tfrac12 + 1/p)\ (\varepsilon = +1) \text{ or } (\tfrac12 - 1/p, \tfrac12)\ (\varepsilon = -1) \text{ at parallel ends;} \\ B = (0, 1/p)\ (\varepsilon = +1) \text{ or } (1 - 1/p, 1)\ (\varepsilon = -1) \text{ at perpendicular ends.} \end{gather*} The class $N - r$ gives the same condition read from the other neighbouring multiple $X + N$, since $(X + N - d)/D \equiv \varepsilon/p - (d - X)/D \pmod{1}$ and $y \in B \iff \varepsilon/p - y \in B$ for each of the four arcs. So goodness can be read from either multiple of $N$ adjacent to $d$, as $\text{frac}(|d - X|/D) \in B$. \emph{The span.} The class $r_L$ of the first reflection has $|c_{r_L}| \geq 1$, so each of its $p$ members is a frame with $m \geq 1$ or the fold of one. Its members $e_0 \in (0, N)$ and $e_{p-1} \in (Q - N, Q)$ have the same parity, so the connection reflects in $L_1$ at a frame in $(0, N)$ and at one in $(Q - N, Q)$. No frame of a reflection lies on $N\mathbb{Z}$ (class $0$), so \textbf{every multiple $X = jN$, $1 \leq j \leq p - 1$, is straddled} by two consecutive reflections in $L_1$. \emph{The step rule.} Lemma~\ref{lem:the-step-rule}'s proof does not use the parity of $P$. At a parallel end $b\alpha - \varphi \in \pi\mathbb{Z}$, and at a perpendicular one $b\alpha - \varphi \in \pi/2 + \pi\mathbb{Z}$, so it gives: between consecutive frames $d < d'$, $f(y\alpha)$ has exactly one zero $y_0$, $f^*$ has constant sign on the integers strictly between, and $y_0 - D/2 \leq d + 1$, $y_0 + D/2 \geq d' - 1$. Relative to $X = jN$ the zeros of $f(y\alpha)$ are the points $X + gD$, $g \equiv \tfrac12 - j\varepsilon/p$ (parallel) or $g \equiv -j\varepsilon/p$ (perpendicular), since $X/D = jP/2p \equiv j\varepsilon/p \pmod{1}$ ($\mu$ even). Neither is $\equiv 0$ for $1 \leq j \leq p - 1$. \begin{lemma}[straddles at even $P$]\label{lem:straddles-at-even} Let $d_1 < X < d_2$ be consecutive frames of reflections in $L_1$, both good, with $X = jN$, $1 \leq j \leq p - 1$. Put $\delta_i \coloneqq |d_i - X|$ and let $X + gD$ be the zero of $f(y\alpha)$ between them. \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item $d_1 > X - N$ and $d_2 < X + N$; and $\delta_1 \leq D/2 - gD + 1$, $\delta_2 \leq D/2 + gD + 1$, $-\delta_1 < gD < \delta_2$. \item At a parallel end with $\varepsilon = +1$: $\delta_1, \delta_2 \in (D/2, D/2 + D/p)$ and $|g| < 1/D$. With $\varepsilon = -1$: $\delta_1, \delta_2 \in (D/2 - D/p, D/2)$ and $|g| < 1/D + 1/p$. \item At a perpendicular end: impossible if $\varepsilon = -1$; if $\varepsilon = +1$, it needs $p < D < 2p$ and $j \in \{(p - 1)/2, (p + 1)/2\}$. \end{enumerate} \end{lemma} \begin{proof} The good distances are $\delta \in \bigcup_{k \geq 0}(kD + \beta D, kD + \beta D + D/p)$ with $[\beta, \beta + 1/p] = \bar{B}$; their least values are $\delta > D/2$ (parallel, $\varepsilon = +1$), $\delta > D/2 - D/p$ (parallel, $\varepsilon = -1$), $\delta \geq 1$ (perpendicular, $\varepsilon = +1$) and $\delta > D - D/p$ (perpendicular, $\varepsilon = -1$, where the $k = 0$ interval is $(D - D/p, D)$). (1) A step straddling $X$ and $X + N$ has length at least $\delta + N + \delta'$, the two $\delta$'s measured from the multiples next to each end, and this exceeds $D + 2$, being more than $N + D$ (parallel, $\varepsilon = +1$); more than $N + D - 2D/p$, which is $\geq D + 2$ unless $N(P - 4) < 2P$, impossible as $P \geq 2p - 2 \geq 8$ and $N \geq 5$ (parallel, $\varepsilon = -1$); more than $N + 2D - 2D/p$ (perpendicular, $\varepsilon = -1$); at least $N + 2$, which exceeds $D + 2$ iff $N/D = 1/p + \mu/2 > 1$, i.e. $P \neq 2$ (perpendicular, $\varepsilon = +1$; at $P = 2$, $D = Q$ and $\sin(y\alpha)$ has no zero in $(0, Q)$, so the sign never flips and there is no step at all). The inequalities are the step rule with $y_0 = X + gD$. (2) Parallel, $\varepsilon = +1$: if $\delta_1 > 3D/2$ then $g < 1/D - 1 < -\tfrac12$, while $\delta_2 > D/2$ gives $g > -1/D > -\tfrac12$; so both lie in the first interval, and then $|g| < 1/D$. Parallel, $\varepsilon = -1$: if $\delta_1 > 3D/2 - D/p$, then $g + \tfrac12 \in (-1/p, 1/p)$; but $g + \tfrac12 \equiv j/p \pmod{1}$, which would force $p | j$. The case of $\delta_2$ is the mirror, and in the first intervals $|g| < 1/D + 1/p$. (3) Perpendicular, $\varepsilon = -1$: $\delta_1, \delta_2 > D - D/p$ gives $|g| < 1/D - \tfrac12 + 1/p < 1/p$, so $g = 0$, as $g \in (1/p)\mathbb{Z}$; but $g \not\equiv 0$. Perpendicular, $\varepsilon = +1$: if both ends are within $D/p$ of $X$ then $|g| < 1/p$, so $g = 0$ again. If $\delta_1 > D$, then $g < 1/D - \tfrac12$, so $\delta_2 < 2$, i.e. $\delta_2 = 1$, which is good only if $D > p$; and $\delta_2 \leq D/2 + gD + 1$ gives $g \geq -\tfrac12$. The only element of $(1/p)\mathbb{Z}$ in $[-\tfrac12, -\tfrac12 + 1/D)$ is $-\tfrac12 + 1/(2p)$, which needs $D < 2p$ and means $j = (p - 1)/2$. The case $\delta_2 > D$ is the mirror, with $j = (p + 1)/2$. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:A-1}] By the span, each $X = jN$, $1 \leq j \leq p - 1$, is straddled by a step with good ends; fix one for each $j$ and apply Lemma~\ref{lem:straddles-at-even}. \begin{itemize} \tightlist \item \emph{Perpendicular ends.} $j = 1$ cannot be straddled, since $(p - 1)/2 \geq 2$. \item \emph{Parallel ends, $D < p$.} The interval in (2) has length $D/p < 1$, so $\delta_1 = \delta_2 = n_0$ is its only integer, and $j \equiv jN = d_1 + n_0 \equiv \pi_0 + n_0 \pmod{2}$ for every straddled $j$. But $j = 1$ and $j = 2$ are both straddled. \item \emph{Parallel ends, $\varepsilon = +1$.} $g(p - j) \equiv -g(j) \pmod{1}$ and both lie in $(-1/D, 1/D) \subset (-\tfrac12, \tfrac12)$, so $g(p - j) = -g(j) \neq 0$. Label the pair $\{1, p - 1\}$ so that $g \coloneqq g(j) > 0$. By (1) and (2) the step at $j$ has $\delta_1 \in I \coloneqq (D/2, D/2 + 1 - gD]$ and the step at $p - j$ has $\delta_2 \in I$. Here $\delta_1 = jN - d_1 \equiv j - \pi_0$ and $\delta_2 = d_2 - (p - j)N \equiv j - \pi_0 + 1 \pmod{2}$: two integers of opposite parity in a half-open interval of length $1 - gD < 1$, which is impossible. \item \emph{Parallel ends, $\varepsilon = -1$, $D > p$} ($D = p$ would mean $P = 2N$, not coprime to $Q$). Take $j_0 \coloneqq (p - 3)/2$ and $p - j_0 = (p + 3)/2$, with $g \equiv -3/(2p)$ and $+3/(2p)$; by (2) both lie in $(-2/p, 2/p)$, so they are exactly $\mp3/(2p)$. If $D \geq 2p$, (2) excludes both. Otherwise, as in the previous case, the tight ends lie in $J \coloneqq (D/2 - D/p, D/2 + 1 - 3D/(2p)]$, of length $1 - D/(2p) < 1$, and have opposite parities. \end{itemize} \end{proof} \textbf{A.2. The edges at odd $Q$.} \begin{proposition}\label{prop:A-3} Let $Q = p^b$ with $p \geq 5$, $b \geq 2$, $Q \neq 25$; let $P$ be odd with $P \equiv \pm2 \pmod{p}$ and $u_0$ odd. No head-on-free $O$-launched connection ends at $A$ with $\kappa \leq 2N$ (the low edge) or $Q - 2N \leq \kappa < Q - Q/P$ (the window). ($Q = 25$ is in A.6.) \end{proposition} Here $\delta \coloneqq Q - P$ is even, $\beta = \delta\pi/2Q$, and $D' \coloneqq \pi/\beta = 2Q/\delta$. Put $K \coloneqq \kappa$ at the low edge ($K$ even) and $K \coloneqq Q - \kappa$ in the window ($K$ odd, $Q/P < K \leq 2N$). A \textbf{candidate} is an integer $z$ with $1 \leq z < K$, $z \not\equiv K \pmod{2}$ and $\operatorname{sgn} \sin(z\beta) = \operatorname{sgn} \sin((K - 1)\beta)$, and $u_z \coloneqq \{z/D'\}$ is its position in its sine block. The \textbf{fail zone} of $z$ is \begin{gather*} F(z) = [1 - 1/p, 1)\ (z < N), \quad [1 - 3/p, 1 - 1/p]\ (N < z < 2N) \quad \text{if } \varepsilon = +1; \\ F(z) = (0, 1/p]\ (z < N), \quad [1/p, 3/p]\ (N < z < 2N) \quad \text{if } \varepsilon = -1. \end{gather*} \begin{lemma}[edge kill]\label{lem:edge-kill} If a lead at an edge has a candidate $z$ with $z = N$ or $u_z \notin F(z)$, the connection does not exist. \end{lemma} \begin{proof} We use Corollary~\ref{cor:odd-the-signs-at-the} through the residue classes $R_{e'}$ of \S\ref{sec:5.4}, on which $S$ changes sign at most once (proof of Proposition~\ref{prop:the-middle-of-the-lead} (1)). Its change point is $t_{e'}$, the unique point of $[e', e' + Q)$ where $\sin(e'\beta - y\varepsilon\pi/p)$ vanishes, $y = (x - e')/N$, so $t_{e'} \equiv e' + \varepsilon e'\delta/2 \pmod{Q}$. (i) \emph{What a candidate is.} At the low edge $z$ is odd and $h(z) = \operatorname{sgn} \sin(z\beta)$, so a candidate is a frame below $\kappa$ with $h = h_0$: a carrier with $g = +1$. In the window $z$ is even and stands for the frame $Q - z > \kappa$; since $Q\beta = \delta\pi/2$, $S(x) = h(Q - x) = -(-1)^{\delta/2}\operatorname{sgn} \sin(x\beta)$ on even $x$, and $S(K - 1) = h(\kappa + 1) = -h_0$ (by Lemma~\ref{lem:the-arrival-arc-at}, $h(\kappa + 1)/h(\kappa - 1) = -c(\kappa + 1)/c(\kappa - 1) = -1$). So a candidate is a frame above $\kappa$ with $h = -h_0$: a non-carrier with $g = -1$. In both cases $z$ is $x_0$ or $x_1$ of $R_{e'}$, $e' \coloneqq z \bmod N$. (ii) \emph{Edge geometry.} At the low edge the carriers in $R_{e'}$ --- odd $x < \kappa \leq 2N$ and even $x > Q - \kappa \geq Q - 2N$ --- are at most the odd one of $x_0, x_1$ and the even one of $x_{p-2}, x_{p-1}$. In the window the non-carriers --- odd $x > \kappa \geq Q - 2N$ and even $x < K \leq 2N$ --- are at most the odd one of the top pair and the even one of the bottom pair. (iii) \emph{The kill.} If $z = N$ (low edge, $\kappa > N$), the odd multiple $N$ of $N$ is a carrier with $h = h_0$, which Corollary~\ref{cor:odd-the-signs-at-the} excludes. Otherwise the class dies as soon as a member across $t_{e'}$ from $z$ has the other role. At the low edge with $z = x_0 < N$ that member is the odd $x_{p-1}$, a non-carrier, and it is across when $t_{e'} < e' + (p - 1)N$. At the low edge with $z = x_1 > N$ it is the even $x_0$ (a non-carrier) when $t_{e'} \in (x_0, x_1)$, and the odd $x_{p-2}$ (a non-carrier) when $t_{e'} \in (x_1, x_{p-2})$. In the window with $z = x_0$ it is the even $x_{p-1}$, which stands for the carrier $N - z$; with $z = x_1$ it is the odd $x_0 < \kappa$ or the even $x_{p-2}$, which stands for the carrier $2N - e'$. So at both edges the class dies when $t_{e'} < e' + (p - 1)N$ ($z < N$), resp. $t_{e'} < e' + (p - 2)N$ ($z > N$). (iv) \emph{In terms of $u_z$.} Writing $z = e' + jN$, $j \in \{0, 1\}$, one has $e' + \varepsilon e'\delta/2 \equiv z + \varepsilon z\delta/2 \pmod{Q}$, because $jN(2 + \varepsilon\delta)/2 = \varepsilon jQ(N - \mu)/2$ and $N - \mu$ is even. So $t_{e'} \equiv z + \varepsilon Qu_z \pmod{Q}$. For $\varepsilon = +1$ and $z < N$, $t_{e'} = z + Qu_z$, and the condition reads $u_z < 1 - 1/p$. For $\varepsilon = +1$ and $z > N$, $t_{e'} = z + Qu_z$ if $u_z < 1 - 1/p$, and the condition reads $u_z < 1 - 3/p$; otherwise $t_{e'} = z + Qu_z - Q \in (z - N, z)$ and the condition holds. For $\varepsilon = -1$ and $z < N$, $t_{e'} = z + Q - Qu_z$ and the condition reads $u_z > 1/p$. For $\varepsilon = -1$ and $z > N$, $t_{e'} = z - Qu_z$ if $u_z < 1/p$, and the condition holds; otherwise $t_{e'} = z + Q - Qu_z$ and it reads $u_z > 3/p$. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:A-3}] By Lemma~\ref{lem:the-arrival-arc-at} the sign of $\sin(x\beta)$ differs at $K - 1$ and $K + 1$, so $\sin(x\beta)$ has a zero $JD' \in (K - 1, K + 1)$, $J \geq 1$, and $K - 1$ is a candidate with $u_{K-1} \in (1 - s, 1)$, $s \coloneqq 2/D' = \delta/Q$. Every fail zone lies in $[1 - 3/p, 1)$ ($\varepsilon = +1$), resp. $(0, 3/p]$ ($\varepsilon = -1$). \emph{$P > 3N$.} Then $s < 1 - 3/p$. The integers $z \equiv K - 1 \pmod{2}$ in the sine block of $K - 1$ are candidates, with $u_{K-1-2t} = u_{K-1} - ts$. At $\varepsilon = -1$, $u_{K-1} > 1 - s > 3/p$: take $z = K - 1$. At $\varepsilon = +1$, the first $t$ with $u_{K-1} - ts < 1 - 3/p$ has $u_{K-1} - ts > 1 - 3/p - s > 0$, so $z = K - 1 - 2t$ lies in the same block, and $z \geq 1$. \emph{$P < 3N$} ($P = 3N$ is not prime to $Q$). Put $a \coloneqq \alpha/\pi = P/2Q < 3/2p$. For odd $z$, $u_z = 1 - \{za + \tfrac12\}$ and $\operatorname{sgn} \sin(z\beta) = (-1)^{(z-1)/2}c(z)$; for even $z$, $u_z = 1 - \{za\}$ and $\operatorname{sgn} \sin(z\beta) = -(-1)^{z/2}\operatorname{sgn} \sin(z\alpha)$. Every $z$ below is $< N$ (at $p = 5$ this uses $N \geq 25$, i.e. $Q \neq 25$), so its zone is $\{za + \tfrac12\}$ resp. $\{za\}$ in $(0, 1/p]$ ($\varepsilon = +1$) or $[1 - 1/p, 1)$ ($\varepsilon = -1$). Write $\sigma_0 \coloneqq \operatorname{sgn} \sin((K - 1)\beta)$. \emph{Low edge} ($z$ odd); $\operatorname{sgn} \sin(\beta) = c(1) = +1$. \begin{itemize} \tightlist \item $\sigma_0 = +1$: $z = 1$, with $\{a + \tfrac12\} = a + \tfrac12 \in (1/p, 1 - 1/p)$, as $P < (p - 2)N$. \item $\sigma_0 = -1$, so $K \geq 4$. \begin{itemize} \tightlist \item $\varepsilon = +1$, $3a < \tfrac12$: $z = 3$; $c(3) = +1$, so $\operatorname{sgn} \sin(3\beta) = -1$, and $\{3a + \tfrac12\} > \tfrac12$. \item $\varepsilon = +1$, $3a > \tfrac12$: $z = 5$. Here $5a \in (5/6, 3/2)$, so $c(5) = -1$, $\operatorname{sgn} \sin(5\beta) = -1$, and $\{5a + \tfrac12\} = 5a - \tfrac12 > 1/3$. And $K \geq 6$, since $K = 4$ would give $\sigma_0 = -c(3) = +1$. \item $\varepsilon = -1$, $3P < Q - 2N$: $z = 3$, with $3a + \tfrac12 < 1 - 1/p$. \item $\varepsilon = -1$, $Q - 2N \leq 3P < Q$: $z = 5$. $5a \in (\tfrac12, 5/6)$, so $\operatorname{sgn} \sin(5\beta) = -1$ and $5a - \tfrac12 < 1/3$. And $K \geq 6$, because $\kappa = 4$ is no lead: $c(3) = +1 \neq c(5)$. \item $\varepsilon = -1$, $3P > Q$, $5P < (3p - 2)N$: $z = 5$; $5a \in (5/6, 3/2)$, so $c(5) = -1$, $\operatorname{sgn} \sin(5\beta) = -1$, and $5a - \tfrac12 < 1 - 1/p$; and $K \geq 6$, since $K = 4$ would give $\sigma_0 = -c(3) = +1$. \item $\varepsilon = -1$, $5P \geq (3p - 2)N$. With $P < 3N$ this forces $p = 5$. Then $7a \in [91/50, 21/10)$, so $c(7) = +1$, $\operatorname{sgn} \sin(7\beta) = -1$, and $\{7a + \tfrac12\} = 7a - 3/2 \in [8/25, 3/5)$. And $K \geq 8$: $\kappa = 6$ is no lead ($c(5) = -1 \neq c(7)$), and $K = 4$ gives $\sigma_0 = +1$. \end{itemize} \end{itemize} \emph{Window} ($z$ even, $K$ odd, $K > Q/P = 1/2a$); $\operatorname{sgn} \sin(2\beta) = +1$, and a lead $K = 5$ needs $\operatorname{sgn} \sin 4\alpha = \operatorname{sgn} \sin 6\alpha$, since $c(Q - x) = (-1)^{(P-1)/2}\operatorname{sgn} \sin(x\alpha)$. \begin{itemize} \tightlist \item $\varepsilon = -1$, $\sigma_0 = +1$: $z = 2$, with $2a = P/Q < 1 - 1/p$. \item $\varepsilon = -1$, $\sigma_0 = -1$, so $K \geq 5$. \begin{itemize} \tightlist \item $2P < Q - N$: $z = 4$; $4a < 1 - 1/p$, so $\operatorname{sgn} \sin(4\beta) = -1$ and $\{4a\} = 4a$. \item Otherwise $p = 5$ and $P \geq 2N$: $z = 6$; $6a \in (1, 2 - 1/p)$, so $\operatorname{sgn} \sin(6\beta) = -1$ and $6a - 1 < 1 - 1/p$. And $K \geq 7$: $K = 5$ would need $4a > 1$, and then $\sigma_0 = \operatorname{sgn} \sin(4\beta) = +1$. \end{itemize} \item $\varepsilon = +1$, $\sigma_0 = +1$: the least $z \equiv 2 \pmod{4}$ with $zP > 2N$, i.e. $\{za\} = za > 1/p$. If $P > N$ this is $z = 2$. If $P < N$, put $x \coloneqq N/P > 1$, so $z \in (2x, 2x + 4]$. If $(p - 2)x > 4$ (always at $p \geq 7$), then $z < px = Q/P < K$, so $z$ lies in the lower half of the first sine block, $\operatorname{sgn} \sin(z\beta) = +1$, and $z < N$ as $P > p$. At $p = 5$ with $x \leq 4/3$, take $z = 6$: $K > 5x > 5$ gives $K \geq 7$, $6a = 3/5x \in [9/20, 3/5)$, and $\operatorname{sgn} \sin(6\beta) = +1$. \item $\varepsilon = +1$, $\sigma_0 = -1$, so $K \geq 5$. \begin{itemize} \tightlist \item $2P > Q$ (only at $p = 5$): $z = 6$; $6a \in (3/2, 9/5)$, so $\operatorname{sgn} \sin(6\beta) = -1$ and $\{6a\} = 6a - 1 > \tfrac12$. And $K \geq 7$, since $K = 5$ gives $\sigma_0 = \operatorname{sgn} \sin(4\beta) = +1$ ($4a \in (1, 6/5)$). \item Otherwise: the least $z \equiv 0 \pmod{4}$ with $zP > 2N$. That is $z = 4$ if $P > N/2$ ($4a < 1$, $\operatorname{sgn} \sin(4\beta) = -1$, $4a > 1/p$). If $P < N/2$, then $x > 2$, $z \in (2x, 2x + 4] \subset (2x, px)$, so $z < Q/P < K$ lies in the first sine block, $\operatorname{sgn} \sin(z\beta) = -1$, and $z < N$. \end{itemize} \end{itemize} In every case Lemma~\ref{lem:edge-kill} applies. \end{proof} \textbf{A.3. The edges at even $Q$, $p \geq 11$.} \begin{proposition}\label{prop:A-5} Let $Q = 2^a p^b$ with $a, b \geq 1$, $p \geq 11$ and $N \geq 8$; let $P$ be odd with $P \equiv \pm2 \pmod{p}$, and $u_0$ of either parity. No head-on-free $O$-launched connection ends at $A$ with $\kappa \leq 4N$ or $Q - 4N \leq \kappa < Q - Q/P$. \end{proposition} Since $p$ is odd, $Q \equiv N \pmod{2N}$; here $N$ is even; $\delta \coloneqq Q - P$ is odd, $\beta = \delta\pi/2Q$, $D' \coloneqq 2Q/\delta$, and $u_z \coloneqq \{z/D'\} = \{z\delta/2Q\}$ as in A.2. The frames have the parity of $u_0$ and $\kappa$ the other (\S\ref{sec:5}), so by Lemma~\ref{lem:the-lead-on-the-frames} the carriers are the integers of $(0, \kappa)$ of the parity of the frames when $u_0$ is odd, and those of $(\kappa, Q)$ when $u_0$ is even. \emph{Ordinary chains, unfolded.} Lemma~\ref{lem:the-lead-on-the-frames} is stated on the chain of $e \in (0, N)$, but its proof uses Lemma~\ref{lem:the-chain-split} and nothing about the base point, so it holds verbatim on the chain $d_j \coloneqq d_0 + 2Nj$ ($0 \leq j < p$, listed in $(-Q, Q]$) of every residue $d_0$ modulo $2N$ that has the parity of the frames and is not divisible by $N$, with $\chi_j \coloneqq \operatorname{sgn}(d_j)(-1)^jc(d_j)$, $\rho_j \coloneqq \operatorname{sgn}(d_j)(-1)^jc^*\tau(|d_j|)$ and an integer $w$ of its own. Call such a chain \textbf{ordinary}. The chain of $-e$ is the reflection of the chain of $e$: it reads the same class, with $\chi$, $\rho$ and $w$ negated and $g = \chi\rho$ unchanged; below a chain may be either. \textbf{Unfold} an ordinary chain by $x(d) \coloneqq d$ for $d > 0$ and $x(d) \coloneqq d + Q$ for $d < 0$. Since $Q \equiv N \pmod{2N}$, its members become $x_i \coloneqq e + iN$ ($0 \leq i < p$) for some $0 < e < N$, taken alternately from positive and negative $d$, and $x_i$, $x_{i+2}$ are consecutive members on one side of $0$. (On the chain of $e$ this is the order of Lemma~\ref{lem:one-sign-change}: $x = e + N\omega(i)$.) \begin{lemma}[the unfolded chain]\label{lem:the-unfolded-chain} Let $p \geq 5$, $Q$ even and $P$ odd with $P \equiv 2\varepsilon \pmod{p}$, and let a head-on-free $O$-launched connection end at $A$ with lead offset $\kappa$. Take an ordinary chain, a member $a$ of it (a value of $d$), and $\omega_1 \in [0, Q)$ with $\omega_1 \equiv a + \varepsilon(Q - Pa)/2 \pmod{Q}$. \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item Up to one sign for the whole chain, $\chi = \operatorname{sgn} \cos(a\alpha + \varepsilon\pi(x - a)/Q)$ at every member, read at its unfolded position $x$. So along $x_0 < x_1 < \cdots < x_{p-1}$ the sign $\chi$ changes at most once, and only across $\omega_1$; no member is at $\omega_1$, and $\omega_1$ does not depend on the choice of $a$. \item $\rho(x_{i+2}) = -\rho(x_i)$ for $0 \leq i \leq p - 3$. \item (the witness criterion) Call a carrier with $g = +1$ a candidate, and let the witnesses of a candidate $y$ be $y$ itself, the non-carriers, and the carriers $x$ with $\rho(x) = -\rho(y)$. Lemma~\ref{lem:the-lead-on-the-frames} holds on the chain with some $w$ and $m \geq 0$ if and only if no candidate has witnesses on both sides of $\omega_1$. \end{enumerate} \end{lemma} \begin{proof} (1) As in Lemma~\ref{lem:one-sign-change}, $2N\alpha = \mu\pi + 2\varepsilon\pi/p$ with $\mu$ odd, so $(-1)^j \cos(d_j\alpha) =\allowbreak \pm\cos(a\alpha + \varepsilon\pi(d_j - a)/Q)$ with one sign for all $j$. At a negative member, $x = d + Q$, and shifting the argument by $\varepsilon\pi$ changes the sign of the cosine, which absorbs $\operatorname{sgn} d = -1$. As $x$ runs over $(0, Q)$ the argument moves monotonically through less than $\pi$, so the cosine has at most one zero there; it vanishes exactly at $x \equiv a + \varepsilon(Q - Pa)/2 \pmod{Q}$. A member at $\omega_1$ would have $c(d) = 0$ with $|d| < Q$, which \S\ref{sec:5} excludes. Changing $a$ to another member changes the formula by the sign only, so the zero is the same. (2) $x_i$ and $x_{i+2}$ have consecutive indices $j$, $j + 1$ and the same sign of $d$, and by Lemma~\ref{lem:the-lead-on-the-frames} (2)--(3) ($Q$ is even) $\rho$ changes sign at every step except, when $\kappa$ is odd, the step across $0$. (3) Since $g = \chi\rho$, Lemma~\ref{lem:the-lead-on-the-frames} gives $m = \chi(w - \rho)$ at carriers and $m = \chi w$ elsewhere. With no candidate, $\chi = -\rho$ at every carrier and $w = 0$ gives $m \geq 0$. A candidate $y$ has $\chi(y) = \rho(y)$, and $m(y) \geq 0$ forces $w = t\chi(y)$ with $t \geq 1$. Then a non-carrier $x$ needs $\chi(x) = \chi(y)$; a carrier with $\rho(x) = -\chi(y)$ has $m = \chi(x)\chi(y)(t + 1)$ and needs the same; and a carrier with $\rho(x) = \chi(y)$ has $m = \chi(x)\chi(y)(t - 1)$, which $t = 1$ makes $0$. So $w = \chi(y)$ works if $\chi$ is constant on the witnesses of $y$, and no $w$ works otherwise. If two candidates have different $\chi$, each is a witness of the other. By (1), $\chi$ is non-constant on a set of members if and only if the set has members on both sides of $\omega_1$. \end{proof} \emph{The two kinds of edge.} In the unfolded chain the carriers are: for $u_0$ odd, the positive members $x < \kappa$ and the negative members $x > Q - \kappa$; for $u_0$ even, the positive members $x > \kappa$ and the negative members $x < Q - \kappa$. So at the \textbf{sparse} edges --- $u_0$ odd with $\kappa \leq 4N$, and $u_0$ even with $\kappa \geq Q - 4N$ --- only members within $4N$ of the ends can carry, while at the \textbf{dense} edges --- $u_0$ odd with $\kappa \geq Q - 4N$, and $u_0$ even with $\kappa \leq 4N$ --- every member in $(4N, Q - 4N)$ is a carrier. \emph{Candidates at the sparse edges.} Put $K \coloneqq \kappa$ ($u_0$ odd) or $K \coloneqq Q - \kappa$ ($u_0$ even), so that $K \leq 4N$, and $\sigma_0 \coloneqq \operatorname{sgn} \sin((K - 1)\beta)$. For $u_0$ odd, Corollary~\ref{cor:odd-the-signs-at-the}'s computation $g = h_0h$ does not use that $Q$ is odd: a candidate is an odd frame $z < \kappa$ with $\operatorname{sgn} \sin(z\beta) = \sigma_0$. For $u_0$ even and an even frame $a$, $\cos(a\alpha) = (-1)^{a/2}\cos(a\beta)$, and $\cos((Q - z)\beta) = (-1)^{(\delta-1)/2}\sin(z\beta)$ since $Q\beta = \delta\pi/2$; so $g(Q - z) = \sigma'\cdot\operatorname{sgn} \sin(z\beta)$ for a sign $\sigma'$ independent of $z$, and $g(\kappa + 1) = c^*c(\kappa + 1)\tau(\kappa + 1) = 1$ gives $\sigma' = \sigma_0$. So in both cases the candidates are the frames $z$ ($u_0$ odd), resp. $Q - z$ ($u_0$ even), for the integers \[ 1 \leq z < K, \quad z \not\equiv K \pmod{2}, \quad \operatorname{sgn} \sin(z\beta) = \sigma_0, \] which is A.2's set. We place $z$ in the chain through $z$ ($u_0$ odd), resp. through $z - Q$ ($u_0$ even); in both its unfolded position is $x = z$. Also $g = -1$ on the other side of the lead ($\tau(\kappa \pm 1) = -1$ at the frame $\kappa \pm 1$ beyond it), so $\operatorname{sgn} \sin((K + 1)\beta) = -\sigma_0$: $\sin(x\beta)$ has a zero $JD' \in (K - 1, K + 1)$, and $u_{K-1} \in (1 - s, 1)$ with $s \coloneqq \delta/Q$. Finally, in the chain of a candidate $z$, \[ \omega_1 \equiv z + \varepsilon Qu_z \pmod{Q}: \] with $a = z$ ($u_0$ odd), $Q - Pz = Q(1 - z) + \delta z$ and $(1 - z)/2 \in \mathbb{Z}$; with $a = z - Q$ ($u_0$ even), $Q - P(z - Q) = Q(1 + P) - Qz + \delta z$ and $(1 + P)/2$, $z/2 \in \mathbb{Z}$. So the sign change sits at distance $Q\cdot\{\varepsilon u_z\}$ above $z$, read cyclically. \begin{lemma}[sparse kill]\label{lem:sparse-kill} Let $p \geq 5$, and let a head-on-free $O$-launched connection end at $A$ at a sparse edge, with a candidate $z$; if $z > N$, let $p \geq 7$. The connection does not exist if $z \in \{N, 3N\}$, or if $N \nmid z$ and $\{\varepsilon u_z\} \notin Z(z)$, where \[ Z(z) \coloneqq [1 - 1/p, 1), \quad [1 - 3/p, 1 - 1/p], \quad [1 - 3/p, 1 - 2/p], \quad [1 - 5/p, 1 - 3/p] \] for $z$ in $(0, N)$, $(N, 2N)$, $(2N, 3N)$, $(3N, 4N)$ respectively. \end{lemma} \begin{proof} If $z \in \{N, 3N\}$ (then $u_0$ is even, as $z$ is even), the candidate $Q - z = (p - 1)N$ or $(p - 3)N$ is a carrier divisible by $2N$ with $g = +1$, and Lemma~\ref{lem:the-lead-on-the-frames} gives $m = -g = -1$ there. Otherwise $z = x_k$ with $k = \lfloor z/N\rfloor \leq 3$. The member $x_0$, when it is not of the origin of $z$, and the members of the origin of $z$ above $Q - 2N$ are non-carriers when $p \geq 7$: for $u_0$ odd, a negative $x_0 < N$ has $|d| > Q - N > \kappa$, and positive members $x > Q - 2N \geq 5N > \kappa$; for $u_0$ even, a positive $x_0 < N < \kappa$, and negative members $x > Q - 2N$ have $|d| < 2N < Q - 4N \leq \kappa$. At $k = 0$ only $x_{p-1} > Q - N$ is used, and it is a non-carrier for $p \geq 5$: $x_{p-1} > 4N \geq \kappa$, resp. $|d| < N \leq Q - 4N \leq \kappa$. So the witnesses of $z$ include \begin{itemize} \tightlist \item $k = 0$: $x_{p-1}$ (of the origin of $x_0$, as $p - 1$ is even); they reach $[z, z + (p - 1)N]$; \item $k = 1$: $x_0$ and $x_{p-2}$; they reach $[z - N, z + (p - 3)N]$; \item $k = 2$: $x_{p-1}$, and $x_0$, which is a carrier ($x_0 < N < z < K$) with $\rho(x_0) = -\rho(z)$ by Lemma~\ref{lem:the-unfolded-chain} (2); they reach $[z - 2N, z + (p - 3)N]$; \item $k = 3$: $x_0$ and $x_{p-2}$; they reach $[z - 3N, z + (p - 5)N]$. \end{itemize} Write the reach as $[z - \ell, z + r]$. By Lemma~\ref{lem:the-unfolded-chain} (3) the connection dies if $\omega_1$ lies strictly inside it. Now $\omega_1 = z + Q\{\varepsilon u_z\}$ or $z + Q\{\varepsilon u_z\} - Q$, so $\omega_1$ is outside $(z - \ell, z + r)$ only if $r \leq Q\{\varepsilon u_z\} \leq Q - \ell$, i.e. $\{\varepsilon u_z\} \in [r/Q, 1 - \ell/Q] = Z(z)$. \end{proof} \begin{lemma}[dense kill]\label{lem:dense-kill} Let $p \geq 11$, and let a head-on-free $O$-launched connection end at $A$ with $\kappa \geq 4N$ ($u_0$ odd), resp. $\kappa \leq Q - 4N$ ($u_0$ even). An ordinary chain with $x_2 < \omega_1 < x_{p-3}$ excludes it. \end{lemma} \begin{proof} We find a candidate whose witnesses lie on both sides of $\omega_1$. Among $x_0, \ldots, x_3$ two members are positive and two negative, and likewise among $x_{p-4}, \ldots, x_{p-1}$. If $\omega_1 > x_3$, take the two members of $x_0, \ldots, x_3$ that are positive ($u_0$ odd), resp. negative ($u_0$ even): they carry, since $x < 4N \leq \kappa$, resp. $|d| = Q - x > Q - 4N \geq \kappa$. Otherwise $\omega_1 < x_3 < x_{p-4}$, and take the two members of $x_{p-4}, \ldots, x_{p-1}$ that are negative ($u_0$ odd), resp. positive ($u_0$ even): they carry, since $|d| = Q - x < 4N \leq \kappa$, resp. $x > Q - 4N \geq \kappa$. Either pair is $x_i$, $x_{i+2}$, on one side of $\omega_1$; so it has one $\chi$ and, by Lemma~\ref{lem:the-unfolded-chain} (2), opposite $\rho$, and one of the two has $g = \chi\rho = +1$: a candidate $y$. Among any three consecutive members $x_i, x_{i+1}, x_{i+2}$ there is a witness of $y$: either one of them is a non-carrier, or $x_i$ and $x_{i+2}$ are carriers of opposite $\rho$. So $y$ has a witness among $x_0, x_1, x_2$, below $\omega_1$, and one among $x_{p-3}, x_{p-2}, x_{p-1}$, above it; Lemma~\ref{lem:the-unfolded-chain} (3) applies. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:A-5}] \emph{The dense edges.} Let $e \coloneqq 1$ ($u_0$ odd) or $e \coloneqq 2$ ($u_0$ even), and take the chains of the residues $e$ and $e + N$ modulo $2N$. Both are ordinary and of the parity of the frames, and they read different classes, since $e + N \equiv \pm e \pmod{2N}$ would need $e = N/2$, and $N \geq 8$. Both unfold with $x_0 = e$: the first from $d = e$, the second from $d = e - Q \equiv e + N$. By Lemma~\ref{lem:the-unfolded-chain} (1) with $a = e$, resp. $a = e + N$, their points $\omega_1$ differ by $N - \varepsilon PN/2 \equiv Q/2 \pmod{Q}$, since $PN = 2\varepsilon N + \mu Q$ with $\mu$ odd. Lemma~\ref{lem:dense-kill} needs $\omega_1 - e \in (2N, Q - 3N)$, and the complementary arc $[Q - 3N, Q + 2N]$ $\pmod{Q}$ has length $5N < Q/2$, as $p \geq 11$; it cannot hold two points $Q/2$ apart. So one of the two chains satisfies Lemma~\ref{lem:dense-kill}, which applies because $\kappa \geq Q - 4N \geq 4N$ ($u_0$ odd), resp. $\kappa \leq 4N \leq Q - 4N$ ($u_0$ even). \emph{The sparse edges.} Every zone lies in $[1 - 5/p, 1)$. We exhibit a candidate that Lemma~\ref{lem:sparse-kill} accepts. \emph{$P > 5N$.} Then $s = \delta/Q < 1 - 5/p$. At $\varepsilon = -1$ take $z = K - 1$: $\{-u_{K-1}\} = 1 - u_{K-1} < s < 1 - 5/p$. At $\varepsilon = +1$, walk down the sine block of $K - 1$: $z = K - 1 - 2t$ is a candidate with $u_z = u_{K-1} - ts$ while $u_{K-1} - ts > 0$, and the first $t$ with $u_{K-1} - ts < 1 - 5/p$ has $u_{K-1} - ts > 1 - 5/p - s > 0$, so $z \geq 1$. In both cases $z < K \leq 4N$, and $z = 2N$ does not occur: $u_{2N} = \{\delta/p\} = \{-P/p\}$ is $1 - 2/p$ at $\varepsilon = +1$, which the walk passes over, and $2/p < 1 - s$ at $\varepsilon = -1$, while $u_{K-1} > 1 - s$. A stop at $z \in \{N, 3N\}$ is allowed by Lemma~\ref{lem:sparse-kill}. \emph{$P < 5N$} ($P = 5N$ is not prime to $Q$). Then $a \coloneqq \alpha/\pi = P/2Q < 5/2p$, and we use only $z < N$, so $Z(z) = [1 - 1/p, 1)$: the condition is $u_z < 1 - 1/p$ at $\varepsilon = +1$ and $u_z > 1/p$ at $\varepsilon = -1$. \begin{itemize} \tightlist \item \emph{$u_0$ odd} ($z$ odd; $u_z = \{\tfrac12 - za\}$ and $\operatorname{sgn} \sin(z\beta) = (-1)^{(z-1)/2}c(z)$). \begin{itemize} \tightlist \item $\sigma_0 = +1$: $z = 1$, as $\operatorname{sgn} \sin \beta = +1$; $u_1 = \tfrac12 - a \in (\tfrac12 - 5/2p, \tfrac12) \subset (1/p, 1 - 1/p)$. \item $\sigma_0 = -1$ (so $K \geq 4$), $3a < \tfrac12$, and $\varepsilon = +1$ or $3a < \tfrac12 - 1/p$: $z = 3$. Here $c(3) = +1$, $\operatorname{sgn} \sin(3\beta) = -1$, and $u_3 = \tfrac12 - 3a$ lies in $(0, \tfrac12)$, and above $1/p$ when $\varepsilon = -1$. \item $\sigma_0 = -1$ otherwise: $z = 5$ ($3a = \tfrac12$ would need $3 | Q$). Now $3a \geq \tfrac12 - 1/p$, so $5a \in [5/6 - 5/3p, 25/2p) \subset (\tfrac12, 3/2)$: $c(5) = -1$, $\operatorname{sgn} \sin(5\beta) = -1$, and $u_5 = \{\tfrac12 - 5a\} \in (0.36, 0.82)$. And $5 < K$: if $3a < \tfrac12$, then $c(3) = +1 \neq c(5)$, so $\kappa = 4$ is no lead; if $3a > \tfrac12$, then $\operatorname{sgn} \sin(3\beta) = +1 = \operatorname{sgn} \sin \beta$, and $\sigma_0 = -1$ excludes $\kappa \leq 4$. Also $5 < 8 \leq N$. \end{itemize} \item \emph{$u_0$ even} ($z$ even; $u_z = 1 - \{za\}$, and in the first sine block of $\alpha$ the sign of $\sin(z\beta) = -(-1)^{z/2}\sin(z\alpha)$ is $+$ at $z \equiv 2$ and $-$ at $z \equiv 0 \pmod{4}$; $K > Q/P = D/2 > p/5$, so $K \geq 3$). \begin{itemize} \tightlist \item $\varepsilon = -1$, or $\varepsilon = +1$ with $P > N$: the one of $z \in \{2, 4\}$ with $\operatorname{sgn} \sin(z\beta) = \sigma_0$. Here $4a = 2P/Q < 10/p \leq 1 - 1/p$, so both lie in the first block, $u_z = 1 - za > 1/p$, and at $\varepsilon = +1$, $za \geq 2a = P/Q > 1/p$. At $K = 3$, $\sigma_0 = \operatorname{sgn} \sin(2\beta) = +1$ and $z = 2 = K - 1$. \item $\varepsilon = +1$ with $P < N$: then $P \geq p + 2$. Take an even $z$ with $\operatorname{sgn} \sin(z\beta) = \sigma_0$ in $I \coloneqq [D/p, \min(K - 1, N - 1, D/2)]$. Since $K - 1 > D/2 - 1$, with $y \coloneqq N/P \in (1, N/(p + 2)]$ the length of $I$ is at least the smaller of $D/2 - 1 - D/p = (p - 2)y - 1 > 8$ and $N - 1 - 2y \geq Np/(p + 2) - 1 > 4$, so $I$ holds even integers of both residues modulo $4$. On $I$, $za = z/D \in (1/p, \tfrac12]$ ($D/p = 2N/P$ is not an integer), so $z$ is in the first block and $u_z = 1 - z/D < 1 - 1/p$. \end{itemize} \end{itemize} In every case the candidate lies below $K$ and, when $N \nmid z$, its $\{\varepsilon u_z\}$ lies outside $Z(z)$; Lemma~\ref{lem:sparse-kill} excludes the connection. \end{proof} \emph{Why $p \geq 11$.} At $p \in \{5, 7\}$ the arc $[Q - 3N, Q + 2N]$ is at least half the circle, so the two dense chains can both fail, Lemma~\ref{lem:sparse-kill}'s bookkeeping needs $p \geq 7$, and the rules for $P < 5N$ break (at $7/40$, $\kappa = 33$, the interval $I$ is $[16/7, 40/7]$ and holds no even integer $\equiv 2 \pmod{4}$). Appendix A.4 treats those primes. \textbf{A.4. Even $Q$, $p \in \{5, 7\}$.} \begin{proposition}\label{prop:A-9} Let $Q = 2^a p^b$ with $a, b \geq 1$, $p \in \{5, 7\}$ and $N \geq 8$; let $P$ be odd with $P \equiv \pm2 \pmod{p}$. No head-on-free $O$-launched connection ends at $A$, for either $u_0$. \end{proposition} The conventions are those of A.3. Reversing a connection to $A$ and exchanging the legs (\S\ref{sec:3.1}) gives a head-on-free connection of $(Q - P)/Q$ to $A$, and $Q - P$ is odd and $\equiv \mp2 \pmod{p}$; as both parities of $u_0$ are treated, we may take $P < Q/2$. Put $r \coloneqq P/Q < \tfrac12$ and $a \coloneqq \alpha/\pi = r/2 < \tfrac14$. Lemma~\ref{lem:the-top-of-the-range} removes $\kappa > Q - Q/P$. Since $Q - 4N \leq 3N < 4N$, every other lead lies at a sparse or a dense edge of A.3. \emph{The sparse leads} ($u_0$ odd with $\kappa \leq 4N$; $u_0$ even with $Q - 4N \leq \kappa < Q - Q/P$). We find a candidate $z < N$ with $\{\varepsilon u_z\} \notin [1 - 1/p, 1)$; Lemma~\ref{lem:sparse-kill}, which for $z < N$ holds at $p = 5$, then excludes the connection. The candidates are A.2's set (A.3), with $K \coloneqq \kappa$ at the low edge, and with $K \coloneqq Q - \kappa$ at the high edge in place of the window, and the rules in A.2's proof of Proposition~\ref{prop:A-3} for $P < 3N$ choose one. Those rules read only $a$, the signs of $\sin(z\beta)$ and the positions $u_z$, which are given by the same formulas here, and they carry over with four changes, each checked branch by branch: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item the bound $P < 3N$ enters only through $5a < 3/2$, $6a < 2 - 1/p$ and $P < (p - 2)N$, and $P < Q/2$ gives all three ($5a < 5/4$, $6a < 3/2$); \item the branches $\varepsilon = -1$, $5P \geq (3p - 2)N$ (low edge) and $\varepsilon = +1$, $\sigma_0 = -1$, $2P > Q$ (window) are empty; \item the window's branch $\varepsilon = -1$, $\sigma_0 = -1$, $2P \geq Q - N$, which at odd $Q$ occurs only at $p = 5$, occurs also at $p = 7$ with $P \geq 3N$, and its choice $z = 6$ stands, as $6a = 3P/Q \in (9/7, 3/2)$; \item every $z$ chosen is at most $6$, or at most $2N/P + 4$ with $P \geq p + 2$, so $z < N$ follows from $N \geq 8$. \end{enumerate} \emph{The dense leads} ($u_0$ odd with $\kappa > 4N$; $u_0$ even with $\kappa < Q - 4N = (p - 4)N$). At $u_0$ odd, $K \coloneqq Q - \kappa$ is even with $Q/P < K < (p - 4)N$, so $K \geq 4$. For $0 < e < N$ of the parity of the frames, let $(e, +)$ and $(e, -)$ be the chains of the residues $e$ and $e + N$ modulo $2N$. Both unfold with $x_0 = e$ (proof of Proposition~\ref{prop:A-5}); the member $x_i$ of $(e, +)$ comes from a positive $d$ when $i$ is even, and that of $(e, -)$ when $i$ is odd. Put $\theta \coloneqq e\beta/\pi$, $b \coloneqq N\beta/\pi = \delta/2p$, $\zeta \coloneqq (-1)^{(\delta-1)/2}$, and $\lambda \coloneqq \operatorname{sgn} \sin((\kappa - 1)\beta)$ ($u_0$ odd), resp. $\lambda \coloneqq \operatorname{sgn} \cos((\kappa + 1)\beta)$ ($u_0$ even). \begin{lemma}[cell form]\label{lem:cell-form} On the chain $(e, \pm)$: \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item $\omega_1 \equiv e + Qf \pmod{Q}$, where $f \coloneqq \{\varepsilon(\theta + [u_0\text{ even}]/2) + [-]/2\}$ and $[-]$ is $1$ on $(e, -)$ and $0$ on $(e, +)$; \item at a member $x_i$ from a positive $d$, $g = \lambda \operatorname{sgn} \sin(\pi(\theta + ib))$ ($u_0$ odd), resp. $g = \lambda \operatorname{sgn} \cos(\pi(\theta + ib))$ ($u_0$ even); at one from a negative $d$, sine and cosine are exchanged and the factor $\zeta$ is added; \item $b \equiv \tfrac12 - \varepsilon/p$ or $3/2 - \varepsilon/p \pmod{2}$, and $\zeta$ is determined by $p$ and $b \bmod 2$. \end{enumerate} Two members $x_i$, $x_{i'}$ lie on opposite sides of $\omega_1$ if and only if exactly one of $i$, $i'$ is less than $pf$. So, once the carrier status of every member is fixed, which members are candidates and which pairs lie on opposite sides of $\omega_1$ depend on $\theta$ only through the cell $(j/2p, (j + 1)/2p)$ of $\theta \bmod 2$ that contains it; and $\theta \notin (1/2p)\mathbb{Z}$. \end{lemma} \begin{proof} (1) Lemma~\ref{lem:the-unfolded-chain} (1) with $a = e$ gives $\omega_1 - e \equiv \varepsilon Q\cdot(Q - Pe)/2Q \pmod{Q}$, and $(Q - Pe)/2Q = \tfrac12 - eP/2Q \equiv \theta + (1 - e)/2 \pmod{1}$, since $\theta = e(Q - P)/2Q$; this is $\theta$ for odd $e$ and $\theta + \tfrac12$ for even $e$, and $e$ has the parity of $u_0$. On $(e, -)$, $a = e + N$ moves $\omega_1$ by $Q/2$ (proof of Proposition~\ref{prop:A-5}). (2) By the computation of the candidates in A.3, $g(a) = \lambda \operatorname{sgn} \sin(a\beta)$ at odd frames ($u_0$ odd), and at even frames ($u_0$ even) $g(a)$ is a fixed sign times $\operatorname{sgn} \cos(a\beta)$, the sign being $\lambda$ because $g(\kappa + 1) = 1$. A member from a positive $d$ is the frame $x$, and one from a negative $d$ is the frame $Q - x$, with $\sin((Q - x)\beta) = \zeta \cos(x\beta)$ and $\cos((Q - x)\beta) = \zeta \sin(x\beta)$, since $Q\beta = \delta\pi/2$ with $\delta$ odd. And $x_i\beta/\pi = \theta + ib$. (3) $\delta = Q - P = (N - \mu)p - 2\varepsilon$, so $b = (N - \mu)/2 - \varepsilon/p$ with $(N - \mu)/2 \in \tfrac12 + \mathbb{Z}$; and $\delta = 2pb$, so $\delta \bmod 4$, hence $\zeta$, is fixed by $b \bmod 2$. For the last part: if $e + Qf < Q$, then $\omega_1 = e + Qf$ and $x_i = e + iN$ lies below it iff $i < pf$; otherwise $\omega_1 < e$, all members lie above it, and $pf \geq p - e/N > p - 1$, so every index is $< pf$. The comparison $i < pf$ changes only where $f \in (1/p)\mathbb{Z}$, that is at $\theta \in (1/2p)\mathbb{Z}$; the signs in (2) change only where $\theta + ib \in \tfrac12\mathbb{Z}$, and $ib \in (1/2p)\mathbb{Z}$ by (3). Finally $\theta \in (1/2p)\mathbb{Z}$ would mean $N | e\delta$, i.e. $N | e$, since $\gcd(\delta, Q) = 1$. \end{proof} \begin{lemma}[forced statuses]\label{lem:forced-statuses} At a dense lead, the members of $(e, \pm)$, $e \leq 6$, listed here are carriers or non-carriers for every $\kappa$ in the stated range; the others are left open. \begin{itemize} \tightlist \item $u_0$ odd. The member $x_0$ of $(e, -)$ is a non-carrier, except at $K = 4$ with $e = 5$, where it is a carrier. At $p = 5$ every other member is a carrier, except $x_4$ of $(e, +)$, which is one when $K = 4$ and $e \leq 3$ and is left open otherwise. At $p = 7$ the members from a positive $d$ with $i \leq 3$ and those from a negative $d$ with $i \geq 3$ are carriers, and at $K = 4$ so are $x_1$ and $x_4$ of $(e, +)$ and $x_2$ of $(e, -)$. \item $u_0$ even, $\kappa = 1$: every member is a carrier. \item $u_0$ even, $\kappa = 3$: $x_0$ of $(2, +)$ is a non-carrier, $x_{p-1}$ of $(6, -)$ is left open, and every other member is a carrier. \item $u_0$ even, $\kappa \geq 5$: $x_0$ of $(e, +)$ is a non-carrier for $e \leq 4$ and is left open for $e = 6$. At $p = 5$ every other member is a carrier, except $x_4$ of $(e, -)$, which is left open. At $p = 7$ the members from a positive $d$ with $i \geq 3$ and those from a negative $d$ with $i \leq 3$ are carriers. \end{itemize} \end{lemma} \begin{proof} For $u_0$ odd a member from a positive $d$ carries iff $x < Q - K$, and one from a negative $d$ iff $x > K$. The member $x_0 = e$ of $(e, -)$ is from a negative $d$, and $e \leq 5 < K$ unless $K = 4 < e = 5$. At $p = 5$, $K < N$: positive members $x \leq e + 3N < 4N = Q - N$ carry, and, at $K = 4$, so does $x_4 = e + 4N < Q - 4 = 5N - 4$ when $e \leq 3$, as $N \geq 8$; negative members other than $x_0$ of $(e, -)$ have $x \geq e + N > K$. At $p = 7$, $K < 3N$: positive $x \leq e + 3N < 4N = Q - 3N$, negative $x \geq e + 3N > K$, and at $K = 4$ also positive $x = e + 4N < 7N - 4$ and negative $x \geq e + N > 4$. For $u_0$ even a member from a positive $d$ carries iff $x > \kappa$, and one from a negative $d$ iff $x < Q - \kappa$. At $\kappa = 1$ nothing fails this. At $\kappa = 3$ the only non-carrier frame is $2$: the member $x = 2$, which is $x_0$ of $(2, +)$, and the member $x = Q - 2$, which lies in a chain with $e = N - 2$, so among $e \leq 6$ only in $(6, -)$ at $N = 8$. At $\kappa \geq 5$, the member $x_0 = e$ of $(e, +)$ is below $5 \leq \kappa$ for $e \leq 4$. At $p = 5$, $\kappa < N$: positive $x \geq e + N > \kappa$ and negative $x \leq e + 3N < 4N = Q - N < Q - \kappa$. At $p = 7$, $\kappa < 3N$: positive $x \geq e + 3N > \kappa$ and negative $x \leq e + 3N < Q - 3N$. \end{proof} \begin{proposition}[the certificate; computer-assisted]\label{prop:the-certificate-computer-assisted} Let $p \in \{5, 7\}$, and take one of the five sub-cases $u_0$ odd with $K = 4$ or $K \geq 6$, and $u_0$ even with $\kappa = 1$, $\kappa = 3$ or $\kappa \geq 5$; a sign $\varepsilon = \pm1$; $b \in \{\tfrac12 - \varepsilon/p, 3/2 - \varepsilon/p\} \pmod{2}$, with $\zeta$ as in Lemma~\ref{lem:cell-form} (3); an $r \in (0, \tfrac12)$ outside the finite set $B \coloneqq \bigcup_{1 \leq e \leq 6}(1/ep)\mathbb{Z} \cup \bigcup_{1 \leq m \leq 5}(1/m)\mathbb{Z}$; and a sign $\lambda$ admissible at $r$. Then for some $e \in \{1, 3, 5\}$ ($u_0$ odd), resp. $e \in \{2, 4, 6\}$ ($u_0$ even), and some sign $\pm$, the chain $(e, \pm)$ at $\theta = e(1 - r)/2$, with the statuses of Lemma~\ref{lem:forced-statuses} and the cell form of Lemma~\ref{lem:cell-form}, has a member $y$ that is a carrier with $g = +1$ and, on the other side of $\omega_1$, a member that is a non-carrier or a carrier with $g = +1$, every status used being one of Lemma \ref{lem:forced-statuses}'s. Admissible: at $u_0$ odd, $K = 4$, only if $r > \tfrac14$ and $\operatorname{sgn} \sin(3\pi r/2) = \operatorname{sgn} \sin(5\pi r/2)$, and then $\lambda = \zeta \operatorname{sgn} \cos(5\pi(1 - r)/2)$; at $u_0$ even, $\kappa = 1$, $\lambda = \operatorname{sgn} \cos(\pi(1 - r))$; at $\kappa = 3$, only if $r < \tfrac14$, and then $\lambda = \operatorname{sgn} \cos(2\pi(1 - r))$; in the other two sub-cases both signs. \end{proposition} \begin{proof} The data the assertion reads --- the cell of each $\theta_e$ (Lemma~\ref{lem:cell-form}), the conditions for admissibility and the forced values of $\lambda$ --- change only at points of $B$: $\theta_e = e(1 - r)/2$ meets $(1/2p)\mathbb{Z}$ only at $r \in (1/ep)\mathbb{Z}$, and the sines and cosines in the admissibility conditions vanish only at $r \in (1/m)\mathbb{Z}$ with $m \leq 5$, as does $r = \tfrac14$. So the assertion is constant on each open interval between consecutive points of $B \cap [0, \tfrac12]$, and it is checked, in exact rational arithmetic, at the midpoint of each: $1 672$ cases ($p$, sub-case, interval, $\varepsilon$, $b$, $\lambda$), every one certified. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:A-9}] The sparse leads were treated above. A dense lead belongs to one of the five sub-cases, with the $\varepsilon$, $b \bmod 2$ and $\lambda$ of its centre, and its $\lambda$ is admissible at $r = P/Q$: at $K = 4$, $\kappa = Q - 4$ is a lead below Lemma~\ref{lem:the-top-of-the-range}'s range only if $K > Q/P$ and $c(Q - 5) = c(Q - 3)$, and $c(Q - y) = (-1)^{(P-1)/2}\operatorname{sgn} \sin(y\alpha)$, while $\lambda = \operatorname{sgn} \sin((Q - 5)\beta) = \zeta \operatorname{sgn} \cos(5\beta)$; at $\kappa = 1$, $\lambda = \operatorname{sgn} \cos(2\beta)$; at $\kappa = 3$, a lead needs $c(2) = c(4)$, that is $4\alpha < \pi/2$ (as $2\alpha < \pi/2$), and $\lambda = \operatorname{sgn} \cos(4\beta)$. The centre $r$ never lies in $B$, so Proposition~\ref{prop:the-certificate-computer-assisted} applies to it on the open interval containing it: $r \in (1/ep)\mathbb{Z}$ with $\gcd(P, Q) = 1$ forces $Q | ep$, that is $N | e$, impossible for $e \leq 6 < 8 \leq N$, and $r \in (1/m)\mathbb{Z}$ forces $Q | m \leq 5$. Proposition~\ref{prop:the-certificate-computer-assisted} names a chain $(e, \pm)$, and by Lemmas~\ref{lem:cell-form} and \ref{lem:forced-statuses} it has a candidate $y$ and, across $\omega_1$, a non-carrier or a candidate. Either is a witness of $y$: a candidate $y'$ across has $\rho(y') = \chi(y') = -\chi(y) = -\rho(y)$. Lemma~\ref{lem:the-unfolded-chain} (3) excludes the connection. \end{proof} The certificate is one of two computer-assisted steps outside A.6; the other is in A.5. \textbf{A.5. The prime $3$.} \begin{proposition}\label{prop:A-13} Let $Q = 2^a 3^b$ with $b \geq 1$, and let $P$ be coprime to $Q$ with $\min(P, Q - P) \geq 2$. No head-on-free $O$-launched connection of $P/Q$ ends at $O$ or at $A$. \end{proposition} Every $P$ prime to $3$ is $\equiv \pm2 \pmod{3}$, so \S\ref{sec:5}'s conventions hold with $p = 3$: $N = Q/3$, $h = 1$, $P \equiv 2\varepsilon \pmod{3}$. At $Q \leq 80$ the proposition is part of the census A.6, so let $Q \geq 81$; then $N \geq 27$. A chain has three members, and the class of $0 < e < N$ is $K(e) = \{e, 2N - e, 2N + e\}$, one member in each of the thirds \[ L \coloneqq (0, N), \quad M \coloneqq (N, 2N), \quad U \coloneqq (2N, Q). \] (These letters are local to A.5.) Put $D \coloneqq 2Q/P$, as in \S\ref{sec:5}; then $N/D = P/6$ and $2N/D = P/3$. Lemma~\ref{lem:straddles} needs $p \geq 5$, and at $p = 3$ its place is taken by a property of single steps: a connection can get across a zero of $\sin(y\alpha)$ only by a reflection at the one frame of its parity next to that zero. \emph{The gates.} Lemma~\ref{lem:the-step-rule} (for odd $P$), and the step rule of A.1 at parallel ends (for even $P$), give, for consecutive frames $d < d'$ of reflections in $L_1$: $d' \neq d$, and $\sin(y\alpha)$ has one sign on the integers strictly between them. The zeros of $\sin(y\alpha)$ are the points $nD$, and for $0 < n < P/2$ the point $nD$ is not an integer: for odd $P$, $nD = 2Qn/P$ with $\gcd(P, 2Q) = 1$ and $P \nmid n$, and for even $P$, $nD = Qn/(P/2)$ with $\gcd(P/2, Q) = 1$. For a parity $\varpi$, the \textbf{gate} $z_n$ of $nD$ is the unique integer $\equiv \varpi \pmod{2}$ with $|z_n - nD| < 1$; it lies in the third of $nD$ unless it is $N$ or $2N$. \begin{lemma}[the gate]\label{lem:the-gate} Let $P$ be odd, or even with parallel ends. If a head-on-free $O$-launched connection reflects in $L_1$ at frames (of parity $\varpi$) on both sides of a zero $nD \in (0, Q)$, it reflects in $L_1$ at $z_n$. \end{lemma} \begin{proof} Some two consecutive frames $d < d'$ of reflections in $L_1$ satisfy $d < nD < d'$. They have the same parity, so $d' - d \geq 2$, and the integers strictly between them, among them $d + 1$ and $d' - 1$, lie on one side of $nD$. So $nD < d + 1$ or $nD > d' - 1$, and the end within $1$ of $nD$ is $z_n$. \end{proof} \emph{The target $O$ at odd $P$: good frames and good gates.} By \S\ref{sec:5.1}, $m$ is constant on each class, vanishes on the frames divisible by $N$, and vanishes on $K(e)$ unless $e$ is \textbf{good}, which by Lemma~\ref{lem:one-sign-change} at $p = 3$ means \[ \text{frac}(e/D) \in (\tfrac12, 5/6)\text{ (}\varepsilon = +1\text{), } \quad \text{frac}(e/D) \in (1/6, \tfrac12)\text{ (}\varepsilon = -1\text{),} \] as $e\alpha/\pi = e/D$. A frame is good if its class is. For a gate write $\zeta_n \coloneqq z_n - nD \in (-1, 1)$. Its class is read from $e = z_n$ in $L$, $e = 2N - z_n$ in $M$ and $e = z_n - 2N$ in $U$, and since $\text{frac}(nD/D) = 0$, $2N/D = P/3 \equiv -\varepsilon/3 \pmod{1}$ and $|\zeta_n|/D < \tfrac12$, the gate is good exactly when \[ |\zeta_n| < D/6\text{ (in }M\text{); } \quad -\varepsilon\zeta_n > D/6\text{ (in }L\text{); } \quad \varepsilon\zeta_n > D/6\text{ (in }U\text{).} \] Equivalently, with the \textbf{phase} $\psi_n \coloneqq \zeta_n/2 \in (-\tfrac12, \tfrac12)$ and $\vartheta \coloneqq D/12$: a gate in $M$ is good iff $|\psi_n| < \vartheta$, one in $L$ iff $\psi_n$ lies in $(-\tfrac12, -\vartheta)$ ($\varepsilon = +1$), resp. $(\vartheta, \tfrac12)$ ($\varepsilon = -1$), and one in $U$ iff it lies in the other of these two arcs. Since $z_n \equiv \varpi \pmod{2}$ and $nD/2 = nQ/P$, \[ \psi_n \equiv \varpi/2 - nQ/P \pmod{1}, \] so along consecutive $n$ the phases rotate by $-Q/P$. The gates $N$ and $2N$ are not good frames ($N$ divides them). \emph{The reduction.} Let a head-on-free $O$-launched connection end at $O$. Its first reflection, at $d_l$, has $m \geq 1$, so its class $K(e)$ is good, $e \equiv u_0 \equiv \varpi \pmod{2}$, and the connection reflects at $e$ and at $2N + e$. By Lemma~\ref{lem:the-gate} it reflects at the gate of every zero of $\sin(y\alpha)$ in $(e, 2N + e)$, where then $m \geq 1$. \textbf{So it suffices that every good class $K(e)$ has, at the parity $\varpi \equiv e$, a gate $z_n$ with $nD \in (e, 2N + e)$ that is not good} --- a \emph{bad gate} of the class. Lemma~\ref{lem:bad-gates} gives one, with one exception, which a separate argument excludes. \begin{lemma}[bad gates]\label{lem:bad-gates} Let $Q = 2^a 3^b \geq 81$, $P$ odd and coprime to $Q$ with $2 \leq P \leq Q - 2$, and $\varpi \in \{0, 1\}$. Every good class $K(e)$ with $e \equiv \varpi \pmod{2}$ has a bad gate, except the class of $e = N - 1$ when $Q = 3^{2k}$, $P = (Q + 1)/2$ and $\varpi = 0$. The proof below leaves finitely many cases, all at $Q = 2^a 3^b$ with $80 < Q < 280$, where it is checked directly. \end{lemma} \begin{proof} $N/D = P/6$ and $P \equiv \pm1 \pmod{6}$ give $\text{dist}(N, D\mathbb{Z}) = D/6$, and $\text{dist}(2N, D\mathbb{Z}) = D\cdot\text{dist}(P/3, \mathbb{Z}) = D/3$. \emph{(i) $D > 6$, i.e. $P < Q/3$.} Here $|\zeta_n| < 1 < D/6$, so every gate in $L$ or $U$ is bad. As $\text{dist}(N, D\mathbb{Z}) > 1$ and $\text{dist}(2N, D\mathbb{Z}) > 2$, a zero in $(e + 1, N)$ has its gate in $L$, above $e$, and a zero in $(2N, 2N + e)$ has its gate in $U$; either is a bad gate of $K(e)$. Suppose neither interval holds a zero. Write $P/6 = q + f$ with $q \in \mathbb{Z}$ and $f \in \{1/6, 5/6\}$. The first zero above $2N$ is at distance $(1 -\text{ frac}(2f))D \leq 2D/3$ from it, so $e < 2D/3$; the last zero below $N$ is $qD$, so $qD < e + 1 < 2D/3 + 1 < D$. Hence $q = 0$ and $P = 5$, so $\varepsilon = +1$ and $f = 5/6$, and then $e < D/3$, while a good $e$ has $e/D > \tfrac12$. \emph{(ii) $D < 6$ and $\varpi \equiv N \pmod{2}$.} The zero nearest $N$ is within $D/6 < 1$ of it, so its gate is $N$, and it lies in $(N - 1, N + 1) \subset (e, 2N + e)$. \emph{If also $D < 3$ and $\varpi = 0$:} the zero nearest $2N$ is within $D/3 < 1$ of it, so its gate is $2N$, and it lies in $(2N - 1, 2N + 1) \subset (e, 2N + e)$. Both gates are bad. This settles $D < 3$ at odd $Q$ ($N$ odd), and $D < 6$ at $\varpi \equiv N$. \emph{(iii) $D < 3$, $Q$ even, $\varpi = 1$.} Put $j \coloneqq Q - P$: it is odd and prime to $3$, and $j \geq 5$ as $P \leq Q - 2$. With $s \coloneqq j/P < \tfrac12$ and $\vartheta = D/12 \in (1/6, \tfrac14)$, the phases of consecutive gates in $M$ form a progression of step $-s$ $\pmod{1}$, because $-Q/P \equiv -s$. Suppose all the gates of the zeros in $(N + 1, 2N - 1)$ are good; these zeros lie in $(e, 2N + e)$, and their gates in $M$. There are $k \geq (N - 2)/D - 1 > P/6 - 2$ of them. The bad arc $[\vartheta, 1 - \vartheta]$ has length $1 - 2\vartheta > \tfrac12 > s$. If the progression spans at least $1$ it meets every arc of length $s$, the bad arc included; otherwise it cannot step over the bad arc, so it lies in one lift of $(-\vartheta, \vartheta)$ and $(k - 1)s < 2\vartheta = N/P$, that is, $(k - 1)j < N$. But $(k - 1)j > 5(P/6 - 3) \geq P/2 > N$ once $P \geq 45$, and $P < 45$ would give $Q < 3P/2 < 68$. \emph{The middle band, $Q/3 < P < 2Q/3$ ($3 < D < 6$), $\varpi \not\equiv N$.} Put $\lambda \coloneqq 1 - Q/(3P) \in (0, \tfrac12)$. Then $\vartheta = (1 - \lambda)/2$, the phases of consecutive gates differ by $-Q/P \equiv 3\lambda \pmod{1}$, a gate in $M$ is bad iff $\psi_n$ lies in the arc of length $\lambda$ centred at $\tfrac12$, and a good gate in $L$ or $U$ has its phase in one of the two arcs $(-\tfrac12, -\tfrac12 + \lambda/2)$, $(\tfrac12 - \lambda/2, \tfrac12)$ of length $\lambda/2$. Two consecutive gates in one third ($L$ or $U$) are therefore never both good unless $\text{dist}(3\lambda, \mathbb{Z}) \leq \lambda/2$, that is, $|3\lambda - 1| \leq \lambda/2$, $\lambda \in [2/7, 2/5]$, which is \textbf{$7Q/15 \leq P \leq 5Q/9$} (the \emph{window}). \emph{(iv) Off the window.} The zeros in $(e + 1, N - 1)$ have their gates in $L \setminus \{e\}$, and those in $(2N + 1, 2N + e - 1)$ in $U \setminus \{2N + e\}$; each set of zeros is consecutive. If all their gates are good, each set has at most one member. But together they hold at least $(N - 4)/D - 2$ zeros, which is $\geq 3$ when $N \geq 5D + 4$, true for $Q \geq 102$. ($Q = 81, 96$: the direct check.) \emph{(v) In the window.} Put $s \coloneqq 2 - Q/P = 3\lambda - 1$, so $|s| \leq \lambda/2$, $\psi_n \equiv \varpi/2 + ns \pmod{1}$, and $j \coloneqq |Q - 2P| = P|s|$. The phases of the gates in $M$ form a progression of step $s$, and $|s| < \lambda$, so if they are all good they lie in one lift of $(-\vartheta, \vartheta)$ and $(k - 1)|s| < 2\vartheta = 1 - \lambda \leq 5/7$, with $k - 1 > P/6 - 3$ as in (iii). For $j \geq 5$ this gives $j(P - 18) < 30P/7$, so $P < 126$ and $Q \leq 15P/7 < 280$ (the direct check). $j = 3$ does not occur, since $3 \nmid Q - 2P$. If $j = 4$, then $Q$ is even and $\varpi = 1$, and the zero $nD$ with $n$ the integer nearest $P/4$ lies within $Q/(2P) < 2$ of $Q/2$, inside $M$; as $4n = P \pm 1$ and $s = \pm4/P$ (independent signs), its phase is $\tfrac12 \pm 1/P$ for some sign, within $\lambda/2$ of $\tfrac12$ since $P \geq 20$ in the window: a bad gate. So $j \in \{1, 2\}$. \begin{itemize} \tightlist \item \emph{$j = 2$, $Q = 2P \mp 2$.} Then $Q$ is even, $\varpi = 1$, $\varepsilon = \mp1$ and $\psi_n \equiv \tfrac12 \pm 2n/P$. A zero in $L$ has $n < P/6$, so its phase lies in $(\tfrac12, 5/6)$ (upper sign), resp. $(1/6, \tfrac12)$ (lower sign), outside the arc where a gate in $L$ is good; a zero in $U$ has $P/3 < n < P/2$, and its phase lies in $(1/6, \tfrac12)$, resp. $(\tfrac12, 5/6)$, outside the arc for $U$. So every gate in $L$ or $U$ is bad, and a surviving class has no zero in $(e + 1, N - 1)$ or in $(2N + 1, 2N + e - 1)$: $N - e - 2 < D$ and $e - 2 < D$, so $N < 2D + 4 < 13$, against $N \geq 27$. \item \emph{$j = 1$, $Q = 2P + 1$.} Then $Q$ is odd, so $\varpi = 0$, and $P \equiv 1 \pmod{6}$, $\varepsilon = -1$. The last zero below $N$ is $qD = N - D/6$, with $D/6 = 2/3 + 1/(3P) \in (\tfrac12, 1)$; its gate is $N - 1$, with $\psi = -1/6 + 1/(6P) < 0$, bad. It lies in $(e, 2N + e)$ for every even $e \leq N - 3$. And $e = N - 1$ is not good: $\text{frac}((N - 1)/D) = 7/6 - 1/D \in (5/6, 1)$. \item \emph{$j = 1$, $Q = 2P - 1$.} Then $Q$ is odd, $\varpi = 0$, $P \equiv 5 \pmod{6}$, $\varepsilon = +1$, $D = 4Q/(Q + 1)$, and $Q \equiv 1 \pmod{4}$ (as $P$ is odd), so $Q = 3^{2k}$. The last zero below $N$ is $qD = N - 5D/6$, with $5D/6 \in (3, 10/3)$; its gate is $N - 3$, with $\psi = 1/6 - 5/(6P) > 0$, bad. It lies in $(e, 2N + e)$ unless $e \in \{N - 1, N - 3\}$. The class of $N - 3$ is not good ($\text{frac}((N - 3)/D) = 1/12 - 3/(4Q)$); the class of $N - 1$ is good ($\text{frac }= 7/12 - 1/(4Q)$), and it is the exception. \end{itemize} \end{proof} \emph{The exception.} Let $Q = 3^{2k} \geq 81$, $P = (Q + 1)/2$, and suppose a connection to $O$ reflects at the frames $N - 1$ and $3N - 1$ of the class of $N - 1$. Then $N - 1$ is one end of a pair of consecutive frames of reflections in $L_1$ whose other end $d$ is good. By Lemma~\ref{lem:the-step-rule}, $(\min, \max)$ of the pair holds exactly one zero $y_0$ of $\cos(y\alpha)$, and the zeros $y_0 \pm D/2$ of $\sin(y\alpha)$ lie outside $(\min + 1, \max - 1)$. With $qD = N - 5D/6$ as above, the zeros of $\cos(y\alpha)$ next to $N - 1$ are $(q + \tfrac12)D = N - D/3 < N - 1$ and $(q + 3/2)D = N + 2D/3 > N + 2$. If $d > N - 1$, then $(N - 1, d)$ contains a zero of $\cos(y\alpha)$, so $d > N + 2D/3 > N + 2$ and $d \geq N + 3$, and the zero $(q + 1)D = N + D/6$ of $\sin(y\alpha)$ lies in $(N, d - 1)$, which is excluded. If $d < N - 1$, then $y_0 = (q + \tfrac12)D$ (a lower zero would put two in the interval) and $y_0 - D/2 = qD \leq d + 1$, so $d \in [qD - 1, N - D/3)$, whose only even member is $N - 3$, not good. So no such connection exists. \begin{proof}[Proof of Proposition~\ref{prop:A-13}, the target $O$ at odd $P$] By the reduction and Lemma~\ref{lem:bad-gates} the class of the first reflection is the exception, which has just been excluded. \end{proof} \emph{The target $O$ at even $P$, $Q = 3^b$.} Here $N$ is odd, and we use A.1 at $p = 3$: its good frames, its span, its step rule and Lemma~\ref{lem:straddles-at-even} hold as written (none of their proofs uses $p \geq 5$), except for one inequality in A.2 (1), not used below. $P = 2\varepsilon + 3\mu$ with $\mu$ even, $\varepsilon = +1$ iff $P \equiv 2 \pmod{6}$. As in A.1, with $r \equiv \pi_0$ the frames $r$, $2N - r$ (the fold of $r + N$) and $2N + r$ carry the coefficients of one residue class modulo $N$, so $m$ is constant on $\{r, 2N - r, 2N + r\}$ for $0 < r < N$, and $m = 0$ on the multiples of $N$. \begin{itemize} \tightlist \item \emph{Perpendicular ends, $\varepsilon = -1$:} Lemma~\ref{lem:straddles-at-even} (3). \item \emph{Perpendicular ends, $\varepsilon = +1$:} by the proof of Lemma~\ref{lem:straddles-at-even} (3), a step straddling $N$ ($j = 1 = (p - 1)/2$) has $\delta_2 = 1$, so it reflects at $N + 1$, and one straddling $2N$ has $\delta_1 = 1$, so it reflects at $2N - 1$. By the span both occur, and $(2N - 1) - (N + 1) = N - 2$ is odd, against one parity of frames. \item \emph{Parallel ends, $\varepsilon = +1$:} A.1's bullet with the pair $\{1, 2\}$, where $g = \pm1/6$. (If $D \geq 6$, Lemma~\ref{lem:straddles-at-even} (2) already excludes the straddle.) \item \emph{Parallel ends, $\varepsilon = -1$:} Lemmas~\ref{lem:every-gate} and \ref{lem:A-17}. \end{itemize} At parallel ends with $\varepsilon = -1$, A.1's good frames are those $d$ with $\text{frac}(d/D)$ in $(1/6, \tfrac12)$ on $L$, in $(-1/6, 1/6)$ on $M$ and in $(\tfrac12, 5/6)$ on $U$; the gate phases are as above, $\psi_w :\equiv \pi_0/2 - wQ/P \pmod{1}$, and a gate is good iff $\psi_w \in (\vartheta, \tfrac12)$ (in $L$), $|\psi_w| < \vartheta$ (in $M$), $\psi_w \in (-\tfrac12, -\vartheta)$ (in $U$). Lemma~\ref{lem:the-gate} applies, the ends being parallel. Write $P = 6k + 4$, so that $N/D = k + 2/3$ and the zeros of $\sin(y\alpha)$ next to $N$ are $kD = N - 2D/3$ and $(k + 1)D = N + D/3$, those next to $2N$ are $(2k + 1)D = 2N - D/3$ and $(2k + 2)D = 2N + 2D/3$. Let $V$ be the set of frames with $m \geq 1$; it is a non-empty union of good sets $\{r, 2N - r, 2N + r\}$, so $V \cap M = 2N - (V \cap L)$ and $V \cap U = 2N + (V \cap L)$, $\min V < N$ and $\max V > 2N$, and by Lemma~\ref{lem:the-gate} every zero of $\sin(y\alpha)$ in $(\min V, \max V)$ has its gate in $V$. \begin{lemma}[every gate]\label{lem:every-gate} Let $Q = 3^b \geq 81$ and $P$ even with $\varepsilon = -1$, and let a head-on-free $O$-launched connection at parallel ends end at $O$, with $V$ as above. If $D > 3$, every gate $z_w$, $1 \leq w < P/2$, lies in $V$, and so is good. And $P = 4$. \end{lemma} \begin{proof} \emph{$D > 3$.} $\text{dist}(N, D\mathbb{Z}) =\text{ dist}(2N, D\mathbb{Z}) = D/3 > 1$, so each gate lies in the third of its zero and is neither $N$ nor $2N$. $M$ holds the zeros $(k + 1)D, \ldots, (2k + 1)D$, all in $(\min V, \max V)$, so their gates lie in $V \cap M$ and their mirrors $2N - z$ in $V \cap L$. The top one gives $\min V < D/3 + 1$, and the bottom one $\max(V \cap L) > N - D/3 - 1$, so $\max V > Q - D/3 - 1$. Every zero lies in $[D, Q - D]$, inside $(D/3 + 1, Q - D/3 - 1)$. \emph{$D < 3$.} $(k + 1)D \in (N, N + 1)$ and $(2k + 1)D \in (2N - 1, 2N)$ lie in $(\min V, \max V)$; at $\pi_0 = 1$ the gate of the first is $N$, at $\pi_0 = 0$ the gate of the second is $2N$, and $m = 0$ there. \emph{$D > 6$.} A gate in $L$ is good only if $\zeta > D/6 > 1$: never. $L$ holds the zero $D$ iff $P \geq 10$. \emph{$3 < D < 6$, off the window $7Q/15 \leq P \leq 5Q/9$.} As in the proof of Lemma~\ref{lem:bad-gates}, two consecutive gates in $L$ are never both good; $L$ holds $k \geq 2$ zeros, since $P > Q/3 \geq 27$. \emph{$3 < D < 6$, in the window.} The $k + 1$ gates in $M$ have phases in a progression of step $s = 2 - Q/P$, and, as in (v), if all are good then $kj/P < 5/7$ with $j \coloneqq |Q - 2P|$; $j$ is odd and $\neq 3$, and $j \geq 5$ forces $P < 28$, which the window excludes. So $j = 1$, and $Q = 2P + 1$ ($Q = 2P - 1$ gives $P \equiv 2 \pmod{3}$, $\varepsilon = +1$), so $\psi_w \equiv \pi_0/2 - w/P$. At $\pi_0 = 0$ the gates in $L$ ($w \leq k < P/6$) have $\psi \in (-1/6, 0)$, outside $(\vartheta, \tfrac12)$; at $\pi_0 = 1$ the gates in $U$ ($P/3 < w < P/2$, of which there are $k \geq 1$) have $\psi \in (0, 1/6)$, outside $(-\tfrac12, -\vartheta)$. \end{proof} At $P = 4$ neither $L$ nor $U$ holds a zero, and the one gate, at $Q/2$, is good: the gates see nothing. \begin{lemma}[$P = 4$]\label{lem:A-17} Let $Q = 3^b \geq 81$ and $P = 4$. No head-on-free $O$-launched connection at the launch $u_0 = 2$ ends at $O$. \end{lemma} \begin{proof} Here $D = Q/2$. The good frames lie in $(Q/12, Q/4) \subset L$, $(5Q/12, 7Q/12) \subset M$ and $(3Q/4, 11Q/12) \subset U$, and the zeros of $\cos(y\alpha)$ are $Q/4$ and $3Q/4$. By the step rule, consecutive frames of reflections in $L_1$ are distinct and have exactly one zero of $\cos(y\alpha)$ between them, so no step joins two frames of one third, or $L$ to $U$: the frames alternate between $M$ and $L \cup U$. The first reflection is in $M$: $4b \equiv 2 \pmod{2Q}$ gives $b = -(Q - 1)/2$, so $d_l = (Q - 1)/2$. Hence, writing $\#X \coloneqq \sum_{d \in X} m(d)$, $\#M \geq \#(L \cup U)$. But $m$ is constant on each $\{r, 2N - r, 2N + r\}$, so $\#L = \#M = \#U$, and $\#M \geq 2\#M$ gives $\#M = 0$, against $m(d_l) \geq 1$. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:A-13}, the target $O$ at even $P$] The four bullets above; at parallel ends with $\varepsilon = -1$, Lemma~\ref{lem:every-gate}, and at $P = 4$ Lemma~\ref{lem:A-17} (its only parallel launch is $u_0 = 2$). \end{proof} \emph{The target $A$: the sign point.} Let $P$ be odd, put $R \coloneqq Q - P$ and $\eta \coloneqq \beta/\pi = R/2Q$, so that $N\eta = R/6$; at $p = 3$ the chain criterion is one phase. Every lead is sign-definite (\S\ref{sec:5.4}). \begin{lemma}[the sign point]\label{lem:the-sign-point} There is a unique $J \in \tfrac12\mathbb{Z}$ with $J \equiv \kappa/2 \pmod{1}$ and $(\kappa - 1)\eta < J < (\kappa + 1)\eta$. \end{lemma} \begin{proof} $c(d) = \operatorname{sgn} \cos(d\pi/2 - d\beta)$, which is $(-1)^{(d-1)/2}\operatorname{sgn} \sin(d\beta)$ at odd $d$ and $(-1)^{d/2}\operatorname{sgn} \cos(d\beta)$ at even $d$. The prefactors at $\kappa \pm 1$ differ by a sign, so $c(\kappa - 1) = c(\kappa + 1)$ says that $\sin$ ($\kappa$ even), resp. $\cos$ ($\kappa$ odd), changes sign on $((\kappa - 1)\beta, (\kappa + 1)\beta)$, an interval of length $2\beta < \pi$; its zero there is $J\pi$. \end{proof} Put $y_a \coloneqq J - a\eta$. \emph{The target $A$ at even $Q$.} Now $N$ is even. The members of the chain of $e$ ($0 < e < N$, $e \equiv u_0$) are $d_{-1} = e - 2N$, $d_0 = e$, $d_1 = e + 2N$; none is $0$ or $\pm Q$. With $\hat{\rho} \coloneqq \rho$ at carriers and $\hat{\rho} \coloneqq 0$ elsewhere, Lemma~\ref{lem:the-lead-on-the-frames}'s conditions $m \geq 0$ read $w \geq \hat{\rho}$ where $\chi = +1$ and $w \leq \hat{\rho}$ where $\chi = -1$, so \textbf{the chain admits a solution iff no two members have $\chi = +1$, $\chi' = -1$ and $\hat{\rho} > \hat{\rho}'$}; the criterion is unchanged by $(\chi, \hat{\rho}) \mapsto (-\chi, -\hat{\rho})$. We call the chain \emph{dead} if it admits none. Its carriers are, for $\kappa$ even ($u_0$ odd, \emph{case 1}): none ($\kappa < e$), $\{e\}$ ($e < \kappa < 2N - e$), $\{e, 2N - e\}$ ($2N - e < \kappa < 2N + e$), all three ($\kappa > 2N + e$); for $\kappa$ odd ($u_0$ even, \emph{case 3}): all three ($\kappa < e$), $\{2N - e, 2N + e\}$ ($e < \kappa < 2N - e$), $\{2N + e\}$ ($2N - e < \kappa < 2N + e$), none ($\kappa > 2N + e$). \begin{lemma}[one phase, even $Q$]\label{lem:one-phase-even} Put $\Psi \coloneqq y_e - \tfrac12$ in case 1 and $\Psi \coloneqq y_e + \tfrac12$ in case 3. For one sign $\sigma$, \[ (\chi_{-1}, \chi_0, \chi_1) = \sigma\cdot(-\operatorname{sgn} \cos \pi(\Psi + \varepsilon/3), -\operatorname{sgn} \cos \pi\Psi, \operatorname{sgn} \cos \pi(\Psi - \varepsilon/3)), \] and $(\hat{\rho}_{-1}, \hat{\rho}_0, \hat{\rho}_1) = \sigma\hat{\kappa}$ on the carriers, with $\hat{\kappa} = (1, -1, 1)$ in case 1 and $(-1, -1, 1)$ in case 3. No sign vanishes, as $y_e \notin (1/6)\mathbb{Z}$. Consequently the chain is dead iff $y_e \bmod 2$ lies in the window of the table, or, for the carriers named, in the extra window: \begin{center} \begin{tabular}{@{}>{\raggedright\arraybackslash}p{0.09\linewidth}>{\raggedright\arraybackslash}p{0.11\linewidth}>{\raggedright\arraybackslash}p{0.12\linewidth}>{\raggedright\arraybackslash}p{0.57\linewidth}@{}} \toprule & $\varepsilon = -1$ & $\varepsilon = +1$ & extra window (carriers) \\ \midrule case 1 & $(0, 2/3)$ & $(1/3, 1)$ & $(4/3, 5/3)$ ($\{e, 2N - e\}$) \\ case 3 & $(1, 5/3)$ & $(4/3, 2)$ & $(0, 1/3)$ ($\varepsilon = -1$), $(2/3, 1)$ ($\varepsilon = +1$) ($\{2N - e, 2N + e\}$) \\ \bottomrule \end{tabular} \end{center} and never when it has no carrier. No $y_e$ is an end of a window. \end{lemma} \begin{proof} $\chi = (c(2N - e), c(e), -c(2N + e))$, and $c(2N \pm e) = \operatorname{sgn} \cos(\theta \mp \varepsilon\pi/3)$ with $\theta \coloneqq e\alpha$, since $2N\alpha = P\pi/3 \equiv -\varepsilon\pi/3 \pmod{2\pi}$ ($P$ odd, $P \equiv 2\varepsilon \pmod{3}$). Writing $F(\Psi)$ for the vector on the right, $\chi = -F(\theta/\pi)$, and $F(\Psi + 1) = -F(\Psi)$. \emph{Case 1} ($\kappa$ even, $e$ odd, $J =: j \in \mathbb{Z}$). With $T \coloneqq \tau(e) = (-1)^{(\kappa-1-e)/2}$, $\tau(2N - e) = -T$ and $\tau(2N + e) = T$, so $\rho = -c^*T\cdot(1, -1, 1)$. As $(\kappa - 1)\beta \in (j\pi - 2\beta, j\pi) \subset ((j - 1)\pi, j\pi)$, $c^* = c(\kappa - 1) = (-1)^{\kappa/2 + j}$. Now $\theta - \pi\Psi = \pi(e + 1)/2 - j\pi$, so $\chi = (-1)^{(e+1)/2 - j + 1}F(\Psi)$, and $(-1)^{(e+1)/2 + j} = c^*T$ because $\kappa - 1 - e$ is even; so $\sigma \coloneqq -c^*T$ serves for both. \emph{Case 3} ($\kappa$ odd, $e$ even, $J = j + \tfrac12$). With $T \coloneqq \tau(e) = (-1)^{(e-\kappa-1)/2}$, $\tau(2N \pm e) = T$, so $\rho = -c^*T\cdot(-1, -1, 1)$. As $(\kappa - 1)\beta \in (J\pi - 2\beta, J\pi) \subset (j\pi - \pi/2, j\pi + \pi/2)$, $c^* = (-1)^{(\kappa-1)/2 + j}$, and $\theta - \pi\Psi = e\pi/2 - (j + 1)\pi$ gives $\chi = (-1)^{e/2 + j}F(\Psi) = -c^*T\cdot F(\Psi)$. $6y_e = 6J - eR/N$ is an integer only if $N | eR$, and $\gcd(R, Q) = 1$. For the table: on the six sectors of $\Psi \bmod 2$ of length $1/3$, starting at $-1/6$, the vector $F(\Psi)$ is $(-,-,+)$, $(-,-,-)$, $(-,+,-)$, $(+,+,-)$, $(+,+,+)$, $(+,-,+)$ at $\varepsilon = -1$, and $(-,-,+)$, $(+,-,+)$, $(+,+,+)$, $(+,+,-)$, $(-,+,-)$, $(-,-,-)$ at $\varepsilon = +1$. Applying the criterion to each sector, with $\sigma\hat{\rho} = \hat{\kappa}$ on each of the four carrier sets, and passing from $\Psi$ to $y_e$ gives the table; its windows end in $(1/3)\mathbb{Z}$. \end{proof} \begin{lemma}[the sweep]\label{lem:the-sweep} (1) Let $y$ run over a decreasing sequence with steps $< hi - lo$, none equal to $lo$ or $hi$. If its first term exceeds $lo$ and its last is below $hi$, then its first term below $hi$ lies in $(lo, hi)$. (2) A monotone sequence with steps $< 2/3$, none on an end of $W + 2\mathbb{Z}$ for an interval $W$ of length $2/3$, meets $W + 2\mathbb{Z}$ unless its range lies in one complementary arc, of length $4/3$. \end{lemma} \begin{proof} (1) The first term below $hi$ exists. If it is the first term it exceeds $lo$; otherwise its predecessor is $> hi$, so it exceeds $hi - (hi - lo)$. (2) If the range meets a copy of $W$, an end of the range lies inside it, or the range contains it, and a step shorter than the copy cannot pass over it. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:A-13}, the target $A$, $Q$ even] Reversal and exchange of the legs (A.4) let us take $P > Q/2$, for both $u_0$; so $\eta < \tfrac14$, $R \geq 5$ (odd and prime to $3$), and every main window of the table has length $2/3 > 2\eta$ (the extra ones $1/3$). Lemma~\ref{lem:the-top-of-the-range} removes $\kappa > Q - Q/P$. Along the usable $e$ --- those with a carrier --- in steps of $2$, $y_e$ decreases by $2\eta$. The chain of $e$ is dead whenever $y_e$ lies in the window of its row (every carrier set carries it), and we name such an $e$. Note $J \geq \tfrac12$, $(\kappa + 1)\eta > J$ and $R \equiv \varepsilon \pmod{6}$. \begin{itemize} \tightlist \item \emph{Case 1, $J = j \geq 1$; usable: odd $e < \min(\kappa, N)$.} \begin{itemize} \tightlist \item \emph{$\kappa \leq N$.} $\varepsilon = -1$: $e = \kappa - 1$, $y_e \in (0, 2\eta)$. $\varepsilon = +1$: Lemma~\ref{lem:the-sweep} (1) on $e = 1, \ldots, \kappa - 1$ with $(1/3, 1)$: $y_1 = j - \eta > 1/3$ and $y_{\kappa-1} < 2\eta$. \item \emph{$\kappa > N$.} Then $\kappa \geq N + 2$, so $R/6 + \eta < j < R/2$. Lemma~\ref{lem:the-sweep} (1) on $e = 1, \ldots, N - 1$, from $j - \eta$ down to $j - R/6 + \eta$: \begin{itemize} \tightlist \item $\varepsilon = -1$, $j$ odd: $(j - 1, j - 1/3)$, as $R/6 - \eta > 1/3$. \item $\varepsilon = -1$, $j$ even, $R \geq 11$: $(j - 2, j - 4/3)$, as $R/6 - \eta > 4/3$. \item $\varepsilon = -1$, $j$ even, $R = 5$: then $j = 2$, $\kappa > 4Q/5 - 1 > 2N$, and the $e > \kappa - 2N$ have carriers $\{e, 2N - e\}$. Lemma~\ref{lem:the-sweep} (1) on them with the extra window $(4/3, 5/3)$: the first term is $(j - \kappa\eta) + R/3 - \eta \in (5/3 - 2\eta, 5/3)$, the last $7/6 + \eta$, and the hypotheses hold as $\eta < 1/6$ ($Q > 15$). \item $\varepsilon = +1$, $j$ odd: $(j - 2/3, j)$. $j$ even: $(j - 5/3, j - 1)$, as $R/6 - \eta > 1$ ($R \geq 13$, or $R = 7$ and $Q > 21$). \end{itemize} \end{itemize} \item \emph{Case 3, $J \in \tfrac12 + \mathbb{Z}$; usable: even $e$ with $\max(0, \kappa - 2N) < e < N$.} \begin{itemize} \tightlist \item \emph{$\kappa < N$} (so $\kappa \geq 3$: $c(0) \neq c(2)$ as $P > Q/2$). $\varepsilon = -1$, $J \geq 3/2$: Lemma~\ref{lem:the-sweep} (1) on $e = 2, \ldots, \kappa - 1$ with $(1, 5/3)$: $y_2 = J - 2\eta > 1$ and $y_{\kappa-1} \in (0, 2\eta)$. $\varepsilon = -1$, $J = \tfrac12$: the extra window $(0, 1/3)$ (carriers $\{2N - e, 2N + e\}$) holds $y_{\kappa-1} \in (0, 2\eta)$ if $\eta \leq 1/6$, and otherwise $y_2 = \tfrac12 - 2\eta$. $\varepsilon = +1$: $e = \kappa + 1$, with $y_e \in (-2\eta, 0)$ and all three members carriers; $\kappa + 1 < N$, because $\kappa = N - 1$ would put $J$ in $(R/6 - 2\eta, R/6)$, which holds no half-integer when $R \equiv 1 \pmod{6}$. \item \emph{$N < \kappa < 2N$}, so $R/6 < J < R/3$. $\varepsilon = -1$, $J \equiv 3/2 \pmod{2}$: $e = 2$, $y_2 \in (J - \tfrac12, J)$. $\varepsilon = -1$, $J \equiv \tfrac12$: $(J - 3/2, J - 5/6)$, as $R/6 - 2\eta > 5/6$ ($R \geq 11$; at $R = 5$, $J = 3/2$). $\varepsilon = +1$, $J \equiv \tfrac12$: $(J - 7/6, J - \tfrac12)$ ($R \geq 7$). $\varepsilon = +1$, $J \equiv 3/2$: $e = 2$ if $\eta < 1/12$, and $(J - 13/6, J - 3/2)$ if $R \geq 13$. \item \emph{$\kappa > 2N$.} Usable: $e_0 \coloneqq \kappa - 2N + 1, \ldots, N - 2$ (as $\kappa \leq Q - 3$), all with carriers $\{2N + e\}$, and $y_{e_0} = (J - \kappa\eta) + R/3 - \eta \in (R/3 - 2\eta, R/3)$. $\varepsilon = -1$: $R/3 \equiv 5/3 \pmod{2}$, so $y_{e_0}$ lies in $(R/3 - 2/3, R/3)$, a copy of $(1, 5/3)$. $\varepsilon = +1$: $R/3 \equiv 1/3$; Lemma~\ref{lem:the-sweep} (1) with $(R/3 - 1, R/3 - 1/3)$, the last term being $J - R/6 + 2\eta \leq R/3 - 1 + 2\eta$, since $J \leq R/2 - 1$. \end{itemize} \end{itemize} What is left needs $\eta \geq 1/6$ with $R \in \{5, 7\}$, or $\eta \geq 1/12$ with $R = 7$, so $Q \leq 42$: inside A.6. \end{proof} \emph{The target $A$ at odd $Q$.} Now $Q = 3^b \geq 81$, $N$ is odd, $R$ is even, and by reversal and exchange of the legs (an even $P$ becomes the odd $Q - P$) and Lemma~\ref{lem:the-adic-case} ($u_0$ even) we may take $P$ and $u_0$ odd. Frames are odd and $\kappa$ is even, so $J$ is an integer, and $h_0 = (-1)^{J-1}$, as $(\kappa - 1)\beta \in ((J - 1)\pi, J\pi)$. In Corollary~\ref{cor:odd-the-signs-at-the}, $g(a) = h_0h(a) = \operatorname{sgn} \sin \pi y_a$, since $\sin \pi(J - a\eta) = (-1)^{J-1}\sin(a\beta)$. The classes are $K(e)$ for odd $e < N$, and the odd multiples of $N$ below $Q$ are $N$ alone. Put $\varrho \coloneqq P/2Q = \tfrac12 - \eta$ and $t \coloneqq 2\eta = 1 - P/Q$; then $R/3 = 2N\eta \equiv -2\varepsilon/3 \pmod{2}$ ($\varepsilon = -1$ iff $R \equiv 2 \pmod{6}$). \begin{lemma}[one phase, odd $Q$]\label{lem:one-phase-odd} Let $0 < e < N$ be odd and $y \coloneqq y_e$. The class $K(e)$ dies --- admits no $w'$ in the proof of Corollary~\ref{cor:odd-the-signs-at-the}, which then excludes the connection --- iff $e < \kappa < 2N + e$ and $y \bmod 2 \in W$, where $W \coloneqq (0, 2/3)$ ($\varepsilon = -1$) or $(1/3, 1)$ ($\varepsilon = +1$). The class $\{N\}$ dies iff $N < \kappa$ and $y_N \bmod 2 \in (0, 1)$. No $y_e$ lies in $(1/3)\mathbb{Z}$, and $y_N \notin \mathbb{Z}$. \end{lemma} \begin{proof} $y_{2N+e} = y - R/3$ and $y_{2N-e} = 2J - R/3 - y$, so $(g(e), g(2N - e), g(2N + e))$ is the sign of $(\sin \pi y, \sin \pi(y - 1/3), \sin \pi(y - 2/3))$ if $\varepsilon = -1$, and of $(\sin \pi y, \sin \pi(y + 1/3), \sin \pi(y + 2/3))$ if $\varepsilon = +1$. By the proof of Corollary~\ref{cor:odd-the-signs-at-the} a class dies iff a frame below $\kappa$ has $g = +1$ and a frame above has $g = -1$. Below $\kappa$ lie $\{e\}$ ($e < \kappa < 2N - e$), $\{e, 2N - e\}$ ($2N - e < \kappa < 2N + e$), or none or all. At $\varepsilon = -1$, $\{e\}$ gives $y \in (0, 1)$ and $y \in (-2/3, 2/3)$, and $\{e, 2N - e\}$ gives $y \in (0, 4/3)$ and $y \in (-1/3, 2/3)$: both $(0, 2/3)$. At $\varepsilon = +1$ they give $(0, 1) \cap (1/3, 5/3)$ and $(-1/3, 1) \cap (1/3, 4/3)$: both $(1/3, 1)$ (all mod $2$). The frame $N$ has $m = -g$ if $N < \kappa$ and $m = 0$ otherwise. $y_e \in (1/3)\mathbb{Z}$ needs $N | e$, and $y_N = J - R/6 \notin \mathbb{Z}$ as $3 \nmid R$. \end{proof} So the usable classes are the odd $e$ with $\max(0, \kappa - 2N) < e < \min(\kappa, N)$, and along them $y_e$ falls by $t$ per step; along one residue of $e$ modulo $4$ it rises by $4\varrho = 2P/Q$ $\pmod{2}$. With $\ell \coloneqq J - (\kappa - 1)/2 \in \tfrac12 + \mathbb{Z}$, \[ y_e = \ell + (\kappa - 1 - e)/2 + e\varrho, \quad f \coloneqq y_{\kappa-1} = \ell + (\kappa - 1)\varrho \in (0, t), \] so on residue A ($e \equiv \kappa - 1 \pmod{4}$) $y_e \equiv \ell + e\varrho$, and on residue B ($e \equiv \kappa + 1$) $y_e \equiv \ell + 1 + e\varrho$ $\pmod{2}$. \begin{proof}[Proof of Proposition~\ref{prop:A-13}, the target $A$, $Q$ odd] Lemma~\ref{lem:the-top-of-the-range} removes $\kappa > Q - Q/P$. The usable $e$ are $1, \ldots, \kappa - 1$ ($\kappa < N$), $1, \ldots, N - 2$ ($N < \kappa \leq 2N$), $\kappa - 2N + 1, \ldots, N - 2$ ($\kappa > 2N$; non-empty as $\kappa \leq Q - 3$), and $y_e = f + (\kappa - 1 - e)\eta$. \begin{itemize} \tightlist \item \emph{Case I, $P > Q/3$, so $t < 2/3$; consecutive $e$, Lemma~\ref{lem:the-sweep} (2).} \begin{itemize} \tightlist \item \emph{$\kappa < N$.} $\varepsilon = -1$: $e = \kappa - 1$, $f \in (0, t) \subset W$. $\varepsilon = +1$: if $f > 1/3$, $e = \kappa - 1$. Otherwise $f < 1/3$ and $y_1 = J - \eta$: if $J = 1$, $y_1 \in (2/3, 1) \subset W$; if $J \geq 2$, $y_1 > 1$, and the range contains $W$. \item \emph{$N < \kappa \leq 2N$.} The range has length $(N - 3)\eta = R(Q - 9)/6Q$, more than $4/3$ once $R \geq 10$. $R = 2$ has no lead ($J \geq 1$ needs $(\kappa + 1)\eta > 1$, i.e. $\kappa + 1 > Q$). $R = 4$ ($\varepsilon = +1$): $J = 1$ and $y_e \in (1/3, 1) = W$ for every $e < N$. $R = 8$ ($\varepsilon = -1$): $J = 2$ and every $y_e \in (2/3, 2)$ misses $W$, but $y_N = 2 - 4/3 = 2/3 \in (0, 1)$ and $N < \kappa$: the class $\{N\}$ dies. \item \emph{$\kappa > 2N$.} $e_a \coloneqq \kappa - 2N + 1 \equiv \kappa - 1 \pmod{4}$ has $y_{e_a} = f + R/3 - t$. $\varepsilon = -1$: $\equiv f + 2/3 - t \in (0, 2/3)$. $\varepsilon = +1$: $\equiv f + 4/3 - t$, in $W$ iff $f < t - 1/3$. Otherwise the whole range would have to stay in the gap $[1, 7/3]$, i.e. $f \geq (s + 1)t - 1/3$ with $s \coloneqq (Q - 3 - \kappa)/2$. But $Q\eta = R/2 \in \mathbb{Z}$ gives $f = (2 + s)t - i_0$ with $i_0 \coloneqq R/2 - J$ an integer in $((1 + s)t, (2 + s)t)$, so $i_0 \geq 1$, while survival needs $i_0 \leq t + 1/3 < 1$. \end{itemize} \item \emph{Case II, $P < Q/3$, so $t > 2/3$ and $4\varrho < 2/3$; each residue modulo $4$, Lemma~\ref{lem:the-sweep} (2).} \begin{itemize} \tightlist \item \emph{$\kappa < N$, $\varepsilon = -1$.} If $f < 2/3$: $e = \kappa - 1$. Otherwise $f \in (2/3, t)$, and residue A descends from $f$ (at $e = \kappa - 1$) in steps $4\varrho$ to $\ell + e_A\varrho$, $e_A \in \{1, 3\}$ its least member. If $\ell \leq -\tfrac12$, or $e_A = 1$, or $\varrho < 1/18$, then $\ell + e_A\varrho < 2/3$, and the first term below $2/3$ lies in $(2/3 - 4\varrho, 2/3) \subset W$. Otherwise $\ell = \tfrac12$, $e_A = 3$ ($\kappa \equiv 0 \pmod{4}$) and $\varrho > 1/18$; residue A then stays in $[\tfrac12 + 3\varrho, f] \subset (2/3, 1)$ and residue B in $(3/2, 3/2 + (\kappa - 3)\varrho] \subset (3/2, 2)$, both in gaps, since $f < t$ gives $(\kappa + 1)\varrho < \tfrac12$. With $\varrho > 1/18$ that forces $\kappa + 1 < 9$, so $\kappa = 4$ and $\varrho < 1/10$: the family of Lemma~\ref{lem:the-family}. \item \emph{$\kappa < N$, $\varepsilon = +1$.} If $f > 1/3$: $e = \kappa - 1$ ($\kappa = 2$ has $J = 1$, $f = \tfrac12 + \varrho$). Otherwise residue B's top $e = \kappa - 3$ has $y_e = f + t$, in $W$ if $< 1$. Otherwise $f + t \in [1, 4/3)$ and $\ell \leq -\tfrac12$ ($\ell = \tfrac12$ would give $f > \tfrac12$); B's least term $\ell + 1 + e_B\varrho \leq \tfrac12 + 3\varrho < 1$, and the first B-term below $1$ lies in $(1 - 4\varrho, 1) \subset W$. \item \emph{$N < \kappa \leq 2N$.} Every odd $e < N$ is usable. If $\varrho < 1/18$: of $e = 1, 3$, the one on the residue with $y_e \equiv \tfrac12 + e\varrho$ has $y_e \in (\tfrac12, 2/3) \subset W$. If $\varrho > 1/18$: residues A and B both cover $x \coloneqq e\varrho \in [3\varrho, (N - 4)\varrho]$, of length $(N - 7)\varrho > 1/3$. By Lemma~\ref{lem:the-sweep} (2) a surviving residue keeps its range in one gap of its own kill set, $W - \ell + 2\mathbb{Z}$ for A and $W - \ell - 1 + 2\mathbb{Z}$ for B (in $x$). The two kill sets together are $(W - \ell) + \mathbb{Z}$, arcs of length $2/3$ with period $1$, so an A-gap and a B-gap overlap in pieces of length $1/3$, and a common range longer than $1/3$ kills a class. \item \emph{$\kappa > 2N$.} $e_a$ lies on residue A. $\varepsilon = -1$: $y_{e_a} \equiv f + 2/3 - t$, in $W$ iff $f > t - 2/3$. Otherwise it lies in $(2/3 - t, 0]$, and residue A rises by $4\varrho$ through $e \leq N - 2$. With $s$, $i_0$ as above, $i_0 < (2 + s)t < s + 2$, so $i_0 \leq s + 1$, and the top value $f + 2/3 - t + 4\varrho\lfloor s/2\rfloor = s + 5/3 - 2\varrho(1 + (s \bmod 2)) - i_0$ is positive; its first positive term lies in $(0, 4\varrho) \subset W$. $\varepsilon = +1$: $y_{e_a} \equiv f + 4/3 - t$, in $W$ iff $f < t - 1/3$. Otherwise residue B, from $e_a + 2$ ($s \geq 1$, since $\kappa = Q - 3$ exceeds $Q - Q/P$ when $P < Q/3$), starts in $[2\varrho, 1/3 + 2\varrho)$ and rises by $4\varrho$; its top exceeds $1/3$ unless $i_0 = s + 1$, which needs $\varrho(s + 1) \leq 1/6$. But $\kappa < Q - Q/P$ gives $\varrho(2s + 3) > \tfrac12$, so $\varrho(s + 1) > \tfrac14 - \varrho/2 > 1/6$. \end{itemize} \end{itemize} \renewcommand{\qedsymbol}{}\end{proof} \begin{lemma}[the family $\kappa = 4$]\label{lem:the-family} Let $Q = 3^b \geq 81$, $P \equiv 1 \pmod{6}$ with $Q/9 < P < Q/5$, and $u_0$ odd. No head-on-free $O$-launched connection ends at $A$ with lead offset $\kappa = 4$. \end{lemma} \begin{proof} Here $J = 2$, $\ell = \tfrac12$, $\varepsilon = -1$, and $\varrho \in (1/18, 1/10)$. By the proof of Corollary~\ref{cor:odd-the-signs-at-the}, $m = g\cdot(w' - 1)$ at the frames below $\kappa$ ($1$ and $3$) and $m = g\cdot w'$ above, with one integer $w'$ per class. \begin{itemize} \tightlist \item \emph{$K(1)$:} $y_1 = 3/2 + \varrho$, so $g = (-, -, +)$ on $(1, 2N - 1, 2N + 1)$. The two frames above $\kappa$ have opposite signs, so $w' = 0$ and $m(1) = 1$. \item \emph{$K(3)$:} $y_3 = \tfrac12 + 3\varrho \in (2/3, 0.8)$, so $g = (+, +, +)$, and $m(3) = w' - 1 \geq 0$ forces $m(2N \pm 3) = w' \geq 1$. \item \emph{Every other class} lies above $\kappa$, and carries $m > 0$ only if $g$ is constant on it, i.e. $y \bmod 1 \in (2/3, 1)$; and $m(N) = 0$. \end{itemize} So the connection reflects at the frames $1$ and $2N + 3$, and by Lemma~\ref{lem:the-gate} at the gate $z_1$ (odd, $|z_1 - D| < 1$) of the zero $D = 2Q/P \in (10, 18)$. With $z_1 = D + \zeta$, $|\zeta| < 1$, and $D\varrho = 1$, $y_{z_1} = 2 - z_1/2 + z_1\varrho \equiv \tfrac12 + \zeta\varrho \pmod{1}$, which lies in $(\tfrac12 - \varrho, \tfrac12 + \varrho)$, outside $(2/3, 1)$. As $z_1 \in (9, 19)$ is not among $1, 3, 2N \pm 3$ ($2N - 3 \geq 51$), $m(z_1) = 0$, a contradiction. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:A-13}, end] The target $O$: above. The target $A$: at even $Q$ above; at odd $Q$, the cases above and Lemma~\ref{lem:the-family}. \end{proof} \emph{The finite check.} The direct check in Lemma~\ref{lem:bad-gates} runs over the eight $Q = 2^a 3^b$ ($b \geq 1$) with $80 < Q < 280$ ($81$, $96$, $108$, $144$, $162$, $192$, $216$, $243$): at each odd $P$ coprime to $Q$, each parity and each good class, it finds a bad gate, or meets the exception; $258$ good classes are left to it by the proof. It uses only exact rational arithmetic: goodness is a comparison of $eP \bmod 2Q$ with multiples of $Q/3$, and a gate is the integer of the given parity within $1$ of $2Qn/P$. \textbf{A.6. The census.} \begin{proposition}[computer-assisted]\label{prop:computer-assisted} Let $Q \leq 80$ have at most one odd prime factor, and let $P$ be coprime to $Q$ with $\min(P, Q - P) \geq 2$. For every launch $0 < u_0 < P$ no head-on-free $O$-launched connection of $P/Q$ ends at $O$, $A$ or $R$. \end{proposition} \emph{The direction automaton.} Fold the orbit back into $T$. After its $j$-th reflection, in the side $s_j$, it moves in the direction $v_j\theta$ with $v_j \in \mathbb{Z}/4Q$; a reflection in a side of direction $o$ ($o = 0, Q, P$ for $L_2, L_1, H$) sends $v$ to $2o - v$, so $v_1 = 2Q - u_0$. Which of the two other sides a ray leaving $s_j$ in the direction $v_j\theta$ can meet depends on $v_j$ alone: leaving $L_2$, it can meet $H$ iff $v \in (P, 2Q)$ and $L_1$ iff $v \in (0, Q)$; leaving $L_1$, $H$ iff $v \in (Q, 2Q + P)$ and $L_2$ iff $v \in (2Q, 3Q)$; leaving $H$, $L_2$ iff $v \in (2Q + P, 4Q)$ and $L_1$ iff $v \in (3Q, 4Q + P)$ (open arcs of $\mathbb{Z}/4Q$, read positively). The reflection in the side $s'$ is head-on iff $2o(s') - v \equiv v + 2Q$. The \textbf{direction automaton} of the launch has the states $(s_j, t_j, \lambda_j \bmod 2, j \bmod 2, v_j)$ --- the side just met, the frame and the parity of the number of reflections in $L_1$ (\S\ref{sec:2.3}), the parity of $j$, and the direction --- with the initial state $(L_1, 0, 1, 1, 2Q - u_0)$, and an edge for each next side that can be met and is not met head-on, the frame changing by $(-1)^{j}\cdot2$ at a letter $H$, $j$ the number of reflections so far (the new letter is the $(j + 1)$-th of \S\ref{sec:2.3}). A head-on-free $O$-launched connection with target $V$ is a walk from the initial state to a \emph{final} state, one whose side is opposite $V$ ($L_1$ for $O$, $L_2$ for $A$, $H$ for $R$). The automaton is finite: the proof of Lemma~\ref{lem:the-window} uses only that a ray does not cross a side parallel to it (the arcs are open) and that head-ons do not occur, so it confines the frames of every walk to the window. The automaton may have walks that are not orbits, which only enlarges what the certificate excludes. \emph{Linearity.} Give an edge into $L_1$ from a state with frame $t$ and parity $\lambda$ the weight $2(-1)^{\lambda}(x^{t+1} + x^{t-1})$, the launch the weight $2(x + x^{-1})$, and a final state its lead of \S\ref{sec:2.3} for the target. The arrival polynomial of a walk is the launch weight plus the weights along it plus its lead. Since $e^{i\varphi}\cdot2i\cdot\Im(e^{-i\varphi}a) = a - \zeta^{2u_0}\bar{a}$ with $\zeta \coloneqq e^{i\theta}$ a primitive $4Q$-th root of unity, \eqref{eq:2.4} says that the image of the arrival polynomial under the $\mathbb{Q}$-linear map $L(a) \coloneqq a(x) - \zeta^{2u_0}a(x^{-1})$ to $\mathbb{Q}(\zeta)$ vanishes. Put $w_e \coloneqq L(\text{weight of }e)$, and join each final state to one sink by an edge carrying $L$ of its lead. \emph{The certificate.} A $\mathbb{Q}$-linear functional $F : \mathbb{Q}(\zeta) \to \mathbb{Q}$, integer-valued on the $w_e$, \textbf{certifies} a (launch, target) case if, with the integer edge weights $F(w_e)$, \begin{enumerate} \def\labelenumi{\arabic{enumi}.} \tightlist \item no cycle of the automaton has negative weight, and \item every path from the initial state to the sink has weight greater than $-F(L(2(x + x^{-1})))$. \end{enumerate} A walk from the initial state to the sink is such a path together with cycles, so $F$ of its arrival is positive and the arrival is not $0$: no connection of that case exists, of any length. Both conditions are checked by an exact integer Bellman--Ford computation. The functional is found from the linear-programming dual of the flow relaxation (non-negative real edge flows, conserved, one unit from the initial state to the sink, with the arrival vanishing): a floating-point solution is rounded to rational values on a basis of $\mathbb{Q}(\zeta)$, scaled to integers, and then verified exactly, so no tolerance enters. A case with no final state reachable is void. \emph{The result.} At the one-odd-prime $Q \leq 80$, all $2 \leq P \leq Q - 2$ coprime to $Q$ and all $0 < u_0 < P$, there are $95 394$ (launch, target) cases with a final state, and each is certified. The method can fail: at $8/15$ with $u_0 = 2$ and at $7/15$ with $u_0 = 5$ (target $A$) the relaxation is feasible and no certificate exists, and indeed the connections of the triangle $T_0$ (\S\ref{sec:6}) are walks of the automaton with vanishing arrival; at every $Q \leq 80$ with two odd prime factors some launch has no certificate. The finite check of A.5 (the gates of Lemma~\ref{lem:bad-gates} at the $Q = 2^a 3^b$ with $80 < Q < 280$) is direct exact arithmetic, not a certificate. \section{The $(4, 3)$ ladder}\label{sec:B} \emph{This appendix proves Theorems~\ref{thm:the-ladder} and \ref{thm:the-paired-class-of-the}. It follows the separatrices of the poles, the orbits launched from $R$, through an explicit staircase of edges of the unfolding; the conclusion is Theorem~\ref{thm:the-shape-of-a-minimal} (2) in both cases. Only the two smallest rungs of Theorem~\ref{thm:the-ladder} and fourteen inequalities in $\theta$ use a computation (\S\ref{sec:B.4}).} \subsection{The return map and the staircase}\label{sec:B.1} \textbf{Setting.} Fix $m \geq 1$, put $P = 4$ and $Q = 4m + 3$, with $\theta = \pi/2Q$ as in \S\ref{sec:2.1}, so that $\alpha = 4\theta$. Place $T$ as in \S\ref{sec:2.1}: $O = (0,0)$, $R = (L, 0)$, $A = (L, 1)$ with $L \coloneqq \cot 4\theta$, so that $|L_1| = 1$. Index oriented directions by $u \in \mathbb{Z}/4Q$ in units of $\theta$. Reflection in $L_2$, $L_1$ and $H$ acts by $u \mapsto -u$, $2Q - u$ and $8 - u$. The perpendicular beam leaves $L_1$ at $u = 2Q$, so its directions are its images under the translations $u \mapsto u + 2Q$ and $u \mapsto u + 8$ (products of two reflections) and their reversals; since $2Q - 8m = 6$ and $8 - 6 = 2$, these translations generate $2\mathbb{Z}/4Q$, so the directions are every even $u$. This is the class $\epar = 0$, perpendicular to $L_1$, and $L_1$ is the only side of $T$ perpendicular to it. A \textbf{state} is a pair $(y, b)$. Here $y \in [0, 1]$ is a height on $L_1$ above $R$, and $b \coloneqq u - 2Q \in (-Q, Q)$ is the direction in which the trajectory leaves $L_1$ after the bounce, with $b = 0$ the inward normal. A return with $b = 0$ is a \textbf{head-on} bounce: the orbit meets $L_1$ perpendicularly and retraces. The \textbf{$R$-prongs} are the trajectories launched from $R$ into $T$ along a class direction. These are the even $u \in (Q, 2Q)$, that is, the states $(0, -k)$ for $k = 2, 4, \ldots, Q - 1$. We write $R_k$ for the one with $b = -k$. There are $(Q - 1)/2$ of them. \textbf{The return map in closed form.} Unfold $T$ about $O$ by reflections in $L_2$ and $H$. The $2Q$ copies fill a cone of angle $2Q \cdot 4\theta = 4\pi$ about $O$. Two copies sharing an $L_2$-ray have collinear images of $L_1$, so those images pair into $Q$ edges of length $2$. Edge $j \in \mathbb{Z}/Q$ is tangent to $|z| = L$ at its midpoint, which is an image of $R$ at cover angle $8j\theta$, and its ends are images of $A$. A trajectory leaving $L_1$ is a chord leaving edge $0$, and its next return to $L_1$ is the first edge the chord meets. Put \[ s_j(b, y) \coloneqq [L(\sin b\theta - \sin b'\theta) - y \cos b\theta] / \cos b'\theta, \] where $b' \equiv 2Q - b + 8j \pmod{4Q}$, and $M(b, y) \coloneqq \sin b\theta - (y/L) \cos b\theta$. \emph{(i) If the chord of $(y, b)$ leaves through edge $j$, it does so at the signed offset $s = s_j(b, y)$ from the edge's midpoint, and the new state is $(|s|,\text{ sign}(s)\cdot b')$.} Rotate by $-8j\theta$. The angular momentum about $O$, $K = y \cos b\theta - L \sin b\theta$, is invariant under rotation. On the rotated edge $x = L$ it reads $s \cos((b - 8j)\theta) = K + L \sin((b - 8j)\theta)$, and since $b'\theta \equiv \pi - (b - 8j)\theta$ this is the formula. Reflecting the arrival direction in $L_1$ gives the departure $b'$. An exit on the lower half-edge lies in a copy reflected through $L_2$, which mirrors both the height and the direction. \emph{(ii) The exit edge.} \textbf{If an edge $j$ with $1 \leq |j| \leq m$, on the side $j \geq 1$ when $M < 0$ and $j \leq -1$ when $M > 0$, has $|s_j(b, y)| < 1$, then the chord leaves through $j$. The same holds for $j = m + 1$ when $b = +2$ and $M < 0$.} The chord does not pass through $O$, since that would force $M = 0$. Its forward polar angle therefore sweeps an open window $W$ of width $< \pi$, and a sector of width $< \pi$ develops isometrically into the plane. There the table is $\text{sector }\cap \bigcap H_k$, where $H_k = \{\Re(z e^{-8k\theta\sqrt{}-1}) \leq L\}$ runs over the edges $k$ within $\pi/2$ of $W$. For $\vartheta$ in edge $k$'s own sector $|\vartheta - 8k\theta| \leq 4\theta$, edge $k$ is the binding constraint, and $H_{k'}$ is vacuous wherever $\cos(\vartheta - 8k'\theta) \leq 0$. So the table in the sector is an intersection of convex sets, hence convex. A line meets the boundary of a convex set at most twice, and one of those meetings is the start on edge $0$. So any edge with $|s| < 1$ that the \emph{forward} ray meets, at a cover angle in $W$, is the exit edge. Forwardness holds for $1 \leq |j| \leq m$ on the stated side. The backward ray's asymptotic angle is $b\theta$, so the backward window is the interval between the starting angle $\vartheta_S$ and $b\theta$. That interval is $(b\theta, \vartheta_S) \subset (-\pi/2, 4\theta]$ when $M < 0$, and $(\vartheta_S, b\theta) \subset [0, \pi/2)$ when $M > 0$. These are disjoint from the edge sectors on the matching side, $[4\theta, \pi - 2\theta]$ and $[-\pi + 2\theta, -4\theta]$ respectively. The forward window lies in $(0, \pi + 4\theta)$, resp. $(-\pi, 4\theta]$, so the hit's cover angle $8j\theta +\text{ atan}(s/L)$ is its only lift in $W$. The side rule follows because $M = -(d\vartheta/dt)\cdot|z|^2/L$, and on the steps used below the side is automatic. It holds when $b < 0$, and when $b \geq 6$, since then $L \tan b\theta > 1 \geq y$. It holds when $b = +4$ provided $y < 1$. The one exception is the step $b = +2 \to +4$, and there the side condition $y < L \tan 2\theta$ is the same as $s > -1$, because $1 + s = (L \sin 2\theta - y \cos 2\theta)/\cos 4\theta$ (use $L \sin 4\theta = \cos 4\theta$). Finally, $8(m + 1)\theta = \pi + 2\theta$. \textbf{This is the first place where $Q = 4m + 3$ enters.} It makes the departure $+2$ the outward normal of edge $m + 1$. If $M < 0$, that is $y > L \tan 2\theta$, the forward window is $(\vartheta_S, \pi + 2\theta)$. The chord then meets edge $m + 1$ perpendicularly, at $|s| = y \cos 2\theta - L \sin 2\theta \in (0, 1/(2 \cos 2\theta)) \subset (0, 1)$. That is a head-on bounce. \textbf{The staircase.} For $c \equiv 2 \pmod{4}$ the \textbf{block} $B(c)$ is the following four steps. \begin{center} \begin{tabular}{@{}llllll@{}} \toprule step & $b$ & $b'$ & edge $j$ & sign of $s$ & new $b$ \\ \midrule T1 & $+(c+2)$ & $c$ & $(c-2)/4 - m$ & $-$ & $-c$ \\ T2 & $-c$ & $-(c+2)$ & $m - (c-2)/4$ & $+$ & $-(c+2)$ \\ T3 & $-(c+2)$ & $-c$ & $m - (c-2)/4$ & $-$ & $+c$ \\ T4 & $+c$ & $c - 6$ & $(c-2)/4 - m - 1$ & $+$ & $+(c-6)$ \\ \bottomrule \end{tabular} \end{center} Each row is $b' \equiv 2Q - b + 8j$ with $2Q - 8m = 6$. \textbf{This is the second place where $Q = 4m + 3$ enters.} T4 ends on the first step of $B(c - 8)$. For $6 \leq c \leq Q - 5$ every row has $1 \leq |j| \leq m$, on the side (ii) requires (T1: $j \geq -m$ iff $c \geq 2$; T4: $j \geq -m$ iff $c \geq 6$). Write $\varphi_1, \ldots, \varphi_4$ for the four maps $y \mapsto s_j(b, y)$. Each is affine and decreasing in $y$. The \textbf{pieces}, on which a step continues the staircase, are T1: $[z_1, 1]$, T2: $[0, y_2]$, T3: $[0, y_3]$, T4: $[y_4, 1]$. Here $z_1$ is the zero of $\varphi_1$, $y_2$ the zero of $\varphi_2$, $y_3 \coloneqq \varphi_3^{-1}(-1)$ and $y_4 \coloneqq \varphi_4^{-1}(1)$. Put \begin{gather*} Y_1 \coloneqq -\varphi_1(1),\quad Y_2 \coloneqq \varphi_2(0),\quad \ell_3 \coloneqq -\varphi_3(0),\quad \ell_4 \coloneqq \varphi_4(1), \\ z_1^- \coloneqq L(\sin(c-6)\theta - \sin(c-8)\theta)/\cos(c-6)\theta\text{ (the }z_1\text{ of }B(c - 8)\text{),} \end{gather*} and $g(c) \coloneqq 2 \sin(c-2)\theta - 2 \sin 2\theta \cos(c+2)\theta$. \begin{lemma}[the chain lemma]\label{lem:the-chain-lemma} Let $6 \leq c \leq Q - 5$. A state in a step's piece is carried by that step into the next step's piece, and T4 carries its piece into the piece of T1 of $B(c - 8)$. Every height met lies in $(0, 1)$. \end{lemma} \begin{proof} An affine image is contained in an interval when its endpoints are. With T1's piece mapped onto $[0, Y_1]$, T2's onto $[0, Y_2]$, T3's onto $[\ell_3, 1]$ and T4's onto $[\ell_4, 1]$, the lemma is the positivity of the following eight quantities. The first four are containments and the last four keep each step on its own edge. Each is an exact identity: \begin{gather*} y_2 - Y_1 = \ell_3 - y_4 = 2 \sin^2\theta \cdot g(c) / (\sin 4\theta \cos c\theta), \\ y_3 - Y_2 = 2 \sin^2\theta [2 \sin(c+4)\theta + 2 \cos c\theta \sin 2\theta] / (\sin 4\theta \cos(c+2)\theta), \\ \ell_4 - z_1^- = 2 \sin^2\theta [2 \sin(c-4)\theta + 2 \cos(c-8)\theta \sin 2\theta] / (\sin 4\theta \cos(c-6)\theta), \\ 1 - Y_1 = 2 \sin \theta \cos(c-3)\theta / (\sin 4\theta \cos c\theta), \\ 1 - Y_2 = 2 \sin \theta [\cos c\theta \cos \theta - \sin c\theta \sin 3\theta] / (\sin 4\theta \cos(c+2)\theta), \\ \ell_3 = 2 \sin \theta \cos 4\theta \cos(c+1)\theta / (\sin 4\theta \cos c\theta), \\ \ell_4 = 2 \sin \theta [\cos(c-8)\theta \cos \theta + \sin(c-4)\theta \sin \theta] / (\sin 4\theta \cos(c-6)\theta). \end{gather*} Every factor is positive on the range, because $c\theta \in [6\theta, \pi/2 - 5\theta]$ puts each argument in $(0, \pi/2)$ (or $(-\pi/2, \pi/2)$ for $(c-8)\theta$). Two factors need a line each. First, $g(c) \geq 2 \sin(c-2)\theta - 2 \sin 2\theta > 0$ since $c \geq 6$. Second, with $\gamma \coloneqq \pi/2 - c\theta \geq 5\theta$, $\cos c\theta \cos \theta - \sin c\theta \sin 3\theta = \sin \gamma \cos \theta - \cos \gamma \sin 3\theta \geq \sin(\gamma - 3\theta) > 0$. $Y_2 > 0$ and $\ell_3 < 1$ follow, the latter from $y_3 > Y_2 > 0$. The side of each step is automatic ($b \geq 6$ or $b < 0$), and strict positivity keeps every height in $(0, 1)$, so no image of a vertex is met. Given (ii), these eight are the complete list of conditions. \end{proof} At $c = 2$ two of the containments fail, since $g(2) = -2 \sin 2\theta \cos 4\theta < 0$. Near the bottom of the staircase a generic orbit can turn around without a head-on bounce. So the lemma alone does not give complete periodicity: what does is the explicit height at which each prong reaches the bottom. \textbf{The block invariant and the bottom.} Put $\eta \coloneqq y \cos(c+2)\theta$ at the start of T1 of $B(c)$. Composing T1--T4 gives \[ \eta(c - 8) = \eta(c) + L\cdot\Delta(c), \quad \Delta(c) = 4 \sin c\theta - \sin(c-6)\theta - 3 \sin(c+2)\theta, \] and since $G(c_0) \coloneqq \sin(c_0+2)\theta - \sin 4\theta - 4 \sin \theta (\sin(c_0+5)\theta - \sin 7\theta)/\sin 4\theta$ satisfies $G(c_0) - G(c_0 - 8) = \Delta(c_0)$ and $G(2) = 0$, \[ \eta(2) = \eta(c_0) + L\cdot G(c_0)\quad \text{ for }c_0 \equiv 2 \pmod{8},\quad 2 \leq c_0 \leq Q - 5. \] \emph{The bottom at $c \equiv 6 \pmod{8}$.} T4 of $B(6)$ has $b' = 0$, so it is a head-on bounce, and no further condition is needed. Its edge is $j = -m$, and it is valid by $g(6) > 0$ and $\ell_4(6) > 0$. \emph{The bottom at $c \equiv 2 \pmod{8}$.} After T1--T3 of $B(2)$ the state is $(y, +2)$. By (ii) it folds when $y > L \tan 2\theta$, which is equivalent to \[ \eta(2) < \vartheta_0 \coloneqq L(3 \sin 4\theta - 4 \sin 2\theta). \] This condition also implies T1(2)'s containment in T2(2)'s piece, because the gap there is $(2L(\sin 4\theta - \sin 2\theta) - \eta(2))/\cos 2\theta$ and $2L(\sin 4\theta - \sin 2\theta) - \vartheta_0 = 2L \sin 2\theta (1 - \cos 2\theta) \geq 0$. The steps T1--T3 of $B(2)$ also use $1 - Y_1$, $1 - Y_2$, $y_3 - Y_2$ and $\ell_3$ at $c = 2$. Their identities hold for every $c$, and at $c = 2$ their factors are $2 \sin \theta \cos \theta/(\sin 4\theta \cos 2\theta)$, $2 \cos 4\theta \cos \theta$, $2 \sin 6\theta + \sin 4\theta$ and $2 \sin \theta \cos 4\theta \cos 3\theta/(\sin 4\theta \cos 2\theta)$, all positive. T1(2)'s lower end is $\ell_4 - z_1^-$ at $c = 10$. \subsection{Proof of Theorem~\ref{thm:the-ladder}}\label{sec:B.2} For $m = 1, 2$, $Q = 7, 11$ is prime, and Corollary~\ref{cor:prime-and-twice-prime-denominators} (a) gives complete periodicity. The prong clause at those two rows is checked by a rigorous interval-arithmetic trace of each $R$-prong (\S\ref{sec:B.4}). The prongs $R_2, R_4, R_6$ meet $L_1$ head-on after $3, 4, 1$ returns at $Q = 7$, and $R_2, \ldots, R_{10}$ after $3, 8, 3, 2, 5$ at $Q = 11$. Let $m \geq 3$. We show that every $R$-prong reaches a head-on bounce. \emph{(a) The generic prongs.} If $k \equiv 2 \pmod{4}$ and $6 \leq k \leq Q - 5$, the state $(0, -k)$ is T2 of $B(k)$ at height $0$. That lies in the piece, since $0 < Y_2(k) < 1$ (Lemma~\ref{lem:the-chain-lemma}). If $k \equiv 0 \pmod{4}$ and $8 \leq k \leq Q - 3$, the state $(0, -k)$ is T3 of $B(k - 2)$ at height $0$. That lies in the piece, since $0 < \ell_3(k - 2) < 1$. Lemma~\ref{lem:the-chain-lemma} then carries the prong down the staircase, block by block. If it reaches the bottom at $c \equiv 6 \pmod{8}$, which happens for $k \equiv 6, 0 \pmod{8}$, it is head-on. Otherwise let $c_0$ be the first block whose T1 it enters: $c_0 = k - 8$ for $k \equiv 2 \pmod{8}$ ($k \geq 10$) and $c_0 = k - 10$ for $k \equiv 4 \pmod{8}$ ($k \geq 12$). The block invariant gives the fold margin in closed form, for $k \equiv 2$ and $k \equiv 4 \pmod{8}$ respectively: \begin{gather*} \vartheta_0 - \eta(2) = \frac{2 \sin^2\theta \cos 4\theta}{\sin^2 4\theta} \, [2 + 2 \cos(c_0+12)\theta - 2 \sin(c_0+8)\theta \sin 2\theta], \\ \vartheta_0 - \eta(2) = \frac{2 \sin^2\theta \cos 4\theta}{\sin^2 4\theta} \, [4 \sin^2((c_0+6)\theta/2) - 2 \sin(c_0+10)\theta \sin 2\theta]. \end{gather*} In the first case $c_0 + 12 = k + 4 \leq Q - 1$, so the bracket is at least $2 - 2 \sin 2\theta > 0$. In the second case put $v \coloneqq (c_0+6)\theta = (k - 4)\theta \in [8\theta, \pi/2)$. By concavity $4 \sin^2(v/2) \geq 8v^2/\pi^2$, and since $4\theta \leq v/2$ and $2\theta \leq v/4$, $2 \sin(v + 4\theta) \sin 2\theta \leq 2(3v/2)(v/4) = 3v^2/4 < 8v^2/\pi^2$. Both margins are positive, so the prong folds. \emph{(b) $R_2$.} The state $(0, -2)$ is T2 of $B(2)$ at height $0$. After T3 of $B(2)$ it folds iff $4 \cos 2\theta > 3$, which holds for every $m$. In fact $(y - L \tan 2\theta) \cos 2\theta \sin 4\theta / \cos 4\theta = \sin 2\theta (4 \cos 2\theta - 3)$ for its height $y$. \emph{(c) $R_4$.} The prong takes three steps, $-4 \to +2 \to -4 \to -10$, on edges $j = m, -m, m - 1$ with $s < 0, < 0, > 0$. It then runs T2--T4 of $B(10)$, which needs $10 \leq Q - 5$, i.e. $m \geq 3$, and reaches the bottom of $B(2)$. Its heights are \begin{gather*} y_1 = -s(-4, -2; 0),\quad y_2 = -s(2, 4; y_1),\quad y_3 = s(-4, -10; y_2), \\ y_4 = s(-10, -12; y_3),\quad y_5 = -s(-12, -10; y_4),\quad y_6 = s(10, 4; y_5), \end{gather*} with $s(b, b'; y) \coloneqq [L(\sin b\theta - \sin b'\theta) - y \cos b\theta]/\cos b'\theta$. It folds provided \[ 0 < y_i < 1\text{ (}i = 1, \ldots, 6\text{) and } \quad y_6 \cos 4\theta < \vartheta_0.\quad \text{ (I1--I13)} \] The second step is the one at $b = +2 \to +4$, where (ii) makes the side condition identical to $y_2 < 1$. $y_6 < 1$ puts the T4(10) image in $[\ell_4(10), 1]$, which lies inside T1(2)'s piece by Lemma~\ref{lem:the-chain-lemma} at $c = 10$. \emph{(d) $R_{Q-1}$.} The prong takes one step, $-(Q-1) \to +(Q-7)$, on edge $j = 1$, with $s = L(\cos 7\theta - \cos \theta)/\sin 7\theta < 0$. Its validity is $1 - |s| = \sin \theta/\sin 7\theta > 0$. The new state $(|s|, +(Q-7))$ is T1 of $B(Q - 9)$, inside its piece, because $(|s| - z_1(Q-9)) \sin 7\theta = 2 \cos 4\theta (2 \sin 3\theta - \sin 5\theta) > 0$. This needs $Q - 9 \geq 6$, i.e. $m \geq 3$. Since $Q - 9 = 4m - 6$, the prong reaches the bottom at $c \equiv 6 \pmod{8}$, and is head-on, exactly when $m$ is odd. When $m$ is even, $\eta(Q - 9) = |s| \sin 7\theta = 2 \cos 4\theta \sin 3\theta$ (using $\cos(Q-7)\theta = \sin 7\theta$). Using also $\sin(Q-7)\theta = \cos 7\theta$ and $\sin(Q-4)\theta = \cos 4\theta$ in $G(Q - 9)$, the fold condition is \[ 2 \cos 4\theta \sin 3\theta + L [\cos 7\theta - \sin 4\theta - 4 \sin \theta (\cos 4\theta - \sin 7\theta)/\sin 4\theta] < \vartheta_0.\quad \text{ (I14)} \] Its two sides tend to $3/4$ and $1$ as $m \to \infty$. \emph{(e) The certificate.} Each of (I1)--(I14) is the positivity of a quotient. The numerator is a trigonometric polynomial $\Sigma a_j e^{ij\theta}$ with Gaussian-rational coefficients. The denominator is a product of $\sin 4\theta$ and of $\cos k\theta$ with $k \leq 12$, all positive. The numerators are positive at every $m \geq 3$. For $3 \leq m \leq 3000$ this is shown in outward-rounded interval arithmetic. For $\theta \leq 1/7600$, which contains every $m \geq 2984$, it is shown from the exact Taylor coefficients at $\theta = 0$, with the remainder bound $\Sigma |a_j| |j|^N \theta^N/N!$ valid for any trigonometric polynomial. Each numerator vanishes at $\theta = 0$ to order $1$, $2$ or $3$, and the least relative margin of the Taylor bound is $40\%$ (\S\ref{sec:B.4}). So every $R$-prong reaches a head-on bounce, and none of its chords meets an image of a vertex, because every inequality above is strict and the head-on foot has $0 < |s| < 1$. A head-on bounce on $L_1$ is a crossing of a vertical arc of $\operatorname{Fix}(\iota)$ (\S\ref{sec:2.2}). The separatrix of every interior pole of $D$ projects to some $R_k$, since a simple pole emits one separatrix and it leaves $R$ in a class direction into $T$. So every interior pole's separatrix meets $\operatorname{Fix}(\iota)$, and by Theorem~\ref{thm:the-shape-of-a-minimal} (2) no pole lies in a minimal component. A minimal component holds at least two poles, so there is none, and the class is completely periodic. \qed The argument is \textbf{uniform in $m$}, and $m$ enters at exactly four places. The first two are arithmetic. One is the identity $8(m+1)\theta = \pi + 2\theta$, which puts the head-on direction $+2$ on edge $m + 1$. The other is $2Q - 8m = 6$, which fixes the staircase's edges and makes it descend by $8$ per block. This is what is special to the residue $Q \equiv 3 \pmod{4}$. Third, $m$ sets the range $6 \leq c \leq Q - 5$ of Lemma~\ref{lem:the-chain-lemma}, on which every argument bound above was checked as a bound in $c\theta$, not at sampled values. Fourth, $m$ decides which bottom a prong reaches, through $k \pmod{8}$ and, for $R_{Q-1}$, through the parity of $m$. Everything else is an identity in $\theta$ and $c$, valid at every $Q$, together with fourteen inequalities in $\theta$ alone that are certified for all $m \geq 3$, by finite interval arithmetic below $m = 3000$ and by an explicit remainder bound above it. Every $R$-prong was also traced along its predicted sequence to its head-on bounce for $m \leq 20$, without a mismatch. \subsection{The paired class: proof of Theorem~\ref{thm:the-paired-class-of-the}}\label{sec:B.3} The odd $u$ form the second perpendicular class of $T$, the class $\epar = 1$ of $4/Q$, which is the class $\epar = 0$ of $(Q - 4)/Q$ with the legs exchanged (\S\ref{sec:2.1}). Its sides perpendicular to the class are $L_2$, at $u = Q$, and $H$, at $u = Q + 4$. Keep the states $(y, b)$, the return map (i) and the exit-edge rule (ii) of the Setting; $b = u - 2Q$ is now odd. The $R$-prongs of this class are the odd $u \in (Q, 2Q)$, the states $(0, -k)$ for $k = 1, 3, \ldots, Q - 2$, and we write $R_k$ for them as before, the parity of $k$ telling the classes apart. Write $S_b \coloneqq \sin b\theta$ and $C_b \coloneqq \cos b\theta$. A step from $(y, b)$ with $s = -y$ and $b' \equiv b$, so that the new state is $(y, -b)$, is a \textbf{retrace}. Its chord runs from $(L, y)$ on edge $0$ to the mirror image of that point in the ray at angle $4j\theta$, since rotation by $8j\theta$ carries edge $0$ to edge $j$ and the reflection in that ray carries offset $y$ to $-y$. So the chord meets the ray perpendicularly at its midpoint. The ray is a copy of $L_2$ if $j$ is even and of $H$ if $j$ is odd, and the midpoint lies on that copy of the side: the chord's polar sweep $(\vartheta_S, 8j\theta - \vartheta_S)$ contains $4j\theta$ because $\vartheta_S < 4\theta \leq 4j\theta$, the chord lies in the table by (ii), and within the table the ray is exactly the side, from an image of $O$ to an image of $R$ or of $A$. A retrace is therefore a head-on bounce on $L_2$ or on $H$. \begin{proof}[Proof of Theorem~\ref{thm:the-paired-class-of-the}] Take $Q = 4m + 3$ first, so that $2Q - 8m = 6$. Each step below names its edge $j$. By (ii) it is the exit edge once $|s| < 1$, $1 \leq |j| \leq m$ and $j$ lies on the side of $M$. The three steps with $|j| = m + 1$ are licensed by the proof of (ii), with the forward window computed. \emph{(A) $k \equiv 3 \pmod{4}$.} Take $j = (Q - k)/4 \in [1, m]$. Then $b' \equiv 2Q + k + 2(Q - k) \equiv -k$, so $s = L(S_{-k} - S_{-k})/C_k = 0$, and $M = -S_k < 0$ puts $j \geq 1$ on the correct side. The chord runs from $R$ to the image of $R$ at the midpoint of edge $j$, which is the mirror image of $R$ in the ray at $4j\theta$. It meets that side head-on at its midpoint, at radius $L \cos 4j\theta < L$. \emph{(B) $k \equiv 1 \pmod{4}$, $k \geq 5$: the descent.} The first step is on $j = m - (k - 5)/4 \in [1, m]$. Here $8j = 2Q - 2k + 4$, so $b' \equiv 4 - k$ and $s = -L(S_k - S_{k-4})/C_{k-4} < 0$, as $0 < (k - 4)\theta < k\theta < \pi/2$; and $M = -S_k < 0$. The new state is $(y_1, k - 4)$. A \textbf{descent step} from $(y, b)$ with $b \equiv 1 \pmod{4}$ and $5 \leq b \leq k - 4$ is on $j = (b - 5)/4 - m \in [-m, -1]$. Here $8j = 2b - 2Q - 4$, so $b' = b - 4$ and $s = [L(S_b - S_{b-4}) - y C_b]/C_{b-4}$; and $M > 0$, since $y < 1 < L \tan 5\theta \leq L \tan b\theta$. The new state is $(s, b - 4)$ provided $0 < s < 1$. Put $\eta \coloneqq y C_b$. The first step gives $\eta_1 = L(S_k - S_{k-4})$, and a descent step gives $\eta' = L(S_b - S_{b-4}) - \eta$, where $S_b - S_{b-4} = 2 \sin 2\theta \cdot C_{b-2}$. Since $L \tan 2\theta (C_b + C_{b-4}) = 2L \sin 2\theta \cdot C_{b-2}$, induction gives, after $n$ steps, with $b_n = k - 4n$, \[ y_n = L \tan 2\theta \cdot [1 - (-1)^n C_k / C_{b_n}].\quad \text{ (B.1)} \] As $0 < b_n \theta < k\theta < \pi/2$, we have $0 < C_k/C_{b_n} < 1$, so $0 < y_n < 2L \tan 2\theta = 1 - \tan^2 2\theta < 1$. Every descent step therefore has $0 < s < 1$, and the prong reaches $b = 1$ at a height $y = y_{(k-1)/4} \in (0, 1)$. \emph{(C) The bottom $(y, 1)$, with $0 < y < 1$ and $y \neq L \tan \theta$.} If $y > L \tan \theta$, then $M < 0$. Take $j = m + 1$: since $8(m + 1) = 2Q + 2$, $b' \equiv 1$ and $s = -y$, a retrace, head-on at the ray $4(m + 1)\theta$. The licence: the forward window is $(\vartheta_S, \pi + \theta)$, with $\vartheta_S =\text{ atan}(y/L) \in (\theta, 4\theta)$, of width $< \pi$. The hit's cover angle $\pi + 2\theta - \vartheta_S$ lies in it, and in edge $m + 1$'s own sector $|\vartheta - (\pi + 2\theta)| \leq 4\theta$, where that edge is the binding constraint, so the convexity argument of (ii) applies. If $y < L \tan \theta$, then $M > 0$. Take $j = -(m + 1)$: $b' \equiv -3$ and $s = [L(S_1 + S_3) - y C_1]/C_3$. Here $L(S_1 + S_3) = C_1 C_4/C_2$ and $C_1 C_4 < C_2 C_3$ (equivalently $C_3 < C_1$), so $s < 1$ for every $y \geq 0$; and $s > 0$, as $y < L S_1/C_1 < L(S_1 + S_3)/C_1$. The licence: the window is $(\theta - \pi, \vartheta_S)$ with $\vartheta_S < \theta$, of width $< \pi$. The hit at $-\pi - 2\theta +\text{ atan}(s/L)$ lies in it if and only if $s > L \tan 3\theta$, that is $L S_1 > y C_1$, which holds, and in edge $-(m + 1)$'s sector since $s \leq 1 = L \tan 4\theta$. The new state is $(y', -3)$ with $y' = s$. Then take $j = m$: $b' \equiv 2Q + 3 + 8m \equiv -3$, $s = -y'$ and $M = -S_3 - (y'/L) C_3 < 0$, so by (ii) this is a retrace, head-on at the ray $4m\theta$. The case $y = L \tan \theta$ does not occur at a bottom reached by (B). By (B.1) it reads $1 - \sigma C_k/C_1 = \tan \theta/\tan 2\theta$ with $\sigma = (-1)^n$, that is $2\sigma C_k C_1 = 1$. Both cosines are positive, so $\sigma = 1$, and $2 \cos k\theta \cos \theta = 1$ is an identity in $\mathbb{Q}(\zeta_{4Q})$. It survives $\zeta \mapsto \zeta^r$ with $r = Q - 2$, which is odd and prime to $Q$, and becomes $2 \cos(kr\theta) \sin 2\theta = 1$, impossible since $\sin 2\theta < 1/2$ for $Q \geq 7$. \emph{(D) $k = 1$.} Take $j = m + 1$: $b' \equiv 2Q + 1 + 2Q + 2 \equiv 3$ and $s = -L(S_1 + S_3)/C_3 \in (-1, 0)$, as in (C). The licence: the window is $(0, \pi - \theta)$, the hit at $\pi + 2\theta -\text{ atan}(|s|/L)$ lies in it if and only if $|s| > L \tan 3\theta$, which follows from $S_1 > 0$, and it lies in edge $m + 1$'s sector since $|s| \leq 1$. The new state is $(|s|, -3)$, and the last step of (C) is a retrace on edge $m$. \emph{Conclusion.} Every $R$-prong meets $L_2$ or $H$ perpendicularly. No chord above meets an image of a vertex: every $|s|$ lies strictly in $(0, 1)$ except the $s = 0$ of (A), which ends the prong at a pole after its head-on midpoint, and $M \neq 0$ throughout, so no chord passes through $O$. A head-on bounce on a side perpendicular to the class is a crossing of a vertical arc of $\operatorname{Fix}(\iota)$ (\S\ref{sec:2.2}), and both $u = Q$ and $u = Q + 4$ lie in the class. The prong of every interior pole of $D$ projects to some $R_k$, since a simple pole emits one prong and it leaves $R$ in a class direction into $T$. So every interior pole's prong meets $\operatorname{Fix}(\iota)$, and by Theorem~\ref{thm:the-shape-of-a-minimal} (2) no pole lies in a minimal component. A minimal component holds at least two poles, so there is none, and the class is completely periodic. \emph{(F) $Q = 4m + 1$, $m \geq 2$.} Now $2Q - 8m = 2$. The roles of the residues $1$ and $3$ modulo $4$ are exchanged, and the bottom moves to $b = 3$. First, (ii) holds at this residue. The proof of (ii) used $Q = 4m + 3$ only through the edge sectors on the matching side, $[4\theta, \pi - 2\theta]$ and $[-\pi + 2\theta, -4\theta]$. Here $8m\theta = \pi - 2\theta$ widens them to $[4\theta, \pi + 2\theta]$ and $[-\pi - 2\theta, -4\theta]$. The backward windows, contained in $(-\pi/2, 4\theta]$ and $[0, \pi/2)$, are still disjoint from them; every hit below with $1 \leq j \leq m$ lies in $(4\theta, \pi + 2\theta) \subset (0, \pi + 4\theta)$ (the $j = m + 1$ step of (C$'$) is licensed there); and the one use of $j = -m$ has $s > 0$, so its hit $-\pi + 2\theta +\text{ atan}(s/L) \in (-\pi + 2\theta, -\pi + 6\theta)$ lies in the forward window $(-\pi + 3\theta, \vartheta_S)$ if and only if $s > L \tan \theta$, that is $y < L \tan 3\theta$, which holds there. So the conclusion of (ii) holds for every step below. \emph{(A$'$) $k \equiv 1 \pmod{4}$.} $j = (Q - k)/4 \in [1, m]$, $b' \equiv -k$ and $s = 0$, as in (A). \emph{(B$'$) $k \equiv 3 \pmod{4}$, $k \geq 7$.} The first step is on $j = m - (k - 3)/4 \in [1, m]$, with $8j = 2Q - 2k + 4$, so $b' \equiv 4 - k$, $s < 0$ and $M = -S_k < 0$. A descent step from $b \equiv 3 \pmod{4}$, $7 \leq b \leq k - 4$, is on $j = (b - 3)/4 - m \in [-m, -1]$, with $8j = 2b - 2Q - 4$, so $b' = b - 4$ and $s > 0$; $M > 0$ as $y < 1 < L \tan 5\theta$. The derivation of (B.1) does not read the residue, so the heights are (B.1), $0 < y_n < 1 - \tan^2 2\theta$, and the prong reaches $b = 3$. \emph{(C$'$) The bottom $(y, 3)$.} If $y > L \tan 3\theta$, then $M < 0$. Take $j = m + 1$: $8(m + 1) = 2Q + 6$, $b' \equiv 3$ and $s = -y$, a retrace. The licence is as in (C): the window is $(\vartheta_S, \pi + 3\theta)$ with $\vartheta_S \in (3\theta, 4\theta)$, and the hit at $\pi + 6\theta - \vartheta_S$ lies in it because $\vartheta_S > 3\theta$, and in edge $m + 1$'s sector because $\vartheta_S \leq 4\theta$. If $y < L \tan 3\theta$, then $M > 0$. Take $j = -m$, inside the range of (ii): $b' = -1$ and $s = [L(S_1 + S_3) - y C_3]/C_1 \in (0, 1)$, positive as $y < L S_3/C_3 < L(S_1 + S_3)/C_3$ and below $1$ as $L(S_1 + S_3) = C_1 C_4/C_2 < C_1$. From $(y', -1)$ take $j = m$: $b' \equiv 2Q + 1 + 8m \equiv -1$, $s = -y'$ and $M < 0$, a retrace. The case $y = L \tan 3\theta$ would read $\sigma C_k/C_3 = 1 - \tan 3\theta/\tan 2\theta < 0$, so $\sigma = -1$ and $C_k = \sin \theta/\sin 2\theta$, that is $2 \cos k\theta \cos \theta = 1$, which (C) excludes. \emph{(D$'$) $k = 3$.} Take $j = m$: $b' \equiv 1$, $s = -L(S_1 + S_3)/C_1 \in (-1, 0)$ and $M = -S_3 < 0$. The new state is $(|s|, -1)$, and the last step of (C$'$) follows. The retrace midpoints lie inside their sides as before, and the Conclusion applies verbatim. \end{proof} Every step of (A)--(D$'$) --- its edge, the sign of $s$, the new $b$, the bottom branch and the heights (B.1) --- was also checked along each $R$-prong for $m \leq 120$ and $m = 200, 300, 400$ at both residues, and by an independent billiard in $T$ at $40$ digits at nine values of $Q \equiv 3 \pmod{4}$ up to $203$, without a mismatch. No certificate is needed. Theorem~\ref{thm:the-ladder} needs a four-step block, a block invariant and fourteen inequalities certified by interval arithmetic; here the descent has one step type and its heights are the exact two-term formula (B.1). As there, $m$ enters only through $2Q - 8m$, equal to $6$ or $2$, which fixes every edge index, and through the range $1 \leq |j| \leq m$. At $Q = 4m + 1$ the class perpendicular to $L_1$ is not reached by this method (\S\ref{sec:7.3}); there both classes of $4/Q$ are completely periodic by Theorem~2 when $3 \nmid Q$, and by Theorem~3 when $Q$ is a prime power. \subsection{The certificate}\label{sec:B.4} The fourteen conditions in $\theta = \pi/(2Q)$ alone that the proof of Theorem~\ref{thm:the-ladder} leaves are rational functions of $\sin k\theta$, $\cos k\theta$ ($k \leq 12$) whose denominators are products of positive primitives, so each has the sign of a trigonometric polynomial. They are verified in outward-rounded interval arithmetic at every $m$ with $3 \leq m \leq 3000$, and for $\theta \leq 1/7600$ --- which contains every $m \geq 2984$ --- by the exact Taylor expansion at $\theta = 0$ with the Lagrange remainder $\sum_j |a_j| |j|^N \theta^N / N!$, in exact rational arithmetic; the two ranges overlap. Each numerator vanishes at $\theta = 0$ to order $1$, $2$ or $3$, and the least relative margin of the Taylor bound is $40\%$; the fourteen numerators, the order $N$ and the margins are part of the deposited certificate (\emph{Code availability}, below). At $m = 1, 2$ the prong clause is checked by a rigorous interval-arithmetic trace of each $R$-prong. \emph{Code availability.} The computations of this paper --- the certificates of Propositions~\ref{prop:the-certificate-computer-assisted} and \ref{prop:computer-assisted} and the check of Lemma~\ref{lem:bad-gates}, the return words and endpoint identities of Proposition~\ref{prop:6-4}, the interval certificate of \S\ref{sec:B.4}, and the identities and interval arithmetic behind Theorem~6 --- are deposited at \url{https://github.com/josh-boorstein/billiards}, whose manifest maps each one to the statement it supports; this paper's code is in the directories \texttt{lib/} and \texttt{method/}. The version used here is release v1.0, archived at Zenodo as \href{https://doi.org/10.5281/zenodo.24037744}{doi:10.5281/zenodo.24037744}. \section*{Use of AI} This paper --- its text, its proofs and the code behind Appendices~\ref{sec:A} and~\ref{sec:B}, Proposition~\ref{prop:6-4} and Theorem~6 --- was drafted by an AI system (Claude, Anthropic) working under the author's direction, and checked by independent AI review passes and by the computations described in Appendices~\ref{sec:A} and~\ref{sec:B}, \S\ref{sec:6.3} and \S\ref{sec:9.2}. The author has read parts of it in detail and takes responsibility for its content. \begin{thebibliography}{TGMM18} \bibitem[Api21]{Api21} P. Apisa, \emph{Billiards in right triangles and orbit closures in genus zero strata}, arXiv:2110.07540 (2021). \bibitem[Bos92]{Bos92} M. D. Boshernitzan, \emph{Billiards and rational periodic directions in polygons}, Amer. Math. Monthly \textbf{99} (1992), 522--529. \bibitem[BS02]{BS02} F. Beukers, C. J. Smyth, \emph{Cyclotomic points on curves}, in \emph{Number Theory for the Millennium} I (Urbana, IL, 2000), A K Peters, Natick, MA (2002), 67--85. \bibitem[CS08]{CS08} K. Calta, J. Smillie, \emph{Algebraically periodic translation surfaces}, J. Mod. Dyn. \textbf{2} (2008), 209--248. \bibitem[DR22]{DR22} V. Delecroix, J. R\"uth, \emph{Triangle (2, 3, 6) and (7, 8, 15) and others}, sage-flatsurf issue \#141 (2022), \url{https://github.com/flatsurf/sage-flatsurf/issues/141}; and the sage-flatsurf documentation example \emph{Boshernitzan's Conjectures} (version 0.8.0, November 2025), \url{https://flatsurf.github.io/sage-flatsurf/examples/boshernitzan_conjecture.html}. \bibitem[dB53]{dB53} N. G. de Bruijn, \emph{On the factorization of cyclic groups}, Indag. Math. \textbf{15} (1953), 370--377. \bibitem[Dre04]{Dre04} G. Dresden, \emph{On the middle coefficient of a cyclotomic polynomial}, Amer. Math. Monthly \textbf{111} (2004), 531--533. \bibitem[FR94]{FR94} C. Freiling, D. Rinne, \emph{Tiling a square with similar rectangles}, Math. Res. Lett. \textbf{1} (1994), 547--558. \bibitem[Hoo07]{Hoo07} W. P. Hooper, \emph{Periodic billiard paths in right triangles are unstable}, Geom. Dedicata \textbf{125} (2007), 39--46. \bibitem[Kea75]{Kea75} M. Keane, \emph{Interval exchange transformations}, Math. Z. \textbf{141} (1975), 25--31. \bibitem[KS00]{KS00} R. Kenyon, J. Smillie, \emph{Billiards on rational-angled triangles}, Comment. Math. Helv. \textbf{75} (2000), 65--108. \bibitem[Lac90]{Lac90} M. Laczkovich, \emph{Tilings of polygons with similar triangles}, Combinatorica \textbf{10} (1990), 281--306. \bibitem[Lan83]{Lan83} S. Lang, \emph{Fundamentals of Diophantine Geometry}, Springer (1983). \bibitem[LL96]{LL96} T. Y. Lam, K. H. Leung, \emph{Vanishing sums of mth roots of unity in finite fields}, Finite Fields Appl. \textbf{2} (1996), 422--438. \bibitem[LS95]{LS95} M. Laczkovich, G. Szekeres, \emph{Tilings of the square with similar rectangles}, Discrete Comput. Geom. \textbf{13} (1995), 569--572. \bibitem[McM03]{McM03} C. T. McMullen, \emph{Teichm\"uller geodesics of infinite complexity}, Acta Math. \textbf{191} (2003), 191--223. \bibitem[MW18]{MW18} M. Mirzakhani, A. Wright, \emph{Full rank affine invariant submanifolds}, Duke Math. J. \textbf{167} (2018), 1--40. \bibitem[Neck]{Neck} J. Boorstein, \emph{The necklace of a rational right triangle: exact counting and complete periodicity}, companion paper II, Hexagon, hexagon:2611.00213 (2026). \bibitem[Orph]{Orph} J. Boorstein, \emph{The orphan theorem: degenerate perpendicular orbits in rational right triangles}, companion paper I, Hexagon, hexagon:2611.00191 (2026). \bibitem[Puc01]{Puc01} J.-C. Puchta, \emph{On triangular billiards}, Comment. Math. Helv. \textbf{76} (2001), 501--505. \bibitem[Str84]{Str84} K. Strebel, \emph{Quadratic differentials}, Springer (1984). \bibitem[Tro05]{Tro05} S. Troubetzkoy, \emph{Periodic billiard orbits in right triangles}, Ann. Inst. Fourier \textbf{55} (2005), 29--46. \bibitem[Vee89]{Vee89} W. A. Veech, \emph{Teichm\"uller curves in moduli space, Eisenstein series and an application to triangular billiards}, Invent. Math. \textbf{97} (1989), 553--583. -\/-\/- \end{thebibliography} \end{document}