\section{Diagram 2 does not occur}\label{sec:nod2}\label{ss:nod2} In this section we prove that no singular place has diagram~$2$, at any positive mass (Proposition~\ref{prop:nod2}), so that the pieces $\pc{d2}[T]$ may be left out of every certificate (\S\ref{ss:certs}). A place of diagram~$2$ forces the torque of its triangle to vanish at leading order. For a triangle that is not equilateral, closed forms of the first obstructions leave twelve mass vectors of the triangle, at which an inequality, the T-test of Theorem~\ref{thm:gate}, shows that the torque cannot vanish; equilateral triangles are excluded directly (Lemma~\ref{lem:d2gate}). We prove Lemma~\ref{lem:d2gate} and Theorem~\ref{thm:gate}, which carry this argument, in Appendix~\ref{app:d2}. The proof uses no result of \S\S\ref{sec:strata}--\ref{sec:curves}. Let $T=\{a0})^5$, and let $C\subseteq Y_m$ be an irreducible curve on which some $r_{kl}^2$ is not constant and $U\not\equiv0$. No singular place of $C$ has diagram $2$. Consequently Theorem~\ref{thm:types} holds with the pieces $\pc{d2}[T]$ removed from $\mathrm{pieces}(S(m))$. \end{proposition} \emph{Leading solutions.} At a singular place of diagram $2$ with triangle $T$, after a relabelling that puts the segment at the bodies $\{d,e\}$ and the triangle at $T$, the leading coefficients form a \emph{leading solution} $y_0$: a complex central configuration $\omega$ of the triangle (of Euler or Lagrange type, possibly complex), a sign vector $\sigma\in\{\pm1\}^T$, the ratio of the segment masses, and the coefficients of the cross distances determined by them. The leading system forces the \emph{torque} $\tau(y_0)$, a linear combination of the cross coefficients, to vanish. Let $\theta_k$, $k\in T$, be the cross coefficients normalized by the triangle positions, and call $\theta$ \emph{constant} if $\theta_a=\theta_b=\theta_c$. The leading solution is \emph{simple} if the Jacobian $J_0$ of the leading system at $y_0$ has rank $16$, and a \emph{triple point} if the triangle parts of $u$ and $v$ are proportional. Triple points have rank $15$. Appendix~\ref{app:d2} gives the definitions in full. \begin{lemma}\label{lem:d2gate} At a singular place of diagram $2$ with triangle $T$ the leading solution $y_0$ has $\tau(y_0)=0$, and one of the following holds: \begin{enumerate}[label=\textup{(\roman*)}] \item $y_0$ is simple, $\theta$ is not constant, and the obstruction $\eta_2$ of the second order vanishes; \item $y_0$ is simple, $\theta$ is constant, and the obstruction $\Omega_3$ of the third order vanishes; \item $y_0$ is a triple point, $\theta$ and $\sigma$ are constant, and the product $b_3F_{ss}F_{TT}$ of the coefficients of the quadratic terms of its Lyapunov--Schmidt reduction vanishes; \item $\operatorname{rank}J_0\le15$ and $y_0$ is not a triple point. \end{enumerate} No leading solution whose triangle is equilateral satisfies \textup{(i)}--\textup{(iv)}, at any positive masses. \end{lemma} \begin{proof}[Outline] We give the proof in Appendix~\ref{app:d2}. A left null vector of $J_0$ applied to the rows gives $T\tau+T^3\sigma_3$ in the local parameter $T$, whence $\tau(y_0)=0$. At a simple $y_0$ the first-order correction $y_1$ is unique. There the coefficient of $T^2$ gives $\eta_2=D\tau(y_0)\cdot y_1=0$. Here $\eta_2$ is a nonzero multiple of $(\theta_a-\theta_b)(\theta_a-\theta_c)\,w$, where $w$ is a response of the triangle block of $J_0$. It vanishes identically when $\theta$ is constant, in which case $y_1=0$ and the first coefficient that can be nonzero is $\Omega_3$, at $T^3$. At a triple point the rank is $15$ and the expansion forces $\theta$ to be constant. There the linear terms vanish after the reduction to the kernel, and the quadratic coefficients must satisfy $b_3F_{ss}F_{TT}=0$. For an equilateral triangle: \begin{itemize} \item at equal masses and constant $\sigma$, $|\Omega_3|\ge0.853$ for the Lagrange realization, and $b_3$, $F_{ss}$, $F_{TT}$ are nonzero for the triple realization; \item at equal masses and nonconstant $\sigma$ the torque does not vanish; \item at unequal masses $\theta$ is not constant and $\eta_2\ne0$ for the Lagrange realization, while the triple realization is excluded because $\theta$ would have to be constant.\qedhere \end{itemize} \end{proof} The last statement of Lemma~\ref{lem:d2gate} excludes the equilateral triangles. The following theorem excludes all other triangles. \begin{theorem}\label{thm:gate} For every positive mass vector, every $\sigma$, every $\rho>0$ and either labelling of the segment, no leading solution with $\tau=0$ whose triangle is not equilateral satisfies \textup{(i)}--\textup{(iv)} of Lemma~\ref{lem:d2gate}. \end{theorem} \begin{proof}[Outline] We give the proof in Appendix~\ref{app:d2}. On the set $\tau=0$ the obstruction $\eta_2$ factors as $\gamma^2H$. Here $\gamma$ vanishes if and only if $\theta$ is constant, and $H$ depends only on the central configuration of the triangle (Theorem~\ref{thm:d2closed}). Hence (i)--(iv) at a triangle that is not equilateral force constant $\theta$ or one of a few conditions on the triangle alone (Lemma~\ref{lem:d2reduce}). We show that $\theta$ is not constant. We write the triangles of Euler type as the roots of quintics whose coefficients are polynomials in the mass ratios, and we eliminate the shape by resultants. Up to a common factor, the conditions then hold only at twelve mass vectors of the triangle: the permutations of $(1,1,5)$ and $(1,1,2+2\sqrt2)$ for the Euler type, and those of a vector $(X_L,Y_L,1)$ for the Lagrange type. At each of these triangles the \emph{T-test} holds: some $k\in T$ has $m_k|\omega_k|^{-1/2}>\sum_{l\in T\setminus k}m_l|\omega_l|^{-1/2}$. The T-test excludes $\tau=0$ for every $\sigma$, every segment ratio and either labelling of the segment. \end{proof} \begin{proof}[Proof of Proposition~\ref{prop:nod2}] Suppose that a singular place of diagram $2$ with triangle $T$ exists at $m$. By Lemma~\ref{lem:d2gate} its leading solution $y_0$ has $\tau(y_0)=0$ and satisfies one of (i)--(iv). The last statement of Lemma~\ref{lem:d2gate} excludes an equilateral triangle, and Theorem~\ref{thm:gate} excludes the other triangles. Thus no such place exists, and the piece $\pc{d2}[T]$ may be removed in Theorem~\ref{thm:types}. \end{proof} \section{The label sets of all positive masses}\label{sec:strata} In this section we prove that the label set of every positive mass vector with $m_1\le\dots\le m_5$ is certified, contains a curve set, or is the label set of one of two exceptional points (Theorem~\ref{thm:S}). We decide this by exact computer algebra on the sixteen strata of the sorted masses. With \S\ref{sec:curves} the theorem gives finitely many central configurations at every positive mass vector off the special rays (Corollary~\ref{cor:S}). Such a mass vector is settled unless it is a positive multiple of a permutation of the point $P_1$ of \S\ref{ss:twopoints}. We call these mass vectors the \emph{counted points}. At them we count the central configurations (Theorem~\ref{thm:countP1}). \input{sec/s_reduction} \subsection{Labels and certified label sets}\label{ss:nearlabels} We use the following $65$ labels: \begin{itemize} \item $\lab{E}(T)$ for each of the $10$ triples $T$; \item $\lab{R}(ab;s)$ for each of the $30$ choices of a pair and a third body; \item $\lab{H}(D_1|D_2)$ for each of the $15$ partitions of a four-body set into two pairs, read as $\cD_3(s;D_1|D_2)$ (Theorem~\ref{thm:D3}); \item $\lab{EQ}(a,b)$ for each of the $10$ pairs. \end{itemize} For $m\in(\R_{>0})^5$ let $\Lambda(m)$ be the set of these labels that hold at $m$. The label $\lab{D6}(ab|cd)$ is implied by $\lab{EQ}(a,b)$ and $\lab{EQ}(c,d)$ (\S\ref{ss:conditions}). Hence every piece of $\mathrm{pieces}(S(m))$ lies in $\mathrm{pieces}(S)$ whenever $\Lambda(m)\subseteq S$, and Proposition~\ref{prop:cert} applies to any label set $S\supseteq\Lambda(m)$. In this section a label set $S$ is \emph{certified} if it has a certificate relative to $\Vtwo^{\mathrm w}$ for the list $\cA_{\Vtwo^{\mathrm w}}(S)$ without the attained faces of the pieces $\pc{d2}[T]$, $\pc{d9}(T;ax,by)$, $\pc{d14b}$ and $\pc{d15}$, which we may leave out by \S\ref{ss:certs}. Proposition~\ref{prop:cert} applies to such a set, since $\Vtwo^{\mathrm w}$ is valid at every positive mass (Remark~\ref{rem:hulls}). For each of the curve types $T_1$, $T_2$, $T_3$, $T_4$, $T_5$, $T_7$, $T_8$, $T_9$ and the line $\mathrm{RL}$ of \S\ref{sec:curves}, Table~\ref{tab:curvesets} gives a set $D_T$ of labels. The images of these sets under the $120$ relabellings of the bodies are the \emph{curve sets}. We treat the mass vectors whose label set contains a curve set in \S\ref{sec:curves}. \begin{table}[ht] \centering \small \begin{tabular}{@{}ll@{\qquad}ll@{}} \toprule $T$ & $D_T$ & $T$ & $D_T$\\ \midrule $T_1$ & $\lab{R}(23;1)$, $\lab{EQ}(2,5)$, $\lab{EQ}(3,4)$ & $T_5$ & $\lab{E}(123)$, $\lab{R}(24;1)$, $\lab{EQ}(4,5)$\\ $T_2$ & $\lab{R}(23;1)$, $\lab{EQ}(3,4)$, $\lab{EQ}(3,5)$, $\lab{EQ}(4,5)$ & $T_7$ & $\lab{E}(123)$, $\lab{EQ}(2,5)$, $\lab{EQ}(3,4)$\\ $T_3$ & $\lab{EQ}(a,b)$ for all pairs $a0})^5$ with $m_1\le m_2\le m_3\le m_4\le m_5$. Then one of the following holds: \begin{enumerate}[label=\textup{(\roman*)}] \item $\Lambda(m)$ is certified; \item $\Lambda(m)$ contains a curve set; \item a positive multiple of $m$ is $\mathbf q_*$ or $\mathbf p_*$. \end{enumerate} \end{theorem} In case (iii) the hull $\VN$ is valid at $\mathbf q_*$ and $\mathbf p_*$, and it certifies their label sets with all pieces $\pc{d14a}$ present (Proposition~\ref{prop:Spoints}). We prove Theorem~\ref{thm:S} in \S\ref{ss:proofS}. With \S\ref{sec:curves} it gives the following corollary. \begin{corollary}\label{cor:S} Let $m\in(\R_{>0})^5$ lie on no special ray. Then the planar five-body problem with masses $m$ has finitely many central configurations up to similarity, and $m$ is settled unless it is a counted point. \end{corollary} \subsection{Coordinates and labels on a stratum}\label{ss:strata} Let $F$ be a face with the blocks $B_1,\dots,B_{n+1}$, numbered in increasing order of their bodies. At a point $m$ of $\Sigma_F$ put $x_i=m_i^{-1/2}$, as in \S\ref{ss:conditions}. Then $x_1\ge x_2\ge\dots\ge x_5=1$. We write $y_k$ for the common value of $x_i$ on the bodies $i$ of $B_k$. Then $y_1>y_2>\dots>y_n>y_{n+1}=1$. The map $m\mapsto(y_1,\dots,y_n)$ identifies $\Sigma_F$ with the open set $\{y\in\R^n:\ y_1>\dots>y_n>1\}$, and we use this identification throughout. On $\Sigma_F$ the label $\lab{EQ}(a,b)$ holds if and only if $a$ and $b$ lie in one block of $F$. Let $Q(F)$ be the set of these labels. We describe the $55$ labels $\lab E$, $\lab R$ and $\lab H$ in $x$, at positive $x$ (\S\ref{ss:conditions} and Appendix~\ref{app:labels}). \begin{itemize} \item $\lab{E}(abc)$: its polynomial times $(x_ax_bx_c)^4$ is $-(x_a+x_b+x_c)(-x_a+x_b+x_c)(x_a-x_b+x_c)(x_a+x_b-x_c)$. The first factor is positive. So $\lab{E}(abc)$ holds if and only if $x$ lies on one of the hyperplanes $x_a=x_b+x_c$, $x_b=x_a+x_c$ and $x_c=x_a+x_b$. \item $\lab{R}(ab;s)$: its polynomial times $x_s^4(x_ax_b)^8$ is $\big((x_a^2+x_b^2)^2-x_s^2x_ax_b\big)\big((x_a^2+x_b^2)^2+x_s^2x_ax_b\big)$. The second factor is positive. So $\lab{R}(ab;s)$ holds if and only if $(x_a^2+x_b^2)^2=x_s^2x_ax_b$. \item $\lab{H}(ij|kl)$ with centre $s$, read as $\cD_3$: put $A=x_i^3$, $B=x_j^3$, $A'=x_k^3$, $B'=x_l^3$, $D=\prod_{q\in Q_s}x_q^2$ and $N=DM_{Q_s}$, a polynomial in $x$. Let $c=x_s^2M_{Q_s}^{-1/2}>0$. Then $\mathrm{Tri}(ij;s)$ says that $c^2=(A+\epsilon B)^2$ for a sign $\epsilon$, and likewise for $\mathrm{Tri}(kl;s)$. Since $c^2N=x_s^4D$, the condition $\cD_3$ holds if and only if $x$ is a zero of one of the eight ideals \[ \big(x_ix_j-x_kx_l,\ A+\epsilon_1B-\delta(A'+\epsilon_2B'),\ (A+\epsilon_1B)^2N-x_s^4D\big),\qquad \epsilon_1,\epsilon_2,\delta\in\{1,-1\}. \] \end{itemize} The three hyperplanes of $\lab E(abc)$, the quartic of $\lab R(ab;s)$ and these eight ideals are the \emph{branch ideals} of the labels. After the substitution of $y_k$ for $x_i$, $i\in B_k$, they become ideals of $\Q[y]=\Q[y_1,\dots,y_n]$. Thus a label $\lab E$, $\lab R$ or $\lab H$ holds at a point of $\Sigma_F$ if and only if the point is a zero of one of its branch ideals. We also fix the \emph{$x$-polynomials} of each label: for $\lab E(abc)$ the product of the four linear factors above; for $\lab R(ab;s)$ the quartic $(x_a^2+x_b^2)^2-x_s^2x_ax_b$; for $\lab H(ij|kl)$ the polynomial $x_k^2x_l^2-x_i^2x_j^2$ and $N^2$ times the polynomials of $\mathrm{Tri}(ij;s)$ and $\mathrm{Tri}(kl;s)$ in Appendix~\ref{app:labels}, written in $x$. At positive $x$ a label holds if and only if all its $x$-polynomials vanish. \subsection{Flats}\label{ss:flats} We compute standard bases, minimal primes and saturations over $\Q$ with Singular~4.4.1 (class (C1)). \emph{Filters.} An ideal $J$ of $\Q[y]$ \emph{passes the filters} if \begin{enumerate}[label=\textup{(F\arabic*)}] \item $J\ne\Q[y]$; \item no element of degree at most $12$ of the reduced standard basis of $J$ becomes, under the substitution $y_j=1+z_j+\dots+z_n$, a nonzero polynomial whose nonzero coefficients all have one sign; \item the affine-linear elements of this basis have a common zero in $\Sigma_F$, which we decide by Fourier--Motzkin elimination over $\Q$ (class (C2)). \end{enumerate} The substitution maps $(\R_{>0})^n$ onto $\Sigma_F$, and a nonzero polynomial whose coefficients have one sign does not vanish on $(\R_{>0})^n$. Hence an ideal has no zero in $\Sigma_F$ if it fails a filter. \emph{Decompositions.} For ideals $P$ and $B$ of $\Q[y]$ we compute a list $L(P,B)$ of ideals. Each member contains $P+B$ and passes the filters, and every zero of $P+B$ in $\Sigma_F$ is a zero of some member. If $P+B$ is zero-dimensional or $B$ contains $P$, the list consists of $P+B$, unless $P+B$ fails a filter and the list is empty. Otherwise we add the generators of $B$ to $P$ one at a time, in order of increasing degree. After each step we replace each ideal of positive dimension by its minimal primes, keep each zero-dimensional ideal as it is and drop the ideals failing (F1) or (F2). If a decomposition does not finish within a time limit, we redo it with the saturation by $y_1\cdots y_n$ in place of the minimal primes of each ideal of positive dimension. Saturation keeps all zeros in $\Sigma_F$, since no coordinate vanishes there. At the end we drop each member failing (F3) or containing another one. The members are prime ideals, zero-dimensional ideals or saturated ideals. We do not use that they are prime. \emph{Components and flats.} For a label $\ell$ of the kinds $\lab E$, $\lab R$, $\lab H$ the \emph{components} of $\ell$ on $\Sigma_F$ are the members of the lists $L((0),B)$, $B$ a branch ideal of $\ell$. A \emph{flat} of $F$ is an ideal $P$ of $\Q[y]$ with a set $G(P)$ of labels of these kinds, each of which holds at every zero of $P$ in $\Sigma_F$. The \emph{root} is $P=(0)$ with $G(P)=\emptyset$. Let $P$ be a flat and $\ell\notin G(P)$ a label of these kinds. The \emph{children} of $P$ via $\ell$ are the members other than $P$ of the lists $L(P,C)$, $C$ a component of $\ell$. If $P$ itself is such a member, we add $\ell$ to $G(P)$. Each child $P'$ is a flat. The set $G(P')$ consists of the labels whose $x$-polynomials lie in $P'$, together with $G(P)$ and $\ell$. We keep $G(P')\supseteq G(P)\cup\{\ell\}$ when $G(P)$ grows. The zero set of a child lies in those of $P$ and of $C$. So these labels hold at its zeros in $\Sigma_F$. \begin{lemma}\label{lem:Scover} Let $P$ be a flat of $F$, let $m\in\Sigma_F$ be a zero of $P$, and let $\ell\in\Lambda(m)\setminus(Q(F)\cup G(P))$. \begin{enumerate}[label=\textup{(\alph*)}] \item The point $m$ is a zero of $P+C$ for a component $C$ of $\ell$, and $P+C$ passes the filters. \item If the children of $P$ via $\ell$ are computed, $m$ is a zero of one of them. \end{enumerate} \end{lemma} \begin{proof} (a) Since $\ell$ holds at $m$, the point $m$ is a zero of a branch ideal $B$ of $\ell$, hence of a member $C$ of $L((0),B)$. So $m$ is a zero of $P+C$ in $\Sigma_F$, and $P+C$ passes the filters. (b) The point $m$ is a zero of a member of $L(P,C)$. This member is not $P$, since otherwise $\ell$ would lie in $G(P)$. So it is a child of $P$ via $\ell$. \end{proof} \emph{Expansion and closure.} We call a label $\ell\notin G(P)$ of the kinds $\lab E$, $\lab R$, $\lab H$ \emph{possible} on $P$ if $Q(F)\cup G(P)\cup\{\ell\}$ contains no curve set and $P+C$ passes the filters for some component $C$ of $\ell$. To \emph{expand} $P$, we first find its possible labels. If the set $U_A(P)$ of the labels of $Q(F)$ and $G(P)$ and of the possible labels is certified, we call $P$ \emph{closed} and do not compute its children. Otherwise we compute the children of $P$ via all possible labels. If then the set $U(P)$ of the labels of $Q(F)$ and $G(P)$ and of the labels via which $P$ has a child is certified, we call $P$ closed as well. We call $P$ \emph{expanded} if its children via all possible labels are computed. \begin{lemma}\label{lem:Sclosed} Let $P$ be a closed flat of $F$, and let $m\in\Sigma_F$ be a zero of $P$. Then $\Lambda(m)$ is certified or contains a curve set. \end{lemma} \begin{proof} The labels of $Q(F)$ and $G(P)$ lie in $\Lambda(m)$. Suppose that $\Lambda(m)$ contains no curve set, and let $\ell\in\Lambda(m)\setminus(Q(F)\cup G(P))$. Then $Q(F)\cup G(P)\cup\{\ell\}$ contains no curve set, and $\ell$ is possible on $P$ by Lemma~\ref{lem:Scover}(a). If the children of $P$ are computed, $P$ has a child via $\ell$, by Lemma~\ref{lem:Scover}(b). Hence $\Lambda(m)$ lies in $U_A(P)$, and in $U(P)$ if the children of $P$ are computed. Since $P$ is closed, $U_A(P)$ is certified, or the children of $P$ are computed and $U(P)$ is certified. A subset of a certified set is certified (\S\ref{ss:certs}). \end{proof} \subsection{The computation}\label{ss:Scomp} On each face $F$ we expand the root and then every flat that we obtain, except the flats $P$ for which $Q(F)\cup G(P)$ contains a curve set and the \emph{covered} flats, the children of closed or covered flats. We decide whether a label set is certified in the sense of \S\ref{ss:nearlabels} by the search of \S\ref{ss:lexexact}. We check every certificate exactly as there. A label set for which the search finds no certificate counts as uncertified. This only adds work. Because the choice of the decompositions that are redone with saturations depends on the time limit and on the load of the machine, the proof concerns the computed flats, which are stored in the supplementary material. \begin{proposition}\label{prop:Stree} For each face $F$ the computation gives finitely many flats. Table~\ref{tab:Sflats} gives their numbers summed over the faces. Every flat $P$ of $F$ satisfies one of the following: \begin{enumerate}[label=\textup{(\alph*)}] \item $Q(F)\cup G(P)$ contains a curve set; \item $P$ is closed or covered; \item $Q(F)\cup G(P)$ is certified, and $P$ is expanded; \item $P$ is zero-dimensional and expanded, and each of its zeros in $\Sigma_F$ is $\mathbf q_*$ or $\mathbf p_*$. \end{enumerate} \end{proposition} \begin{table}[ht] \centering \small \begin{tabular}{@{}lrrrrr@{}} \toprule dimension & flats & (a) & (b) & (c) & (d)\\ \midrule $4$ & $1$ & & & $1$ & \\ $3$ & $24$ & & & $24$ & \\ $2$ & $177$ & & $14$ & $163$ & \\ $1$ & $538$ & $6$ & $126$ & $406$ & \\ $0$ & $1466$ & $12$ & $1377$ & & $77$\\ \midrule all & $2206$ & $18$ & $1517$ & $594$ & $77$\\ \bottomrule \end{tabular} \caption{The flats of the sixteen faces, by dimension and by the first of the cases (a)--(d) of Proposition~\ref{prop:Stree} that they satisfy. Of the $1517$ flats of (b), $1510$ are closed. The empty face has $1979$ flats.}\label{tab:Sflats} \end{table} \begin{proof} The flats, their sets $G$, their lists of children and the closures are the outcome of the computation. The proof of Theorem~\ref{thm:S} uses the lists of children of $35545$ pairs $(P,\ell)$, many of them empty. On the empty face $22$ of the $55$ labels have a component: the ten labels $\lab E$, the ten labels $\lab R(ab;s)$ with $s