\documentclass[11pt,reqno]{amsart} \usepackage{jaswal} \usepackage{tikz} \newcommand{\Q}{\mathbb{Q}} \newcommand{\Z}{\mathbb{Z}} \newcommand{\R}{\mathbb{R}} \newcommand{\C}{\mathbb{C}} \newcommand{\GL}{\mathrm{GL}} \newcommand{\Mt}{\mathcal{M}(\theta)} \newcommand{\amb}{\mathcal{L}(\theta)} \newcommand{\Qt}{\widetilde{\mathcal{Q}}} \newcommand{\rk}{\operatorname{rank}} \newcommand{\Conf}{\mathrm{Conf}} \newcommand{\Mcyc}{\mathcal{M}_{\mathrm{cyc}}(\theta)} \newcommand{\Hm}{H^1(X,\Sigma;\C)^-} \begin{document} \title[Generic rational polygons with at least five sides]{Orbit closures of generic rational polygons with at least five sides} \author{Manvir Jaswal} \thanks{This paper is Part~IV of a series on orbit closures of unfoldings of rational polygons: Parts~I \cite{P23} and~II \cite{P25} treat triangles, Part~III \cite{P29} quadrilaterals and Part~IV polygons with at least five sides.} \address{Toronto, Canada} \email{manvirjaswal@icloud.com} \urladdr{https://manvirjaswal.github.io} \date{November 25, 2026} \subjclass[2020]{Primary 37C83; Secondary 32G15, 30F30, 11A07} \keywords{Rational billiards, translation surfaces, orbit closures, affine invariant submanifolds, cyclic covers} \hypersetup{pdftitle={Orbit closures of generic rational polygons with at least five sides},pdfauthor={Manvir Jaswal},pdfkeywords={Rational billiards, translation surfaces, orbit closures, affine invariant submanifolds, cyclic covers}} \begin{abstract} Mirzakhani and Wright attach to the angles $\theta$ of a rational polygon the orbit closure $\mathcal M(\theta)$ of the unfolding of almost every polygon with these angles. They ask whether, for more than four sides, $\mathcal M(\theta)$ can be anything other than a connected component of a stratum of Abelian differentials or a locus of double covers of a component of a stratum of quadratic differentials. It cannot. For every choice of five or more angles, $\mathcal M(\theta)$ is the component of its stratum if the least common denominator $k$ of the angles divided by $\pi$ is odd, and the locus of holonomy double covers of the component of its quadratic stratum if $k$ is even. Polygons in which some $s$ of the angles sum to $(s-1)\pi$ are also treated by Apisa and Aygun, by a different method. We read the rank of $\mathcal M(\theta)$ off characters of the deck rotation of the unfolding and induct on the number of sides by colliding two vertices; where no collision applies, arithmetic modulo $k$ takes its place. We also extend Mirzakhani and Wright's nonvanishing of the second fundamental form from triangles to every number of sides. \end{abstract} \maketitle \contents \section{Introduction}\label{sec:intro} A billiard trajectory in a polygon whose angles are rational multiples of $\pi$ unfolds to a straight line on a translation surface, the unfolding of the polygon \cite{ZemljakovKatok}. By the theorems of Eskin, Mirzakhani and Mohammadi, the closure of its $\GL^+(2,\R)$-orbit is an affine invariant submanifold \cite{EskinMirzakhani,EMM}. Mirzakhani and Wright attach to the angles $\theta$ of a rational polygon an affine invariant submanifold $\Mt$, the orbit closure of the unfolding of almost every polygon with these angles \cite[Lemma~6.3]{MirzakhaniWright}. Computing $\Mt$ for all $\theta$ is one of their long-term goals \cite[\S1]{MirzakhaniWright}. They ask whether, for polygons with more than four vertices, $\Mt$ is ever anything other than a connected component of a stratum of Abelian differentials or a locus $\Qt$ of double covers of the quadratic differentials in a component $\mathcal Q$ of a stratum \cite[Question~1.6]{MirzakhaniWright}. The answer is no (\cref{cor:Q16}). Parts~I \cite{P23} and~II \cite{P25} of this series treat triangles, Part~III quadrilaterals \cite{P29}, and this paper polygons with five or more vertices (\cref{ssec:series}). A polygon with $n$ vertices and angles $\pi q_1/k,\dots,\pi q_n/k$ in some cyclic order, where $k$ is the least common denominator of the angles divided by $\pi$, has \emph{type} $\theta=(q_1,\dots,q_n)/k$, and the $q_i$ are its \emph{weights}. So the weights are integers with $1\le q_i\le 2k-1$, $q_i\ne k$, $\sum_iq_i=(n-2)k$ and $\gcd(k,q_1,\dots,q_n)=1$. For distinct $z_1,\dots,z_n\in\C$ let $X_z$ be the smooth compact curve and $\omega_z$ the form given by \begin{equation}\label{eq:cover} y^k=\prod_{i=1}^n(w-z_i)^{q_i},\qquad \omega_z=\frac{y\,dw}{\prod_i(w-z_i)},\qquad T(y,w)=(\zeta y,w),\quad \zeta=e^{2\pi i/k}, \end{equation} a cyclic cover of degree $k$ of the sphere with deck rotation $T$. For $z$ in a suitable open set of real configurations, $(X_z,\omega_z)$ is the unfolding of a polygon of type $\theta$, and $\Mt$ is the smallest affine invariant submanifold that contains every $(X_z,\omega_z)$ \cite[\S6]{MirzakhaniWright}. We mark only the zeros of $\omega_z$, not the regular points over vertices. If $k$ is odd, the \emph{ambient locus} $\amb$ is the connected component of the stratum of Abelian differentials that contains the $(X_z,\omega_z)$. If $k$ is even, $\iota=T^{k/2}$ satisfies $\iota^*\omega_z=-\omega_z$, so $(X_z,\omega_z)$ is the holonomy double cover of $(X_z/\iota,\omega_z^2)$, and $\amb$ is the locus $\Qt$ for the component $\mathcal Q$ of the stratum of quadratic differentials containing these quotients. In both cases $\Mt\subset\amb$ (\cref{sec:cover}). We call $\theta$ \emph{open} if no set $S$ of vertices has $\sum_{i\in S}q_i=(|S|-1)k$, that is, if the exterior angles $\pi-\pi q_i/k$ at no set of vertices sum to $\pi$. Equivalently, no surface in the stratum $\Omega^k\mathcal M_0(q_1-k,\dots,q_n-k)$ of $k$-differentials on the sphere, whose holonomy covers are the $X_z$, has a Euclidean (isometrically embedded) cylinder \cite[Lemma~7.5]{ApisaAygun}. A type of pentagons is open exactly when no two of its angles sum to $\pi$. For quadrilaterals this is the condition that Part~III calls ``not supplementary''. Part~III calls a type of quadrilaterals open when it is moreover reduced and not one of Delecroix and R\"uth's seven exceptional types \cite[\S4.6]{P29}, so these seven types are open in our sense but not in Part~III's. \begin{theorem}\label{thm:open} Let $n\ge5$ and let $\theta$ be an open type of $n$-gons. Then $\Mt=\amb$, so the unfolding of almost every polygon of type $\theta$ has orbit closure $\amb$. \end{theorem} \begin{theorem}[Apisa and Aygun {\cite[Theorem~1.2 and Corollary~1.3]{ApisaAygun}}]\label{thm:AA} Let $n\ge5$ and let $\theta$ be a type of $n$-gons that is not open. Then $\Mt=\amb$. \end{theorem} \begin{corollary}\label{cor:Q16} Let $n\ge5$ and let $\theta$ be a type of $n$-gons. Then $\Mt$ is a connected component of a stratum of Abelian differentials if $k$ is odd, and the locus $\Qt$ for a connected component $\mathcal Q$ of a stratum of quadratic differentials if $k$ is even. In particular, there is no $\theta$ as in the second part of Question~1.6 of~\cite{MirzakhaniWright}. \end{corollary} Both theorems concern the generic member of a type. All angles of the regular pentagon are $3\pi/5$, and its unfolding has a closed orbit, its Veech group being a lattice \cite[proof of Theorem~1.5]{Veech}. By \cref{thm:open}, almost every pentagon with these angles has an unfolding whose orbit is dense in the component of $\mathcal H(2,2,2,2,2)$ that contains it. In fact, as $k=5$, the pentagons with these angles whose unfoldings have this component as orbit closure form an open dense set of full measure (\cref{cor:exceptional}). In \cref{cor:Q16}, $\Qt$ is formed from a connected component, as in Mirzakhani and Wright's definition \cite[\S1]{MirzakhaniWright}, and the component matters, since some of these strata are not connected (\cref{ssec:Q16}). Apisa and Aygun's hypothesis, that some of the orders $q_i-k$ sum to $-k$, says that $\theta$ is not open. Before them, Apisa proved this for the types with at most two angles that are not multiples of $\pi/2$ \cite[Theorem~1.11]{Apisa}, which are never open. For $k=2$, where every angle is $\pi/2$ or $3\pi/2$, it is due to Athreya, Eskin and Zorich with Chaika \cite[Theorem~C.1]{AEZ}. For $k=3$, \cref{thm:open,thm:AA} are Mirzakhani and Wright's Theorem~1.3 \cite{MirzakhaniWright}. Our method also proves \cref{thm:AA}, independently of Apisa and Aygun's argument (\cref{sec:nonopen}). The two methods divide the work differently. Apisa and Aygun degenerate along a Euclidean cylinder, which exists exactly when $\theta$ is not open; they merge two singularities so that such a cylinder remains, and use it at four singularities and where a merge leaves a disconnected cover \cite[Lemma~12.6 and Sublemmas~12.8 and~12.9]{ApisaAygun}. We read the rank of $\Mt$ off the set of characters of $T$ whose eigenspaces are tangent to $\Mt$ \cite[\S7]{MirzakhaniWright}, and induct on $n$ by colliding two vertices, as Apisa \cite[Sublemma~11.2]{Apisa} and Apisa and Aygun \cite[\S12]{ApisaAygun} do. When two suitable vertices collide, the polygon degenerates to one with $n-1$ vertices (\cref{fig:collision}), and if $\mathcal M=\mathcal L$ for the limit type, Mirzakhani and Wright's boundary theorem puts into this set every character that is non-zero at all the weights. For an open type a collision may leave a disconnected cover, but only because a prime $p$ dividing $k$ divides every weight except the two colliding ones. With two such primes, arithmetic modulo $k$ takes the place of the collision and puts every unit into the set. \Cref{sec:billiards} draws the consequences for billiards in almost every polygon $P$ of a type with $n\ge5$. The number of bands of periodic billiard trajectories in $P$ of length at most $L$ has a weak quadratic asymptotic in the sense of Eskin, Mirzakhani and Mohammadi \cite[Theorem~2.12]{EMM}. We identify its constant in terms of Siegel--Veech constants and the number of regular points over the vertices (\cref{cor:count}). The polygons of the type whose unfoldings have smaller orbit closures form a finite union of closed real-analytic subsets of measure zero if $k\notin\{2,3,4,6\}$, and a dense set if $k\in\{2,3,4,6\}$ (\cref{cor:exceptional}). Any two distinct points of $P$, vertices included, are joined by a billiard path that avoids any given finite set of other points (\cref{cor:illum}). The angles of a type lie in $(0,\pi)\cup(\pi,2\pi)$, as in Mirzakhani and Wright's setting \cite[\S6]{MirzakhaniWright}. An angle $2\pi$ changes the answer. The cyclic forms of the pentagon type $(1,1,2,2,12)/6$, whose last angle is $2\pi$, generate a primitive invariant subvariety of dimension~$6$ \cite[Theorem~1.6]{EMMW}. We do not know which types with an angle $2\pi$ have $\Mt\ne\amb$. Mirzakhani and Wright improve their lower bound for the rank of $\Mt$ using the form \[ B_\omega(\alpha,\beta)=\frac i2\int_X\alpha\beta\,\frac{\bar\omega}{\omega} \] on holomorphic forms, which computes the second fundamental form of the Hodge bundle \cite[\S7.1]{MirzakhaniWright}. For $x\in\Z/k$ let $H^{1,0}_x(X_z)$ be the space of holomorphic forms on which $T^*$ acts by $\zeta^x$, and put $t(x)=\sum_i\{xq_i/k\}$, where $\{\cdot\}$ is the fractional part; then $H^{1,0}_x(X_z)\ne0$ exactly when $t(-x)>1$ \cite[Lemma~6.1]{MirzakhaniWright}. For triangles they show that $B_{\omega_z}(\alpha,\beta)\ne0$ for some $z$, $\alpha\in H^{1,0}_a(X_z)$ and $\beta\in H^{1,0}_b(X_z)$ whenever $a+b\equiv2\pmod k$, $t(-a)>1$ and $t(-b)>1$, and they ask when this holds for $n>3$ \cite[Proposition~7.3 and Problem~7.4]{MirzakhaniWright}. For $k>2$ it always does. \begin{theorem}\label{thm:B} Let $n\ge3$, let $\theta$ be a type of $n$-gons with $k>2$, and let $01$ and $t(-b)>1$. There are forms $\alpha_z\in H^{1,0}_a(X_z)$ and $\beta_z\in H^{1,0}_b(X_z)$, depending holomorphically on $z$, such that $B_{\omega_z}(\alpha_z,\beta_z)\ne0$ for every $z$ outside a proper real-analytic subset of the space of configurations. \end{theorem} For a type of triangles, Mirzakhani and Wright prove that $\Mt$ has rank greater than $n-2$ when some unit $a$ modulo $k$ has $2a\not\equiv2\pmod k$, $t(-a)>1$ and $t(-(2-a))>1$. They remark that this holds for every $n$ once the second statement of their Proposition~7.3 does \cite[Theorem~7.5]{MirzakhaniWright}, so by \cref{thm:B} it holds for every $n\ge3$. \subsection{The series}\label{ssec:series} \begin{table}[ht] \caption{What each part of the series proves. For a triangle, $\Mt$ is the orbit closure of its unfolding.}\label{tab:series} \begin{tabular}{@{}l l p{10.2cm}@{}} \toprule Part & Vertices & Result \\ \midrule I \cite{P23} & $3$ & Classifies the scalene triangles of rank one; for prime $k$, every scalene triangle has orbit closure the component of its stratum \cite[Theorems~1.1 and~1.2]{P23}. \\ II \cite{P25} & $3$ & Every scalene triangle that is not on Delecroix and R\"uth's list has orbit closure its ambient locus; with Part~I, no triangle on the list other than $(3,4,13)/20$ does \cite[Theorem~1.1 and Corollary~1.3]{P25}. \\ III \cite{P29} & $4$ & $\Mt=\amb$ for every reduced type that is not one of Delecroix and R\"uth's seven \cite[Theorem~1.1]{P29}. For the types with two angles summing to $\pi$, Apisa and Aygun prove that the generic orbit closure is as big as possible \cite[Corollary~1.3]{ApisaAygun}. \\ IV & $\ge5$ & $\Mt=\amb$ for every type: \cref{thm:open}, and \cref{thm:AA} (also \cite[Theorem~1.2]{ApisaAygun}). \\ \bottomrule \end{tabular} \end{table} \Cref{tab:series} lists what each part of the series proves. Parts~I and~II write $N$ for $k$, and Part~III writes the angles of its quadrilaterals as $2\pi a_i/N$, so that $N$ is $k$ or $2k$. Delecroix and R\"uth conjecture that their lists of exceptional triangles and quadrilaterals are complete \cite[\S4]{DelecroixRuth}. Part~II proves this for triangles and Part~III for the generic quadrilateral of each type, and Part~III answers the first part of Mirzakhani and Wright's Question~1.6 \cite[\S1]{P29}. The right and isosceles triangles, the quadrilaterals with two right angles, and the quadrilaterals that are not reduced, the parallelograms and isosceles trapezoids other than rectangles, are Apisa's \cite[Theorems~7.6, 7.7, 1.10 and~1.9]{Apisa}. For six of Delecroix and R\"uth's seven quadrilateral types, $\Mt$ is a primitive invariant subvariety of rank two and dimension~$4$ identified by Eskin, McMullen, Mukamel and Wright \cite[Theorem~1.1 and \S5]{EMMW}. With these results (see \cite[\S1]{P25} and \cite[\S1.1]{P29}), \cref{thm:open,thm:AA} leave two types whose $\Mt$ is not known, the triangle $(3,4,13)/20$ and the quadrilateral $(2,2,3,13)/10$. Delecroix and R\"uth show that the unfoldings of the second lie in the orbit closure of the unfolding of the first, and conjecture that this orbit closure has dimension~$4$ \cite[Theorem~1.2 and Conjecture~1.1]{DelecroixRuth}. Delecroix announces a positive answer, from joint work with Kai Fu \cite[pp.~48--49]{DelecroixHab}; his slides of June 2025, on joint work with K.~Fu and B.~Zykoski, list this orbit closure with dimension~$4$ and rank~$2$ \cite[slide~12]{DelecroixJHH80}. \Cref{thm:open} is false for $n=4$: Delecroix and R\"uth's seven quadrilateral types are open, and for the six of Eskin, McMullen, Mukamel and Wright $\Mt\ne\amb$ \cite[Theorem~1.1 and \S5]{EMMW}. \subsection{The proof}\label{ssec:proof} Fix a type $\theta$ of $n$-gons, $n\ge5$, and a point $X=X_z$ of the family \eqref{eq:cover} outside a proper closed analytic subset of the configuration space (\cref{ssec:generic}). The deck rotation $T$ acts on the cohomology of $X$, and the monodromy over the configuration space acts irreducibly on each non-zero eigenspace $H^1_x$, $x\in\Z/k$ (\cref{lem:irr}). So the absolute part $p(V)$ of the tangent space $V$ of $\Mt$ at $X$ is a sum of these eigenspaces, and the rank of $\Mt$ is read off the set $A$ of the characters $x$ with $0\ne H^1_x\subset p(V)$ (\cref{prop:block}). The proof shows that $A=E$, where $p(T_X\amb)=\bigoplus_{x\in E}H^1_x$ (\cref{lem:ambient}). This is Mirzakhani and Wright's frame \cite[\S7]{MirzakhaniWright}, used also in Parts~I to~III, and $\pm1\in A$ \cite[Corollary~6.5]{MirzakhaniWright}. For odd $k$, $A=E$ gives full rank, and Mirzakhani and Wright's theorem on orbit closures of full rank, with their Lemma~6.7, gives $\Mt=\amb$ \cite[Theorem~1.1 and Lemma~6.7]{MirzakhaniWright}. For even $k$ a statement on relative cohomology is needed as well (\cref{lem:AE}). Three rules constrain $A$ (\cref{sec:rules}). Rule~(i) says that $A=-A$, and that $uA=A$ for every unit $u$ with $uA\cap A\ne\emptyset$ (\cref{prop:rule1}); it is proved as Mirzakhani and Wright's Lemmas~7.6 and~7.10 \cite{MirzakhaniWright}. Rules~(ii) and~(iii) come from differentiating a holomorphic eigenform along $\Mt$ \cite{KahnWright}, as in Part~III \cite[Theorems~4.6 and~4.7]{P29}. Rule~(ii) adds characters to $A$ (\cref{thm:diff}), and rule~(iii) says that if $k>2$ is even and $A=E$, then $V$ is the $(-1)$-eigenspace of $\iota^*$ on $H^1(X,\Sigma;\C)$ (\cref{prop:rule3}). Both rest on a count of exact forms that also proves \cref{thm:B}. The proof is carried by the collision of two vertices (\cref{sec:collision}). When two vertices $i$ and $j$ whose angles sum to more than $\pi$ collide, the polygon degenerates to one with $n-1$ vertices, whose angle at the merged vertex is the sum of the two angles minus $\pi$ (\cref{fig:collision}). When this angle lies in $(0,\pi)\cup(\pi,2\pi)$ and a condition on greatest common divisors holds, $\{i,j\}$ is a collision pair (\cref{def:pair}), and the unfolding degenerates to the connected unfolding of a type $\theta_{ij}$ with $n-1$ vertices. If $\mathcal M(\theta_{ij})=\mathcal L(\theta_{ij})$, Mirzakhani and Wright's boundary theorem \cite[Theorem~2.9]{MWBoundary} puts into $A$ every character of $E$ that is non-zero at three or more weights of $\theta_{ij}$ (\cref{prop:collision}). As $n-2\ge3$ weights of $\theta_{ij}$ are weights of $\theta$, this includes the set $F$ of the characters of $E$ that are non-zero at all the weights of $\theta$. If $\theta$ is open, so is $\theta_{ij}$, and for open types this hypothesis comes by induction on $n$ from Part~III. For $n=5$, $\theta_{ij}$ is a quadrilateral, and Part~III gives $\mathcal M(\theta_{ij})=\mathcal L(\theta_{ij})$ when it is reduced and not one of the seven types \cite[Theorem~1.1]{P29}; for open $\theta$ with $k\ge11$ both conditions hold. Once $F\subset A$, rule~(ii) and an average of fractional parts over the units (\cref{lem:height}) give the rest of $E$, except for some pentagon types with $k\mid30$. The pentagon types with $k\le10$ or $k\in\{15,30\}$ we settle by computation (\cref{ssec:computations}). An open type may have no collision pair (\cref{rem:nocollision}). Then each pair $\{i,j\}$ that satisfies the first two conditions of \cref{def:pair} fails the third at a prime $p$ that divides $k$ and every weight other than $q_i$ and $q_j$, and different pairs have different primes. Changing a character $x$ by a multiple of $k/p$ changes only the two terms $\{-xq_i/k\}$ and $\{-xq_j/k\}$ of $t(-x)$, which decides whether $x$ has holomorphic eigenforms. We choose the digits of units $x$ and $b$ at two such primes so that rule~(ii) puts the quotient $b/x$ into $A$. These quotients give every unit, by the digit method of Part~III \cite[Lemma~6.6 and Proposition~6.7]{P29}; when $12\mid k$ this needs a character that is not a unit (\cref{prop:arith}). From the units, rule~(ii) and the average give the rest of $E$ as before. For the types that are not open, our proof of \cref{thm:AA} follows the same plan (\cref{ssec:second}). The vertices split into two sets, each with exterior angles summing to $\pi$. For a unit $x$ the fractional parts $\{-xq_i/k\}$ over each set sum to a positive integer; so every unit has holomorphic eigenforms, and the average has no exceptions. A collision pair to which the induction applies exists when $k\ge3$ and $n\ge6$, and when $k\ge11$ (\cref{prop:nonopenpair}). The pentagon types with $3\le k\le10$ are settled by computation, and for $k=2$ the family \eqref{eq:cover} is already all of $\amb$. Part~III also provides the proof of the collision that we follow \cite[Theorem~3.2]{P29}, the means over fibers behind the average \cite[Lemmas~6.2 and~6.3]{P29}, and, for even $k$, the passage from ratios to units \cite[Lemma~7.1]{P29} and the use of a character that is not a unit \cite[proof of Proposition~7.4]{P29}. \subsection{Computations}\label{ssec:computations} For the $700$ pentagon types with $k\le10$, open or not, and the $936$ and $16{,}711$ open ones with $k=15$ and $k=30$, we compute the smallest set of characters that contains $\pm1$ and the characters given by collisions, and is closed under the rules (i) and (ii), as in Part~III \cite[\S4.6]{P29} after Mirzakhani and Wright \cite[Theorem~7.14 and Appendix~A]{MirzakhaniWright}. For these types we find that it is $E$. A search of the pentagon types with $k\le10$ finds the open ones that have no collision pair to which (d) of \cref{def:closed} applies (\cref{rem:nocollision}). The programs are deposited with their output and instructions for rerunning them \cite{Record}. \section{Cyclic covers and their characters}\label{sec:cover} Throughout, $\theta=(q_1,\dots,q_n)/k$ is a type of $n$-gons, $\Conf\subset\C^n$ is the space of $n$-tuples of distinct points, and $X=X_z$, $\omega=\omega_z$ are as in \eqref{eq:cover} for $z\in\Conf$. Let $\Mcyc$ be the set of all $(X_z,\omega_z)$; it is connected, and $\Mt$ is the smallest affine invariant submanifold that contains it \cite[\S6]{MirzakhaniWright}. Orbits and invariance are for $\GL^+(2,\R)$. The set-up of this section is that of Part~III for four points \cite[\S\S2.1--2.2]{P29}. \subsection{Eigenspaces}\label{ssec:eigen} Let $g_i=\gcd(k,q_i)$ and $e_i=k/g_i$, so $e_i\ge2$. Over $z_i$ the curve $X$ has $g_i$ points, permuted cyclically by $T$, each with ramification index $e_i$, and $\omega$ has order $q_i/g_i-1$ at each of them. As $\sum_iq_i\equiv0\pmod k$, the cover is unramified over $\infty$, where $\omega$ has neither zeros nor poles. So the zero set $\Sigma$ of $\omega$ consists of the points over the $z_i$ with $q_i\nmid k$; the points over the other $z_i$ are regular and are not marked. By Riemann--Hurwitz the genus $g$ of $X$ satisfies \begin{equation}\label{eq:genus} 2g-2=(n-2)k-\sum_ig_i . \end{equation} For $n\ge5$ this gives $g\ge2$, since $g_i\le k/2$ and so $2g-2\ge(n-4)k/2>0$. For real numbers $\epsilon_1,\dots,\epsilon_n$ and an integer $j$ with $\epsilon_i\equiv jq_i/k\pmod 1$ for every $i$, we write $\prod_i(w-z_i)^{\epsilon_i}$ for the meromorphic function $y^j\prod_i(w-z_i)^{\epsilon_i-jq_i/k}$ on $X$, on which $T^*$ acts by $\zeta^j$; this is Mirzakhani and Wright's shorthand \cite[\S6]{MirzakhaniWright}. Every meromorphic function on $X$ on which $T^*$ acts by $\zeta^j$ is $S(w)\prod_i(w-z_i)^{\epsilon_i}$ with $S$ rational, since its quotient by $\prod_i(w-z_i)^{\epsilon_i}$ is $T$-invariant. In this notation $\omega=\prod_i(w-z_i)^{q_i/k-1}dw$. For $x\in\Z/k$ let $H^1_x$, $H^1(X,\Sigma)_x$ and $H^{1,0}_x$ be the $\zeta^x$-eigenspaces of $T^*$ on $H^1(X;\C)$, on $H^1(X,\Sigma;\C)$ and on the space of holomorphic $1$-forms, so that $\omega\in H^{1,0}_1$. Let $t_i(x)=\{xq_i/k\}$, so that $t(x)=\sum_it_i(x)$, and let $n(x)$ be the number of $i$ with $xq_i\not\equiv0\pmod k$. As $\sum_ixq_i\equiv0\pmod k$, $t(x)$ is an integer, and $t(x)+t(-x)=n(x)$, since $\{s\}+\{-s\}$ is $1$ for $s\notin\Z$ and $0$ for $s\in\Z$. We call $h(x)=t(-x)-1$ the \emph{height} of $x$. For $x\not\equiv0$, $H^{1,0}_x$ is spanned by the forms \begin{equation}\label{eq:basis} P(w)\prod_i(w-z_i)^{-t_i(-x)}\,dw,\qquad \deg P\le h(x)-1, \end{equation} so $\dim H^{1,0}_x=h(x)$ and $\dim H^1_x=h(x)+h(-x)=n(x)-2$ \cite[Lemma~6.1 and Corollary~6.2]{MirzakhaniWright}. Also $H^1_0=0$, as $X/\langle T\rangle$ has genus zero. For $x\not\equiv0$ we have $n(x)\ge2$: $n(x)=1$ is impossible as $t(x)$ is an integer, and $n(x)=0$ would give $x\gcd(k,q_1,\dots,q_n)\equiv0$. Let $E$ be the set of $x$ with $n(x)\ge3$, odd if $k$ is even, let $F$ be the set of $x\in E$ with $n(x)=n$, and let $U$ be the set of units modulo $k$. Every unit $x$ has $n(x)=n$, and is odd if $k$ is even; so $U\subset F$, and in particular $\pm1\in F$. Let $p:H^1(X,\Sigma;\C)\to H^1(X;\C)$ be the restriction and $Z=\ker p$, the image of the coboundary $\delta$ from functions on $\Sigma$, and let $Z_c$ be the $\zeta^c$-eigenspace of $T^*$ on $Z$. As $p$ is onto and $T$-equivariant, for every $c$ the sequence \begin{equation}\label{eq:exact} 0\to Z_c\to H^1(X,\Sigma)_c\xrightarrow{\ p\ }H^1_c\to0 \end{equation} is exact. For $c\not\equiv0$ the constant functions contribute nothing to $Z_c$, and the functions of character $c$ on the $g_i$ points over $z_i$ form a line if $e_i\mid c$, that is if $cq_i\equiv0$, and are zero otherwise. So for $c\not\equiv0$, $\dim Z_c=|I(c)|$, where $I(c)$ is the set of $i$ with $q_i\nmid k$ and $cq_i\equiv0\pmod k$; in particular $Z_x=0$ for $x\in F$. \subsection{Generic points and the ambient locus}\label{ssec:generic} From now on $n\ge5$. Part~III proves the next lemma at four points for the automorphisms that multiply $\omega$ by a constant, where it needs the angles \cite[Lemma~2.2]{P29}; at five or more points a count of dimensions suffices. \begin{lemma}\label{lem:aut} Let $n\ge5$. For $z$ outside a proper algebraic subset of $\Conf$, every automorphism of $X_z$ is a power of $T$. \end{lemma} \begin{proof} Let $G$ be the automorphism group of $X=X_z$. It is finite, as $g\ge2$, and it contains $\langle T\rangle$. Suppose that $G\ne\langle T\rangle$, and let $d=[G:\langle T\rangle]\ge2$, $\psi:X\to X/G$ the quotient map and $f:X/\langle T\rangle\to X/G$ the induced map of degree $d$. As $X/\langle T\rangle$ is the $w$-sphere, $X/G$ is a sphere. Let $B$ be the number of branch values of $\psi$. Over a branch value $s$ all points of $X$ have stabilizers in $G$ of the same order, greater than one, and this order is the product of the ramification indices of $w$ and of $f$. So each point of $f^{-1}(s)$ is one of $z_1,\dots,z_n$ or a ramification point of $f$, and the critical values of $f$ are among the branch values of $\psi$. Each $z_i$ lies over a branch value, as the points of $X$ over it are fixed by a non-trivial power of $T$. If $r_s$ is the total ramification of $f$ over $s$, then $f^{-1}(s)$ has $d-r_s$ points, at most $r_s$ of which are ramification points, so at least $d-2r_s$ of the $z_i$ lie over $s$. Summing over the branch values and using $\sum_sr_s=2d-2$, we get $Bd-4d+4\le n$, so \[ B\le4+\frac{n-4}{d}\le\frac{n+4}2r$. So $H^1_x$ is identified, compatibly with the Gauss--Manin connection over $\Conf$, with $W_x/B_x$, where $W_x$ is the space of crossed homomorphisms with $v_i=0$ for $i>r$, of dimension $r-1$, and $B_x\subset W_x$ is the line of coboundaries. Let $1\le ir$, so $v\in B_x$, a contradiction. \end{proof} \needspace{4\baselineskip} \begin{proposition}\label{prop:block} Let $X$ be a generic point. Then $T^*V=V$, so $V=\bigoplus_cV_c$ with $V_c=V\cap H^1(X,\Sigma)_c$. Let \[ A=\{x\in E:H^1_x\subset p(V)\}. \] Then \begin{equation}\label{eq:block} p(V)=\bigoplus_{x\in A}H^1_x,\qquad \rk\Mt=\frac12\sum_{x\in A}(n(x)-2),\qquad \pm1\in A, \end{equation} and $A$ is the same at every generic point. So $\rk\Mt=\rk\amb$ if and only if $A=E$. \end{proposition} \begin{proof} We follow Mirzakhani and Wright's proof of their Lemma~7.7 \cite{MirzakhaniWright}, as in Part~III \cite[Proposition~2.5]{P29}. Rotation by $e^{i\phi}$, $0\le\phi\le2\pi/k$, is a path in $\Mt$ from $(X,\omega)$ to $(X,\zeta\omega)$, and $T$ is an isomorphism from $(X,\zeta\omega)$ to $(X,\omega)$; so the path is a loop with monodromy $T^*$ on $H^1(X,\Sigma;\C)$, and as $\Mt$ is the single subspace $V$ near $X$, $T^*V=V$. So $V$ is the sum of its intersections with the eigenspaces of the finite-order map $T^*$, and $p(V)=\bigoplus_cp(V_c)$ with $p(V_c)\subset H^1_c$. For even $k$, $V\subset\Hm$, so $p(V_c)=0$ for even $c$. Over $\Conf^\circ$ the tangent spaces $T_{X_z}\Mt$ form a flat subbundle of the local system with fibers $H^1(X_z,\Sigma_z;\C)$, as near each generic point $\Mt$ is one linear subspace and contains the nearby $X_{z'}$. As $\Conf^\circ$ is the complement of a proper analytic subset of $\Conf$, it is connected and $\pi_1(\Conf^\circ)\to\pi_1(\Conf)$ is onto. Hence $p(V)\cap H^1_c$ is invariant under the monodromy of $\pi_1(\Conf)$, and it is $0$ or $H^1_c$ by \cref{lem:irr} if $n(c)\ge3$; if $n(c)\le2$, then $H^1_c=0$. This gives the first formula, the second follows, and $A$ does not depend on the generic point, as $p(T_{X_z}\Mt)\cap H^1_c(X_z)$ is a flat subbundle over the connected $\Conf^\circ$. Finally $H^1(X,\Sigma)_{\pm1}\subset V$ \cite[Corollary~6.5]{MirzakhaniWright}, and $\pm1\in F\subset E$. The last statement follows by \cref{lem:ambient}. \end{proof} \section{Rules from differentiating eigenforms}\label{sec:rules} In this section, except in \cref{ssec:B}, $n\ge5$, $X$ is a generic point, and $V$, $p$ and $A$ are as in \cref{prop:block}. The rules are those of Part~III at four points \cite[\S4]{P29}, which follow Mirzakhani and Wright \cite[\S7]{MirzakhaniWright} and Part~I \cite[\S\S2--3]{P23}; what changes at $n$ points is a count of degrees (\cref{lem:exact}). \subsection{Galois conjugates}\label{ssec:galois} Let $\kappa$ be the field of affine definition of $\Mt$, and $\mathcal H^1$ the flat bundle over $\Mt$ with fiber $H^1(X';\C)$ at $(X',\omega')$. Wright proves that $\mathcal H^1=\bigoplus_\rho\mathcal V_\rho\oplus\mathcal W'$, where $\rho$ runs over the field embeddings $\kappa\to\C$, $\mathcal V_{\mathrm{Id}}$ has fiber $p(V)$ at $X$, $\mathcal V_\rho=\sigma(\mathcal V_{\mathrm{Id}})$ for any automorphism $\sigma$ of $\C$ extending $\rho$, acting on $H^1(X';\Q)\otimes\C$ through the coefficients, and $\mathcal W'$ has no subbundle isomorphic to any $\mathcal V_\rho$; the $\mathcal V_\rho$ are simple and pairwise non-isomorphic \cite[Theorem~1.5, Lemma~6.5 and its proof]{WrightField}. Filip proves that each $\mathcal V_\rho$ underlies a variation of Hodge structure \cite[Theorem~7.2 and proof of Theorem~7.3]{FilipSemisimplicity}; so, as Mirzakhani and Wright use it \cite[\S7.1]{MirzakhaniWright}, at each point the fiber of $\mathcal V_\rho$ is the sum of its intersections with $H^{1,0}$ and $H^{0,1}$. For a unit $u$ modulo $k$ let $\sigma_u$ be an automorphism of $\C$ with $\sigma_u(\zeta)=\zeta^u$. \begin{lemma}\label{lem:galois} Let $u$ be a unit modulo $k$. Then $\sigma_u(p(V))=\bigoplus_{x\in uA}H^1_x$, and this is the fiber at $X$ of one of the summands $\mathcal V_\rho$. Two such conjugates of $p(V)$ are equal or meet only in $0$. \end{lemma} \begin{proof} As $T^*$ is defined over $\Q$, $\sigma_u$ maps $H^1_x$ onto $H^1_{ux}$, and the first statement follows from \cref{prop:block}. As in Part~I's proof of its Lemma~2.5 \cite{P23}, used again for Part~III's Lemma~4.1 \cite{P29}, the restriction of $\sigma_u$ to $\kappa$ is a field embedding $\rho$, and $\sigma_u(p(V))$ is the fiber at $X$ of $\mathcal V_\rho=\sigma_u(\mathcal V_{\mathrm{Id}})$. If the fibers at $X$ of two of the summands $\mathcal V_\rho$ meet in a non-zero vector, the intersection of the two summands is a non-zero flat subbundle of each, and as both are simple, both are equal to it. So two such conjugates of $p(V)$ are equal or meet only in $0$. \end{proof} \needspace{4\baselineskip} \begin{proposition}[Rule (i)]\label{prop:rule1} $A=-A$. If $u$ is a unit modulo $k$ and $A\cap uA\ne\emptyset$, then $uA=A$. \end{proposition} \begin{proof} $\Mt$ is defined by real linear equations in period coordinates, so $p(V)$ is invariant under complex conjugation, which maps $H^1_x$ onto $H^1_{-x}$; so $A=-A$. Also $uA\subset E$, as $n(ux)=n(x)$ and $u$ is odd when $k$ is even. If $x\in A\cap uA$, then $H^1_x$ lies in $p(V)$ and in $\sigma_u(p(V))$, so these are equal by \cref{lem:galois}, and $uA=A$ by \cref{prop:block}. These are Mirzakhani and Wright's Lemmas~7.6 and~7.10 \cite{MirzakhaniWright}, at $n$ points. \end{proof} \subsection{Derivatives of eigenforms}\label{ssec:deriv} Classes in $H^1(X,\Sigma;\C)=H^1_c(X\setminus\Sigma;\C)$ are represented by closed forms with compact support in $X\setminus\Sigma$, and classes in $H^1(X\setminus\Sigma;\C)$ by closed forms on $X\setminus\Sigma$. By Poincar\'e--Lefschetz duality the pairing $\langle[\nu],[\vartheta]\rangle=\int_X\nu\wedge\vartheta$ between the two spaces is perfect. It is $T$-invariant, so it restricts to a perfect pairing between $H^1(X,\Sigma)_c$ and $H^1(X\setminus\Sigma;\C)_{-c}$. If $\vartheta$ is closed on $X$, then $\langle v,[\vartheta]\rangle=\int_Xp(v)\wedge\vartheta$. If $\vartheta$ is a meromorphic form on $X$, holomorphic on $X\setminus\Sigma$, and $f\in\C^\Sigma$, then, by Stokes' theorem, \begin{equation}\label{eq:res} \langle\delta f,[\vartheta]\rangle=-2\pi i\sum_{s\in\Sigma}f(s)\operatorname{Res}_s\vartheta . \end{equation} Let $(X_\varpi,\omega_\varpi)$, $\varpi\in W$, be the marked surfaces with period coordinates $\varpi$, and $[\alpha]_{\mathrm{rel}}\in H^1(X,\Sigma;\C)$ the relative class of a holomorphic form $\alpha$ on one of them. For $v\in H^1(X,\Sigma;\C)$ we use Kahn and Wright's path $[\omega]+tv$ \cite[Lemma~2.2]{KahnWright}. Part~I derives the next lemma from their formula for the derivative of the projection from a stratum to moduli space \cite[Theorem~1.1, Corollary~2.3 and Remark~2.4]{KahnWright}; its statement and proof use only that $\omega$ is holomorphic with zero set $\Sigma$. \begin{lemma}[{\cite[Lemma~3.1]{P23}}]\label{lem:KW} Let $v\in H^1(X,\Sigma;\C)$, and let $\varpi\mapsto\alpha_\varpi$ be a family of holomorphic $1$-forms on the surfaces $X_\varpi$, of class $C^1$ along the path $[\omega]+tv$, with $\alpha_{[\omega]}=\alpha$. Let $\vartheta$ be a meromorphic $1$-form on $X$, holomorphic on $X\setminus\Sigma$, with at most simple poles. Then $\langle\partial_v[\alpha_\varpi]_{\mathrm{rel}},[\vartheta]\rangle=\langle v,[\alpha\vartheta/\omega]\rangle$. \end{lemma} The relative class of a holomorphic form $\alpha'$ on $X$ pairs to zero with every such $\vartheta$: it is represented by $\alpha'-d(\chi F')$, where $\chi$ is a cut-off function equal to $1$ near $\Sigma$ and $F'$ is the primitive of $\alpha'$ near each $s\in\Sigma$ with $F'(s)=0$, and as $\alpha'\wedge\vartheta=0$, \begin{equation}\label{eq:third} \langle[\alpha']_{\mathrm{rel}},[\vartheta]\rangle=\sum_{s\in\Sigma}\lim_{\varepsilon\to0}\oint_{|w_s|=\varepsilon}F'\vartheta=0, \end{equation} $w_s$ being a local coordinate at $s$. We also use Filip's theorem that the relative class of a holomorphic form whose absolute class lies in the absolute part of a tangent space of $\Mt$ lies in that tangent space \cite[Theorem~4.2 and the paragraph after it]{FilipSplitting}, in the form recalled in Part~III \cite[\S4.4]{P29}: if $\alpha'$ is holomorphic on $X_\varpi$, $\varpi\in\Mt\cap W$, and $p[\alpha']\in p(V)$, then $[\alpha']_{\mathrm{rel}}\in V$. \begin{lemma}\label{lem:family} Let $u$ be a unit modulo $k$, $x\in uA$ with $h(x)\ge1$, and $\alpha\in H^{1,0}_x$. There is a holomorphic family $\alpha_\varpi$ of holomorphic $1$-forms on the surfaces of $\Mt\cap W$ with $\alpha_{[\omega]}=\alpha$, whose absolute classes lie in the fiber of the summand $\mathcal V_\rho$ of \cref{lem:galois}, such that $\langle\partial_v[\alpha_\varpi]_{\mathrm{rel}},[\beta]\rangle=0$ for every $v\in V$ and every $\beta\in H^{1,0}_b$ with $b\notin uA$. \end{lemma} \begin{proof} We follow Part~I \cite[Lemma~3.5]{P23}. Over $\Mt\cap W=V\cap W$ the bundle $\mathcal H^1$ is the constant bundle $H^1(X;\C)$, and the fiber of $\mathcal V_\rho$ is the constant space $\sigma_u(p(V))=\bigoplus_{c\in uA}H^1_c$. As $\mathcal V_\rho$ underlies a variation of Hodge structure, its intersections with the spaces of holomorphic forms of the surfaces $X_\varpi$ form a holomorphic subbundle, whose fiber at $X$ is $\bigoplus_{c\in uA}H^{1,0}_c\ni\alpha$; let $\alpha_\varpi$ be a holomorphic section of it through $\alpha$. For $\varpi\in V\cap W$ we have $\langle[\alpha_\varpi]_{\mathrm{rel}},[\beta]\rangle=\int_Xp[\alpha_\varpi]\wedge\beta$, and the cup product pairs $H^1_c$ with $H^1_b$ to zero unless $c\equiv-b$. As $-b\notin uA$ by \cref{prop:rule1}, this vanishes on $V\cap W$, and differentiating along $v\in V$ gives the claim. \end{proof} The next lemma is the count of exact forms; for $n=4$ it is Part~III's Lemma~4.5 \cite{P29}, whose proof we follow. \begin{lemma}\label{lem:exact} Let $n\ge3$, $x'\in F$, $D\ge0$ an integer, and $\epsilon_1,\dots,\epsilon_n$ real numbers with $\epsilon_i\equiv-x'q_i/k\pmod1$ and $\sum_i\epsilon_i=-D-2$. Let $\mathcal R$ be a space of polynomials of degree at most $D$ such that, for $R\in\mathcal R$, the form $\psi_R=R(w)\prod_i(w-z_i)^{\epsilon_i}dw$ is holomorphic on $X\setminus\Sigma$. Then the $R\in\mathcal R$ for which $\psi_R$ is exact on $X\setminus\Sigma$ form a subspace of dimension at most $\max(0,D+3-n)$. \end{lemma} \begin{proof} As $x'\in F$, no $\epsilon_i$ is an integer. Let $R\in\mathcal R$ with $\psi_R=d\Phi$, $\Phi$ holomorphic on $X\setminus\Sigma$. Near a point of $\Sigma$, $\psi_R$ is meromorphic with zero residue, so $\Phi$ is meromorphic on $X$. As $T^*\psi_R=\zeta^{-x'}\psi_R$, the function $\Phi'=\frac1k\sum_{m=0}^{k-1}\zeta^{mx'}(T^m)^*\Phi$ also has $d\Phi'=\psi_R$, and $T^*\Phi'=\zeta^{-x'}\Phi'$; so $\Phi'=S(w)\prod_i(w-z_i)^{\epsilon_i+1}$ with $S$ rational, and $S$ is holomorphic on $\C\setminus\{z_1,\dots,z_n\}$. If $S$ had a pole of order $m\ge1$ at $z_i$, then near the points over $z_i$, $d\Phi'$ would have the leading term $(\epsilon_i+1-m)(w-z_i)^{\epsilon_i-m}dw$ times a non-zero constant, non-zero as $\epsilon_i\notin\Z$, whereas $\psi_R$ is $(w-z_i)^{\epsilon_i}dw$ times a holomorphic function of $w$. So $S$ is a polynomial. The cover is unramified over $\infty$ and the points over $\infty$ are not in $\Sigma$, so $\Phi'$ is holomorphic there, where it behaves like $w^{\deg S+\sum_i(\epsilon_i+1)}=w^{\deg S+n-D-2}$; so $\deg S\le D+2-n$. Hence $\psi_R$ lies in the image of the map $S\mapsto d\bigl(S(w)\prod_i(w-z_i)^{\epsilon_i+1}\bigr)$ on the polynomials of degree at most $D+2-n$, a space of dimension $\max(0,D+3-n)$. \end{proof} \begin{theorem}[Rule (ii)]\label{thm:diff} Let $u$ be a unit modulo $k$, $x\in uA$ with $h(x)\ge1$, $x'\in A\cap F$, and $b\equiv1-x-x'$ with $h(b)\ge1$. Then $b\in uA$. \end{theorem} \begin{proof} We follow the proof of Part~III's Theorem~4.6 \cite{P29}. As $h(b)\ge1$, $n(b)\ge3$, and $b$ is odd when $k$ is even, as $x$ and $x'$ are; so $b\in E$. Suppose that $b\notin uA$. Let $\alpha\in H^{1,0}_x$ and $\beta\in H^{1,0}_b$, and take the family $\alpha_\varpi$ of \cref{lem:family}. By \cref{lem:family} and \cref{lem:KW} with $\vartheta=\beta$, \begin{equation}\label{eq:zero} 0=\langle\partial_v[\alpha_\varpi]_{\mathrm{rel}},[\beta]\rangle=\langle v,[\alpha\beta/\omega]\rangle\qquad\text{for every }v\in V. \end{equation} By \eqref{eq:basis}, $\alpha=P_\alpha\prod_i(w-z_i)^{-t_i(-x)}dw$ and $\beta=P_\beta\prod_i(w-z_i)^{-t_i(-b)}dw$ with $\deg P_\alpha\le h(x)-1$ and $\deg P_\beta\le h(b)-1$, so \[ \alpha\beta/\omega=P_\alpha P_\beta\prod_i(w-z_i)^{\epsilon_i}dw,\qquad \epsilon_i=1-\frac{q_i}k-t_i(-x)-t_i(-b). \] Here $\epsilon_i\equiv(x+b-1)q_i/k\equiv-x'q_i/k\pmod1$, and $\sum_i\epsilon_i=2-t(-x)-t(-b)=-D-2$ with $D=h(x)+h(b)-2\ge0$. The form $\alpha\beta/\omega$ is holomorphic off $\Sigma$, and the products $P_\alpha P_\beta$ span the polynomials of degree at most $D$, a space of dimension $D+1>\max(0,D+3-n)$. By \cref{lem:exact} some $\alpha\beta/\omega$ is not exact on $X\setminus\Sigma$: its class in $H^1(X\setminus\Sigma;\C)_{-x'}$ is not zero. As $x'\in A\cap F$, $Z_{x'}=0$ and $H^1_{x'}\subset p(V)$, so $V_{x'}=H^1(X,\Sigma)_{x'}$ by \eqref{eq:exact}, and this space pairs perfectly with $H^1(X\setminus\Sigma;\C)_{-x'}$. So some $v\in V$ has $\langle v,[\alpha\beta/\omega]\rangle\ne0$, against \eqref{eq:zero}. \end{proof} \subsection{The relative rule}\label{ssec:relative} When $k$ is even, $\amb$ has the relative directions $Z_c$, $c$ odd, and the next theorem puts them into $V$. \begin{theorem}\label{thm:rel} Let $c\not\equiv0$ with $Z_c\ne0$, let $x\in A$ with $h(x)\ge1$, and let $x'\equiv1+c-x$. If $x'\in A\cap F$, then $Z_c\subset V$. \end{theorem} \begin{proof} We follow the proof of Part~III's Theorem~4.7 \cite{P29}, in which only the count of degrees in Steps~3 and~4 changes at $n$ points. Suppose that $V\cap Z_c\ne Z_c$. The first paragraph of that proof and its Steps~1 and~2 hold at $n$ points as written, with \cref{ssec:eigen}, \cref{prop:block}, \cref{lem:KW,lem:family,lem:exact}, \eqref{eq:res} and \eqref{eq:third} for their counterparts at four points. They give a meromorphic $1$-form $\varphi$ on $X$ with $T^*\varphi=\zeta^{-c}\varphi$, at most simple poles, all in $\Sigma$, and residues $r\ne0$, such that \begin{equation}\label{eq:zero2} \langle v,[\alpha\varphi/\omega]\rangle=0\qquad\text{for every }v\in V\text{ and every }\alpha\in H^{1,0}_x. \end{equation} \emph{Step 3: the shape of $\varphi$.} At a point over $z_i$, which is fixed by $T^{g_i}$, the residue of $\varphi$ equals that of $(T^{g_i})^*\varphi=\zeta^{-cg_i}\varphi$, so it vanishes unless $cq_i\equiv0$. Hence $\varphi$ is holomorphic off the points over the vertices in $I(c)$, where it has at most simple poles. Write $\varphi=P_\varphi(w)\prod_i(w-z_i)^{-t_i(c)-[i\in I(c)]}dw$, with $[i\in I(c)]$ equal to $1$ for $i\in I(c)$ and $0$ otherwise, and $P_\varphi$ rational. At a point over $z_i$, with local coordinate $s$, $s^{e_i}=w-z_i$, the form $(w-z_i)^\tau dw$ has order $e_i(\tau+1)-1$ when $e_i\tau\in\Z$; so the product has order at least $0$ over $z_i$ for $i\notin I(c)$, and $-1$ for $i\in I(c)$, and a pole of $P_\varphi$ at $z_i$ would give $\varphi$ a pole of order at least $2$, or a pole over a vertex outside $I(c)$. As $\varphi$ is holomorphic over the other points of $\C$, $P_\varphi$ is a polynomial, non-zero as $r\ne0$, and holomorphy over $\infty$ gives $\deg P_\varphi\le L$ with \[ L=t(c)+|I(c)|-2 . \] As $t(c)$ is an integer sum of $n(c)$ numbers in $(0,1)$, $t(c)\le n(c)-1$, and $|I(c)|\le n-n(c)$; so $L\le n-3$. \emph{Step 4: a non-zero product.} With $\alpha=P_\alpha\prod_i(w-z_i)^{-t_i(-x)}dw$, $\deg P_\alpha\le h(x)-1$, \[ \alpha\varphi/\omega=P_\alpha P_\varphi\prod_i(w-z_i)^{\epsilon_i}dw,\qquad \epsilon_i=1-\frac{q_i}k-t_i(-x)-t_i(c)-[i\in I(c)], \] with $\epsilon_i\equiv(x-c-1)q_i/k\equiv-x'q_i/k\pmod 1$ and $\sum_i\epsilon_i=2-(h(x)+1)-(L+2)=-D-2$, $D=h(x)-1+L$. The form is holomorphic on $X\setminus\Sigma$, and $\deg P_\alpha P_\varphi\le D$. As $P_\alpha$ ranges over the polynomials of degree at most $h(x)-1$, the products $P_\alpha P_\varphi$ form a space of dimension $h(x)$, and $h(x)>\max(0,D+3-n)=\max(0,h(x)+L+2-n)$, as $h(x)\ge1$ and $L\le n-3$. By \cref{lem:exact} some $\alpha\varphi/\omega$ has non-zero class in $H^1(X\setminus\Sigma;\C)_{-x'}$. As in the proof of \cref{thm:diff}, $V_{x'}=H^1(X,\Sigma)_{x'}$ pairs perfectly with this space, against \eqref{eq:zero2}. Hence $Z_c\subset V$. \end{proof} \begin{proposition}[Rule (iii)]\label{prop:rule3} Let $k>2$ be even, and suppose that $A=E$. Then $V=\Hm$. \end{proposition} \begin{proof} We have $V\subset\Hm$ and $V=\bigoplus_{c\text{ odd}}V_c$ (\cref{ssec:generic} and \cref{prop:block}). We show below that $Z_c\subset V$ for every odd $c$ with $Z_c\ne0$. Given this, let $c$ be odd. If $n(c)\ge3$, then $c\in E=A$, so $p(V_c)=H^1_c$, and with $Z_c\subset V_c$, \eqref{eq:exact} gives $V_c=H^1(X,\Sigma)_c$. If $n(c)=2$, then $H^1_c=0$ and $H^1(X,\Sigma)_c=Z_c\subset V$. So $V=\Hm$. Let $c$ be odd with $Z_c\ne0$. Complex conjugation preserves $V$ and maps $Z_c$ onto $Z_{-c}$, so it suffices to show that $Z_c$ or $Z_{-c}$ lies in $V$. We apply \cref{thm:rel}, with $x'\in F\subset A$ and $x\equiv1+c-x'$ in $E=A$ with $h(x)\ge1$. If $n(c)\ge3$, one of $h(c)$, $h(-c)$ is positive, as their sum is $n(c)-2$; replacing $c$ by $-c$ we may assume $h(c)\ge1$, and we take $x=c$ and $x'=1$. Let $n(c)=2$, and number the vertices so that $cq_i\not\equiv0$ exactly for $i=1,2$. Let $o=\gcd(c,k)$, which is odd. For $i\ge3$, $e_i$ divides $c$ and $k$, hence $o$, so $e_i$ is odd and at least $3$, and $q_i$ is divisible by the $2$-part of $k$. As the $e_i$ have least common multiple $k$, one of $e_1,e_2$ is even; as $q_1+q_2\equiv0$ modulo the $2$-part of $k$, both are. For $\tau\in\Z$ put $s(\tau)=\sum_{i\ge3}\{\tau q_i/k\}$, which depends only on $\tau$ modulo $o$. Suppose that \[ \text{(a) }\tau\not\equiv-1\pmod{e_i}\text{ for every }i\ge3,\qquad\text{(b) }s(\tau)\ge1 . \] Choose $x'$ odd with $x'\equiv1+\tau\pmod o$, and put $x=1+c-x'$. Then $x'\in F$: $e_1,e_2$ are even and do not divide $x'$, and $e_i\nmid x'$ for $i\ge3$ by (a). Also $x$ is odd and $x\equiv-\tau\pmod o$, so $t(-x)=s(\tau)+\{-xq_1/k\}+\{-xq_2/k\}>s(\tau)\ge1$, the last two terms being positive as $e_1,e_2$ are even; as $t(-x)$ is an integer, $h(x)\ge1$, so $n(x)\ge3$ and $x\in E$. It remains to find $\tau$. The orders $e_i$, $i\ge3$, are $n-2\ge3$ odd numbers. If none of them is $3$, then (a) holds for $\tau=\pm2$, as no $e_i$ divides $3$ or $1$, and (b) for one of the two, as no $e_i$ divides $2$ and so $s(2)+s(-2)=n-2\ge3$. If some $e_i$ is $3$ and at least two are not, then (a) holds for $\tau=\pm3$, as no $e_i$ divides $4$ or $2$, and (b) for one of the two, as $s(3)+s(-3)$ is the number of $e_i\ne3$. If all are $3$, take $\tau=1$, with $s(1)\ge(n-2)/3\ge1$. Suppose finally that exactly one of them, $e=e_{i_0}$, is not $3$. Then $e\ge5$, at least two of the others are $3$, and $q'=q_{i_0}/g_{i_0}$ is a unit modulo $e$. If $3\nmid e$, take $\rho\in\{e-1,e-2\}$ with $\rho\not\equiv-q'\pmod e$, and $\tau$ with $\tau\equiv1\pmod3$ and $\tau q'\equiv\rho\pmod e$. If $3\mid e$, take $\rho\in\{e-1,e-2\}$ with $\rho\equiv q'\pmod3$, and $\tau$ with $\tau q'\equiv\rho\pmod e$, so that $\tau\equiv1\pmod3$. In both cases $\tau\not\equiv-1$ modulo $3$ and modulo $e$, and $s(\tau)\ge\frac23+\frac{e-2}e>1$. \end{proof} \subsection{Proof of \texorpdfstring{\cref{thm:B}}{Theorem 1.4}}\label{ssec:B} Here $n\ge3$, $z\in\Conf$ is arbitrary, and the notation of \cref{ssec:eigen} is used for $X_z$. Let $a,b$ be as in \cref{thm:B}, so $h(a),h(b)\ge1$, and put $D=h(a)+h(b)-2\ge0$. For $\alpha\in H^{1,0}_a$ and $\beta\in H^{1,0}_b$ let $\Phi=\alpha\beta/\omega$. It is meromorphic on $X$, holomorphic on $X\setminus\Sigma$, and $T^*\Phi=\zeta^{a+b-1}\Phi=\zeta\Phi$. Let $[\bar\omega]_{\mathrm{rel}}\in H^1(X,\Sigma)_{-1}$ be the relative class of $\bar\omega$, the complex conjugate of $[\omega]_{\mathrm{rel}}$. Then \begin{equation}\label{eq:Bpair} B_\omega(\alpha,\beta)=\frac i2\int_X\Phi\wedge\bar\omega=-\frac i2\bigl\langle[\bar\omega]_{\mathrm{rel}},[\Phi]\bigr\rangle . \end{equation} Indeed, $[\bar\omega]_{\mathrm{rel}}$ is represented by $\bar\omega-d(\chi\bar F)$, with $\chi$ as in \eqref{eq:third} and $F$ the primitive of $\omega$ near each $s\in\Sigma$ with $F(s)=0$; near a zero of $\omega$ of order $m$, $\bar F=O(|w_s|^{m+1})$ and $\Phi=O(|w_s|^{-m})$, so $\int_Xd(\chi\bar F)\wedge\Phi=0$ by Stokes' theorem, and $\int_X\bar\omega\wedge\Phi=-\int_X\Phi\wedge\bar\omega$. Let $\alpha=w^{j_1}\prod_i(w-z_i)^{-t_i(-a)}dw$ and $\beta=w^{j_2}\prod_i(w-z_i)^{-t_i(-b)}dw$ with integers $0\le j_1,>=stealth,line width=0.4pt] (3.9,1.1) -- (4.7,1.1); \begin{scope}[xshift=5.2cm] \draw[line width=0.5pt] (0,0) -- (3,0) -- (3.4,1.6) -- (1.6,2.5) -- cycle; \node[above] at (1.6,2.5) {$0$}; \end{scope} \end{tikzpicture} \caption{When two vertices $i$ and $j$ of a pentagon collide, and their angles sum to more than $\pi$, the pentagon degenerates to a quadrilateral; its angle at the merged vertex $0$ is the sum of the two angles minus $\pi$. The figure shows adjacent vertices; the proof of \cref{prop:collision} collides $z_i$ and $z_j$ in $\C$, with the other $z_l$ fixed, for any collision pair.}\label{fig:collision} \end{figure} Let $\{i,j\}$ be a collision pair of $\theta$, $m=q_i+q_j-k$, and $J$ the set of the other $n-2$ vertices. The type $\theta_{ij}$ has the weight $m$ at a new vertex $0$ and the weights $q_l$, $l\in J$. For $x\in\Z/k$ let $n_{ij}(x)$ be the number of weights of $\theta_{ij}$ at which $x$ is non-zero, $\#\{l\in J:xq_l\not\equiv0\}+[xm\not\equiv0]$. A type of quadrilaterals is \emph{reduced}, in Delecroix and R\"uth's sense, unless its weights are $a,a,b,b$ with $a0$ for the genus $g_Y$ of $Y$, as $g_i,g_j\le k/2$. \emph{The boundary component.} We follow the next three steps of the proof of Part~III's Theorem~3.2 \cite{P29}, up to its (3.4), with the $n-2$ points $z_l$, $l\in J$, in place of its two and $m$ in place of its $\mu$; its estimate near $z_0$ needs only $m>0$, not $m2n/3$. For $n=6$ it forces $\varkappa(e_i)=\frac23$, that is $e_i=6$, for every $i$. For $n=5$, if the fourth largest of the $\varkappa(e_i)$ were less than $\frac12$, the sum would be less than $3\cdot\frac23+2\cdot\frac12=3$; so four of the $e_i$ have $\varkappa(e_i)\ge\frac12$, and lie in $\{6,30\}$. Finally, the least common multiple of any $n-1$ of the $e_i$ is $k$: if a prime power $p^\nu$ exactly dividing $k$ divided none of them, $p$ would divide $n-1$ of the $q_i$, hence the last, as $\sum_iq_i=(n-2)k$, against $\gcd(k,q_1,\dots,q_n)=1$. So $k\mid30$ for $n=5$ and $k=6$ for $n=6$. \end{proof} The next lemma is Part~III's Lemma~6.6 \cite{P29} at $n$ vertices; only the estimate of the height changes. \begin{lemma}\label{lem:digit} Let $\{i,j\}$ be a pair of vertices with $q_i+q_j>k$, and $p$ an odd prime dividing $k$ and every $q_l$ with $l\ne i,j$. Let $A'$ be closed and $H=A'\cap U$. Then $H$ contains the kernel $K_p$ of $U\to U_{k/p}$. \end{lemma} \begin{proof} Let $y\equiv1\pmod{k/p}$. For $l\ne i,j$, $p\mid q_l$ gives $t_l(-y)=t_l(-1)=1-\{q_l/k\}\ge1-q_l/k$, so \[ t(-y)\ge\sum_{l\ne i,j}\Bigl(1-\frac{q_l}k\Bigr)=\frac{q_i+q_j}k>1, \] and as $t(-y)$ is an integer, $h(y)\ge1$. Also $n(y)\ge n-2\ge3$, and $y$ is odd if $k$ is even, so $y\in E$. With this in place of the first paragraph of Part~III's proof, its second paragraph, which applies \cref{lem:closedbasic} and (c) of \cref{def:closed} to $x=1+sk/p$ and $b=2-x$, both $\equiv1\pmod{k/p}$, gives $K_p\subset H$. \end{proof} Write $\Delta_i=1-q_i/k$ for the exterior angle at vertex $i$ divided by $\pi$, which we call the \emph{deficit} at $i$; so $0<|\Delta_i|<1$, $\sum_i\Delta_i=2$, and a pair $\{i,j\}$ satisfies the first two conditions of \cref{def:pair} exactly when $0<|\Delta_i+\Delta_j|<1$. \needspace{4\baselineskip} \begin{proposition}\label{prop:arith} Let $n\ge5$ and let $\theta$ be open; if $n=5$, suppose that $k\ge11$ and $k\nmid30$. Then every closed set is $E$. \end{proposition} \begin{proof} Let $A'$ be closed and $H=A'\cap U$. We first show that $U\subset A'$. If $\theta$ has a collision pair, then (d) of \cref{def:closed} applies to it, by \cref{lem:descent}(c) if $n=5$, and gives $F\subset A'$, so $U\subset A'$. Suppose that $\theta$ has no collision pair. If a pair $\{i,j\}$ satisfies the first two conditions of \cref{def:pair}, the third fails at a prime $p$ that divides $k$ and every $q_l$ with $l\ne i,j$; $p$ divides neither $q_i$ nor $q_j$, for it divides $q_i+q_j$, and dividing both it would divide every weight. So $p$ belongs to no other such pair, and different pairs have different primes. Suppose first that $\Delta_a=\epsilon>0$ and $\Delta_b=-\epsilon$ for some $a,b$. If a third deficit $\Delta_c>0$ had $\Delta_c\ne\epsilon$, the pair $\{b,c\}$ would satisfy the first two conditions, and its prime would divide $q_a$, hence $q_b=2k-q_a$; likewise for $\Delta_c<0$, $\Delta_c\ne-\epsilon$, with $\{a,c\}$. So every deficit is $\pm\epsilon$. Let $r$ be the number of positive deficits minus the number of negative ones; then $r\epsilon=2$, so $r\ge3$. Every weight is $k\mp k\epsilon$, with $k\epsilon=k-q_a$ an integer, so $\gcd(k,k\epsilon)=\gcd(k,q_1,\dots,q_n)=1$. If $r\ge5$, two positive deficits sum to $4/r<1$, and as all weights are prime to $k$ their pair is a collision pair. If $r=4$, two positive deficits sum to $1$, and two weights sum to $k$, against openness. So $r=3$, $k\epsilon=2k/3$, $\gcd(k,k\epsilon)=k/3=1$, and $\theta$ is $(1,\dots,1,5,\dots,5)/3$ with $v+3$ weights $1$ and $v$ weights $5$. Then $E=\{\pm1\}\subset A'$, and we are done; for $n=5$ this type has $k=3$ and is excluded. Suppose now that no two deficits sum to $0$. If both signs occur, each of the at least $n-1$ pairs of opposite signs satisfies the first two conditions. If all deficits are positive, a pair that does not has $\Delta_i+\Delta_j>1$, since $\Delta_i+\Delta_j=1$ would make $q_i+q_j=k$; two disjoint such pairs would have deficits summing to more than $2$, so these pairs meet pairwise and lie in a star or a triangle, there are at most $n-1$ of them, and at least $\binom n2-(n-1)\ge n-1$ pairs satisfy the first two conditions. In either case $k$ has at least $n-1\ge4$ prime factors, one for each such pair, and at least two of them are at least $5$. Let $Pk$, as $\Delta_i+\Delta_j<1$, so by \cref{lem:digit} and the Chinese remainder theorem $H$ contains the kernel $K=K_PK_Q$ of $U\to U_M$. \emph{Lifting.} Let $x_0,b_0\in\Z/M$ with $x_0$ a unit, $x_0+b_0\equiv2\pmod M$, $b_0\not\equiv0$ modulo $P$ and $Q$ if they divide $M$, and $b_0$ odd if $k$ is even. We construct $x\equiv x_0$ and $b\equiv b_0\pmod M$ with $x$ a unit, $h(x)\ge1$, $h(b)\ge1$, and $x'=1-x-b$ a unit. Then $x'\equiv-1\pmod M$, so $x'\in-K\subset A'\cap F$, and (c) of \cref{def:closed} with $u=x$ gives $b\in xA'$, that is $b/x\in A'$. We use the digit method of Part~III \cite[proof of Proposition~6.7, Step~1]{P29}. With the other choices fixed, the lifts of $x_0$ are $x+sk/P$, $s\in\Z/P$, obtained by choosing a digit at $P$, and likewise at $Q$. Changing the digit of $y\in\{x,b\}$ at $P$ changes $t_l(-y)$ only for $l\in\pi_P$, as $P$ divides the other weights; for $l\in\pi_P$, $P\nmid q_l$, and the $P$ digits give the values $\delta+s/P$, $0\le s1,\qquad t(-b)\ge\frac{P-3}P+\frac{Q-2}Q\ge\frac25+\frac57>1, \] so $h(x),h(b)\ge1$, and $x'$ is a unit. \emph{The units.} Taking $b_0$ a unit, the lifting puts $b/x$ in $H$ with image $b_0/x_0$ in $U_M$. So the image of $H$ in $U_M$ contains $b_0/x_0$ for all units $x_0,b_0$ with $x_0+b_0\equiv2\pmod M$. If $k$ is odd, these ratios, $-1\in H$ and $K\subset H$ give $H=U$, by Step~2 of the proof of Part~III's Proposition~6.7 \cite{P29}. If $k$ is even, then $k/M=PQ$ is odd. Part~III's Lemma~7.1 \cite{P29} uses of $A'$ only that $H$ is a subgroup of $U$ that contains $-1$, which holds by \cref{lem:closedbasic}(a). With $K\subset H$ and these ratios it shows that $H$ contains every unit $\equiv\pm1\pmod{\gcd(k,12)}$, so $H=U$ unless $12\mid k$. Let $12\mid k$, and let $3^s$ exactly divide $k$, so that $3^s\parallel M$ and $4\mid M$. As in the proof of Part~III's Proposition~7.4 \cite{P29}, where $9\nmid k$, we use a character that is not a unit. Take $b_0\equiv0\pmod{3^s}$ and $b_0\equiv1\pmod{M/3^s}$, and $x_0=2-b_0$. The lifting gives $\beta=b/x\in A'$ with $\beta\equiv0\pmod{3^s}$. The unit $v$ with $v\equiv-1\pmod{3^s}$ and $v\equiv1\pmod{k/3^s}$ has $v\beta=\beta$, so $v\in H$ by \cref{lem:closedbasic}(c), and $v\equiv5\pmod{12}$, as $4\mid k/3^s$. The units $\equiv\pm1\pmod{12}$ have index two in $U$, so $H=U$. \emph{All of $E$.} Now $U\subset A'$, so $A'$ is a union of orbits of $U$ by \cref{lem:closedbasic}(d). Let $b\in E$. As $h(b)+h(-b)=n(b)-2\ge1$ and $A'=-A'$, we may assume that $h(b)\ge1$. If some unit $x$ with $h(x)\ge1$ has $x'=1-b-x$ a unit, then (c) with $u=1$ gives $b\in A'$, as $x'\in U\subset A'\cap F$. By \cref{lem:height} with $y=1-b$, which is even if $k$ is, such an $x$ exists unless $n=6$ and $k=e_1=\dots=e_6=6$, the case $n=5$, $k\mid30$ being excluded. In that case every $q_i$ is prime to $6$, so $E=F$; and $\theta$ has a collision pair, as without one $k=3$ or $k$ has at least five prime factors, by the above. So $F\subset A'$ by (d). \end{proof} \begin{remark}\label{rem:sharp} When $n=6$ and $k=e_1=\dots=e_6=6$, where the mean $\frac23$ of \eqref{eq:kappa} is attained at every $e_i$, the proof above uses (d) of \cref{def:closed}. For the open type $(1,1,1,7,7,7)/6$, $E=\{1,3,5\}$ with $h(1)=4$, $h(3)=2$ and $h(5)=0$, and the set $\{1,5\}$ satisfies (a)--(c) of \cref{def:closed}: the only element with $h\ge1$ is $1$, and (c) with $x=1$ and $x'\in\{1,5\}$ gives $b\in\{5,1\}$. So (d) is needed to reach the character $3$, and it does, as the weights $1$ and $7$ form a collision pair, with $\theta_{ij}=(1,1,2,7,7)/6$, and $n_{ij}(3)=4$. When $12\mid k$, let $\chi(u)$ be the product of the signs of a unit $u$ modulo $3$ and modulo $4$; its kernel is the set of units $\equiv\pm1\pmod{12}$, of index two in $U$. If $x,x',b$ are units with $x+x'+b\equiv1\pmod k$, exactly one of them is $\equiv-1\pmod3$ and an odd number are $\equiv-1\pmod4$, so $\chi(x)\chi(x')\chi(b)=1$. So the units $\equiv\pm1\pmod{12}$ satisfy (a), (b), and (c) whenever $x$, $x'$ and $b$ are all units, and the step of the proof above that reaches every unit without a collision pair needs a character that is not a unit, the character $\beta$. \end{remark} \begin{remark}\label{rem:nocollision} Collisions alone do not always reach the theorem for $n-1$ vertices. At seven vertices the open type $(1,1,1,1,1,5,5)/3$ has the deficits $\pm\frac23$ only, so no pair satisfies the first two conditions of \cref{def:pair}; here $E=\{\pm1\}$. At six vertices, the proof of \cref{prop:arith} shows that an open type with no collision pair has $k\ge2\cdot3\cdot5\cdot7\cdot11=2310$, and this occurs. For example, $(770,924,990,1050,1155,4351)/2310$ is open, the pairs that satisfy the first two conditions are the five that contain $4351$, and the primes that divide $k$ and the four other weights are $3,5,7,11,2$ for these pairs in the order of the displayed weights. At five vertices, a search of the open types with $k\le10$ finds three with no collision pair to which (d) of \cref{def:closed} applies, $(1,1,1,1,5)/3$, $(1,1,1,3,9)/5$ and $(1,1,1,4,11)/6$; their collision pairs, if any, lead to Delecroix and R\"uth's types. For $k\ge11$ such a type has $k\ge210$, by \cref{lem:descent}(c) and the proof of \cref{prop:arith}, and $(30,42,70,105,383)/210$ is one, with the primes $7,5,3,2$ for its four pairs that contain $383$. For such types with $k\ge11$ the units come from rule (ii) at two primes. \end{remark} \section{Proof of \texorpdfstring{\cref{thm:open}}{Theorem 1.1}}\label{sec:proof} We first pass from the characters to the orbit closure. The induction on $n$ below follows Apisa and Aygun's argument for their Theorem~1.2 in genus zero \cite[\S12]{ApisaAygun} and Apisa's \cite[Sublemma~11.2]{Apisa}; Part~III gives its base case. \begin{lemma}\label{lem:AE} Let $n\ge5$ and $k\ge3$, and suppose that $A=E$. Then $\Mt=\amb$. \end{lemma} \begin{proof} Let $k$ be odd. By \cref{prop:block,lem:ambient}, $p(V)=\bigoplus_{x\in E}H^1_x=H^1(X;\C)$, so $\Mt$ has full rank. By Mirzakhani and Wright's theorem it is a connected component of a stratum or the locus of hyperelliptic surfaces in one \cite[Theorem~1.1]{MirzakhaniWright}, and by their Lemma~6.7 it does not lie in the hyperelliptic locus, as $k$ is odd and $n>4$ \cite{MirzakhaniWright}. So $\Mt$ is the component that contains $X$, which is $\amb$. Let $k$ be even. By \cref{prop:rule3}, $V=\Hm=T_X\amb$, and by \cref{ssec:generic} Lanneau's chart maps a neighborhood of $(X/\iota,\omega^2)$ in $\mathcal Q$ onto an open subset of $\Hm$ that contains $[\omega]$. From here the second paragraph of Part~III's proof of its Proposition~5.2 \cite{P29} shows that the points of $\mathcal Q$ near which the double-cover map takes values in $\Mt$ form a non-empty open and closed subset of the connected $\mathcal Q$. So $\amb\subset\Mt$, and $\Mt=\amb$. \end{proof} \begin{proof}[Proof of \cref{thm:open}] Let $\theta$ be an open type of $n$-gons, $n\ge5$. There is no type with $k=1$. If $k=2$, every weight is $1$ or $3$, and as the weights sum to $2(n-2)$, $(n+4)/2$ of them are $1$; two weights $1$ sum to $k$, so $\theta$ is not open. Hence $k\ge3$. We argue by induction on $n$, and for $n\ge6$ we assume \cref{thm:open} for the open types of $(n-1)$-gons. Let $X$ be a generic point and $A$ as in \cref{prop:block}. We show that $A$ is closed. Conditions (a) and (b) of \cref{def:closed} hold by \cref{prop:block,prop:rule1}, and (c) by \cref{thm:diff}. For (d), let $\{i,j\}$ be a collision pair, with $\theta_{ij}$ reduced and not one of the seven types if $n=5$. By \cref{lem:descent}, $\theta_{ij}$ is an open type of $(n-1)$-gons. If $n=5$, then $\mathcal M(\theta_{ij})=\mathcal L(\theta_{ij})$ by Part~III \cite[Theorem~1.1]{P29} (see the proof of \cref{lem:descent}), and if $n\ge6$, by the induction hypothesis. So \cref{prop:collision} gives (d). If $n\ge6$, or $n=5$, $k\ge11$ and $k\nmid30$, then $A=E$ by \cref{prop:arith}. The remaining types are pentagons with $k\le10$ or $k\in\{15,30\}$. An intersection of closed sets is closed: for (b), if $\bigcap_\alpha A_\alpha$ meets $u\bigcap_\alpha A_\alpha$, then each $A_\alpha$ meets $uA_\alpha$, so $uA_\alpha=A_\alpha$ for every $\alpha$; the other conditions pass to intersections directly. As $uE=E$ for every unit $u$, $E$ is closed; so there is a least closed set, and it lies in $A$. For the remaining types we find that the least closed set is $E$ (\cref{ssec:computations}). So $A=E$ in every case. By \cref{lem:AE}, $\Mt=\amb$, and Mirzakhani and Wright's Lemma~6.3 gives the statement for almost every polygon of type $\theta$ \cite{MirzakhaniWright}. \end{proof} \section{Types that are not open}\label{sec:nonopen} Throughout this section $\theta$ is a type of $n$-gons, $n\ge5$, that is not open, and $S$ is a set of vertices with $\sum_{i\in S}q_i=(|S|-1)k$. As $\sum_iq_i=(n-2)k$, its complement satisfies $\sum_{i\in S^c}q_i=(|S^c|-1)k$; and $|S|,|S^c|\ge2$, as a single vertex would have weight $0$. In terms of the exterior angles, $\sum_{i\in S}\Delta_i=\sum_{i\in S^c}\Delta_i=1$. \subsection{From Apisa and Aygun's theorem}\label{ssec:AAdeduce} Let $\mathcal C=\Omega^k\mathcal M_0(\kappa)$, with $\kappa_i=q_i-k$, be the stratum of the $k$-differentials $\xi=c\prod_i(w-z_i)^{\kappa_i}(dw)^k$, $c\in\C^\times$, on the sphere. The orders exceed $-k$, so these differentials have finite area, and as $\gcd(k,\kappa_1,\dots,\kappa_n)=1$, none is a power of a differential of lower order. The stratum is connected, being parametrized by $c$ and the $z_i$. The $k$-th roots of $\xi$ are the forms $c^{1/k}\omega_z$ on $X_z$, so the holonomy cover of $\xi$ is $(X_z,c^{1/k}\omega_z)$. A set $S'$ of the orders sums to $-k$ exactly when $\sum_{i\in S'}q_i=(|S'|-1)k$, so the hypothesis of the second statement of Apisa and Aygun's Theorem~1.2 is that $\theta$ is not open, and they conclude that the orbit closure $\mathcal M_{\mathcal C}$ of these covers is as big as possible \cite[Theorem~1.2]{ApisaAygun}. For $n\ge5$, a general configuration of $n$ points of the sphere is preserved by no involution, so $\mathcal C$ is not hyperelliptic \cite[proof of Lemma~8.6]{ApisaAygun}, and by their definition \cite[\S1.1]{ApisaAygun} $\mathcal M_{\mathcal C}$ is the component of the stratum that contains it if $k$ is odd, and the quadratic double that contains it if $k$ is even. Their Corollary~1.3 gives the same for the unfolding of almost every polygon of type $\theta$ \cite{ApisaAygun}. Whether or not the points over the vertices are kept as marked points, forgetting those that are not zeros of the form is continuous and commutes with $\GL^+(2,\R)$; it maps the orbit closure of a marked surface into that of the unmarked one, and the locus just described onto $\amb$. So the unfolding of almost every polygon of type $\theta$ has orbit closure $\amb$, and $\Mt=\amb$ by Mirzakhani and Wright's Lemma~6.3 \cite{MirzakhaniWright}. This is \cref{thm:AA}. Before Apisa and Aygun, Apisa proved that the unfolding of almost every polygon with at least five sides and at most two angles that are not multiples of $\pi/2$ has dense orbit in the hyperelliptic locus that contains it \cite[Theorem~1.11]{Apisa}. Such a type is not open, since its other $n-2\ge3$ angles are $\pi/2$ or $3\pi/2$ and all the angles sum to $(n-2)\pi$, so that two of them are $\pi/2$; and this locus is $\amb$, since $X/\iota$ is a cyclic cover of the sphere branched only over the at most two vertices whose angles are not multiples of $\pi/2$, so that it has genus zero and $\iota$ is the hyperelliptic involution of $X$. \subsection{An independent proof}\label{ssec:second} The partition into $S$ and $S^c$ makes the arithmetic of \cref{sec:units} short. \begin{lemma}\label{lem:blocks} Every unit $x$ has $h(x)\ge1$, and every closed set that contains $U$ is $E$. \end{lemma} \begin{proof} Let $x$ be a unit. Each $t_i(-x)=\{-xq_i/k\}$ is positive, as $q_i\not\equiv0\pmod k$, and $\sum_{i\in S}t_i(-x)\equiv-x(|S|-1)\equiv0\pmod1$; so this sum is a positive integer, and so is the sum over $S^c$. Hence $t(-x)\ge2$, and $h(x)\ge1$. Let $A'$ be closed with $U\subset A'$, and let $b\in E$. As $A'=-A'$ and $h(b)+h(-b)=n(b)-2\ge1$, we may assume that $h(b)\ge1$. By \cref{lem:height}, applied with $y=1-b$, which is even if $k$ is, there is a unit $x$ such that $x'=1-b-x$ is a unit. Then $x\in A'$ with $h(x)\ge1$ and $x'\in U\subset A'\cap F$, and (c) of \cref{def:closed} with $u=1$ gives $b\in A'$. \end{proof} \begin{proposition}\label{prop:nonopenpair} Suppose that $k\ge3$, and that $n\ge6$ or $k\ge11$. Then $\theta$ has a collision pair $\{i,j\}$, with $\theta_{ij}$ reduced and not one of the seven types of \cref{lem:descent} if $n=5$. \end{proposition} \begin{proof} A pair $\{i,j\}$ with $i\in S$ and $j\in S^c$ satisfies the third condition of \cref{def:pair}: a prime that divides $k$ and every $q_l$ with $l\ne i,j$ divides $q_i$ and $q_j$, by the sums over $S$ and $S^c$, and so every weight. Recall that the first two conditions of \cref{def:pair} say that $0<|\Delta_i+\Delta_j|<1$. Let $n=5$, so $k\ge11$. We may take $S$ to have two vertices, with weights $p$ and $k-p$, $p\le k/2$; let $r\le s\le t$ be the other weights, so $r+s+t=2k$ and $t\ge2k/3>p$. A type of quadrilaterals is reduced unless its weights are $a,a,b,b$ with $a1$. Now the pair of the two weights $k-p$ has sum $2k-2p\in(k,4k/3)$, and the other weights $p$, $k-p$, $2p$ satisfy $\gcd(k,p,k-p,2p)=\gcd(k,p)=1$; so it is a collision pair, and its $\theta_{ij}$ has the four distinct weights $k-2p1$. If $p=k/2$, take the pair of weights $s$ and $t=3k/2$, with sum in $(3k/2,2k)$ as $00$. Then $-1<\Delta_a+\Delta_b<1$, and $\{a,b\}$ is a collision pair unless $\Delta_a=-\Delta_b$, that is, $q_a+q_b=2k$. In that case suppose first that some $c$ has $|\Delta_c|\ne\Delta_b$. If $\Delta_c>0$, the pair $\{a,c\}$ has $0<|\Delta_a+\Delta_c|<1$, and a prime that divides $k$ and the weights other than $q_a$ and $q_c$ divides $q_b$, hence $q_a=2k-q_b$, hence $q_c$, as the weights sum to $(n-2)k$; so $\{a,c\}$ is a collision pair. If $\Delta_c<0$, the pair $\{b,c\}$ is one in the same way. Finally suppose that $|\Delta_l|=\Delta_b$ for every $l$, and let $\sigma=\sum_{l\in S}\operatorname{sign}\Delta_l$. Then $k\Delta_b=k-q_b$ is a positive integer, and the sum over $S$ gives $k=\sigma\cdot k\Delta_b$; so $k\Delta_b$ divides $k$ and every $q_l=k\mp k\Delta_b$, and $k\Delta_b=1$. So every weight is $k\pm1$, prime to $k$, and as $\sigma=k\ge3$, at least two deficits equal $1/k$; two of them form a collision pair, with $\Delta_i+\Delta_j=2/k<1$. \end{proof} \begin{proof}[Proof of \cref{thm:AA}] Let $k=2$. Every weight is $1$ or $3$; as they sum to $2(n-2)$, $r=(n+4)/2$ of them are $1$ and $v=(n-4)/2$ are $3$, so $n$ is even. Here $\iota=T$, $X_z/\iota$ is the $w$-sphere, and the quotient of $\omega_z^2$ is $\prod_i(w-z_i)^{q_i-2}dw^2$, with simple zeros at the $z_i$ with $q_i=3$, simple poles at those with $q_i=1$ and a regular point at $\infty$; it lies in $\mathcal Q(1^v,-1^r)$. Conversely, after a M\"obius map that takes a regular point to $\infty$, every surface of this stratum is $c\prod_i(w-z_i)^{q_i-2}dw^2$ for some $z\in\Conf$ and $c\in\C^\times$, and its holonomy double cover is $(X_z,c^{1/2}\omega_z)$. The stratum is connected, being parametrized by $c$ and the $z_i$, so $\amb$ is the locus of these covers. As $\Mt$ is invariant under $\GL^+(2,\R)\supset\C^\times$ and contains every $(X_z,\omega_z)$, $\amb\subset\Mt$, so $\Mt=\amb$. This case is due to Athreya, Eskin and Zorich, with Chaika \cite[Proposition~3.2, Theorem~C.1 and \S6.1]{AEZ}, and is contained in Apisa's Theorem~1.11 \cite{Apisa}; here it is immediate from the cyclic family. Let $k\ge3$. We argue by induction on $n$, and for $n\ge6$ we assume the theorem for the types of $(n-1)$-gons with this $k$ that are not open; \cref{thm:open} covers those that are open. Let $X$ be a generic point and $A$ as in \cref{prop:block}. As in the proof of \cref{thm:open}, $A$ satisfies (a)--(c) of \cref{def:closed}. It satisfies (d): for a collision pair $\{i,j\}$, with $\theta_{ij}$ reduced and not one of the seven types if $n=5$, $\theta_{ij}$ is a type of $(n-1)$-gons with the same $k$ by \cref{lem:descent}(a), and $\mathcal M(\theta_{ij})=\mathcal L(\theta_{ij})$, by Part~III \cite[Theorem~1.1]{P29} if $n=5$ (see the proof of \cref{lem:descent}), and by \cref{thm:open} or the induction hypothesis if $n\ge6$; so \cref{prop:collision} applies. So $A$ is closed. If $n=5$ and $k\le10$, we find that the least closed set is $E$ (\cref{ssec:computations}), so $A=E$. Among these types, $(1,1,1,2,4)/3$, $(1,2,2,2,2)/3$, $(1,1,1,4,8)/5$ and $(1,1,1,5,10)/6$ are the four with no collision pair to which (d) applies. If $n\ge6$ or $k\ge11$, \cref{prop:nonopenpair} gives a collision pair to which (d) applies, (d) puts $F$, and so $U$, into $A$, and $A=E$ by \cref{lem:blocks}. In both cases \cref{lem:AE} gives $\Mt=\amb$. For every $k$, Mirzakhani and Wright's Lemma~6.3 then gives the statement for almost every polygon \cite{MirzakhaniWright}. \end{proof} \subsection{Proof of \texorpdfstring{\cref{cor:Q16}}{Corollary 1.3}}\label{ssec:Q16} By \cref{thm:open,thm:AA}, $\Mt=\amb$ for every type with $n\ge5$, which is the statement. For the open type $(1,1,2,7,7)/6$, $\iota=T^3$ fixes the single point over each vertex of weight $1$, which is regular, and the single point over each vertex of weight $7$, a zero of order $6$; the quotient differential has the orders $-1$ and $5$ there. It exchanges the two regular points over the vertex of weight $2$ and has no other fixed points, as it is a deck transformation. So $(X/\iota,\omega^2)$ lies in $\mathcal Q(5,5,-1,-1)$, a stratum of genus $3$ with two components, one of them hyperelliptic \cite[Corollary~1]{LanneauHyp}, \cite[Theorem~1.2]{Lanneau}, and by \cref{lem:base} it lies in the other one. \section{Billiards in a generic polygon}\label{sec:billiards} In this section $\theta$ is a type of $n$-gons with $n\ge5$, and $\mathcal P$ is a connected component of the space of polygons with the angles $\pi q_1/k,\dots,\pi q_n/k$ in a fixed cyclic order, with its Lebesgue measure class. Mirzakhani and Wright's proof of their Lemma~6.3 identifies, by the Schwarz--Christoffel formula, the unfoldings of the polygons in $\mathcal P$ with the surfaces $(X_z,\omega_z)$ for $z$ in an open subset of $\R^n$, whose periods are real-analytic in $z$ \cite{MirzakhaniWright}. Write $M=\amb$, and let $\mathcal P^\circ$ be the set of $P\in\mathcal P$ whose unfolding $X$ has orbit closure $M$ and no automorphisms other than the powers of $T$. By \cref{thm:open,thm:AA}, Mirzakhani and Wright's Lemma~6.3, and \cref{lem:aut}, the complement of $\mathcal P^\circ$ has measure zero, as the real points of a proper algebraic subset of $\C^n$ form a null set. If $k$ is odd, let $(Y,q)=(X,\omega)$ and $\mathcal S=M$. If $k$ is even, let $(Y,q)=(X/\iota,\omega^2)$, and let $\mathcal S$ be the component $\mathcal Q$ of its stratum, so that $M=\Qt$. Let $e=\gcd(2,k)$, $d=k/e$ and $b=2d$. The quotient $X/\langle T\rangle$ is the double $D(P)$ of $P$, two copies of $P$ glued along their edges, and $Y\to D(P)$ is cyclic of degree $d$; so $Y$ is tiled by $b$ copies of $P$, and has area $bA$, where $A$ is the area of $P$. Over the vertex $i$ the surface $Y$ has $s_i=\gcd(d,q_i)$ points, each of cone angle $2\pi q_i/(es_i)$, so \[ m=\sum_{i:\,q_i=es_i}s_i \] is the number of regular points of $Y$ over the vertices. Let $M_*$ be the orbit closure of $X$ with all the regular points over the vertices marked. \begin{lemma}\label{lem:base} Let $P\in\mathcal P^\circ$. Then $\rk M\ge n-2$ if $k>2$, and $\rk M\ge2$ if $k=2$. Moreover $X$ is not a translation cover of a torus, and $\mathcal S$ is not hyperelliptic. If $k$ is even, the orbit of $(Y,q)$ is dense in $\mathcal S$. \end{lemma} \begin{proof} By \cref{lem:ambient}, $\rk M=\frac12\sum_{x\in E}(n(x)-2)$. If $k>2$, the distinct characters $\pm1$ lie in $E$ and have $n(\pm1)=n$, so $\rk M\ge n-2\ge3$; if $k=2$, then $E=\{1\}$, $n\ge6$ (\cref{ssec:second}), and $\rk M=(n-2)/2\ge2$. As $\rk M\ge2$, $X$ is not a translation cover of a torus, whose orbit closure would have rank one \cite[Proposition~4.18]{WrightSurvey}. If $k$ is odd, the automorphisms of $Y=X$ are the powers of $T$, of odd order, so $Y$ has no involution and $\mathcal S$ is not hyperelliptic. Let $k$ be even, and let $\varphi$ be an automorphism of $Y$ with $\varphi^*q=q$. As $X$ is the curve of the square roots of $q$, $\varphi$ lifts to an automorphism $\tilde\varphi$ of $X$ with $\tilde\varphi^*\omega=\pm\omega$; so $\tilde\varphi=T^j$ with $\zeta^j=\pm1$, that is, $\tilde\varphi\in\{1,\iota\}$, and $\varphi$ is the identity. In a hyperelliptic component every surface has an involution that preserves its quadratic differential \cite[Definition~1 and \S4.1]{LanneauHyp}, \cite[\S1 and Lemma~4.5]{ApisaWrightMarked}, so $\mathcal S$ is not hyperelliptic. Let $k$ be even, and let $f:\mathcal S\to M$ send a half-translation surface to its holonomy double cover. It is continuous and commutes with $\GL^+(2,\R)$. For $g\in\GL^+(2,\R)$, a homeomorphism of the surface is an automorphism of $g\cdot X$ that negates its form exactly when it is an automorphism of $X$ that negates $\omega$, as both mean that it is affine with derivative $-I$ and $g(-I)g^{-1}=-I$. By \cref{lem:aut} the only such automorphism is $\iota$, so the only point of $\mathcal S$ over $g\cdot X$ is $g\cdot(Y,q)$. Near each point of $\mathcal S$, Lanneau's chart \cite[\S1.1.1]{Lanneau} makes $f$ the inclusion of an open subset of a linear subspace of dimension $\dim\mathcal S=\dim M$ into period coordinates, up to the finite groups of the orbifold charts, and near each of its points $M$ is a finite union of linear subspaces of this dimension \cite[\S1]{ApisaWrightMarked}. So the image under $f$ of each non-empty open subset of $\mathcal S$ contains a non-empty open subset of $M$, hence a point $g\cdot X$, as the orbit of $X$ is dense in $M$, and the orbit of $(Y,q)$ is dense in $\mathcal S$. \end{proof} \subsection{Counting periodic trajectories}\label{ssec:count} A cylinder on a translation or half-translation surface is a maximal family of parallel closed regular geodesics, counted once and without orientation, with its circumference; on a surface with marked points the geodesics must also avoid the marked points. Let $N_X(L)$ be the number of cylinders on $X$ of circumference at most $L$, and $B_P(L)$ the number of bands of periodic billiard trajectories in $P$ of length at most $L$, as in Apisa's \cite[Definition~8.5 and Lemma~8.6]{Apisa}. For a counting function $N$ let \[ W(N)=\lim_{t\to\infty}\frac1t\int_0^te^{-2s}N(e^s)\,ds . \] Let $\mathcal N$ be an affine invariant submanifold, possibly with marked points, with its affine invariant probability measure on the surfaces of area one \cite[Definition~1.1]{EMM}, or a component of a stratum of quadratic differentials, with its Masur--Veech probability measure. The mean number of cylinders of circumference at most $L$ on the surfaces of $\mathcal N$ is $\pi c_{\mathrm{cyl}}(\mathcal N)L^2$, and the mean total area of these cylinders is $\pi c_{\mathrm{area}}(\mathcal N)L^2$ \cite[\S8]{EskinMarklofMorris}, \cite[\S4]{AEZ}. \needspace{4\baselineskip} \begin{corollary}\label{cor:count} For almost every $P\in\mathcal P$, of area $A$, \[ W(N_X)=\frac{\pi c_{\mathrm{cyl}}(M)}{2kA},\qquad W(B_P)=\frac{\pi c_{\mathrm{cyl}}(M_*)}{(2k)^2A}=\frac{\pi\bigl(c_{\mathrm{cyl}}(\mathcal S)+m\,c_{\mathrm{area}}(\mathcal S)\bigr)}{b^2A}. \] \end{corollary} Eskin, Mirzakhani and Mohammadi's Theorem~2.12 gives $W(B_P)$ for every rational polygon \cite[Theorem~2.12]{EMM}. Its constant is a Siegel--Veech constant of the orbit closure of the unfolding with the regular points over the vertices marked, and the corollary identifies it for almost every $P$ of a type with five or more vertices. For $k=2$, Athreya, Eskin and Zorich give exact asymptotics for almost every right-angled polygon, configuration by configuration \cite[Theorem~2.4]{AEZ}, and Apisa notes that their work gives such counts for almost every polygon of a type with at most two angles that are not multiples of $\pi/2$ \cite[after Theorem~1.11]{Apisa}. The term $m\,c_{\mathrm{area}}(\mathcal S)$ comes from the $m$ regular points of $Y$ over the vertices, each of which cuts the cylinder of $Y$ that contains it into two of the same circumference. So the regular points over the vertices change the constant whenever $m>0$, as $c_{\mathrm{area}}(\mathcal S)>0$, every translation or half-translation surface having cylinders \cite{Masur86}. For the type $(1,2,2,2,2)/3$, which is not open, $m=1$ and $b=6$; for the open type $(1,5,5,5,5)/7$, with $X\in\mathcal H(4,4,4,4)$, $m=1$ and $b=14$. \begin{proof} Let $P\in\mathcal P^\circ$. Eskin, Mirzakhani and Mohammadi's proof of their Theorem~2.12 shows that a translation surface of area one with orbit closure $\mathcal N$ has $W(N)=\pi c_{\mathrm{cyl}}(\mathcal N)$ for its count $N$ of cylinders \cite[Theorem~2.6 and proof of Theorem~2.12]{EMM}, \cite[Theorem~8.2]{EskinMarklofMorris}. As $X$ has area $2kA$ and orbit closure $M$, scaling gives the first formula. With marked points, Eskin, Mirzakhani and Mohammadi's results still hold \cite[\S2.2]{LMW}, but two hypotheses of Eskin, Marklof and Morris's Theorem~8.2 \cite{EskinMarklofMorris} are not given by these citations. Let $x$ be a surface of area one and genus at least~$2$ with $r$ regular marked points, $\mathcal N$ its orbit closure and $\nu$ the affine measure of $\mathcal N$. A cylinder of $x$ with its marks forgotten gives at most $r+1$ cylinders with the marks, and every cylinder has a saddle connection on its boundary. So, by Eskin and Masur's Theorem~5.1 \cite{EskinMasur}, the bound (B$'$) of \cite[Remark~8.5]{EskinMarklofMorris} holds with the length of the shortest saddle connection of the unmarked surface, to which Eskin and Masur's Theorem~5.2 applies. For condition (D), off the self-crossing set of $\mathcal N$, which is closed and $\nu$-null \cite[Definition~1.1]{EMM}, $\mathcal N$ is locally one linear subspace, and on it the cylinder transform $\hat h$ of the indicator of a trapezoid is locally constant off the zero sets of finitely many real-analytic functions, where the holonomy of a cylinder meets the boundary of the trapezoid or the width of a cylinder vanishes. Each of these zero sets is $\nu$-null or the whole subspace, along which $\hat h$ does not change, so $\hat h$ is continuous off a $\nu$-null set, which gives~(D). The second formula uses this for $X$ with the regular points over the vertices marked, with $\mathcal N=M_*$. Let $N_{Y,*}$ count the cylinders of $Y$ with the $m$ regular points over the vertices marked. Here the cylinders of $D(P)$ are as in Apisa's Definition~8.5, maximal families of homotopic closed geodesics in $D(P)$ minus its cone points, which need not be embedded. Apart from finitely many, those that avoid the vertices come in pairs exchanged by the reflection of $D(P)$, one pair for each band of $P$, and each lifts to $d$ cylinders of $Y$ of the same circumference; so $W(B_P)=W(N_{Y,*})/b$ \cite[Lemma~8.6 and its proof]{Apisa}. If $k$ is odd, then $Y=X$, $Y$ with these marks has orbit closure $M_*$, and $b=2k$, which gives $W(B_P)=\pi c_{\mathrm{cyl}}(M_*)/(b\cdot2kA)=\pi c_{\mathrm{cyl}}(M_*)/((2k)^2A)$. Let $k$ be even. The core curve of a cylinder of $Y$ has trivial linear holonomy, so each cylinder of $Y$ with these marks lifts to two cylinders of $X$ of the same circumference, which avoid all the regular points over the vertices, the fixed points of $\iota$ among them. Every such cylinder of $X$ arises so, as a cylinder that $\iota$ maps to itself contains two fixed points of $\iota$. So $N_{X,*}=2N_{Y,*}$ for the corresponding count on $X$. As $b=k$, $W(B_P)=W(N_{X,*})/(2b)=\pi c_{\mathrm{cyl}}(M_*)/((2k)^2A)$. For the last expression, let $\mathcal S_*$ be the orbit closure of $(Y,q)$ with its $m$ regular points over the vertices marked. We show that it is the locus of all surfaces of $\mathcal S$ with $m$ distinct regular marked points. If $k$ is odd, $X$ has dense orbit in the component $M$, which is not hyperelliptic, and genus at least $2$, so every finite set of regular points of $X$ is generic in Apisa's sense \cite[Theorem~1.1]{ApisaMarked}. Let $k$ be even. The orbit of $(Y,q)$ is dense in $\mathcal S$, which has rank at least $2$ and is not hyperelliptic (\cref{lem:base}). So there are no irreducible markings of two or more points over $\mathcal S$ \cite[Corollary~5.2]{ApisaWrightMarked}, and no regular point of $(Y,q)$ is periodic, as it would lift to a periodic point of the double cover \cite[\S5]{ApisaWrightMarked} that is not fixed by the involution \cite[Theorem~1.4]{ApisaWrightMarked}. In both cases each marked point moves freely, so $\mathcal S_*$ has dimension $\dim\mathcal S+m$; it is closed and invariant, and the locus of all surfaces of $\mathcal S$ with $m$ distinct regular marked points is connected, so it is $\mathcal S_*$. The invariant measure on $\mathcal S_*$ is the product of that of $\mathcal S$ and the area measures of the marked points \cite[Definition~1.1(ii)]{EMM}, \cite[\S4.3]{AEZ}. A cylinder of area $a$ on a surface of area one that contains $j$ marked points at distinct heights is cut into $1+j$ cylinders of the same circumference, and $j$ has mean $ma$; so $c_{\mathrm{cyl}}(\mathcal S_*)=c_{\mathrm{cyl}}(\mathcal S)+m\,c_{\mathrm{area}}(\mathcal S)$. If $k$ is odd, $\mathcal S_*=M_*$ and $b=2k$. If $k$ is even, $N_{X,*}=2N_{Y,*}$ and $X$ has twice the area of $Y$, so $c_{\mathrm{cyl}}(M_*)=4c_{\mathrm{cyl}}(\mathcal S_*)$ at area one, and $(2k)^2=4b^2$. \end{proof} \subsection{The exceptional polygons}\label{ssec:exceptional} Let $F(P)$ be the unfolding of $P\in\mathcal P$, and $\mathcal E$ the set of $P$ for which the orbit closure of $F(P)$ is smaller than $M$. \begin{corollary}\label{cor:exceptional} If $k\notin\{2,3,4,6\}$, $\mathcal E$ is a finite union of closed real-analytic subsets of measure zero. If $k\in\{2,3,4,6\}$, $\mathcal E$ is a countable union of such sets and is dense in $\mathcal P$. \end{corollary} \begin{proof} The set $\mathcal E$ is the union of the sets $F^{-1}(\mathcal D)$ over the countably many affine invariant submanifolds $\mathcal D\subsetneq M$, and each of these is a closed real-analytic subset of $\mathcal P$ of measure zero. If the orbit closure of $F(P)$ is $\mathcal D\ne M$, then $P\in F^{-1}(\mathcal D)$; conversely, if $F(P)\in\mathcal D\subsetneq M$, its orbit closure lies in $\mathcal D$, which is closed and invariant. There are countably many affine invariant submanifolds \cite[Proposition~2.16]{EMM}, and near each of its points $\mathcal D$ is a finite union of linear subspaces in period coordinates \cite[Definitions~1.1 and~1.2]{EMM}; as the periods of $F(P)$ are real-analytic in $P$, $F^{-1}(\mathcal D)$ is a closed real-analytic subset, of measure zero as $\mathcal P^\circ$ has full measure. Let $k\notin\{2,3,4,6\}$, so that $k\ge5$ and $\rk M\ge n-2\ge3$ (\cref{lem:base}). We argue as in Apisa's proof of his Proposition~10.3 \cite{Apisa}. By Eskin, Filip and Wright, all but finitely many affine invariant submanifolds of the stratum of $M$ have rank $1$ and degree at most $2$, the degree being that of the field of affine definition over $\Q$. All but finitely many of those of rank $1$ and degree $2$ lie in one of finitely many affine invariant submanifolds $\mathcal N_1,\dots,\mathcal N_r$ of rank $2$ \cite[Theorem~1.5]{EFW}, and those of rank $1$ and degree $1$ consist of covers of tori \cite[after Corollary~1.6]{EFW}. No unfolding of a polygon of type $\theta$ covers a torus, as that forces $k\in\{2,3,4,6\}$ \cite[proof of Proposition~3.11]{ApisaWrightMarked}. As $\rk M\ge3$, each $\mathcal N_\alpha\cap M$ is a closed invariant proper subset of $M$, locally a finite union of linear subspaces, and every point of it has orbit closure smaller than $M$. So $\mathcal E$ is the union of the sets $F^{-1}(\mathcal D)$ for finitely many $\mathcal D$ and the sets $F^{-1}(\mathcal N_\alpha\cap M)$, each a closed real-analytic subset of measure zero. Let $k\in\{2,3,4,6\}$, and let $\Lambda$ be the lattice $\Z[i]$ if $k\in\{2,4\}$ and $\Z[e^{\pi i/3}]$ if $k\in\{3,6\}$. Rotate the polygons so that one edge is horizontal. The directions of the edges are then multiples of $\pi/k$, and each such direction contains a non-zero vector of $\Lambda$; so the edge vectors are $t_1u_1,\dots,t_nu_n$ with fixed $u_l\in\Lambda$ and $t_l>0$ subject to $\sum_lt_lu_l=0$, two linear equations with rational coefficients in a basis of $\Lambda$. Rational solutions are dense among the real ones, and simplicity is an open condition; so the polygons of $\mathcal P$ whose vertices lie in $\Lambda$ after a translation and a scaling are dense. For such a polygon the reflections in its edges preserve $\Lambda$, so the developing map of its unfolding sends every point over a vertex into $\Lambda$, and integrating $\omega$ modulo $\Lambda$ makes the unfolding a cover of the torus $\C/\Lambda$ branched over one point. Its orbit is closed, of rank one \cite[Remark~3.7 and Proposition~4.18]{WrightSurvey}, while $\rk M\ge2$ (\cref{lem:base}); so these polygons lie in $\mathcal E$. \end{proof} \subsection{Periodic points and illumination}\label{ssec:illum} A regular point of a translation surface is periodic if marking it does not increase the dimension of the orbit closure \cite[\S1]{ApisaMarked}. Two points are finitely blocked if a finite set of other points meets every straight segment that joins them \cite[\S3.1]{ApisaWrightMarked}. A billiard path in $P$ is a path that is straight in the interior of $P$, reflects at the edges, and meets no vertex except possibly at its ends. \begin{corollary}\label{cor:illum} For almost every $P\in\mathcal P$ the following hold. If $k$ is odd, $X$ has no periodic points; if $k$ is even, its periodic points are the regular fixed points of $\iota$, which lie over vertices. Any two distinct points of $P$, vertices included, are joined by a billiard path that avoids any given finite set of other points of $P$. \end{corollary} For every rational polygon, Leli\`evre, Monteil and Weiss show that each point is joined by a billiard path to all but finitely many points \cite[Corollary~3]{LMW}. Apisa and Wright show that only finitely many pairs are finitely blocked when the polygon is not Gaussian, Eisenstein or rectangle-tiled and some angle is not a multiple of $\pi/2$ \cite[Theorem~1.1(3)]{ApisaWrightMarked}. For almost every polygon of a type with five or more vertices, \cref{cor:illum} leaves no such pairs of distinct points. For the types with at most two angles that are not multiples of $\pi/2$, Apisa notes that the finite blocking problem for almost every polygon can be solved as in his Theorem~1.3 \cite[after Theorem~1.11]{Apisa}. \begin{proof} Let $P\in\mathcal P^\circ$. If $k$ is odd, $X$ has dense orbit in the component $M$, which is not hyperelliptic (\cref{lem:base}), and genus at least $2$, so it has no periodic points \cite[Theorem~1.1]{ApisaMarked}. If $k$ is even, $\mathcal S$ has rank at least $2$, so it is not $\mathcal Q(-1^4)$, $\mathcal Q(2,-1^2)$ or $\mathcal Q(2^2)$ \cite[Corollary~4.3]{ApisaWrightMarked}, and it is not hyperelliptic; so the periodic points of $X$ are the regular fixed points of its involution that negates $\omega$ \cite[Theorem~1.4]{ApisaWrightMarked}, which is $\iota$ by \cref{lem:aut}. As $\iota=T^{k/2}$, its fixed points lie over the vertices. As $X$ is not a translation cover of a torus, it has a translation covering $\pi_{\min}$ onto a half-translation surface which factors through every translation covering of $X$ onto a half-translation surface \cite[Lemma~3.3]{ApisaWrightMarked}. We show that $\pi_{\min}$ is an isomorphism if $k$ is odd, and the quotient map $X\to Y$ followed by an isomorphism if $k$ is even. In both cases $\pi_{\min}$ is the covering $X\to Y$ followed by a half-translation covering $g$ of $Y$. Fix a degree greater than one, a target stratum and branching data. The surfaces of $\mathcal S$ that admit a half-translation covering with these data form an invariant set $C$, the image of an algebraic family of coverings. The generic surface of the non-hyperelliptic component $\mathcal S$ admits no non-bijective half-translation covering \cite[Lemma~4.5 and proof of Corollary~5.2]{ApisaWrightMarked}, so $C$ lies in a proper algebraic subset of $\mathcal S$, and its closure is a proper closed invariant subset. It contains no surface with dense orbit in $\mathcal S$, and $Y$ has dense orbit in $\mathcal S$, by the choice of $P$ if $k$ is odd and by \cref{lem:base} if $k$ is even; so $Y$ is not in $C$, and $g$ is bijective. Let $p\ne p'$ be points of $P$ and $x,x'\in X$ points over them. The map from $X$ to $P$ factors through $Y$, so $\pi_{\min}(x)\ne\pi_{\min}(x')$, and if $x$ and $x'$ are finitely blocked, each is a periodic point or a zero \cite[Theorem~3.6]{ApisaWrightMarked}, and so lies over a vertex. So if $p$ or $p'$ is not a vertex, no two points over $p$ and $p'$ are finitely blocked. Let $p$ and $p'$ be the vertices $i\ne j$. Mark on each $X_z$, $z\in\Conf$, the points over each $z_l$ with the label $l$. As in Mirzakhani and Wright's proof of their Lemma~6.3, the periods of these marked surfaces are holomorphic in $z$ in a local marking, and there are countably many affine invariant submanifolds in strata with marked points \cite[\S2.2]{LMW}; so for almost every $P\in\mathcal P$ the orbit closure of the marked unfolding of $P$ contains every marked $X_z$, and we take $P$ with this property. Choose $z\in\R^n\cap\Conf$ with no $z_l$ between $z_i$ and $z_j$. Over this interval $\omega_z=\prod_l(w-z_l)^{q_l/k-1}dw$ has constant argument on each lift and is integrable at the ends, as $q_l/k-1>-1$; so a lift of the interval is a straight segment from a point over $z_i$ to a point over $z_j$ whose interior meets no marked point. Having such a segment is an open condition in the stratum of the marked surfaces, invariant under $\GL^+(2,\R)$ \cite[proof of Lemma~3.7]{ApisaWrightMarked}. As the orbit of the marked unfolding of $P$ comes arbitrarily close to the marked $X_z$, the unfolding $X$ has a straight segment $\sigma$ from a point $x$ over $p$ to a point $x'$ over $p'$ whose interior meets no point over a vertex. Suppose that $x$ and $x'$ are blocked by a minimal finite set $B$. Then $x$ and $x'$ are periodic points or zeros, as above, and the points of $B$ are locally determined by the unmarked surface and $x,x'$ \cite[Lemma~3.8]{ApisaWrightMarked}; so marking them does not increase the dimension, and they are periodic points, which lie over vertices. Then $\sigma$ avoids $B$, a contradiction. Finally let $p\ne p'$, let $x,x'$ be points over them that are not finitely blocked, and let $B\subset P$ be finite with $p,p'\notin B$. If $p$ and $p'$ lie on one edge of $P$, we add to $B$ a point of that edge between them. As $x$ and $x'$ are not finitely blocked, there is a straight segment from $x$ to $x'$ whose interior avoids the zeros of $\omega$ and the points other than $x$ and $x'$ that lie over $B$, over $p$ or $p'$, or over a vertex. Its part from its last visit to $x$ before its first visit to $x'$ then meets no point over a vertex, over $p$ or $p'$, or over $B$ in its interior. It does not run along the lift of an edge, as it would then lie in that lift, whose ends are over vertices, and its image would be the part of an edge between $p$ and $p'$, which contains a point of $B$. So its image in $P$ is a billiard path from $p$ to $p'$ that avoids $B$, by Wolecki's Lemma~2.1 and Remark~2.2 \cite{Wolecki} on its subsegments whose ends are not over vertices, extended continuously to $p$ and $p'$. \end{proof} \section*{Declarations}\phantomsection\label{sec:declarations} \subsection*{Use of AI} This paper and its results were produced by an AI research system that the author designed, built and directs, running on Anthropic's Claude Fable~5.2 in Claude Code and OpenAI's GPT-6.2 Astra in Codex. The author chooses the problems and prioritizes the work. Separate AI agents checked each result, and a second program confirmed the computations the proofs use, with any exceptions listed in the public deposit. The system also searched the literature and checked the citations against reliable sources. The author read the paper, reran the computations from the deposit and takes full responsibility for all of the paper's contents. \subsection*{Data availability} The programs and data used in this paper, with instructions for rerunning them, are deposited at Zenodo~\cite{Record}. \bibliographystyle{amsplain} \bibliography{refs} \end{document}