---
abstract: |
    Exploiting symmetry in Gröbner basis computations is difficult when the symmetry takes the form of a group acting by automorphisms on monomials in finitely many variables. This is largely due to the fact that the group elements, being invertible, cannot preserve a term order. By contrast, inspired by work of Aschenbrenner and Hillar, we introduce the concept of [*equivariant Gröbner basis*]{} in a setting where a [*monoid*]{} acts by [*homomorphisms*]{} on monomials in potentially [*infinitely*]{} many variables. We require that the action be compatible with a term order, and under some further assumptions derive a Buchberger-type algorithm for computing equivariant Gröbner bases.

    Using this algorithm and the monoid of strictly increasing functions ${{\mathbb N}}\to {{\mathbb N}}$ we prove that the kernel of the ring homomorphism $${{\mathbb R}}[y_{ij} \mid i,j \in {{\mathbb N}}, i > j] \to {{\mathbb R}}[s_i,t_i \mid i \in {{\mathbb N}}],\ 
    y_{ij} \mapsto s_is_j + t_it_j$$ is generated by two types of polynomials: [*off-diagonal $3 \times 3$-minors*]{} and [*pentads*]{}. This confirms a conjecture by Drton, Sturmfels, and Sullivant on the Gaussian two-factor model from algebraic statistics.
address:
- |
     Department of Mathematics and Computer Science\
    Technische Universiteit Eindhoven\
    P.O. Box 513, 5600 MB Eindhoven, The Netherlands\
- |
     Department of Mathematics and Computer Science\
    Technische Universiteit Eindhoven\
    P.O. Box 513, 5600 MB Eindhoven, The Netherlands\
    and Centrum voor Wiskunde en Informatica, Amsterdam, The Netherlands
author:
- 'Andries E. Brouwer'
- Jan Draisma
title: 'Equivariant Gröbner bases and the Gaussian two-factor model'
---

[^1]

Introduction and results
========================

Equivariant Gröbner bases {#equivariant-gröbner-bases .unnumbered}
-------------------------

Algebraic varieties arising from applications often have many symmetries. When analysing such varieties with tools from computational algebra, it is desirable to do so in an [*equivariant*]{} manner, that is, while keeping track of those symmetries, and if possible exploiting them. The notion of [*Gröbner basis*]{}, which lies at the heart of computational algebra, depends heavily on choices of [*coordinates*]{} and of a [*term order*]{}, which is a well-order on monomials in the coordinates. It is therefore natural, at least from a computational point of view, to study symmetries of ideals that preserve both the coordinates and the term order. Now the term [*symmetry*]{} is usually reserved for certain invertible maps, but it is easy to see that an invertible map cannot preserve a well-order; see Remark \[re:WhyMonoid\]. Hence we are led to relax the condition that symmetries be invertible. On the other hand, if a non-invertible map is to preserve the restriction of the term order to the set of coordinates, then that set better be infinite, in contrast with the usual set-up in computational commutative algebra.

In fact, there is another, more compelling reason for allowing infinitely many variables: many varieties from applications come in infinite families, and it is convenient to pass to a suitable limit. For example, the variety of symmetric $n \times n$-matrices of rank $2$ has a well-defined projective limit for $n$ tending to infinity, and so does the closely related two-factor model that we study in this paper. In both cases, the limit is not only stable under the union of all symmetric groups $S_n$ simultaneously permuting rows and columns, but also under the [*monoid*]{} ${\mathrm{Inc}({{\mathbb N}})}$ of all strictly increasing maps from ${{\mathbb N}}$ to itself. And while the union of the symmetric groups does not preserve any term order, the monoid ${\mathrm{Inc}({{\mathbb N}})}$ does preserve such an order; this fundamental observation allows us to do computations in Section \[sec:2f\].

This discussion leads to the following set-up, which we believe will have applications to numerous other problems. Let $X$ be a potentially infinite set, whose elements we call [*variables*]{}. The free commutative monoid generated by $X$ is denoted ${\mathrm{Mon}}$; its elements are called [*monomials*]{}. Suppose that we have

1.  a term order, i.e., a well-order $\leq$ on ${\mathrm{Mon}}$ such that $m \leq m' \Rightarrow mm'' \leq m'm''$ for all $m,m',m'' \in {\mathrm{Mon}}$; and

2.  a monoid $G$, i.e., a (typically non-commutative) semigroup with identity, acting on ${\mathrm{Mon}}$ by means of monoid homomorphisms ${\mathrm{Mon}}\to {\mathrm{Mon}}$ preserving the strict order: $\pi 1=1,\
    \pi(mm')=(\pi m)(\pi m'),$ and $m < m' \Rightarrow \pi m< \pi m'$ for all $\pi  \in G,\ m,m' \in {\mathrm{Mon}}$.

\[ex:AH\] The setting that Aschenbrenner and Hillar study in [@Aschenbrenner07] fits into this framework, and indeed inspired our set-up. There $X=\{x_1,x_2,\ldots\}$ and $G$ is the monoid ${\mathrm{Inc}({{\mathbb N}})}$ of all increasing maps $\pi: {{\mathbb N}}\to {{\mathbb N}}$ acting on $X$ by $\pi x_i=x_{\pi(i)}$ and on ${\mathrm{Mon}}$ by multiplicativity. As a term order one can choose the lexicographic order with $x_i>x_j$ if $i>j$. Aschenbrenner and Hillar have turned their proof of finite generation of ${\mathrm{Inc}({{\mathbb N}})}$-stable ideals in $K[x_1,x_2,\ldots]$ into an algorithm; see [@Aschenbrenner08].

Let $K$ be a field and let $K[X]=K{\mathrm{Mon}}$ be the polynomial $K$-algebra in the variables $X$, or, equivalently, the monoid $K$-algebra of ${\mathrm{Mon}}$. Then $G$ acts naturally on $K[X]$ by means of homomorphisms. A [*$G$-orbit*]{} is a set of the form $Gz=\{\pi z \mid \pi  \in G\}$, where $z$ is in a set on which $G$ acts. The fact that $G$ acts by monoid homomorphisms on ${\mathrm{Mon}}$ implies that the ideal generated by a union of $G$-orbits in $K[X]$ is automatically [*$G$-stable*]{}, that is, closed under the action of $G$.

We use the notation ${\mathrm{lm}}(f)$ for the [*leading monomial*]{} of $f$, i.e., the $\leq$-largest monomial having non-zero coefficient in $f$. By the requirement that $G$ preserve the order, we have ${\mathrm{lm}}(\pi
f)=\pi\,{\mathrm{lm}}(f)$. Given an ideal $I$ of $K[X]$, ${\mathrm{lm}}(I)$ is an ideal in the monoid ${\mathrm{Mon}}$, that is, ${\mathrm{lm}}(I)$ is closed under multiplication with any element from ${\mathrm{Mon}}$. If $I$ is $G$-stable, then so is ${\mathrm{lm}}(I)$.

Let $I$ be a $G$-stable ideal in $K[X]$. A [*$G$-Gröbner basis*]{} of $I$ is a subset $B$ of $I$ for which ${\mathrm{lm}}(GB)(=\{{\mathrm{lm}}(\pi
b) \mid b \in B,\ \pi  \in G\})$ generates the ideal ${\mathrm{lm}}(I)$ in ${\mathrm{Mon}}$. If $G$ is fixed in the context, then we also call $B$ an [*equivariant Gröbner basis*]{}. If $G=\{1\}$, then we call $B$ an [*ordinary Gröbner basis*]{}.

At MEGA 2009, Viktor Levandovskyy pointed out to the second author that our equivariant Gröbner bases are a special case of Gröbner $S$-bases in the sense of [@Drensky06], which were invented for analysing certain two-sided ideals in free associative algebras. The focus of the present article is on getting exactly the right set-up for doing machine computations of equivariant Gröbner bases in the commutative setting.

It is easy to see that if $B$ is a $G$-Gröbner basis of $I$, then $GB$ generates $I$ as an ideal; see Lemma \[lm:GBgenerates\].

\[ex:Rankk\] Let $X=\{y_{ij} \mid i,j \in {{\mathbb N}}\}$, let $k$ be a natural number, and let $I$ be the ideal of all polynomials in the $y_{ij}$ that vanish on all ${{\mathbb N}}\times {{\mathbb N}}$-matrices $y$ of rank at most $k$. Order the variables $y_{ij}$ lexicographically by the pair $(i,j)$, where $i$ is the most significant index; so for instance $y_{3,5}>y_{2,6}>y_{2,4}>y_{1,10}$. The corresponding lexicographic order on monomials in the $y_{ij}$ is a well-order. Let $G:={\mathrm{Inc}({{\mathbb N}})}\times {\mathrm{Inc}({{\mathbb N}})}$ act on $X$ by $(\pi,\sigma)y_{ij}=y_{\pi(i),\sigma(j)};$ this action preserves the strict order. The $G$-orbit of the determinant $D$ of the matrix $(y_{ij})_{i,j=1,\ldots,k+1}$ consists of all $(k+1)\times(k+1)$-minors of $y$, which by the results of [@Sturmfels90] form a Gröbner basis of the ideal $I$. As a consequence, $\{D\}$ is a $G$-Gröbner basis of $I$.

A $G$-stable ideal need not have a finite $G$-Gröbner basis. Indeed, if one requires that [*every*]{} $G$-stable ideal $I$ in $K[X]$ has a finite $G$-Gröbner basis, then this must in particular be true for [*monomial*]{} ideals. This implies that ${\mathrm{Mon}}$ does not have infinite antichains relative to the [*partial order*]{} on ${\mathrm{Mon}}$ defined by $m \preceq m':\Leftrightarrow \exists \pi \in G: \pi m | m'$. Observe that this is, indeed, a partial order: transitivity is straightforward, and antisymmetry follows from the fact that $\pi m|m \Rightarrow \pi m
\leq m$, while on the other hand $\pi m \geq m$ for all $\pi,m$; see Remark \[re:WhyMonoid\]. Conversely, if $({\mathrm{Mon}}, \preceq)$ does not have infinite anti-chains, then every ideal has a finite $G$-Gröbner basis. This is the case in the set-up of Example \[ex:AH\], which is generalised in [@Hillar09]; there equivariant Gröbner bases are called [*monoidal Gröbner bases*]{}.

We have not yet really used that ${\mathrm{Mon}}$ is the free commutative monoid generated by $X$. So far, we could have taken ${\mathrm{Mon}}$ any commutative monoid equipped with EGB1 and EGB2. This viewpoint, and a generalisation thereof, is adopted in [@Hillar09]. However, for doing computations we need that ${\mathrm{Mon}}$ has more structure; see conditions EGB3 and EGB4 below. This is why we have restricted ourselves to free monoids ${\mathrm{Mon}}$.

In the polynomial ring of Example \[ex:Rankk\] the set $\{y_{12}y_{21},y_{12}y_{23}y_{31},y_{12}y_{23}y_{34}y_{41},\ldots\}$ is an infinite $\preceq$-antichain of monomials, hence the ${\mathrm{Inc}({{\mathbb N}})}$-stable ideal generated by it does not have a finite ${\mathrm{Inc}({{\mathbb N}})}$-Gröbner basis. But even in such a setting where not [*all*]{} $G$-stable ideals have finite $G$-Gröbner bases, ideals of interesting $G$-stable varieties may still have such bases. We will derive an algorithm for computing equivariant Gröbner bases under the following two additional assumptions:

1.  for all $\pi \in G$ and $m,m' \in {\mathrm{Mon}}$ we have ${\operatorname{lcm}}(\pi
    m,\pi m')=\pi {\operatorname{lcm}}(m,m')$; and

2.  for all $f,h \in K[X]$ the set $Gf \times Gh$ is the union of a finite number of $G$-orbits (where $G$ acts diagonally on $K[X]
    \times K[X]$), and generators of these orbits can be computed effectively.

Note that EGB3 is automatically satisfied if $G$ stabilises the set $X$ of variables. Although this is the only setting that we will need for the application to the two-factor model, future applications may need the greater generality where $X$ is not $G$-stable. Condition EGB4 is of computational importance, as will become clear in Section \[sec:GGB\]. There we also show in Examples \[ex:EGB3\] and \[ex:EGB4\] that these requirements are not redundant.

\[thm:GGB\] Under conditions EGB1, EGB2, EGB3, and EGB4 there exists an algorithm that takes a finite subset $B$ of $K[X]$ as input and that returns a finite $G$-Gröbner basis of the ideal generated by $B$, [*provided that it terminates*]{}.

In Section \[sec:GGB\] we derive this algorithm, and in Section \[sec:2f\] we apply it to a conjecture concerning a statistical model to be discussed now.

The Gaussian two-factor model {#the-gaussian-two-factor-model .unnumbered}
-----------------------------

The [*Gaussian $k$-factor model with $n$ observed variables*]{} consists of all covariance matrices of $n$ jointly Gaussian random variables $X_1,\ldots,X_n$, the [*observed variables*]{}, consistent with the hypothesis that there exist $k$ further variables $Z_1,\ldots,Z_k$, the [*hidden variables*]{}, such that the joint distribution of the $X_i$ and the $Z_j$ is Gaussian and such that the $X_i$ are pairwise independent given all $Z_j$. This set of covariance matrices turns out to be $$F_{k,n}:=\{D+SS^T \mid D \in M_{n}({{\mathbb R}}) \text{ diagonal and
positive definite, and } S \in M_{n,k}({{\mathbb R}})\},$$ where $M_{n,k}({{\mathbb R}})$ is the space of real $n \times
k$-matrices, and $M_n({{\mathbb R}})$ is the space of real $n \times
n$-matrices. In [@Drton07] this model is studied from an algebraic point of view. In particular, the ideal of polynomials vanishing on $F_{k,n}$ is determined for $k=2,3$ and $n \leq 9$. The case where $k=1$ had already been done in [@deLoera95]. The authors of [@Drton07] pose some very intriguing finiteness questions. In particular, one might hope that for fixed $k$ the ideal of $F_{k,n}$ stabilises, as $n$ grows, modulo its natural symmetries coming from simultaneously permuting rows and columns. For $k=1$ this is indeed the case, and for arbitrary $k$ it is true in a weaker, set-theoretic sense [@Draisma08b]. In this paper we prove that the ideals of $F_{2,n}$ stabilise at $n=6$. To state our theorem we denote by $y_{ij}$ the coordinates on the space of symmetric $n \times n$-matrices; we will identify $y_{ji}$ with $y_{ij}$. Recall from [@Drton07] that the ideal of $F_{2,5}$ is generated by a single polynomial $$P:=\frac{1}{10} \sum_{\pi \in {\operatorname{Sym}}(5)} \sgn(\pi)
y_{\pi(1),\pi(2)}y_{\pi(2),\pi(3)}y_{\pi(3),\pi(4)}y_{\pi(4),\pi(5)}y_{\pi(5),\pi(1)},$$ called the [*pentad*]{}. The normalisation factor is important only because it ensures that all coefficients are $\pm 1$—indeed, the stabiliser in ${\operatorname{Sym}}(5)$ of each monomial in the pentad is the dihedral group of order $10$. We consider $P$ an element of ${{\mathbb Z}}[y_{ij} \mid i \geq j]$. The ideal of $F_{2,6}$ contains another type of equation: the [*off-diagonal minor*]{} $$M:=\det(y[\{4,5,6\},\{1,2,3\}]) \in {{\mathbb Z}}[y_{ij} \mid i \geq j]$$ the determinant of the square submatrix of $y$ sitting in the lower left corner of $y$. If $f$ is any polynomial in ${{\mathbb R}}[y_{ij} \mid i \geq j]$ that vanishes on $F_{2,n}$ and if we regard $f$ as an element of ${{\mathbb R}}[y_{ij} \mid i>j][y_{11},\ldots,y_{nn}]$, then each of the coefficients of the monomials in the diagonal variables $y_{ii}$ is a polynomial in the off-diagonal variables that vanishes on $F_{2,n}$, as well. Therefore the following theorem settles the conjecture of Drton, Sturmfels, and Sullivant, that pentads and off-diagonal minors generate the ideal of $F_{2,n}$ for all $n$; see [@Drton07 Conjecture 26].

\[thm:Main\] For any field $K$ and any natural number $n \geq 6$ the kernel $I_n(K)$ of the homomorphism $K[y_{ij}\mid 1 \leq j < i \leq n] \to
K[s_1,\ldots,s_n,t_1,\ldots,t_n]$ determined by $y_{ij} \mapsto s_is_j +
t_it_j$ is generated, as an ideal, by the orbits of $P$ and $M$ under the symmetric group ${\operatorname{Sym}}(n)$.

In [@Drton08] it is proved that $F_{2,n}$ equals the set of all positive definite matrices with the property that every principal $6
\times 6$-minor lies in $F_{2,6}$. Theorem \[thm:Main\] implies an analogous statement for the Zariski closures of $F_{2,n}$ and $F_{2,6}$.

We sketch the proof of Theorem \[thm:Main\], which appears in Section \[sec:2f\]. We put a suitable elimination order on the monomials in $y_{ij},\ i,j \in {{\mathbb N}},\ i \geq j$, and report on a computation that yields a finite ${\mathrm{Inc}({{\mathbb N}})}$-Gröbner basis for the determinantal ideal generated by all $3 \times 3$-minors of $y$. Intersecting this ${\mathrm{Inc}({{\mathbb N}})}$-Gröbner basis with the ring in the off-diagonal matrix entries gives Theorem \[thm:Main\].

Acknowledgments {#acknowledgments .unnumbered}
===============

We thank Jan Willem Knopper and Rudi Pendavingh for motivating discussions on alternative computations that would prove Theorem \[thm:2factorGB\]. We also thank the referees for suggestions on improving the exposition.

An algorithm for equivariant Gröbner bases {#sec:GGB}
==========================================

We retain the setting of the introduction: $X$ is a potentially infinite set and ${\mathrm{Mon}}$ is the free commutative monoid generated by $X$, equipped with a term order (EGB1) preserved by the action of a monoid $G$ (EGB2) which also preserves least common multiples (EGB3). Condition EGB4 will be needed only later.

\[re:WhyMonoid\] Note that $G$ acts by injective maps on ${\mathrm{Mon}}$ by EGB2. It is essential that we allow $G$ to be a monoid rather than a group. Indeed, the image of $G$ in the monoid of injective maps ${\mathrm{Mon}}\to {\mathrm{Mon}}$ contains no other invertible elements than the identity: If $\pi \in G$ then $\pi m \geq m$ since otherwise $m>\pi m>\pi^2 m>\ldots$ would be an infinite strictly decreasing chain. But then if (the image of) $\pi$ is invertible, we have $\pi m>m>\pi^{-1}m>\pi^{-2}m>\ldots$, another infinite decreasing chain.

We set out to translate familiar notions from the setting of ordinary Gröbner bases to our equivariant setting. In what follows the coeffient in $f$ of ${\mathrm{lm}}(f)$, the [*leading coefficient*]{}, is denoted ${\mathrm{lc}}(f)$, and ${\mathrm{lt}}(f)={\mathrm{lc}}(f) {\mathrm{lm}}(f)$ is the [*leading term*]{} of $f$.

\[lm:GBgenerates\] If $I$ is $G$-stable and $B$ is a $G$-Gröbner basis of $I$, then $GB=\{\pi b \mid \pi \in G,\ b \in B\}$ generates the ideal $I$.

If not, then take an $f \in I \setminus {\langle}GB {\rangle}$ with ${\mathrm{lm}}(f)$ minimal. Take $b \in B$ and $\pi \in G$ with ${\mathrm{lm}}(\pi b)|{\mathrm{lm}}(f)$. Subtracting $({\mathrm{lt}}(f)/{\mathrm{lt}}(\pi b)) \pi b$ from $f$ yields an element in $I\setminus {\langle}GB {\rangle}$ with leading term strictly smaller than that of $f$, a contradiction.

Given $f \in K[X]$ and $B \subseteq K[X]$, proceed as follows: if $\pi
{\mathrm{lm}}(b) | {\mathrm{lm}}(f)$ for some $\pi \in G$ and $b \in B$, then subtract the multiple $({\mathrm{lt}}(f)/{\mathrm{lt}}(\pi b))\pi b$ of $\pi b$ from $f$, so as to lower the latter’s leading monomial. Do this until no such pair $(\pi,b)$ exists anymore. The resulting polynomial is called a [*$G$-remainder*]{} (or an [*equivariant remainder*]{}, if $G$ is fixed) of $f$ modulo $B$.

This procedure is non-deterministic, but necessarily finishes after a finite number of steps, since $\leq$ is a well-order. Any potential outcome is called an equivariant remainder of $f$ modulo $B$.

\[de:EqS\] Consider two polynomials $b_0,b_1$ with leading monomials $m_0,m_1$, respectively. Let $H$ be a set of pairs $(\sigma_0,\sigma_1) \in G \times G$ for which $Gb_0 \times Gb_1=\bigcup_{(\sigma_0,\sigma_1) \in H} \{(\pi
\sigma_0b_0,\pi \sigma_1b_1)
\mid \pi \in G\}$. For every element $(\sigma_0,\sigma_1) \in H$ we consider the ordinary S-polynomial $$S(\sigma_0b_0,\sigma_1b_1):=
{\mathrm{lc}}(b_1)\frac{{\operatorname{lcm}}(\sigma_0m_0,\sigma_1m_1)}{\sigma_0m_0}\sigma_0b_0 -
{\mathrm{lc}}(b_0)\frac{{\operatorname{lcm}}(\sigma_0m_0,\sigma_1m_1)}{\sigma_1m_1}\sigma_1b_1.$$ The set $\{S(\sigma_0b_0,\sigma_1b_1) \mid (\sigma_0,\sigma_1) \in H\}$ is called a [*complete set of equivariant S-polynomials*]{} for $b_0,b_1$. It depends on the choice of $H$. Under condition EGB4, $H$ can be chosen finite.

\[thm:Buchberger\] Under the assumptions EGB1, EGB2, and EGB3, let $B$ be a subset of $K[X]$ such that for all $b_0,b_1 \in B$ there exists a complete set of S-polynomials each of which has $0$ as a $G$-remainder modulo $B$. Then $B$ is a $G$-Gröbner basis of the ideal generated by $GB$.

We will first prove this for [*ordinary*]{} Gröbner bases, and from that deduce the theorem for equivariant Gröbner bases. The proof for the ordinary case is identical to the proof in the case of finitely many variables. We include it for completeness, and also because we have no reference where the result is stated for infinitely many variables.

We may and will assume that all elements of $B$ are monic. Let $I$ denote the ideal generated by $B$. If ${\mathrm{lm}}(B)$ does not generate the ideal ${\mathrm{lm}}(I)$ in ${\mathrm{Mon}}$ then there exists a polynomial of the form $$f=\sum_{b \in B} f_{b} b$$ with only finitely many of the $f_{b}$ non-zero, for which ${\mathrm{lm}}(f)$ is not in the ideal generated by ${\mathrm{lm}}(B)$. We may choose the expression above such that first, the [*maximum*]{} $m$ of ${\mathrm{lm}}(f_{b}
b)$ over all $b$ for which $f_{b}$ is non-zero is [*minimal*]{} and second, the number of $b$ with ${\mathrm{lm}}(f_{b} b)=m$ is also minimal. The maximum is then attained for at least two values $b_0,b_1$ of $b$, because otherwise $m$ would be the leading monomial of $f$. Write $m_i:={\mathrm{lm}}(b_i)$ for $i=0,1$, and let $t_0,t_1$ be such that ${\operatorname{lcm}}(m_0,m_1)=t_0m_0=t_1m_1$. Now $m={\mathrm{lm}}(f_{b_0})m_0={\mathrm{lm}}(f_{b_1})m_1$ is a multiple of both $m_0$ and $m_1$, and therefore ${\mathrm{lm}}(f_{b_0})$ is divisible by $t_0$; set $$A:=\frac{{\mathrm{lt}}(f_{b_0})}{t_0}.$$ Next consider $$S :=S(b_0,b_1) = t_0b_0-t_1b_1,$$ where we have used that $b_0$ and $b_1$ are monic. As $0$ is a remainder of $S$ modulo $B$ by assumption, we can write $S$ as a sum $\sum_{b \in B} s_{b}b$ with only finitely many non-zero terms that moreover satisfy ${\mathrm{lm}}(s_{b} b) \leq {\mathrm{lm}}(S) <
{\operatorname{lcm}}(m_0,m_1)$ for all $b$. Then we may rewrite $f$ as $$f=f-A(S - \sum_{b} s_{b} b) =
\sum_{b} (f_{b}+f'_{b}+f''_{b}) b$$ where $f'_{b} = A s_{b}$ and $$f''_{b} = \left\{
\begin{array}{ll}
-{\mathrm{lt}}(f_{b_0}) & \mbox{if $b= b_0$,} \\[2pt]
{\mathrm{lc}}(f_{b_0}){\mathrm{lm}}(f_{b_1}) &
\mbox{if $b = b_1$,} \\[2pt]
0 & \mbox{otherwise.}\\
\end{array}\right.$$ For all $b \in B$ we have $$\begin{aligned}
{\mathrm{lm}}((A s_{b})b)&={\mathrm{lm}}(A s_{b} b)
<\frac{{\mathrm{lm}}(f_{b_0})}{t_0} {\operatorname{lcm}}(m_0,m_1)\\
&= {\mathrm{lm}}(f_{b_0}) m_0=m,\end{aligned}$$ so for all $b$ we have ${\mathrm{lm}}(f'_{b} b) < m$. Moreover, ${\mathrm{lm}}((f_{b_0}+f''_{b_0})b_0)$ is strictly smaller than $m$. Finally, ${\mathrm{lm}}(f''_{b_1}b_1) = m$. We conclude that either $\max_{b}{\mathrm{lm}}((f_{b}+f'_{b}+f''_{b}) b)$ is strictly smaller than $m$, or else the number of $b$ for which it equals $m$ is smaller than the number of $b$ for which ${\mathrm{lm}}(f_{b}b)$ equals $m$. This contradicts the minimality of the expression chosen above.

We prove that $GB$ is an ordinary Gröbner basis of the ideal that it generates. By the ordinary Buchberger criterion it suffices to verify that for all $b_0,b_1 \in B$ and $\pi_0,\pi_1 \in G$ the S-polynomial $S(\pi_0 b_0,\pi_1 b_1)$ has $0$ as a remainder modulo $GB$. By assumption there exists a triple $(\sigma_0,\sigma_1,\pi_2)$ for which $(\pi_0 b_0,\pi_1 b_1)=(\pi_2 \sigma_0 b_0,\pi_2 \sigma_1
b_1)$ and for which $S(\sigma_0
b_0,\sigma_1 b_1)$ has $0$ as a $G$-remainder modulo $B$, which means that it has $0$ as an ordinary remainder modulo $GB$. Since $G$ preserves least common multiples (EGB3), we have $$S(\pi_2 \sigma_0 b_0, \pi_2 \sigma_1 b_1)=
\pi_2 S(\sigma_0 b_0,\sigma_1 b_1),$$ and applying $\pi_2$ to the entire reduction of $S(\sigma_0 b_0,\sigma_1 b_1)$ to $0$ modulo $GB$ yields a reduction of $S(\pi_0 b_0,\pi_1 b_1)$ to $0$, as claimed.

The following example shows that EGB3 is not a redundant assumption in Theorem \[thm:Buchberger\].

\[ex:EGB3\] Suppose that $X=\{x,y,z_1,z_2,\ldots\}$ and that the monoid $G$ is generated by ${\mathrm{Inc}({{\mathbb N}})}$ acting by $\pi z_i=z_{\pi i}$ and trivially on $x,y$, together with a single homomorphism $\sigma:{\mathrm{Mon}}\to {\mathrm{Mon}}$ determined by $\sigma x=x$, $\sigma y=x z_1$, and $\sigma z_i=z_{i+1}$ for all $i$. Then $G$ preserves the lexicographic order on ${\mathrm{Mon}}$ for which $z_{i+1}>z_i>y>x$ for all $i$. Now consider the set $B=\{y+1\}$. We have $$G(y+1) \times G(y+1)=G(y+1,y+1) \cup G(y+1,xz_1+1) \cup
G(xz_1+1,y+1),$$ so we may take $H$ from Definition \[de:EqS\] equal to $\{(1,1),(1,\sigma),(\sigma,1)\}.$ The S-polynomial $S(y+1,y+1)$ is zero, and the S-polynomials $S(y+1,xz_1+1)$ and $S(xz_1+1,y+1)$ reduce to zero modulo $y+1$ and $\sigma(y+1)=xz_1+1$. Hence we have a complete set of S-polynomials of $y+1$ with itself that all $G$-reduce to zero modulo $B$. Nevertheless, $B$ is not a $G$-Gröbner basis of the $G$-stable ideal that it generates, since that ideal also contains $S(xz_1+1,xz_2+1)=z_2-z_1$, which does not $G$-reduce to zero modulo $B$.

Here is an example where EGB4 is not fulfilled.

\[ex:EGB4\] Let $X=\{x,y\}$, let $G$ be the multiplicative monoid of the positive integers, where $m$ acts by $x \mapsto x^m$ and $y \mapsto y^m$. Now $$Gx \times Gy = \{(x^i,y^j) \mid i,j \in {{\mathbb Z}}_{>0}\},$$ while the diagonal $G$-orbit of the pair $(x^i,y^j)$ equals $\{(x^{ai},y^{aj}) \mid a \in {{\mathbb Z}}_{>0}\}$. Hence $Gx \times Gy$ is not the union of finitely many $G$-orbits.

However, if we do assume EGB4, then every pair $(b_0,b_1)$ has a finite and computable complete set of $S$-polynomials and have the following theoretical algorithm, alluded to in Theorem \[thm:GGB\]. We do not claim that it terminates, but if it does, then it returns a finite equivariant Gröbner basis by Theorem \[thm:Buchberger\].

 

Input

:   a finite subset $B$ of $K[X]$.

Output (assuming termination)

:   a finite equivariant Gröbner basis of the ideal generated by $GB$.

Procedure

:    

    1.  $P:=B \times B$;

    2.  while $P \neq \emptyset$ do

        1.  choose $(b_0,b_1) \in P$ and set $P:=P \setminus
                    \{(b_0,b_1)\}$;

        2.  compute a finite complete set ${\mathcal{S}}$ of equivariant $S$-polynomials for $(b_0,b_1)$;

        3.  while ${\mathcal{S}}\neq \emptyset$ do

            1.  choose $f \in {\mathcal{S}}$ and set ${\mathcal{S}}:={\mathcal{S}}\setminus \{f\}$;

            2.  compute a $G$-remainder $r$ of $f$ modulo $B$;

            3.  if $r \neq 0$ then set $B:=B \cup \{r\}$ and $P:=P \cup (B \times r)$;

    3.  return $B$.

Note the order in which $B$ and $P$ are updated: one needs to add $(r,r)$ to $P$, as well. The proof of correctness of this algorithm is straightforward and omitted.

If the partial order $\preceq$ on ${\mathrm{Mon}}$ defined in the introduction does not admit infinite antichains, then the equivariant Buchberger algorithm always terminates. Indeed, suppose that the algorithm would not terminate, and let $r_1,r_2,r_3,\ldots$ be the sequence of remainders added consecutively to $B$. Then for all $i<j$ we have ${\mathrm{lm}}(r_i) \not
\preceq {\mathrm{lm}}(r_j)$ since $r_j$ is $G$-reduced modulo $r_i$. Using the fact that decreasing $\preceq$-chains are finite, one finds an infinite subsequence $r_{i_1}, r_{i_2}, \ldots $ with $i_1<i_2<\ldots$ such that ${\mathrm{lm}}(r_{i_a}) \not \preceq {\mathrm{lm}}(r_{i_b})$ holds not only for $a<b$ but also for $a>b$. This sequence contradicts the assumption that $\preceq$ does not have infinite antichains.

An equivariant Gröbner basis for the two-factor model {#sec:2f}
=====================================================

Theorem \[thm:Main\] will follow from the following result. Let $X=\{y_{ij}
\mid \ i,j \in {{\mathbb N}}, i \geq j\}$ be a set of variables representing the entries of a symmetric matrix. We consider the lexicographic monomial order on ${\mathrm{Mon}}$ in which the diagonal variables $y_{ii}$ are larger than all variables $y_{ij}$ with $i>j$, and apart from that $y_{ij} \geq y_{i'j'}$ if and only if $i>i'$ or $i=i'$ and $j \geq j'$. So for instance we have $$y_{2,2} > y_{1,1} > y_{5,2} > y_{4,3}.$$ Note that this monomial order is compatible with the action of the monoid ${\mathrm{Inc}({{\mathbb N}})}$ of all increasing maps ${{\mathbb N}}\to {{\mathbb N}}$. For any polynomial $p \in
K[X]$ let ${l(p)}$ denote the [*largest index of $p$*]{}, i.e., the largest index appearing in any of the variables in any of the monomials of $p$.

\[thm:2factorGB\] For any field $K$, let $J_{{\mathbb N}}(K)$ be the ideal in $K[X]$ generated by all $3 \times 3$-minors of the matrix $y$ (recall that we identify $y_{ji}$ for $j<i$ with $y_{ij}$). Relative to the monomial order $\leq$ the ideal $J_{{\mathbb N}}(K)$ has an ${\mathrm{Inc}({{\mathbb N}})}$-Gröbner basis $B$ consisting of $42$ polynomials. The intersection $B \cap K[y_{ij} \mid i >j]$ is an ${\mathrm{Inc}({{\mathbb N}})}$-Gröbner basis of $J_{{\mathbb N}}(K) \cap K[y_{ij} \mid i>j]$ consisting of $20$ polynomials. The largest indices and the degrees of the elements in these bases are summarised in Table \[tab:Bases\].

\[tab:Bases\]

[|l|lllllll|]{} ${l(p)}$ & 3 & 4 & 5 & 6 & 7 & 8 & 9\
$\# p \in B$ & 1 & 6 & 11 & 10 & 8 & 5 & 1\
degrees & $3^1$ & $3^6$ & $3^{10} 5^1$ & $3^5 5^5$ & $5^8$ & $5^5$ & $5^1$\
$\# p \in B \cap K[y_{ij} \mid i>j]$ & & & 1 & 5 & 8 & 5 & 1\
degrees & & & $5^1$ & $3^5 $ & $5^8$ & $5^5$ & $5^1$\

\[re:PentadMinor\] The polynomial with largest index $5$ in the ${\mathrm{Inc}({{\mathbb N}})}$-Gröbner basis $B \cap K[y_{ij} \mid i >j]$ is the pentad $P$. The five degree-$3$ polynomials with largest index $6$ in that Gröbner basis form the ${\operatorname{Sym}}({{\mathbb N}})$-orbit of the off-diagonal minor $M$. All $19$ remaining polynomials are already in the ${\mathrm{Inc}({{\mathbb N}})}$-stable ideal generated by these polynomials; this latter statement also follows from the result in [@Drton07] that at least up to $n=9$ the ideal of the two-factor model is generated by pentads and off-diagonal minors. The complete ${\mathrm{Inc}({{\mathbb N}})}$-Gröbner bases of $J_{{\mathbb N}}(K)$ can be downloaded from the second author’s website.

A Gröbner basis of the ideal of the two-factor model $F_{2,n}$ relative to [*circular term orders*]{} was already found in [@Sullivant08]. The proof involves general techniques for determining the ideal of secant varieties, especially of toric varieties; see also [@Sturmfels05]. The Gröbner basis found there, however, does not stabilise as $n$ grows—and indeed, circular term orders are not compatible with the action of ${\mathrm{Inc}({{\mathbb N}})}$. It would be interesting to find a direct translation between Sullivant’s Gröbner basis and ours.

Theorem \[thm:2factorGB\] implies Theorem \[thm:Main\].

It is well known that the $(k+1) \times (k+1)$-minors of the symmetric matrix $(y_{ij})_{i,j=1,\ldots,n}$ generate the ideal of all polynomials vanishing on all rank-$k$ matrices (for a recent combinatorial proof of this fact, see [@Sturmfels05 Example 4.12]; in characteristic $0$ this fact is known as the Second Fundamental Theorem for the orthogonal group). Hence the ideal $I_n(K)$ of Theorem \[thm:Main\] is the intersection of the ideal $J_n$ generated by the $3 \times
3$-minors of $(y_{ij})_{i,j=1,\ldots,n}$ with the ring $K[y_{ij}
\mid i>j]$. Theorem \[thm:2factorGB\] implies that one obtains a Gröbner basis of $J_n$, relative to the restriction of the monomial order on $K[y_{ij} \mid i,j \in {{\mathbb N}}, i\geq j]$ to $K[y_{ij} \mid 1 \leq
j < i \leq n]$ by applying all increasing maps $\{1,\ldots,{l(p)}\}
\to \{1,\ldots,n\}$ to all $p \in B \cap K[y_{ij} \mid i >j] $ with ${l(p)} \leq n$. Such an increasing map can be extended to an element of ${\operatorname{Sym}}(n)$, and Remark \[re:PentadMinor\] concludes the proof.

We conclude with some remarks on the computation that proved Theorem \[thm:2factorGB\]. First we need to verify EGB4.

\[lm:FiniteS\] For all $b_0,b_1 \in K[y_{ij} \mid i,j \in {{\mathbb N}},  i \geq j]$ the set $({\mathrm{Inc}({{\mathbb N}})}b_0) \times ({\mathrm{Inc}({{\mathbb N}})}b_1)$ is the union of a finite number of ${\mathrm{Inc}({{\mathbb N}})}$-orbits.

Consider all pairs $(S_0,S_1)$ of sets $S_0,S_1 \subseteq {{\mathbb N}}$ with $|S_i|={l(b_i)}$ for which $S_0 \cup S_1$ is an interval of the form $\{1,\ldots,k\}$ for some $k$, which is then at most ${l(b_0)}+{l(b_1)}$. Note that there are only finitely many such pairs $(S_0,S_1)$. For each such pair let $(\pi_0,\pi_1)$ be a pair of elements of ${\mathrm{Inc}({{\mathbb N}})}$ such that $\pi_i$ maps $\{1,\ldots,{l(b_i)}\}$ onto $S_i$; it is irrelevant how $\pi$ acts on the rest of ${{\mathbb N}}$. Then we have $${\mathrm{Inc}({{\mathbb N}})}b_0 \times {\mathrm{Inc}({{\mathbb N}})}b_1 = \bigcup_{(S_0,S_1)} {\mathrm{Inc}({{\mathbb N}})}(\pi_0 b_0,\pi_1
b_1),$$ where the union is over all pairs $(S_0,S_1)$ as above.

The $42$ polynomials of $B$ were constructed by computing a Gröbner basis for $J_9({{\mathbb Q}})$ with [Singular]{} [@GPS05] and retaining only those polynomials $p$ for which the set of indices occurring in their variables form an interval of the form $\{1,\ldots,k\}$ with $k \leq 9$. All elements of $B$ are monic and have integral coefficients (in fact, equal to $\pm 1$ except for the $3 \times 3$-minor with largest index $3$, which has a coefficient $2$). By the equivariant Buchberger criterion and the proof of Lemma \[lm:FiniteS\], we need only ${\mathrm{Inc}({{\mathbb N}})}$-reduce modulo $B$ all S-polynomials of pairs $(\pi_0b_0,\pi_1b_1)$ with $b_0,b_1 \in B$ and $\pi_i:\{1,\ldots,{l(b_i)}\} \to {{\mathbb N}}$ increasing and such that ${\operatorname{im}}\pi_0 \cup {\operatorname{im}}\pi_1=\{1,\ldots,k\}$ for some $k$. For instance, for $b_0=b_1=b$ equal to the polynomial in $B$ with largest index $9$, we having to ${\mathrm{Inc}({{\mathbb N}})}$-reduce $S(\pi_0b,\pi_1b)$ modulo $B$ for all increasing maps $\pi_0,\pi_1:\{1,\ldots,9\} \to \{1,\ldots,18\}$ whose image union is an interval $\{1,\ldots,k\}$. However, if $k=17$ or $k=18$, then $\pi_0b$ and $\pi_1b$ turn out to have leading monomials with gcd $1$, so these cases can be skipped. This reduces the theorem to a finite computation involving polynomials with largest indices up to $16$, which we have implemented directly in [C]{}. Finally, to deduce the result for all base fields—and to speed up the computation—we used the following argument. Since ${\mathrm{Inc}({{\mathbb N}})}B \cap K[y_{ij} \mid 1 \leq j \leq i \leq
n]$ is a subset of the ideal of $3 \times 3$-minors, it is a Gröbner basis if and only if the ideal generated by ${\mathrm{lm}}(B)$ has the same Hilbert series as the ideal generated by $3 \times 3$-minors. Since this Hilbert series is known and does not depend on the field [@Conca94], we may do all our computations over one field and conclude that it holds over all fields. We have verified the equivariant Buchberger criterion over ${{\mathbb F}}_2$, which made the computation slightly faster than working over ${{\mathbb Q}}$.

[10]{}

Matthias Aschenbrenner and Christopher J. Hillar. Finite generation of symmetric ideals. , 359(11):5171–5192, 2007.

Matthias Aschenbrenner and Christopher J. Hillar. An algorithm for finding symmetric [G]{}r[ö]{}bner bases in infinite dimensional rings. 2008. Preprint available from `http://arxiv.org/abs/0801.4439`.

Aldo Conca. r[ö]{}bner bases of ideals of minors of a symmetric matrix. , 166(2):406–421, 1994.

Jesús A. de Loera, Bernd Sturmfels, and Rekha R. Thomas. Gr[ö]{}bner bases and triangulations of the second hypersimplex. , 15:409–424, 1995.

Jan Draisma. Finiteness for the k-factor model and chirality varieties. , 223:243–256, 2010. Preprint available from `http://arxiv.org/abs/0811.3503`.

Vesselin Drensky and Roberto La Scala. Gr[ö]{}bner bases of ideals invariant under endomorphisms. , 41(7):835–846, 2006.

Mathias Drton, Bernd Sturmfels, and Seth Sullivant. Algebraic factor analysis: tetrads, pentads and beyond. , 138(3–4):463–493, 2007.

Mathias Drton and Han Xiao. Finiteness of small factor analysis models. personal communication, 2008.

Gert-Martin Greuel, Gerhard Pfister, and Hans Sch[ö]{}nemann. — [A]{} computer algebra system for polynomial computations. 2005. `http://www.singular.uni-kl.de`.

Chris J. Hillar and Seth Sullivant. Finite [G]{}röbner bases in infinite dimensional polynomial rings and applications. preprint, available from `http://arxiv.org/abs/0908.1777`, 2009.

Bernd Sturmfels. Gröbner bases and [S]{}tanley decompositions of determinantal ideals. , 205(1):137–144, 1990.

Bernd Sturmfels and Seth Sullivant. Combinatorial secant varieties. , 2(3):867–891, 2006.

Seth Sullivant. A [G]{}roebner basis for the secant ideal of the second hypersimplex. 2008. Preprint, available from `http://arxiv.org/abs/0804.2897`.

[^1]: The second author is supported by DIAMANT, an NWO mathematics cluster.
