% % \section{Diagram 2 beyond the torque}\label{app:d2} In this appendix we prove Lemma~\ref{lem:d2gate} and Theorem~\ref{thm:gate}. Let $P$ be a singular place of diagram $2$ of a curve $C$ as in Theorem~\ref{thm:types}. Exchanging the colours and relabelling the bodies (with their masses) we may assume that the segment is $\{1,2\}$, $z$-coloured, and the triangle $\{3,4,5\}$, $w$-coloured. Then the ends of the segment are $z$-circled and the vertices of the triangle are $w$-circled. Put $M_t=m_3+m_4+m_5$, $\rho=m_2/m_1$, and fix $\jj_\rho$ with $\jj_\rho^2=-\rho$. \subsection{The weighted system}\label{ss:d2weights} By Table~\ref{tab:types} the type is $\pc a_1(\{3,4,5\})$: $x_{kl}=0$ inside the segment and the triangle and $x_{kl}=-2$ across. By (O3) and (O6) of Lemma~\ref{lem:orders}, $\zeta_{12}=-2$, $\omega_{12}=2$, $\omega_{kl}=-2$ and $\zeta_{kl}=2$ on the sides of the triangle, and $\zeta=\omega=-2$ across. Hence, in the coordinates $u_k=z_k-z_5$, $v_k=w_k-w_5$ of \S\ref{ss:slice}, the exponents of Lemma~\ref{lem:place} are $e(u)=(-2,-2,2,2)$, $e(v)=(-2,-2,-2,-2)$, $e(p_{kl})=0$ for $kl\in\{12,34,35,45\}$ and $e(p_{kl})=2$ for the six cross pairs. Let $w=e/2$ be the \emph{weights}. For each of the eighteen rows \eqref{eq:rows}, we substitute $q=T^{w_q}y_q$ for each coordinate $q$ and divide by the lowest power of $T$. This gives $G_r(T,y)=\sum_{i\ge0}T^iG_{r,i}(y)$. Since its coefficients are $\pm1$, $\pm m_l$ and $-(m_k+m_5)$, the same monomials occur at all positive masses. A \emph{leading solution} is a zero $y_0$ of $G_0=(G_{r,0})_r$ with $y_{u_1}=y_{v_1}=1$ and all coordinates nonzero. The matrix $J_0$ is the $18\times16$ Jacobian matrix of $G_0$ at $y_0$ in the other sixteen unknowns. \begin{lemma}\label{lem:d2branch} After a rotation depending on the local parameter and a change of the parameter, the coordinates near $P$ are $q=T^{w_q}y_q(\xi)$ with $T=\xi^L$ for an integer $L\ge1$, where the $y_q$ are convergent power series in $\xi$ with $y_{u_1}\equiv y_{v_1}\equiv1$, $G(\xi^L,y(\xi))\equiv0$, and $y(0)$ is a leading solution. \end{lemma} \begin{proof} By Lemma~\ref{lem:place}, after the rotation there, each coordinate is $\vartheta^{d\,e_q}\tilde y_q(\vartheta)$ with $\tilde y_q(0)\ne0$. We put $L=2d$ (a positive integer) and $T=\vartheta^L$, so that $q=T^{w_q}\tilde y_q$. A further rotation by the unit $\tilde y_{u_1}^{-1}$ makes $y_{u_1}\equiv1$ and multiplies all other $\tilde y_q$ by units. The zero set of $G_0$ is invariant under $y_q\mapsto\lambda^{e'_q}y_q$, with $e'_q=w_q-w_{u_1}$, $w_q+w_{u_1}$ or $w_q$ for $q$ a $u_k$, a $v_k$ or a $p_{kl}$, which comes from $T\mapsto\lambda T$ combined with a rotation. In particular, $e'_{u_1}=0$ and $e'_{v_1}=-2$. Replacing $T$ by $T'\phi^L$ and rotating accordingly turns $y_q$ into $\phi^{Le'_q}y_q$. The equation $\phi^{-2L}y_{v_1}(\xi\phi)=1$ is solved by a convergent $\phi(\xi)$, $\phi(0)^{2L}=y_{v_1}(0)$, by the implicit function theorem. Since all rows vanish on $X_m$, $G(\xi^L,y(\xi))\equiv0$. At $\xi=0$ this gives $G_0(y(0))=0$. \end{proof} \subsection{The leading solutions and the torque}\label{ss:d2torque} For $h\in\C^{\{3,4,5\}}$ let $F'_k(h)=h_k-\sum_{l\in\{3,4,5\}\setminus k}m_lp_{kl}^3(h_k-h_l)$, the rows of the three bodies of the triangle alone. The rows of $G_0$ are the least-weight terms of the rows \eqref{eq:rows}. \begin{lemma}\label{lem:d2lead} At a leading solution: $u_2=-m_1/m_2$, $p_{12}^3=1/(m_1+m_2)$, $v_2=v_c:=(m_3v_3+m_4v_4)/M_t=1$; with $\omega_k=v_k-v_c$ for $k\in\{3,4,5\}$ (so $\omega_5=-1$ and $\sum_km_k\omega_k=0$), $p_{1k}^2=-1/\omega_k$ and $p_{2k}=\sigma_k\jj_\rho p_{1k}$ with $\sigma_k=\pm1$; and the triangle coordinates $u_3,u_4,v_3,v_4,p_{34},p_{35},p_{45}$ satisfy $F'_3=F'_4=F'_5$ for $h=u$ and for $h=v$ and $p_{kl}^2u_{kl}v_{kl}=1$, so they form a complex central configuration of three bodies: of Lagrange type ($p_{kl}^3=1/M_t$) or of Euler type ($u$ parallel to $v$). \end{lemma} \begin{proof} The least-weight parts of $Z_1$, $Z_2$ are $u_1-m_2p_{12}^3(u_1-u_2)$ and its mirror, which give $u_2$ and $p_{12}$. That of $D_{12}$ gives $v_2=v_1=1$. Those of $W_1$ and of $m_3W_3+m_4W_4$ give $v_2=\bar v$ and $\bar v=v_c$, where $\bar v=m_3v_3p_{35}^3+m_4v_4p_{45}^3$. Those of $D_{1k}$, $D_{2k}$ are $p_{1k}^2(1-v_k)-1$ and $p_{2k}^2u_2(1-v_k)-1$. The remaining seven rows are the three-body rows of the triangle. For the dichotomy let $\Psi(h)_k=\sum_lm_lp_{kl}^3(h_k-h_l)$. By antisymmetry $\Psi$ maps the plane $\sum_km_kh_k=0$ to itself. The vectors $u-u_{\mathrm{cm}}\one$ and $\omega$ are fixed vectors of $\Psi$ in it. If they are independent, $\Psi$ is the identity on the plane, and comparing the quadratic forms $\sum_km_kh_k\Psi(h)_k$ and $\sum_km_kh_k^2$, we obtain $p_{kl}^3=1/M_t$. Otherwise $\omega$ is a multiple of $u-u_{\mathrm{cm}}\one$. \end{proof} A \emph{triple point} is a leading solution whose triangle is of Lagrange type with $u=\Lambda v$. Since the shape of a Lagrange triangle with $u$ parallel to $v$ is equilateral, triple points have an equilateral $\omega$. Let $\ell(y)\in\C^{18}$ have the entries $\ell_{Z_k}=m_k(M_tv_k-s_v)$ and $\ell_{W_k}=-m_k(M_tu_k-s_u)$ for $k\in\{3,4\}$, with $s_u=m_3u_3+m_4u_4$, $s_v=m_3v_3+m_4v_4$, and $0$ elsewhere. Put $\lambda=\ell(y_0)$, $\tau(y)=\ell(y)\cdot G_1(y)$ (the \emph{torque}) and $\sigma_3(y)=\ell(y)\cdot G_3(y)$. At a leading solution put, for $k\in\{3,4,5\}$, \[ \tau_k=m_kp_{1k}(m_1+\sigma_k\jj_\rho m_2),\qquad \theta_k=\frac{\tau_k}{m_k\omega_k}=\frac{m_1p_{1k}(1+\sigma_k\jj_\rho\rho)}{\omega_k}. \] We say that $\theta$ is \emph{constant} if $\theta_3=\theta_4=\theta_5$. Since $|m_1+\sigma_k\jj_\rho m_2|^2=m_1^2(1+\rho^3)$ and $|p_{1k}|=|\omega_k|^{-1/2}$, $|\theta_k|=m_1(1+\rho^3)^{1/2}|\omega_k|^{-3/2}$. Thus constant $\theta$ forces $|\omega_3|=|\omega_4|=|\omega_5|$. \begin{lemma}\label{lem:d2rot} \begin{enumerate}[label=\textup{(\alph*)}] \item $\ell(y)\cdot G_0(y)=0$ identically. \item $G_1$ vanishes on every row except $Z_3$, $Z_4$, where $G_{1,Z_k}=\sum_{j=1,2}m_ju_j(p_{kj}^3-p_{5j}^3)$. Moreover, $\ell\cdot G_2\equiv0$ and $\ell\cdot G_n\equiv0$ for $n\ge4$. \item At a leading solution, $G_{1,Z_k}=-(\theta_k-\theta_5)$ and $\tau=-M_t\sum_{k\in\{3,4,5\}}\tau_k$. \item $\ell(y)\cdot G(T,y)=T\tau(y)+T^3\sigma_3(y)$, so along the series of Lemma~\ref{lem:d2branch}, $\tau(y(\xi))=-T^2\sigma_3(y(\xi))$. In particular $\tau(y_0)=0$. \end{enumerate} \end{lemma} \begin{proof} (a) The rows $Z_k$, $W_k$ of $G_0$, $k\in\{3,4\}$, are $F'_k-F'_5$ at $u$ and at $v$ (Lemma~\ref{lem:d2lead}). By antisymmetry $\sum_km_kF'_k(u)=s_u$, $\sum_km_kF'_k(v)=s_v$ and $\sum_km_k\big(v_kF'_k(u)-u_kF'_k(v)\big)=0$. Inserting these into $\ell\cdot G_0$ gives $0$. Note that this is the conservation of angular momentum of the triangle. (b) Each row is a polynomial in $T$. In $Z_k$, $k\in\{3,4\}$, the terms with a factor $p_{kj}$ or $p_{5j}$, $j\in\{1,2\}$, have weight $2$ (those with $u_j$) or $4$, one or three more than the least weight $1$. Hence $Z_k$ has only the relative exponents $0$, $1$, $3$. In $W_k$ these terms have weight $2$, three more than $-1$. So $W_k$ has only $0$ and $3$. The other rows have the relative exponents $0$, $2$, $3$ and $5$ ($Z_1$, $Z_2$), $0$ and $3$ ($W_1$, $W_2$), $0$ and $2$ ($D_{12}$ and $D_{jk}$, $j\in\{1,2\}$, $k\in\{3,4\}$) and $0$ ($D_{15}$, $D_{25}$ and the sides of the triangle). Since $\ell$ is supported on $Z_3,Z_4,W_3,W_4$, the coefficients of $T^2$ and of $T^n$, $n\ge4$, vanish there. (c) With $u_1=1$, $u_2=-m_1/m_2$, $p_{2k}^3=-\rho\sigma_k\jj_\rho p_{1k}^3$ and $p_{1k}^3=-p_{1k}/\omega_k$ we get $m_1(p_{1k}^3-p_{2k}^3)=-\theta_k$. Thus $G_{1,Z_k}=-(\theta_k-\theta_5)$. With $\ell_{Z_k}=M_tm_k\omega_k$ and $\sum_km_k\omega_k=0$, we obtain $\tau=-M_t\sum_km_k\omega_k\theta_k$. (d) follows from (a), (b), and $G(\xi^L,y(\xi))\equiv0$. \end{proof} \begin{lemma}\label{lem:d2theta} At a leading solution with $\tau=0$, $\theta_3=\theta_4$ holds if and only if $\theta$ is constant, if and only if $G_1(y_0)=0$. \end{lemma} \begin{proof} With $a_k=m_k\omega_k\ne0$, $\sum_ka_k=0$ and $\sum_ka_k\theta_k=0$ by Lemma~\ref{lem:d2rot}(c). Hence $a_4(\theta_3-\theta_4)=a_5(\theta_5-\theta_3)$ and $a_4(\theta_4-\theta_5)=a_3(\theta_5-\theta_3)$. The last equivalence is Lemma~\ref{lem:d2rot}(b), (c). \end{proof} \subsection{Simple points}\label{ss:d2simple} \begin{lemma}\label{lem:d2simple} Let $y_0$ be a leading solution with $\tau(y_0)=0$ and $\operatorname{rank}J_0=16$. \begin{enumerate}[label=\textup{(\alph*)}] \item The left kernel of $J_0$ is spanned by $\lambda$ and $l_0=e_{W_1}-e_{W_2}$, and $J_0y_1=-G_1(y_0)$ has exactly one solution $y_1$. \item $y_1$ vanishes on $u_2,p_{12},v_2$; $(y_1)_{p_{jk}}=-p_{jk}(y_1)_{v_k}/(2\omega_k)$ for $j\in\{1,2\}$, $k\in\{3,4\}$, and $(y_1)_{p_{j5}}=0$; and $m_3(y_1)_{v_3}+m_4(y_1)_{v_4}=0$. Write $(y_1)_{v_3}=t/m_3$, $(y_1)_{v_4}=-t/m_4$. \item A series as in Lemma~\ref{lem:d2branch} with $y(0)=y_0$ exists only if \[ \eta_2:=D\tau(y_0)\cdot y_1=\tfrac12M_t\,t\,(\theta_3-\theta_4)=0 . \] \item Suppose that $\theta$ is constant. Then $y_1=0$, and, with $y_2$ the solution of $J_0y_2=-G_2(y_0)$, a series as in \textup{(c)} exists only if \[ \Omega_3:=\lambda\cdot\big(DG_1(y_0)\,y_2+G_3(y_0)\big)=D\tau(y_0)\cdot y_2+\sigma_3(y_0)=0 . \] \end{enumerate} \end{lemma} \begin{proof} (a) $\lambda J_0=0$ by Lemma~\ref{lem:d2rot}(a), and $l_0J_0=0$ because the rows $W_1$, $W_2$ of $G_0$ differ by $(1-v_2)(1-(m_1+m_2)p_{12}^3)$, whose gradient vanishes at a leading solution. The two vectors are independent ($\lambda_{Z_k}=M_tm_k\omega_k\ne0$). Thus they span the left kernel, of dimension $2$. Since $\lambda\cdot G_1=\tau=0$ and $l_0\cdot G_1=0$, a solution $y_1$ exists. It is unique by the rank. (b) The rows $Z_1$, $Z_2$, $D_{12}$ of $G_0$ involve only $u_2,p_{12},v_2$, with an invertible Jacobian there, and zero right side. The rows $D_{jk}$ give the across entries. The row $W_1$ and the identity $m_3W_3+m_4W_4=s_v-M_t\bar v$ of the rows of $G_0$ give $D s_v\cdot y_1=0$. (c) Since $J_0$ is injective, the series is a power series in $T$ with first coefficient $y_1$ (the coefficient of a non-integral power, if any, would be in the kernel of $J_0$). So $\tau(y(T))=T\,D\tau(y_0)y_1+O(T^2)$, which is $O(T^2)$ by Lemma~\ref{lem:d2rot}(d). For the formula: $\tau=\sum_{k=3,4}\ell_{Z_k}G_{1,Z_k}$. By (b), $DG_{1,Z_k}\cdot y_1=\frac{3(y_1)_{v_k}}{2\omega_k}\theta_k$ and $D\omega_k\cdot y_1=(y_1)_{v_k}$. Hence we obtain $D\tau\cdot y_1=M_t\sum_{k=3,4}m_k\big(-(\theta_k-\theta_5)+\frac32\theta_k\big)(y_1)_{v_k}=\frac12M_t\sum_{k=3,4}m_k\theta_k(y_1)_{v_k}$, using $\sum_{k=3,4}m_k(y_1)_{v_k}=0$. (d) Since $G_1(y_0)=0$ by Lemma~\ref{lem:d2theta}, $y_1=0$. The equation at order $T^2$ is solvable because $\lambda\cdot G_2\equiv0$ and $G_2$ vanishes on the rows $W$. At order $T^3$ the equation is $J_0y_3=-(DG_1(y_0)y_2+G_3(y_0))$. Its $l_0$-component vanishes (it is the cross part of $F'_1(v)-F'_2(v)$, a multiple of $\tau$). Its $\lambda$-component is $\Omega_3$. The second expression for $\Omega_3$ is Lemma~\ref{lem:d2rot}(d). \end{proof} \subsection{Triple points}\label{ss:d2triple} \begin{lemma}\label{lem:d2triple} Let $y_0$ be a triple point, $u=\Lambda v$ on the triangle, with $\tau(y_0)=0$. \begin{enumerate}[label=\textup{(\alph*)}] \item $\ker J_0=\C\,\kappa$, where $\kappa$ has $\delta v=(1,-m_3/m_4)$ on $(v_3,v_4)$, $\delta u=-\Lambda\,\delta v$ on the triangle, $\delta p_{kl}=0$ on the triangle, $0$ on $u_2,p_{12},v_2$, and across entries as in Lemma~\ref{lem:d2simple}(b). So $\operatorname{rank}J_0=15$. The rows $R$ other than $Z_3,Z_4,W_2$ and the columns other than $v_3$ give an invertible $15\times15$ minor. \item A series as in Lemma~\ref{lem:d2branch} with $y(0)=y_0$ exists only if $\theta$ is constant. \item Every triple point has the equilateral shape of $\omega$, so constant $\theta$ forces $m_3=m_4=m_5$. Then, if $\tau=0$, $\sigma$ is constant \textup{(}Lemma~\ref{lem:d2equi}(c)\textup{)}. Let $y_0$ have $\theta$ and $\sigma$ constant, let $y(T,s)$ solve the rows $R$ with $y_{v_3}=v_3+s$, and put $f_3(T,s)=Z_3(T,y(T,s))$ and $F(T,s)=\tau(y(T,s))+T^2\sigma_3(y(T,s))$. Then $f_3=b_3sT+O(|(T,s)|^3)$ and $F=F_{ss}s^2+F_{sT}sT+F_{TT}T^2+O(|(T,s)|^3)$, with $b_3=\frac{3\theta_3}{2\omega_3}$, $F_{ss}=-\frac38M_tm_1(1+\sigma\jj_\rho\rho)\,c\sum_km_k(\delta\omega_k)^2/\omega_k$ \textup{(}$c=p_{1k}/\omega_k$, $\delta\omega=(1,-m_3/m_4,0)$\textup{)}, and $F_{TT}$ the value of \eqref{eq:Omega3} below. A series as above exists only if $b_3F_{ss}F_{TT}=0$. \end{enumerate} \end{lemma} \begin{proof} (a) For $J_0x=0$, (b) of Lemma~\ref{lem:d2simple} holds with zero right sides. At a Lagrange triangle the triangle rows of $J_0$ involve only $\delta P_{kl}$, $P=p^3$, and read $\sum_lm_lu_{kl}\delta P_{kl}=0=\sum_lm_lv_{kl}\delta P_{kl}$. For $u=\Lambda v$ they coincide and force $\delta P=\kappa'\,\delta^0$ with $\delta^0=(m_5v_{35}v_{45},-m_4v_{34}v_{45},m_3v_{34}v_{35})$ on $(34,35,45)$. The rows $D_{kl}$, times $\Lambda v_{kl}$, read $\delta u_{kl}+\Lambda\delta v_{kl}=-\frac23M_t\kappa'\Lambda v_{kl}\delta^0_{kl}$. When we sum over the cycle of the three sides, the left sides cancel and the right side is $\pm\frac23M_t\kappa'\Lambda M_tv_{34}v_{35}v_{45}$. Hence $\kappa'=0$, $\delta u=-\Lambda\delta v$, and the row $W_1$ gives $m_3\delta v_3+m_4\delta v_4=0$. The left kernel of $J_0$ is spanned by $l_0=e_{W_1}-e_{W_2}$, $e_{Z_3}-\Lambda e_{W_3}$ and $e_{Z_4}-\Lambda e_{W_4}$, since $Z_k=\Lambda W_k$ as rows of $J_0$. Removing one row from the support of each and the column $v_3$, where $\kappa$ does not vanish, leaves an invertible minor. (b) The rows $R$ have a solution $y(T,s)$ with $y_{v_3}=v_3+s$ and no $T^1$ term, since $G_1$ lives on $Z_3,Z_4$. A series gives $s(T)\to0$ with $y=y(T,s(T))$. Here $y(T,s)=y_0+s\kappa+O(s^2+T^2)$. The proof of Lemma~\ref{lem:d2simple}(c) applied to $\kappa$ gives $D\tau\cdot\kappa=\frac12M_tm_3(\theta_3-\theta_4)$. If $\theta_3\ne\theta_4$, Lemma~\ref{lem:d2rot}(d) forces $s(T)=O(T^2)$, and then the rows $Z_3,Z_4$ give $G_1(y_0)=0$, that is $\theta$ constant (Lemma~\ref{lem:d2theta}), a contradiction. (c) The rows $Z_3$ and $\tau$ restricted to $y(T,s)$ satisfy $\ell_{Z_3}f_3+\ell_{Z_4}f_4=TF$. Hence a series gives a curve germ on which $f_3=F=0$. The coefficient of $T$ in $f_3$ is $G_{1,Z_3}(y_0)=0$. That of $T^2$ vanishes because $Z_3=\Lambda W_3$ as rows of $J_0$ and $G_2$ vanishes on $W_3$. That of $s^2$ vanishes because along $\kappa$, $\delta P=0$ and the rows are bilinear in $(P,h)$. The coefficient of $sT$ is $b_3=DG_{1,Z_3}\cdot\kappa$. At $T=0$ the across rows hold exactly and $F(0,s)=-M_tm_1(1+\sigma\jj_\rho\rho)\sum_km_kp_{1k}$, whose first-order terms are multiples of $\sum_km_k\delta\omega_k=0$, which gives $F_{ss}$. The number $F_{TT}$ is the coefficient of $T^2$ in $F(T,0)$, computed as in Lemma~\ref{lem:d2omega3}. The tangent of the germ is a common zero of the quadratic parts. The equation $b_3sT=0$ leaves the two axes, which are excluded by $F_{TT}\ne0$ and $F_{ss}\ne0$. \end{proof} \subsection{The order-three obstruction and the equilateral realizations}\label{ss:d2equi} \begin{lemma}\label{lem:d2omega3} In Lemma~\ref{lem:d2simple}(d) let $\sigma$ be constant, let $A=p_{1k}^3$ \textup{(}independent of $k$\textup{)} and $J_{uv}=\sum_km_k\omega_k(u_k-u_{\mathrm{cm}})$, $u_{\mathrm{cm}}=\sum_km_ku_k/M_t$. Then $\sigma_3(y_0)=0$ and \begin{equation}\label{eq:Omega3} \Omega_3=\tfrac32M_tm_1A\Big[(1-\sigma\rho^2\jj_\rho)\,J_{uv}+\frac{M_t\rho^2m_1p_{12}(1-\sigma\jj_\rho)}{1+\rho}\Big]. \end{equation} For a triangle of Lagrange type, $J_{uv}=M_t^{-1/3}\sum_{k0$ and either labelling of the segment, no leading solution with $\tau=0$ whose triangle has an equilateral $\omega$ satisfies \textup{(i)}--\textup{(iv)} of Lemma~\ref{lem:d2gate}. \begin{enumerate}[label=\textup{(\alph*)}] \item At $m_3=m_4=m_5$ and constant $\sigma$, the Lagrange realization of the equilateral shape is simple with $\theta$ constant, and with $m_1=1$ and unit triangle masses, $\Omega_3=\mp\frac92\big[3^{2/3}\xi(1-i\sigma\rho^{5/2})+3\zeta_{12}\rho^2(1+\rho)^{-4/3}(1-i\sigma\rho^{1/2})\big]$ with $\xi,\zeta_{12}$ cube roots of unity, and $|\Omega_3|\ge\frac92\,3^{2/3}(1-0.909)>0.85$. \item At $m_3=m_4=m_5$ and constant $\sigma$, the triple realization has $J_{uv}=0$, $F_{TT}=\mp\frac{27}2\rho^2(1+\rho)^{-4/3}\zeta_{12}(1-i\sigma\sqrt\rho)\ne0$, $F_{ss}=\mp\frac98(1+\sigma\jj_\rho\rho)\ne0$ and $b_3=\pm\frac32(1+\sigma\jj_\rho\rho)e^{-i\pi/3}\ne0$. \item At $m_3=m_4=m_5$ and nonconstant $\sigma$, the equilateral realizations have $\tau\ne0$. \item At unequal triangle masses, $\theta$ is not constant, the Lagrange realization is simple with $\eta_2\ne0$, and the triple realization is excluded by Lemma~\ref{lem:d2triple}(b). \end{enumerate} \end{lemma} \begin{proof} By Lemma~\ref{lem:d2lag}(a), a triangle of Lagrange type is equilateral only in the classes with equal or distinct cube roots, and in the second case $y_0$ is a triple point. By Lemma~\ref{lem:d2euler}(c), a triangle of Euler type is equilateral only at a triple point. So the triangles with an equilateral $\omega$ are those of the Lagrange realization of the class with equal cube roots and those of the triple points, and (a)--(d) treat all of them. (a) At equal masses $\omega=(e^{i\pi/3},e^{-i\pi/3},-1)$ and $p_{1k}=\pm\omega_k$ for the signs $\epsilon=\pm(1,1,-1)$ of the square roots. So $\theta$ is constant and, for constant $\sigma$, $\tau=0$. Inserting the equilateral data into \eqref{eq:Omega3}, we obtain the formula. With $s=\sqrt\rho$, the ratio of the moduli of the two terms is $r(s)=3^{1/3}s^4(1+s^2)^{-5/6}(1+s^{10})^{-1/2}$. Then $r^2\le(9/256)^{1/3}s^{4/3}\le(9/16)^{1/3}<0.826$ for $s\le2$ (by the inequality between the arithmetic and geometric means), $r^2\le3^{2/3}s^{-16/3}<0.06$ for $s\ge2$. Hence $r<0.909$ and $|\Omega_3|\ge\frac92\,3^{2/3}(1+s^{10})^{1/2}(1-r)$. (b) For the class with distinct cube roots, $J_{uv}=3^{-1/3}(1+\varpi+\varpi^2)=0$ with $\varpi=e^{2\pi i/3}$. The formulas of Lemma~\ref{lem:d2triple}(c) give the values, with $\sum_k(\delta\omega_k)^2/\omega_k=e^{-i\pi/3}+e^{i\pi/3}=1$. Lemma~\ref{lem:d2triple}(c) excludes a series. (c) The numbers $q_k=\epsilon_k(-1/\omega_k)^{1/2}$ are sixth roots of unity. With $1+\sigma_k\jj_\rho\rho$ proportional to $e^{i\sigma_k\varphi}$, $\tan\varphi=\rho^{3/2}$, zero torque reads $e^{i\varphi}\sum_{k\ne o}q_k+e^{-i\varphi}q_o=0$ for the body $o$ of the other sign, which forces $|\sum_{k\ne o}q_k|=1$. We enumerate the twelve cases and obtain $e^{2i\varphi}=\pm1$, i.e.\ $\varphi\in\{0,\pi/2\}$, impossible for $\rho>0$. (d) Equal moduli $|\omega_k|$ would make the centre of mass of the triangle its circumcentre, which for an equilateral triangle is the centroid. Then the masses would be equal. Hence $\theta$ is not constant. The Lagrange realization of the class with equal cube roots is not a triple point. At a Lagrange triangle that is not a triple point the triangle block of $J_0$ has rank $6$. Hence the realization is simple. On the triangle, $\delta P$ in the solution $y_1$ is a multiple of $(m_5v_{35}v_{45},-m_4v_{34}v_{45},m_3v_{34}v_{35})$ with a factor proportional to $\theta_3-\sum_km_k\theta_k/M_t$. The rows $D_{kl}$ give $t$ as a nonzero multiple of this factor times $m_5r_{34}+m_4r_{35}+m_3r_{45}$, $r_{kl}=u_{kl}/v_{kl}$. In this class $r_{kl}$ is proportional to $1/v_{kl}^2$. Thus the last sum is proportional to $m_3+m_4\bar\varpi+m_5\varpi$, which vanishes only at equal masses. So $t\ne0$, $\theta_3\ne\theta_4$ (Lemma~\ref{lem:d2theta}), and $\eta_2\ne0$. \end{proof} \begin{proof}[Proof of Lemma~\ref{lem:d2gate}] Let $y_0=y(0)$ for the series of Lemma~\ref{lem:d2branch}. By Lemma~\ref{lem:d2rot}(d), $\tau(y_0)=0$. If $\operatorname{rank}J_0=16$, Lemma~\ref{lem:d2simple}(c) gives $\eta_2=0$, which is (i) if $\theta$ is not constant. If $\operatorname{rank}J_0=16$ and $\theta$ is constant, Lemma~\ref{lem:d2simple}(d) gives $\Omega_3=0$, which is (ii). If $\operatorname{rank}J_0\le15$ and $y_0$ is a triple point, Lemma~\ref{lem:d2triple}(b) and (c) give (iii). Otherwise (iv) holds. The last statement of Lemma~\ref{lem:d2gate} is Lemma~\ref{lem:d2equi}. \end{proof} \subsection{The obstruction on the set $\tau=0$}\label{ss:d2closed} In the rest of this appendix $y_0$ is a leading solution with $\tau(y_0)=0$, and $P_{kl}=p_{kl}^3$ for $k,l\in\{3,4,5\}$. On $\C^{\{3,4,5\}}$ we use the nondegenerate symmetric bilinear form $\langle a,b\rangle=\sum_km_ka_kb_k$, the vector $\one=(1,1,1)$, the mean $\bar\theta=\langle\one,\theta\rangle/M_t$ and the vector \[ e_3=\Big(\frac{v_{45}}{m_3},\frac{v_{53}}{m_4},\frac{v_{34}}{m_5}\Big). \] Then $\langle\one,e_3\rangle=v_{45}+v_{53}+v_{34}=0$ and $\langle\omega,e_3\rangle=v_3v_{45}+v_4v_{53}+v_5v_{34}=0$. \begin{lemma}\label{lem:d2forcing} There is a number $\gamma$ with $\theta-\bar\theta\one=\gamma e_3$. Moreover $\theta_3-\theta_4=-\gamma M_t\omega_5/(m_3m_4)$, and $\gamma=0$ if and only if $\theta$ is constant. \end{lemma} \begin{proof} By Lemma~\ref{lem:d2rot}(c), $\langle\omega,\theta\rangle=\sum_k\tau_k=-\tau/M_t=0$. So $\psi=\theta-\bar\theta\one$ satisfies $\langle\one,\psi\rangle=\langle\omega,\psi\rangle=0$. Since $\langle\one,\omega\rangle=0$ and $\omega_5=-1$, $\omega$ is not a multiple of $\one$. Hence these two conditions define a line. It contains $e_3\ne0$. The formula for $\theta_3-\theta_4$ follows from $m_4v_{45}-m_3v_{53}=m_3\omega_3+m_4\omega_4-(m_3+m_4)\omega_5=-M_t\omega_5$. Finally $\gamma=0$ if and only if $\psi=0$. \end{proof} \begin{theorem}\label{thm:d2closed} \begin{enumerate}[label=\textup{(\alph*)}] \item Let the triangle be of Lagrange type, and let $y_0$ not be a triple point. Put $r_{kl}=u_{kl}/v_{kl}$, $\beta=m_5r_{34}+m_4r_{35}+m_3r_{45}$, $\Delta=u_{34}v_{35}-u_{35}v_{34}$ and $d_r=(r_{34}-r_{35})/m_3+(r_{34}-r_{45})/m_4$. Then $\Delta\ne0$, $d_r\ne0$, $y_0$ is simple, and \[ \eta_2=-\gamma^2\,\frac{M_t^3\,\omega_5\,v_{34}v_{35}v_{45}\,\beta}{3\,\Delta\,d_r\,m_3^2m_4^2m_5}. \] \item Let the triangle be of Euler type, $u=\Lambda v$, with $\langle\omega,\omega\rangle\ne0$, and put $\mu=\sum_{k1$ we write $\eta=a+bi$. Then $\eta+1/\eta=\varpi-2$ gives $a(1+t^{-1})=-\frac52$ and $b(1-t^{-1})=\frac{\sqrt3}2$, and $a^2+b^2=t$ becomes $t^4-7t^3+9t^2-7t+1=0$. So $t+t^{-1}$ is a root of $s^2-7s+7$. It is $(7+\sqrt{21})/2$, since the other root is less than $2$. Thus $(m_3:m_4:m_5)=(5t/(t+1):t:1)=(Y_L:1:X_L)$ with $X_L=1/t$ and $Y_L=5/(t+1)$. (c) If $\theta$ is constant, the moduli $|\omega_k|$ are equal (\S\ref{ss:d2torque}). Then the centre of mass of the triangle $v_3,v_4,v_5$ in $\C=\R^2$ is its circumcentre. With positive masses it lies inside the triangle, which is therefore acute. This contradicts (a). \end{proof} \subsection{Triangles of Euler type}\label{ss:d2euler} Let the triangle be of Euler type, $u=\Lambda v$. From $p_{kl}^2u_{kl}v_{kl}=1$ we get $p_{kl}=s_{kl}\Lambda^{-1/2}/v_{kl}$ for a fixed square root $\Lambda^{-1/2}$ and signs $s_{kl}=-s_{lk}$. So $P_{kl}=s_{kl}\Lambda^{-3/2}/v_{kl}^3$, and the rows of $v$ in Lemma~\ref{lem:d2lead} become $\omega=\Lambda^{-3/2}g$ with $g_k=\sum_{l\ne k}m_ls_{kl}/v_{kl}^2$. We multiply the triangle masses by $c>0$, the $v_k$ by $\alpha\ne0$, $u$ by $c^{2/3}\alpha^{-1}$ and the $p_{kl}$ by $c^{-1/3}$. This maps the central configurations of the triangle to central configurations. It does not change $\chi=v_3/v_4$, $\mu$, the relations $\omega_k^3=\omega_l^3$ and $m_o^2=m_k^2-m_km_l+m_l^2$, and the T-test of \S\ref{ss:d2proof}. It multiplies $\omega$, $\langle\omega,\omega\rangle$ and $\langle e_3,e_3\rangle$ by nonzero numbers. In this subsection we may therefore take $(m_3,m_4,m_5)=(X,Y,1)$ with $X,Y>0$ and $(v_3,v_4,v_5)=(\chi,1,0)$. Then $M_t=X+Y+1$ and $M_t\omega=(\tilde\omega_3,\tilde\omega_4,\tilde\omega_5)$ with \[ \tilde\omega_3=(Y+1)\chi-Y,\qquad\tilde\omega_4=X+1-X\chi,\qquad\tilde\omega_5=-(X\chi+Y). \] \begin{lemma}\label{lem:d2euler} \begin{enumerate}[label=\textup{(\alph*)}] \item $\chi$ is a root of the quintic \[ \mathcal E_s(\chi)=s_{45}\tilde\omega_3\chi^2(\chi-1)^2+s_{53}\tilde\omega_4(\chi-1)^2+s_{34}\tilde\omega_5\chi^2,\qquad s=(s_{45},s_{53},s_{34}), \] whose leading coefficient is $s_{45}(Y+1)$. Since $\mathcal E_{-s}=-\mathcal E_s$, it suffices to take $s$ among the \emph{patterns} $p_1=(1,1,-1)$, $p_2=(1,-1,1)$, $p_3=(-1,1,1)$ and $p_4=(1,1,1)$. \item $\mathcal E_{p_4}=(\chi^2-\chi+1)\,C$ with a cubic $C$. If $s=\pm p_4$ and $\chi$ is a root of $\chi^2-\chi+1$, then $y_0$ is a triple point. \item $\mathcal E_{p_1}(e^{i\pi/3})=-2X-Y+i\sqrt3Y$, $\mathcal E_{p_2}(e^{i\pi/3})=2X+1+i\sqrt3$ and $\mathcal E_{p_3}(e^{i\pi/3})=Y-1-i\sqrt3(Y+1)$. Hence a triangle of Euler type is equilateral only if $y_0$ is a triple point. \end{enumerate} \end{lemma} \begin{proof} (a) Since $\omega=\Lambda^{-3/2}g$, we have $\omega_4g_5-\omega_5g_4=0$. The identity $M_t\chi^2(\chi-1)^2(\omega_4g_5-\omega_5g_4)=X\mathcal E_s(\chi)$ holds in $\Z[\chi,X,Y]$. (b) At $\chi=e^{\pm i\pi/3}$ we have $v_{34}^3=v_{45}^3=v_{53}^3=1$. For $s=\pm p_4$ all $P_{kl}$ are then equal. Since $\Psi\omega=\omega$, they equal $1/M_t$, and the triangle is also of Lagrange type. (c) The values are exact. Their imaginary parts do not vanish for $X,Y>0$, and $\mathcal E_s$ has real coefficients. The equilateral shapes are $\chi=e^{\pm i\pi/3}$. \end{proof} We put $\nu=\sum_{k0$: \begin{enumerate}[label=(\arabic*)] \item a polynomial with positive coefficients; \item $X^2-X+1$, $Y^2-Y+1$ or $X^2\pm XY+Y^2$, which are positive; \item $q_1=8X^2+9XY+8Y^2-5X-5Y+1=\frac{25}4(X+Y-\frac25)^2+\frac74(X-Y)^2$, zero only at $(\frac15,\frac15)$, and $q_2=Y^2q_1(X/Y,1/Y)$ and $q_3=X^2q_1(1/X,Y/X)$, zero only at $(1,5)$ and $(5,1)$; \item the octic $P_1$ below, positive except at $(X_*,X_*)$, and $P_2=Y^8P_1(X/Y,1/Y)$ and $P_3=X^8P_1(1/X,Y/X)$, positive except at $(1,2+2\sqrt2)$ and $(2+2\sqrt2,1)$; \item $X-1$, $Y-1$ or $X-Y$. \end{enumerate} All factors of the resultants of $f_\omega$ and $f_e$ are of kind (1). Lemma~\ref{lem:d2res} gives the first statement. If $\mu=0$, the three resultants of the $f_{0,k}$ vanish at $(X,Y)$, again by Lemma~\ref{lem:d2res}. For $s=p_i$, $i\le3$, one of them has no factor of kind (5), and its only zero in the quadrant is the zero of $q_i$. For $s=p_4$ they are $Y-1$, $X-1$ and $X-Y$ times factors of kind (1). The case $\mu=-\frac12$ is the same, with $f_{h,k}$ and $P_i$ in place of $f_{0,k}$ and $q_i$. \end{proof} The octic is $P_1=\Res_\chi(\mathcal E_{p_1},\partial_\chi\mathcal E_{p_1})/(Y+1)$, a symmetric polynomial with $38$ terms and degree $6$ in each variable. We show that $P_1>0$ on the open quadrant except at $(X_*,X_*)$. Put $H_0(s)=s(17s+24)^3(s^2+2s-1)^2/16$, which is positive for $s>0$ except at $s=\sqrt2-1$. Then $K=(P_1-H_0(X+Y))/(X-Y)^2$ is a polynomial. The Bernstein coefficients of $K$ on the box $[\frac{43}{213},\frac{45}{211}]^2$, computed exactly, are positive. So $P_1\ge0$ on this box, with equality only at $(X_*,X_*)$. We substitute $X=x/(1-x)$ and $Y=y/(1-y)$. The square $[0,1]^2$ minus the image $[\frac{43}{256},\frac{45}{256}]^2$ of the box is tiled by $39$ dyadic boxes. On each of them the Bernstein coefficients of $(1-x)^6(1-y)^6P_1$, of bidegree $(6,6)$ and computed exactly, are nonnegative. Moreover, on each of these boxes every corner other than $(0,0)$ and $(1,1)$ carries a positive coefficient, and so does every edge. Hence this polynomial is positive on each of these boxes, except possibly at $(0,0)$ and $(1,1)$, which are not images of points of the open quadrant. \begin{lemma}\label{lem:d2thetaconst} Let $\theta$ be constant, and let the triangle not be equilateral. Then $\sigma$ is not constant. Let $o$ be the body of the triangle whose sign differs from those of the other two, $k$ and $l$. Then $\omega_k^3=\omega_l^3$, $\omega_k\ne\omega_l$, and $m_o^2=m_k^2-m_km_l+m_l^2$. \end{lemma} \begin{proof} For $\sigma_k=\sigma_l$, $\theta_k=\theta_l$ gives $p_{1k}/\omega_k=p_{1l}/\omega_l$, since $1+\sigma_k\jj_\rho\rho\ne0$. Squaring and inserting $p_{1k}^2=-1/\omega_k$ gives $\omega_k^3=\omega_l^3$, and $\omega_k\ne\omega_l$ since $v_k\ne v_l$. If $\sigma$ is constant, this holds for all three pairs, so that $\omega_3,\omega_4,\omega_5$ are $\omega_5$ times the three cube roots of unity and the triangle is equilateral. Hence $\sigma$ is not constant, and $\omega_k=\zeta\omega_l$ with $\zeta\in\{\varpi,\varpi^2\}$. From $\sum_jm_j\omega_j=0$ we get $m_o\omega_o=-(m_k\zeta+m_l)\omega_l$. Since $|\omega_o|=|\omega_l|$ (\S\ref{ss:d2torque}), $m_o=|m_k\zeta+m_l|$, and $m_o^2=m_k^2-m_km_l+m_l^2$. \end{proof} \begin{proposition}\label{prop:d2thetaeuler} For each pattern $s$ and each $o\in\{3,4,5\}$, with $\{k,l\}$ the other two bodies, $\mathcal E_s$ \textup{(}$C$ for $s=p_4$\textup{)} and $\Theta_{kl}$ have no common root at any point $(X,Y)$ with $X,Y>0$ of the conic $m_o^2=m_k^2-m_km_l+m_l^2$. \end{proposition} \begin{proof} We compute $R=\Res_\chi(\mathcal E_s,\Theta_{kl})$ exactly and parametrize the conic by rational functions of $t$. For $o=5$, for instance, $X=(t^2-1)/(t^2-t+1)$ and $Y=t(t-2)/(t^2-t+1)$, and $X,Y>0$ exactly for $t<-1$ or $t>2$. The parameter $t=\infty$ gives $(X,Y)=(1,1)$ on all three conics, and there $R=2916$ for $s=p_1,p_2,p_3$ and $R=729$ for $s=p_4$. For each of the $12$ pairs $(s,o)$, $R$ composed with the parametrization has no real root in the range of $t$ where $X,Y>0$, by exact real root isolation, and again by Sturm sequences. Lemma~\ref{lem:d2res} concludes. \end{proof} \subsection{Proof of Theorem~\ref{thm:gate}}\label{ss:d2proof} \begin{lemma}\label{lem:d2reduce} Let the triangle of $y_0$ not be equilateral, and let $y_0$ satisfy one of \textup{(i)}--\textup{(iv)} of Lemma~\ref{lem:d2gate}. Then one of the following holds: \begin{enumerate}[leftmargin=3.2em,labelwidth=2.7em,labelsep=0.5em,align=left] \item[\textup{(L)}] the triangle is of Lagrange type with exactly two equal $\zeta_{kl}$, and $\beta=0$; \item[\textup{(EI)}] it is of Euler type with $\langle\omega,\omega\rangle=0$; \item[\textup{(EQ)}] it is of Euler type with $\langle e_3,e_3\rangle=0$; \item[\textup{(E0)}] it is of Euler type with $\mu=0$; \item[\textup{(Eh)}] it is of Euler type with $\mu=-\frac12$; \item[\textup{($\Theta$)}] $\theta$ is constant. \end{enumerate} \end{lemma} \begin{proof} Triple points have an equilateral $\omega$ (\S\ref{ss:d2torque}). So $y_0$ is not a triple point, and (iii) does not hold. If the triangle is of Lagrange type, exactly two of the $\zeta_{kl}$ are equal, by Lemma~\ref{lem:d2lag}(a). If it is of Euler type with $\langle\omega,\omega\rangle=0$, (EI) holds. So we may assume $\langle\omega,\omega\rangle\ne0$ for the Euler type. Then $\mu\ne1$ by Theorem~\ref{thm:d2closed}(b). In case (ii), ($\Theta$) holds. In case (iv), $y_0$ is not simple. So Theorem~\ref{thm:d2closed} excludes the Lagrange type, and it gives $\mu=-\frac12$ for the Euler type. In case (i), $\gamma\ne0$ by Lemma~\ref{lem:d2forcing}, and $\eta_2=0$. For the Lagrange type, Theorem~\ref{thm:d2closed}(a) gives $\beta=0$, since $M_t$, $\omega_5$, $\Delta$, $d_r$, the masses and the $v_{kl}$ are nonzero. For the Euler type with $\mu=-\frac12$, (Eh) holds. Otherwise Theorem~\ref{thm:d2closed}(b) gives $\mu\langle e_3,e_3\rangle=0$, since $\Lambda$ is finite and nonzero. \end{proof} For $k\in\{3,4,5\}$ put $T_k=m_k|\omega_k|^{-1/2}$. We say that $y_0$ passes the \emph{T-test} if $T_k>\sum_{l\ne k}T_l$ for some $k$. Since $|p_{1k}|=|\omega_k|^{-1/2}$ and $|m_1+\sigma_k\jj_\rho m_2|^2=m_1^2(1+\rho^3)$, we have $|\tau_k|=m_1(1+\rho^3)^{1/2}T_k$. Hence the T-test gives $|\sum_k\tau_k|\ge|\tau_k|-\sum_{l\ne k}|\tau_l|>0$, so that $\tau=-M_t\sum_k\tau_k\ne0$. The T-test depends only on the masses of the triangle and on $\omega$. So it excludes $\tau=0$ for every $\sigma$, every $\rho>0$ and either labelling of the segment. \begin{table}[ht] \centering \small \begin{tabular}{@{}lllll@{}} \toprule condition & pattern & $(m_3:m_4:m_5)$ & factor of $\mathcal E_s$ & margin\\ \midrule (E0) & $p_1$ & $(1:1:5)$ & $\chi^2-\frac32\chi+1$ & $0.6157$\\ & $p_2$ & $(1:5:1)$ & $\chi^2-\frac12\chi+\frac12$ & $0.6157$\\ & $p_3$ & $(5:1:1)$ & $\chi^2-\chi+2$ & $0.6157$\\ (Eh) & $p_1$ & $(1:1:2+2\sqrt2)$ & $(\chi^2+(\sqrt2-3)\chi+1)^2$ & $0.5961$\\ & $p_2$ & $(1:2+2\sqrt2:1)$ & $(\chi^2+(1-\sqrt2)\chi-1+\sqrt2)^2$ & $0.5961$\\ & $p_3$ & $(2+2\sqrt2:1:1)$ & $(\chi^2-\chi+1+\sqrt2)^2$ & $0.5961$\\ (L) & & permutations of $(X_L:Y_L:1)$ & two conjugate shapes at each & $0.2768$\\ \bottomrule \end{tabular} \caption{The triangles at which (E0), (Eh) or (L) of Lemma~\ref{lem:d2reduce} can hold, in the frame of \S\ref{ss:d2euler}. The last column gives the margin $(T_k-\sum_{l\ne k}T_l)/\sum_lT_l$ of the T-test for the heaviest body $k$.}\label{tab:d2gate} \end{table} \begin{proof}[Proof of Theorem~\ref{thm:gate}] Let the triangle of $y_0$ not be equilateral, and let $y_0$ satisfy one of (i)--(iv). By Lemma~\ref{lem:d2reduce}, one of (L), (EI), (EQ), (E0), (Eh), ($\Theta$) holds. We show that ($\Theta$), (EI) and (EQ) do not hold and that in the other cases $y_0$ passes the T-test, which contradicts $\tau(y_0)=0$. Case ($\Theta$) is excluded for the Lagrange type by Lemma~\ref{lem:d2lag}(c). For the Euler type, Lemma~\ref{lem:d2thetaconst} puts $(X,Y)$ on a conic $m_o^2=m_k^2-m_km_l+m_l^2$ and makes $\Theta_{kl}$ vanish at $\chi$, which Proposition~\ref{prop:d2thetaeuler} excludes. Proposition~\ref{prop:d2loci} excludes (EI) and (EQ). In case (E0) or (Eh), Proposition~\ref{prop:d2loci} puts the masses, up to a common factor, at a point of Table~\ref{tab:d2gate} or at $(1:1:1)$ for $s=p_4$. At $(1:1:1)$, $C=2(\chi-2)(\chi-\frac12)(\chi+1)$. At its roots $\omega_4$, $\omega_3$, $\omega_5$ vanish, which is impossible at a leading solution. At the other points we factor $\mathcal E_s$ exactly over $\Q(\sqrt2)$. On every irreducible factor other than the one of the table, some $f_{0,k}$, resp.\ $f_{h,k}$, has a nonzero remainder. So $\chi$ is a root of the factor of the table. In case (L), Lemma~\ref{lem:d2lag}(b) puts the masses, up to a common factor, at a permutation of $(X_L,Y_L,1)$. At each of these six points, ball arithmetic shows $\beta\ne0$ at ten of the twelve shapes of the classes with exactly two equal $\zeta_{kl}$. The other two are the shapes of the table. At every shape of the table we enclose the roots and the margins of the T-test in ball arithmetic. The margins are those of the table, and they are positive. \end{proof}