}P\in\mathrm{minAssoc}\big{(}J\big{)}\text{ for some
}J\in\mathfrak{D}^{(m)}\Big{\\}}\,,$ (155)

Where we recall from Section 2.3, that the set of irreducible varieties can be
extracted from the primary decomposition of the associated ideal.

The first step of our algorithm is to construct generating sets of the ideals
associated to each variety in $\mathcal{V}^{(m)}$, for $m$ ranging from 1 to
some largest codimension of interest. In this work, we study the rational
functions in Eq. (153) only on varieties of codimension one and two, and leave
the impact of higher codimension studies to further work. Therefore, we begin
by performing the requisite primary decompositions to construct
$\mathcal{V}^{(1)}$ and $\mathcal{V}^{(2)}$.

##### Numerical Warm-up.

Given the two sets of varieties, $\mathcal{V}^{(1)}$ and $\mathcal{V}^{(2)}$,
we now use $p\kern 0.80002pt\text{-adic}$ numerical evaluations in order to
determine strongly constraining information about the function
$\mathcal{C}_{i}$. We do this in a two step procedure, first working at
codimension one, and then at codimension two.

  1. 1.

Codimension One: The first step is to evaluate $\mathcal{C}_{i}$ near all
codimension-one irreducible varieties whose associated ideals are generated by
one element, $\mathcal{D}_{j}$. To each of these we associate an element of
$\mathcal{V}^{(1)}$, namely $U_{j}=V(\langle\mathcal{D}_{j}\rangle_{R_{n}})$.
For each $U_{j}$, we employ the procedure in Section 3.3 to generate a point
$(\eta_{U_{j}}^{(\epsilon)},\tilde{\eta}_{U_{j}}^{(\epsilon)})$ that is
$p\kern 0.80002pt\text{-adically}$ close to $U_{j}$. As the associated ideal
is generated by the single irreducible element $\mathcal{D}_{j}$ and we work
with large $p$, we infer that

$q_{ij}=\nu_{p}\big{(}\mathcal{C}_{i}(\eta_{U_{j}}^{(\epsilon)},\tilde{\eta}_{U_{j}}^{(\epsilon)})\big{)}\,.$
(156)

That is, we deduce the exponent of the denominator factor from the $p\kern
0.80002pt\text{-adic}$ valuation of the coefficient when evaluated on a random
point nearby the associated variety.

  2. 2.

Codimension Two: The second step is to study the behavior of $\mathcal{C}_{i}$
near all codimension-two irreducible varieties $U\in\mathcal{V}^{(2)}$.
Specifically, we make use of the numerical techniques of Section 3.3 to
compute $\kappa(\mathcal{N}_{i},U)$, i.e. to show membership of
$\mathcal{N}_{i}$ to some symbolic power of $I(U)$, where we recall that
$I(U)$ is an ideal of $R_{n}$. To do this, for each $U$ we again generate a
point $(\eta_{U}^{(\epsilon)},\tilde{\eta}_{U}^{(\epsilon)})$ , which is close
to $U$. As we know all $q_{ij}$ from the codimension-one study, we can use Eq.
(153) to evaluate $\mathcal{N}_{i}$ on this point and thereby numerically
compute
$\nu_{p}\left(\mathcal{N}_{i}(\eta_{U}^{(\epsilon)},\tilde{\eta}_{U}^{(\epsilon)})\right)$.
As we perform this procedure for large $p$, by Eq. (151), we have calculated
$\kappa(\mathcal{N}_{i},U)$. Gathering all of these constrains, we conclude
that

$\mathcal{N}_{i}\in\mathfrak{J},\quad\text{where}\quad\mathfrak{J}=\bigcap_{U\in\mathcal{V}^{(2)}}I(U)^{\langle\kappa(\mathcal{N}_{i},U)\rangle}\,.$
(157)

###  4.2 The Space of Vanishing Functions

We have now shown that $\mathcal{N}_{i}$ belongs to both the ideal
$\mathfrak{J}$ defined in Eq. (157) and to the space of polynomials of
$\mathcal{M}_{d,\vec{\phi}}$, defined in Eq. (71). We wish to use these two
statements in order to construct an Ansatz of the form given in Eq. (152). To
this end, we construct a basis of the space

$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})=\mathcal{M}_{d,\vec{\phi}}\cap\mathfrak{J}\,.$
(158)

Once the denominators are restored, a basis of
$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$ can be used as the set of rational
functions $\\{\mathfrak{a}_{i,1},\ldots,\mathfrak{a}_{i,d_{i}}\\}$ in Eq.
(152). There are a number of ways one can construct a basis of
$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$, and they can differ strongly in
computational complexity. For example, direct computation a generating set of
$\mathfrak{J}$ using Gröbner basis methods can be intractable. Instead, we
find it more efficient to reduce the problem to one of vector space
intersection. Specifically, given a set of ideals $\\{J_{1},\ldots,J_{m}\\}$
in $R_{n}$, it is clear that

$\mathfrak{M}_{d,\vec{\phi}}\left(\bigcap_{i=1}^{m}J_{k}\right)=\bigcap_{i=1}^{m}\mathfrak{M}_{d,\vec{\phi}}\left(J_{k}\right)\,.$
(159)

This allows us to avoid computing a generating set for the ideal
$\mathfrak{J}$ by Gröbner basis methods. Instead, we construct a basis of each
$\mathfrak{M}_{d,\vec{\phi}}(J_{k})$ and perform the intersection of vector
spaces in Eq. (159) to find a basis of
$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$.

To practically construct a basis of each of the
$\mathfrak{M}_{d,\vec{\phi}}(J_{k})$, we first note that

$\mathfrak{M}_{d,\vec{\phi}}(J_{k})=\mathfrak{M}_{d,\vec{\phi}}(J_{k}\cap\mathcal{R}_{n}),$
(160)

as $\mathcal{M}_{d,\vec{\phi}}$ is a subspace of $\mathcal{R}_{n}$. This
allows us to construct a basis of $\mathfrak{M}_{d,\vec{\phi}}(J_{k})$ by
Gröbner basis techniques. Specifically, we exploit the isomorphism in Eq. (60)
and work with the polynomial quotient ring $\mathcal{R}_{n}^{(q)}$ and the
ideals $J_{k}^{(q)}$ that map to $J_{k}\cap\mathcal{R}_{n}$ under the
isomorphism (see Eq. (68)). By computing a basis of the intersection in
$\mathcal{R}_{n}^{(q)}$, we construct a set of spinor bracket polynomials that
can be understood as a basis of $\mathfrak{M}_{d,\vec{\phi}}(J_{k})$ by the
isomorphism. To construct this basis we recall the technology of Section 2.1.3
for intersecting ideals with vector spaces. First we compute the remainders
modulo $\mathcal{G}(J_{k}^{(q)})$ of the elements of $M_{d,\vec{\phi}}$. In
practice, the calculation of these remainders can prove computationally
intensive. Nevertheless, we find that the remainders themselves are often
simple. By Eq. (47), we then construct a basis of the nullspace of
$\Delta_{ij}\big{(}{\mathcal{G}[J_{k}^{(q)}]},M_{d,\vec{\phi}}\big{)}$ to
obtain a basis of $\mathfrak{M}_{d,\vec{\phi}}(J_{k})$.

Finally, in order to compute a basis of
$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$, we make use of Eq. (159), and
perform the vector space intersection with standard linear algebra techniques.
We remark that, as the remainders modulo $\mathcal{G}(J_{k}^{(q)})$ are
simple, the matrices
$\Delta_{ij}\big{(}{\mathcal{G}[J_{k}^{(q)}]},M_{d,\vec{\phi}}\big{)}$ are
sparse. Therefore we find that sparse linear algebra techniques are efficient
when performing the relevant vector space intersections.

##### Organizing the Space.

We now have a basis for $\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$. However,
the techniques of Section 2.1.3 to intersect a vector space with an ideal make
extensive use of (sparse) linear algebra. This introduces an arbitrary choice
into the basis elements given by the pivoting scheme made in the linear
algebra algorithms. This has a practical downside as, for large
$\dim\big{(}\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})\big{)}$, expressing the
numerator $\mathcal{N}_{i}$ in Eq. (153) in terms of this basis leads to large
rational numbers. We wish to address this by constructing a more compact basis
of $\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$. To this end, we will organize
the basis in a way reminiscent of a partial-fraction decomposition.

We begin by recalling that an element of
$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$ is to be interpreted as the
numerator of a rational function. In a partial-fraction decomposition, one
attempts to cancel the numerator against the denominator. In order for a
numerator to cancel against a factor of $\mathcal{D}_{k}$ in the denominator,
this numerator must itself come with a factor of $\mathcal{D}_{k}$. Naturally,
numerators which factorize $\mathcal{D}_{k}$ form a subspace of
$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$. Specifically, they are given by

$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})\cap\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}\,.$
(161)

Note that, due to the codimension-one study of Section 4.1, the space of
functions $\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$ have no common factors
given by the $\mathcal{D}_{k}$. Therefore

$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})\cap\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}\subsetneq\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})\,,$
(162)

that is, it is a proper subspace. Next, we recall Eq. (45) and note that the
$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$ can be related to the subspace of
terms belonging to the ideal $\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}$
by

$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})\cong\left[\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})\cap\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}\right]\oplus\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})\,,$
(163)

where

$\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})=\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})/\left[\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})\cap\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}\right]\,.$
(164)

We can therefore use a denominator factor $\mathcal{D}_{k}$ to break down the
space into two smaller spaces. In the context of partial fractions, we can
interpret Eq. (163) as the standard observation that the choice of numerator
of $\mathcal{D}_{k}$ is only fixed up to terms proportional to
$\mathcal{D}_{k}$.

To make practical use of Eq. (163), we again employ the isomorphism in Eq.
(60). This allows us to construct a basis of the two spaces in the sum using
the Gröbner basis technology for organizing spaces by ideals described in
Section 2.1.3. When constructing the basis of
$\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$, we order the basis
elements by the number of terms in their expressions to prioritize simpler
basis elements. We refer to this as the naive approach to constructing a basis
of $\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$. To organize
$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$ we can recursively applying Eq.
(163) to its left summand with different choices of $\mathcal{D}_{k}$. In
practice, we order the choice of the $\mathcal{D}_{k}$ heuristically, such
that the $\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ are kept
of low dimension at each step.

##### Generating Simple Basis Elements.

While the space of functions
$\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})\cap\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}$
is simpler than $\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})$, the naive
approach for choosing a basis of
$\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ can still result in
complicated basis elements. To avoid this problem, we introduce a procedure to
generate simple elements of
$\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$. Specifically, we
choose to construct monomials of the denominator factors that are linearly
independent modulo $\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}$. It is
clear that such a monomial of denominators cannot be proportional to
$\mathcal{D}_{k}$, so we construct

$\underline{\mathcal{D}}^{\underline{\beta}}=\prod_{j=1}^{n_{i}}\mathcal{D}_{j}^{\beta_{j}}\quad\text{such
that}\quad\underline{\mathcal{D}}^{\underline{\beta}}\in\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})\quad\text{with}\quad\beta_{k}=0\,,$
(165)

where the product over $j$ runs over the full list of $n_{i}$ denominator
factors, the $\beta_{j}\in\mathbb{Z}_{\geq 0}$. It is not clear _a priori_ if,
considered modulo $\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}$, this set
of monomials of the denominator factors spans
$\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$, and indeed we find
this not to always be the case. Nevertheless, as we have generated a basis of
$\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ from the naive
approach, we can always supplement the set of independent denominator-factor
monomials with elements of the naive basis to obtain a basis. In practice, we
find that this is rarely necessary in our applications. In the following, to
generate the $\underline{\beta}$ described in Eq. (165), we take a two-step
procedure. We first generate denominator-factor monomials and then find a
subset that is linearly independent modulo
$\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}$.

To begin, we discuss our approach to generating an overcomplete set of
denominator-factor monomials without imposing independence modulo
$\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}$. Let us consider exponent
vectors $\underline{\beta}\in\mathbb{Z}^{n_{i}}_{\geq 0}$ that satisfy the
equations

$\displaystyle\sum_{j=1}^{n_{i}}\beta_{j}\kappa(\mathcal{D}_{j},U)\geq\kappa(\mathcal{N},U)\quad\text{for
each}\quad U\in\mathcal{V}^{(2)}\,,$ (166)
$\displaystyle\sum_{j=1}^{n_{i}}\beta_{j}\\{\mathcal{D}_{j}\\}_{i}=\phi_{i}\,,$
(167) $\displaystyle\sum_{j=1}^{n_{i}}\beta_{j}[\mathcal{D}_{j}]=d\,.$ (168)

Here, Eq. (166) guarantees that the monomial
$\underline{\mathcal{D}}^{\underline{\beta}}$ is an element of the ideal
$\mathfrak{J}$, while Eqs. (167) and (168) require that
$\underline{\mathcal{D}}^{\underline{\beta}}$ have little-group weights
$\vec{\phi}$ and mass dimension $d$ respectively. Let us denote the set of
solutions $\underline{\beta}$ to these equations as
$B_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$. In principle, the set
$B_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ can be enumerated by a
computer algebra system. This is analogous to the enumeration of independent
spinor bracket exponents, $X_{d,\vec{\phi}}$, in Section 2.2.

In practice, we find that direct enumeration of the elements of
$B_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ can be computationally
prohibitive. To address this, we instead consider constructing
$B_{d^{\prime},\vec{\phi}}$ for $d^{\prime}<d$ and multiplying these elements
by appropriate functions to arrive at a set of denominator monomials of mass
dimension $d$. Note that Eq. (166) and Eq. (167) are already satisfied by any
element of $B_{d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$.
Therefore, we can generate a valid monomial by multiplying by any little-
group-invariant monomial of spinor brackets of mass dimension $d-d^{\prime}$.
Specifically, consider the set of monomials

$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})=\left\\{\,\,m\,{\underline{\mathcal{D}}^{\underline{\beta}}}\;:\;m\in
M_{d-d^{\prime},\vec{0}}\,,\;\,\underline{\beta}\in
B_{d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})\,\,\right\\},$ (169)

where we recall from Eq. (73) that $M_{d-d^{\prime},\vec{0}}$ is a monomial
basis of $\mathcal{M}_{d-d^{\prime},\vec{0}}$. For $d^{\prime}<d$,
$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ forms a
subset of all possible monomials in denominator factors in Eq. (165). We note
that there exists a $d_{\text{min}}\geq 0$ such that for all
$d^{\prime}<d_{\text{min}}$ the set
$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ is empty.

When considered modulo $\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}$, the
monomials in $\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$
are linearly dependent. We must therefore find a linearly independent subset.
To this end, we again recall the Gröbner basis technology of Section 2.1.3.
Specifically, we apply Eq. (48) and construct the matrix

$\Delta_{d,d^{\prime},\vec{\phi}}\left(\mathfrak{J},\mathcal{D}_{k}\right)=\Delta_{ij}\left[\mathcal{G}\left(\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}^{(q)}}\right),\Gamma_{d,d^{\prime},\vec{\phi}}\left(\mathfrak{J},\mathcal{D}_{k}\right)\right],$
(170)

where $i$ and $j$ are the row and column indices of
$\Delta_{d,d^{\prime},\vec{\phi}}\left(\mathfrak{J},\mathcal{D}_{k}\right)$
respectively. A linearly independent subset of
$\Gamma_{d,d^{\prime},\vec{\phi}}\left(\mathfrak{J},\mathcal{D}_{k}\right)$
corresponds to the pivot columns of
$\Delta_{d,d^{\prime},\vec{\phi}}\left(\mathfrak{J},\mathcal{D}_{k}\right)$.
Note that

$\mathrm{rank}\left[\Delta_{d,d^{\prime},\vec{\phi}}\left(\mathfrak{J},\mathcal{D}_{k}\right)\right]\leq\dim\left[\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})\right]$
(171)

and the inequality is saturated if
$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ spans
$\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$. In practice, we
often find that this occurs even for $d^{\prime}<d$. As
$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ contains
fewer elements than $B_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ it is
therefore often more efficient to search for such a $d^{\prime}<d$. In
practice, this $d^{\prime}$ can be found by searching from $d^{\prime}=0$ and
increasing $d^{\prime}$ in unit steps until either
$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ spans
$\mathcal{Q}_{d,\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ or stopping at
$d^{\prime}=d$.

Finally, we note an important feature when determining a subset of
$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ that is
linearly independent modulo $\langle\mathcal{D}_{k}\rangle_{\mathcal{R}_{n}}$:
we can prioritize elements when choosing a basis by ordering
$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ when
constructing $\Delta_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$
in Eq. (170). In practice, we choose an ordering criteria that is inspired by
partial fractions. Specifically, we choose to order
$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ by the mass
dimension of the numerator, after cancellation against the denominator, which
is known from the co-dimension one study. That is, given a numerator exponent
$\underline{\beta}$, and the denominator exponent $\underline{\alpha}$, the
rational function associated to $\underline{\beta}$ takes the form
$\underline{\mathcal{D}}^{\underline{\beta}-\underline{\alpha}}$. The mass
dimension of the numerator of
$\underline{\mathcal{D}}^{\underline{\beta}-\underline{\alpha}}$ can be
calculated through

$[\mathrm{Num}(\underline{\mathcal{D}}^{\underline{\beta}-\underline{\alpha}})]=\sum_{j\,:\,\beta_{j}>\alpha_{j}}[\mathcal{D}_{j}].(\beta_{j}-\alpha_{j})\,.$
(172)

By ordering the elements of
$\Gamma_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$ with respect
to the criteria of Eq. (172) when constructing
$\Delta_{d,d^{\prime},\vec{\phi}}(\mathfrak{J},\mathcal{D}_{k})$, the pivot
columns will be such that chosen basis of denominator factor monomials will
cancel against the denominator as much as possible.

##  5 Application to Two-Loop $0\rightarrow q\bar{q}\gamma\gamma\gamma$
Finite-Remainder Coefficients

As a proof-of-concept application of our approach, we reconsider the
collection of pentagon-function remainder coefficients for the leading-color
process $0\rightarrow q\bar{q}\gamma\gamma\gamma$ at two loops, obtained in
Ref. Abreu:2020cwb . In this way, we will demonstrate that our approach
requires fewer evaluations than the original functional reconstruction
technique. We follow the notation of Ref. Abreu:2020cwb  and consider the
remainders

$R^{(2,\,j)}_{h}=\sum_{i\in B}r_{i}h_{i}\,,$ (173)

with $j\in\\{0,N_{f}\\}$, $N_{f}$ being the number of quarks treated as
massless, $h$ representing the helicity configuration and $h_{i}$ denoting
elements of the basis of pentagon functions $B$ of Ref. Chicherin:2020oor .
The reconstruction approach of Ref. Abreu:2020cwb  works with parity even
functions. For this reason, the $r_{i}$ were decomposed as

$r_{i}=r_{i}^{+}+\frac{\mathrm{tr}_{5}}{s_{12}^{2}}\,r_{i}^{-}\,,$ (174)

and the functional reconstruction approach was applied to the parity even
functions $r_{i}^{\pm}$. The result was then presented in terms of a basis
$\tilde{r}_{i}^{\scriptscriptstyle(\pm)}$ of the combined space spanned by the
$r^{+}_{i}$ and $r^{-}_{i}$. Furthermore, the $r_{i}$ in Ref. Abreu:2020cwb
were normalized by an amplitude-dependent helicity weight $\Phi_{h}$ in order
to make them little-group invariant. Our method is able to handle functions
that are not little-group invariant and therefore benefit from simplifications
arising from manifesting this behavior. Therefore, we apply our approach to
the functions

$\overline{r}_{i}=\Phi_{h}r_{i}\,.$ (175)

As is by now standard practice, we exploit the fact that the
$\overline{r}_{i}$ are linearly dependent and thus can be written as

$\overline{r}_{i}=\sum_{j}\tilde{r}_{j}M_{ji}\,,$ (176)

where the $\tilde{r}_{j}$ are a subset of the $\overline{r}_{i}$ such that
they form a basis of the space spanned by the $\overline{r}_{i}$ and $M_{ji}$
is a matrix of rational numbers. We choose the basis elements $\tilde{r}_{i}$
such that their numerator mass dimension in common denominator form is
minimized. We then determine the matrix $M_{ji}$ from numerical evaluations of
the $\overline{r}_{j}$ and standard linear algebra techniques.

As is natural to expect, we observe that the number of linearly independent
coefficients drops by approximately a factor of two when considering the
mixed-parity $r_{i}$ as opposed to the parity-even $r_{i}^{\pm}$. Furthermore,
we observe that the mass dimension of the associated numerators is improved.
We summarize these observations in Table 1.

Remainder | $\text{dim}(\text{span}(\tilde{r}_{i}^{\scriptscriptstyle(\pm)}))$ | $\text{max}([\mathrm{Num}(\tilde{r}_{i}^{\scriptscriptstyle(\pm)})])$ | $\text{dim}(\text{span}(\tilde{r}_{i}))$ | $\text{max}([\mathrm{Num}(\tilde{r}_{i})])$
---|---|---|---|---
$R^{(2,0)}_{-++}$ | 171 | 50 | 87 | 35
$R^{(2,N_{f})}_{-++}$ | 57 | 24 | 29 | 15
$R^{(2,0)}_{+++}$ | 62 | 32 | 31 | 20
$R^{(2,N_{f})}_{+++}$ | 12 | 18 | 6 | 8
Table 1: Improvements in the number of basis functions and in the mass
dimension of the numerators with known factors pulled out when moving from a
basis $\tilde{r}_{i}^{\scriptscriptstyle(\pm)}$ with definite parity to a
basis $\tilde{r}_{i}$ with mixed parity.

Finally, we note that the rational numbers appearing in $M_{ji}$ are smaller
than those appearing in the analogous matrix in the work of Ref. Abreu:2020cwb
, with the largest denominators being $\sim 10^{7}$ and $\sim 10^{9}$
respectively.

###  5.1 Five-Point Phase-Space Geometry

In this section, we report on the set of irreducible singular varieties up to
codimension two that are relevant for the $0\rightarrow
q\overline{q}\gamma\gamma\gamma$ amplitudes at two loops. That is, we describe
$\mathcal{V}^{(1)}$ and $\mathcal{V}^{(2)}$ of Eq. (155). This set is expected
to be sufficient for any five-point massless scattering process at two loops,
if the basis of transcendental functions from Ref. Chicherin:2020oor  is
employed. The required primary decompositions were computed making use of
Singular. While Singular implements a number of general algorithms for primary
decomposition, we found it necessary to supplement such algorithms to perform
and prove the decompositions in the harder cases. We describe the details of
our techniques in Appendix B.

At five point the set of denominator factors that we use to construct
$\mathfrak{D}^{(1)}$ and $\mathfrak{D}^{(2)}$ are of the form

$\langle ij\rangle\,,\;[ij]\,,\;\langle i|j+k|i]\,.$ (177)

In total there are 35 such invariants: $\binom{5}{2}=10$ angle brackets, an
equal number of square brackets, and $5\,\binom{4}{2}\,/\,2=15$ three-particle
spinor chains. This is the same set of invariants employed for planar five-
parton scattering in Ref. DeLaurentis:2020qle  with 5 additional three-
particle spinor chains obtained from non-cyclic permutations.

Let us now discuss the irreducible varieties in this space, up to the
symmetries. The symmetries of five-point massless phase space are given by all
$5!=120$ possible permutations of the external legs, as well as parity. At
codimension one, the set $\mathfrak{D}^{(1)}$ is generated by two ideals not
related by symmetry, namely

$\displaystyle\begin{split}J_{1}&=\bigl{\langle}\,\langle
12\rangle\,\bigr{\rangle}_{R_{5}}\,,\\\ J_{2}&=\bigl{\langle}\langle
1|2+3|1]\bigr{\rangle}_{R_{5}}\,.\end{split}$ (178)

Using Singular it can be shown that these ideals are prime. Hence, the
associated varieties are irreducible and generate $\mathcal{V}^{(1)}$. At
codimension two, $\mathfrak{D}^{(2)}$ is generated by the action of the
symmetries on 11 ideals. Five of these ideals are generated by a pair of two-
particle spinor contractions. They, alongside their primary decompositions,
are given by

$\displaystyle\begin{split}\bigl{\langle}\langle 12\rangle,\langle
13\rangle\bigr{\rangle}_{R_{5}}&=P_{1}\cap P_{2}\cap P_{3}\,,\\\
\bigl{\langle}\langle 12\rangle,\langle
34\rangle\bigr{\rangle}_{R_{5}}&=P_{3}\cap P_{4}\,,\\\ \bigl{\langle}\langle
12\rangle,[12]\bigr{\rangle}_{R_{5}}&=P_{5}\,,\\\ \bigl{\langle}\langle
12\rangle,[13]\bigr{\rangle}_{R_{5}}&=P_{6}\,,\\\ \bigl{\langle}\langle
12\rangle,[34]\bigr{\rangle}_{R_{5}}&=P_{1}(12543)\cap\overline{P}_{1}(34512)\,.\end{split}$
(179)

This defines $P_{5}$ and $P_{6}$ while the other $P_{i}$ are given by

$\displaystyle\begin{split}P_{1}&=\bigl{\langle}\langle 12\rangle,\langle
13\rangle,\langle 23\rangle,[45]\bigr{\rangle}_{R_{5}}\,,\\\
P_{2}&=\bigl{\langle}\lambda_{1}^{\alpha}\bigr{\rangle}_{R_{5}}\,,\\\
P_{3}&=\bigl{\langle}\langle 12\rangle,\langle 23\rangle,\langle
34\rangle,\langle 45\rangle,\langle 15\rangle,\langle 13\rangle,\langle
14\rangle,\langle 24\rangle,\langle 25\rangle,\langle
35\rangle\bigr{\rangle}_{R_{5}}\,,\\\ P_{4}&=\bigl{\langle}\langle
12\rangle,\langle
34\rangle,\lambda_{1}^{\alpha}[15]+\lambda_{2}^{\alpha}[25]\bigr{\rangle}_{R_{5}}\,.\end{split}$
(180)

Three of the generators of $\mathfrak{D}^{(2)}$ are ideals that are generated
by a two-particle and a three-particle contraction. These ideals, alongside
their primary decompositions, are given by

$\displaystyle\begin{split}\bigl{\langle}\langle 12\rangle,\langle
1|2+3|1]\bigr{\rangle}_{R_{5}}&=P_{1}\cap P_{2}\cap P_{3}\cap P_{6}\,,\\\
\bigl{\langle}\langle 12\rangle,\langle
3|1+2|3]\bigr{\rangle}_{R_{5}}&=P_{1}\cap\overline{P}_{1}(34512)\cap P_{3}\cap
P_{4}(12453)\,,\\\ \bigl{\langle}\langle 12\rangle,\langle
3|1+4|3]\bigr{\rangle}_{R_{5}}&=P_{3}\cap P_{7}\,,\end{split}$ (181)

where

$\displaystyle P_{7}$ $\displaystyle=\bigl{\langle}\langle 12\rangle,\langle
3|1+4|3],\lambda_{1}^{\alpha}[14][35]+\lambda_{2}^{\alpha}[25][34]\bigr{\rangle}_{R_{5}}\,.$
(182)

Finally, the last three generators of $\mathfrak{D}^{(2)}$ are ideals that are
generated by a pair of three-particle spinor contractions. They, alongside
their primary decompositions, are given by

$\displaystyle\begin{split}\bigl{\langle}\langle 1|2+3|1],\langle
1|2+4|1]\bigr{\rangle}_{R_{5}}&=P_{2}\cap\overline{P}_{2}\cap
P_{3}\cap\overline{P}_{3}\cap P_{8}\,,\\\ \bigl{\langle}\langle
1|2+3|1],\langle 2|1+3|2]\bigr{\rangle}_{R_{5}}&=P_{1}\cap\overline{P}_{1}\cap
P_{3}\cap\overline{P}_{3}\cap P_{9}\,,\\\ \bigl{\langle}\langle
1|2+3|1],\langle 2|1+4|2]\bigr{\rangle}_{R_{5}}&=P_{3}\cap\overline{P}_{3}\cap
P_{10}\,,\end{split}$ (183)

where

$\displaystyle\begin{split}P_{8}&=\bigl{\langle}\langle 1|2+3|1],\langle
1|2+4|1],\langle 1|2+3|2+4|1\rangle,\lambda\leftrightarrow\tilde{\lambda},\\\
&\phantom{=\,\,\bigl{\langle}}-\langle 54\rangle\langle 21\rangle\langle
31\rangle-\langle 53\rangle\langle 21\rangle\langle 41\rangle+\langle
52\rangle\langle 31\rangle\langle
41\rangle,\lambda\leftrightarrow\tilde{\lambda}\bigr{\rangle}_{R_{5}}\,,\\\
P_{9}&=\bigl{\langle}\langle 1|2+3|1],\langle
2|1+3|2],\tilde{\lambda}^{\dot{\alpha}}_{1}\langle 12\rangle\langle
13\rangle-\tilde{\lambda}^{\dot{\alpha}}_{2}\langle 12\rangle\langle
23\rangle-\tilde{\lambda}^{\dot{\alpha}}_{3}\langle 23\rangle\langle
13\rangle,\lambda\leftrightarrow\tilde{\lambda}\bigr{\rangle}_{R_{5}}\,,\\\
P_{10}&=\bigl{\langle}\langle 1|2+3|1],\langle 2|1+4|2],\\\
&\phantom{=\,\,\bigl{\langle}}\lambda_{1}^{\alpha}[13][14][25]+\lambda_{2}^{\alpha}[12][24][35]+\lambda_{3}^{\alpha}[13][24][35],\lambda\leftrightarrow\tilde{\lambda}\bigr{\rangle}_{R_{5}}\,.\end{split}$
(184)

$P_{1}$ | $P_{2}$ | $P_{3}$ | $P_{4}$ | $P_{5}$ | $P_{6}$ | $P_{7}$ | $P_{8}$ | $P_{9}$ | $P_{10}$
---|---|---|---|---|---|---|---|---|---
20 | 10 | 2 | 30 | 10 | 60 | 120 | 15 | 30 | 20
Table 2: Counting of the number of distinct irreducible varieties generated by
each of the $P_{i}$ that, under the action of parity and permutations of the
external momenta, generate the set $\mathcal{V}^{(2)}$.

In the above ideal definitions, $\lambda\leftrightarrow\tilde{\lambda}$ means
to add another generator obtained by applying the parity operation to the
previous one. We use the notation $P_{i}$ as it can be shown that all the
$P_{i}$ are prime (see Appendix B.3). This implies that the elements of
$\mathfrak{D}^{(2)}$ are all radical. We note that while there are 11
inequivalent ideals up to symmetries generated by two denominator factors,
there are only 10 inequivalent irreducible varieties up to symmetries. By
permuting the external momenta, and/or applying the parity operation, the
varieties associated to the $P_{i}$ generate $\mathcal{V}^{(2)}$. In Table 2,
we list the counting of the number of varieties generated by each of the prime
ideals $P_{1}$ through to $P_{10}$. In total there are 317 distinct
irreducible varieties.

####  5.1.1 Symbolic Powers

In this section, we discuss the practical computation of symbolic powers of
the $P_{i}$ in Section 5.1. The maximal symbolic power of each ideal $P_{i}$
that we compute is controlled by the structure of the $\tilde{r}_{i}$, which
is determined numerically. We list the largest power of each $P_{i}$ that we
need to compute in Table 3. We remark that for $P_{5}$, $P_{8}$ and $P_{10}$,
no computation is required as $J^{\langle 1\rangle}=J$ for any ideal $J$. We
also note that the constraints coming from the symbolic power of $P_{3}$ can
be seen to be trivial. Specifically, one can rearrange the constraints of
little group and mass dimension on monomial exponents, (76) and (75), to give

$\sum_{j=1}^{n}\sum_{i=1}^{j}\alpha_{ij}=\frac{1}{2}\left(d+\sum_{k}\phi_{k}\right)\quad\;\text{and}\quad\;\,\sum_{j=1}^{n}\sum_{i=1}^{j}\beta_{ij}=\frac{1}{2}\left(d-\sum_{k}\phi_{k}\right).$
(185)

That is, the total degree of both the angle bracket and square bracket
variables are fixed independently by little group and mass dimension. This
implies that

$\mathcal{M}_{d,\vec{\phi}}=\mathcal{M}_{d,\vec{\phi}}\cap
P_{3}^{\langle\frac{1}{2}\left(d+\sum_{k}\phi_{k}\right)\rangle}=\mathcal{M}_{d,\vec{\phi}}\cap\overline{P}_{3}^{\langle\frac{1}{2}\left(d-\sum_{k}\phi_{k}\right)\rangle}\,.$
(186)

This allows us to avoid constructing explicit symbolic powers for $P_{3}$.

$P_{i}$ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10
---|---|---|---|---|---|---|---|---|---|---
$k_{i}$ | 10 | 9 | 18 | 3 | 1 | 4 | 3 | 1 | 3 | 1
Table 3: List of highest $k_{i}$ such that it is required to compute the
symbol power $P_{i}^{\langle k_{i}\rangle}$ in order to construct the Ansatz
for the rational prefactors in $R^{(2,0)}_{-++}$. The $P_{i}$ are given in
Eqs. (179) to (184).

To construct the remaining symbolic powers, we make use of the Cohen–Macaulay
property of $R_{n}$ in the following two ways.

  1. 1.

Relation to Maximal-Codimension Ideals: The ideals $P_{2}$ and $P_{6}$ are
maximal codimension. Therefore, by Eq. (103), the symbolic powers are
equivalent to the ideal powers. Specifically, we use

$P_{i}^{\langle k\rangle}=P_{i}^{k}\qquad\text{for}\,\,i\in\\{2,6\\}\,.$ (187)

Next, as ideal intersection is associative, by Eq. (186) we have that for any
$P_{i}$

$\mathfrak{M}_{d,\vec{\phi}}\left(P_{i}^{\langle
k\rangle}\right)=\mathfrak{M}_{d,\vec{\phi}}\left(P_{i}^{\langle k\rangle}\cap
P_{3}^{\langle k\rangle}\right)\quad\text{for}\quad
k\leq\frac{1}{2}\left(d+\sum_{k}\phi_{k}\right)\,,$ (188)

alongside the analogous equation for $\overline{P}_{3}$. In practice, if we
wish to compute $P_{i}^{\langle k\rangle}$, then $k$ is such that the
inequality in Eq. (188) holds. Therefore, for the purposes of our algorithm,
it is sufficient to compute $P_{i}^{\langle k\rangle}\cap P_{3}^{\langle
k\rangle}$. For two ideals, $P_{4}$ and $P_{7}$, we see from Eqs. (179) and
(181) that this intersection is again of maximal codimension. By definition,
the symbolic power commutes with the intersection (see Eq. (101)). This allows
us to apply Eq. (103) and compute the symbolic power through the ideal power.
Specifically, we use

$\displaystyle P_{4}^{\langle k\rangle}\cap P_{3}^{\langle k\rangle}$
$\displaystyle={\big{\langle}\langle 12\rangle,\langle
34\rangle\big{\rangle}_{R_{5}}}^{k}\,,$ (189) $\displaystyle P_{7}^{\langle
k\rangle}\cap P_{3}^{\langle k\rangle}$ $\displaystyle={\big{\langle}\langle
12\rangle,\langle 3|1+4|3]\big{\rangle}_{R_{5}}}^{k}\,.$ (190)

  2. 2.

Saturation of Maximal Codimension Ideals: In order to compute symbolic powers
of the remaining two ideals, $P_{1}$ and $P_{9}$, we make use of ideal
saturation. We refer the reader to Appendix B.1 for theoretical details on
saturation. In this context, we exploit that ideal saturation removes primary
components. Specifically, we compute the symbolic power of a (radical) ideal
whose set of associated primes contains $P_{1}$ or $P_{7}$ and remove
extraneous components of the symbolic power by saturation. If we can find a
relevant maximal-codimension radical ideal, then its symbolic power is again
the ideal power. This strategy is natural as the $P_{i}$ are constructed from
the primary decompositions of maximal-codimension ideals. In particular, we
use that

$\displaystyle P_{1}^{\langle k\rangle}\cap P_{3}^{\langle k\rangle}$
$\displaystyle={\big{\langle}\langle 12\rangle,\langle
13\rangle\big{\rangle}_{R_{5}}}^{k}:\big{\langle}\lambda_{1,0}\big{\rangle}_{R_{5}}^{\infty},$
(191) $\displaystyle P_{9}^{\langle k\rangle}$
$\displaystyle={\big{\langle}\langle 1|2+3|1],\langle
2|1+3|2]\big{\rangle}_{R_{5}}}^{k}:\big{\langle}\langle
45\rangle[45]\big{\rangle}_{R_{5}}^{\infty}$ (192)

and these saturations can be computed with Gröbner basis methods.

Finally, with generating sets of each of these ideals in hand, we contract
each generator in all possible ways with spinors to reach a set of polynomials
in spinor brackets and thereby find a generating set of the associated ideal
in $\mathcal{R}_{5}^{(q)}$.

###  5.2 Implementation and Results

We now retrace the steps of the Ansatz construction algorithm presented in
Section 4, and provide details regarding their implementation. To perform the
algebro-geometric operations we make extensive use of the computer algebra
system Singular DGPS  through its Mathematica interface math_singular  and
through the Python interface syngular syngular . We note a generally useful
facility in Singular: the qring declaration. This allows one to work directly
in the quotient rings $R_{n}$ and $\mathcal{R}_{n}$.

Let us start from the analytic study of codimension-one and codimension-two
varieties. For one primary decomposition, we used the algorithm of Gianni,
Trager and Zacharias gianni1988grobner  as implemented in Singular under the
command primdecGTZ. For the other decompositions, we supplemented this
algorithm with the techniques described in Appendix B. To remove sub-
varieties, we made use of the command sat, as described in Appendix B.1. To
check primality, we made use of the test presented in Appendix B.3.

For the numerical warm-up, we implemented in Python both the algorithm for
generating finite-field points on irreducible varieties, described in Section
3.2, and the lifting procedure to obtain $p\kern 0.80002pt\text{-adic}$
solutions close to singular varieties, described in Section 3.3. The required
maximally independent sets were computed with the Singular command indepSet.
In order to solve the univariate polynomial equations of Eq. (132) over a
finite field, we used the command factor from the package sympy 10.7717/peerj-
cs.103 . In practice, we observed that it is always possible to choose a
maximally independent set such that the system of equations for the dependent
variables is linear, which guarantees the existence of a solution in
$\mathbb{F}_{p}$.

The algorithm for building the Ansatz from the gathered numerical data,
described in Section 4.2, was implemented in Mathematica. When performing
polynomial reductions, e.g. when applying Eq. (46) to intersect vector spaces
with ideals, we found it important to tune the choice of variable ordering to
minimize the size of the Gröbner bases. This increases the speed of polynomial
reduction. In order to perform the linear algebra when constructing the Ansatz
we employed private codes for sparse linear algebra over a finite
field121212We thank Mao Zeng for the use of an in-house implementation of
sparse linear algebra techniques over a finite field.. The $p\kern
0.80002pt\text{-adic}$ and finite-field evaluations of the rational prefactors
that we used in this work were performed using in-house implementations of the
respective fields and the analytic results of Ref. Abreu:2020cwb .

Remainder | $R^{(2,0)}_{-++}$ | $R^{(2,N_{f})}_{-++}$ | $R^{(2,0)}_{+++}$ | $R^{(2,N_{f})}_{+++}$
---|---|---|---|---
max $\dim[\mathcal{M}_{\tilde{d},\vec{0}}]$ | 41301 | 2821 | 7905 | 1045
max $\dim[\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})]$ | 566 | 20 | 18 | 6
Table 4: Summary of effect of algorithm on Ansatz dimension. The row labeled
“max $\dim[\mathcal{M}_{\tilde{d},\vec{0}}]$” corresponds to the largest
Ansatz dimension for each basis function when using the little-group invariant
techniques of Ref. Abreu:2020cwb . The $\tilde{d}$ correspond to third column
of Table 1. The row labeled “max
$\dim[\mathfrak{M}_{d,\vec{\phi}}(\mathfrak{J})]$” gives the largest Ansatz
dimension for each amplitude when the codimension two scaling constraints are
taken into consideration.

The results of our Ansatz construction procedure are summarized in Table 4.
For all helicity amplitudes, we observe a large decrease in the size of the
Ansatz when applying our procedure. As a result of using this Ansatz, we
therefore find a large reduction in the size of the expressions for the
rational functions in the helicity amplitudes. We provide our results in the
form of ancillary files of two types:

  1. (a)

Machine-readable expressions for the primary decompositions of Eqs. (179) to
(184) and, in particular, for the generating sets for the associated prime
ideals. These can be found in the files generatingIdeals.m and
generatingIdeals.py, in the languages Mathematica and Python 3.8 respectively.
The Python file also computationally checks the equalities in Eqs. (179),
(181) and (183). Furthermore, it employs the method described in Appendix B.3
to check the primality of all ideals $P_{i}$ in Section 5.1.

  2. (b)

Expressions for the rational functions in the helicity amplitudes. The
appropriate helicity configuration and $N_{f}$ power are encoded in the first
part of the file names, each taking the form

2l_{helicity configuration}{Nf power}

where {helicity configuration} refers to the subscript $h$ from Eq. (173) and
can be either pmmpp or pmppp, i.e. one of the two independent helicity
configurations; and where {Nf power} refers to the $j$ superscript in Eq.
(173), it is blank for $j=0$ or _nf for $j=N_{f}$. These files are arranged
into two classes:

    1. (b.1)

Files ending in _coo.json contain the sparse matrices $M_{ji}$ from Eq. (176).
The term coo refers to the notation used to store the matrix, which is the
coordinate list format, i.e. a map from tuples of indices $(j,i)$ to the
values $M_{ji}$ for all non zero entries of the matrix.

    2. (b.2)

Files ending in _spinors.m contain the bases $\tilde{r}_{j}$ from Eq. (176).
The notation used is SP for spinor angle brackets, and SPT for spinor square
brackets. Using a package such as S@M Maitre:2007jq  it is straightforward to
match at a random phase-space point the product $\tilde{r}_{j}M_{ji}$ to the
functions $\overline{r}_{i}$ as given in Ref. Abreu:2020cwb .

##  6 Summary and Outlook

In this work, we have developed an algorithm to construct compact Ansätze for
rational prefactors of master integrals and transcendental functions in gauge
theories. To this end, we made use of tools of algebraic geometry to further
our understanding of rational functions of Weyl spinors associated to
complexified momentum space. We began by interpreting the spinor-helicity
formalism in the language of algebraic geometry, discussing that physical
polynomials of Weyl spinors belong to a polynomial quotient ring associated to
the variety induced by momentum conservation. We then showed that elements of
this set with appropriate Lorentz transformation properties live in a further
polynomial quotient ring, which we used to systematically account for the
relations arising from momentum-conservation and Schouten identities. Next, we
discussed the singularities of rational prefactors in terms of irreducible
varieties. In particular, we began a systematic study of the singular
structure of these rational functions via primary decompositions. We
understood the singular structure of a rational function in terms of a set of
irreducible varieties and the order of vanishing/divergence of the function on
those varieties. Importantly, this allows us to study the singular structure
of a rational function not only on codimension-one varieties but also on
_higher_ codimension varieties. We understood the analytic consequences of
this higher codimension data by connecting it to an important set of
polynomials with well-defined vanishing behavior on these surfaces: the
symbolic power of an ideal. This allowed us to construct refined Ansätze for
rational prefactors that match the singular behavior on higher codimension
varieties. In order to practically apply this strategy, we introduced $p\kern
0.80002pt\text{-adic}$ numbers, which make it possible to balance the
stability benefits of finite fields with the a non-trivial measure of size in
the number field. With this numerical tool, we constructed an algorithm to
classify the set of symbolic powers to which the numerators of rational
prefactors belong, thereby allowing us to construct the refined Ansätze. These
Ansätze have a strongly reduced number of free parameters that need to be
fixed by numerical evaluations over finite fields. As an example application,
we reconsidered the two-loop finite remainders for the production of three
photons at hadron colliders. We studied them on both codimension-one and
codimension-two singular varieties, and built Ansätze that we organized in a
way reminiscent of a partial-fraction decomposition. We then constrained these
Ansätze using remarkably few evaluations to reconstruct the analytic form of
the rational prefactors.

A number of future directions deserve to be explored. Firstly, it is clear
that the behavior of rational prefactors in gauge theory amplitudes on higher
codimension singular varieties is highly non-trivial. It would be interesting
to understand the physical origin of this behavior. Secondly, it would be
interesting to investigate other techniques for constructing primary
decompositions, such as those discussed in Ref. bates2014comparison . Thirdly,
an important question that we leave to future work is to understand how modern
numerical algorithms for scattering amplitude calculation, such as numerical
unitarity, behave when then number field is taken to be the $p\kern
0.80002pt\text{-adic}$ numbers. Finally, it would also be interesting to
consider evaluating rational prefactors near higher codimension varieties,
simplifying the linear system which needs to be solved to fit the Ansatz in an
approach similar to that of Ref. DeLaurentis:2019phz . Altogether, we foresee
applications to as-yet unknown scattering amplitudes.

## Acknowledgements

We thank Samuel Abreu, Gauthier Durieux, Harald Ita, Fernando Febres Cordero,
David Kosower, Daniel Maître and Vasily Sotnikov for useful discussions and/or
collaboration on related topics. We thank Harald Ita, Daniel Maître and Vasily
Sotnikov for comments on the draft. This project has received funding from the
European’s Union Horizon 2020 research and innovation programme LoopAnsatz
(grant agreement number 896690) as well as the French Agence Nationale pour la
Recherche, under grant ANR–17–CE31–0001–01.

##  Appendix A Glossary of Algebraic-Geometry Terms

In this appendix, we recall some of the algebraic definitions of a number of
properties that ideals may have, alongside some useful operations on ideals. A
pedagogical introduction to this material can be found in Ref. cox1994ideals .
To avoid repetition, in the following let $A$ be a commutative Noetherian
ring, $J$ and $K$ be ideals of $A$, and $a$ and $b$ be elements of $A$.

##### Properties

We start by reviewing a number of algebraic properties. First, recall that in
Eq. (29) we introduced the concept of an ideal being radical by noting that,
in an algebraically-closed field, it is equivalent to the ideal of the variety
of the ideal itself. The algebraic definition of radicality is

$J\text{ is {\bf radical} if }a^{k}\in J\;\Rightarrow\;a\in J\,.$ (193)

Second, recall that in Eq. (80) we defined the irreducibility property for
varieties, and in Eq. (82) we introduced prime ideals as those ideals
corresponding to irreducible varieties. The algebraic definition is

$J\text{ is {\bf prime} if }ab\in J\;\Rightarrow\;\text{either }a\in J\text{
or }b\in J\,.$ (194)

While radical ideals can be uniquely decomposed as the intersection of prime
ideals, the same is not true for non-radical ideals.

This leads us to the third property we discuss here, as we recall from Eq.
(83) that an arbitrary ideal can be decomposed as an intersection of primary
ideals. The algebraic definition is

$J\text{ is {\bf primary} if }ab\in J\;\Rightarrow\;\text{either }a\in J\text{
or }b^{k}\in J\,.$ (195)

Note that this definition is secretly symmetric because if $A$ is commutative,
then the roles of $a$ and $b$ can be reversed. We see from considering Eqs.
(193) and (194) that a prime ideal is both radical and primary. Also, while
the radical of a primary ideal is a prime ideal, not all primaries are
necessarily powers of primes, e.g. $\left\langle x^{2},y\right\rangle$ is
primary with associated prime $\left\langle x,y\right\rangle$, but the former
is not a power of the latter.

Finally, in Eq. (94) we introduced a special class of prime ideals: maximal
ideals. The algebraic definition of such an ideal is

$J\text{ is {\bf maximal} if there is no proper ideal }K\text{ of }A\text{
such that }J\subset K\,.$ (196)

If the field is algebraically closed then the variety associated to a maximal
ideal corresponds to a single point.

##### Operations

We now review three relevant operations on ideals. First, Eq. (193) suggests a
definition of the radical operation $\sqrt{J}$ namely

$\sqrt{J}=\\{a:a^{k}\in J\;\,\text{for some}\;\,k\in\mathbb{Z}_{>0}\\}\,.$
(197)

We can say that $J$ is radical if $J=\sqrt{J}$. Starting from this definition,
the equivalence in Eq. (29) is Hilbert’s Strong Nullstellensatz (see Chapter 4
of cox1994ideals ).

Second, we discuss the ideal quotient $J:K$ of two ideals $J$ and $K$, defined
as

$J:K=\\{r\in A\;\quad\text{such that}\quad\;rK\subseteq J\\}\,.$ (198)

If $J$ is a radical ideal, then there is a geometric interpretation of the
ideal quotient $J:K$. Specifically, for ideals $J$ and $K$ over an
algebraically closed field, where $J$ is a radical ideal, it can be shown that
(cox1994ideals, , Section 4.4, Corollary 11)

$V(J:K)=\overline{V(J)\backslash V(K)}\,,$ (199)

where the overline on the right hand side denotes the Zariski closure.
Geometrically, one can see that the ideal quotient can be useful to simplify
primary decompositions (see Appendix B.1).

Third, as not all ideals $J$ are radical, it is useful to introduce also the
concept of ideal saturation. It consists of iterated ideal quotienting until
the result is unchanged

$J:K^{\infty}=J:K^{s}\quad\text{such that}\quad J:K^{s}=J:K^{s+1}\,.$ (200)

The smallest such exponent $s$ is called the saturation index. We find it
useful to define $J:a^{\infty}$ for a single element $a$ of $A$ as $J:\langle
a\rangle^{\infty}$. The geometric analogue of saturation is set difference of
varieties. Specifically, for two ideals $J$ and $K$ over an algebraically
closed field we have (cox1994ideals, , Section 4.4, Theorem 10)

$V(J:K^{\infty})=\overline{V(J)\backslash V(K)}\,,$ (201)

where the overline on the right hand side again denotes the Zariski closure.
Note that Eq. (201) generalizes Eq. (199), in that there is no requirement of
radicality of $J$.

##  Appendix B Primary-Decomposition Techniques

In this section, we provide details of the techniques used to perform the
primary decompositions presented in Eqs. (179) to (184). While there exist
general algorithms for primary decomposition (see e.g. Chapter 8 of Ref.
becker2012groebner ), due to the high dimensionality of the ideals we
consider, it is often convenient to exploit more tailored but less algorithmic
approaches. We show that to reproduce the results of Section 5.1 it is
sufficient to apply a primary decomposition algorithm, to just the ideal
$\big{\langle}\langle 12\rangle,\langle 13\rangle\big{\rangle}_{R_{5}}$. Using
the implementation of the algorithm of Gianni, Trager and Zacharias (GTZ)
gianni1988grobner  under the primdecGTZ command of Singular, this operation
only takes a few seconds. Subsequently, one can use ideal saturation alongside
a check of primality to find the remaining primary components.

We begin in Section B.1 with a discussion of the effect of ideal saturation on
primary decompositions. In Section B.2 we review the concepts of extension and
contraction. This then allows us to construct a test for proving that an ideal
is prime in Section B.3.

###  B.1 Primary Decompositions and Saturation

Ideal saturation is intimately related to removal of sub-varieties from a
larger variety. It is then interesting to consider how we can use this
geometric intuition to simplify a primary decomposition calculation when we
already have some understanding of the involved varieties.

Let us first set up the problem in the algebraic context, and then consider
the geometric interpretation. In the following we will work in a polynomial
ring, and suppress the ring label on ideals for simplicity. Consider an ideal
$J$, its primary decomposition reads

$J=\bigcap_{i=1}^{n_{Q}(J)}Q_{i}\,,\;\,\text{with}\;\;\sqrt{Q_{i}}=P_{i}\,,$
(202)

where each $Q_{i}$ is a primary ideal. At this stage, we may or may not know
explicit generating sets of the primaries $Q_{i}$ and the associated primes
$P_{i}$. We wish to consider the effect that saturation by an ideal $K$ has on
$J$ and on its primary decomposition. To this end, we recall that ideal
saturation commutes with ideal intersection, i.e. for any ideal $K$ we can
write

$J:K^{\infty}=\bigcap_{i=1}^{n_{Q}(J)}(Q_{i}:K^{\infty})\,.$ (203)

It is therefore sufficient to understand the effect of ideal saturation on
each primary component.

Consider now the case where $K$ is generated by a single polynomial $f$. It
follows from Ref. (books/daglib/0091700, , Lemma 4.4) that there are only two
possible outcomes of saturation by $\langle f\rangle$, either

$\displaystyle\begin{split}&1)\,f\in\sqrt{Q_{i}},\quad\Rightarrow\quad
Q_{i}:\langle f\rangle^{\infty}=\langle 1\rangle\,,\\\
&2)\,f\not\in\sqrt{Q_{i}},\quad\Rightarrow\quad Q_{i}:\langle
f\rangle^{\infty}=Q_{i}\,.\end{split}$ (204)

Let us consider this geometrically. In case 1, the variety $V(f)$ contains
$V(P_{i})$. Hence, by Eq. (201) it removes the variety. In case 2, $V(f)$ does
not contain $V(P_{i})$, but it may still intersect it on some higher
codimension variety. The removal of this higher codimension variety is,
however, “filled back in” by the Zariski closure, and we get the same result
back.

Let us now consider what happens if we saturate by a more general ideal.
First, recall that saturation by an ideal is the intersection of the
saturation by the generators (cox1994ideals, , Chapter 4.4, Proposition 13),
i.e.

$J:\langle f_{1},\ldots,f_{m}\rangle^{\infty}=\bigcap_{i=1}^{m}J:\langle
f_{i}\rangle^{\infty}\,.$ (205)

Let $K=\langle f_{1},\ldots,f_{m}\rangle$. The result of $Q_{i}:K^{\infty}$
now has one of two possibilities:

$\displaystyle\begin{split}&1)\text{ Every generator of }K\text{ is in
}\sqrt{Q_{i}}\quad\Rightarrow\quad Q_{i}:K^{\infty}=\langle 1\rangle\,,\\\
&2)\text{ Some generator of }K\text{ is {\em not} in
}\sqrt{Q_{i}}\quad\Rightarrow\quad Q_{i}:K^{\infty}=Q_{i}\,.\end{split}$ (206)

If we consider these results in the context of Eq. (203), we see that we can
quite generally use saturation to remove primary components in a controlled
manner.

We now discuss how we derived the results of Eqs. (179) to (184). We make use
of the following heuristic procedure. Consider an ideal $J$ and a sequence of
primary ideals $\\{K_{1},\ldots,K_{n}\\}$. Define

$J_{i}=J_{i-1}:K_{i}^{\infty}\quad\text{and}\quad J_{0}=J.$ (207)

We know from the above discussion that each of the $J_{i}$ admits a primary
decomposition with potentially fewer primary components $J_{i-1}$. This occurs
because the saturation by $K_{i}$ has potentially removed a subset of the
primary components. We consider the final element of the sequence, $J_{n}$, as
a candidate for a primary component of $J$. We (heuristically) check that
$J_{n}$ is primary by checking that it is prime using the test in Appendix
B.3. If this is the case, we also consider the $K_{i}$ for which $J_{i}\neq
J_{i-1}$ as other good candidates for primary components of $J$ and construct
a tentative primary decomposition of $J$ given by

$J^{\prime}=J_{n}\cap\left(\bigcap_{i:J_{i}\neq J_{i-1}}K_{i}\right).$ (208)

We then check if Eq. (208) is indeed a primary decomposition of $J$ by
computing $J^{\prime}$ and checking if $J^{\prime}=J$. To derive the results
of Section 5.1, we apply the procedure to each co-dimension two ideal of which
we wish to obtain a primary decomposition, taking the set of $K_{i}$ to be the
set of permutations/parity conjugates of $\mathrm{assoc}(\big{\langle}\langle
12\rangle,\langle 13\rangle\big{\rangle}_{R_{5}})$, which we compute using the
command primdecGTZ in Singular. While this procedure is heuristic, it was
sufficient to derive and prove the results of Eqs. (179) to (184).

###  B.2 Extension and Contraction

In order to set up our approach to check if an ideal is prime, we first
introduce two concepts of fundamental importance, namely extension and
contraction. In this appendix, we mostly follow Ref. (becker2012groebner, ,
Chapter 8.7).

Let us consider the polynomial ring $\mathbb{F}[\underline{X}]$ with
$\underline{X}=\\{X_{1},\ldots,X_{n}\\}$, an ideal
$J\subseteq\mathbb{F}[\underline{X}]$ generated by the polynomials
$\\{p_{1},\dots,p_{n}\\}$, and let us split $\underline{X}$ into two disjoint
sets $\underline{Y}$ and $\underline{Z}$. The extension of $J$, denoted as
$J^{e}$, is defined as the ideal generated by the infinite set $J$ in
$\mathbb{F}(\underline{Y})[\underline{Z}]$, that is in the polynomial ring in
$\underline{Z}$ over the field of fractions $\mathbb{F}(\underline{Y})$. A
more practical but nevertheless equivalent definition of $J^{e}$ can be taken
to be

$J^{e}=\big{\langle}p_{1},\dots,p_{n}\big{\rangle}_{\mathbb{F}(\underline{Y})[\underline{Z}]}\,.$
(209)

The original polynomial ring is contained in the new one, i.e.
$\mathbb{F}[\underline{X}]\subset\mathbb{F}(\underline{Y})[\underline{Z}]$,
since in the latter polynomials in the variables $\underline{Y}$ are also
allowed to be denominators. We will refer to $F[\underline{X}]$ as the
original ring, and to $F(\underline{Y})[\underline{Z}]$ as the extended ring.

Given an ideal $J$ of $\mathbb{F}(\underline{Y})[\underline{Z}]$, we define
the contraction of $J$ as the ideal $J^{c}$ through

$J^{c}=J\cap\mathbb{F}[\underline{X}]\,.$ (210)

As we return to the original ring, contraction could be considered as a type
of inverse operation to extension. Considering Eq. (210), we see that given an
ideal $J$ of the extended ring, its contraction is the subset of polynomials
in $J$ which do not involve denominators. We stress that this definition can
of course be applied to any ideal of
$\mathbb{F}(\underline{Y})[\underline{Z}]$, not just those obtained from
extensions of ideals in $\mathbb{F}[\underline{X}]$. It can be shown that the
contraction operation commutes with intersection, that is for two ideals
$J_{1},\,J_{2}$ of $\mathbb{F}(\underline{Y})[\underline{Z}]$ we have
(becker2012groebner, , Lemma 8.97)

$\left(J_{1}\cap J_{2}\right)^{c}=J_{1}^{c}\cap J_{2}^{c}\,.$ (211)

Contraction can be computed by means of ideal saturation (becker2012groebner,
, Lemma 8.91). Consider an ideal $K$ of
$\mathbb{F}(\underline{Y})[\underline{Z}]$, and a Gröbner basis
$\mathcal{G}(K)$ such that $\mathcal{G}(K)$ does not involve any denominator,
$K^{c}$ can be computed through

$K^{c}=\big{\langle}\mathcal{G}(K)\big{\rangle}_{F[\underline{X}]}:f^{\infty}\,.$
(212)

We stress that here $\mathcal{G}(K)$ is now being used to generate an ideal in
the original ring, rather than the extended ring. Here $f$ is a polynomial
defined as

$f=\text{lcm}\\{\text{HC}(g)\in\mathbb{F}[\underline{Y}]\;:\;g\,\in\,\mathcal{G}(K)\\}\,,$
(213)

where HC denotes the head coefficient, which is the coefficient of the lead
monomial (LM) defined in Eq. (40), and lcm stands for least common multiple.
Starting from a reduced Gröbner basis $\mathcal{G}_{R}(K)$131313A reduced
Gröbner basis has unit head coefficients., we can obtain a Gröbner basis
$\mathcal{G}(K)$ which is free of denominators by multiplying through each
entry of $\mathcal{G}_{R}(K)$ by the lcm of its denominators. Therefore, the
polynomial $f$ can be thought of as the lcm of all denominators of
$\mathcal{G}_{R}(K)$.

It is interesting to consider what happens if one takes an ideal $J$, performs
extension, and then contraction thereafter. Together, the two operations
constitute a map
$J\subseteq\mathbb{F}[\underline{X}]\;\rightarrow\;J^{ec}\subseteq\mathbb{F}[\underline{X}]$,
where we denote the extended-contracted ideal as $J^{ec}$. It can be shown
that $J\subseteq J^{ec}$, while the reverse inclusion is in general not true.
Therefore, we see that contraction is not the inverse of extension, as some
information may be lost.

Let us now consider how to compute the ideal $J^{ec}$ directly from $J$. To
this end, we introduce a particular “block” ordering $\succeq$, where
$\underline{Z}\succ\underline{Y}$. Using this ordering, we construct
$\mathcal{G}_{\succeq}(J)$, a Gröbner basis of $J$ in the original ring with
respect to $\succeq$. It can be shown that $\mathcal{G}_{\succeq}(J)$ is also
a Gröbner basis of $J^{e}$ in the extended ring (becker2012groebner, , Lemma
8.93). The fact that we have a single set of polynomials which is a generating
set of $J$ and $J^{e}$ in their respective rings allows us to relate $J^{ec}$
to $J$. To this end, we turn to Eq. (213), and take $K=J^{e}$. We see that
$\mathcal{G}(K)$ can be taken as $\mathcal{G}_{\succeq}(J)$ as
$\mathcal{G}_{\succeq}(J)$ is a Gröbner basis of an ideal in the extended
ring, $J^{e}$, that has no denominators. Furthermore, this means that
$\mathcal{G}_{\succeq}(J)$ can be used to compute the polynomial $f$ of Eq.
(213). Finally, recall that
$\big{\langle}\mathcal{G}_{\succeq}(J)\big{\rangle}_{F[\underline{X}]}=J$, so
we can take the ideal $J$ itself in the right hand side of Eq. (213).
Therefore, the extended-contracted ideal can be computed as

$J^{ec}=J:f^{\infty}\,.$ (214)

It is interesting to ask if we can recover $J$, given $J^{ec}$. The answer to
this question lies in the following splitting lemma (becker2012groebner, ,
Lemma 8.95)

$J=(J+f^{s})\cap(J:f^{s})\,,$ (215)

where $s$ is the saturation index defined in Eq. (200). While this splitting
lemma holds for any polynomial $f$, if we take $f$ according to Eq. (213) then
the right-hand term $J:f^{s}$ in the intersection is nothing but the extended-
contracted ideal $J^{ec}$. Therefore, we obtain an expression for $J$ in terms
of $J^{ec}$.

###  B.3 A Primality Test for Equi-dimensional Ideals

In this section, we make use of the extension/contraction operations to arrive
at a test for checking whether a certain class of ideals is prime.
Specifically, we will consider ideals which we know to be equi-dimensional.
These are ideals for which every element of the primary decomposition has the
same dimension as the original ideal, that is, there are no embedded
components. This class of ideals is sufficient for our use case as the ideals
which form the set $\mathfrak{D}^{(2)}$ at five-point are all equi-dimensional
(see Eq. (154) and Section 5.1). Specifically, consider a maximal-codimension
ideal $J$ in a Cohen–Macaulay ring, such as $R_{n}$. Then, it follows that $J$
is equi-dimensional (matsumura_1987, , Theorem 17.6). Crucially, as all ideals
$P_{i}$ in Eqs. (179) to (184) can be computed as saturations of an equi-
dimensional ideal, they must also be equi-dimensional.

To determine if an equi-dimensional ideal $J$ is prime, we recall that

$J=(J+f^{s})\cap J^{ec}\,,$ (216)

where the polynomial $f$ is defined according to Eq. (213) and
$J^{e}\subset\mathbb{F}(\underline{Y})[\underline{Z}]$. For the purposes of
our test, we stress that $\underline{Y}$ is a maximally independent set of
$J$, such that $J^{e}$ is a zero-dimensional ideal. We are going to test the
left-hand term $(J+f^{s})$ for redundancy in the intersection, and the right-
hand term $J^{ec}$ for reducibility. Given equi-dimensionality, by definition
no primary component of $J$ can have lower dimensionality. Therefore, if
either term in the intersection is of lower dimensionality then it must be
redundant. This implies that

$J\;\,\text{is prime iff}\;\,J^{ec}\;\,\text{is prime
and}\;\,\text{dim}(J+f^{s})<\text{dim}(J)\,.$ (217)

To check if $J^{ec}$ is prime, we can use that $J^{e}$ being prime implies
that $J^{ec}$ is prime as well (becker2012groebner, , Lemma 8.97). The easiest
way to check if $J^{e}\subseteq F(\underline{Y})[\underline{Z}]$ is prime is
to check if a (reduced) lexicographical Gröbner basis of $J^{e}$ takes the
form

$\mathcal{G}(J^{e})=\\{Z_{1}-\zeta_{1}(\underline{Y}),\ldots,Z_{n}-\zeta_{n}(\underline{Y})\\}\,,$
(218)

where $\zeta_{i}\in\mathbb{F}(\underline{Y})$. If this is the case then
$J^{e}$ is a maximal ideal and maximal ideals are prime. This check can be
done semi-numerically by taking $\underline{Y}$ in a finite field, as in
Section 3.2.

We then want to show that $(J+f^{s})$ is redundant in the intersection. Since
$J$ is equi-dimensional, this is the case if $(J+f^{s})$ is of lower
dimension. So redundancy can be reduced to dimension testing for $(J+f^{s})$.
However, computing the dimensionality of $(J+f^{s})$ can be quite
computationally expensive if the polynomial $f$ is of high degree. However, we
can make use of a further splitting lemma embedded in Ref.
(becker2012groebner, , Lemma 8.52). Consider $ab\in I$. Let $\mu$ be the
saturation index of $b$ in $I$, then

$I=(I+a)\cap(I+b^{\mu})\,.$ (219)

Therefore, it is sufficient to check that the dimensionality of $(J+f_{i})$
drops for each factor $f_{i}$ of $f$. Furthermore, there may be several
$\underline{Y}$ such that the associated $J^{e}$ is manifestly maximal. Thus,
there is some freedom in the choice of $\underline{Y}$. It can be helpful to
iterate through all choices of $\underline{Y}$ such that $J^{e}$ is maximal
and choose that with the simplest $f$.

Lastly, let us stress that failure to find a linear Gröbner basis for $J^{e}$
does not imply reducibility of $V(J)$, while it can be shown that failure of
$(J+f^{s})$ to drop in dimension does imply reducibility of $V(J)$. Using this
test, together with ideal intersection, one can easily and efficiently prove
the primary decompositions given in Section 5.1.

##  Appendix C The Bracket Polynomial Quotient Ring

In Section 2.2, we claimed that the ring of polynomials that only pick up
little-group scalings under Lorentz transformations, $\mathcal{R}_{n}$, is
isomorphic to $\mathcal{R}_{n}^{(q)}$, a quotient ring of the polynomial ring
$\mathcal{S}_{n}$. In this appendix, we develop this statement mathematically.

We begin by connecting $\mathcal{S}_{n}$ to $R_{n}$. We use a ring
homomorphism $\phi:\,\mathcal{S}_{n}\,\rightarrow\,R_{n}$, that acts on the
variables in $\mathcal{S}_{n}$ as

$\displaystyle\phi(\langle
ij\rangle)=\lambda_{i1}\lambda_{j0}-\lambda_{i0}\lambda_{j1}\quad\;\text{and}\quad\;\phi([ij])=\tilde{\lambda}_{i\dot{0}}\tilde{\lambda}_{j\dot{1}}-\tilde{\lambda}_{i\dot{1}}\tilde{\lambda}_{j\dot{0}}\,.$
(220)

We note that as $\phi$ is a ring homomorphism, for all $a,b\in\mathcal{S}_{n}$
it satisfies $\phi(ab)=\phi(a)\phi(b)$ and $\phi(a+b)=\phi(a)+\phi(b)$.
Therefore it is sufficient to define the action of $\phi$ on the variables of
$\mathcal{S}_{n}$. Physically, it is clear that the map $\phi$ is re-
expressing any polynomial in spinor brackets in terms of the spinor variables.
That is, $\phi$ implements Eq. (4). Let us now consider the image of the map
$\phi$ in $R_{n}$. By construction, it is the requisite subset of $R_{n}$,
i.e.

$\mathcal{R}_{n}=\\{\phi(x):x\in\mathcal{S}_{n}\\}\,.$ (221)

By the so-called “second isomorphism theorem” (becker2012groebner, , Corollary
1.56) this means that

$\mathcal{R}_{n}\cong\mathcal{S}_{n}/\mathrm{ker}(\phi)\,.$ (222)

That is, the image of $\phi$, $\mathcal{R}_{n}$, is isomorphic to the quotient
of $\mathcal{S}_{n}$ by the kernel of the map $\phi$. In other words,
physically inequivalent polynomials in spinor brackets can be identified with
the elements of $\mathcal{S}_{n}$ which are inequivalent modulo the elements
of $\mathcal{S}_{n}$ which $\phi$ maps to zero.

Given an ideal $J$ of $R_{n}$, let us now consider how to construct the ideal
$J\cap\mathcal{R}_{n}$ of $\mathcal{R}_{n}$. To this end, consider a
homomorphism $\phi^{\prime}:\mathcal{S}_{n}\rightarrow
S_{n}/[\pi^{-1}_{S_{n},R_{n}}(J)]$, where $\phi^{\prime}$ takes the same form
as Eq. (220), but where the right hand side is considered in
$S_{n}/[\pi^{-1}_{S_{n},R_{n}}(J)]$. The kernel of $\phi^{\prime}$ is an ideal
of $\mathcal{S}_{n}$ consisting of all polynomials in spinor brackets that map
to elements of $J$. Importantly, $\ker(\phi^{\prime})$ contains $\ker(\phi)$
and so
$\pi_{\mathcal{S}_{n},\mathcal{S}_{n}/\mathrm{ker}(\phi)}[\ker(\phi^{\prime})]$
is the associated ideal in the quotient ring $\mathcal{S}_{n}/\ker(\phi)$. We
have therefore constructed an ideal of $\mathcal{R}_{n}$ by Eq. (222).

To be able to make practical computations with functions of spinor brackets,
we must be able to identify the kernel of ring homomorphisms. It turns out
that kernels of homomorphisms similar to $\phi$ and $\phi^{\prime}$ can be
computed with Gröbner basis techniques. In full generality, consider a ring
homomorphism

$\psi\,\,:\,\,\mathbb{F}[X_{1},\ldots,X_{n}]\quad\longrightarrow\quad\mathbb{F}[Y_{1},\ldots,Y_{m}]/\langle
a_{1},\ldots,a_{k}\rangle_{\mathbb{F}[Y_{1},\ldots,Y_{m}]}\,,$ (223)

where we know explicit representatives in $\mathbb{F}[Y_{1},\ldots,Y_{m}]$ of
the $\psi(X_{i})$. Now, define the ideal

$\mathcal{K}=\langle
a_{1},\ldots,a_{k},X_{1}-\psi(X_{1}),\ldots,X_{n}-\psi(X_{n})\rangle_{\mathbb{F}[X_{1},\ldots,X_{n},Y_{1},\ldots,Y_{m}]}\,,$
(224)

where by $\psi(X_{i})$ we mean a representative in
$\mathbb{F}[Y_{1},\ldots,Y_{m}]$. It can then be shown that
(eisenbud1995commutative, , Proposition 15.30)

$\mathrm{ker}(\psi)=\mathcal{K}\cap\mathbb{F}[X_{1},\ldots,X_{n}]\,.$ (225)

## References

  * (1) A. von Manteuffel and R. M. Schabinger, _A novel approach to integration by parts reduction_ , _Phys. Lett. B_ 744 (2015) 101 [1406.4513].
  * (2) T. Peraro, _Scattering amplitudes over finite fields and multivariate functional reconstruction_ , _JHEP_ 12 (2016) 030 [1608.01902].
  * (3) J. Klappert and F. Lange, _Reconstructing rational functions with FireFly_ , _Comput. Phys. Commun._ 247 (2020) 106951 [1904.00009].
  * (4) J. Klappert, S. Y. Klein and F. Lange, _Interpolation of dense and sparse rational functions and other improvements in FireFly_ , _Comput. Phys. Commun._ 264 (2021) 107968 [2004.01463].
  * (5) S. Abreu, F. F. Cordero, H. Ita, M. Klinkert, B. Page and V. Sotnikov, _Leading-Color Two-Loop Amplitudes for Four Partons and a W Boson in QCD_ , 2110.07541.
  * (6) T. Peraro, _FiniteFlow: multivariate functional reconstruction using finite fields and dataflow graphs_ , _JHEP_ 07 (2019) 031 [1905.08019].
  * (7) S. Abreu, L. J. Dixon, E. Herrmann, B. Page and M. Zeng, _The two-loop five-point amplitude in $\mathcal{N}=4$ super-Yang-Mills theory_, _Phys. Rev. Lett._ 122 (2019) 121603 [1812.08941].
  * (8) D. Chicherin, T. Gehrmann, J. M. Henn, P. Wasser, Y. Zhang and S. Zoia, _Analytic result for a two-loop five-particle amplitude_ , _Phys. Rev. Lett._ 122 (2019) 121602 [1812.11057].
  * (9) S. Abreu, L. J. Dixon, E. Herrmann, B. Page and M. Zeng, _The two-loop five-point amplitude in $\mathcal{N}$ = 8 supergravity_, _JHEP_ 03 (2019) 123 [1901.08563].
  * (10) D. Chicherin, T. Gehrmann, J. M. Henn, P. Wasser, Y. Zhang and S. Zoia, _The two-loop five-particle amplitude in $\mathcal{N}$ = 8 supergravity_, _JHEP_ 03 (2019) 115 [1901.05932].
  * (11) S. Badger, C. Brønnum-Hansen, H. B. Hartanto and T. Peraro, _Analytic helicity amplitudes for two-loop five-gluon scattering: the single-minus case_ , _JHEP_ 01 (2019) 186 [1811.11699].
  * (12) S. Abreu, J. Dormans, F. Febres Cordero, H. Ita and B. Page, _Analytic Form of Planar Two-Loop Five-Gluon Scattering Amplitudes in QCD_ , _Phys. Rev. Lett._ 122 (2019) 082002 [1812.04586].
  * (13) S. Abreu, J. Dormans, F. Febres Cordero, H. Ita, B. Page and V. Sotnikov, _Analytic Form of the Planar Two-Loop Five-Parton Scattering Amplitudes in QCD_ , _JHEP_ 05 (2019) 084 [1904.00945].
  * (14) S. Abreu, F. F. Cordero, H. Ita, B. Page and V. Sotnikov, _Leading-color two-loop QCD corrections for three-jet production at hadron colliders_ , _JHEP_ 07 (2021) 095 [2102.13609].
  * (15) S. Badger, D. Chicherin, T. Gehrmann, G. Heinrich, J. M. Henn, T. Peraro et al., _Analytic form of the full two-loop five-gluon all-plus helicity amplitude_ , _Phys. Rev. Lett._ 123 (2019) 071601 [1905.03733].
  * (16) H. A. Chawdhry, M. L. Czakon, A. Mitov and R. Poncelet, _NNLO QCD corrections to three-photon production at the LHC_ , _JHEP_ 02 (2020) 057 [1911.00479].
  * (17) S. Abreu, B. Page, E. Pascual and V. Sotnikov, _Leading-Color Two-Loop QCD Corrections for Three-Photon Production at Hadron Colliders_ , _JHEP_ 01 (2021) 078 [2010.15834].
  * (18) H. A. Chawdhry, M. Czakon, A. Mitov and R. Poncelet, _Two-loop leading-color helicity amplitudes for three-photon production at the LHC_ , _JHEP_ 06 (2021) 150 [2012.13553].
  * (19) B. Agarwal, F. Buccioni, A. von Manteuffel and L. Tancredi, _Two-loop leading colour QCD corrections to $q\bar{q}\to\gamma\gamma g$ and $qg\to\gamma\gamma q$_, _JHEP_ 04 (2021) 201 [2102.01820].
  * (20) B. Agarwal, F. Buccioni, A. von Manteuffel and L. Tancredi, _Two-Loop Helicity Amplitudes for Diphoton Plus Jet Production in Full Color_ , _Phys. Rev. Lett._ 127 (2021) 262001 [2105.04585].
  * (21) H. A. Chawdhry, M. Czakon, A. Mitov and R. Poncelet, _Two-loop leading-colour QCD helicity amplitudes for two-photon plus jet production at the LHC_ , _JHEP_ 07 (2021) 164 [2103.04319].
  * (22) S. Badger, C. Brønnum-Hansen, D. Chicherin, T. Gehrmann, H. B. Hartanto, J. Henn et al., _Virtual QCD corrections to gluon-initiated diphoton plus jet production at hadron colliders_ , _JHEP_ 11 (2021) 083 [2106.08664].
  * (23) S. Badger, H. B. Hartanto and S. Zoia, _Two-Loop QCD Corrections to Wbb¯ Production at Hadron Colliders_ , _Phys. Rev. Lett._ 127 (2021) 012001 [2102.02516].
  * (24) S. Badger, H. B. Hartanto, J. Kryś and S. Zoia, _Two-loop leading-colour QCD helicity amplitudes for Higgs boson production in association with a bottom-quark pair at the LHC_ , _JHEP_ 11 (2021) 012 [2107.14733].
  * (25) S. Badger, H. B. Hartanto, J. Kryś and S. Zoia, _Two-loop leading colour helicity amplitudes for $W^{\pm}\gamma+j$ production at the LHC_, 2201.04075.
  * (26) F. Caola, A. Von Manteuffel and L. Tancredi, _Diphoton Amplitudes in Three-Loop Quantum Chromodynamics_ , _Phys. Rev. Lett._ 126 (2021) 112004 [2011.13946].
  * (27) F. Caola, A. Chakraborty, G. Gambuti, A. von Manteuffel and L. Tancredi, _Three-loop helicity amplitudes for four-quark scattering in massless QCD_ , _JHEP_ 10 (2021) 206 [2108.00055].
  * (28) P. Bargiela, F. Caola, A. von Manteuffel and L. Tancredi, _Three-loop helicity amplitudes for diphoton production in gluon fusion_ , 2111.13595.
  * (29) T. Gehrmann, J. M. Henn and N. A. Lo Presti, _Pentagon functions for massless planar scattering amplitudes_ , _JHEP_ 10 (2018) 103 [1807.09812].
  * (30) G. De Laurentis and D. Maître, _Extracting analytical one-loop amplitudes from numerical evaluations_ , _JHEP_ 07 (2019) 123 [1904.04067].
  * (31) M. Heller and A. von Manteuffel, _MultivariateApart: Generalized partial fractions_ , _Comput. Phys. Commun._ 271 (2022) 108174 [2101.08283].
  * (32) G. De Laurentis and D. Maître, _Two-Loop Five-Parton Leading-Colour Finite Remainders in the Spinor-Helicity Formalism_ , _JHEP_ 02 (2021) 016 [2010.14525].
  * (33) E. K. Leinartas, _Factorization of rational functions of several variables into partial fractions_ , _Izvestiya Vysshikh Uchebnykh Zavedenii. Matematika_ (1978) 47.
  * (34) A. Raichev, _Leinartas’s partial fraction decomposition_ , _arXiv preprint arXiv:1206.4740_ (2012) .
  * (35) A. Pak, _The Toolbox of modern multi-loop calculations: novel analytic and semi-analytic techniques_ , _J. Phys. Conf. Ser._ 368 (2012) 012049 [1111.0868].
  * (36) C. Meyer, _Transforming differential equations of multi-loop Feynman integrals into canonical form_ , _JHEP_ 04 (2017) 006 [1611.01087].
  * (37) J. Boehm, M. Wittmann, Z. Wu, Y. Xu and Y. Zhang, _IBP reduction coefficients made simple_ , _JHEP_ 12 (2020) 054 [2008.13194].
  * (38) G. De Laurentis, _Analytical amplitudes from numerical solutions of the scattering equations_ , _JHEP_ 02 (2020) 194 [1910.11355].
  * (39) L. Budge, J. M. Campbell, G. De Laurentis, R. K. Ellis and S. Seth, _The one-loop amplitudes for Higgs + 4 partons with full mass effects_ , _JHEP_ 05 (2020) 079 [2002.04018].
  * (40) J. M. Campbell, G. De Laurentis, R. K. Ellis and S. Seth, _The pp → W(→ l $\nu$) + $\gamma$ process at next-to-next-to-leading order_, _JHEP_ 07 (2021) 079 [2105.00954].
  * (41) S. Badger, H. Frellesvig and Y. Zhang, _Hepta-Cuts of Two-Loop Scattering Amplitudes_ , _JHEP_ 04 (2012) 055 [1202.2019].
  * (42) Y. Zhang, _Integrand-Level Reduction of Loop Amplitudes by Computational Algebraic Geometry Methods_ , _JHEP_ 09 (2012) 042 [1205.5707].
  * (43) P. Mastrolia, E. Mirabella, G. Ossola and T. Peraro, _Scattering Amplitudes from Multivariate Polynomial Division_ , _Phys. Lett. B_ 718 (2012) 173 [1205.7087].
  * (44) J. Gluza, K. Kajda and D. A. Kosower, _Towards a Basis for Planar Two-Loop Integrals_ , _Phys. Rev. D_ 83 (2011) 045012 [1009.0472].
  * (45) O. Zariski, _A fundamental lemma from the theory of holomorphic functions on an algebraic variety_ , _Annali di Matematica Pura ed Applicata_ 29 (1949) 187.
  * (46) M. Nagata, _Local rings_ , _Interscience Publishers_ (1962) .
  * (47) D. Eisenbud and M. Hochster, _A nullstellensatz with nilpotents and zariski’s main lemma on holomorphic functions_ , _Journal of Algebra_ 58 (1979) 157.
  * (48) F. Q. Gouvêa, _p-adic Numbers, an Introduction_ , Universitext. Springer, 1997, 10.1007/978-3-642-59058-0.
  * (49) S. Catani, _The Singular behavior of QCD amplitudes at two loop order_ , _Phys. Lett. B_ 427 (1998) 161 [hep-ph/9802439].
  * (50) T. Becher and M. Neubert, _Infrared singularities of scattering amplitudes in perturbative QCD_ , _Phys. Rev. Lett._ 102 (2009) 162001 [0901.0722].
  * (51) E. Gardi and L. Magnea, _Factorization constraints for soft anomalous dimensions in QCD scattering amplitudes_ , _JHEP_ 03 (2009) 079 [0901.1091].
  * (52) T. Becher and M. Neubert, _On the Structure of Infrared Singularities of Gauge-Theory Amplitudes_ , _JHEP_ 06 (2009) 081 [0903.1126].
  * (53) N. Agarwal, L. Magnea, C. Signorile-Signorile and A. Tripathi, _The Infrared Structure of Perturbative Gauge Theories_ , 2112.07099.
  * (54) D. Cox, J. Little and D. O’Shea, _Ideals, Varieties, and Algorithms_ , Undergraduate Texts in Mathematics. Springer, 4 ed., 2015, 10.1007/978-3-319-16721-3.
  * (55) Y. Zhang, _Lecture Notes on Multi-loop Integral Reduction and Applied Algebraic Geometry_ , 1612.02249.
  * (56) T. Becker, H. Kredel and V. Weispfenning, _Gröbner Bases: A Computational Approach to Commutative Algebra_ , Graduate Texts in Mathematics. Springer New York, 1993.
  * (57) W. Decker, G.-M. Greuel, G. Pfister and H. Schönemann, “Singular 4-2-1 — A computer algebra system for polynomial computations.” http://www.singular.uni-kl.de, 2021.
  * (58) B. Henning, X. Lu, T. Melia and H. Murayama, _Operator bases, $S$-matrices, and their partition functions_, _JHEP_ 10 (2017) 199 [1706.08520].
  * (59) M. A. Huber and S. De Angelis, _Standard Model EFTs via On-Shell Methods_ , 2108.03669.
  * (60) S. De Angelis, _Amplitude bases in generic EFTs_ , 2202.02681.
  * (61) M. F. Atiyah and I. G. MacDonald, _Introduction to commutative algebra._ Addison-Wesley-Longman, 1969.
  * (62) P. Gianni, B. Trager and G. Zacharias, _Gröbner bases and primary decomposition of polynomial ideals_ , _Journal of Symbolic Computation_ 6 (1988) 149.
  * (63) S. J. Parke and T. R. Taylor, _Amplitude for $n$-gluon scattering_, _Phys. Rev. Lett._ 56 (1986) 2459.
  * (64) H. Dao, A. D. Stefani, E. Grifo, C. Huneke and L. Núñez-Betancourt, _Symbolic powers of ideals_ , 2017.
  * (65) D. Eisenbud, _Commutative Algebra: With a View Toward Algebraic Geometry_. Springer Science & Business Media, 1995.
  * (66) O. Zariski and P. Samuel, _Commutative algebra: Volume II_ , vol. 29. Springer Science & Business Media, 2013.
  * (67) T. S. Developers, W. Stein, D. Joyner, D. Kohel, J. Cremona and B. Eröcal, “Sagemath, version 9.0.” http://www.sagemath.org, 2020.
  * (68) W. Hart, F. Johansson and S. Pancratz, _FLINT: Fast Library for Number Theory_ , 2013.
  * (69) D. G. Cantor and H. Zassenhaus, _A new algorithm for factoring polynomials over finite fields_ , _Mathematics of Computation_ (1981) 587.
  * (70) D. A. Cox, J. Little and D. O’shea, _Using algebraic geometry_ , vol. 185. Springer Science & Business Media, 2006.
  * (71) D. Chicherin and V. Sotnikov, _Pentagon Functions for Scattering of Five Massless Particles_ , _JHEP_ 20 (2020) 167 [2009.07803].
  * (72) M. Kauers and V. Levandovskyy, “Singular.m.” https://www3.risc.jku.at/research/combinat/software/Singular/index.html.
  * (73) G. De Laurentis, “syngular.” https://github.com/GDeLaurentis/syngular, 2021\.
  * (74) A. Meurer, C. P. Smith, M. Paprocki, O. Čertík, S. B. Kirpichev, M. Rocklin et al., _Sympy: symbolic computing in python_ , _PeerJ Computer Science_ 3 (2017) e103.
  * (75) D. Maitre and P. Mastrolia, _S@M, a Mathematica Implementation of the Spinor-Helicity Formalism_ , _Comput. Phys. Commun._ 179 (2008) 501 [0710.5559].
  * (76) D. J. Bates, W. Decker, J. D. Hauenstein, C. Peterson, G. Pfister, F.-O. Schreyer et al., _Comparison of probabilistic algorithms for analyzing the components of an affine algebraic variety_ , _Applied Mathematics and Computation_ 231 (2014) 619.
  * (77) H. Matsumura, _Commutative Ring Theory_ , Cambridge Studies in Advanced Mathematics. Cambridge University Press, 1987, 10.1017/CBO9781139171762.