Abstract
We introduce the concept of subalgebra spectrum, Sp(A), for a subalgebra A of finite codimension in \(\mathbb {K}[x]\). The spectrum is a finite subset of the underlying field. We also introduce a tool, the characteristic polynomial of A, which has the spectrum as its set of zeroes. The characteristic polynomial can be computed from the generators of A, thus allowing us to find the spectrum of an algebra given by generators. We proceed by using the spectrum to get descriptions of subalgebras of finite codimension. More precisely we show that A can be described by a set of conditions that each is either of the type \(f(\alpha )=f(\beta )\) for \(\alpha ,\beta\) in Sp(A) or of the type stating that some linear combination of derivatives of different orders evaluated in elements of Sp(A) equals zero. We use these types of conditions to, by an inductive process, find explicit descriptions of subalgebras of codimension up to three. These descriptions also include SAGBI bases for each family of subalgebras.
Introductory examples
Let \({\mathbb {K}}\) be an algebraically closed field of characteristic zero and A be a unital subalgebra in \({\mathbb {K}}[x].\) To begin with we give several nontrivial examples of such subalgebras.
Example 1
\(A=\{f(x)f'(0)=f''(0)=f^{(5)}(0)=0\}.\)
Example 2
Let \(\varepsilon\) be a primitive root of order 8.
Example 3
Let \(\varepsilon\) be a primitive root of order 12.
Example 4
Let \(\varepsilon\) be a primitive root of order 3.
It is not difficult to verify directly that we really get subalgebras. One can check that in fact, if given by generators, they are:
We want to find general principles for how descriptions using conditions in our examples relate to descriptions in terms of generators and other characteristics of subalgebras.
We restrict ourselves to unital subalgebras of finite codimension n and give a classification for small n. Note that a unital subalgebra in \({\mathbb {K}}[x]\) is commutative, associative and contains all constants.
SAGBI bases and type
One of our aims is to get a deeper understanding of the structure of SAGBI bases, for example to find ways to add an extra element to a SAGBI basis in ways that result in a new SAGBI basis. For this reason we remind the reader of some definitions, which we adapt to our univariate situation. More general definitions can be found for example in [1, 2] or [3].
If A is a subalgebra in \({\mathbb {K}}[x]\) the set S of all possible degrees of the nonconstant polynomials in A form a numerical semigroup (that is an additive semigroup consisting of positive integers). It is wellknown that such a semigroup is finitely generated. For any finite generating set we can find a finite set of polynomials G such that our set is exactly \(\{\deg g_ig_i\in G\}.\) We call G a SAGBI basis for A. A proper subset of G can be a SAGBI basis itself, but if there are no such subsets we say that G is minimal.
For any nonconstant polynomial f of degree \(s\in S\) we can find a product \(g=\prod _{g_i\in G} g^{c_i}\) such that \(\deg g=\sum c_i\deg g_i=s.\) Forming \(f\alpha g\) with a suitable constant \(\alpha \in {\mathbb {K}}\) we can obtain a polynomial of smaller degree. We call this operation subduction. If the degree of the obtained polynomial still belongs to S, then we can perform another subduction. The importance of the SAGBI basis lies in the fact that \(f\in A\) if and only if there exists a sequence of subductions reducing f to a constant.
Let A be an algebra in \({\mathbb {K}}[x]\) of finite codimension. We define its type\(T(A)=(d_1,\ldots , d_s)\) as the ordered list of degrees \(d_i\) of the elements of a minimal SAGBI basis. Thus the numbers \(d_i\) are simply the generators of the numerical semigroup \(S=\{\deg f(x)f(x)\in A\}.\) The type is uniquely determined and for a fixed small codimension we can easily enumerate all possible types. For example, there is only one possible type (2, 3) for codimension one and two types, namely (2, 5) and (3, 4, 5) for codimension two. For codimension three the possible types are:
Monomial subalgebras
As we have seen Example 1 in fact describes the subalgebra generated by \(x^4\) and \(x^3\). This result can easily be generalised.
Theorem 1
Let A be a monomial subalgebra, thus A is spanned over \({\mathbb {K}}\) by monomials \(\{x^s,s\in S\},\) where S is a numerical semigroup. Then \(f(x)\in A\) if and only if \(f^{(i)}(0)=0\) for each i that does not belong to S.
Proof
First we check that the derivative conditions describe a subalgebra \(A'\). The conditions are linear so we need only to make sure that if f(x) and g(x) satisfy the conditions then the same is true for the product f(x)g(x). Indeed if \(i\not \in S\) then we have
and either j or \(ij\) does not belong to S (otherwise \(i\in S)\) and in any case we obtain that \(f^{(j)}(0)g^{(ij)}(0)=0.\) Secondly we see directly that any monomial \(x^s,s\in S\) satisfies the conditions. In fact only the monomials \(x^i\) with \(i\not \in S\) do not satisfy the conditions. So certainly \(A\subseteq A'\), but we can say more: if \(f(x)\in A'\) then subduction by A reduces f(x) to another polynomial that satisfies the conditions but is a linear combination of the monomials \(x^i\) with \(i\not \in S\). Such a polynomial must be zero and therefore \(f(x)\in A\) and \(A'\subseteq A.\) We conclude that \(A'=A\). \(\square\)
Here is another useful property of monomial algebras.
Theorem 2
Let \(A=\langle x^{a_1},x^{a_2}, \ldots , x^{a_t} \rangle\) be a monomial subalgebra. There exists \(\alpha \ne \beta\) such that \(f(\alpha )=f(\beta )\) for all \(f(x) \in A\) if and only if \(d=gcd(a_1,a_2, \ldots , a_t) > 1\).
Proof
If \(d>1\) let \(\varepsilon\) be a primitive dth root of unity, \(\varepsilon ^d=1.\) Then we can choose arbitrary nonzero \(\beta\) and \(\alpha =\varepsilon \beta\) to get \(f(\alpha )=f(\beta )\) for all \(f(x) \in A\).
For the opposite direction suppose that \(f(\alpha )=f(\beta )\) for all \(f(x)\in A\) with \(\alpha \ne \beta .\) Note that \(\beta \ne 0.\) Let \(d=\sum c_ia_i\) for some coefficients \(c_1, \ldots c_n\) guaranteed to exist by the Euclidean algorithm. Then
\(\square\)
Note that if \(d>1\) then the subalgebra A is contained in \({\mathbb {K}}[x^d]\) and therefore it has infinite codimension. Such A are outside the scope of our work.
Subalgebras of codimension one
Next, let us look at subalgebras of codimension one (in \({\mathbb {K}}[x]).\) Although relatively simple, these algebras give some insight. Obviously such subalgebras have type (2, 3) thus they contain polynomials of degree 2 and 3, which generate our subalgebra. Using variable substitution we can restrict ourselves to the case where the polynomial of degree two is \(x^2\). (Note that all constants are always in any subalgebra). Now the polynomial of degree three can be chosen as \(x^3ax\). (Again, the constants are not essential and \(bx^2\) can be subtracted). If \(a=0\) then we get a monomial case and know how to describe it from Theorem 1.
If \(a\ne 0\) then the replacement \(x\rightarrow \alpha x\) with \(\alpha ^2= a\) reduces the situation to the case \(x^3x.\) So it is sufficient to study the subalgebra \(A=\langle x^3x,x^2\rangle .\) Note that for each odd \(k>1\) we have \(x^kx=(x^{k2}x)x^2+(x^3x)\in A\) by induction. So \(f(x)=\sum a_ix^i\) can be subduced to cx where \(c=a_1+a_3+a_5+\cdots\). Thus \(f(x)\in A\Leftrightarrow c=0\Leftrightarrow f(1)f(1)=0.\) This gives us the following result:
Theorem 3
For any subalgebra A of codimension one either there exists \(\gamma\) such that \(f(x)\in A\Leftrightarrow f'(\gamma )=0\) or there exists \(\alpha \ne \beta\) such that \(f(x)\in A\Leftrightarrow f(\alpha )=f(\beta )\).
Proof
We only need to recover the old variable. Then the monomial case corresponds to the first case and \(f(1)=f(1)\) to the second. \(\square\)
The above theorem already displays some ideas that we will try to generalise later on.
Derivations
Definition 1
Let \(\alpha \in {\mathbb {K}}.\) A linear map \(D:A\rightarrow {\mathbb {K}}\) is called an \(\alpha\)derivation if it satisfies the condition
for any \(f(x),g(x)\in A.\) We simply call it a derivation if it is an \(\alpha\)derivation for some \(\alpha .\)
A simple example is trivial derivation \(f(x)\rightarrow cf'(\alpha ).\) For \(A={\mathbb {K}}[x]\) we have only trivial \(\alpha\)derivations (with \(c=D(x)\)), but as we will see later we can find other derivations in proper subalgebras.
Note that the set of \(\alpha\)derivations is a vector space over \({\mathbb {K}},\) but the set of all derivations on A is not. Nevertheless it is important for the future to note that a \(\beta\)derivation is also an \(\alpha\)derivation if \(f(\alpha )=f(\beta )\) for any \(f(x)\in A.\)
Now we can formulate an important result obtained in [4], that will turn out to be pivotal for our continued exploration.
Theorem 4
Any subalgebra A of codimension \(n>1\) is contained in a subalgebra B of codimension \(n1.\) Moreover A can be defined in B either as the kernel of some \(\alpha\)derivation of B or as \(A=\{f(x)\in Bf(\alpha )=f(\beta )\}\) for some \(\alpha ,\beta \in {\mathbb {K}}.\)
Note that in [4] derivations are defined in a more general way, by the condition \(D(fg)= D(f)\varphi (g)+\varphi (f)D(g),\) for some ring homomorphism \(\varphi : B\rightarrow {\mathbb {K}}\). But in the same article it is shown that any homomorphism \(A\rightarrow {\mathbb {K}}\) can be lifted to a homomorphism \(B\rightarrow {\mathbb {K}}\). Induction over codimension shows that in our situation such an algebra homomorphism is simply a homomorphism \({\mathbb {K}}[x]\rightarrow {\mathbb {K}}\) which is nothing else than a map \(f(x)\rightarrow f(\alpha )\) for some \(\alpha \in {\mathbb {K}}.\) For that reason we can use \(\alpha\)derivation in our reformulation.
We are thankful our referee for the following important remark. We can introduce more general \((\alpha ,\beta )\)derivations as maps \(D:B\rightarrow {\mathbb {K}}\) such that
and still have \(A=\ker D\) as a subalgebra. Thus we can consider the map \(f(x)\rightarrow f(\alpha )f(\beta )\) as \((\alpha ,\beta )\)derivation and \(\alpha\)derivations as \((\alpha ,\alpha )\)derivation which explains why many of our proofs below are quite similar for both alternatives. In fact his comments give much deeper generalisation, but we restrict ourselves by this remark only.
Subalgebra conditions
A straightforward induction argument using Theorem 4 shows that any subalgebra A of codimension n can be described by n linear conditions \(L_i(f)=0\) where \(L_i\) is either a derivation of some subalgebra containing A or has the form \(L_i(f)=f(\alpha _i)f(\beta _i)\) for some constants \(\alpha _i,\beta _i \in {\mathbb {K}}.\)
Our main hypothesis when initiating this work (which will be proved later) was that linear conditions defining subalgebras can be stated in a neater way. Namely, we hoped that for any subalgebra of finite codimension m there would exist a finite set, which we will call the spectrum of the algebra, and m linear conditions expressed in terms of f(x) and finitely many derivatives \(f^{(k)}\) evaluated in the elements of the spectrum which determine if \(f(x)\in A.\) We have seen such conditions in Theorems 1 and 3 and in Examples 1–4 and want to understand their nature.
We want them to be subalgebra conditions. By this we mean that the set of all polynomials satisfying the conditions form a subalgebra. Since our conditions are linear we only need to demand two things for them to be subalgebra conditions. Firstly, a trivial one: that constants should satisfy the conditions. Secondly, a nontrivial one: that whenever f(x) and g(x) satisfy the conditions, so does the product f(x)g(x).
For example the condition \(f(\alpha )=0\) is not a subalgebra condition, because the nonzero constants do not satisfy it. But the condition \(f(\alpha )=f(\beta )\) is a subalgebra condition. The same is true for the condition \(f'(\alpha )=0.\)
The single condition \(f'(\alpha )+f'(\beta )=0\) is not a subalgebra condition, but together the conditions \(f(\alpha )=f(\beta ),f'(\alpha )+f'(\beta )=0\) are subalgebra conditions. As this example shows being subalgebra conditions is a property of a set of conditions. (The set may, however, as in the first two examples, consist of just one element.)
In general, any condition \(\sum c_if'(\alpha _i)=0\) combined with \(f(\alpha _1)=f(\alpha _2)=\cdots =f(\alpha _k)\) gives a set of subalgebra conditions.
Indeed since the conditions are linear we only need to check that if f(x) and g(x) satisfy the conditions then the same is true for f(x)g(x). We have
One can find generalisations including derivatives of higher order, but we skip this for now and show only one spectacular example of subalgebra conditions:
Spectrum
Now we want to introduce the main definition of this article.
Definition 2
Let A be a subalgebra of finite codimension. Its spectrum consists of \(\alpha \in {\mathbb {K}}\) such that either \(f'(\alpha )=0\) for all \(f(x)\in A\) or there exists \(\beta \ne \alpha\) such that \(f(\alpha )=f(\beta )\) for all \(f(x)\in A\). In the second case \(\beta\) obviously belongs to the spectrum as well. We write Sp(A) to denote the spectrum of the algebra A.
Unfortunately the word spectrum already has a specific meaning, so it would be more correct to use something like “subalgebra spectrum”, but because we believe that this notion is very important and that the word spectrum reflects this concept very well we use the word “spectrum”. This makes our article more readable and in our context the interpretation should be unambiguous.
We have already seen in Theorem 3 how the spectrum naturally arises in the description of subalgebras of codimension one.
One trivial but useful remark is the following.
Theorem 5
If \(A\subseteq B\) are two subalgebras in \({\mathbb {K}}[x]\) then \(Sp(B) \subseteq Sp(A)\). Thus the spectrum has the reversing inclusions property.
Proof
Each condition that holds in B holds in A as well. \(\square\)
Theorem 6
Each proper subalgebra A in \({\mathbb {K}}[x]\) has nonempty spectrum.
Proof
Induction and Theorem 4 shows that A is a subalgebra of a subalgebra of codimension 1. Then Theorems 5 and 3 finish the proof. \(\square\)
While this theorem is valid for any proper subalgebra in \({\mathbb {K}}[x],\) it is shown in Sect. 27 that for polynomials in two variables one can find a proper subalgebra with empty spectrum.
One of our main results can be formulated as follows.
Theorem 7
If A is a proper subalgebra of finite codimension then only the values of f(x) and finitely many of its derivatives \(f^{(j)}(x)\) in the elements of the spectrum determine if \(f(x)\in A.\)
We will prove this later. We already have done so for monomial subalgebras and for subalgebras of codimension one.
Before moving on we give some equivalent definitions of the spectrum.
Theorem 8
Let A be a subalgebra of finite codimension and \(\alpha \in {\mathbb {K}}\). The following is equivalent.

(i)
\(\alpha\) belongs to the spectrum of A.

(ii)
There exists \(\beta \in {\mathbb {K}}\) such that \((x\alpha )(x\beta )\) divides \(f(x)f(\alpha )\) for any \(f(x)\in A\).

(iii)
There exists \(\beta \in {\mathbb {K}}\) and a SAGBI basis G of A such that \((x\alpha )(x\beta )\) divides each element in G.

(iv)
\(\alpha\) belongs to the spectrum of the subalgebra \(\langle p(x),q(x) \rangle\) for each pair of monic \(p(x),q(x)\in A\) with relatively prime degrees.
Note that the condition of relatively prime degrees in (iv) is necessary since it guarantees that \(\langle p(x), q(x) \rangle\) is of finite codimension.
Proof
(ii) is a simple reformulation of (i). (Note that we can take \(\beta =\alpha\) when the condition is \(f'(\alpha )=0).\)
(ii) implies (iii) almost directly. We choose any SAGBI basis and replace each element g by \(gg(\alpha )\) obtaining a new SAGBI basis.
(iii) implies (ii) because any \(f(x) \in A\) can be subduced to a constant c. In each subduction step a polynomial divisible by \((x\alpha )(x\beta )\) is subtracted. Hence \(f(x)c\) is divisible by \((x\alpha )(x\beta )\). It is easy to see that we must have \(c=f(\alpha )\).
By Theorem 5 (i) implies (iv). The opposite, that (iv) implies (i) is more difficult. If there exists \(f(x)\in A\) such that \(f'(\alpha )\ne 0\) we need to find \(\beta .\) Subtracting a constant we can suppose that \(f(\alpha )=0\) and let \(\beta _1,\ldots ,\beta _k\) be the other roots of f(x), which exist because A is a proper subalgebra and \({\mathbb {K}}\) is algebraically closed. Then \(\beta\) should equal some \(\beta _i.\) If the implication does not hold then for each i there exists \(g_i(x)\in A\) such that \(g_i(\beta _i)\ne g_i(\alpha ).\) Subtracting a constant we can suppose that \(g_i(\alpha )=0,\) but \(g_i(\beta _i)\ne 0.\) Now, using that our field is infinite, we can easily construct a linear combination g(x) of the \(g_i\), such that \(g(\alpha )=0\) but \(g(\beta _i)\ne 0\) for each i. Since A has a finite codimension we can for each large degree find a polynomial that belongs to A. We choose such a monic polynomial h(x) that has degree larger than \(\deg g(x)\) and relatively prime to \(\deg f(x).\) We can also suppose that \(h(\alpha )=0.\)
The next step is to construct a polynomial \(p(x)=h(x)+cg(x)\) that has the same property as g(x), namely \(p(\alpha )=0\) but \(p(\beta _i)\ne 0\) for each i. Again, this is possible because our field is infinite. Let q(x) be f(x) divided by its leading coefficient. Consider the subalgebra \(\langle p(x),q(x)\rangle .\) Because \(\alpha\) belongs to its spectrum and \(q'(\alpha )\ne 0\) there exists \(\beta\) such that \(p(\alpha )=p(\beta )\) and \(q(\alpha )=q(\beta ).\) But \(q(\alpha )=0\) so \(\beta =\beta _i\) for some i. On the other hand \(0=p(\alpha )\ne p(\beta _i)\) and we get a contradiction. This proves that our assumption that (iv) does not imply (i) must have been wrong. \(\square\)
Linear independence
To be sure that the maps we use later are linearly independent we need to prove some auxiliary statements, even though they may seem quite obvious or wellknown.
Theorem 9
Let \(\alpha _1,\ldots \alpha _m\) be different elements in \({\mathbb {K}}.\) The maps \(L_{ij}:{\mathbb {K}}[x]\rightarrow {\mathbb {K}}\) defined by
are linearly independent.
Proof
Suppose the opposite. Then
and WLOG \(c_{k1}\ne 0\) and \(c_{i1}=0\) for \(i>k.\) Choose N such that \(c_{ij}=0\) for \(i\ge N\) and consider
Then \(L_{ij}(f)=0\) for \(j>1\) and for \(j=1,i<k.\) On the other hand
and we get a contradiction. \(\square\)
Naturally we can have some dependencies in a proper subalgebra but we want to show that all of them are linear combinations of defining subalgebra conditions.
Theorem 10
Let V be a vector space over \({\mathbb {K}}\) and \(L_1,\ldots L_n\) be linear independent linear maps \(L_i:V\rightarrow {\mathbb {K}}.\) Consider the vector subspace \(A=\bigcap _{i=1}^n\ker L_i\). Consider another linear map \(l:V\rightarrow {\mathbb {K}}\) such that \(l_A=0.\) Then \(l=\sum _{i=1}^n c_iL_i\) for some \(c_i\in {\mathbb {K}}.\)
Proof
We use induction on n. If \(n=1\) then \(L_1\ne 0\) and we can choose a vector \(v\in V\) such that \(L_1v=1.\) Then \(V={\mathbb {K}}v+\ker L_1\) and because \(\ker L_1\subseteq \ker l\) we get that \(l=c_1L_1,\) where \(c_1=l(v).\)
Now let \(n>1.\) Consider \(U=\bigcap _{i=2}^n\ker L_i\). Then by induction \(L_1_U\ne 0\) (otherwise the \(L_i's\) are linearly dependent). Then \(A=U\bigcap \ker L_1\) and the arguments above shows that \(l_U=c_1L_1_U\). Applying the induction to \(lc_1L_1\) considered on U we get that \(lc_1L_1=\sum _{i=2}^n c_iL_i\) and we are done. \(\square\)
The size of the spectrum
How large can the spectrum of a subalgebra of finite codimension n be? To answer this question we first prove an important statement, which essentially says that elements in the spectrum appear in a natural way and there are no “ghost” elements in the spectrum.
Theorem 11
Suppose that the subalgebra A is obtained from the subalgebra B by adding an extra condition \(L(f(x))=0\) where either \(L(f(x))=f(\alpha )f(\beta )\) or L is some \(\alpha\)derivation. If \(\lambda \not \in Sp(B) \cup \{\alpha ,\beta \}\) then \(\lambda \not \in Sp(A).\)
Proof
Suppose the opposite, that \(\lambda \in Sp(A),\) but \(\lambda \not \in Sp(B) \cup \{\alpha ,\beta \}.\) Then for any \(f=f(x)\in A\) we have \(l(f)=0,\) where either \(l(f)=f(\lambda )f(\mu )\) or \(l(f)=f'(\lambda ).\) By Theorem 10 we get that \(l=cL\) which obviously leads to the contradiction with Theorems 9 and 10 in all four different situations (two alternatives for L and two alternatives for l). \(\square\)
Now we can get a bound for the size of the spectrum.
Theorem 12
Let A be a subalgebra in \({\mathbb {K}}[x]\) of codimension n. Then

\(Sp(A) \le 2n.\)

\(Sp(A)=2n\) if and only if A can be described by n conditions of the form \(f(\alpha _i)=f(\beta _i), i=1,\ldots , n\), all \(\alpha _1,\ldots ,\alpha _n, \beta _1,\ldots ,\beta _n\) being different.

\(Sp(A)=2n1\) if and only if A can be described by \(n1\) conditions of the form \(f(\alpha _i)=f(\beta _i), i=1,\ldots , n1\) and one extra condition either of the form \(f'(\alpha _0)=0\) or of the form \(f(\alpha _0)=f(\alpha _1),\) all \(\alpha _0,\ldots ,\alpha _{n1}, \beta _1,\ldots ,\beta _{n1}\) being different. The second alternative is possible only if \(n>1.\)
Proof
The first two statements follow directly by induction from the previous theorem and Theorem 4. For the last statement we need to describe the induction in greater detail. For \(n=1\) the statement is trivial. If \(n>1\) and A is obtained from B by an extra condition then \(Sp(B) \ge 2n3\). If \(Sp(B)=2n3\) the extra condition is of the form \(f(\alpha )=f(\beta ),\) where \(\alpha ,\beta\) does not belong to the spectrum of B and we can simply use the induction hypothesis. If \(Sp(B)>2n3\) then by Theorem 11 it must be \(2n2\). If the extra condition is of the form \(f(\alpha )=f(\beta )\) exactly one of \(\alpha\) or \(\beta\) should belong to the spectrum of B. WLOG it coincides with \(\alpha _1.\) Otherwise the extra condition is an \(\alpha\)derivation for some \(\alpha\) that does not belong to Sp(B). By Theorem 18 below we can replace it by \(f(x)\rightarrow f'(\alpha )\) and it remains to rename \(\alpha\) to \(\alpha _0.\) \(\square\)
The characteristic polynomial for subalgebras on two generators
Now we want to understand how to find the spectrum. We start from a special case where we can explicitly construct a polynomial which roots are exactly the elements of the spectrum.
Let p(x), q(x) be two monic polynomials. Consider the following polynomials in two variables:
We now introduce a definition that will be helpful when determining the spectrum of the subalgebra generated by p and q.
Definition 3
The characteristic polynomial\(\chi _{p,q}\) is the resultant
of polynomials P and Q considered as polynomials in y.
For example, if \(p(x)=x^3x,q(x)=x^2\) then \(P(x,y)=y^2+yx+x^21, Q(x,y)=y+x\) and
Its roots are 1 and \(1\) and this gives some insight into why \(f(1)=f(1)\) was the subalgebra condition for \(A=\langle x^3x,x^2\rangle .\)
It is easy to check that get \(\chi _{x^3,x^2}(x)=x^2\) and this can be easily generalised, as shown below.
Theorem 13
If \((m,n)=1\) then \(\chi _{x^n,x^m}(x)=x^{(n1)(m1)}\).
Proof
Assume without loss of generality that \(n>m\). First note that the polynomials \(P(x,y) = \frac{x^n  y^n}{xy}\) and \(Q(x,y) = \frac{x^m  y^m}{xy}\) can be expressed as \(P = \sum _{i=0}^{n1} y^ix^{n1i}\), \(Q = \sum _{i=0}^{m1} y^ix^{m1i}\) respectively. This means that
If \(m = 1\), this determinant is upper triangular and equal to \(1 = x^{(m1)(n1)}\). This will be the base case for a proof by induction. If \(m \ne 1\), for \(i \in \{1, \ldots , m1\}\) we subtract row \(m  1 + i\) from row i. Now rows \(1, \ldots , m1\) will have \(x^{m}\) as first nonzero element, in column \(m+i\). One can break out a factor \(x^m\) from each of these rows. Now \(\chi _A(x)\) is a block determinant on the form
where A is an upper triangular \((m1)\)matrix with ones on the main diagonal. Expanding the determinant along the first column \(m1\) times and rearranging the rows gives
which is of size \((n2)\). Note that this is exactly the characteristic polynomial of \(\langle x^m, x^{nm}\rangle\) multiplied by \((x^m)^{m1}\).
Assuming, by induction hypothesis, that we have \(\chi _{ x^m, x^{nm} }(x) = x^{(m1)(nm1)}\) we get \(\chi _{x^n,x^m}(x) = x^{m(m1)}x^{(m1)(nm1)} = x^{(m1)(n1)}\). The induction hypothesis can be used since \((nm,m)=(n,m)=1.\) \(\square\)
Computing \(\chi _{p,q}\)
An alternative proof of Theorem 13 stems from computing the resultant \({\text {Res}}_y\left( P,Q \right)\) using reductions of P by Q and vice versa. A more exact statement is given in the below proposition. Here lc(Q) denotes the leading coefficient of Q(x, y) when regarded as a polynomial in y with coefficients in \({\mathbb {K}}[x]\), and degrees are also taken with respect to y.
Proposition 1
Assume that \(P,Q \in {\mathbb {K}}[x,y]\), and that \(P_1(x,y)=P(x,y)h(x,y)Q(x,y)\) for some polynomial \(h \in {\mathbb {K}}[x,y]\). Then
Similarly we have that
Proof
This follows from the fact that the resultant
where \(\xi _i\) are the roots of Q when regarding Q as a polynomial in y. (See [5].) The roots are counted with multiplicity and they may lie in some extension of the field \({\mathbb {K}}[x]\) of coefficients.
Now, in the same way, we get an expression
but \(P_1(x,\xi _i)=P(x,\xi _i)h(x,\xi _i)Q(x,\xi _i)=P(x,\xi _i)\) and by comparing the two expressions we get the first statement of the proposition.
The second statement is proven in the same way, but is slightly easier to handle since \({\text {Res}}_y\left( Q,P \right) =lc(Q)^{deg(P)}\prod P(x,\xi _i)\) does not contain powers of \(1\). \(\square\)
The above proposition, which also can be found in [6], can be a useful tool for computing the characteristic polynomial when the generating polynomials are sparse. Let us first look at the two easy examples. We have
and
The second computation can be generalised to any case of two monomial generators, as follows. If \(p=x^n\) and \(q=x^m\) with \(n=qm+r\) we can subtract powers of y multiplied by Q from P until we obtain \(P_1= \sum _{j=0}^{r1}x^{n1j}y^j=x^{nr} \sum _{j=0}^{r1}x^{r1j}y^j\). Note that the latter sum equals \(H(x,y)=\frac{r(x)r(y)}{xy}\) for \(h=x^r\). This can be used to obtain a more elegant inductive proof of Theorem 13 as
By the induction hypothesis \(\chi _{q,h}=x^{(m1)(r1)}\) and this results in
as we already knew from Theorem 13.
Finally, let us consider a more complicated example where we compute the characteristic polynomial of \(A=\langle x^7+2x^3x,x^5+x^2\rangle\).
Example 5
Let \(p(x)= x^7+2x^3x\), \(q(x)=x^5+x^2\) and \(P(x,y)=\frac{p(x)p(y)}{xy}\), \(Q(x,y)=\frac{q(x)q(y)}{xy}\).Then
where \(P_1(x,y)=P(x,y)y^2Q(x,y)\) is formed by subtracting multiples of Q from P in such a way that the ydegree decreases. Now \(deg_y(P_1)=3\) and \(deg_y(Q)=4\) so the next step is to form \(Q_1(x,y)=Q(x,y)+(y+2)P_1(x,y)=a(x)y^2+b(x)y+c(x)\). We have
In the next step we want to reduce \(P_1\) using \(Q_1\), but \(Q_1\) has a nonconstant leading coefficient \(a(x)=x^5+x^2+4\). We can get around this problem as follows:
where \(deg_y(P_2)=2\). A final step gives us \(Q_2(x)=r(x)a(x)^2\). Here
and hence
with \(h(x)=(x^{10}  x^9 + 3x^8  3x^7 + 6x^6  2x^5 + 3x^4  x^3 + x^2 + 3x  2)\) is our desired resultant. This shows that Sp(A) has 16 elements. (One can verify that h(x) has no multiple roots.)
As the above example shows, even if the process of computation is fairly simple, it is not easy to track how the resulting polynomial relates to the initial polynomials.
There are more efficient methods for computing resultants. For computing a resultant of two bivariate polynomials p, q of degree at most k there are wellknow algorithms with time complexity \(k^{3+o(1)}\). There are also more efficient algorithms known, see [7], but for our purposes standard implementations have been efficient enough.
Properties of \(\chi _{p,q}\)
Let us next turn to an interesting property of \(\chi _{p,q}\). The below theorem relates \(\chi _{p,q}\) to partial derivatives of a polynomial F that turns up when applying the standard algorithm for computing a SAGBI basis for \(\langle p,q \rangle\). (See [1].) As we will see this theorem turns out to be an important building block for showing that derivations of nonspectral elements are trivial.
Theorem 14
If \(m=\deg p(x), n=\deg q(x)\) and \((m,n)=1\) then

\(\chi _{p,q}(x)\) is a polynomial of degree \((m1)(n1).\)

If F(p, q) is the resultant of \(p(x)p,q(x)q\) then
$$\begin{aligned} \frac{\partial F}{\partial p}_{p=p(x),q=q(x)}=\pm \chi _{p,q}(x)q'(x). \\ \frac{\partial F}{\partial q}_{p=p(x),q=q(x)}=\mp \chi _{p,q}(x)p'(x). \end{aligned}$$
Proof
Let us look at what we did in the proof of Theorem 13 again. In a complete expansion of the determinant we choose in each column j either \(x^{ji}\) (if we choose row i from the first \(m1\) rows ) or we choose \(x^{ji+(m1)}\) (if we choose a row i between the last \(n1\) rows). Because \(\sum j=\sum i\) we get a total degree in the product equal to \((n1)(m1).\) We can never get larger degree. The difference when we use p(x) and q(x) instead is that we add some terms of smaller degree in each element of the matrix. But they cannot affect our maximum total degree term \(x^{ (n1)(m1)}\) so the highest coefficient in \(\chi _{p,q}(x)\) at \(x^{ (n1)(m1)}\) is the same as for the monomial case.
To prove the second statement we use a wellknown fact (see [8]) that
where the product is taken over all roots of \(q(y)q\) in some field extension with multiplicity. When we evaluate this for \(p=p(x)\) and \(q=q(x)\) we get zero because \(y=x\) is one of the roots. If we take a partial derivative with respect to p first and evaluate in \(p=p(x)\) and \(q=q(x)\) after that we get a sum over roots where all terms except one (corresponding the root \(y=x\)) are zero. But we can get this remaining term in another way if we replace \(q(x)q\) by \(\frac{q(y)q(x)}{yx}\) and \(p(y)p\) by \(p(y)p(x)\) in our resultant. Thus (up to sign) we get the resultant \({\text {Res}}_y\left( p(y)p(x), \frac{q(y)q(x)}{yx}\right) .\)
Now, using another property of the resultant we get
where all resultants above are evaluated in y. Here we have also used that for any polynomial f(x) we have \(f'(x)=\frac{f(x)f(y)}{xy}_{y=x}\) because this is obviously true for \(f(x)=x^k.\) We obtain the second formula in a similar way and the signs should be opposite because \((F(p(x),q(x))'=F'_pp'(x)+F'_qq'(x)\) should be zero. \(\square\)
Example 6
Let \(p(x)=x^{3}x\), \(q(x)=x^{2}.\) Then F(p, q) is the resultant of \(x^3xp\) and \(x^2q\) and is equal to
As expected we get:
Are there instances when \(\chi _{f,g}\) has an infinite number of roots? The answer is yes, as we have already seen for certain monomial subalgebras. More precisely we have seen that \(\chi _{x^m,x^n}=0\) if and only if \((m,n)>1\). We will now generalise this result.
Theorem 15
Let p(x) and q(x) be nonconstant polynomials. Then \(\chi _{p,q}(x)=0\) if and only if there exists a polynomial h(x) of degree at least two such that \(p(x),q(x)\in {\mathbb {K}}[h]\).
Proof
Suppose first that \(p=\pi \circ h.\) We know \(\pi (a)\pi (b)=(ab)\rho (a,b)\) for some \(\rho\) so
This means that \(P(x,y)=\frac{p(x)p(y)}{xy}\) has a factor \(\frac{h(x)h(y)}{xy}\) which is a polynomial in y of degree at least one. Similarly if \(q(x)\in {\mathbb {K}}[h]\) then Q(x, y) also has this factor so they have a common factor as polynomials in y over \({\mathbb {K}}(x)\) and as a consequence their resultant \(\chi _{p,q}(x)\) is equal to zero.
To prove the opposite assume now that \(\deg p(x)=n\) and \(\deg q(x)=m\). Let F(p, q) be the resultant of \(p(x)p,q(x)q\), as before. We know from lemma 19 in [1] that \(F(p,q)=\sum _{in+jm \le nm}c_{ij}p^iq^j\) where \(c_{ij}\) are constants in \({\mathbb {K}}\). Moreover, it follows from that lemma that \(p^m\) has nonzero coefficient and all other terms contain p to a power strictly lower than m. Assume now that \(\chi _{p,q}(x)=0\). Then it follows from Theorem 14 that we can differentiate F with respect to p and get another identity involving p and q. Regarding p as variable this identity is a polynomial of degree \(m1\) with coefficients in \({\mathbb {K}}(q)\), showing that adjoining p to the field \({\mathbb {K}}(q)\) is an extension of degree at most \(m1\). From Lemma 13 in [1] we get the first equality in \(m=[{\mathbb {K}}(x):{\mathbb {K}}(q)]=[{\mathbb {K}}(x):{\mathbb {K}}(p,q)][{\mathbb {K}}(p,q):{\mathbb {K}}(q)]\). Now it follows that \([{\mathbb {K}}(x):{\mathbb {K}}(p,q)] \ge 2\). On the other hand we know by Theorem 14 in [1] that \({\mathbb {K}}(p,q)={\mathbb {K}}(h)\) for some polynomial h and this means that we have a polynomial h of degree \([{\mathbb {K}}(x):{\mathbb {K}}(p,q)] \ge 2\) such that \(p(x),q(x)\in {\mathbb {K}}[h]\). \(\square\)
How the spectrum relates to \(\chi _{p,q}(x)\)
Now we want to compare the roots of the characteristic polynomial with the spectrum.
To start with we will focus our attention on a special case  an algebra A generated by two monic polynomials p(x), q(x) of degrees \(m>n\) with \((m,n)=1.\) It is known that they form SAGBI basis for A (see [1]) and therefore A has codimension \(g(m,n)=(m1)(n1)/2\). (Here g(m, n) is the genus of the corresponding semigroup of degrees.) So if we want to describe this algebra we need to find g(m, n) subalgebra conditions. For \(m=3,n=2\) we have done that in Theorem 3.
Theorem 16
Let \(A=\langle p(x),q(x)\rangle\) and \(\alpha \in {\mathbb {K}}.\) The following is equivalent.

(i)
\(\alpha\) belongs to the spectrum, thus either \(f'(\alpha )=0\) for any \(f(x)\in A\) or there exists \(\beta \ne \alpha\) such that \(f(\alpha )=f(\beta )\) for any \(f(x)\in A\).

(ii)
Either \(p'(\alpha )=q'(\alpha )=0\) or there exists \(\beta \ne \alpha\) such that \(p(\alpha )=p(\beta )\) and \(q(\alpha )=q(\beta ).\)

(iii)
\(\alpha\) is a root of the characteristic polynomial of A.
Proof
The alternatives (i) and (ii) are equivalent since each of the two conditions stated in (ii) are closed under sums and products, so we need only to prove that (ii) and (iii) are equivalent. By the fundamental property of the resultant (see e.g. [8]) we know that \(\alpha\) is a root of the characteristic polynomial if and only if there is some \(\beta \in {\mathbb {K}}\) such that \(P(\alpha ,\beta )=Q(\alpha ,\beta )=0\).
We now regard two different cases. The first case is when \(\beta \ne \alpha\). In this case we have that \(p(\alpha )p(\beta )=(\alpha \beta )P(\alpha ,\beta )=0\) and similarly \(q(\alpha )=q(\beta )\). Thus the second statement of (ii) holds.
The other case is that \(\alpha =\beta\) which means that \(0=P(\alpha ,\alpha )=p'(\alpha )\). (The second equality can easily be derived from the definition of P as \(P(x,y)=(p(x)p(y))/(xy)\).) In the same manner we find that \(q'(\alpha )=0\) so in this case the first statement of (ii) holds. \(\square\)
This shows that the characteristic polynomial allows us to find the spectrum explicitly, for the subalgebras we currently study. Note that the theorem also shows that the characteristic polynomial is never a constant, because the spectrum is always nonempty.
Also note that Theorem 8 gives us a theoretical way to find the spectrum for any subalgebra. In most practical cases it is sufficient to consider only \(\chi _{p,q}\) for each pair \(\{p,q\}\) of generators, but the problem is that their degrees are not always relatively prime.
Here is another application of the theorem.
Proposition 2
If a(x) is a polynomial of degree at least two that divides both p(x) and q(x) then all the roots of a(x) are roots of \(\chi _{p,q}(x)\).
Proof
If \((x\alpha )(x\beta )a(x)\) then \((x\alpha )(x\beta )f(x)f(\alpha )\) for any \(f(x)\in A\) because p and q generate A and are divisible by a(x). The rest follows from Theorems 8 and 16 . \(\square\)
This shows that common factors of p and q with no multiple roots are also factors of \(\chi _{p,q}\). By modifying the proof a little we can get the same result also for factors with multiple roots.
Theorem 17
If a(x) is a polynomial of degree at least two that divides both p(x) and q(x) then \(a(x)\chi _{p,q}(x)\).
Proof
Assume that \(p(x)=a(x)p_1(x)\) and \(q(x)=a(x)q_1(x)\). Now we modify a(x) to separate its roots by introducing an additional variable s. If \(a(x)=\prod _{i=1}^k(x\xi _i)^{m_i}\), then let \({\tilde{a}}= \prod _{i=1}^k \prod _{l=1}^{m_i} (x\xi _i(l1)s).\) Let \({\tilde{p}}={\tilde{a}}p_1\) and \({\tilde{q}}={\tilde{a}}q_1\). It follows that \({\tilde{P}}(x,y)=P(x,y)+sR(x,y)\) and \({\tilde{Q}}(x,y)=Q(x,y)+sT(x,y)\) for some polynomials R, T with coefficients in k[s]. Thus
for some polynomial h. The first equality in the last row comes from the fact that when computing the resultant from its definition as a determinant, every term that has been added contains at least one factor s. Now \(\chi _{{\tilde{P}},{\tilde{Q}}}(x)\) has a factor \({\tilde{a}}(x)\) by the previous theorem. That is \(\chi _{P,Q}+sh(x,s)={\tilde{a}}(x)u(x,s)\). Now let \(s=0\) to conclude the proof. \(\square\)
As an example, let us apply the above theorem as a tool for finding conditions for the subalgebra \(A= \langle x^4x^2,x^3 \rangle .\)
We see that \(x^2\) divides both generators so it should divide the characteristic polynomial as well. Thus zero is in the spectrum. Moreover \(f'(0)=0\) is valid for both generators and therefore is one of the conditions. Because \(g(4,3)=3\) we should find two additional subalgebra conditions. The characteristic polynomial can be found using Maple and it is equal to \(x^2(x^4x^2+1).\)
Thus, besides zero we have four other elements in the spectrum, which are in fact primitive roots of degree 12. If we name one of them \(\varepsilon ,\) the remaining ones will be \(\varepsilon ^5,\varepsilon ^7,\varepsilon ^{11}.\) From Theorem 12 we find that the remaining conditions are of equality type. Thus we need to arrange those primitive roots in pairs to get conditions of the form \(f(\alpha )=f(\beta ).\) It is not hard to check that \(\{ f(x)  f'(0)=0, f(\varepsilon )=f(\varepsilon ^5), f(\varepsilon ^7)=f(\varepsilon ^{11})\}\) is the choice that contains \(x^3\).
In fact, experiments suggests that when the degree of the factor a(x) is higher than two its multiplicity as a factor of the resultant is higher.
Conjecture 1
If a(x) is a polynomial of degree at least two that divides both p(x) and q(x) then \(a(x)^{deg(a)1}\chi _{p,q}(x)\).
Derivations in A
Now we want to formulate some general statements about derivations. We begin our study with a subalgebra A, generated by two polynomials p(x) and q(x) of relatively prime degrees. As we know (see [1]) p(x), q(x) form a SAGBI basis and has one relation \(F(p,q)=0\) arising from the corresponding resultant. (Thus this F is the same as in theorem 14.)
Denote \(D(p(x))=Dp\) and \(D(p(x))=Dq\). First note that for any polynomial G(p, q) we have
If we denote \(\frac{\partial F}{\partial p}(p(\alpha ), q(\alpha ))\) by \(F'_p(\alpha )\) and \(\frac{\partial F}{\partial q}(p(\alpha ), q(\alpha ))\) by \(F'_q(\alpha )\) then we get that
is a necessary and sufficient condition for a linear map D to be a derivation of A.
Note also that taking the ordinary derivative in \(\alpha\) we get
Suppose now that \(\alpha\) does not belong to the spectrum Sp(A). Then we know that the vector \(v=\left( p'(\alpha ),q'(\alpha )\right)\) is nonzero. Also, according to Theorem 16, we have \(\chi _{p,q}(\alpha )\ne 0.\) Now it follows from Theorem 14 that the vector \(w=\left( F'_p(\alpha ),F'_q(\alpha )\right) \ne (0,0).\) As the above equalities show that both the nonzero vector \(v=\left( p'(\alpha ),q'(\alpha )\right)\) and the vector (Dp, Dq) are orthogonal to w, they must be parallel. This means that \((Dp,Dq)=c\left( p'(\alpha ),q'(\alpha )\right)\) and thus we simply have \(D(f(x))=cf'(\alpha )\). In other words, D is a trivial derivation.
Now we generalise this to an arbitrary subalgebra A.
Theorem 18
Let A be an arbitrary subalgebra of finite codimension and D be an \(\alpha\)derivation on A. Suppose that \(\alpha\) does not belong to the spectrum of A. Then D is a trivial derivation, \(D(f(x))=cf'(\alpha ).\)
Proof
Let f(x) be any polynomial in A. First we prove that if \(\alpha\) is a double root of f(x) then \(D(f(x))=0.\) Suppose the opposite. Let \(\beta _1,\ldots ,\beta _k\) be the other roots of f(x). For each i there exists \(g_i(x)\in A\) such that \(g_i(\beta _i)\ne g_i(\alpha ).\) Subtracting a constant we can suppose that \(g_i(\alpha )=0,\) but \(g_i(\beta _i)\ne 0.\) Beside that there exists \(g_0(x)\in A\) such that \(g_0(\alpha )=0,\) but \(g_0'(\alpha )\ne 0\) (all this because \(\alpha\) does not belong to the spectrum). Now, using the fact that an algebraically closed field is infinite, we can easily construct a linear combination g(x) of the \(g_i\) such that \(g(\alpha )=0\) but \(g(\beta _i)\ne 0\) for each \(i>0\) and \(g'(\alpha )\ne 0.\) Since A has a finite codimension we can for each large degree find a polynomial of that degree that belongs to A. We choose such a monic polynomial h(x) that has degree larger than \(\deg g(x)\) and relatively prime to \(\deg f(x).\) We can also suppose that \(h(\alpha )=0.\)
Our next step is to a construct polynomial \(p(x)=h(x)+cg(x)\) that has the same property as g(x), namely \(p(\alpha )=0,p'(\alpha )\ne 0\) and \(p(\beta _i)\ne 0\) for each \(i>0.\) Again, this is possible because our field is infinite. Let q(x) be f(x) divided by its leading coefficient. Consider subalgebra \(B=\langle p(x),q(x)\rangle .\) By construction \(\alpha\) does not belong to its spectrum, so according to our arguments before the theorem the restriction of D to B should be a trivial derivation therefore \(D(f(x))=cf'(\alpha )=0\) which is a contradiction.
The rest is easy. Any polynomial in A can be written as a linear combination of \(g_0(x)\), some constant and some polynomial f(x) having \(\alpha\) as double root. Therefore only the value of \(g_0(x)\) determine the value of D, so it is sufficient to find c such that \(D(g_0(x))=cg_0'(\alpha ).\) \(\square\)
Clusters
Let us now introduce a natural equivalence. For a given algebra A we define \(\alpha \sim \beta\) if and only if \(f(\alpha )=f(\beta )\) is valid for all \(f \in A.\) Then the spectrum of the subalgebra A is a disjoint union of equivalency classes that we call clusters. If A is obtained from B by a linear condition \(L(f)=0\) then Theorem 11 gives us a simple connection between clusters in B and A.
If L is an \(\alpha\)derivation then the clusters are the same if \(\alpha \in Sp(B)\) and \(\{\alpha \}\) constitutes an additional cluster in A if \(\alpha \not \in Sp(B)\).
If \(L(f)=f(\alpha )f(\beta )\) there are several possibilities. If neither \(\alpha\) nor \(\beta\) belongs to the spectrum of B then they together form a new cluster.
If exactly one of them (say \(\alpha\)) belongs to the spectrum of B then we simply add \(\beta\) to the cluster containing \(\alpha .\)
At last if both \(\alpha\) and \(\beta\) belong to the spectrum of B then they should lie in different clusters and as a result those two clusters will be joined in A.
From now on we will use the notion \(A(C) = \{f(x)  f(\alpha )=f(\beta ) \text{ for } \text{ all } \alpha ,\beta \in C\}\) for the subalgebra defined by the fact that all its elements have the same value on the cluster C.
The main theorem
Now we want to prove Theorem 7. We begin with the following statement.
Theorem 19
Let A be a proper subalgebra of \({\mathbb {K}}[x]\) with \(Sp(A)=\{\alpha _1,\ldots ,\alpha _s\}\) and let \(\pi _A=(x\alpha _1)\cdots (x\alpha _s).\) Then there exists \(N>1\) such that \(x^i\pi _A^N\in A\) for any \(i\ge 0.\)
Proof
We use induction on the codimension n. The base for the induction is guaranteed by Theorem 3 so let \(n\ge 2.\) Let A be obtained from B as the kernel of L. Let \(C=Sp(B),\) \(\pi _B=\prod _{\gamma \in C}(x\gamma )\) and \(N_B\) be the number N for the subalgebra B existing by the induction hypothesis. We consider several different cases.
Suppose first that \(L(p)=p(\alpha )p(\beta ).\) We put \(N=N_B.\)
If both \(\alpha ,\beta \in C\) then \(\pi _A=\pi _B\). Because \(N>0\) we get that all \(x^i\pi _A^N\in \ker L=A\) directly.
If neither \(\alpha\) nor \(\beta\) belongs to the spectrum of B then \(\pi _A=\pi _B(x\alpha )(x\beta ).\) Note that \(x^i\pi _A^N\in B\) and \(x^i\pi _A^N\in \ker L=A.\)
If only \(\alpha \in C\) then \(\pi _A=\pi _B(x\beta )\) and again \(x^i\pi _A^N \in \ker L=A\) directly.
If L is an \(\alpha\)derivation and \(\alpha \not \in C\) then, according to Theorem 18, \(L(f)=cf'(\alpha ).\) We have that \(\pi _A=\pi _B(x\alpha )\) and put \(N=N_B.\) Because \(N\ge 2\) we get that the multiplicity of \(\alpha\) is at least two and \(x^i\pi _A^N\in \ker L=A.\)
At last if L is an \(\alpha\)derivation and \(\alpha \in C\) then \(\pi _A=\pi _B\) and we put \(N=2N_B.\) Then \(x^i\pi _A^{N_B},\pi _A^{N_B}\in B\) and
In all cases we get that \(x^i\pi _A^N\in \ker L=A.\) \(\square\)
Theorem 20
Let A be a subalgebra of codimension \(n> 1\) with \(Sp(A)=\{\alpha _1,\ldots ,\alpha _s\}.\) Then there exists \(N>1\) such that A can be described by n conditions of the form
Thus \(p(x)\in A\) if and only if all n conditions are valid.
Proof
We use the same notation as in Theorem 19. According to that theorem we have polynomials in A of each degree greater than \(Ns1.\) If we complete them to a linear basis in A we get a set Q, consisting of exactly \(Nsn\) new polynomials q and we can suppose that \(1\in Q.\) Consider the vector space V consisting of linear maps
We have that \(\dim V=Ns\). Consider its subspace W of those maps that annihilate all \(q\in Q.\) The subspace W has dimension n (because the condition \(D(q)=0\) is a homogeneous linear equation on the set of the coefficients \(c_{ij}).\) We choose a basis in W consisting of n maps D and claim that the conditions \(D(p)=0\) for each D from this basis describes A. Indeed those conditions by construction describe exactly the subspace generated by \(q\in Q\) in the subspace of all the polynomials of degree less than Ns. It remains to show that each \(x^i\pi _A^N\) is annihilated by D.
Let \(D_0\) be the map
Because \(\pi _A(\alpha _j)=0\) for each j we have that \(D_0(x^i\pi _A^N)=0\) and it is sufficient to consider \(D_1=DD_0\) consisting of only the derivatives. \(D_1\) annihilates all the elements of the form \(x^i\pi _A^N\) because it has derivatives of degree at most \(N1\) and the same is true for D.
Thus our conditions are valid on all basis elements in A and describe the vector space they generate, which is A. In other words the conditions that \(E_i(p(x))=0\) for our basis elements \(E_i\in W\) determine the subalgebra A. Note that this automatically implies that we get subalgebra conditions. \(\square\)
In fact we can prove a stronger result. The subalgebra conditions are either of form \(f(\alpha )=f(\beta )\) or derivations. For nontrivial derivations we can prove (see [9]):
Theorem 21
If \(\alpha\) belongs to the spectrum then each \(\alpha\)derivation D can be written as
thus using pure derivatives (of some order) in the elements of the cluster containing \(\alpha\).
One element in the spectrum
Now we want to show some applications of the spectrum. We start from the subalgebras which have only one element in the spectrum.
Theorem 22
Let A be a subalgebra of codimension \(k\ge 1.\) The following statements are equivalent.

1.
The spectrum of A consists of a single element \(\alpha .\)

2.
A contains two elements \((x\alpha )^m, (x\alpha )^n\) with \((m,n)=1.\)

3.
A is defined by k linearly independent conditions of the form \(\sum _{i=1}^{N}c_if^{(i)}(\alpha )=0\) for some \(N>0.\)
Proof
We can use induction on k. The base for the induction is guaranteed by Theorem 3. Let \(k\ge 2.\) Using the change of variable \({\widehat{x}}=x\alpha\) we can restrict ourself to the case \(\alpha =0.\)
\((1)\Rightarrow (2).\) According to Theorem 4 the algebra A is obtained from B as a kernel of some linear map. This map should be 0derivation D, otherwise we have more than one element in the spectrum. By Theorem 5, B should have zero spectrum and according to the induction hypothesis B contains some monomials \(x^m,x^n\) with \((m,n)=1.\) Note that \(m,n>1\) because B is a proper subalgebra. Using that \(D(f^k)=kf^{k1}(0)D(f)\) we find that the monomials \((x^m)^m=x^{m^2},\ (x^n)^n=x^{n^2}\) belong to \(\ker D=A.\)
\((2)\Rightarrow (1).\) Because the subalgebra generated by \(x^m\) and \(x^n\) has spectrum zero, by Theorem 5 the spectrum of A cannot have any other elements than zero.
\((1)\Rightarrow (3)\) Follows from Theorem 20.
\((3)\Rightarrow (2)\) All the monomials \(x^m\) with \(m>N\) satisfy the conditions. \(\square\)
Subalgebras containing a polynomial of degree 2
Suppose that the subalgebra A contains a polynomial q(x) of degree two. Two trivial cases are \(A=\langle q(x)\rangle\) and \(A={\mathbb {K}}[x].\) In nontrivial cases we should have a polynomial p(x) of odd degree \(2l+1\ge 3.\) If we suppose that l is as small as possible then it is easy to see that \(A=\langle p(x),q(x)\rangle .\) Using variable substitution we can suppose that \(q(x)=x^2.\) Subtracting even terms we can WLOG suppose that p(x) is an odd polynomial, thus
for some monic polynomial a(x) of degree l. We want to show that the spectrum of A consists of the roots of \(a(x^2).\) (In fact the characteristic polynomial is equal to \(a(x^2)\), but that requires a longer proof.)
Indeed, if \(q'(\alpha )=0\) then \(\alpha =0\) and \(p'(0)=0\) implies \(a(0)=0.\) If \(q(\alpha )=q(\beta )\) for \(\alpha \ne \beta\) then \(\beta =\alpha\) and \(p(\alpha )=p(\alpha )=p(\alpha )\) implies \(p(\alpha )=0\Rightarrow a(\alpha ^2)=0.\)
Now we are ready for the general statement.
Theorem 23
Any proper subalgebra A of finite codimension in \({\mathbb {K}}[x]\) containing a polynomial q(x) of degree two has a spectrum consisting of g elements for some \(g>0\). The spectrum has \(k=\left[ \frac{g}{2}\right]\) pairs \(\{\alpha _i,\beta _i\},\) \(i=1,\ldots , k\) such that for each i the sum \(\alpha _i+\beta _i\) has a constant value \(2\alpha _0\) and (for odd g) one extra element, namely \(\alpha _0(=\beta _0).\) For each \(0\le i\le k\) there exists number \(m_i\ge 0\) such that \(f(x)\in A\) if and only if

\(f^{(j)}(\alpha _i)=(1)^jf^{(j)}(\beta _i)\) for each \(0<i\le k\) and each \(0\le j\le m_i,\)

\(f^{(j)}(\alpha _0)=0,\ j=1,3,\ldots , 2m_01\) (for odd g only).
Vice versa, if an algebra satisfies such conditions, then it is generated by
Proof
Since the codimension is finite and the subalgebra is proper we can after substitution suppose that A is generated by \(p(x)=a(x^2)x,\ q(x)=x^2,\) where a(x) is a monic polynomial of degree \(l>0.\) Here we put \(\alpha _0=0\) and for each nonzero root \(\mu _i\) of a(x) with \(i=1,\ldots ,k\) we can put \(\alpha _i=\sqrt{\mu _i}\) and \(\beta _i=\alpha _i.\) We define \(m_0\) to be the multiplicity of zero as a zero of a(x) and put \(g=2k\) if \(m_0=0\) and \(g=2k+1\) if \(m_0>0.\) Now \(a(x)=x^{m_0}\prod (x\mu _i)^{m_i+1}\) and
As we already discussed above the spectrum has exactly g elements. To check the conditions note that they are trivial for \(x^2\) and that
if \(j\le m_i\) for \(i>0.\) If \(m_0>0\) then all the derivatives until \(2m_0+1\) are zero as well. Therefore p(x) and q(x) satisfy the conditions and it is sufficient to check that if f(x) and g(x) satisfy the conditions the same is true for f(x)g(x). We have
and get the desired property both for \(i>0\) and \(i=0\) (because if j is odd one of \(j_1,j_2\) is odd as well). So A satisfies the conditions. Let us now turn to the opposite direction. Our proof shows that the conditions determine some subalgebra that contains A and we need to prove that it equals A. If not there should be some polynomial f(x) which does not belong to A. Using subduction by p(x) and q(x) we can suppose that it has an odd degree less than the degree of p(x) and has only odd powers, and thus \(f(x)=f(x).\)
Note that for an odd function f(x) we have
We get the opposite sign compared to our conditions so all terms must be zero. Thus \(\alpha _i\) and \(\beta _i\) have multiplicity at least \(m_i+1\) as zeroes of f(x). Similarly the second condition gives us that the multiplicity of zero as a zero is at least \(2m_0+1.\) But then f(x) cannot have degree less than the degree of p(x).
It remains to understand how we get back to the general case by using variable substitution back. Obviously \(\alpha _0\) is the only root of the derivative in q(x) and the spectrum is simply shifted by \(\alpha _0.\) \(\square\)
\(\alpha\)Derivations
Now we want to collect some general properties of the set \({\mathscr {D}}^A_\alpha\) of \(\alpha\)derivations. Let A be a subalgebra of finite codimension and \(M_\alpha =\{f(x)\in Af(\alpha )=0\}\) be the corresponding maximal ideal in A.
Theorem 24
Let \(D:A\rightarrow {\mathbb {K}}\) be a linear map.

1.
The following statements are equivalent:

\(D\in {\mathscr {D}}^A_\alpha ,\) thus D is an \(\alpha\)derivation.

\(D(1)=0\) and \(D(f^2)=0\) for any \(f\in M_\alpha .\)


2.
\(\dim {\mathscr {D}}_\alpha ^A=\dim M_\alpha /M_\alpha ^2\) (We denote this number \(d_\alpha ^A\).)

3.
If \(T(A)=(d_1,\ldots , d_s)\) then \(d_\alpha ^A\le s\).
Proof
(1) Obviously any \(\alpha\)derivation has these properties so we need only to work in the opposite direction.
For any \(f\in A\) we have that
Now for any \(f,g\in A\) we have:
(2) If we pick any SAGBI basis in \(M_\alpha\) and choose those \(g_i\) from it that form a basis modulo \(M_\alpha ^2\) then D will be uniquely determined by the values of \(D(g_i).\) On the other hand we get an \(\alpha\)derivation for any choice of such values if we extend to a linear mapping that vanishes on constants and \(M_\alpha ^2\), by part (1). The values of D on the remaining elements in the SAGBI basis will be uniquely determined. This also proves (3) as we can start from a SAGBI basis with s elements and then possibly remove some of them to obtain our basis for the space of derivations. \(\square\)
The type \(T(A)=(d_1,\ldots ,d_s)\) gives us an upper bound \(d_\alpha \le s\) and we have equality in the monomial case. Indeed it is easy to check that the maps \(D_i:f\rightarrow f^{(d_i)}(0)\) form a linear basis for the set \({\mathscr {D}}^A_0\) of zeroderivations.
Now we consider the following chain of subalgebras that differ by one in codimension:
We see that \(d_\alpha\) can both decrease by one and increase by two.
Some applications
Now we want to show some applications of the spectrum. First of all the spectrum gives us a much clearer picture of the inclusion of one subalgebra in another.
For example, which subalgebras B of codimension 2 can contain the subalgebra \(A=\langle x^4,x^3 \rangle\) of codimension 3? The subalgebra \(A \subseteq B\) has an element of degree 3, which does not belong to the semigroup generated by 2 and 5 so the type of B cannot be (2, 5), thus \(T(B)=(3,4,5)\).
Also \(Sp(A)=\{0\}\) implies that \(Sp(B)=\{0\}\) and our only candidate for B in the classification obtained in Theorem 27 below is \(s=1\) with \(\alpha =0.\) Using that \(x^3 \in B\) we can specify the conditions from the Theorem further to \(f'(0)=f''(0)=0\) and hence B must be the monomial algebra \(\langle x^3,x^4,x^5 \rangle\).
Another obvious application is finding the intersection of two subalgebras: we take the union of their spectra and the union of their conditions and we only need to check if there are any linear dependencies between the conditions.
For example we can easily spot the situations when the intersection of two subalgebras is a monomial subalgebra. Both should have zero spectrum and the conditions of the subalgebras should complete each other so that we obtain conditions of the form \(f^{(j)}(0)=0.\)
We can go in the opposite direction as well: if we have two subalgebras \(A_1,A_2\) we can easily construct the subalgebra they generate together. We take the intersection of the spectra and try to see which conditions remain. Let us take an example from [2]. Is \(\langle x^3x,x^4,x^51 \rangle ={\mathbb {K}}[x]?.\)
The subalgebra \(\langle x^4,x^5 \rangle\) is monomial, so its spectrum is zero. But zero is not in the spectrum of the subalgebra \(\langle x^4,x^3x \rangle ,\) so the intersection of their spectra is empty and we get \({\mathbb {K}}[x].\) The most important application is the possibility to construct SAGBI bases without having to invoke the standard algorithm based on subduction. We will expand on this aspect in the next section.
Constructing SAGBI bases
One useful thing we want to mention is that the inductive approach which we have used throughout the article also allows us to create SAGBI bases in A relatively easily. Namely, when we have a SAGBI basis G for B and get A by adding the condition \(L(f)=0\) we do the following to obtain a SAGBI basis of A. All elements of G that satisfy the extra condition \(L(f)=0\) will remain in the SAGBI basis. There must, however, be at least one element that does not satisfy the condition. Let us choose such a \(g\in G\) of minimal degree d, thus \(L(g)\ne 0.\) Note that exactly this degree d should disappear from the numerical semigroup S of degrees. Thus we know the new semigroup \(S_A=S \setminus \{d\}\) and can easily find the type \((s_1,\ldots , s_m)\) of the subalgebra A. For each degree \(s_i\) we find a polynomial \(h_i\in B\) and our new SAGBI basis consists of \(f_i=L(g)h_iL(h_i)g\). If we wish to make them monic we can just divide each \(f_i\) by its highest coefficient. In order to further simplify calculations we want the basis elements to be inside \(M_\alpha ,\) and there are several ways to do this. The simplest one is to replace \(f_i(x)\) by \(f_i(x)f_i(\alpha ),\) but a more efficient way is to choose \(h_i\) and g in \(M_\alpha\) from the start. Sometimes it may be clever to choose a linear combination with the previous \(f_j\) to get as high a degree of the factor \(x\alpha\) as possible.
We summarize this as follows.
Theorem 25
Let G be a SAGBI basis for B chosen inside \(M_\alpha ^B.\) Let \(g=g_i\) be an element of minimal degree in this basis that does not belong to A. Suppose WLOG that \(L(g)=1\) and \(L(g_j)=0\) for \(j\ne i\) (which we can obtain replacing \(g_j\) by \(g_jL(g_j)g\)).

The set consisting of polynomials \(g_j,\ h_j=gg_jL(gg_j)g\) with \(g_j \in G\), \(j\ne i\) and two polynomials \(f_k=g^kL(g^k)g\) for \(k=2,3\) forms a SAGBI basis for A inside \(M_\alpha ^A.\) (Not necessary a minimal one.)

If A has type \((s_1,\ldots ,s_m)\) then to construct a minimal SAGBI basis one should for each \(s=s_j\) find a polynomial \(p_s \in B\) of degree s and take \(p_sL(p_s)g.\) If all \(p_s\) are chosen inside \(M_\alpha ^B\) then the obtained SAGBI basis will be inside \(M_\alpha ^A.\)
Proof
If \(f(x)\in B\) then \(L(fL(f)g)=0,\) thus \(fL(f)g\) belongs to \(A=\ker L.\) This immediately proves the second statement because we get elements of degree \(s_i\) in A. To prove the first statement we need to find polynomials built up from our basis elements of each degree \(d\ne \deg g\) occurring in B. We can express d as the degree of some \(g^lu\) where u is a product of \(g_j,\) where \(j\ne i,\) but repetitions are allowed. Because each such \(g_j\) belongs to \(M_\alpha ^A\) the same is true for u, so suppose that \(l>0.\) If \(l\ge 2\) we can use \(f_2^a f_3^bu\) where \(l=2a+3b\) to get the degree d. At last if \(l=1\) and \(u=g_jv\) for some \(g_j\) we can use \(h_jv\). \(\square\)
Now we want to prove another result, where we want show how to use SAGBI bases.
Theorem 26
Let B be a subalgebra of finite codimension such that \(\alpha\) does not belong to its spectrum. If D is a nonzero \(\alpha\)derivation of an algebra B and \(A=\ker D,\) then all \(\alpha\)derivations of subalgebra A can be written as
Proof
First we choose a SAGBI basis \(\{g_i\}\) for B inside \(M_\alpha ^B.\) Let \(g=g_i\) be an element of minimal degree in this basis that does not belong to A. Suppose WLOG that \(D(g)=1.\) Subtracting \(c_jg\) we can suppose that \(D(g_j)=0\) for all \(j\ne i.\) By Theorem 25 the set consisting of polynomials \(g_j,\ h_j=gg_jD(gg_j)g\) with \(g_j \in G\), \(j\ne i\) and two polynomials \(f_k=g^kD(g^k)g\) for \(k=2,3\) forms a SAGBI basis for A inside \(M_\alpha ^A.\)
By Theorem 18 we can suppose that \(D(f)=f'(\alpha )\) and \(d_\alpha ^B=1.\) Then \(f\rightarrow f^{(k)}(\alpha )\) for \(k=2,3\) are two derivations and it is sufficient to prove that they are linearly independent and that \(d_\alpha ^A\le 2.\)
The linear independence is obvious if we restrict those maps to \(g^2,g^3\) only, so let us concentrate on the inequality.
Because \(d_\alpha ^B=1\) we have that
In particular for \(j\ne i\) we have
This can be seen as follows:
Using the fact that \(D(g^2)=D(g^3)=D(gg_j)=0\) we get that \(M_\alpha ^A\) is generated by \(g^2,g^3,g_j, gg_j\) with \(j\ne i.\) Note that all those elements belong to \(\left( M_\alpha ^B\right) ^2.\) Since both \(\left( M_\alpha ^B\right) ^2\) and \(M_\alpha ^A\) have codimension one in \(M_\alpha ^B\) we conclude that
Next we want to study when products \(p=\varPi g_j\) of at least two elements belong to \(\left( M_\alpha ^A\right) ^2.\) This depends on the number of factors \(g_j\) that equal \(g=g_i.\) If there is no factor g then \(p\in \left( M_\alpha ^A\right) ^2.\) This also holds if at least four factors equal g, because \(g^n\) with \(n\ge 4\) can be written as a product of \(g^2\) and \(g^3.\)
If \(p=g^3u\) or \(p=g^2u\) where u does not contain g, the only exception is \(p=g^3\) and \(p=g^2,\) because otherwise \(u\in M_\alpha ^A.\)
At last if \(p=gu\) then \(u=g_jv\) and the only exception is \(p=gg_j.\) In all other cases \(p=(gg_j)v\in \left( M_\alpha ^A\right) ^2.\)
Because the products \(\varPi g_j\) span \(\left( M_\alpha ^B\right) ^2\) we conclude that
We know that \(g_k\in \left( M_\alpha ^B\right) ^2\) for \(k\ne i\). As a result
Using the facts that \(g^4=(g^2)^2, (g^2)g_j\in \left( M_\alpha ^A\right) ^2\) and \(g M_\alpha ^A\subseteq M_\alpha ^A\) we find that
Applying this for \(k=j\) in (1) we can improve this to
From this it is clear that
Thus the two \(\alpha\)derivations of A we have found earlier form a basis for \({\mathscr {D}}^A_\alpha\). \(\square\)
SAGBI bases in codimension one
Let us see how to find SAGBI bases in subalgebras of codimension one. We start from \({\mathbb {K}}[x]\) (which has x as SAGBI basis and from which we can get A either by the condition \(f'(\alpha )=0\) or by the condition \(f(\alpha )=f(\beta )).\) We now get Theorem 3 without any effort thanks to Theorem 4.
Now we want to prepare for the next codimension and for this we need to find SAGBI bases and derivations for the different subalgebras of codimension one. We obviously have that \({\mathscr {D}}_\alpha\) contains \(f''(\alpha ), f'''(\alpha )\) in the first case and \(f'(\alpha ),f'(\beta )\) in the second case.
Because \(d_\alpha\) and \(d_\beta\) are not greater than the number of generators, which equals two, we have found all nontrivial derivations.
Type (2, 3) is the only possible semigroup of degrees, so an easy way to construct a SAGBI basis is to use the second part of Theorem 25. We get
as the SAGBI basis for the first alternative, that is when L is a derivation. For the second alternative we can choose
Subalgebras of codimension two
We now turn to subalgebras of codimension two. By Theorem 4 they can be obtained by applying one extra condition to a subalgebra B of codimension one. This means we need to study how those conditions look. In the case when the extra condition is \(f(\alpha )=f(\beta )\) we simply add one or two elements to the spectrum and obtain the algebra A. This is an easy case. A more difficult case is when we need to describe a kernel of some derivation. But we already know the derivations in each of the two cases considered above. Thus we are prepared to make a classification of all codimension two subalgebras:
Theorem 27
Let A be a subalgebra of codimension two. Then it is either type (2, 5) or type (3, 4, 5). The spectrum contains \(s\le 4\) elements and depending on s we have the following possibilities:
 s=1:

\(A=\{f(x)f'(\alpha )=0; af''(\alpha )+bf'''(\alpha )=0\}.\)
If \(a=0,b\ne 0\) then \(T(A)=(2,5)\) and if \(a\ne 0\) then \(T(A)=(3,4,5).\)
 s=2:

\(A=\{f(x)f(\alpha )=f(\beta );af'(\alpha )+bf'(\beta )=0\}.\)
If \(a=b\ne 0\) then \(T(A)=(2,5)\) and if \(a\ne b\) then \(T(A)=(3,4,5).\)
 s=2:

\(A=\{f(x)f'(\alpha )=f'(\beta )=0\}.\)
In this case T(A) is always (3, 4, 5).
 s=3:

\(A=\{f(x)f(\alpha )=f(\beta );f'(\gamma )=0\}.\)
If \(\alpha +\beta =2\gamma\) then \(T(A)=(2,5),\) and if \(\alpha +\beta \ne 2\gamma\) then \(T(A)=(3,4,5).\)
 s=3:

\(A=\{f(x)f(\alpha )=f(\beta )=f(\gamma )\}.\)
In this case T(A) is always (3, 4, 5).
 s=4:

\(A=\{f(x)f(\alpha )=f(\beta );f(\gamma )=f(\delta )\}.\)
If \(\alpha +\beta =\gamma +\delta\) then \(T(A)=(2,5)\) and if \(\alpha +\beta \ne \gamma +\delta\) then \(T(A)=(3,4,5)\).
Here \(\alpha ,\beta ,\gamma ,\delta\) are different elements of the spectrum.
Proof
We know that the spectrum has at most four elements. We start with the case where there are no derivations in the subalgebra conditions. Either we have two clusters and get the only case with \(s=4\) or we have only one cluster of size 3 and get the second case with \(s=3.\)
If some \(\gamma\)derivation is used then we can suppose that it was added to a subalgebra of codimension one. If \(\gamma\) was not in the spectrum of this codimension one subalgebra, then \(\gamma\) is a trivial derivation \(f\rightarrow f'(\gamma )\) and we get either the second case with \(s=2\) (with \(\gamma =\beta\)) or the first case with \(s=3.\)
At last if \(\gamma\) belongs to the spectrum we can WLOG suppose that \(\gamma =\alpha\) and use that we know all \(\alpha\)derivations. We get cases with \(s=1,2.\)
It is easy to check that (2, 5) and (3, 4, 5) are the only choices for the numerical semigroup of degrees. To see which choice is valid we only need to check if the element of degree 2 in the SAGBI basis satisfies the added condition. If so we get type (2, 5), otherwise type (3, 4, 5). Alternatively we can use Theorem 23 which tells us exactly when \(T(A)=(2,5)\). \(\square\)
Subalgebras of codimension three
In codimension three we can use the same approach and get a classification, but the situation is more complicated. The spectrum has at most 6 elements. We will show only how it looks for a single element in the spectrum (the complete classification can be found in [10]).
Theorem 28
If an algebra A of codimension three has a spectrum consisting of a single element \(\alpha\) then A is one of the following algebras

1.
\(A=\{f(x)f'(\alpha )=f''(\alpha )=af'''(\alpha )+bf^{(4)}(\alpha )+cf^{(5)}(\alpha )=0\}.\)
If \(a\ne 0\) then \(T(A)=(4,5,6,7)\) and for \(a=1\) a SAGBI basis is:
$$\begin{aligned} (x\alpha )^44b(x\alpha )^{3},(x\alpha )^{5}20c(x\alpha )^{3},(x\alpha )^6,(x\alpha )^7. \end{aligned}$$If \(a=0\) and \(b\ne 0\) then \(T(A)=(3,5,7)\) and for \(b=1\) a SAGBI basis is:
$$\begin{aligned} (x\alpha )^3,(x\alpha )^55c(x\alpha )^4,(x\alpha )^7. \end{aligned}$$For \(a=b=0,c\ne 0\) the type is (3, 4) and a SAGBI basis is
$$\begin{aligned} (x\alpha )^3,(x\alpha )^4. \end{aligned}$$If \(a=b=c=d=0\) the codimension is 2.

2.
\(A=\{f(x)f'(\alpha )=f'''(\alpha )3af''(\alpha )=f^{(5)}(\alpha )10af^{(4)}(\alpha )+bf''(\alpha )=0\}.\)
with \(a\ne 0.\) If \(b\ne 0\) then \(T(A)=(4,5,6,7)\) and a SAGBI basis is:
$$\begin{aligned}&b(x\alpha )^4+120a^2(x\alpha )^3+120a(x\alpha )^2,\\&b(x\alpha )^560a(x\alpha )^360(x\alpha )^2,(x\alpha )^6,(x\alpha )^7. \end{aligned}$$If \(b=0\) then \(T(A)=(3,5,7)\) and a SAGBI basis is:
$$\begin{aligned} (x\alpha )^3+a(x\alpha )^2,2a(x\alpha )^5+(x\alpha )^4,(x\alpha )^7. \end{aligned}$$ 
3.
\(A=\{f(x)f'(\alpha )=f'''(\alpha )=cf^{(5)}(\alpha )+df''(\alpha )=0\}.\) If \(d\ne 0\) then \(T(A)=(4,5,6,7)\) and a SAGBI basis is:
$$\begin{aligned} (x\alpha )^4,d(x\alpha )^{5}60c(x\alpha )^2,(x\alpha )^6,(x\alpha )^7. \end{aligned}$$If \(c\ne 0,d=0\) then \(T(A)=(2,7)\) and a SAGBI basis is:
$$\begin{aligned} (x\alpha )^2,(x\alpha )^7. \end{aligned}$$If \(c= 0,d= 0\) we get codimension 2.
Proof
The subalgebra A is contained in a subalgebra B of codimension 2. Because the spectrum of B is a subset of the spectrum of A, the subalgebra B should have a single (and the same) element \(\alpha\) in the spectrum. Moreover, A is obtained from B as a kernel of some \(\alpha\)derivation (all other possibilities would lead to a larger spectrum). So the result will follow from the description of all derivations of the subalgebra \(B=\{f(x)f'(\alpha )=0;\ a_1f''(\alpha )+b_1f'''(\alpha )=0\}\) by adding an extra derivation. Using variable substitution \(x\alpha \rightarrow x\) we can WLOG suppose that \(\alpha =0\). If \(a_1=0\) (which corresponds to \(T(B)=(2,5)\)) we put \(b_1=1\) and get a monomial subalgebra B, where we know all derivations and obtain case 3.
If \(b_1=0\) we get a monomial subalgebra as well, and get the case 1. Otherwise we can put \(b_1=1,\) and (in order to get a nice SAGBI basis) \(a_1=3a\) where we suppose that \(a\ne 0.\) Thus
Because \(T(B)=(3,4,5)\) we can choose \(p=x^4,q=ax^3+x^2, r=x^5\) as generators of B. Note that \(a^2p^2aqr+pq=x^6\in M_0^2.\) Thus
and we get \(2aDr+Dp=0.\) Therefore \(d_0^B\le 2\) which means that we only need to find two derivations of the desired form.
One is obviously the second derivative, \(D_1: f(x)\rightarrow f''(0),\) but we cannot use the third derivative because in our algebra it is proportional to \(D_1.\) So we need to try higher derivatives \(D_2:f(x)\rightarrow cf^{(4)}(0)+df^{(5)}(0).\) Our condition \(2aD_2r+D_2p=0\) is equivalent to \(2a\cdot d\cdot 5! +c\cdot 4!=0\) so we can try \(c=10a,d=1\) and only have to check that this is a derivation in B. We have (skipping terms that obviously equal zero)
and we are done.
The arbitrary derivation is a linear combination of \(f(x)\rightarrow f''(\alpha )\) and \(f(x)\rightarrow f^{(5)}(\alpha )10af^{(4)}(\alpha )\) and we get the case 2 if we simply substitute 0 by \(\alpha\) back.
When we get a description there is a straightforward way described above to get a SAGBI basis: we know the possible degrees and need only to search for elements of the degrees generating the semigroup that satisfy the subalgebra conditions. \(\square\)
About the characteristic polynomial \(\chi _A(x)\) when A has more than two generators
We would like to generalise Theorem 16 to arbitrary subalgebras. For this we need to define the characteristic polynomial for an arbitrary subalgebra.
Let us look at the case where A has more than two generators. It is not evident how to extend the definition. The resultant is defined only for pairs of polynomials.
A naive attempt is to use the gcd of all \(\chi _{g_i,g_j}\) where \(g_i\) generate A. Let us first look at an example.
Example 7
Let \(p(x)=x^{12}+3x^6\), \(q(x)=x^{15}\) and \(r(x)=x^{10}\) and \(A=\langle p(x),q(x),r(x) \rangle\) the subalgebra they generate. We can form the characteristic polynomial of any pair of generators. If we look at the pair p and q for example, it is obvious that they both belong to \({\mathbb {K}}[x^3]\). Hence their characteristic polynomial is zero by Theorem 15. In the same way the other two pairs of generators have zero as characteristic polynomial. In contrast, if we form P and Q as before and additionally \(R(x,y)=(r(x)r(y))/(xy)\), then \(P(x,y)=Q(x,y)=R(x,y)=0\) has only a finite set of solutions. In particular the possible xvalues are the 24 solutions of \(x^{24}+6x^{18}+26x^{12}+81x^6+81\) and \(x=0\). (This can be obtained by solving the system in for example Maple.)
The above example shows that looking at pairs of generators of the algebra is not enough to define the characteristic polynomial in a suitable way. Inspired by Theorem 8 we instead make the following definition.
Definition 4
Let A be a subalgebra of finite codimension. We define its characteristic polynomial\(\chi _A(x)\) as the gcd of all \(\chi _{p,q}(x)\) where p and q are monic polynomials in A with relatively prime degrees.
Theorem 8 assures that the set of zeroes of \(\chi _A(x)\) equals the spectrum.
This definition has the drawback that it does not give an immediate way to compute \(\chi _A(x)\), as there are infinitely many pairs \(\{p,q\}\).
We will therefore introduce another polynomial, D(x), that while still having the spectrum as its set of zeroes, also immediately allows computation for each finitely generated A.
Let us first assume that we have three generators \(A = \langle p(x),q(x) ,r(x) \rangle\). We also assume that \(\deg q(x) \ge \deg r(x)\). Introduce P(x, y), Q(x, y) as before and analogously R(x, y). Then form the resultant \(R(x,y,z)={\text {Res}}_y\left( P(x,y),zQ(x,y)+wR(x,y) \right)\). An xvalue \(x=\alpha\) that makes this resultant disappear for all values of z and w means an xvalue for which there is some \(y=\beta\) such that \(P(\alpha ,\beta )=0\) and \(zQ(\alpha ,\beta )+wR(\alpha ,\beta )=0\) regardless of the values of z and w. In other words \(P(\alpha ,\beta )=Q(\alpha ,\beta )=R(\alpha ,\beta )=0\).
Now it follows, from the construction of the resultant as a certain determinant and the fact that the determinant depends linearly on the columns of the matrix, that R can be written as \(R(x,z,w)=\sum _{j=0}^{n1} d_j(x)z^{n1j}w^{j}\). Here \(d_j(x)\) is a polynomial in \({\mathbb {K}}[x]\) that can be computed by starting from the resultantmatrix of P and Q, then replace j columns of coefficients from Q by the corresponding coefficients of R. Finally sum over all choices of j such column replacements. That sum of determinants equals \(d_j(x)\). The xvalues \(x=\alpha\) that make \(R(\alpha ,z,w)=0\) are those which satisfy \(d_j(\alpha )=0\) for each j or equivalently those \(x=\alpha\) that are zeroes of \(d(x)=gcd(d_1(x),d_2(x), \ldots ,d_{n1}(x))\). It is straightforward to generalise this idea to more than three generators. We therefore make the following definition:
Definition 5
Let \(A=\langle p_1(x), p_2(x), \ldots ,p_t(x) \rangle\) and \(n=\deg p_1(x)\). Moreover, form \(P_i(x,y)=(p_i(x)p_i(y))/(xy)\) and finally
Then R can be expressed as
where the sum is taken over all natural numbers \(a_i\) satisfying \(a_2+a_3+ \cdots a_t=n1\). Now let \(D(x)=gcd(\{d_{(a_2,a_3, \ldots , a_t)}\})\) where the gcd is taken over the set of all polynomials \(d_{(a_2,a_3, \ldots , a_t)}\) occurring in the sum (2).
This definition looks complicated, so let us see how it works in our previous example.
Example 8
Let p, q, r and P, Q, R be as in the previous example. In this case we need to compute the resultant
(Here we have replaced \(z_2\) by z and \(z_3\) by w to improve readability.) By doing our computation in Maple we obtain:
where
and
Thus the gcd of the first five polynomials \(d_{(11j,j)}\) is \(x^{50}b(x)\). One can check that the remaining \(d_{(11j,j)}\) also are divisible by \(x^{50}b(x)\). (In particular \(d_{(0,11)}=0\), while the other polynomials are nonzero.)
Thus \(D(x)=x^{50}b(x)\), and the Sp(A) consists of zero together with the 24 zeroes of b(x).
Note that D(x) depends on the generators and even on which generator is chosen as \(p_1\). For example if we take \(p_1=r\) in the above example we get \(D(x)=x^{54}b(x)\). As long as we are looking for the zeroes this is not a problem, but we cannot use D as our characteristic polynomial as it is not well defined for a given subalgebra A.
But we can define characteristic polynomial as a gcd of all such D(x) to have an invariant definition. In our example it still be \(x^{50}b(x)\).
We conclude by using D to find descriptions of some subalgebras on several generators.
Example 9
Let
Using the above method we get \(D(x)=x^2 (x1)(x2)(x4)^2(x5)^2\). Hence \(Sp(A)=\{0,1,2,4,5\}\). Since A has generators of degrees 3, 5, 7 its codimension in \({\mathbb {K}}[x]\) is at most three. By Theorem 7 we should look for conditions where f or its derivatives are evaluated in spectral points. It is evident that \(f(0)=f(4)=f(5)\) for all generators. Also \(f(1)=f(2)\) for the first two generators, and one can check that this holds also for the third generator. This shows that \(A = \{f(x)  f(0)=f(4)=f(5), f(1)=f(2) \}\). Note that since we found three conditions the codimension equals three, and this implies that our generators constitute a SAGBI basis.
Example 10
Let
In this case we get \(D(x)= x^2(x2)(x+2)(x1)^2(x+1)^2\). Thus we get that \(Sp(A)=\{0,1,1,2,2\}\). Since A has generators of degrees 4, 5, 6, 7 we must again have codimension at most three. If we factor the generators it is easy to see that \(A = \{f(x)  f(0)=f(1)=f(1), f(2)=f(2) \}\).
Finally we want to consider quite different approach to generalise the notion of characteristic polynomial for to an arbitrary subalgebra A. It is based on the observation that the characteristic polynomial belongs to the subalgebra itself. According to Theorem 19 there exists a monic polynomial p(x) such that \(x^kp(x)\in A\) for any \(k\ge 0.\) If we choose such polynomial of minimal degree it will be unique. (Otherwise the difference between two such polynomials would provide a polynomial of lower degree.) Let us take call such a minimal polynomial M(x).
Note that any \(\alpha \in Sp(A)\) is a root for M(x). This is immediate from the definition of spectrum applied to the elements M(x) and xM(x) of A. Obviously its degree is greater than the Frobenius number of the the corresponding numerical semigroup S of degrees. As we see in the last example it can be larger than the Frobenius number plus one, but we suspect it is not greater than twice the codimension. We have \(M(x)=x^{30}b(x)\) in Example 8, so here the degree is exactly twice the codimension, but it is smaller than the degree of the characteristic polynomial obtained using our previous definition. It seems reasonable to think of M(x) as a kind of minimal polynomial for A, but one could also take M(x) to be the characteristic polynomial of A.
Single element in the spectrum: derivations
To understand how derivations are formed, we will study a special concrete case, algebras A with a single element \(\alpha\) in the spectrum.
First of all, if \(p'(\alpha )=0\) for any \(p\in A\), then \(D_2:p\rightarrow \frac{p''(\alpha )}{2!}\) and \(D_3:p\rightarrow \frac{p'''(\alpha )}{3!}\) are two \(\alpha\)derivations over A. Now one may ask: what \(\alpha\)derivations exist over the kernel of some linear combination \(D_3  c D_2\)? Consider the following list of the maps created with the help of Maple:
Here \(D_k\) is the map \(D_k:p\rightarrow \frac{p^{(k)}(\alpha )}{k!}\) and c is a constant.
We know that the first map is an \(\alpha\)derivation. But what is more interesting is that if the first k maps defines a subalgebra inside A (as the intersection C of their kernels with A), then the next map will be a derivation over C.
For any given map in the list above, let \(C_i\) be the coefficient of \(c^k D_i\). I.e in the fourth map we have \(C_7 = 1, C_6 = 3, C_4 = 3\). Then for every single map, the following relations all hold among the \(C_i\) of that map:
We use parenthesised superscripts to index a particular map above. We index the maps by the highest order among the derivatives in it. Note that this means that the map with index n is in row \(\frac{n+1}{2}\) in the above list. For example
\(C^{(7)}_6 = 3\). The following theorem states that the properties which we have observed (but not proved) the \(C^{(n)}_k\) to exhibit, uniquely determine a set of integers.
Theorem 29
Let \(n=2k+1\) be an odd number. If we demand

\(C_n^{(n)}=1\) and \(C_i^{(n)}=0\) for all other odd i;

\(C_i^{(n)}=0\) for all even \(i>n;\)

\(C_{2m}^{(n)}+\left( {\begin{array}{c}m\\ 1\end{array}}\right) C_{2m+1}^{(n)}+\left( {\begin{array}{c}m\\ 2\end{array}}\right) C_{2m+2}^{(n)}+\left( {\begin{array}{c}m\\ 3\end{array}}\right) C_{2m+3}^{(n)}+\cdots +\left( {\begin{array}{c}m\\ m1\end{array}}\right) C_{3m1}^{(n)}+C_{3m}=0\) for all m
then the numbers \(C_i^{(n)}\) are uniquely determined.
Proof
We only need to consider \(C^{(n)}_i\) for even i less than n. For \(C_{2k}^{(n)}\) we have
If \(C_i^{(n)}\) is defined for all \(i>2m\) then we have
and all \(C^{(n)}_i\) are uniquely defined by induction. \(\square\)
Now for each odd n we can define
Conjecture 2
If \(L_1(f)=L_3(f)=\cdots =L_{n2}(f)=0\) for each \(f\in A\) then \(L_n\) is an \(\alpha\)derivation in A.
Further development
Here we want to discuss some possible ways to generalise the obtained results. We have several restrictions. Are they all necessary?
First of all we can consider subalgebras of infinite codimension. Then we need infinitely many conditions, so spectra can be infinite as well. But there are many interesting questions here.
Next we have the restrictions on the field. Characteristic zero seems to be important. In positive characteristic we encounter problems already in the case of monomial algebras as some derivatives vanish due to the characteristic regardless of what algebra we want to describe. But we can probably work with the divided powers.
The demand that the field is algebraically closed is probably less restrictive, at least if we allow the spectral elements to belong to the algebraic closure of the field. An interesting question related to this is to understand when the spectrum of a subalgebra over the field of complex numbers consists of real elements. It would also be interesting to investigate methods for constructing a SAGBI in this case. The main tool  the existence of a subalgebra B of codimension one less is absent. Though in the real case, we can find a subalgebra of codimension two less.
Perhaps, the most interesting generalization is to allow more than one variable. Here we need to use partial derivatives and for example the monomial subalgebras exhibit a similar description as in the univariate case. Thus there is a realistic hope for the theory to be extendable to several variables. One problem is that it is not clear that the spectrum cannot contain ghost elements if we increase the number of variables.
The main tool—containment in a subalgebra B still works but now we need (in the case of two variables) to speak about \((\alpha ,\beta )\)derivations. The SAGBI bases seem to be constructed in a similar way and therefore should still be finite. But there are many differences. First of all \(f(\alpha ,\beta )=0\) does not give us a factor in f(x, y) which is a fact that we have relied substantially on in the onedimensional case. Therefore we have no direct analogs for the proofs of theorems corresponding to Theorems 18, 19, 20. It would be interesting to know if they are still valid.
Another difference is that there exists proper subalgebras in \({\mathbb {K}}[x,y]\) with empty spectrum. An example inspired by [11] is the subalgebra \(A=\langle x,xy,xy^2y \rangle .\)
If we assume that
for all \(f \in A\) and apply this to the generators we find that \(\alpha =\gamma , \alpha \beta =\gamma \delta\) and \(\alpha \beta ^2\beta =\gamma \delta ^2\gamma .\) If \(\beta \ne \delta\) then \(\alpha =\gamma =0\). Now this in turn implies that \(\beta =\delta\). We conclude that \((\alpha ,\beta )=(\gamma ,\delta )\) so the pair \((\alpha ,\beta )\) was not in the spectrum of A.
Similarly
applied to x gives \(a=0.\) Thus \(b\ne 0\) and application to xy gives \(\alpha =0.\) But then
To check that it is a proper subalgebra suppose that
If we put \(y=\frac{1}{x}\) here then we obtain \(\frac{1}{x}=F(x,1,0)\)  a contradiction.
In fact no \(y^k\) belongs to A and we have, as expected, infinite codimension while \({\mathbb {K}}[x,y]\) is the only subalgebra of finite codimension that contains A.
But it is impossible to construct similar examples with finite codimension or in the onevariable case.
An interesting question is to find a homological interpretation of our results. Some kind of homological algebra should lie under the surface here.
The characteristic polynomial is especially interesting. What is the most natural way to define it? Can it be introduced for several variables? Can it be interpreted as the characteristic polynomial of some operator on \(V^2\) or \(V\times V^*\), where \(V={\mathbb {K}}[x]/A?\)
There are also fundamental open questions regarding the size of the spectrum. Is it an inner property of subalgebra? As \(\langle x^2 \rangle\) has an infinite spectrum, the size of the spectrum probably depends on the embedding of the subalgebra in \({\mathbb {K}}[x].\) But maybe this is not the case if we restrict ourselves by finite codimension only.
There are potential applications to important mathematical problems. We believe that the spectrum will prove to be a useful tool when comparing subalgebras.
We also hope to find some applications in cryptography because we have two essentially different ways to describe subalgebras.
References
Torstensson, A., Ufnarovski, V., Öfverbeck, H.: On SAGBI bases and resultants. Commutative algebra, singularities and computer algebra (Sinaia, 2002), NATO Sci. Ser. II Math. Phys. Chem., vol. 115, pp. 241–254. Kluwer Academic Publishers, Dordrecht (2003)
Kreuzer, M., Robbiano, L.: Computational Commutative Algebra, vol. 2. Springer, Berlin (2005). ISBN: 9783540255277; 3540255273
Robbiano, L., Sweedler, M.: Subalgebra Bases, Commutative Algebra (Salvador, 1988), pp. 61–87. Springer, Berlin (1990)
Gorin, E.A.: Subalgebras of finite codimension. Math. Notes Acad. Sci. USSR 6, 649–652 (1969). https://doi.org/10.1007/BF01119685
Cox, D.A., Little, J., O’Shea, D.: Using Algebraic Geometry. Graduate Texts in Mathematics. Springer, New York (2005). ISBN: 0387207066
Prasolov, V.V.: Polynomials. Springer, Berlin (2010)
Villard, G.: On computing the resultant of generic bivariate polynomials. In: ISSAC’18—Proceedings of the 2018 ACM International Symposium on Symbolic and Algebraic Computation, pp. 391–398. New York (2018)
Bourbaki, N.: Algebra II: Chapters 4–7. Elements of Mathematics. Springer (1990). English paperback edition
Lefler, E.: Derivations in univariate polynomial subalgbras of finite codimension. Bachelor’s thesis, Lund Institute of Technology (2021): K39, ISSN 16546229, LUFTMA40072021
Grönkvist, R., Leffler, E., Torstensson, A., Ufnarovski, V.: Describing subalgebras of \({\mathbb{K}}[x]\) using derivations (2021). arXiv:2017.11916 [math.RA]
Newman, D.J.: Point separating algebras of polynomials. Am. Math. Mon. 81, 496–498 (1974)
Acknowledgements
We are thankful to our mathematical department which gave us the opportunity to work on this project despite the difficult pandemic situation. The starting point of this project was the Bachelor Thesis defence of the first author, where the last author was the scientific advisor and the third was the opponent. It was the observation that the subalgebra \(\langle x^3x,x^2 \rangle\) can be defined by the condition \(f(1)=f(1)\) that gave the last author the idea to study subalgebra conditions. He conjectured that the main theorem would hold, introduced the main definitions and a plan for how the theorem could be proven. During one year we divided between us different parts of the work to carry out this plan and discussed how to develop the ideas. Trying to classify together the subalgebras of type (3, 4) we got the idea of the characteristic polynomial and the spectrum. The idea to use derivations came much later but became a main tool in the induction approach. SAGBI bases was always the important tool. Prof. Arne Meurman was always participating in our regular meetings and we are very thankful to him for his valuable remarks. Another student, Hugo Eberhard, was participating in part of the discussions as well. We would also like to thank him. Later another student, the second author, joined the project and actively participated in carrying out the classification. Last but not least, we would like to thank our anonymous referees for careful reading and valuable advice that helped improve this article. We were glad to share the joy of being a mathematician and do not consider the project as finished. But somewhere we need to set a point and publish the results obtained so far.
Funding
Open access funding provided by Lund University.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Grönkvist, R., Leffler, E., Torstensson, A. et al. Subalgebras in K[x] of small codimension. AAECC 33, 751–789 (2022). https://doi.org/10.1007/s00200022005734
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00200022005734
Keywords
 Subalgebra spectrum
 SAGBI basis
 Derivation
 Resultant
Mathematics Subject Classification
 13P05
 13P10
 13P15
 12H05