1 Introduction

In the study of positive semidefinite elements and sums of squares of a ring A one main problem is to determine whether every positive semidefinite element is a sum of squares (qualitative problem). The positive semidefinite elements of an arbitrary commutative ring are defined by means of the theory of the real spectrum \({\text {Sper}}(A)\) of the ring A, as follows: an element \(f\in A\) is positive semidefinite if \(f\ge _\alpha 0\) for every prime cone \(\alpha \in {\text {Sper}}(A)\). Recall that a prime cone \(\alpha \) can be understood as a pair \(\alpha :=({{\mathfrak {p}}}_\alpha ,\le _\alpha )\) where \({{\mathfrak {p}}}_\alpha \) is a prime ideal of A (called the support \({\text {supp}}(\alpha )\) of \(\alpha \)) and \(\le _\alpha \) is an ordering of the quotient field \({\text {qf}}(A/{{\mathfrak {p}}}_\alpha )\). Alternatively, \(\alpha \) is the preimage under the canonical homomorphism \(A\rightarrow {\text {qf}}(A/{{\mathfrak {p}}}_\alpha )\) of the set of non-negative elements of the ordered field \(({\text {qf}}(A/{{\mathfrak {p}}}_\alpha ),\le _\alpha )\). We denote the set of positive semidefinite elements of A with \({{\mathcal {P}}}(A)\) and the set of all (finite) sums of squares of A with \({\Sigma {A}^2}\). The problem stated above consists of determining under which conditions the equality \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) holds.

By [3, Thm.4.3.7] \({\text {Sper}}(A)=\varnothing \) if and only if \(-1\) is a finite sum of squares in A. If this is the case, we assume that all the elements of A are positive semidefinite. If in addition the characteristic of A is different from 2 and \(\frac{1}{2}\in A\), then each \(a\in A\) is a sum of squares in view of the well-known relation

$$\begin{aligned} a=\Big (\frac{a+1}{2}\Big )^2+(-1)\Big (\frac{a-1}{2}\Big )^2. \end{aligned}$$

An ideal \({{\mathfrak {a}}}\subset A\) is real if for each sequence \(a_1,\ldots ,a_r\in A\) such that \(a_1^2+\cdots +a_r^2\in {{\mathfrak {a}}}\), we have \(a_i\in {{\mathfrak {a}}}\) for \(i=1,\ldots ,r\). The real-radical of an ideal \({{\mathfrak {a}}}\subset A\) is the smallest real ideal \(\root r \of {{{\mathfrak {a}}}}\) of A that contains \({{\mathfrak {a}}}\). By [3, Prop.4.1.7]

$$\begin{aligned} \root r \of {{{\mathfrak {a}}}}=\{a\in A:\ \exists \ a_1,\ldots ,a_r\in A, m\ge 1\text { such that } a^{2m}+a_1^2+\cdots +a_r^2\in {{\mathfrak {a}}}\}. \end{aligned}$$

A ring A is real (reduced) if the zero ideal is real. The real reduction of A is the quotient \(A/\root r \of {(0)}\). In case A is a field, it is (formally) real if and only if \(-1\) is not a sum of squares in A (that is, if its real spectrum is non-empty). Thus, a prime ideal \({{\mathfrak {p}}}\) of A is the support of a prime cone \(\alpha \) if and only if it is real.

1.1 Background

The property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) is true for the total quotient ring of fractions of a real (reduced) ring A by the general theory of Artin-Schreier for (formally) real fields [3, Sect. 1], but in the general case the situation is more complicated. In [35, Lem.6.3] it is proved that if a noetherian ring A has a non-empty real spectrum (that is, not all the elements of A are positive semidefinite) and the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) holds, then A is a real (reduced) ring. In fact, strong dimensional restrictions appear even under mild hypotheses [35, Cor.1.3]. In case we focus on excellent rings, we have the following result [24, Main Thm.1.1] (see also [16, Thm.1.2]).

Theorem 1.1

[24, Main Thm.1.1] Let A be an excellent ring of real dimension \(\ge 3\). Then \({{\mathcal {P}}}(A)\ne {\Sigma {A}^2}\).

The previous result involves the concept of real dimension. Given two prime cones \(\alpha ,\beta \in {\text {Sper}}(A)\), we say that \(\alpha \) is a specialization of \(\beta \) (written \(\beta \rightarrow \alpha \)) if \(f>_\alpha 0\) implies \(f>_\beta 0\) for each \(f\in A\). This implies \({{\mathfrak {q}}}:={\text {supp}}(\beta )\subset {\text {supp}}(\alpha )=:{{\mathfrak {p}}}\). We set \(\dim (\beta \rightarrow \alpha ):=\dim (A_{{{\mathfrak {p}}}}/{{\mathfrak {q}}}A_{{{\mathfrak {p}}}})\), and define the real dimension of A as

\(\dim _r(A):=\sup \{\dim (\beta \rightarrow \alpha )\): \(\alpha \), \(\beta \in {\text {Sper}}(A)\), \(\beta \rightarrow \alpha \}\).

Therefore, \(\dim _r(A)\le \dim (A)\). Let us show that this inequality is an equality in case \((A,{{\mathfrak {m}}})\) is a local henselian noetherian ring such that \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). By [1, Prop.II.2.4] each non-refinable specialization chain finishes on a prime cone \(\alpha \) whose support is \({{\mathfrak {m}}}\). If A is in addition noetherian and has the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), then A is real (reduced), so all its minimal prime ideals are real [3, Lem.4.1.5]. Thus, \(\dim _r(A)=\sup \{\dim (A/{\text {supp}}(\beta )):\ \beta \in {\text {Sper}}(A)\}=\dim (A)\). Consequently, if A is a local excellent henselian ring with the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), then \(\dim (A)\le 2\).

The one dimensional case was entirely solved by Scheiderer in [36, Sect. 3]. The most conclusive case concerns the one when the residue field \(\kappa :=A/{{\mathfrak {m}}}\) is real closed. Recall that a prime ideal \({{\mathfrak {p}}}\) of a ring A is associated to A if there exists a non-zero element \(x\in A\) such that \({{\mathfrak {p}}}=\{a\in A:\ ax=0\}\). The set of all associated prime ideals of A is denoted with \({\text {Ass}}(A)\).

Theorem 1.2

[36, Thm.3.9] Let \((A,{{\mathfrak {m}}})\) be a one-dimensional local Nagata ring with (formally) real residue field \(\kappa \) and completion \({\widehat{A}}\), and assume \({{\mathfrak {m}}}\not \in {\text {Ass}}(A)\). Consider the following conditions:

  1. (i)

    \({{\mathcal {P}}}(A)={\Sigma {A}^2}\).

  2. (ii)

    \({{\mathcal {P}}}({\widehat{A}})={\Sigma {{\widehat{A}}}^2}\).

  3. (iii)

    There is \(n\ge 1\) such that \({\widehat{A}}\cong \kappa [[\mathtt{x}_1,\ldots ,\mathtt{x}_n]]/(\mathtt{x}_i\mathtt{x}_j:\ i<j)\).

Then the following assertions hold:

  1. (1)

    Each of these conditions implies that A is reduced.

  2. (2)

    Conditions (i) and (ii) are equivalent, and both are implied by (iii).

  3. (3)

    If \(\kappa \) is real closed, then all three conditions are equivalent.

Thus, we will focus on determining all local excellent henselian rings \((A,{{\mathfrak {m}}})\) of dimension \(\le 2\) and embedding dimension \(\le 3\) with the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). In the 2-dimensional regular case, the most general result is the following:

Theorem 1.3

[36, Thms.4.1 and 4.8] If A is a 2-dimensional regular semilocal ring, then \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). In particular, for every field \(\kappa \) we have that \({{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])={\Sigma {\kappa [[\mathtt{x},\mathtt{y}]]}^2}\).

The 2-dimensional case, when A is an analytic ring of dimension 2 and embedding dimension \(\le 3\) over the real numbers \({{\mathbb {R}}}\), has been studied in [15, 17, 18, 20, 21, 34]. The results presented in that articles can be adapted straightforwardly to the local henselian excellent case with real closed residue field [19]. We can summarize the main results as follows:

Theorem 1.4

[15, Thm.1.3], [17, 18] Let \((A,{{\mathfrak {m}}})\) be a local henselian excellent ring of dimension 2 and embedding dimension 3. Assume that the residue field \(\kappa :=A/{{\mathfrak {m}}}\) is real closed. Then \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) if and only if the completion \({\widehat{A}}\) is isomorphic to

  1. (1)

    \(\kappa [[\mathtt{x},\mathtt{y}]]\) or

  2. (2)

    \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}\mathtt{x},\mathtt{z}\mathtt{y})\) or

  3. (3)

    \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F(\mathtt{x},\mathtt{y}))\)

where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the series in the following list:

  1. (i)

    \(\mathtt{x}^2+\mathtt{y}^k\) where \(k\ge 2\),

  2. (ii)

    \(\mathtt{x}^2\),

  3. (iii)

    \(\mathtt{x}^2\mathtt{y}+(-1)^k\mathtt{y}^k\) where \(k\ge 3\),

  4. (iv)

    \(\mathtt{x}^2\mathtt{y}\),

  5. (v)

    \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\),

  6. (vi)

    \(\mathtt{x}^3+\mathtt{y}^4\),

  7. (vii)

    \(\mathtt{x}^3+\mathtt{y}^5\).

1.2 Main results

In this article we prove that if we do not impose that \(\kappa \) is a real closed field, the amount of possible candidates increases because \(\kappa \) may have more than one ordering and kth roots of positive elements of \(\kappa \) need not to belong to \(\kappa \). In order to apply freely Rotthaus results [33] on Artin’s approximation Theorem, one needs that the involved ring A we are working with contains a copy of \({{\mathbb {Q}}}\). As we deal with local henselian rings \((A,{{\mathfrak {m}}})\) with non-empty real spectrum, it is enough to ask that \(\frac{1}{2}\in A\) (or equivalently that \(2\not \in {{\mathfrak {m}}}\)). If such is the case, non-zero integers are units of A (or equivalently, non-zero integers do not belong to \({{\mathfrak {m}}}\)) and consequently A contains a copy of \({{\mathbb {Q}}}\). Otherwise there exists an integer \(n\ge 3\) such that \(n\in {{\mathfrak {m}}}\) and the roots of the polynomial equation \(\mathtt{t}^2+n-1=0\) modulo \({{\mathfrak {m}}}\) are \(\pm 1\). As \(2\not \in {{\mathfrak {m}}}\), both roots are simple. As A is a henselian ring, there exists \(a\in A\) such that \(a+{{\mathfrak {m}}}=1+{{\mathfrak {m}}}\) and \(a^2+1^2+\overset{(n-2)}{\cdots }+1^2=a^2+n-2=-1\) in A, against the fact that A has non-empty real spectrum.

Theorem 1.5

(List of candidates) Let \((A,{{\mathfrak {m}}})\) be a local henselian excellent ring of dimension 2 and embedding dimension 3. Assume that A has non-empty real spectrum and \(\frac{1}{2}\in A\). If \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), then the completion \({\widehat{A}}\) is isomorphic to

  1. (1)

    \(\kappa [[\mathtt{x},\mathtt{y}]]\) or

  2. (2)

    \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}\mathtt{x},\mathtt{z}\mathtt{y})\) or

  3. (3)

    \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F(\mathtt{x},\mathtt{y}))\)

where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the series in the following list:

  1. (i)

    \(a\mathtt{x}^2+b\mathtt{y}^{2k}\) where \(a\not \in -{\Sigma {\kappa }^2}\), \(b\ne 0\) and \(k\ge 1\),

  2. (ii)

    \(a\mathtt{x}^2+\mathtt{y}^{2k+1}\) where \(a\not \in -{\Sigma {\kappa }^2}\) and \(k\ge 1\),

  3. (iii)

    \(a\mathtt{x}^2\) where \(a\not \in -{\Sigma {\kappa }^2}\),

  4. (iv)

    \(\mathtt{x}^2\mathtt{y}+(-1)^ka\mathtt{y}^k\) where \(a\not \in -{\Sigma {\kappa }^2}\) and \(k\ge 3\),

  5. (v)

    \(\mathtt{x}^2\mathtt{y}\),

  6. (vi)

    \(\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\) irreducible,

  7. (vii)

    \(\mathtt{x}^3+a\mathtt{y}^4\) where \(a\not \in -{\Sigma {\kappa }^2}\),

  8. (viii)

    \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\),

  9. (ix)

    \(\mathtt{x}^3+\mathtt{y}^5\).

Remark 1.6

The assumption A has non-empty real spectrum and \(\frac{1}{2}\in A\) is equivalent to the condition the residue field \(\kappa \) of A is (formally) real. The implication right to left is clear. To prove the converse assume that there exist elements \(a_1,\ldots ,a_r\in A{\setminus }{{\mathfrak {m}}}\) such that \(a_1^2+\cdots +a_r^2=-1\) modulo \({{\mathfrak {m}}}\), so \(a_1\) is a simple root of the polynomial equation \(\mathtt{t}^2+a_2^2+\cdots +a_r^2+1=0\) modulo \({{\mathfrak {m}}}\) (because \(2\not \in {{\mathfrak {m}}}\)). As A is a henselian ring, we may assume that \(a_1\) is a root of \(\mathtt{t}^2+a_2^2+\cdots +a_r^2+1=0\) in A, against the non-emptiness of the real spectrum of A.

1.2.1 Pythagoras numbers and \(\tau \)-invariant.

An important invariant that allows us to use Artin’s approximation techniques when approaching a converse to the previous result is Pythagoras number. The Pythagoras number p(A) of a ring A is the smallest integer \(p\ge 1\) such that every sum of squares of A is a sum of p squares. We write \(p(A)=+\infty \) if such an integer does not exist. If we denote the elements of A that are sums of p squares in A with \({\Sigma _p{A}^2}\), then \(p(A)=\inf \{p\ge 1:\ {\Sigma {A}^2}={\Sigma _p{A}^2}\}\). This is a very delicate invariant whose estimation (quantitative problem) has deserved a lot of attention from specialists in number theory, quadratic forms, real algebra and real geometry [3, 7, 8, 30, 31, 35, 36]. In [17, 18] we proved that the local henselian excellent rings of dimension 2 and embedding dimension 3 with Pythagoras number 2 coincide essentially with those in the list provided in Theorem 1.4. In [20] we showed ‘positive extension properties’ for the elements of the list inside Theorem 1.4, whereas in [23] we analyze relations between the Pythagoras numbers of real analytic germs.

In [14] we showed that a local henselian excellent ring of dimension \(\le 2\) and real closed residue field \(\kappa \) has a finite Pythagoras number. In [25] we improved the previous result and proved the following.

Theorem 1.7

[25, Prop.2.7, Thm.2.9] Let \((A,{{\mathfrak {m}}})\) be a local henselian excellent ring of dimension 2 such that its residue field \(\kappa \) satisfies \(p(\kappa [\mathtt{t}])<+\infty \). Let m be the number of generators of the completion \({\widehat{A}}\) as a \(\kappa [[\mathtt{x}_1,\mathtt{x}_2]]\)-module. Then \(p(A)\le 2p(\kappa [\mathtt{t}])m\).

For a higher dimension we proved in [14, 24] that a real (reduced) ring A of dimension \(\ge 3\) has an infinite Pythagoras number. The invariant \(p(\kappa [\mathtt{t}])\) has been bounded by Scheiderer in [36] following [31]. For a (formally) real field \(\kappa \) define the invariant

$$\begin{aligned} \tau (\kappa ):=\sup \{s(F):\ F|\kappa \text { finite, non-real}\}, \end{aligned}$$

where s(F) denotes the level of F, that is, the minimum number of elements of F needed to represent \(-1\) as a sum of squares in F, which is always a power of 2, see [30, Pfister’s Thm.XI.2.2]. Scheiderer proved in [36, Prop.5.17] (using in an essential way Pfister’s results [31]) the following inequalities:

$$\begin{aligned} 1+\tau (\kappa )\le p(\kappa [\mathtt{y}])\le p(\kappa [[\mathtt{x},\mathtt{y}]])\le p(\kappa [[\mathtt{x}]][\mathtt{y}])\le 2\tau (\kappa ). \end{aligned}$$
(1.1)

In addition, \(\tau (\kappa )=\tau (\kappa ((\mathtt{x})))\), see [36, Lem.5.13]. The Pythagoras number \(p(\kappa [[\mathtt{x},\mathtt{y}]])\) has been also studied by Hu in [28, Sect. 3] where he showed that

$$\begin{aligned} p(\kappa [[\mathtt{x},\mathtt{y}]])=p(\kappa [\mathtt{x}][[\mathtt{y}]])=p(\kappa [[\mathtt{x}]][\mathtt{y}]) =p(\kappa ((\mathtt{x},\mathtt{y})))=p({\text {qf}}(\kappa [\mathtt{x}][[\mathtt{y}]]))\\ =p(\kappa ((\mathtt{x}))(y))=\sup \{p(K(\mathtt{x})):\ K|\kappa \text { is a finite field extension}\}. \end{aligned}$$

The last equality is due to Becher-Grimm-Van Geel [2]. It is conjectured in [2, Conj.4.16] that the inequality \(p(\kappa [\mathtt{y}])\le p(\kappa ((\mathtt{x}))(\mathtt{y}))\) is in fact an equality or, equivalently, that \(p(K(\mathtt{x}))\le p(\kappa (\mathtt{x}))\) for each finite extension \(K|\kappa \). Recall that \(4=p({{\mathbb {Q}}})\le p({{\mathbb {Q}}}[\mathtt{y}])=p({{\mathbb {Q}}}((\mathtt{x},\mathtt{y})))=p({{\mathbb {Q}}}[[\mathtt{x},\mathtt{y}]])=5\) (see [32] and [28, Rem.3.5]), so \(\tau ({{\mathbb {Q}}})=4\) (use (1.1)).

As a kind of converse of Theorem 1.5 we prove the following result.

Theorem 1.8

(Affirmative cases) Let \((A,{{\mathfrak {m}}})\) be a local henselian excellent ring of dimension 2 and embedding dimension 3. Suppose that the residue field \(\kappa \) is (formally) real and \(\tau (\kappa )<+\infty \). Assume that the completion \({\widehat{A}}\) is isomorphic to:

  1. (1)

    \(\kappa [[\mathtt{x},\mathtt{y}]]\) or

  2. (2)

    \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}\mathtt{x},\mathtt{z}\mathtt{y})\) or

  3. (3)

    \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F(\mathtt{x},\mathtt{y}))\),

where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the series in the following list:

  1. (i)

    \(a\mathtt{x}^2+b\mathtt{y}^{2k}\) where \(a\in {\Sigma {\kappa }^2}\), \(a,b\ne 0\) and \(k\ge 1\),

  2. (ii)

    \(a\mathtt{x}^2+\mathtt{y}^{2k+1}\) where \(a\in {\Sigma {\kappa }^2}\), \(a\ne 0\) and \(k\ge 1\),

  3. (iii)

    \(a\mathtt{x}^2\) where \(a\in {\Sigma {\kappa }^2}\) and \(a\ne 0\),

  4. (iv)

    \(\mathtt{x}^2\mathtt{y}+(-1)^ka\mathtt{y}^k\) where \(a\not \in -{\Sigma {\kappa }^2}\) and \(k\ge 3\),

  5. (v)

    \(\mathtt{x}^2\mathtt{y}\),

  6. (vi)

    \(\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\) irreducible,

  7. (vii)

    \(\mathtt{x}^3+a\mathtt{y}^4\) where \(a\not \in -{\Sigma {\kappa }^2}\),

  8. (viii)

    \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\),

  9. (ix)

    \(\mathtt{x}^3+\mathtt{y}^5\).

Then \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). In addition, \(p(A)\le 4\tau (\kappa )\).

Theorems 1.5 and 1.8 can be understood as the necessary (list of candidates) and sufficient (affirmative cases) conditions for a local henselian excellent ring of dimension 2 and embedding dimension 3 to enjoy the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). In order to join both Theorems 1.5 and 1.8 , we ask in addition that the residue field \(\kappa \) admits a unique ordering (that is, \(\kappa =-{\Sigma {\kappa }^2}\cup {\Sigma {\kappa }^2}\)) and obtain straightforwardly the following full characterization.

Corollary 1.9

(Full characterization) Let \((A,{{\mathfrak {m}}})\) be a local henselian excellent ring of dimension 2 and embedding dimension 3. Suppose that the residue field \(\kappa \) admits a unique ordering and \(\tau (\kappa )<+\infty \). Then \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) if and only if the completion \({\widehat{A}}\) is isomorphic to:

  1. (1)

    \(\kappa [[\mathtt{x},\mathtt{y}]]\) or

  2. (2)

    \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}\mathtt{x},\mathtt{z}\mathtt{y})\) or

  3. (3)

    \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F(\mathtt{x},\mathtt{y}))\),

where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the series in the following list:

  1. (i)

    \(a\mathtt{x}^2+b\mathtt{y}^{2k}\) such that \(a,b>0\) and \(k\ge 1\),

  2. (ii)

    \(a\mathtt{x}^2+\mathtt{y}^{2k+1}\) where \(a>0\) and \(k\ge 1\),

  3. (iii)

    \(a\mathtt{x}^2\) where \(a>0\),

  4. (iv)

    \(\mathtt{x}^2\mathtt{y}+(-1)^ka\mathtt{y}^k\) where \(a>0\) and \(k\ge 3\),

  5. (v)

    \(\mathtt{x}^2\mathtt{y}\),

  6. (vi)

    \(\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\) irreducible,

  7. (vii)

    \(\mathtt{x}^3+a\mathtt{y}^4\) where \(a>0\),

  8. (viii)

    \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\),

  9. (ix)

    \(\mathtt{x}^3+\mathtt{y}^5\).

In addition, \(p(A)\le 4\tau (\kappa )\).

Remark 1.10

The case (3.vi) ‘\(F=\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\) irreducible’ requires a special comment. Denote \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\), the real closure of \(\kappa \) with R (endowed with its unique ordering) and \(B:=R[[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\).

  1. (i)

    For simplicity suppose \(\kappa ={{\mathbb {Q}}}\) and consider the irreducible polynomial \(F:=\mathtt{x}^3+2\mathtt{y}^3\in {{\mathbb {Q}}}[\mathtt{x},\mathtt{y}]\). By Corollary 1.9 we have \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). On the other hand, \(F=(\mathtt{x}+\root 3 \of {2}\mathtt{y})((\mathtt{x}-\frac{1}{2}\root 3 \of {2}\mathtt{y})^2+\frac{3}{4}\root 3 \of {4}\mathtt{y}^2)\) is reducible in \(R[\mathtt{x},\mathtt{y}]\) and \(\mathtt{x}+\root 3 \of {2}\mathtt{y}\in {{\mathcal {P}}}(B){\setminus }{\Sigma {B}^2}\).

  2. (ii)

    This surprising situation can only appear in case (3.vi), because the condition of ‘irreducibility of F’ disappears when we extend coefficients to the real closure R of \(\kappa \) because \(F(\mathtt{x},1)\) has degree 3, whereas the obstructions for the remaining elements of the list keep the same when extending coefficients to the real closure. If \(F(\mathtt{x},1)=\mathtt{x}^3+a\mathtt{x}+b\) has only one root in R, then \({{\mathcal {P}}}(B){\setminus }{\Sigma {B}^2}\ne \varnothing \) is always true. If \(F(\mathtt{x},1)\) has three roots in R (which happens if and only if \(a<0,4a^3+27b^2<0\), see Example A.1), then \({{\mathcal {P}}}(B)={\Sigma {B}^2}\) (case (3.iv) for \(k=3\)).

1.2.2 Formally real fields with a unique ordering

Apart from real closed fields there are well-known examples of fields with a unique ordering. The most simple one corresponds to the field \({{\mathbb {Q}}}\) of rational numbers (which has Pythagoras number 4), but also each finite algebraic extension \({{\mathbb {Q}}}[\theta ]\subset {{\mathbb {R}}}\) of \({{\mathbb {Q}}}\) such that the irreducible polynomial of \(\theta \) over \({{\mathbb {Q}}}\) has odd degree and a unique root in \({{\mathbb {R}}}\) admits a unique ordering. The field \({{\mathbb {Q}}}[\theta ]\) has Pythagoras number either 3 or 4, see [42]. Other examples of fields with a unique ordering are the real constructible numbers [30, Ex.p.236] or Euclidean fields, which are those fields \(\kappa \) in which every element is either a square or the opposite of a square [30, Prop.VIII.1.6]. The previous examples of fields contained in \({{\mathbb {R}}}\) that admit a unique ordering are all archimedean, but it is not difficult to construct examples of non-archimedean fields with a unique ordering that are non-euclidean (and consequently non-real closed). An example of this type of fields is \({{\mathbb {Q}}}((\mathtt{t}^{1/2^*})):=\bigcup _{n\ge 0}{{\mathbb {Q}}}((\mathtt{t}^{1/2^n}))\), which is a field with Pythagoras number 4. More generally, if \(\kappa \) is a field with a unique ordering and Pythagoras number p, also \(\kappa ((\mathtt{t}^{1/2^*})):=\bigcup _{n\ge 0}\kappa ((\mathtt{t}^{1/2^n}))\) is a non-archimedean (formally) real field with a unique ordering and Pythagoras number p. In [27, Thm.2] the existence of (formally) real fields with a unique ordering and Pythagoras number p is proved for each \(p\ge 1\).

1.3 Applications: Principal saturated preorderings of low order.

In his articles [38, 39] Scheiderer approached the problem of determining when a finitely generated preordering T in an excellent regular ring \((A,{{\mathfrak {m}}})\) of dimension 2 is saturated. To that end, he established criteria to decide when the saturation of the preordering \({\widehat{T}}\) generated by T in the completion \({\widehat{A}}\) implies the saturation of T. Recall that if T is generated by \(h_1,\ldots ,h_r\), then \(T:=\{\sum _{\nu \in \{0,1\}^r}\sigma _\nu h_1^{\nu _1}\cdots h_r^{\nu _r}:\ \sigma _i\in {\Sigma {A}^2}\}\). We say that T is saturated if it contains every \(f\in A\) such that \(f\ge _\alpha 0\) for each \(\alpha \in {\text {Sper}}(A)\) satisfying \(h_1\ge _\alpha 0,\ldots ,h_r\ge _\alpha 0\). Observe that

$$\begin{aligned} {\widehat{T}}:=\Big \{\sum _{\nu \in \{0,1\}^r}\sigma _\nu h_1^{\nu _1}\cdots h_r^{\nu _r}:\ \sigma _i\in {\Sigma {{\widehat{A}}}^2}\Big \}. \end{aligned}$$

In [38, Cor.3.25] the following is proved:

Corollary 1.11

Let A be an excellent henselian local ring with \(p(A)<+\infty \) and let T be a finitely generated preordering in A. Then T is saturated in A if and only if \({\widehat{T}}\) is saturated in \({\widehat{A}}\).

The previous result reduces the problem of studying the saturation of finitely generated preorderings on an excellent henselian local ring with a finite Pythagoras number to the study of the saturation of finitely generated preorderings on complete rings. Let R be a real closed field. Taking advantage of [16, 34], Scheiderer characterizes the saturated preorderings of \(A:=R[[\mathtt{x},\mathtt{y}]]\) generated by an element \(h\in R[[\mathtt{x},\mathtt{y}]]\) of order \(\le 3\) and he obtains the same list (up to right equivalence) as the one appearing in Theorem 1.4(3). In the same vein we characterize in Sect. 6 (Corollaries 6.1 and 6.2 ) the saturated preorderings of \(A:=\kappa [[\mathtt{x},\mathtt{y}]]\) generated by an element \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) of order \(\le 3\) (up to right equivalence), where \(\kappa \) is a (formally) real field that has \(\tau (\kappa )<+\infty \). In addition, we ask that \(\kappa \) admits a unique ordering when \(\omega (F)=2\). The lists obtained in these cases (for \(\omega (F)=2\) and \(\omega (F)=3\)) coincide with those proposed in Theorem 1.8(3).

1.4 Structure of the article

The article is organized as follows. In Sect. 2 we present the main finite determinacy tools in order to prove Theorem 1.5 in Sect. 3. The proofs of some of the results in Sect. 2, which are substantially different from the classical ones over the complex or the real numbers, are included in Appendix 1 for the sake of completeness. In Sect. 4 we introduce the main tools to prove Theorem 1.8 in Sect. 5. We highlight Theorem 5.5. In Sect. 6 we prove (see Corollaries 6.1, 6.2 ) the counterpart of the results of Scheiderer concerning principal preorderings on an excellent henselian local ring with a finite Pythagoras number, when the residue field is a field \(\kappa \) with a unique ordering (instead of a real closed field). Finally, in Appendix 1 we present two additional examples: one concerning the ring \({\widehat{A}}\) in Theorem 1.8(3.iv) (Example A.1) and another one (quite tricky!) concerning a ring A with the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) that does not appear in the list provided in Theorem 1.8(3) (Example A.2). Such example suggests that there is still further work to do (surely with the aid of new techniques) when the residue field \(\kappa \) admits more than one ordering and the series \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) has order 2.

2 Basic tools when dealing with formal rings

As we work in the environment of excellent henselian local rings \((A,{{\mathfrak {m}}})\) (that contain \({{\mathbb {Q}}}\)) with a finite Pythagoras number p, the qualitative problem \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) has an affirmative solution in A if and only if the equation

$$\begin{aligned} f=\mathtt{X}_1^2+\cdots +\mathtt{X}_p^2 \end{aligned}$$

has a solution in the completion \({\widehat{A}}\) for each \(f\in {{\mathcal {P}}}(A)\). This is a straightforward consequence of Rotthaus Theorem on Artin’s approximation property [33, Thm.4.2]. Denote the residue field of A with \(\kappa :=A/{{\mathfrak {m}}}\). As A contains \({{\mathbb {Q}}}\), Cohen’s structure theorem [13, Thm.7.7] states that \({\widehat{A}}\cong \kappa [[\mathtt{x}_1,\ldots ,\mathtt{x}_n]]/{{\mathfrak {a}}}\) where \({{\mathfrak {a}}}\) is an ideal of \(\kappa [[\mathtt{x}_1,\ldots ,\mathtt{x}_n]]\) and \(n:=\dim _{\kappa }({{\mathfrak {m}}}/{{\mathfrak {m}}}^2)\) is the embedding dimension of A. In order to take advantage of formal rings, we recall some useful properties.

2.1 Formal rings

A formal ring over a field \(\kappa \) is a ring \(A:=\kappa [[\mathtt{x}]]/{{\mathfrak {a}}}\) where \({{\mathfrak {a}}}\) is an ideal of the ring \(\kappa [[\mathtt{x}]]\) of (formal power) series in the variables \(\mathtt{x}:=(\mathtt{x}_1,\ldots ,\mathtt{x}_n)\). If \(f\in \kappa [[\mathtt{x}]]\), we write \(f:=\sum _{k=0}^{\infty }f_k\) where \(f_k\in \kappa [\mathtt{x}]\) is (either 0 or) an homogeneous polynomial of degree k. Denote the order of f with \(\omega (f):=\inf \{k:\ f_k\ne 0\}\) and the initial form of f with \({\text {In}}(f):=f_{\omega (f)}\). We write \({{\mathfrak {m}}}_n:=(\mathtt{x}_1,\ldots ,\mathtt{x}_n)\kappa [[\mathtt{x}]]\) to refer to the maximal ideal of \(\kappa [[\mathtt{x}]]\) and \(\Vert \mathtt{x}\Vert ^2:=\mathtt{x}_1^2+\cdots +\mathtt{x}_n^2\). In addition, \(\kappa ((\mathtt{x}))\) stands for the quotient field of \(\kappa [[\mathtt{x}]]\). Recall that a series \(f\in \kappa [[\mathtt{x}_1,\ldots ,\mathtt{x}_n]]\) is regular with respect to \(\mathtt{x}_n\) (of order d) if \(f(0,\ldots ,0,\mathtt{x}_n)=a_d\mathtt{x}_n^d+\cdots \) with \(a_d\ne 0\). Let \(\mathtt{x}':=(\mathtt{x}_1,\ldots ,\mathtt{x}_{n-1})\). A Weierstrass polynomial \(P\in \kappa [[\mathtt{x}']][\mathtt{x}_n]\) is a monic polynomial of degree d such that \(P(0,\mathtt{x}_n)=\mathtt{x}_n^d\). By [43, Ch.7. Sect. 1.Thm.5 and Cor.1] the ring \(\kappa [[\mathtt{x}]]\) enjoys Weierstrass division and preparation theorems, which are fundamental tools when dealing with rings of series with coefficients in a field.

Theorem 2.1

(Weierstrass division theorem [43, Ch.7. Sect. 1.Thm.5]) Let \(f,g\in \kappa [[\mathtt{x}]]\) be series such that f is a regular series with respect to \(\mathtt{x}_n\) of order d. Then there exist \(Q\in \kappa [[\mathtt{x}]]\) and a polynomial \(R\in \kappa [[\mathtt{x}']][\mathtt{x}_n]\) of degree \(\le d-1\) such that \(f=gQ+R\).

Theorem 2.2

(Weierstrass preparation theorem [43, Ch.7. Sect. 1.Cor.1]) Let \(f\in \kappa [[\mathtt{x}]]\) be a regular series with respect to \(\mathtt{x}_n\) of order d. Then there exist a Weierstrass polynomial \(P\in \kappa [[\mathtt{x}']][\mathtt{x}_n]\) of degree d and a unit \(U\in \kappa [[\mathtt{x}]]\) such that \(f=PU\).

As a consequence of the previous results, Implicit and Inverse Function Theorems arise standardly. We will use them freely in the article.

Theorem 2.3

(Implicit function theorem) Let \(f_1,\ldots ,f_m\in \kappa [[\mathtt{x},\mathtt{y}]]\) be such that \(f_i(0,0)=0\) and \(\det (\frac{\partial f_i}{\partial \mathtt{y}_j}(0,0))_{1\le i,j\le m}\ne 0\). Then there exist unique series \(g_1,\ldots ,g_m\in \kappa [[\mathtt{x}]]\) such that \(g_j(0)=0\) and \(f_i(\mathtt{x},g_1,\ldots ,g_m)=0\) for \(i=1,\ldots ,m\).

Theorem 2.4

(Inverse function theorem) Let \(f_1,\ldots ,f_n\in \kappa [[\mathtt{x}]]\) be series such that \(f_i(0)=0\) and \(\det (\frac{\partial f_i}{\partial \mathtt{x}_j}(0))_{1\le i,j\le n}\ne 0\). Then there exist unique series \(g_1,\ldots ,g_n\in \kappa [[\mathtt{y}]]\) such that \(g_i(0)=0\) and \(f_i(g_1,\ldots ,g_n)=\mathtt{y}_i\) and \(g_i(f_1,\ldots ,f_n)=\mathtt{x}_i\) for \(i=1,\ldots ,n\).

Let \(\kappa \) be a (formally) real field and \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) a unit such that \(U(0,0)\in {\Sigma _p{\kappa }^2}\). By the Implicit Function Theorem the quotient \(\frac{U}{U(0,0)}\) is a square in \(\kappa [[\mathtt{x},\mathtt{y}]]\), so \(U\in {\Sigma _p{\kappa [[\mathtt{x},\mathtt{y}]]}^2}\).

2.2 Equivalence of series and finite determinacy tools

In order to simplify the discussions when dealing with series, it is usual to use ‘equivalence of series’. Let \(f,g\in {{\mathfrak {m}}}\) where \({{\mathfrak {m}}}\) is the maximal ideal of \(\kappa [[\mathtt{x}]]\). We say that:

  1. (i)

    f is right equivalent to g (and we write \(f\sim _{{\mathrm{R}}}g\)) if there exists an automorphism \(\Phi :\kappa [[\mathtt{x}]]\rightarrow \kappa [[\mathtt{x}]]\) such that \(\Phi (f)=g\).

  2. (ii)

    f is contact equivalent to g (and we write \(f\sim _{{\mathrm{C}}}g\)) if there exists an automorphism \(\Phi :\kappa [[\mathtt{x}]]\rightarrow \kappa [[\mathtt{x}]]\) such that \((\Phi (f))=(g)\). This is equivalent to the existence of a unit \(u\in \kappa [[\mathtt{x}]]\) such that \(\Phi (f)=ug\).

Two series fg are contact equivalent if and only if the \(\kappa \)-algebras \(\kappa [[\mathtt{x}]]/(f)\), \(\kappa [[\mathtt{x}]]/(g)\) are isomorphic. In relation to this we recall the meaning of k-determinacy and k-quasideterminacy. A series \(f\in {{\mathfrak {m}}}\) is k-determined (resp. k-quasidetermined) if each \(g\in \kappa [[\mathtt{x}]]\) with \(f-g\in {{\mathfrak {m}}}^{k+1}\) is right equivalent to f (resp. contact equivalent to f). If f is k-determined (resp. k-quasidetermined) for some \(k\ge 1\), then f is right (resp. contact) equivalent to a polynomial of \(\kappa [\mathtt{x}]\). This fact will be ‘squeezed to the extreme’ in the following sections. As it seems natural, it will be useful to have a criterion to determine when a series is finitely determined (resp. quasi determined), that is, when it is k-determined (resp. k-quasidetermined) for some \(k\ge 1\).

Theorem 2.5

(Finite determinancy and quasideterminancy theorem) Let \(f\in {{\mathfrak {m}}}^2\subset \kappa [[\mathtt{x}]]\). Suppose that \({{\mathfrak {m}}}^k\subset {{\mathfrak {m}}}J(f)\) (resp. \({{\mathfrak {m}}}^k\subset {{\mathfrak {m}}}J(f)+(f)\)) where \(J(f):=(\frac{\partial f}{\partial \mathtt{x}_1},\ldots ,\frac{\partial f}{\partial \mathtt{x}_n})\). Then f is k-determined (resp. k-quasidetermined).

The previous result is well-known when \(\kappa ={{\mathbb {C}}}\) is the field of complex numbers and it is easy to adapt when \(\kappa ={{\mathbb {R}}}\) or, more generally, when \(\kappa \) is algebraically closed or real closed. A quite straightforward proof of the previous result when \(\kappa ={{\mathbb {C}}}\) can be found in [26, Thm.I.2.23] and [29, Thm.9.1.7]. The details there can be adapted to approach the case when \(\kappa \) is a field of characteristic 0. For the sake of completeness we provide an elementary proof of Theorem 2.5 in Appendix 1.

Example 2.6

Let \(\kappa \) be a field of characteristic 0 and \(0\ne a,b\in \kappa \) and write \({{\mathfrak {m}}}:=(\mathtt{x},\mathtt{y})\kappa [[\mathtt{x},\mathtt{y}]]\). We have:

  1. (i)

    If \(F:=a\mathtt{x}^2+b\mathtt{y}^\ell \) where \(\ell \ge 2\), then \(J(F)=(\mathtt{x},\mathtt{y}^{\ell -1})\) and \({{\mathfrak {m}}}^{\ell }\subset {{\mathfrak {m}}}J(F)\). Thus, F is \(\ell \)-determined.

  2. (ii)

    If \(F:=a\mathtt{x}^2\mathtt{y}+b\mathtt{y}^\ell \) with \(\ell \ge 3\), then \(J(F)=(\mathtt{x}\mathtt{y},a\mathtt{x}^2+\ell b\mathtt{y}^{\ell -1})\) and \({{\mathfrak {m}}}^{\ell }\subset {{\mathfrak {m}}}J(F)=(\mathtt{x}^2\mathtt{y},\mathtt{x}\mathtt{y}^2,\mathtt{x}^3,\mathtt{y}^{\ell })\). Thus, F is \(\ell \)-determined.

  3. (iii)

    If \(F:=\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\), then \(J(F)=(3\mathtt{x}^2+a\mathtt{y}^2,2a\mathtt{x}\mathtt{y}+3b\mathtt{y}^2)\). We have \({{\mathfrak {m}}}^{3}\subset {{\mathfrak {m}}}J(F)=(3\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2,3\mathtt{x}^2\mathtt{y}+a\mathtt{y}^3,2a\mathtt{x}^2\mathtt{y}+3b\mathtt{x}\mathtt{y}^2,2a\mathtt{x}\mathtt{y}^2+3b\mathtt{y}^3)\) if and only if the cubic forms \(\{3\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2,3\mathtt{x}^2\mathtt{y}+a\mathtt{y}^3,2a\mathtt{x}^2\mathtt{y}+3b\mathtt{x}\mathtt{y}^2,2a\mathtt{x}\mathtt{y}^2+3b\mathtt{y}^3\}\) are linearly independent or, equivalently, if \(4a^3+27b^2\ne 0\). Thus, F is 3-determined if the discriminant \(4a^3+27b^2\) of \(F(\mathtt{x},1)\) is non-zero.

  4. (iv)

    If \(F:=\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\), then \(J(F)=(3\mathtt{x}^2+\mathtt{y}^3,\mathtt{x}\mathtt{y}^2)\) and \({{\mathfrak {m}}}^{5}\subset (\mathtt{x}^3,\mathtt{x}^2\mathtt{y}^2,\mathtt{x}\mathtt{y}^3,\mathtt{y}^5)\subset {{\mathfrak {m}}}J(F)=(3\mathtt{x}^3+\mathtt{x}\mathtt{y}^3,3\mathtt{x}^2\mathtt{y}+\mathtt{y}^4,\mathtt{x}^2\mathtt{y}^2,\mathtt{x}\mathtt{y}^3)\). Thus, F is 5-determined.

  5. (v)

    If \(F:=\mathtt{x}^3+a\mathtt{y}^k\) where \(k\ge 3\), then \(J(F)=(\mathtt{x}^2,\mathtt{y}^{k-1})\) and

    $$\begin{aligned} {{\mathfrak {m}}}^k\subset {{\mathfrak {m}}}J(F)=(\mathtt{x}^3,\mathtt{x}^2\mathtt{y},\mathtt{x}\mathtt{y}^{k-1},\mathtt{y}^k). \end{aligned}$$

    Thus, F is k-determined.

  6. (vi)

    If \(F:=\mathtt{x}^3+a\mathtt{x}\mathtt{y}^\ell +b\mathtt{y}^k\) where \(2\le \ell <k\) and \(\frac{\ell }{k}\ne \frac{2}{3}\), then F is k-quasidetermined. Observe that \(J(F)=(3\mathtt{x}^2+a\mathtt{y}^\ell ,\ell a\mathtt{x}\mathtt{y}^{\ell -1}+kb\mathtt{y}^{k-1})\) and

    $$\begin{aligned} {{\mathfrak {m}}}J(F)+(F)&=(3\mathtt{x}^3+a\mathtt{x}\mathtt{y}^\ell ,3\mathtt{x}^2\mathtt{y}+a\mathtt{y}^{\ell +1},\ell a\mathtt{x}^2\mathtt{y}^{\ell -1}+kb\mathtt{x}\mathtt{y}^{k-1},\\&\ell a\mathtt{x}\mathtt{y}^\ell +kb\mathtt{y}^k,\mathtt{x}^3+a\mathtt{x}\mathtt{y}^\ell +b\mathtt{y}^k). \end{aligned}$$

    As \(\frac{\ell }{k}\ne \frac{2}{3}\), we deduce \(\mathtt{x}^3,\mathtt{x}^2\mathtt{y}^{\ell -1},\mathtt{x}\mathtt{y}^\ell ,\mathtt{y}^k\in {{\mathfrak {m}}}J(F)+(F)\), so \({{\mathfrak {m}}}^k\subset {{\mathfrak {m}}}J(F)+(F)\) and F is k-quasidetermined.

  7. (vii)

    Let \(F:=\mathtt{x}^3+a\mathtt{x}\mathtt{y}^{2\rho }+b\mathtt{y}^{3\rho }(1+h)\) where \(\rho \ge 2\), \(4a^3+27b^2\ne 0\), \(h\in \kappa [[\mathtt{y}]]\) and either \(h=0\) or \(1\le \omega (h)\le \rho -1\). If \(k:=\min \{3\rho +1+\omega (\frac{d h}{d\mathtt{y}}),4\rho -1\}\), then F is k-quasidetermined. Define \(g:=1+h+\frac{\mathtt{y}}{3\rho }\frac{d h}{d\mathtt{y}}\) and observe that \(J(F)=(3\mathtt{x}^2+a\mathtt{y}^{2\rho },2\rho a\mathtt{x}\mathtt{y}^{2\rho -1}+3\rho b\mathtt{y}^{3\rho -1}g)\), so

    $$\begin{aligned} {{\mathfrak {m}}}J(F)+(F)&=(3\mathtt{x}^3+a\mathtt{x}\mathtt{y}^{2\rho },3\mathtt{x}^2\mathtt{y}+a\mathtt{y}^{2\rho +1},2 \rho a\mathtt{x}^2\mathtt{y}^{2\rho -1}+3\rho b\mathtt{x}\mathtt{y}^{3\rho -1}g,\\&2\rho a\mathtt{x}\mathtt{y}^{2\rho }+3\rho b\mathtt{y}^{3\rho }g,\mathtt{x}^3+a\mathtt{x}\mathtt{y}^{2\rho }+b\mathtt{y}^{3\rho }(1+h)). \end{aligned}$$

    In particular, \(\mathtt{y}^{3\rho +1}\frac{d h}{d\mathtt{y}}\in {{\mathfrak {m}}}J(F)+(F)\). As \(4a^3+27b^2\ne 0\), also \(\mathtt{x}\mathtt{y}^{3\rho -1},\mathtt{x}^2\mathtt{y}^{2\rho -1},\mathtt{x}^3\mathtt{y}^{\rho -1},\mathtt{x}^4,\mathtt{y}^{4\rho -1}\in {{\mathfrak {m}}}J(F)+(F)\), so \({{\mathfrak {m}}}^k\subset {{\mathfrak {m}}}J(F)+(F)\) and F is k-quasidetermined.

Proof of (vii)

First, observe that

$$\begin{aligned} \mathtt{y}^{3\rho +1}\frac{d h}{d\mathtt{y}}= & {} \tfrac{\rho }{b}(3\mathtt{x}^3+a\mathtt{x}\mathtt{y}^{2\rho })+\tfrac{1}{b}(2\rho a\mathtt{x}\mathtt{y}^{2\rho }+3\rho b\mathtt{y}^{3\rho }g)\\&-\tfrac{3\rho }{b}(\mathtt{x}^3+a\mathtt{x}\mathtt{y}^{2\rho }+b\mathtt{y}^{3\rho }(1+h))\in {{\mathfrak {m}}}J(F)+(F). \end{aligned}$$

Consequently, \(f_1:=2a\mathtt{x}\mathtt{y}^{2\rho }+3b\mathtt{y}^{3\rho }(1+h)\in {{\mathfrak {m}}}J(F)+(F)\). In addition,

$$\begin{aligned} f_2:= & {} 9b\mathtt{x}\mathtt{y}^{3\rho -1}g-2a^2\mathtt{y}^{4\rho -1}=3(2a\mathtt{x}^2\mathtt{y}^{2\rho -1}\\&+3b\mathtt{x}\mathtt{y}^{3\rho -1}g)-2a\mathtt{y}^{2\rho -2}(3\mathtt{x}^2\mathtt{y}+a\mathtt{y}^{2\rho +1})\in {{\mathfrak {m}}}J(F)+(F) \end{aligned}$$

and we conclude

$$\begin{aligned} (4a^3+27b^2g(1+h))\mathtt{y}^{4\rho -1}=9b\mathtt{y}^{\rho -1}gf_1-2af_2\in {{\mathfrak {m}}}J(F)+(F). \end{aligned}$$

As \(4a^3+27b^2\ne 0\), we deduce \(\mathtt{y}^{4\rho -1}\in {{\mathfrak {m}}}J(F)+(F)\). Thus, \(9b\mathtt{x}\mathtt{y}^{3\rho -1}g=f_2+2a^2\mathtt{y}^{4\rho -1}\in {{\mathfrak {m}}}J(F)+(F)\), so also \(\mathtt{x}\mathtt{y}^{3\rho -1}\in {{\mathfrak {m}}}J(F)+(F)\). Now,

$$\begin{aligned} 2\rho a\mathtt{x}^2\mathtt{y}^{2\rho -1}=(2\rho a\mathtt{x}^2\mathtt{y}^{2\rho -1}+3\rho b\mathtt{x}\mathtt{y}^{3\rho -1}g)-3\rho b\mathtt{x}\mathtt{y}^{3\rho -1}g\in {{\mathfrak {m}}}J(F)+(F), \end{aligned}$$

so \(\mathtt{x}^2\mathtt{y}^{2\rho -1}\in {{\mathfrak {m}}}J(F)+(F)\). Then \(\mathtt{x}^4=\frac{1}{3}\mathtt{x}(3\mathtt{x}^3+a\mathtt{x}\mathtt{y}^{2\rho })-\frac{1}{3}a \mathtt{y}(\mathtt{x}^2\mathtt{y}^{2\rho -1})\in {{\mathfrak {m}}}J(F)+(F)\). Finally, \(\mathtt{x}^3\mathtt{y}^{\rho -1}=\frac{1}{3}\mathtt{y}^{\rho -1}(3\mathtt{x}^3+a\mathtt{x}\mathtt{y}^{2\rho }) -\frac{1}{3}a\mathtt{x}\mathtt{y}^{3\rho -1}\in {{\mathfrak {m}}}J(F)+(F)\). Now, as \(k:=\min \{3\rho +1+\omega (\frac{d h}{d\mathtt{y}}),4\rho -1\}\ge \rho +2,2\rho +1,3\rho \), we have

$$\begin{aligned} x^{\ell }\mathtt{y}^{k-\ell }={\left\{ \begin{array}{ll} \mathtt{x}^4(x^{\ell -4}\mathtt{y}^{k-\ell })\in {{\mathfrak {m}}}J(F)+(F)&{}\text {if }4\le \ell \le k,\\ \mathtt{x}^3\mathtt{y}^{\rho -1}(\mathtt{y}^{k-2-\rho })\in {{\mathfrak {m}}}J(F)+(F)&{}\text {if }\ell =3,\\ \mathtt{x}^2\mathtt{y}^{2\rho -1}(\mathtt{y}^{k-2\rho -1})\in {{\mathfrak {m}}}J(F)+(F)&{}\text {if }\ell =2,\\ \mathtt{x}\mathtt{y}^{3\rho -1}(\mathtt{y}^{k-3\rho })\in {{\mathfrak {m}}}J(F)+(F)&{}\text {if }\ell =1,\\ \mathtt{y}^k=\mathtt{y}^{4\rho -1}(\mathtt{y}^{k-4\rho +1})\in {{\mathfrak {m}}}J(F)+(F)&{}\text {if} \ell =0, \end{array}\right. } \end{aligned}$$

so \({{\mathfrak {m}}}^k\subset {{\mathfrak {m}}}J(F)+(F)\) and F is k-quasidetermined. \(\square \)

2.3 Exchanging positiveness

Along this work we will freely use the following facts.

Lemma 2.7

Let \(\varphi :A\rightarrow B\) be a homomorphism of rings. We have:

  1. (i)

    For each \(\beta \in {\text {Sper}}(B)\) there exists \(\alpha \in {\text {Sper}}(A)\) such that \(\mathrm{sign}_\alpha (g)=\mathrm{sign}_\beta (\varphi (g))\) for each \(g\in A\).

  2. (ii)

    If \(f\in {{\mathcal {P}}}(A)\), then \(\varphi (f)\in {{\mathcal {P}}}(B)\).

Proof

By [3, Prop.7.1.7] the real spectral map \({\text {Sper}}(\varphi ):{\text {Sper}}(B)\rightarrow {\text {Sper}}(A),\ \beta \mapsto \varphi ^{-1}(\beta )\) is well-defined.

  1. (i)

    Observe that \(\varphi (g)\in \beta \) if and only if \(g\in \alpha :=\varphi ^{-1}(\beta )\) and \(\varphi (g)\in {\text {supp}}(\beta )\) if and only if \(g\in {\text {supp}}(\alpha )=\varphi ^{-1}({\text {supp}}(\beta ))\).

  2. (ii)

    If \(\beta \in {\text {Sper}}(B)\), then \(f\in \varphi ^{-1}(\beta )\) (because \(f\in {{\mathcal {P}}}(A)\)), so \(\varphi (f)\in \beta \). Thus, \(\varphi (f)\in {{\mathcal {P}}}(B)\), as required. \(\square \)

The following result will be useful when dealing with blow-ups in the proof of Theorem 1.8.

Lemma 2.8

Let AB be two rings and \(g\in B\) a non-nilpotent element. Denote the localization of B at the multiplicative set \(S:=\{g^n:\ n\ge 0\}\) with \(B_g\). Let \(\varphi :A\rightarrow B_g\) be a homomorphism of rings and \(f\in {{\mathcal {P}}}(A)\). Write \(\varphi (f)=\frac{b}{g^\ell }\) for some \(\ell \ge 1\) and assume g does not divide b. Define

$$\begin{aligned} k:={\left\{ \begin{array}{ll} 1&{}\text {if }\ell \text { is odd,}\\ 2&{}\text {if }\ell \text { is even.} \end{array}\right. } \end{aligned}$$

Then \(g^kb\in {{\mathcal {P}}}(B)\).

Proof

By Lemma 2.7 we deduce \(\varphi (f)\in {{\mathcal {P}}}(B_g)\). Let \(\mathtt{i}:B\rightarrow B_g,\ x\mapsto \frac{x}{1}\) be the canonical map. By [12, Thm.13.3.7 and Rem.13.3.8(ii)] the real spectrum \({\text {Sper}}(B_g)\) is isomorphic via \({\text {Sper}}(\mathtt{i})\) to the constructible subset \({{\mathcal {U}}}:=\{\alpha \in {\text {Sper}}(B):\ g^2>_\alpha 0\}\) of \({\text {Sper}}(B)\). This means that \(g^kb>_\alpha 0\) for each \(\alpha \in {{\mathcal {U}}}\) because \(\frac{g^kb}{g^{k+\ell }}\in {{\mathcal {P}}}(B_g)\) and \(k+\ell \) is even. As \(k\ge 1\), we have \(g^kb\in {\text {supp}}(\beta )\) for each \(\beta \in {\text {Sper}}(B){\setminus }{{\mathcal {U}}}=\{\alpha \in {\text {Sper}}(B):\ g\in {\text {supp}}(\alpha )\}\). We conclude \(g^kb\in {{\mathcal {P}}}(B)\), as required. \(\square \)

2.4 Applications of Weierstrass polynomials and Puiseux series

We prove next that series in two variables that are close enough in the \({{\mathfrak {m}}}\)-adic topology have similar structures.

Lemma 2.9

Let \(P\in \kappa [[\mathtt{y}]][\mathtt{x}]\) be Weierstrass polynomials of degree d, let \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) be a unit and set \(f:=PU\). For each \(m\ge 1\) there exists \(r\ge 1\) such that if \(Q\in \kappa [[\mathtt{y}]][\mathtt{x}]\) is a Weierstrass polynomial of degree d, \(V\in \kappa [[\mathtt{x},\mathtt{y}]]\) is a unit with \(V(0,0)=U(0,0)\) and \(g:=QV\) satisfies \(f-g\in {{\mathfrak {m}}}_2^r\), then \(P-Q,U-V\in {{\mathfrak {m}}}_2^m\).

Proof

Assume first \(\omega (f)=d\) and let \(r:=d+1\). Pick QV satisfying the conditions of the statement. We have

$$\begin{aligned} Q=V^{-1}UP+V^{-1}(g-f)\equiv V^{-1}UP\mod {{\mathfrak {m}}}_2^r. \end{aligned}$$

We claim: \(Q\equiv P\mod {{\mathfrak {m}}}_2^{r-1}\).

Consider the homogeneous components of \(P,Q,W:=V^{-1}U\) and write:

$$\begin{aligned}&P:=p_d+p_{d+1}+\cdots +p_{d+k}+\cdots ,\\&Q:=q_d+q_{d+1}+\cdots +q_{d+k}+\cdots ,\\&W:=w_0+w_1+\cdots +w_k+\cdots , \end{aligned}$$

where \(p_d\) and \(q_d\) are homogeneous polynomials of degree d monic with respect to \(\mathtt{x}\) and

$$\begin{aligned} \deg _{\mathtt{x}}(p_{d+k}),\deg _{\mathtt{x}}(q_{d+k})\le d-1 \end{aligned}$$

for \(k\ge 1\). As \(Q\equiv WP \mod {{\mathfrak {m}}}_2^r\) for each \(k=0,\ldots ,r-d-1\), we deduce

$$\begin{aligned} q_{d+k}=\sum _{i+j=d+k}p_iw_j. \end{aligned}$$

We claim: \(q_{d+k}=p_{d+k}\) for \(k=0,\ldots ,r-d-1\), \(w_0=1\) and \(w_k=0\) for \(k=1,\ldots ,r-d-1\).

For \(k=0\) we have \(q_d=p_dw_0\), so \(w_0=1\) and \(q_d=p_d\). Assume \(q_{d+j}=p_{d+j}\) for \(j=0,\ldots ,k<r-d-1\) and \(w_j=0\) for \(j=1,\ldots ,k\). Then:

$$\begin{aligned} q_{d+k+1}=p_{d+k+1}w_0+p_{d+k}w_1+\cdots +p_dw_{k+1}=p_{d+k+1}+p_dw_{k+1}. \end{aligned}$$

If \(w_{k+1}\ne 0\),

$$\begin{aligned} d\le & {} \deg _{\mathtt{x}}(p_dw_{k+1})=\deg _{\mathtt{x}}(q_{d+k+1}-p_{d+k+1})\\\le & {} \max \{\deg _{\mathtt{x}}(q_{d+k+1}),\deg _{\mathtt{x}}(p_{d+k+1})\}\le d-1, \end{aligned}$$

which is impossible. Consequently, \(w_{k+1}=0\) and \(q_{d+k+1}=p_{d+k+1}\).

If \(\omega (f)<d\), we substitute \(\mathtt{y}=\mathtt{t}^\ell \) for some \(2\le \ell \le d\) such that \(\omega (f(\mathtt{x},\mathtt{t}^\ell ))=d\). Define \(r:=m\ell +1\) and let QV satisfy the conditions of the statement. Observe that by the previous case \(P(\mathtt{x},\mathtt{t}^\ell )\equiv Q(\mathtt{x},\mathtt{t}^\ell )\mod (\mathtt{x},\mathtt{t})^{m\ell }\) and \(U(\mathtt{x},\mathtt{t}^\ell )\equiv V(\mathtt{x},\mathtt{t}^\ell )\mod (\mathtt{x},\mathtt{t})^{m\ell }\). Consequently, \(P\equiv Q\mod {{\mathfrak {m}}}_2^m\) and \(U\equiv V\mod {{\mathfrak {m}}}_2^m\), as required. \(\square \)

Let \(\kappa \) be a field of characteristic 0 and \(\overline{\kappa }\) its algebraic closure. Let \(\overline{\kappa }[[\mathtt{t}^*]]=\bigcup _{p\ge 1}\overline{\kappa }[[\mathtt{t}^{1/p}]]\) be the ring of Puiseux series with coefficients in \(\overline{\kappa }\) and \(\overline{\kappa }((\mathtt{t}^*))\) its field of fractions, which is an algebraically closed field.

Lemma 2.10

Let \(P\in \kappa [[\mathtt{y}]][\mathtt{x}]\) be a Weierstrass polynomial of degree d, let \(\overline{\kappa }\) be the algebraic closure of \(\kappa \) and let \(\alpha _1,\ldots ,\alpha _d\in \overline{\kappa }[[\mathtt{y}^*]]\) be the roots of P in \(\overline{\kappa }((\mathtt{y}^*))\). For each \(m\ge 1\) there exists \(r\ge 1\) such that if \(Q\in \kappa [[\mathtt{y}]][\mathtt{x}]\) is a Weierstrass polynomial of degree d with roots \(\beta _1,\ldots ,\beta _d\in \overline{\kappa }((\mathtt{y}^*))\) satisfying \(P-Q\in {{\mathfrak {m}}}_2^r\), then (after reordering the indices of the roots \(\beta _i\)) \(\omega (\alpha _i-\beta _i)\ge m\) for each \(i=1,\ldots ,n\).

Proof

Write \(P:=\mathtt{x}^d+\sum _{j=0}^{d-1}a_j\mathtt{x}^j\), where \(a_j\in \kappa [[\mathtt{y}]]\). Let \(Q:=\mathtt{x}^d+\sum _{j=0}^{d-1}b_j\mathtt{x}^j\in \kappa [[\mathtt{y}]][\mathtt{x}]\) be another Weierstrass polynomial of degree d. For each \(r\ge 1\)

$$\begin{aligned} P-Q=\sum _{j=0}^{d-1}(a_j-b_j)\mathtt{x}^j\in {{\mathfrak {m}}}_2^r \end{aligned}$$

if and only if \(a_j-b_j\in {{\mathfrak {m}}}_1^{r-j}\) for \(j=0,\ldots ,d-1\) (where \({{\mathfrak {m}}}_1\) is the maximal ideal of \(\kappa [[\mathtt{y}]]\)). By [6, Prop.8.3.3] the roots \(\alpha _1,\ldots ,\alpha _d,\beta _1,\ldots ,\beta _d\) of PQ in \(\overline{\kappa }((\mathtt{y}^*))\) belong to \(\overline{\kappa }[[\mathtt{y}^{1/p}]]\) where \(p:=d!\). Let \(\mathtt{s}_j\in {{\mathbb {Z}}}[\mathtt{z}_1,\ldots ,\mathtt{z}_d]\) be the jth symmetric elementary form and consider the polynomial system

$$\begin{aligned} a_j(\mathtt{y}^p)-(-1)^j\mathtt{s}_{d-j}(\mathtt{z}_1,\ldots ,\mathtt{z}_d)=0 \end{aligned}$$

for \(j=1,\ldots ,d-1\). We have

$$\begin{aligned} a_j(\mathtt{y}^p)-(-1)^j\mathtt{s}_{d-j}(\beta _1,\ldots ,\beta _d)=a_j(\mathtt{y}^p)-b_j(\mathtt{y}^p)\in {{\mathfrak {m}}}_1^{(r-j)p} \end{aligned}$$

for \(j=0,\ldots ,d-1\). By Artin’s approximation theorem there exists \(k\ge 1\) such that if \(\omega (a_j(\mathtt{y}^p)-b_j(\mathtt{y}^p))\ge k\) for \(j=0,\ldots ,d\), then \(\alpha _j-\beta _j\in {{\mathfrak {m}}}_1^{mp}\). Thus, it is enough to take \(r\ge \frac{k}{p}+d\). \(\square \)

Corollary 2.11

Let \(f\in \kappa [[\mathtt{x},\mathtt{y}]]\) be such that \(f(\mathtt{x},0)\ne 0\) and let \(m\ge 1\). Denote the algebraic closure of \(\kappa \) with \(\overline{\kappa }\). There exists \(r\ge 1\) such that if \(g\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(f-g\in {{\mathfrak {m}}}_2^r\), then \(\omega (f(\zeta ,\mathtt{y})-g(\zeta ,\mathtt{y}))>\min \{\omega (f(\zeta ,\mathtt{y})),m\}\) for each \(\zeta \in \overline{\kappa }[[\mathtt{y}^*]]\). In addition, if fg are Weierstrass polynomials, \(\omega (f(\zeta ,\mathtt{y})-g(\zeta ,\mathtt{y}))>m\).

Proof

As \(f(\mathtt{x},0)\ne 0\) is a regular series with respect to \(\mathtt{x}\) there exists by Weierstrass preparation theorem a Weierstrass polynomial \(P\in \kappa [[\mathtt{y}]][\mathtt{x}]\) and a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(f=PU\). Let \(d:=\omega (f(\mathtt{x},0))\) and let \(\alpha _1,\ldots ,\alpha _d\in \overline{\kappa }[[\mathtt{y}^{1/(d!)}]]\) be the roots of P in \(\overline{\kappa }((\mathtt{y}^*))\) (use [6, Prop.8.3.3]).

If \(r\ge d+1\), we have \({\text {In}}(g(\mathtt{x},0))={\text {In}}(f(\mathtt{x},0))\ne 0\) (so \(\omega (g(\mathtt{x},0))=d\)) for each \(g\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(f-g\in {{\mathfrak {m}}}_2^r\). For such a g there exists by Weierstrass preparation theorem a Weierstrass polynomial \(Q\in \kappa [[\mathtt{y}]][\mathtt{x}]\) and a unit \(V\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(g=QV\). In addition, \(V(0,0)\mathtt{x}^d={\text {In}}(g(\mathtt{x},0))={\text {In}}(f(\mathtt{x},0))=U(0,0)\mathtt{x}^d\), so \(c:=U(0,0)=V(0,0)\in \kappa {\setminus }\{0\}\). By [6, Prop.8.3.3] the roots \(\beta _1,\ldots ,\beta _d\) of Q in \(\overline{\kappa }((\mathtt{y}^*))\) belong to \(\overline{\kappa }[[\mathtt{y}^{1/(d!)}]]\). For each \(k\ge 1\) there exists by Lemma 2.9 an integer \(r:=r(k)\ge d+1\) such that if \(f-g\in {{\mathfrak {m}}}_2^r\), then \(P-Q,U-V\in {{\mathfrak {m}}}_2^k\). We will see that there exists k large enough such that the corresponding r(k) is the r sought in the statement.

By Lemma 2.10 if \(k\ge 1\) is large enough, the roots of Q suitably reordered satisfy \(\omega (\beta _j-\alpha _j)>m\) for each \(j=1,\ldots ,d\). If \(\zeta \in \overline{\kappa }[[\mathtt{y}^*]]\), then

$$\begin{aligned}&f(\zeta ,\mathtt{y})=U(\zeta ,\mathtt{y})\prod _{j=1}^d(\zeta -\alpha _j),\\&g(\zeta ,\mathtt{y})=V(\zeta ,\mathtt{y})\prod _{j=1}^d(\zeta -\beta _j). \end{aligned}$$

As \(\delta _j:=(\zeta -\alpha _j)-(\zeta -\beta _j)=\beta _j-\alpha _j\) and \(\omega (\beta _j-\alpha _j)>m\), the difference

$$\begin{aligned} P(\zeta ,\mathtt{y})-Q(\zeta ,\mathtt{y})=\prod _{j=1}^d(\zeta -\alpha _j) -\prod _{j=1}^d(\zeta -\beta _j)=\prod _{j=1}^d(\zeta -\beta _j+\delta _j)-\prod _{j=1}^d(\zeta -\beta _j) \end{aligned}$$

has order \(>m\). Write \(U:=c+h_1\), \(V:=c+h_2\) and \(U-V=h_3\) where each \(h_i\in {{\mathfrak {m}}}_2\). We have \(f-g=P(U-V)+V(P-Q)\), so

$$\begin{aligned}&f(\zeta ,\mathtt{y})=P(\zeta ,\mathtt{y})(c+h_1(\zeta ,\mathtt{y})),\\&f(\zeta ,\mathtt{y})-g(\zeta ,\mathtt{y})=P(\zeta ,\mathtt{y})h_3(\zeta ,\mathtt{y}) +(c+h_2(\zeta ,\mathtt{y}))(P(\zeta ,\mathtt{y})-Q(\zeta ,\mathtt{y})) \end{aligned}$$

and the latter series has order \(>\min \{\omega (f(\zeta ,\mathtt{y})),m\}\). In addition, if \(f=P\) and \(g=Q\), then \(h_3=0\) and \(\omega (f(\zeta ,\mathtt{y})-g(\zeta ,\mathtt{y}))>m\), as required. \(\square \)

2.5 Applications of curve selection lemma and Puiseux series

We recall here the following version of the curve selection lemma, which has relevant consequences for the prime cones of \({\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\). As usual we identify \({\text {Sper}}(\kappa )\) with the subspace of \({\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) consisting of all prime cones of \(\kappa [[\mathtt{x},\mathtt{y}]]\) with support \({{\mathfrak {m}}}_2\).

Lemma 2.12

(Curve selection lemma) Let \(\kappa \) be a (formally) real field and \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) a prime cone such that \(\mathtt{y}>_\beta 0\) and \(\dim (\kappa [[\mathtt{x},\mathtt{y}]]/{\text {supp}}(\beta ))=1\). Let \(\alpha \in {\text {Sper}}(\kappa )\) be such that \(\beta \rightarrow \alpha \) and let \(R(\alpha )\) be the real closure of \((\kappa ,\le _\alpha )\). Then there exists a homomorphism \(\phi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow R(\alpha )[[\mathtt{y}]]\) such that \(\phi (\mathtt{y})=\mathtt{y}^q\) for some \(q\ge 1\) and \(f\ge _\beta 0\) if and only if \(\phi (f)=f(\phi (\mathtt{x}),\mathtt{y}^q)\ge 0\). In addition, \(f\in {\text {supp}}(\beta )\) if and only if \(f(\phi (\mathtt{x}),\mathtt{y}^q)=0\).

Proof

As \(\mathrm{ht}({\text {supp}}(\beta ))=1\), we have \({\text {supp}}(\beta )\) is a principal prime ideal. Write \((P):={\text {supp}}(\beta )\) where \(P\in \kappa [[\mathtt{x},\mathtt{y}]]\) is irreducible. As \(\mathtt{y}\not \in {\text {supp}}(\beta )\), we have \(P(\mathtt{x},0)\ne 0\). By Weierstrass preparation theorem we may assume \(P\in \kappa [[\mathtt{y}]][\mathtt{x}]\) is a Weierstrass polynomial with respect to \(\mathtt{x}\). Thus,

$$\begin{aligned} \mathtt{j}:\kappa [[\mathtt{y}]]\hookrightarrow \kappa [[\mathtt{x},\mathtt{y}]]/{\text {supp}}(\beta ) \cong \kappa [[\mathtt{y}]][\mathtt{x}]/(P). \end{aligned}$$

Write \(\alpha _1:=\mathtt{j}^{-1}(\beta )\). By [1, Ex.II.3.13] the real closure of \((\kappa ((\mathtt{y})),\le _{\alpha _1})\) is \(R(\alpha )((\mathtt{y}^*))\). As \((\kappa ((\mathtt{y}))[\mathtt{x}]/(P),\le _\beta )\) is a finite algebraic extension of \((\kappa ((\mathtt{y})),\le _{\alpha _1})\) and \(\alpha _1=\mathtt{j}^{-1}(\beta )\), we deduce \(\varphi :\kappa ((\mathtt{y}))[\mathtt{x}]/(P)\hookrightarrow R(\alpha )((\mathtt{y}^*))\). As \(P\in \kappa [[\mathtt{y}]][\mathtt{x}]\) is a monic polynomial, there exist \(\zeta \in R(\alpha )[[\mathtt{y}]]\) and \(q\ge 1\) such that \(\varphi (\mathtt{x})=\zeta (\mathtt{y}^{1/q})\). Define \(\phi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow R(\alpha ),\ f\mapsto f(\zeta ,\mathtt{y}^q)\) and observe that \(f\in \kappa [[\mathtt{x},\mathtt{y}]]\) satisfies \(f\ge _\beta 0\) if and only if \(\phi (f)\ge 0\), as required. \(\square \)

Corollary 2.13

Let \(f\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(n\ge 1\). Let \(C\subset {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) and assume \(f\ge _\beta 0\) for each \(\beta \in C\) with \(\mathrm{ht}({\text {supp}}(\beta ))=1\). We have:

  1. (i)

    There exists \(r\ge 1\) and \(M\in \kappa {\setminus }\{0\}\) such that if \(g\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(f-g\in {{\mathfrak {m}}}_2^r\), then \(g+M^2(\mathtt{x}^2+\mathtt{y}^2)^n>_\beta 0\) for each \(\beta \in C\) with \(\mathrm{ht}({\text {supp}}(\beta ))=1\).

  2. (ii)

    If in addition \(f(\mathtt{x},0)\ne 0\), there exists \(r\ge 1\) and \(M\in \kappa {\setminus }\{0\}\) such that if \(f-g\in {{\mathfrak {m}}}_2^r\), then \(g+M^2\mathtt{y}^{2n}>_\beta 0\) for each \(\beta \in C\) with \(\mathrm{ht}({\text {supp}}(\beta ))=1\).

Proof

We prove both statements simultaneously. Let \(\beta \in C\) with \(\mathrm{ht}({\text {supp}}(\beta ))=1\). We distinguish two cases:

Case 1. If \(\mathtt{y}\in {\text {supp}}(\beta )\), then \({\text {supp}}(\beta )=(\mathtt{y})\) and \(f\ge _\beta 0\) if and only if \(f(\mathtt{x},0)\ge _\beta 0\). Assume first \(f(\mathtt{x},0)=0\) and let \(r\ge 2n+1\). Set \(h:=g+M^2(\mathtt{x}^2+\mathtt{y}^2)^n\) and observe that \(h(\mathtt{x},0)=M^2\mathtt{x}^{2n}u^2\) for some unit \(u\in \kappa [[\mathtt{x}]]\) such that \(u(0)=1\). Thus, \(h+{\text {supp}}(\beta )=h(\mathtt{x},0)+{\text {supp}}(\beta )>0\).

Assume next \(f(\mathtt{x},0)\ne 0\) and write \(f(\mathtt{x},0)=a\mathtt{x}^\ell u^2\) where \(\ell \ge 0\), \(a\in \kappa {\setminus }\{0\}\) and \(u\in \kappa [[\mathtt{x}]]\) is a unit such that \(u(0)=1\). If \(f-g\in {{\mathfrak {m}}}_2^{\ell +1}\), then \(g(\mathtt{x},0)=a\mathtt{x}^\ell v^2\) where \(v\in \kappa [[\mathtt{x}]]\) is a unit such that \(v(0)=1\). Thus,

$$\begin{aligned}&g+M^2\mathtt{y}^{2n}+{\text {supp}}(\beta )=g(\mathtt{x},0)+{\text {supp}}(\beta )=f(\mathtt{x},0)\frac{v^2}{u^2} +{\text {supp}}(\beta )>0,\\&g+M^2(\mathtt{x}^2+\mathtt{y}^2)^n+{\text {supp}}(\beta )=g(\mathtt{x},0)+M^2\mathtt{x}^{2n}+{\text {supp}}(\beta )\\&\qquad =f(\mathtt{x},0)\frac{v^2}{u^2}+M^2\mathtt{x}^{2n}+{\text {supp}}(\beta )>0. \end{aligned}$$

By Lemma 2.11 there exists (maybe a larger) \(r\ge 1\) such that if \(f-g\in {{\mathfrak {m}}}_2^r\), then \(\omega (f(\zeta ,\mathtt{y})-g(\zeta ,\mathtt{y}))>\min \{\omega (f(\zeta ,\mathtt{y})),2n+1 +\omega (f(\mathtt{x},0))\}\) for each \(\zeta \in \overline{\kappa }[[\mathtt{y}^*]]\).

Case 2. Assume next \(\mathtt{y}\not \in {\text {supp}}(\beta )\) (without loss of generality we may assume that \(\mathtt{y}>_{\beta }0\)). Let \(\alpha \in {\text {Sper}}(\kappa )\) be such that \(\beta \rightarrow \alpha \) and let \(R(\alpha )\) be the real closure of \((\kappa ,\le _\alpha )\). By Lemma 2.12 there exists a homomorphism \(\phi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow R(\alpha )[[\mathtt{y}]]\) such that \(\phi (\mathtt{y})=\mathtt{y}^q\) for some \(q\ge 1\) and \(h\ge _\beta 0\) if and only if \(\phi (h)\ge 0\). Write \(\xi :=\varphi (\mathtt{x})\in R(\alpha )[[\mathtt{y}]]\) and \(\zeta :=\xi (\mathtt{y}^{1/q})\in R(\alpha )[[\mathtt{y}^{1/q}]]\). Consider the homomorphism

$$\begin{aligned} \psi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow R(\alpha )[[\mathtt{y}^{1/q}]],\ h\mapsto h(\zeta ,\mathtt{y}) \end{aligned}$$

and observe that \(h\ge _\beta 0\) if and only if \(\psi (h)\ge 0\). Denote

$$\begin{aligned} s:= & {} \omega (f(\zeta ,\mathtt{y})-g(\zeta ,\mathtt{y}))>\min \{\omega (f(\zeta ,\mathtt{y})),2n+1 +\omega (f(\mathtt{x},0))\}\\\ge & {} \min \{\omega (f(\zeta ,\mathtt{y})),2n+1\} \end{aligned}$$

and \(\theta :=\frac{g(\zeta ,\mathtt{y})-f(\zeta ,\mathtt{y})}{\mathtt{y}^s}\in \kappa [[\mathtt{y}^{1/q}]]\) in case \(f(\zeta ,\mathtt{y})-g(\zeta ,\mathtt{y})\ne 0\) and \(s:=2n+1\) and \(\theta :=0\) otherwise. As \(f\ge _\beta 0\), we have

$$\begin{aligned} g(\zeta ,\mathtt{y})+M^2\mathtt{y}^{2n}&=f(\zeta ,\mathtt{y})+(g(\zeta ,\mathtt{y})-f(\zeta ,\mathtt{y}))+M^2\mathtt{y}^{2n}\\&={\left\{ \begin{array}{ll} M^2\mathtt{y}^{2n}+\mathtt{y}^s\theta>0&{}\text {if }f(\zeta ,\mathtt{y})=0,\\ f(\zeta ,\mathtt{y})+M^2\mathtt{y}^{2n}+\mathtt{y}^s\theta>0&{}\text {if }f(\zeta ,\mathtt{y})\ne 0, \end{array}\right. }\\ g(\zeta ,\mathtt{y})+M^2(\zeta ^2+\mathtt{y}^2)^n&=f(\zeta ,\mathtt{y})+(g(\zeta ,\mathtt{y})-f(\zeta ,\mathtt{y})) +M^2(\zeta ^2+\mathtt{y}^2)^n\\&={\left\{ \begin{array}{ll} M^2(\zeta ^2+\mathtt{y}^2)^n+\mathtt{y}^s\theta>0&{}\text {if }f(\zeta ,\mathtt{y})=0,\\ f(\zeta ,\mathtt{y})+M^2(\zeta ^2+\mathtt{y}^2)^n+\mathtt{y}^s\theta >0&{}\text {if } f(\zeta ,\mathtt{y})\ne 0, \end{array}\right. } \end{aligned}$$

so \(g+M^2\mathtt{y}^{2n}>_\beta 0\) and \(g+M^2(\mathtt{x}^2+\mathtt{y}^2)^n>_\beta 0\), as required. \(\square \)

If we set

$$\begin{aligned} {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]]):=\{f\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]):\ f>_\alpha 0\ \forall \alpha \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]]),\ {\text {supp}}(\alpha )\ne {{\mathfrak {m}}}_2\}, \end{aligned}$$

we obtain the following result.

Corollary 2.14

Let \(f\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\). There exists \(r\ge 1\) such that if \(g\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(f-g\in {{\mathfrak {m}}}_2^r\), then \(g\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\).

Proof

As \(f\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\), we have \(f(\mathtt{x},0)\ne 0\). By Weierstrass preparation theorem there exists a Weierstrass polynomial \(P\in \kappa [[\mathtt{y}]][\mathtt{x}]\) of degree d, \(c\in \kappa {\setminus }\{0\}\) and a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(f=cPU^2\) and \(U(0,0)=1\). A straightforward argument shows that \(c\in {\Sigma {\kappa }^2}\) and \(d=2k\) is even. If \(P=1\) (that is, \(d=0\)), it is enough to take \(r=2\). So let us assume \(d\ge 2\) and observe that \(P\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\).

Let \(\overline{\kappa }\) be the algebraic closure of \(\kappa \) and \(\xi \in \overline{\kappa }[[\mathtt{y}^{1/p}]]\) (where \(p=d!\)) a root of P. Write \(\xi :=\sum _{\ell \ge 0}a_\ell \mathtt{y}^{\ell /p}\in \overline{\kappa }[[\mathtt{y}^{1/p}]]\). Denote \(L_\xi :=\kappa [a_\ell :\ \ell \ge 0]\). By [10, Thm.2.2] the extension \(L_\xi |\kappa \) is finite. As \(P\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\), we deduce from Lemma 2.12 that \(\xi \not \in R(\alpha )[[\mathtt{y}^*]]\) for each \(\alpha \in {\text {Sper}}(\kappa )\). Thus, \(L_\xi \) is not a (formally) real field. As \(L_\xi |\kappa \) is finite, there exists \(m_\xi \) such that \(L_\xi =\kappa [a_0,\ldots ,a_{m_\xi }]\). Consequently, each series \(\zeta \in \overline{\kappa }[[\mathtt{y}^{1/p}]]\) such that \(\omega (\zeta -\xi )>m_\xi \) satisfies \(\zeta \not \in R(\alpha )[[\mathtt{y}^*]]\) for each \(\alpha \in {\text {Sper}}(\kappa )\).

Let \(\xi _1,\ldots ,\xi _d\in \overline{\kappa }[[\mathtt{y}^{1/p}]]\) be the roots of P and set \(m:=\max \{m_{\xi _k}:\ k=1,\ldots ,d\}+1\). By Lemmas 2.9 and 2.10 there exists \(r\ge d+1\) such that if \(f-g\in {{\mathfrak {m}}}_2^r\) and we write \(g=cQV^2\) where \(Q:=(\mathtt{x}-\theta _1)\cdots (\mathtt{x}-\theta _d)\in \kappa [[\mathtt{y}]][\mathtt{x}]\) is a Weierstrass polynomial, \(V\in \kappa [[\mathtt{x},\mathtt{y}]]\) is a unit with \(V(0,0)=1\) and \(\theta _1,\ldots ,\theta _d\in \overline{\kappa }[[\mathtt{y}^{1/p}]]\) are the roots of Q in \(\overline{\kappa }((\mathtt{y}^*))\), then (after reordering the roots \(\theta _k\) if necessary) \(\omega (\xi _k-\theta _k)\ge m\) for each \(k=1,\ldots ,d\). Thus, the roots of Q do not belong to \(R(\alpha )[[\mathtt{y}^*]]\) for each \(\alpha \in {\text {Sper}}(\kappa )\). In addition, the involution

$$\begin{aligned} \sigma _\alpha :R(\alpha )[\sqrt{-1}][[\mathtt{y}^{1/p}]]\rightarrow R(\alpha )[\sqrt{-1}][[\mathtt{y}^{1/p}]],\ \lambda +\sqrt{-1}\mu \mapsto \lambda -\sqrt{-1}\mu \end{aligned}$$

satisfies: if \(\eta \in R(\alpha )[\sqrt{-1}][[\mathtt{y}^{1/p}]]\) is a root of Q, then \(\sigma _\alpha (\eta )\) is also a root of Q of the same multiplicity.

Consequently, for each \(\alpha \in {\text {Sper}}(\kappa )\) we deduce \(Q\in {\Sigma _2{(R(\alpha )[[\mathtt{y}^{1/p}]][\mathtt{x}])}^2}\). By Lemma 2.12 we deduce that \(Q>_\beta 0\) for each \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) with \(\mathrm{ht}({\text {supp}}(\beta ))=1\). By [1, Prop.VII.5.1] we conclude \(Q>_\beta 0\) for each \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that \({\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\). As \(Q\in {{\mathfrak {m}}}_2\), we conclude \(Q\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\), so also \(g=cQV^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\), as required. \(\square \)

3 List of candidates

The purpose of this section is to prove Theorem 1.5. This will be conducted in several steps after some preliminary preparation. Denote \(\mathtt{x}:=(\mathtt{x}_1,\ldots ,\mathtt{x}_n)\) and \(\Vert \mathtt{x}\Vert ^2:=\mathtt{x}_1^2+\cdots +\mathtt{x}_n^2\).

Lemma 3.1

Let \(\kappa \) be a (formally) real field and \(f\in \kappa [[\mathtt{x}]]\) a series of order \(\ge 2s\). Then there exists \(M\in {\Sigma {\kappa }^2}\) such that \(M^2\Vert \mathtt{x}\Vert ^{2s}-f\in {{\mathcal {P}}}(\kappa [[\mathtt{x}]])\).

Proof

As \(\omega (f)\ge 2s\), we can write \(f=\sum _{|\nu |=2s}b_\nu (\mathtt{x})\mathtt{x}^{\nu }\). Observe that \(b_\nu (0)^2+1-b_\nu \in {\Sigma {\kappa [[\mathtt{x}]]}^2}\) for each \(\nu \), because the initial coefficient \(b_\nu (0)^2+1-b_\nu (0)=(b_\nu (0)-\frac{1}{2})^2+3\frac{1}{2^2} \in {\Sigma {\kappa }^2}\). In addition,

$$\begin{aligned} \Vert \mathtt{x}\Vert ^2-\mathtt{x}_i\mathtt{x}_j=\sum _{k\ne i,j}\mathtt{x}_k^2+\Big (\mathtt{x}_i-\frac{\mathtt{x}_j}{2}\Big )^2+3\Big (\frac{\mathtt{x}_j}{2} \Big )^2\in {\Sigma {\kappa [[\mathtt{x}]]}^2} \end{aligned}$$

for each \(1\le i,j\le n\). Let \(\mathtt{x}^\nu \) be a monomial such that \(|\nu |=2s\). Write

$$\begin{aligned} \mathtt{x}^\nu =\prod _{(i,j)\in \Lambda }\mathtt{x}_i\mathtt{x}_j \end{aligned}$$

where \(\#\Lambda =s\) and \(1\le i,j\le n\). As \(\Vert \mathtt{x}\Vert ^2-\mathtt{x}_i\mathtt{x}_j\in {{\mathcal {P}}}(\kappa [[\mathtt{x}]])\), we deduce

$$\begin{aligned} \Vert \mathtt{x}\Vert ^{2s}-\mathtt{x}^\nu =\Vert \mathtt{x}\Vert ^{2s}-\prod _{(i,j)\in \Lambda }\mathtt{x}_i\mathtt{x}_j\ge _\alpha 0 \end{aligned}$$

for each \(\alpha \in {\text {Sper}}(\kappa [[\mathtt{x}]])\), so \(\Vert \mathtt{x}\Vert ^{2s}-\mathtt{x}^\nu \in {{\mathcal {P}}}(\kappa [[\mathtt{x}]])\) for each \(\nu \) with \(|\nu |=2s\). Thus,

$$\begin{aligned} (b_\nu (0)^2+1)\Vert \mathtt{x}\Vert ^{2s}-b_\nu (\mathtt{x})\mathtt{x}^\nu \in {{\mathcal {P}}}(\kappa [[\mathtt{x}]]) \end{aligned}$$

for each \(\nu \) satisfying \(|\nu |=2s\). Consequently,

$$\begin{aligned} \sum _{|\nu |=2s}(b_\nu (0)^2+1)\Vert \mathtt{x}\Vert ^{2s}-f\in {{\mathcal {P}}}(\kappa [[\mathtt{x}]]). \end{aligned}$$

If we set \(M:=\sum _{|\nu |=2s}(b_\nu (0)^2+1)\), we obtain \(M^2\Vert \mathtt{x}\Vert ^{2s}-f\in {{\mathcal {P}}}(\kappa [[\mathtt{x}]])\), as required. \(\square \)

Given an ideal \({{\mathfrak {a}}}\subset \kappa [[\mathtt{x}]]\), we denote the minimal order of a series in \({{\mathfrak {a}}}\) with \(\omega ({{\mathfrak {a}}})\).

Lemma 3.2

Let \(\kappa \) be a (formally) real field and \(A:=\kappa [[\mathtt{x}]]/{{\mathfrak {a}}}\) a formal ring such that \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). Then \(\omega ({{\mathfrak {a}}})=2\).

Proof

Let \(F\in {{\mathfrak {a}}}\) be a series of order \(r>0\). Set \(\mathtt{x}':=(\mathtt{x}_1,\ldots ,\mathtt{x}_{n-1})\) and \(\Vert \mathtt{x}'\Vert ^2:=\mathtt{x}_1^2+\cdots +\mathtt{x}_{n-1}^2\). After a linear change of coordinates, we may assume by Weierstrass preparation theorem

$$\begin{aligned} F:=\mathtt{x}_n^r+a_{r-1}\mathtt{x}_n^{r-1}+\cdots +a_1\mathtt{x}_n+a_0, \end{aligned}$$

where \(a_j\in \kappa [[\mathtt{x}']]\) and \(\omega (a_j)\ge r-j\) for \(0\le j\le r-1\).

[3.i]. We claim: There exists \(N\in {\Sigma {\kappa }^2}\) such that \(N^2\Vert \mathtt{x}'\Vert ^{2(r-j)}-a_j^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x}']])\) for each \(0\le j\le r-1\).

As \(\omega (a_j^2)\ge 2(r-j)\), there exists by Lemma 3.1\(M_j\in {\Sigma {\kappa }^2}\) such that \(M_j\Vert \mathtt{x}'\Vert ^{2(r-j)}-a_j^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x}']])\). Denote \(M:=M_0+\cdots +M_{r-1}\) and \(N:=M+1\). Observe that \(N^2-M_j=(M+1)^2-M_j=M^2+M+(M-M_j)+1\in {\Sigma {\kappa }^2}\) for each \(0\le j\le r-1\). Thus, \(N^2\Vert \mathtt{x}'\Vert ^{2(r-j)}-a_j^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x}']])\) for each \(0\le j\le r-1\), as claimed.

[3.ii]. Let us prove: The quadratic form \(q:=(N^2r^2+1)^2\Vert \mathtt{x}'\Vert ^2-\mathtt{x}_n^2\in {{\mathcal {P}}}(A)\).

Otherwise, there exists a prime cone \(\beta \in {\text {Sper}}(A)\) such that \(q<_\beta 0\). In particular, \(\mathtt{x}_n\not \in {\text {supp}}(\beta )\) and \(\Vert \mathtt{x}'\Vert ^2<_\beta \frac{1}{(N^2r^2+1)^2}\mathtt{x}_n^2\). As A is a henselian ring, \(\beta \) induces by [1, Prop.II.2.4] an ordering \(\alpha \in {\text {Sper}}(\kappa )\) such that \(\beta \rightarrow \alpha \). Consider the absolute value associated to \(\beta \):

$$\begin{aligned} |\,.\,|_{\beta }:A\rightarrow A,\ a\mapsto {\left\{ \begin{array}{ll} a&{}\text {if }a\ge _\beta 0,\\ -a&{}\text {if }a<_\beta 0. \end{array}\right. } \end{aligned}$$

By claim [3.i] we obtain

$$\begin{aligned} a_j^2\le _\beta N^2\Vert \mathtt{x}'\Vert ^{2(r-j)}<_\beta \frac{N^2}{(N^2r^2+1)^{2(r-j)}} \mathtt{x}_n^{2(r-j)}\quad \leadsto \quad |a_j|_\beta <_\beta \frac{N}{(N^2r^2+1)^{r-j}}|\mathtt{x}_n|_\beta ^{r-j}, \end{aligned}$$

for \(0\le j\le r-1\). As the Weierstrass polynomial \(F\in {{\mathfrak {a}}}\), it holds \(F\in {\text {supp}}(\beta )\). Hence,

$$\begin{aligned} \begin{aligned} \mathtt{x}_n^{2r}&=\Big (\sum _{j=0}^{r-1}a_j(\mathtt{x}')\mathtt{x}_n^j\Big )^2 =\sum _{j,k=0}^{r-1}a_j(\mathtt{x}')a_k(\mathtt{x}')\mathtt{x}_n^{j+k}\\&\le _\beta \sum _{j,k=0}^{r-1}|a_j(\mathtt{x}')|_{\beta } |a_k(\mathtt{x}')|_{\beta }|\mathtt{x}_n|_{\beta }^{j+k}\le _\beta N^2 \sum _{j,k=0}^{r-1}\frac{1}{(N^2r^2+1)^{2r-j-k}}|\mathtt{x}_n|_{\beta }^{2r-j-k}| \mathtt{x}_n|_\beta ^{j+k}\\&<_\beta N^2\sum _{j,k=0}^{r-1}\frac{|\mathtt{x}_n|_\beta ^{2r}}{(N^2r^2+1)^{2r-j-k}}<_\beta \mathtt{x}_n^{2r}\sum _{j,k=0}^{r-1}\frac{N^2}{N^2r^2+1}\\&=\mathtt{x}_n^{2r}\frac{N^2r^2}{N^2r^2+1}. \end{aligned} \end{aligned}$$

As \(x_n^{2r}>_\beta 0\), we deduce \(1<_\beta \frac{N^2r^2}{N^2r^2+1}\), which is a contradiction.

[3.iii]. We claim: \(q\in {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\) if \(\omega ({{\mathfrak {a}}})\ge 3\).

Otherwise, \(q\in {\Sigma {A}^2}\), so \(q=h_1^2+\cdots +h_s^2+h\) for some \(h_i\in \kappa [[\mathtt{x}]]\) and \(h\in {{\mathfrak {a}}}\) satisfying \(\omega (h)\ge 3\). Comparing initial forms in the previous expression, we find homogeneous polynomials \(a_1,\ldots ,a_r\in \kappa [\mathtt{x}]\) such that \(q=a_1^2+\cdots +a_r^2\), which is impossible because \(\kappa \) is a (formally) real field and \(-1\) is not a sum of squares in \(\kappa \).

We conclude: \(\omega ({{\mathfrak {a}}})\le 2\), as required. \(\square \)

Corollary 3.3

Let \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\varphi )\) where \(\varphi \in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) and \(\kappa \) is a (formally) real field. Assume \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). Then A is isomorphic to either \(\kappa [[\mathtt{x},\mathtt{y}]]\) or \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(-F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is not a sum of squares and \(\omega (F)\ge 2\).

Proof

By Lemma 3.2 we have \(\omega (\varphi )\le 2\). After a linear change of coordinates we may assume (by Weierstrass preparation theorem) either \(\varphi =\mathtt{z}+a(\mathtt{x},\mathtt{y})\) with \(\omega (a)\ge 1\) or \(\varphi =\mathtt{z}^2+2a_1(\mathtt{x},\mathtt{y})+a_2(\mathtt{x},\mathtt{y})=(\mathtt{z}+a_1(\mathtt{x},\mathtt{y}))^2+(a_2(\mathtt{x},\mathtt{y})-a_1(\mathtt{x},\mathtt{y})^2)\) where \(\omega (a_k)\ge k\). After the change of coordinates \(\mathtt{z}_1:=\mathtt{z}+a(\mathtt{x},\mathtt{y})\) in the first case and \(\mathtt{z}_1:=\mathtt{z}+a_1(\mathtt{x},\mathtt{y})\) in the second, we may assume \(\varphi =\mathtt{z}\) in the first case and \(\varphi =\mathtt{z}^2-F(\mathtt{x},\mathtt{y})\) where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) has order \(\ge 2\) in the second. As \(\kappa \) is a (formally) real field, \({\text {Sper}}(A)\ne \varnothing \). By [35, Lem.6.3] A is a real (reduced) ring, so \(-F\not \in {\Sigma {\kappa [[\mathtt{x},\mathtt{y}]]}^2}\), as required. \(\square \)

In order to prove Theorem 1.5 let us find certain order restrictions for the series \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that the ring \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) has the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). Beforehand we need to characterize the positive semidefinite elements of A.

3.1 Characterization of positive semidefinite elements.

Let \(F\in {{\mathfrak {m}}}_2\subset \kappa [[\mathtt{x},\mathtt{y}]]\) where \(\kappa \) is a (formally) real field and let \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\). The ring A is a rank 2 free module over \(\kappa [[\mathtt{x},\mathtt{y}]]\). This means that the elements of A are uniquely represented in the form \(f+\mathtt{z}g\) where \(f,g\in \kappa [[\mathtt{x},\mathtt{y}]]\). The elements of A are operated using the relation \(\mathtt{z}^2=F(\mathtt{x},\mathtt{y})\). Consider the inclusion \(\mathtt{i}:\kappa [[\mathtt{x},\mathtt{y}]]\hookrightarrow A\). Denote

$$\begin{aligned} {{\mathcal {P}}}(\{F\ge 0\}):=\{f\in \kappa [[\mathtt{x},\mathtt{y}]]:\ f\ge _\alpha 0,\ \forall \alpha \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\text { with }F\ge _\alpha 0\}, \end{aligned}$$

the maximal ideal of \(\kappa [[\mathtt{x},\mathtt{y}]]\) with \({{\mathfrak {m}}}_2\) and the maximal ideal of A with \({{\mathfrak {m}}}_A\).

Lemma 3.4

Let \(\alpha \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) and let \({\text {Sper}}(\mathtt{i}):{\text {Sper}}(A)\rightarrow {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) be the real spectral map associated to \(\mathtt{i}\). There exists a prime cone \(\beta \in {\text {Sper}}(A)\) such that \({\text {Sper}}(\mathtt{i})(\beta )=\alpha \) if and only if \(F\ge _\alpha 0\). In addition, \({\text {supp}}(\beta )={{\mathfrak {m}}}_A\) if and only if \({\text {supp}}(\alpha )={{\mathfrak {m}}}_2\).

Proof

Let \(\alpha \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) and \(R(\alpha )\) be the real closure of the ordered field

$$\begin{aligned} (K(\alpha ):={\text {qf}}(\kappa [[\mathtt{x},\mathtt{y}]]/{\text {supp}}(\alpha )),\le _\alpha ). \end{aligned}$$

Suppose there exists \(\beta \in {\text {Sper}}(A)\) such that \({\text {Sper}}(\mathtt{i})(\beta )=\alpha \). Then \(F=\mathtt{z}^2\ge _\beta 0\) in A implies \(F\ge _\alpha 0\). If \({\text {supp}}(\beta )={{\mathfrak {m}}}_A\), then \({\text {supp}}(\alpha )={\text {supp}}(\beta )\cap \kappa [[\mathtt{x},\mathtt{y}]] ={{\mathfrak {m}}}_A\cap \kappa [[\mathtt{x},\mathtt{y}]={{\mathfrak {m}}}_2\).

Suppose conversely that \(F\ge _\alpha 0\). Define \({{\mathfrak {a}}}:=({\text {supp}}(\alpha ),\mathtt{z}^2-F)/(\mathtt{z}^2-F)\). Then

$$\begin{aligned} \begin{aligned} A\rightarrow A/{{\mathfrak {a}}}&\cong \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/({\text {supp}}(\alpha ),\mathtt{z}^2-F) \cong \kappa [[\mathtt{x},\mathtt{y}]][\mathtt{z}]/({\text {supp}}(\alpha ),\mathtt{z}^2-F)\\&\cong (\kappa [[\mathtt{x},\mathtt{y}]]/{\text {supp}}(\alpha ))[\mathtt{z}]/(\mathtt{z}^2-F+{\text {supp}}(\alpha ))\\&\hookrightarrow K(\alpha )[\mathtt{z}]/(\mathtt{z}^2-F+{\text {supp}}(\alpha )). \end{aligned} \end{aligned}$$

As \(F\ge _\alpha 0\), the polynomial \(\mathtt{z}^2-F\) has two roots in \(R(\alpha )\). Let \(\xi \in R(\alpha )\) be one of them and consider the evaluation homomorphism \(K(\alpha )[\mathtt{z}]/(\mathtt{z}^2-F+{\text {supp}}(\alpha ))\rightarrow R(\alpha ),\ P\mapsto P(\xi )\). Thus, we have a homomorphism \(A\rightarrow R(\alpha )\) and the inverse image of the set of non-negative elements of \(R(\alpha )\) defines a prime cone \(\beta \in {\text {Sper}}(A)\) such that \({\text {Sper}}(\mathtt{i})(\beta )=\alpha \). If \({\text {supp}}(\alpha )={{\mathfrak {m}}}_2\) and \({\text {Sper}}(\mathtt{i})(\beta )=\alpha \), then \((\mathtt{z}^2,{{\mathfrak {m}}}_2)=(\mathtt{z}^2-F,{{\mathfrak {m}}}_2)\subset {\text {supp}}(\beta )\). As \({\text {supp}}(\beta )\) is prime, we deduce \(\mathtt{z}\in {\text {supp}}(\beta )\) and \({\text {supp}}(\beta )={{\mathfrak {m}}}_A\), as required. \(\square \)

Corollary 3.5

An element \(f+\mathtt{z}g\in A\) (where \(f,g\in \kappa [[\mathtt{x},\mathtt{y}]]\)) belongs to \({{\mathcal {P}}}(A)\) if and only if \(f\in {{\mathcal {P}}}(\{F\ge 0\})\) and \(f^2-Fg^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\).

Proof

Consider the involution \(\sigma :A\rightarrow A,\ f+\mathtt{z}g\mapsto f-\mathtt{z}g\). Thus, \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) if and only if \(f-\mathtt{z}g\in {{\mathcal {P}}}(A)\). These two elements are both positive semidefinite in A if and only if \(2f=(f+\mathtt{z}g)+(f-\mathtt{z}g)\) and \(f^2-Fg^2=(f+\mathtt{z}g)(f-\mathtt{z}g)\) are positive semidefinite in A. As \(f,f^2-Fg^2\in \kappa [[\mathtt{x},\mathtt{y}]]\), we know by Lemma 3.4 that \(f,f^2-Fg^2\in {{\mathcal {P}}}(A)\) if and only if \(f,f^2-Fg^2\in {{\mathcal {P}}}(\{F\ge 0\})\). Let \(\alpha \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) be such that \(F<_\alpha 0\), so \(-F>_\alpha 0\) and \(f^2-Fg^2\ge _\alpha 0\). Thus, \(f^2-Fg^2\in {{\mathcal {P}}}(\{F\ge 0\})\) if and only if \(f^2-Fg^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). Consequently, the statement follows. \(\square \)

3.2 Proof of Theorem 1.5

After this preliminary work, we prove Theorem 1.5 in several steps. Let \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(\kappa \) is a (formally) real field and \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\). Denote the maximal ideal of \(\kappa [[\mathtt{x},\mathtt{y}]]\) with \({{\mathfrak {m}}}_2\).

Lemma 3.6

(General restriction) If \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), then \(\omega (F)\le 3\).

Proof

Assume \(\omega (F)\ge 4\). By Lemma 3.1 (applied for \(s=2\)) there exists \(M\in {\Sigma {\kappa }^2}\) such that \(M^2(\mathtt{x}^2+\mathtt{y}^2)^2-F\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). As \(M(\mathtt{x}^2+\mathtt{y}^2)\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\subset {{\mathcal {P}}}(\{F\ge 0\})\), we deduce \(\varphi :=M(\mathtt{x}^2+\mathtt{y}^2)+\mathtt{z}\in {{\mathcal {P}}}(A)={\Sigma {A}^2}\). Thus, there exist \(a_1,\ldots ,a_r,b\in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) such that

$$\begin{aligned} \varphi =M(\mathtt{x}^2+\mathtt{y}^2)+\mathtt{z}=a_1^2+\ldots +a_r^2+(\mathtt{z}^2-F)b. \end{aligned}$$

Comparing orders we conclude \(1=\omega (M(\mathtt{x}^2+\mathtt{y}^2)+\mathtt{z})=\omega (a_1^2+\ldots +a_r^2+(\mathtt{z}^2-F)b)\), which is a contradiction, so \(\omega (F)\le 3\), as required. \(\square \)

Lemma 3.7

(Order 2 restrictions) If \(\omega (F)=2\) and \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), then F is right equivalent to one of the following:

  1. (i)

    \(a\mathtt{x}^2\) where \(a\not \in -{\Sigma {\kappa }^2}\).

  2. (ii)

    \(a\mathtt{x}^2+\mathtt{y}^{2k+1}\) where \(a\not \in -{\Sigma {\kappa }^2}\) and \(k\ge 1\).

  3. (iii)

    \(a\mathtt{x}^2+b\mathtt{y}^{2k}\) where \(a\not \in -{\Sigma {\kappa }^2}\), \(b\ne 0\) and \(k\ge 1\).

Proof

After a linear change of coordinates, we may assume (by Weierstrass preparation theorem) that there exist \(a\in \kappa {\setminus }\{0\}\), a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(U(0,0)=1\) and a Weierstrass polynomial \(P:=\mathtt{x}^2+2a_1(\mathtt{y})\mathtt{x}+a_2(\mathtt{y})\in \kappa [[\mathtt{y}]][\mathtt{x}]\) of degree 2 (with \(\omega (a_1)\ge 1\) and \(\omega (a_2)\ge 2\)) such that

$$\begin{aligned} F=a(\mathtt{x}^2+2a_1\mathtt{x}+a_2)U^2=a((\mathtt{x}+a_1)^2+a_2-a_1^2)U^2. \end{aligned}$$

After the change of coordinates \((\mathtt{x},\mathtt{y},\mathtt{z})\mapsto (\mathtt{x}-a_1,\mathtt{y},\mathtt{z}U)\), we may assume

$$\begin{aligned} F=a\mathtt{x}^2+\psi (\mathtt{y}) \end{aligned}$$

where \(\omega (\psi )\ge 2\). If \(\psi =0\), then \(F=a\mathtt{x}^2\). Otherwise, write \(\psi =b\mathtt{y}^\ell u^\ell \) where \(b\in \kappa {\setminus }\{0\}\) and \(u\in \kappa [[\mathtt{y}]]\) is a unit such that \(u(0)=1\). After the change of coordinates \((\mathtt{x},\mathtt{y},\mathtt{z})\mapsto (\mathtt{x},\frac{\mathtt{y}}{u},\mathtt{z}U)\), we may assume

$$\begin{aligned} F=a\mathtt{x}^2+b\mathtt{y}^\ell \end{aligned}$$

where \(a,b\in \kappa {\setminus }\{0\}\). If \(\ell =2k+1\) is odd (where \(k\ge 1\)), after the change of coordinates \((\mathtt{x},\mathtt{y},\mathtt{z})\mapsto (b^{k+1}\mathtt{x},b\mathtt{y},b^{k+1}\mathtt{z})\) we can suppose \(F=a\mathtt{x}^2+\mathtt{y}^{2k+1}\). Let us explain now the restrictions concerning the coefficients \(a,b\in \kappa {\setminus }\{0\}\) in the statement:

Case 1. If \(F=a\mathtt{x}^2\) and \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), then \(a\not \in -{\Sigma {\kappa }^2}\) by [35, Lem.6.3].

Case 2. If \(F=a\mathtt{x}^2+b\mathtt{y}^2\) and \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), then either a or \(b\not \in -{\Sigma {\kappa }^2}\) by [35, Lem.6.3]. Interchanging \(\mathtt{x}\) and \(\mathtt{y}\), we may assume \(a\not \in -{\Sigma {\kappa }^2}\).

Case 3. If \(F=a\mathtt{x}^2+\mathtt{y}^{2k+1}\) (where \(k\ge 1\)) and \(a\in -{\Sigma {\kappa }^2}\), then \(\mathtt{y}\in {{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2}\subset {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\).

Case 4. If \(F=a\mathtt{x}^2+b\mathtt{y}^{2k}\) (where \(k\ge 2\)) and \(a\in -{\Sigma {\kappa }^2}\), let us find \(\varphi \in {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\). We get

$$\begin{aligned} (b^2+1)^2-b=b^4+b^2+\Big (b-\frac{1}{2}\Big )^2+\frac{3}{4}\in {\Sigma {\kappa }^2}. \end{aligned}$$
(3.1)

Set \(a:=-\sum _{i=1}^qa_i^2\) where \(a_i\in \kappa {\setminus }\{0\}\).

Assume first that k is even. Then

$$\begin{aligned} (b^2+1)^2\mathtt{y}^{2k}-a_1^2\mathtt{x}^2&=((b^2+1)^2-b)\mathtt{y}^{2k} +\sum _{k=2}^qa_k^2\mathtt{x}^2+(a\mathtt{x}^2+b\mathtt{y}^{2k})\\&=((b^2+1)^2-b)\mathtt{y}^{2k}\\&\qquad +\sum _{k=2}^qa_k^2\mathtt{x}^2+\mathtt{z}^2\in {{\mathcal {P}}}(A) \cap \kappa [[\mathtt{x},\mathtt{y}]]={{\mathcal {P}}}(\{F\ge 0\}),\\ (b^2+1)\mathtt{y}^k&\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\subset {{\mathcal {P}}}(\{F\ge 0\}). \end{aligned}$$

Thus, \(\varphi :=(b^2+1)\mathtt{y}^k+a_1\mathtt{x}\in {{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2} \subset {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\), because it has order 1.

Assume next that k is odd (and recall that \(k\ge 2\)). Then

$$\begin{aligned} (b^2+1)^2\mathtt{y}^{2k+2}&-a_1^2\mathtt{x}^2\mathtt{y}^2=((b^2+1)^2-b)\mathtt{y}^{2k+2} +\sum _{k=2}^qa_k^2\mathtt{x}^2\mathtt{y}^2+(a\mathtt{x}^2+b\mathtt{y}^{2k})\mathtt{y}^2\\&=((b^2+1)^2-b)\mathtt{y}^{2k+2}\\&\qquad +\sum _{k=2}^qa_k^2\mathtt{x}^2\mathtt{y}^2+\mathtt{z}^2\mathtt{y}^2\in {{\mathcal {P}}}(A) \cap \kappa [[\mathtt{x},\mathtt{y}]]={{\mathcal {P}}}(\{F\ge 0\}),\\ (b^2+1)\mathtt{y}^{k+1}&\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\subset {{\mathcal {P}}}(\{F\ge 0\}). \end{aligned}$$

Thus, \(\varphi :=(b^2+1)\mathtt{y}^{k+1}+a_1\mathtt{x}\mathtt{y}\in {{\mathcal {P}}}(\{F\ge 0\})\). Let us check: \(\varphi \not \in {\Sigma {A}^2}\).

Otherwise, there exist \(h_1,\ldots ,h_p,h\in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) such that

$$\begin{aligned} \varphi =(b^2+1)\mathtt{y}^{k+1}+a_1\mathtt{x}\mathtt{y}=\sum _{i=1}^ph_i^2-(\mathtt{z}^2-a\mathtt{x}^2-b\mathtt{y}^{2k})h. \end{aligned}$$

Comparing initial forms, we find \(c\in {\Sigma {\kappa }^2}\) such that the quadratic form \(\psi :=a_1\mathtt{x}\mathtt{y}+c\mathtt{z}^2-ca\mathtt{x}^2\) is a sum of squares of linear forms in the variables \(\mathtt{x},\mathtt{y},\mathtt{z}\) and coefficients in \(\kappa \), so \(-\frac{a_1^2}{2}(a+c)^2-1=\psi (a_1,-\frac{c^2}{2}-\frac{a^2}{2} -\frac{1}{a_1^2},0)\in {\Sigma {\kappa }^2}\), which is a contradiction because \(\kappa \) is a (formally) real field. Thus, \(\varphi \in {{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2}\subset {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\), as required. \(\square \)

Lemma 3.8

(Order 3 restrictions) If \(\omega (F)=3\) and \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), then F is right equivalent to one of the following series:

  1. (i)

    \(\mathtt{x}^2\mathtt{y}\) or \(\mathtt{x}^2\mathtt{y}+(-1)^ka\mathtt{y}^k\) where \(a\not \in -{\Sigma {\kappa }^2}\) and \(k\ge 3\).

  2. (ii)

    \(\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\) irreducible.

  3. (iii)

    \(\mathtt{x}^3+a\mathtt{y}^4\), \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\) or \(\mathtt{x}^3+\mathtt{y}^5\) where \(a\not \in {\Sigma {\kappa }^2}\).

First part of the proof of Lemma 3.8

After a linear change of coordinates (Tschirnhaus trick) we may assume that the initial form of F is of type \(P:=\lambda (\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3)\) for some \(\lambda \in \kappa {\setminus }\{0\}\). After the change of coordinates \((\mathtt{x},\mathtt{y},\mathtt{z})\mapsto (\lambda \mathtt{x},\lambda \mathtt{y},\lambda ^2\mathtt{z})\), we may assume \(P:=\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\). If P is reducible, after a linear change of coordinates that only involves the variables \(\mathtt{x},\mathtt{y}\) we can suppose that P is a homogeneous polynomial of one of the following types:

$$\begin{aligned} \mathtt{x}^3,\mathtt{x}^2\mathtt{y},\mathtt{y}(\mathtt{x}^2-a\mathtt{y}^2) \end{aligned}$$

where \(a\ne 0\). If P is either irreducible or \(P=\mathtt{x}(\mathtt{x}^2+a\mathtt{y}^2)\) with \(a\ne 0\), then its discriminant is non-zero and P is 3-determined as we have seen in Example 2.6(iii). Thus, after a change of coordinates we may assume \(F=P\).

If \(F=\mathtt{y}(\mathtt{x}^2-a\mathtt{y}^2)\) and \(a\in -{\Sigma {\kappa }^2}\), then \(\mathtt{y}\in {{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2}\subset {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\). Thus, \(F=\mathtt{x}^2\mathtt{y}-a\mathtt{y}^3\) where \(a\not \in -{\Sigma {\kappa }^2}\).

Assume next \(P:=\mathtt{x}^2\mathtt{y}\), but \(F\ne \mathtt{x}^2\mathtt{y}\). Let \(s\ge 4\) be the degree of the next non-zero homogeneous form of F and set \(F:=\mathtt{x}^2\mathtt{y}+a\mathtt{y}^s+b\mathtt{x}\mathtt{y}^{s-1}+\mathtt{x}^2\varphi \) where \(a,b\in \kappa \) and \(\varphi \in {{\mathfrak {m}}}_2^{s-2}\). After the change of coordinates \((\mathtt{x},\mathtt{y})\mapsto (\mathtt{x}-\frac{1}{2}b\mathtt{y}^{s-2},\mathtt{y}-\varphi )\) we may assume \(F:=\mathtt{x}^2\mathtt{y}+a\mathtt{y}^s+\psi \) where \(\psi \in {{\mathfrak {m}}}^{s+1}\). If \(a\ne 0\), after an additional change of coordinates we can suppose \(F:=\mathtt{x}^2\mathtt{y}+a\mathtt{y}^s\) because \(\mathtt{x}^2\mathtt{y}+a\mathtt{y}^s\) is s-determined (Example 2.6(ii)). If \(a=0\), we iterate the previous process until we find \(\ell >s\) such that F is right equivalent to \(\mathtt{x}^2\mathtt{y}+a'\mathtt{y}^\ell \) for some \(a'\ne 0\) or we conclude that F is right equivalent to \(\mathtt{x}^2\mathtt{y}\) if such an \(\ell \) does not exist.

If \(F:=\mathtt{x}^2\mathtt{y}+a\mathtt{y}^{2k+1}\) and \(a\in {\Sigma {\kappa }^2}\), then \(\mathtt{y}\in {{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2}\subset {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\). If \(F:=\mathtt{x}^2\mathtt{y}-a\mathtt{y}^{2k}\) and \(a\in {\Sigma {\kappa }^2}\), then \(\mathtt{x}^2\mathtt{y}=\mathtt{z}^2+a\mathtt{y}^{2k}\) and \(\mathtt{y}\in {{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2}\subset {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\). \(\square \)

Before finishing the proof of Lemma 3.8 we need an intermediate result.

Lemma 3.9

Let \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) be a series with inital form \(\mathtt{x}^3\). Then

  1. (i)

    There exist a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) with \(U(0,0)=1\), a unit \(W\in \kappa [[\mathtt{y}]]\) with \(W(0)=1\), \(b,c\in \kappa \) and \(k,\ell \ge 0\) such that F is right equivalent to \((\mathtt{x}^3+b\mathtt{x}\mathtt{y}^{k+3}+c\mathtt{y}^{\ell +4}W)U^2\).

  2. (ii)

    If \(c\ne 0\) and \(k\ge \ell +1\), we may assume \(b=0\) and \(W=1\).

  3. (iii)

    If \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), then either \(k=0\) or \(\ell \le 1\) and we may assume \(U=1\).

Proof

  1. (i)

    By the Weierstrass preparation theorem and the Tschirnhaus trick there exist a Weierstrass polynomial \(P:=\mathtt{x}^3+B(\mathtt{y})x+C(\mathtt{y})\in \kappa [[\mathtt{y}]][\mathtt{x}]\) and a unit \(U_0\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(F=PU_0\). As the initial form of F is \(\mathtt{x}^3\), we have in addition \(U_0(0,0)=1\), \(\omega (B)\ge 3\) and \(\omega (C)\ge 4\). Let \(b,c\in \kappa \), let \(k,\ell \ge 0\) be integers and \(V,W_0\in \kappa [[\mathtt{y}]]\) units such that \(V(0)=1\), \(W_0(0)=1\) and \(F=(\mathtt{x}^3+b(V\mathtt{y})^{k+3}\mathtt{x}+cW_0\mathtt{y}^{\ell +4})U_0\). After the change of coordinates \(V\mathtt{y}\mapsto \mathtt{y}\) we assume \(V=1\), so \(F=(\mathtt{x}^3+b\mathtt{y}^{k+3}x+cW\mathtt{y}^{\ell +4})U^2\) for units \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(W\in \kappa [[\mathtt{y}]]\) such that \(U(0,0)=1\) and \(W(0)=1\).

  2. (ii)

    If \(c\ne 0\) and \(k\ge \ell +1\), then \(W':=W+\frac{b}{c}\mathtt{x}\mathtt{y}^{k-\ell -1}\) is a unit. After the change of coordinates \(W'\mathtt{y}\mapsto \mathtt{y}\), we get \(F=(\mathtt{x}^3+c\mathtt{y}^{\ell +4})U'^2\) for a unit \(U'\in \kappa [[\mathtt{x},\mathtt{y}]]\) with \(U'(0,0)=1\).

  3. (iii)

    After the change of coordinates \(\mathtt{z}\rightarrow U\mathtt{z}\) we assume \(F=\mathtt{x}^3+b\mathtt{x}\mathtt{y}^{k+3}+c\mathtt{y}^{\ell +4}W\) with the restrictions described in (i) and (ii). We claim: If \(k\ge 1\) and \(\ell \ge 2\), there exists \(M\in {\Sigma {\kappa }^2}\) such that \(\varphi =\mathtt{x}+M^2\mathtt{y}^2\in {{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2}\subset {{\mathcal {P}}}(A) {\setminus }{\Sigma {A}^2}\).

It is enough to find \(M\in {\Sigma {\kappa }^2}\) such that: if \(\alpha \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) satisfies \(\varphi <_\alpha 0\), then \(F<_\alpha 0\).

If \(\mathtt{y}\in {\text {supp}}(\alpha )\), then \(\varphi +{\text {supp}}(\alpha )=\mathtt{x}+{\text {supp}}(\alpha )\) and \(F+{\text {supp}}(\alpha )=\mathtt{x}^3+{\text {supp}}(\alpha )\) and both have the same sign with respect to \(\alpha \).

In order to find the suitable \(M\in {\Sigma {\kappa }^2}\), let us make first some computations valid for each \(M\in {\Sigma {\kappa }^2}\). If \(\mathtt{y}\not \in {\text {supp}}(\alpha )\) and \(\varphi <_\alpha 0\), then \(\mathtt{x}<_\alpha -M^2\mathtt{y}^2\), so \(-\mathtt{x}>_\alpha M^2\mathtt{y}^2>_\alpha 0\). As \(k\ge 1\), we have \(((b^2+1)\mathtt{y}^4+b\mathtt{y}^{k+3})>_\alpha 0\). Thus,

$$\begin{aligned} -\mathtt{x}b\mathtt{y}^{k+3}>_\alpha -\mathtt{x}(-(b^2+1))\mathtt{y}^4)>_\alpha -(b^2+1)M^2\mathtt{y}^6, \end{aligned}$$

so \(\mathtt{x}b\mathtt{y}^{k+3}<_\alpha (b^2+1)M^2\mathtt{y}^6\) and \(\mathtt{x}^3<_\alpha -M^6\mathtt{y}^6\). Consequently, as \(\ell \ge 2\),

$$\begin{aligned} F=(\mathtt{x}^3+b\mathtt{x}\mathtt{y}^{k+3}+c\mathtt{y}^{\ell +4}W)<_\alpha (-M^6+(b^2+1)M^2 +(c^2+1))\mathtt{y}^6<_\alpha 0. \end{aligned}$$

To guarantee the last inequality for each \(\alpha \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that \(\varphi <_\alpha 0\), it is enough to find \(M\in {\Sigma {\kappa }^2}\) such that \(M^6-(b^2+1)M^2-(c^2+1)\in {\Sigma {\kappa }^2}\). We choose \(M:=2(b^2+1)(c^2+1)\in {\Sigma {\kappa }^2}\) and observe that

$$\begin{aligned}&M^6-(b^2+1)M^2-(c^2+1)\\&\quad =(c^2+1)(16(b^2+1)^3(c^2+1)^4-1)(4(b^2+1)^3(c^2+1)-1)\in {\Sigma {\kappa }^2}, \end{aligned}$$

as required. \(\square \)

We are now ready to finish the proof of Lemma 3.8.

Second part of the proof of Lemma 3.8

If \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), there exist by Lemma 3.9 a unit \(W\in \kappa [[\mathtt{y}]]\) with \(W(0)=1\) and \(b,c\in \kappa \) such that F is one among

  1. (i)

    \(\mathtt{x}^3+b\mathtt{x}\mathtt{y}^{3}+c\mathtt{y}^{4}W\) where \(c\ne 0\),

  2. (ii)

    \(\mathtt{x}^3+b\mathtt{x}\mathtt{y}^{3}+c\mathtt{y}^{\ell +5}W\) where \(b\ne 0\) and \(\ell \ge 0\),

  3. (iii)

    \(\mathtt{x}^3+b\mathtt{x}\mathtt{y}^{4}+c\mathtt{y}^{5}W\) where \(c\ne 0\).

We now approach these three cases:

  1. (i)

    If \(F=\mathtt{x}^3+b\mathtt{x}\mathtt{y}^{3}+c\mathtt{y}^{4}W\) and \(c\ne 0\), after the change of coordinates

    $$\begin{aligned} \mathtt{x}&\mapsto \mathtt{x}+\frac{b^4}{256c^3}\mathtt{x}^2-\frac{b^3}{24c^2}\mathtt{x}\mathtt{y}+\frac{b^2}{8c}\mathtt{y}^2,\\ \mathtt{y}&\mapsto \mathtt{y}-\frac{b}{4c}\mathtt{x}\end{aligned}$$

    and we may assume \(F=\mathtt{x}^3+c\mathtt{y}^4+\psi \) where \(\psi \in {{\mathfrak {m}}}_2^5\). As \(\mathtt{x}^3+c\mathtt{y}^4\) is by Example 2.6(v) 4-determined, we can suppose after an additional change of coordinates that \(F=\mathtt{x}^3+c\mathtt{y}^4\). If \(c\in -{\Sigma {\kappa }^2}\), we have \(\mathtt{x}^3=\mathtt{z}^2-c\mathtt{y}^4\in {\Sigma {A}^2}\), so \(\mathtt{x}\in {{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2}\subset {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\). Thus, \(F=\mathtt{x}^3+c\mathtt{y}^4\) where \(c\not \in -{\Sigma {\kappa }^2}\).

  2. (ii)

    If \(F=\mathtt{x}^3+b\mathtt{x}\mathtt{y}^{3}+c\mathtt{y}^{\ell +5}W\) and \(b\ne 0\), after the change of coordinates \((\mathtt{x},\mathtt{y},\mathtt{z})\mapsto (b^2\mathtt{x},b\mathtt{y},b^3\mathtt{z})\) we can suppose \(b=1\). As \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\) is by Example 2.6(iv) 5-determined, we can suppose after an additional change of coordinates that \(F=\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\) if \(\ell \ge 1\). Otherwise \(\ell =0\), \(c\ne 0\) and \(F=\mathtt{x}^3+\mathtt{x}\mathtt{y}^3+c\mathtt{y}^5W\). After the change of coordinates

    $$\begin{aligned} \mathtt{x}&\mapsto \mathtt{x}-c\mathtt{y}^2-\frac{1}{3}c^3\mathtt{x}^2-c^2\mathtt{x}\mathtt{y}-\frac{1}{3}c^6\mathtt{x}^3 -\frac{5}{3}c^5\mathtt{x}^2\mathtt{y}-2c^4\mathtt{x}\mathtt{y}^2-\frac{5}{9}c^3\mathtt{y}^3,\\ \mathtt{y}&\mapsto \mathtt{y}+c\mathtt{x}-\frac{4}{3}c^2\mathtt{y}^2 \end{aligned}$$

    there exists a series \(\psi \in {{\mathfrak {m}}}_2^6\) such that \(F=\mathtt{x}^3+\mathtt{x}\mathtt{y}^3+\psi \). As \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\) is 5-determined, F is right equivalent to \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\) and we suppose \(F=\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\).

  3. (iii)

    If \(F=\mathtt{x}^3+b\mathtt{x}\mathtt{y}^{4}+c\mathtt{y}^{5}W\) and \(c\ne 0\), after the change of coordinates

    $$\begin{aligned} \mathtt{x}&\mapsto \mathtt{x}-\frac{4b^5}{9375c^4}\mathtt{x}^3+\frac{b^4}{125c^3}\mathtt{x}^2\mathtt{y}-\frac{4b^3}{75c^2}\mathtt{x}\mathtt{y}^2+\frac{2b^2}{15c}\mathtt{y}^3,\\ \mathtt{y}&\mapsto \mathtt{y}-\frac{b}{5c}\mathtt{x}, \end{aligned}$$

    we assume \(F=\mathtt{x}^3+c\mathtt{y}^5+\psi \) where \(\psi \in {{\mathfrak {m}}}_2^6\). As \(\mathtt{x}^3+c\mathtt{y}^5\) is by Example 2.6(v) 5-determined, there exists an additional change of coordinates after which \(F=\mathtt{x}^3+c\mathtt{y}^5\). After the linear change of coordinates \((\mathtt{x},\mathtt{y},\mathtt{z})\mapsto (c^2\mathtt{x},c\mathtt{y},c^3\mathtt{z})\) we get \(F=\mathtt{x}^3+\mathtt{y}^5\), as required. \(\square \)

3.2.1 The non-principal case

To finish the proof of Theorem 1.5 we explore the case of a ring \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/{{\mathfrak {a}}}\) of dimension 2 such that \({{\mathfrak {a}}}\) is not a principal ideal, but A has the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). Before we need the following example.

Example 3.10

Let \(\kappa \) be a (formally) real field and \(\varphi \in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(A:=\kappa [[\mathtt{x},\mathtt{y}]]/(\varphi )\) has dimension 1 and satisfies \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). Then A is isomorphic to either \(\kappa [[\mathtt{x}]]\) or \(\kappa [[\mathtt{x},\mathtt{y}]]/(\mathtt{x}^2-b\mathtt{y}^2)\) where \(b\not \in -{\Sigma {\kappa }^2}\).

First, by Lemma 3.2\(\omega (\varphi )\le 2\). If \(\omega (\varphi )=1\), we may assume \(\varphi =\mathtt{y}\) and \(A\cong \kappa [[\mathtt{x}]]\). Assume next \(\omega (\varphi )=2\). By Weierstrass preparation theorem we can suppose after a linear change of coordinates \(\varphi =\mathtt{x}^2+2a_1(\mathtt{y})\mathtt{x}+a_2(\mathtt{y})\in \kappa [[\mathtt{x},\mathtt{y}]]\) where \(\omega (a_i)\ge i\). We write

$$\begin{aligned} \varphi =(\mathtt{x}+a_1)^2+a_2-a_1^2 \end{aligned}$$

and after the change of coordinates \(\mathtt{x}\mapsto \mathtt{x}-a_1\) we assume

$$\begin{aligned} \varphi =\mathtt{x}^2-b\mathtt{y}^\ell u^\ell \end{aligned}$$

where \(b\in \kappa \), \(\ell \ge 2\) and \(u\in \kappa [[\mathtt{y}]]\) is a unit such that \(u(0)=1\). After the change \(u\mathtt{y}\mapsto \mathtt{y}\) we may assume \(u=1\). By [35, Lem.6.3] the ideal \((\varphi )\) is real radical, so \(b\ne 0\) and if \(\ell \) is even, then \(b\not \in -{\Sigma {\kappa }^2}\).

If \(\ell \ge 4\), then by (3.1) \((b^2+1)^2\mathtt{y}^4-b\mathtt{y}^\ell \in {{\mathcal {P}}}(\kappa [[\mathtt{y}]])\). By Lemma 3.5 adapted to two variables \(\varphi :=(b^2+1)\mathtt{y}^2+\mathtt{x}\in {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\) (because \(\varphi \) has order 1). Thus, \(\ell \le 3\).

If \(\ell =3\), then \(\mathtt{x}^2=(b\mathtt{y})\mathtt{y}^2\), so \(b\mathtt{y}\in {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\) (because it has order 1). Consequently, \(\ell =2\) and A is isomorphic to \(\kappa [[\mathtt{x},\mathtt{y}]]/(\mathtt{x}^2-b\mathtt{y}^2)\) where \(b\not \in -{\Sigma {\kappa }^2}\), as required. \(\square \)

Theorem 3.11

Let \({{\mathfrak {a}}}\) be a non-principal ideal of \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) such that \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/{{\mathfrak {a}}}\) has dimension 2. Then \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) if and only if A is isomorphic to \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}\mathtt{x},\mathtt{z}\mathtt{y})\).

Proof

Assume first that \(A=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}\mathtt{x},\mathtt{z}\mathtt{y})\) and let \(f\in {{\mathcal {P}}}(A)\). If f is a unit, then \(f=bU^2\) where \(b\in \kappa {\setminus }\{0\}\) and \(U(0,0,0)=1\). If \({{\mathfrak {m}}}\) is the maximal ideal of A, then \(A/{{\mathfrak {m}}}=\kappa \). As \(f\in {{\mathcal {P}}}(A)\), then \(b\in {{\mathcal {P}}}(\kappa )={\Sigma {\kappa }^2}\), so \(f\in {\Sigma {A}^2}\). As a consequence, we assume that f is not a unit. As \(\mathtt{z}\mathtt{x}=0,\mathtt{z}\mathtt{y}=0\), we have \(f=f_1(\mathtt{x},\mathtt{y})+f_2(\mathtt{z})\) where \(f_1\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(f_2\in \kappa [[\mathtt{z}]]\) satisfy \(f_1(0,0)=0\) and \(f_2(0)=0\). Observe that \(f_1\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) and \(f_2\in {{\mathcal {P}}}(\kappa [[[\mathtt{z}]])\) because \({{\mathfrak {a}}}:=(\mathtt{z}\mathtt{x},\mathtt{z}\mathtt{y})=(\mathtt{z})\cap (\mathtt{x},\mathtt{y})\), \(A/((\mathtt{z})/{{\mathfrak {a}}})\cong \kappa [[\mathtt{x},\mathtt{y}]]\) and \(A/((\mathtt{x},\mathtt{y})/{{\mathfrak {a}}})\cong \kappa [[\mathtt{z}]]\). Thus, there exist \(a_i\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(b_j\in \kappa [\mathtt{z}]\) such that \(f=f_1+f_2=\sum _ia_i^2+\sum _jb_j^2\in {\Sigma {A}^2}\).

Assume next \({{\mathcal {P}}}(A)={\Sigma {A}^2}\). By Lemma 3.2 we know \(\omega ({{\mathfrak {a}}})\le 2\). If \(\omega ({{\mathfrak {a}}})=1\), we may assume \(\mathtt{z}\in {{\mathfrak {a}}}\). But this is impossible because \(\dim (A)=2\) and \({{\mathfrak {a}}}\) is not a principal ideal. Thus, \(\omega ({{\mathfrak {a}}})=2\) and by [35, Lem.6.3] \({{\mathfrak {a}}}\) is a real radical ideal. Let \({{\mathfrak {a}}}={{\mathfrak {p}}}_1\cap \cdots \cap {{\mathfrak {p}}}_r\cap {{\mathfrak {q}}}_1\cap \cdots \cap {{\mathfrak {q}}}_s\) be the irredundant primary decomposition of \({{\mathfrak {a}}}\) and assume that \(\mathrm{ht}({{\mathfrak {p}}}_i)=1\) for each \(i=1,\ldots ,r\) and \(\mathrm{ht}({{\mathfrak {q}}}_j)=2\) for \(j=1,\ldots ,s\). Let \({{\mathfrak {a}}}_1:={{\mathfrak {p}}}_1\cap \cdots \cap {{\mathfrak {p}}}_r\) and \({{\mathfrak {a}}}_2:={{\mathfrak {q}}}_1\cap \cdots \cap {{\mathfrak {q}}}_s\). As each ideal \({{\mathfrak {p}}}_i\) is prime and has height 1, there exist \(\varphi _i\in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) irreducible such that \({{\mathfrak {p}}}_i=(\varphi _i)\) for \(i=1,\ldots ,r\). It holds \({{\mathfrak {a}}}_1=(\varphi )\) where \(\varphi :=\prod _{i=1}^r\varphi _i\). We claim: \({{\mathfrak {a}}}=(\varphi )\cdot {{\mathfrak {a}}}_2\).

The inclusion right to left is clear, so let \(f\in {{\mathfrak {a}}}={{\mathfrak {a}}}_1\cap {{\mathfrak {a}}}_2\). As \({{\mathfrak {a}}}_1=(\varphi )\), there exists \(h\in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) such that \(f=\varphi h\). Let us check: \(h\in {{\mathfrak {a}}}_2\).

Otherwise, we may assume \(h\not \in {{\mathfrak {q}}}_1\). As \((\prod _{i=1}^r\varphi _i)h=\varphi h\in {{\mathfrak {a}}}_2\subset {{\mathfrak {q}}}_1\), we can suppose \(\varphi _1\in {{\mathfrak {q}}}_1\), so \({{\mathfrak {p}}}_1\subset {{\mathfrak {q}}}_1\), which is a contradiction because the primary decomposition of the real radical ideal \({{\mathfrak {a}}}\) is irredundant. Consequently, \(h\in {{\mathfrak {a}}}_2\) and \(f\in (\varphi )\cdot {{\mathfrak {a}}}_2\), so \({{\mathfrak {a}}}=(\varphi )\cdot {{\mathfrak {a}}}_2\).

Thus, \(2=\omega ({{\mathfrak {a}}})=\omega (\varphi )+\omega ({{\mathfrak {a}}}_2)\), so \(\omega (\varphi )=\omega ({{\mathfrak {a}}}_2)=1\). We may assume \(\varphi =\mathtt{z}\) and there exists \(\psi \in {{\mathfrak {a}}}_2\) such that \(\omega (\psi )=1\). We claim: The initial form of \(\psi \) is not a multiple of \(\mathtt{z}\).

Otherwise, we assume that the initial form of \(\psi \) is equal to \(\mathtt{z}\). By Weierstrass preparation theorem we may write \(\psi =\mathtt{z}+2g(\mathtt{x},\mathtt{y})\) for some \(g\in \kappa [[\mathtt{x},\mathtt{y}]]\) of order \(\ge 2\). Observe that

$$\begin{aligned} \mathtt{z}(\mathtt{z}+2g)=(\mathtt{z}+g)^2-g^2\in {{\mathfrak {a}}}. \end{aligned}$$

As \(\omega (g)\ge 2\), there exists by Lemma 3.1\(M\in {\Sigma {\kappa }^2}\) such that \(M^2(\mathtt{x}^2+\mathtt{y}^2)^2-g^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). Using the chain of homomorphisms

$$\begin{aligned} \kappa [[\mathtt{x},\mathtt{y}]]\hookrightarrow \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\rightarrow A \end{aligned}$$

one deduces (using that \((\mathtt{z}+g)^2-g^2\in {{\mathfrak {a}}}\))

$$\begin{aligned}&(M(\mathtt{x}^2+\mathtt{y}^2)-g-\mathtt{z})(M(\mathtt{x}^2+\mathtt{y}^2)+g+\mathtt{z})=M^2(\mathtt{x}^2+\mathtt{y}^2)^2-(g+\mathtt{z})^2\\&\quad =M^2(\mathtt{x}^2+\mathtt{y}^2)^2-g^2\in {{\mathcal {P}}}(A) \end{aligned}$$

and \((M(\mathtt{x}^2+\mathtt{y}^2)-g-\mathtt{z})+(M(\mathtt{x}^2+\mathtt{y}^2)+g+\mathtt{z})=2M(\mathtt{x}^2+\mathtt{y}^2)\in {{\mathcal {P}}}(A)\). Thus,

$$\begin{aligned} M(\mathtt{x}^2+\mathtt{y}^2)-g-\mathtt{z},M(\mathtt{x}^2+\mathtt{y}^2)+g+\mathtt{z}\in {{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2} \end{aligned}$$

because they have order 1 and \(\omega ({{\mathfrak {a}}})=2\). As \({{\mathcal {P}}}(A)={\Sigma {A}^2}\), we deduce the initial form of \(\psi \) is not a multiple of \(\mathtt{z}\).

Thus, we assume \(\mathtt{x}\in {{\mathfrak {a}}}_2\) and observe that \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/{{\mathfrak {a}}}_2\cong \kappa [[\mathtt{y},\mathtt{z}]]/{{\mathfrak {a}}}_2'\) for some ideal \({{\mathfrak {a}}}_2'\) of \(\kappa [[\mathtt{y},\mathtt{z}]]\). As \(\mathrm{ht}({{\mathfrak {a}}}_2)=2\), we deduce \(\mathrm{ht}({{\mathfrak {a}}}_2')=1\), so \({{\mathfrak {a}}}_2'\) is a principal ideal and there exists \(\phi \in \kappa [[\mathtt{y},\mathtt{z}]]\) such that \({{\mathfrak {a}}}_2'=(\phi )\). Note that \({{\mathfrak {a}}}_2=(\mathtt{x},\phi )\) and \({{\mathfrak {a}}}=(\mathtt{z}\mathtt{x},\mathtt{z}\phi )\). Define \({{\mathfrak {b}}}:=(\mathtt{z}\phi )\) and \(B:=\kappa [[\mathtt{y},\mathtt{z}]]/{{\mathfrak {b}}}\). We claim: \({{\mathcal {P}}}(B)={\Sigma {B}^2}\).

Consider the inclusion of rings \(B:=\kappa [[\mathtt{y},\mathtt{z}]]/{{\mathfrak {b}}}\hookrightarrow A/{{\mathfrak {a}}}\). If \(f\in {{\mathcal {P}}}(B)\), then \(f\in {{\mathcal {P}}}(A)={\Sigma {A}^2}\), so there exist \(a_1,\ldots ,a_p,b_1,b_2\in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) such that

$$\begin{aligned} f(\mathtt{y},\mathtt{z})=a_1^2(\mathtt{x},\mathtt{y},\mathtt{z})+\cdots +a_p^2(\mathtt{x},\mathtt{y},\mathtt{z})+\mathtt{z}\mathtt{x}b_1(\mathtt{x},\mathtt{y},\mathtt{z})+\mathtt{z}\phi (\mathtt{y},\mathtt{z})b_2(\mathtt{x},\mathtt{y},\mathtt{z}). \end{aligned}$$

Substituting \(\mathtt{x}=0\) in the previous equality we deduce

$$\begin{aligned} f(\mathtt{y},\mathtt{z})=a_1^2(0,\mathtt{y},\mathtt{z})+\cdots +a_p^2(0,\mathtt{y},\mathtt{z})+\mathtt{z}\phi (\mathtt{y},\mathtt{z})b_2(0,\mathtt{y},\mathtt{z}), \end{aligned}$$

so \(f\in {\Sigma {B}^2}\). Thus, \({{\mathcal {P}}}(B)={\Sigma {B}^2}\).

By Example 3.10 we deduce that B is isomorphic to \(\kappa [[\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-b\mathtt{y}^2)\) for some \(b\not \in -{\Sigma {\kappa }^2}\). This means that \(\phi \in \kappa [[\mathtt{y},\mathtt{z}]]\) has order 1 and its initial form is not a multiple of \(\mathtt{z}\). After a change of coordinates, we may assume \(\phi =\mathtt{y}\). Consequently, \({{\mathfrak {a}}}=(\mathtt{z}\mathtt{x},\mathtt{z}\mathtt{y})\), as required. \(\square \)

4 Polynomial density and polynomial reduction

In this section we develop several tools that will be crucial to prove Theorem 1.8. We need to analyze the good properties concerning ‘polynomial approximation’ of the positive definite elements of the rings \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(\kappa \) is a (formally) real field.

4.1 Positive definite elements.

Let \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\). Denote

$$\begin{aligned} {{\mathcal {P}}}^+(\{F\ge 0\}):=&\{f\in \kappa [[\mathtt{x},\mathtt{y}]]:\ f\in {{\mathcal {P}}}(\{F\ge 0\}), \ f>_\alpha 0\\&\quad \forall \alpha \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]]),\ {\text {supp}}(\alpha )\ne {{\mathfrak {m}}}_2,\ F\ge _\alpha 0\},\\ {{\mathcal {P}}}^+(A):=&\{f+\mathtt{z}g\in A:\ f+\mathtt{z}g\in {{\mathcal {P}}}(A),\ f+\mathtt{z}g>_\beta 0\\&\quad \forall \beta \in {\text {Sper}}(A), {\text {supp}}(\beta )\ne {{\mathfrak {m}}}_A\},\\ {{\mathcal {P}}}^{\oplus }(A):=&\{f+\mathtt{z}g\in A:\ f\in {{\mathcal {P}}}^+(\{F\ge 0\}),\ f^2-Fg^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\}. \end{aligned}$$

The following result allows us to construct elements of \({{\mathcal {P}}}^{\oplus }(A)\) from elements of \({{\mathcal {P}}}(A)\) that are very similar to the original ones (and as close as needed in the \({{\mathfrak {m}}}_2\)-adic topology).

Lemma 4.1

(Construction of positive semidefinite elements) We have:

  1. (i)

    \({{\mathcal {P}}}^{\oplus }(A)\subset {{\mathcal {P}}}^+(A)\).

  2. (ii)

    Let \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) and let \(f_i\in \kappa [[\mathtt{x},\mathtt{y}]]\) be such that \(\root r \of {(f+\sum _{i=1}^pf_i^2,g)}={{\mathfrak {m}}}_2\) and \(\sum _{i=1}^pf_i^2>_\beta 0\) for those \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) satisfying: \({\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\), \(F\ge _\beta 0\) and either \(f\in {\text {supp}}(\beta )\) or \(f^2-Fg^2\in {\text {supp}}(\beta )\). Then \(f+\sum _{i=1}^pf_i^2+\mathtt{z}g\in {{\mathcal {P}}}^{\oplus }(A)\).

  3. (iii)

    Let \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) be such that \(f(\mathtt{x},0)\ne 0\), \(f^2(\mathtt{x},0)-F(\mathtt{x},0)g^2(\mathtt{x},0)\ne 0\) and \(g\ne 0\). For each \(M\in \kappa {\setminus }\{0\}\) there exists a finite set \(S\subset {{\mathbb {N}}}\) such that \(f+M^2\mathtt{y}^{2n}+\mathtt{z}g\in {{\mathcal {P}}}^{\oplus }(A)\) for each \(n\in {{\mathbb {N}}}{\setminus } S\).

  4. (iv)

    Let \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) be such that \(g\ne 0\). Fix \(M\in \kappa {\setminus }\{0\}\) and let \(h_n\) be either \(M^2(\mathtt{x}^2+\mathtt{y}^2)^n\) or \(M^2(\mathtt{x}^{2n}+\mathtt{y}^{2n})\). There exists a finite set \(S\subset {{\mathbb {N}}}\) such that \(f+h_n+\mathtt{z}g\in {{\mathcal {P}}}^{\oplus }(A)\) for each \(n\in {{\mathbb {N}}}{\setminus } S\).

  5. (v)

    If \(f\in {{\mathcal {P}}}(\{F\ge 0\})\), then \(f+\mathtt{z}f=(1+\mathtt{z})f\in {{\mathcal {P}}}(A)\).

Proof

  1. (i)

    Assume \(f\in {{\mathcal {P}}}^+(\{F\ge 0\})\) and \(f^2-Fg^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\). By Lemma 3.4 we have

    $$\begin{aligned}&2f\in {{\mathcal {P}}}^+(\{F\ge 0\})\subset {{\mathcal {P}}}^+(A),\\&f^2-Fg^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\subset {{\mathcal {P}}}^+(A). \end{aligned}$$

    This means \((f+\mathtt{z}g)+(f-\mathtt{z}g)=2f\in {{\mathcal {P}}}^+(A)\) and \((f+\mathtt{z}g)(f-\mathtt{z}g)=f^2-Fg^2\in {{\mathcal {P}}}^+(A)\), so both \(f+\mathtt{z}g,f-\mathtt{z}g\in {{\mathcal {P}}}^+(A)\).

  2. (ii)

    As \(f\in {{\mathcal {P}}}(\{F\ge 0\})\) and \(\sum _{i=1}^pf_i^2>_\beta 0\) for those \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) satisfying \({\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\), \(f\in {\text {supp}}(\beta )\) and \(F\ge _\beta 0\), we deduce \(f+\sum _{i=1}^pf_i^2\in {{\mathcal {P}}}^+(\{F\ge 0\})\).

We claim: \(h:=(f+\sum _{i=1}^pf_i^2)^2-Fg^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\).

Let \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) be such that \({\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\). We distinguish two cases:

Case 1. If \(F\ge _\beta 0\), then \(f\ge _\beta 0\). As \(f^2-Fg^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\), we obtain \(f^2-Fg^2\ge _\beta 0\). Consequently,

$$\begin{aligned} \Big (f+\sum _{i=1}^pf_i^2\Big )^2-Fg^2=(f^2-Fg^2)+2f \Big (\sum _{i=1}^pf_i^2\Big )+\Big (\sum _{i=1}^pf_i^2\Big )^2\ge _\beta 0. \end{aligned}$$

If \((f+\sum _{i=1}^pf_i^2)^2-Fg^2\in {\text {supp}}(\beta )\), then \(f^2-Fg^2\in {\text {supp}}(\beta )\) and \(\sum _{i=1}^pf_i^2\in {\text {supp}}(\beta )\), which contradicts the hypothesis. Thus, \((f+\sum _{i=1}^pf_i^2)^2-Fg^2>_\beta 0\).

Case 2. If \(F<_\beta 0\), then \((f+\sum _{i=1}^pf_i^2)^2-Fg^2\ge _\beta 0\) and \((f+\sum _{i=1}^pf_i^2\Big )^2-Fg^2\in {\text {supp}}(\beta )\) if and only if \(f+\sum _{i=1}^pf_i^2,g\in {\text {supp}}(\beta )\). As \({\text {supp}}(\beta )\) is a real prime ideal,

$$\begin{aligned} {{\mathfrak {m}}}_2=\root r \of {\Big (f+\sum _{i=1}^pf_i^2,g\Big )}\subset {\text {supp}}(\beta ) \ne {{\mathfrak {m}}}_2, \end{aligned}$$

which is a contradiction. Thus, \((f+\sum _{i=1}^pf_i^2)^2-Fg^2>_\beta 0\).

Consequently, \((f+\sum _{i=1}^pf_i^2)^2-Fg^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\) and \(f+\sum _{i=1}^pf_i^2+\mathtt{z}g\in {{\mathcal {P}}}^{\oplus }(A)\).

(iii) By (ii) it is enough to prove that:

  1. (1)

    There exists \(S\subset {{\mathbb {N}}}\) finite such that \(\root r \of {(f+M^2\mathtt{y}^{2n},g)}={{\mathfrak {m}}}_2\) for each \(n\in {{\mathbb {N}}}{\setminus } S\).

  2. (2)

    \(\mathtt{y}^{2n}>_\beta 0\) for those \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) satisfying: \({\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\), \(F\ge _\beta 0\) and either \(f\in {\text {supp}}(\beta )\) or \(f^2-Fg^2\in {\text {supp}}(\beta )\).

As \(g\ne 0\), if \({{\mathfrak {a}}}:=\root r \of {(f+M^2\mathtt{y}^{2n},g)}\subsetneq {{\mathfrak {m}}}_2\), the associated real prime ideals \({{\mathfrak {p}}}_i\) of \({{\mathfrak {a}}}\) are prime ideals of height 1. As \(f(\mathtt{x},0)\ne 0\), then \({{\mathfrak {p}}}_i\ne (\mathtt{y})\). As \({{\mathfrak {p}}}_1\) is a real prime ideal, there exists a prime cone \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that \({\text {supp}}(\beta )={{\mathfrak {p}}}_1\). By [1, Prop.II.2.4] there exists \(\alpha \in {\text {Sper}}(\kappa )\) such that \(\beta \rightarrow \alpha \). Let \(R(\alpha )\) be the real closure of \((\kappa ,\le _\alpha )\) and \(\overline{\kappa }:=R(\alpha )[\sqrt{-1}]\) the algebraic closure of \(\kappa \). By Lemma 2.12 there exists a homomorphism \(\phi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow R(\alpha )[[\mathtt{y}]]\) such that \(\phi (\mathtt{y})=\mathtt{y}^q\) for some \(q\ge 1\) and \(h\ge _\beta 0\) if and only if \(\phi (h)\ge 0\) (for \(\mathtt{x}>0\)). As \({{\mathfrak {a}}}\subset {\text {supp}}(\beta )\), we have \(\phi (f+M^2\mathtt{y}^{2n})=0\) and \(\phi (g)=0\). Define \(\zeta :=\phi (\mathtt{y})\in R(\alpha )[[\mathtt{y}]]\). Observe that \(\phi (f+M^2\mathtt{y}^{2n})=(f+M^2\mathtt{y}^{2n})(\zeta ,\mathtt{y}^q)=0\) and \(\phi (g)=g(\zeta ,\mathtt{y}^q)=0\), that is, \(\zeta (\mathtt{y}^{1/q})\in \overline{\kappa }((\mathtt{y}^*))\) is a common root of \(f+M^2\mathtt{y}^{2n}\) and g in \(\overline{\kappa }((\mathtt{y}^*))\). As \(g\ne 0\), the series g has finitely many roots in \(\overline{\kappa }((\mathtt{x}^*))\) and we denote \(S:=\{\omega (f(\eta ,\mathtt{y}))/2:\ \eta \in \overline{\kappa }((\mathtt{y}^*)),\ g(\eta ,\mathtt{y})=0\}\).

If \(n\in {{\mathbb {N}}}{\setminus } S\), the series \(f+M^2\mathtt{y}^{2n}\) and g have no common root in \(\overline{\kappa }((\mathtt{y}^*))\), so \({{\mathfrak {a}}}={{\mathfrak {m}}}_2\) (that is, (1) holds).

Let \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) be a prime cone such that \({\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\), \(F\ge _\beta 0\) and either \(f\in {\text {supp}}(\beta )\) or \(f^2-Fg^2\in {\text {supp}}(\beta )\). If \(\mathtt{y}^{2n}\in {\text {supp}}(\beta )\), then \(\mathtt{y}\in {\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\), so \({\text {supp}}(\beta )=(\mathtt{y})\). As \(f(\mathtt{x},0)\ne 0\) and \(f^2(\mathtt{x},0)-F(\mathtt{x},0)g^2(\mathtt{x},0)\ne 0\), it holds \(f\not \in {\text {supp}}(\beta )\) and \(f^2-Fg^2\not \in {\text {supp}}(\beta )\), which is a contradiction. Consequently, \(\mathtt{y}^{2n}>_\beta 0\) (that is, (2) holds).

(iv) As \(h_n>_\beta 0\) for those \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) with \({\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\), by (ii) it is enough to prove:

  1. (1)

    There exists \(S\subset {{\mathbb {N}}}\) finite such that \(\root r \of {(f+h_n,g)}={{\mathfrak {m}}}_2\) for each \(n\in {{\mathbb {N}}}{\setminus } S\).

The proof of (1) is analogous to the one of (iii.1) and we leave the details to the reader.

(v) If \(f\in {{\mathcal {P}}}(\{F\ge 0\})\), then \(f+\mathtt{z}f\in {{\mathcal {P}}}(A)\) because \((1+\mathtt{z})\) is a positive unit of A. \(\square \)

4.2 Polynomial density

As an application of Lemma 2.13 we prove the following result that concerns ‘polynomial approximation’ of certain distinguished elements of \({{\mathcal {P}}}^{\oplus }(A)\).

Lemma 4.2

(Local polynomial density) Suppose that \({{\mathcal {P}}}(\{F\ge 0\})\ne \varnothing \). We have:

  1. (i)

    Let \(f+\mathtt{z}g\in A\) be such that \(f(\mathtt{x},0)\ne 0\), \(f^2(\mathtt{x},0)-F(\mathtt{x},0)g^2(\mathtt{x},0)\ne 0\) and \(g\ne 0\). Assume \(f\in {{\mathcal {P}}}(\{F\ge 0\})\) and let \(n\ge 1\) be such that \((f+M^2\mathtt{y}^{2n})^2-Fg^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\). There exists \(r\ge 1\) such that if \(f_1,g_1\in \kappa [[\mathtt{x},\mathtt{y}]]\) satisfy \(f-f_1,g-g_1\in {{\mathfrak {m}}}_2^r\), then \(f_1+M^2\mathtt{y}^{2n}+\mathtt{z}g_1\in {{\mathcal {P}}}^{\oplus }(A)\).

  2. (ii)

    Let \(f+\mathtt{z}g\in A\) be such that \(g\ne 0\). Assume \(f\in {{\mathcal {P}}}(\{F\ge 0\})\) and let \(n\ge 1\) be such that \((f+M^2(\mathtt{x}^2+\mathtt{y}^2)^n)^2-Fg^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\). There exists \(r\ge 1\) such that if \(f_1,g_1\in \kappa [[\mathtt{x},\mathtt{y}]]\) satisfy \(f-f_1,g-g_1\in {{\mathfrak {m}}}_2^r\), then \(f_1+M^2(\mathtt{x}^2+\mathtt{y}^2)^n+\mathtt{z}g_1\in {{\mathcal {P}}}^{\oplus }(A)\).

Proof

We prove both statements simultaneously. Let \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) be such that \(F\ge _\beta 0\). By [1, Prop.II.2.4] there exists \(\alpha \in {\text {Sper}}(\kappa )\) such that \(\beta \rightarrow \alpha \). Let \(R(\alpha )\) be the real closure of \((\kappa ,\le _\alpha )\). If \({\text {supp}}(\beta )={{\mathfrak {m}}}_2\), then \(\alpha =\beta \) and for each \(r\ge 1\) we have

$$\begin{aligned} f+M^2\mathtt{y}^{2n}+{\text {supp}}(\beta )&=f_1+M^2\mathtt{y}^{2n}+{\text {supp}}(\beta ),\\ (f+M^2\mathtt{y}^{2n})^2-Fg^2+{\text {supp}}(\beta )&=(f_1+M^2\mathtt{y}^{2n})^2-Fg^2+{\text {supp}}(\beta ),\\ f+M^2(\mathtt{x}^2+\mathtt{y}^2)^n+{\text {supp}}(\beta )&=f_1+M^2\mathtt{y}^{2n}+{\text {supp}}(\beta ),\\ (f+M^2(\mathtt{x}^2+\mathtt{y}^2)^n)^2-Fg^2+{\text {supp}}(\beta )&=(f_1+M^2(\mathtt{x}^2+\mathtt{y}^2)^n)^2-Fg^2 +{\text {supp}}(\beta ) \end{aligned}$$

if \(f_1,g_1\in \kappa [[\mathtt{x},\mathtt{y}]]\) satisfy \(f-f_1,g-g_1\in {{\mathfrak {m}}}_2^r\).

Assume \({\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\). If \({\text {supp}}(\beta )=0\), then by [1, Prop.VII.5.1] there exists \(\beta _1\in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that \(\beta \rightarrow \beta _1\rightarrow \alpha \) and \({\text {supp}}(\beta _1)\) is a real prime ideal of height 1, so we may assume \(\mathrm{ht}({\text {supp}}(\beta ))=1\). Observe that if \(r\ge 1\) and \(f-f_1,g-g_1\in {{\mathfrak {m}}}_2^r\), then

$$\begin{aligned}&(f+M^2\mathtt{y}^{2n})^2-Fg^2-((f_1+M^2\mathtt{y}^{2n})^2-Fg_1^2)\\&\quad =(f-f_1)(f+f_1)+2M^2\mathtt{y}^{2n}(f-f_1)-F(g-g_1)(g+g_1)\in {{\mathfrak {m}}}_2^r.\\&(f+M^2(\mathtt{x}^2+\mathtt{y}^2)^n)^2-Fg^2-((f_1+M^2(\mathtt{x}^2+\mathtt{y}^2)^n)^2-Fg_1^2)\\&\quad =(f-f_1)(f+f_1)+2M^2(\mathtt{x}^2+\mathtt{y}^2)^n(f-f_1)-F(g-g_1)(g+g_1)\in {{\mathfrak {m}}}_2^r. \end{aligned}$$

By Lemmas 2.13 and 2.14 we find \(r\ge 1\) such that if \(f-f_1,g-g_1 \in {{\mathfrak {m}}}_2^r\), then the statements hold, as required. \(\square \)

In the proof of Theorem 5.4 (which corresponds to a part of Theorem 1.8) we will make use of quadratic transformations. To take advantage of them we need a global ‘polynomial density’ result (Lemma 4.3) and a ‘polynomial reduction’ result (Corollary 4.4).

Lemma 4.3

(Global polynomial density) Let \(F\in \kappa [\mathtt{x},\mathtt{y}]\) be such that \(F(0,0)=0\), let \({{\mathfrak {m}}}:=(\mathtt{x},\mathtt{y},\mathtt{z})\kappa [\mathtt{x},\mathtt{y},\mathtt{z}]\) and \(B:=\kappa [\mathtt{x},\mathtt{y},\mathtt{z}]/(\mathtt{z}^2-F)\). Let \({\widehat{B}}:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) be its \({{\mathfrak {m}}}\)-adic completion and \(f+\mathtt{z}g\in {{\mathcal {P}}}({\widehat{B}})\). For each \(n\ge 1\) there exist polynomials \(f_n,g_n\in \kappa [\mathtt{x},\mathtt{y}]\) such that \(f_n+\mathtt{z}g_n\in {{\mathcal {P}}}(B)\) and \(\omega (f-f_n),\omega (g-g_n)\ge n\).

Proof

By Lemmas 4.1 and 4.2 there exist polynomials \(f_n',g_n'\in \kappa [\mathtt{x},\mathtt{y}]\) such that \(f_n'+\mathtt{z}g_n'\in {{\mathcal {P}}}^\oplus ({\widehat{B}})\) and \(\omega (f-f_n'),\omega (g-g_n')\ge n\). Let us construct from \(f_n',g_n'\) the desired polynomials \(f_n,g_n\in \kappa [\mathtt{x},\mathtt{y}]\) in the statement. Define \({{\mathcal {U}}}:=\{\beta \in {\text {Sper}}(B):\ f_n'+\mathtt{z}g_n'<_\beta 0\}\). If \({{\mathcal {U}}}=\varnothing \), we choose \(f_n:=f_n'\) and \(g_n:=g_n'\). Assume \({{\mathcal {U}}}\ne \varnothing \) and pick \(\beta \in {{\mathcal {U}}}\). We claim: There exists \(\varepsilon _\beta \in \kappa {\setminus }\{0\}\) such that \(\varepsilon _\beta ^4<_\beta \mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2\).

Suppose that \(\mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2<_\beta \varepsilon ^4\) for each \(\varepsilon \in \kappa {\setminus }\{0\}\). Then \(\mathtt{x}^2,\mathtt{y}^2,\mathtt{z}^2<_\beta \varepsilon ^4\) for each \(\varepsilon \in \kappa {\setminus }\{0\}\). Consider the absolute value associated to \(\beta \):

$$\begin{aligned} |\,.\,|_{\beta }:B\rightarrow B,\ a\mapsto {\left\{ \begin{array}{ll} a&{}\text {if }a\ge _\beta 0,\\ -a&{}\text {if }a<_\beta 0. \end{array}\right. } \end{aligned}$$

We have \(|\mathtt{x}|_\beta <_\beta \varepsilon ^2\), \(|\mathtt{y}|_\beta <_\beta \varepsilon ^2\) and \(|\mathtt{z}|_\beta <_\beta \varepsilon ^2\) for each \(\varepsilon \in \kappa {\setminus }\{0\}\). Thus, if \(P\in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) and \(P(0,0,0)\ne 0\), then \(|P-P(0,0,0)|_\beta <_\beta |P(0,0,0)|_\beta \), so \(P\ge _\beta 0\) if and only if \(P(0,0,0)>_\beta 0\). Let \(P_1,P_2\ge _\beta 0\) be such that \(P_1+P_2\in {{\mathfrak {m}}}\). If \(P_1(0,0,0)\ne 0\), then \(P_2(0,0,0)\ne 0\) and \(P_1(0,0,0)=-P_2(0,0,0)\). As \(P_i\ge _\beta 0\) and \(P_i(0,0,0)\ne 0\), we have \(P_i(0,0,0)>_\beta 0\), which is a contradiction because \(P_1(0,0,0)=-P_2(0,0,0)\). Thus, \(P_i(0,0,0)=0\) and \(P_i\in {{\mathfrak {m}}}\) for \(i=1,2\). By [3, Prop.4.3.8] there exists a specialization \(\beta \rightarrow \alpha \) such that \({\text {supp}}(\alpha )={{\mathfrak {m}}}\). By [1, Thm.VII.3.2] there exists a specialization \({\widehat{\beta }}\rightarrow {\widehat{\alpha }}\) of \({\widehat{B}}\) lying over \(\beta \rightarrow \alpha \), that is, \({\widehat{\alpha }}\cap B=\alpha \) and \({\widehat{\beta }}\cap B=\beta \). As \(f_n'+\mathtt{z}g_n'\in {{\mathcal {P}}}^\oplus ({\widehat{B}})\), we deduce \(f_n'+\mathtt{z}g_n'>_\beta 0\), which is a contradiction. Consequently, the claim holds.

As \(\varepsilon _\beta ^4<_\beta \mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2\), we obtain \(1<_\beta \frac{\mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2}{\varepsilon _\beta ^4}\). If \(\mathtt{x}^\nu \mathtt{y}^\mu \mathtt{z}^\rho \) is a monomial and \(\nu +\mu +\rho \le d\),

$$\begin{aligned}&\mathtt{x}^{2\nu }\mathtt{y}^{2\mu }\mathtt{z}^{2\rho }\le _\beta (\mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2)^{\nu +\mu +\rho }<_\beta \frac{(\mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2)^{2d}}{\varepsilon _\beta ^{4(2d-\nu -\mu -\rho )}}\\&\quad \leadsto \quad |\mathtt{x}^\nu \mathtt{y}^\mu \mathtt{z}^\rho |_\beta <_\beta \frac{(\mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2)^d}{\varepsilon _\beta ^{2(2d-\nu -\mu -\rho )}}. \end{aligned}$$

In addition, \(|a|_\beta <_\beta a^2+1\) for each \(a\in \kappa \). Thus, if \(P\in \kappa [\mathtt{x},\mathtt{y},z]\) is a polynomial of degree \(\le d\), there exists \(N_\beta \in {\Sigma {\kappa }^2}\) such that \(|P|_\beta <_\beta N_\beta ^2(\mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2)^d\). In particular, for \(P:=f_n'+\mathtt{z}g_n'\) we find \(M_\beta \in {\Sigma {\kappa }^2}\) such that \(|f_n'+\mathtt{z}g_n'|_\beta \le M_\beta ^2(\mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2)^d\) where \(d:=\max \{\deg (f_n'+\mathtt{z}g_n'),n/2\}\). We deduce

$$\begin{aligned} f_n'+\mathtt{z}g_n'+M_\beta ^2(\mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2)^d>_\beta 0 \end{aligned}$$

for each \(\beta \in {{\mathcal {U}}}\). Define

$$\begin{aligned} {{\mathcal {V}}}_\beta :=\{\gamma \in {\text {Sper}}(B):\ f_n'+\mathtt{z}g_n'+M_\beta ^2(\mathtt{x}^2+\mathtt{y}^2+\mathtt{z}^2)^d>_\gamma 0\}, \end{aligned}$$

which is an open subset of \({\text {Sper}}(B)\) that contains \(\beta \). As \({{\mathcal {U}}}\) is by [3, Cor.7.1.13] compact, there exist \(\beta _1,\ldots ,\beta _s\in {{\mathcal {U}}}\) such that \({{\mathcal {U}}}\subset \bigcup _{i=1}^s{{\mathcal {V}}}_{\beta _i}\). Define

$$\begin{aligned} f_n&:=f_n'+\sum _{i=1}^sM_{\beta _i}^2(\mathtt{x}^2+\mathtt{y}^2+F^2)^d,\\ g_n&:=g_n'. \end{aligned}$$

As \(\mathtt{z}^2-F=0\) in B, we deduce \(f_n+\mathtt{z}g_n\in {{\mathcal {P}}}(B)\), \(\omega (f-f_n)\ge \min \{2d,n\}=n\) and \(\omega (g-g_n)=\omega (g-g_n')=n\), as required. \(\square \)

4.2.1 Strong Artin’s approximation and bounded Pythagoras numbers.

To prove the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) for the rings \(A=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) in the list of Theorem 1.8 we need also that the Pythagoras numbers of the rings A are finite. This is due to the use of Strong Artin’s approximation we make: To represent \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) as a sum of squares in A we find for each \(n\ge 1\) elements \(f_n+\mathtt{z}g_n\in {\Sigma {A}^2}\) such that \(\omega (f-f_n),\omega (g-g_n)\ge n\). Thus, there exist \(a_{ni},b_{ni},q_n\in \kappa [[\mathtt{x},\mathtt{y}]]\) for \(i=1,\ldots ,p_n\) such that

$$\begin{aligned} f_n+\mathtt{z}g_n=\sum _{i=1}^{p_n}(a_{ni}+\mathtt{z}b_{ni})^2+(\mathtt{z}^2-F)q_n. \end{aligned}$$

Consequently, the polynomial equation

$$\begin{aligned} f+\mathtt{z}g=(\mathtt{X}_1+\mathtt{z}\mathtt{Y}_1)^2+\cdots +(\mathtt{X}_{p_n}+\mathtt{z}\mathtt{Y}_{p_n})^2+(\mathtt{z}^2-F)\mathtt{Z} \end{aligned}$$

has a solution \(\mod {{\mathfrak {m}}}_2^n\) in \(\kappa [[\mathtt{x},\mathtt{y}]]\) for each \(n\ge 1\). To apply Strong Artin’s approximation we need that the sequence of positive integers \(\{p_n\}_{n\ge 1}\) is bounded by some positive integer \(p<+\infty \). Indeed, this fact implies that the polynomial equation

$$\begin{aligned} f+\mathtt{z}g=(\mathtt{X}_1+\mathtt{z}\mathtt{Y}_1)^2+\cdots +(\mathtt{X}_p+\mathtt{z}\mathtt{Y}_p)^2+(\mathtt{z}^2-F)\mathtt{Z} \end{aligned}$$

has a solution \(\mod {{\mathfrak {m}}}_2^n\) in \(\kappa [[\mathtt{x},\mathtt{y}]]\) for each \(n\ge 1\). Now, by Strong Artin’s approximation there exist \(a_i,b_i,q\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that

$$\begin{aligned} f+\mathtt{z}g=(a_1+\mathtt{z}b_1)^2+\cdots +(a_p+\mathtt{z}b_p)^2+(\mathtt{z}^2-F)q, \end{aligned}$$

so \(f+\mathtt{z}g\in {\Sigma _p{A}^2}\subset {\Sigma {A}^2}\).

To guarantee that the sequence of positive integers \(\{p_m\}_{m\ge 1}\) associated to each \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) is bounded, it seems natural to ask that the Pythagoras number p(A) of the ring A is bounded. By Theorem 1.7 and Eq. (1.1) we have \(p(A)\le 4\tau (\kappa )\) and thefore the hypothesis \(\tau (\kappa )<+\infty \) appears in the statements of Theorem 1.8 and Corollary 1.9.

We are ready to present the polynomial reduction.

Corollary 4.4

(Polynomial reduction) Let \(F\in \kappa [\mathtt{x},\mathtt{y}]\) be such that \(F(0,0)=0\), let \({{\mathfrak {m}}}:=(\mathtt{x},\mathtt{y},\mathtt{z})\kappa [\mathtt{x},\mathtt{y},\mathtt{z}]\) and \(B:=\kappa [\mathtt{x},\mathtt{y},\mathtt{z}]/(\mathtt{z}^2-F)\). Let \({\widehat{B}}:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) be its \({{\mathfrak {m}}}\)-adic completion and \(\mathtt{i}:B\hookrightarrow {\widehat{B}}\) the canonical map. If there exists an integer \(p\ge 1\) such that \(\mathtt{i}({{\mathcal {P}}}(B))\subset {\Sigma _p{{\widehat{B}}}^2}\), then \({{\mathcal {P}}}({\widehat{B}})={\Sigma _p{{\widehat{B}}}^2}\).

Proof

Let \(f+\mathtt{z}g\in {{\mathcal {P}}}({\widehat{B}})\) and fix \(n\ge 1\). By Lemma 4.3 there exist polynomials \(f_n,g_n\in \kappa [\mathtt{x},\mathtt{y}]\) such that \(f_n+\mathtt{z}g_n\in {{\mathcal {P}}}(B)\) and \(\omega (f-f_n),\omega (g-g_n)\ge n\). By hypothesis \(\mathtt{i}({{\mathcal {P}}}(B))\subset {\Sigma _p{{\widehat{B}}}^2}\) for some \(p\ge 1\). There exist \(a_{ni},b_{ni},q_n\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that

$$\begin{aligned} f_n+\mathtt{z}g_n=\sum _{i=1}^p(a_{ni}+\mathtt{z}b_{ni})^2+(\mathtt{z}^2-F)q_n. \end{aligned}$$

Consequently,

$$\begin{aligned} f+\mathtt{z}g\equiv \sum _{i=1}^p(a_{ni}+\mathtt{z}b_{ni})^2+(\mathtt{z}^2-F)q_n\mod {{\mathfrak {m}}}_2^n. \end{aligned}$$

Thus, the polynomial equation

$$\begin{aligned} f+\mathtt{z}g=\sum _{i=1}^p(\mathtt{X}_i+\mathtt{z}\mathtt{Y}_i)^2+(\mathtt{z}^2-F)\mathtt{Z} \end{aligned}$$

has a solution \(\mod {{\mathfrak {m}}}_2^n\) for each \(n\ge 1\). By Strong Artin’s approximation we conclude \(f+\mathtt{z}g\in {\Sigma _p{{\widehat{B}}}^2}\), as required. \(\square \)

5 Proof of Theorem 1.8

In this section we prove Theorem 1.8. We may assume: \(A=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/{{\mathfrak {a}}}\) is a formal ring and by Theorem 3.11 that \({{\mathfrak {a}}}\) is a principal ideal generated by a series of the type \(\mathtt{z}^2-F\) where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\). The strategy to prove [15, Thm.1.3] consists of starting with two special cases: the rings \({{\mathbb {R}}}\{\mathtt{x},\mathtt{y}\}\) and \({{\mathbb {R}}}\{\mathtt{x},\mathtt{y},\mathtt{z}\}/(\mathtt{z}^2-\mathtt{x}^3-\mathtt{y}^5)\). Both rings have the following common property: They are factorial rings and their complexifications \({{\mathbb {C}}}\{\mathtt{x},\mathtt{y}\}\) and \({{\mathbb {C}}}\{\mathtt{x},\mathtt{y},\mathtt{z}\}/(\mathtt{z}^2-\mathtt{x}^3-\mathtt{y}^5)\) are also factorial rings [9, 41]. Using these two facts and that \(\tau ({{\mathbb {R}}}((\mathtt{t})))=1\), one shows that every positive semidefinite element of these rings is a sum of two squares of elements of such rings, see [8, Thm.2.5 (3)] and [34]. In our setting it would be natural to choose as special cases: \(\kappa [[\mathtt{x},\mathtt{y}]]\) and \(\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-\mathtt{x}^3-\mathtt{y}^5)\) where \(\kappa \) is a (formally) real field with \(\tau (\kappa )<+\infty \). Both rings are factorial and if we tensor them by \(-\otimes _\kappa \kappa [\sqrt{-1}]\), these new rings are again factorial [9, 41]. The problem is that the property \(\tau (\kappa ((\mathtt{t})))=1\) does not hold anymore! (if \(\tau (\kappa )>1\)) and we cannot imitate the same procedure. This means that different ideas were needed (Theorem 5.5) and the problem stayed apart from any significant progress for quite long. The case \(\kappa [[\mathtt{x},\mathtt{y}]]\) where \(\kappa \) is any field was solved by Scheiderer in [36, Thm.4.1] (in fact, he proved \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) for all 2-dimensional regular local rings). We include for the sake of completeness here a slightly different proof of [36, Thm.4.1] when \(\kappa \) is a (formally) real field.

Theorem 5.1

Let \(\kappa \) be a (formally) field. Then \({{\mathcal {P}}}(\kappa [[\mathtt{x}]][\mathtt{y}])={\Sigma {\kappa [[\mathtt{x}]][\mathtt{y}]}^2}\) and \({{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])={\Sigma {\kappa [[\mathtt{x},\mathtt{y}]]}^2}\).

Proof

Let f belong to either \({{\mathcal {P}}}(\kappa [[\mathtt{x}]][\mathtt{y}])\) or \({{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). By Lemma 4.3 and Corollary 4.4 we may assume

$$\begin{aligned} f\in {{\mathcal {P}}}(\kappa [\mathtt{x},\mathtt{y}])\subset {{\mathcal {P}}}(\kappa ((\mathtt{x}))[\mathtt{y}]) \subset {{\mathcal {P}}}(\kappa ((\mathtt{x}))(\mathtt{y}))={\Sigma {\kappa ((\mathtt{x}))(\mathtt{y})}^2}. \end{aligned}$$

By [5, Thm.1] \(f\in {\Sigma {\kappa ((\mathtt{x}))[\mathtt{y}]}^2}\). Thus, there exist \(a_1,\ldots ,a_p\in \kappa ((\mathtt{x}))[\mathtt{y}]\) such that \(f=\sum _{k=1}^pa_k^2\). Let \(\ell \ge 1\) be such that \(b_k=\mathtt{x}^\ell a_k\in \kappa [[\mathtt{x}]][\mathtt{y}]\) for each \(k=1,\ldots ,p\). We have

$$\begin{aligned} \mathtt{x}^{2\ell }f=\sum _{k=1}^pb_k^2(\mathtt{x},\mathtt{y}). \end{aligned}$$

Setting \(\mathtt{x}=0\), we deduce \(0=\sum _{k=1}^pb_k(0,\mathtt{y})^2\). As \(\kappa \) is a (formally) real field, each \(b_k(0,\mathtt{y})=0\), so \(\mathtt{x}\) divides each \(b_k\). Thus, there exists \(b_k'\in \kappa [[\mathtt{x}]][\mathtt{y}]\) such that \(b_k=\mathtt{x}b_k'\). Hence,

$$\begin{aligned} \mathtt{x}^{2\ell -2}f=\sum _{k=1}^pb_k'^2(\mathtt{x},\mathtt{y}). \end{aligned}$$

Proceeding inductively we conclude \(f\in {\Sigma {\kappa [[\mathtt{x}]][\mathtt{y}]}^2}\subset {\Sigma {\kappa [[\mathtt{x},\mathtt{y}]]}^2}\), as required. \(\square \)

5.1 Order two cases

Let \(\kappa \) be a (formally) real field such that \(\tau (\kappa )<+\infty \). To prove the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) for those rings \(A=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the series in the following list:

  1. (i)

    \(a\mathtt{x}^2+b\mathtt{y}^{2k}\) where \(a\in {\Sigma {\kappa }^2}\), \(a,b\ne 0\) and \(k\ge 1\),

  2. (ii)

    \(a\mathtt{x}^2+\mathtt{y}^{2k+1}\) where \(a\in {\Sigma {\kappa }^2}\), \(a\ne 0\) and \(k\ge 1\),

  3. (iii)

    \(a\mathtt{x}^2\) where \(a\in {\Sigma {\kappa }^2}\) and \(a\ne 0\),

we develop a strategy similar to the one presented in [15] to prove its main result. Namely, we relate the problem of proving \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) for each ring A above to the already known property (Theorem 5.1) for the ring \(\kappa [[\mathtt{x},\mathtt{y}]]\) via suitable blow-ups. During the process certain ‘denominators’ appear that we have to ‘erase’. To that end we develop the following procedure.

Lemma 5.2

(Erasure of denominators) Let \(\kappa \) be a (formally) real field, \(k\ge 1\) a positive integer and \(h,g\in \kappa [[\mathtt{x},\mathtt{y}]]\) relatively prime series such that h generates a real radical ideal. Suppose that there exist polynomials \(f,a_1,\ldots ,a_p,b\in \kappa [[\mathtt{x},\mathtt{y}]][\mathtt{z}]\) of degree \(\le k-1\) (with respect to \(\mathtt{z}\)) and an integer \(r\ge 0\) such that

$$\begin{aligned} h^{2r}f=a_1^2+\cdots +a_p^2-b(\mathtt{z}^k-hg). \end{aligned}$$
(5.1)

Then there exist polynomials \(a_1',\ldots ,a_p',b'\in \kappa [[\mathtt{x},\mathtt{y}]][\mathtt{z}]\) of degree \(\le k-1\) (with respect to \(\mathtt{z}\)) such that \(f=a_1'^2+\cdots +a_p'^2-b'(\mathtt{z}^k-hg)\).

Proof

Set \(a_i:=\sum _{j=0}^{k-1}a_{ij}\mathtt{z}^j\), \(b:=\sum _{j=0}^{k-1}b_{j}\mathtt{z}^j\) and \(f:=\sum _{j=0}^{k-1}f_{j}\mathtt{z}^j\) where \(a_{ij},b_j,f_j\in \kappa [[\mathtt{x},\mathtt{y}]]\). Comparing coefficients with respect to \(\mathtt{z}\) in (5.1) we find the following collection of equalities

$$\begin{aligned} \begin{array}{rrcl} (0)&{} h^{2r}f_0-hgb_0&{}=&{}\sum _{i=1}^pa_{i0}^2,\\ (1)&{} h^{2r}f_1-hgb_1&{}=&{}2\sum _{i=1}^pa_{i0}a_{i1},\\ &{}&{}\vdots &{} \\ (\ell )&{}h^{2r}f_\ell -hgb_\ell &{}=&{}\sum _{i=1}^p\Big (\sum _{j+m=\ell }a_{ij}a_{im}\Big ),\\ &{}&{}\vdots &{} \\ (k-1)&{}h^{2r}f_{k-1}-hgb_{k-1}&{}=&{}\sum _{i=1}^p\Big (\sum _{j+m=k-1}a_{ij}a_{im}\Big ),\\ (k)&{}b_0&{}=&{}\sum _{i=1}^p\Big (\sum _{j+m=k}a_{ij}a_{im}\Big ),\\ &{}&{}\vdots &{} \\ (k+\ell )&{} b_\ell &{}=&{}\sum _{i=1}^p\Big (\sum _{j+m=k+\ell }a_{ij}a_{im}\Big ),\\ &{}&{}\vdots &{} \\ (2k-2)&{} b_{k-2}&{}=&{}\sum _{i=1}^pa_{ik-1}^2,\\ (2k-1)&{} b_{k-1}&{}=&{}0. \end{array} \end{aligned}$$

We claim: h divides \(a_{i\ell }\) and \(b_\ell \) for each \(\ell =0,\ldots ,k-1\) and \(i=1,\ldots ,p\).

We use induction hypothesis to prove the claim. For \(\ell =0\) we have \(h^{2r}f_0-hgb_0=\sum _{i=1}^pa_{i0}^2\). As h generates a real radical ideal and hg are relatively prime, we deduce that h divides each \(a_{i0}\) and \(b_0\). Let \(\ell <k\) and assume h divides \(a_{ij},b_j\) for \(i=1,\ldots ,p\) and \(1\le j\le \ell -1\). If \(2\ell \le k-1\),

$$\begin{aligned} h^{2r}f_{2\ell }-hgb_{2\ell }=\sum _{i=1}^p\Big (\sum _{j+m=2\ell ,j\ne m}a_{ij}a_{im}\Big )+\sum _{i=1}^pa_{i\ell }^2. \end{aligned}$$

As h divides \(a_{i0},\ldots ,a_{i,\ell -1}\), we deduce h divides \(a_{i\ell }\) for each i. If \(2\ell >k-1\), then:

$$\begin{aligned} b_{2\ell -k}=\sum _{i=1}^p\Big (\sum _{j+m=2\ell ,j\ne m}a_{ij}a_{im}\Big )+\sum _{i=1}^pa_{i\ell }^2. \end{aligned}$$

As \(\ell \le k-1\), we have \(2\ell -k\le \ell -1\) and by induction hypothesis h divides \(b_{2\ell -k}\). By induction hypothesis also h divides \(a_{i0},\ldots ,a_{i,\ell -1}\), so h divides \(a_{i\ell }\) for each i. Using equation \((\ell )\) we conclude that h divides \(b_\ell \), as claimed.

Now we use equations (k), \(\ldots \), \((2k-2)\) to prove that in fact \(h^2\) divides \(b_\ell \) for \(0\le \ell \le k-2\). Thus, we can divide Eq. (5.1) by \(h^2\) (use here that \(\kappa [[\mathtt{x},\mathtt{y}]][\mathtt{z}]\) is an integral domain). Repeating the previous process \(r-1\) times one proves the required statement. \(\square \)

Before proving Theorem 1.8 for the order two cases we need an additional result.

Lemma 5.3

Let \(\kappa \) be a (formally) real field, let \(a\in {\Sigma {\kappa }^2}{\setminus }\{0\}\) and \(\varphi ,\psi \in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) be such that \(\psi \) is a sum of squares in \(B:=\kappa [\sqrt{a}][[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\varphi )\). Then \(\psi \) is a sum of squares in \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\varphi )\).

Proof

If \(\sqrt{a}\in \kappa \), the result is trivial, so we assume \(\sqrt{a}\not \in \kappa \). Consider the \(\kappa \)-involution

$$\begin{aligned} \sigma :\kappa [\sqrt{a}]\rightarrow \kappa [\sqrt{a}],\ b+\sqrt{a}c\mapsto b-\sqrt{a}c \end{aligned}$$

and the induced \(\kappa \)-involution

$$\begin{aligned} (\cdot )^\sigma :\kappa [\sqrt{a}][[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\varphi )\rightarrow \kappa [\sqrt{a}][[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\varphi ),\\ f:=\sum _{\nu }a_\nu \mathtt{x}^{\nu _1}\mathtt{y}^{\nu _2}\mathtt{z}^{\nu _3}\mapsto f^\sigma :=\sum _{\nu }\sigma (a_\nu )\mathtt{x}^{\nu _1}\mathtt{y}^{\nu _2}\mathtt{z}^{\nu _3} \end{aligned}$$

where \(\nu :=(\nu _1,\nu _2,\nu _3)\). As \(\psi \in {\Sigma {B}^2}\), there exist \(a_i,b_i,q_1,q_2\in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\) such that

$$\begin{aligned} \psi= & {} \sum _{i=1}^p(a_i+\sqrt{a}b_i)^2+(q_1+\sqrt{a}q_2)\varphi \\= & {} \sum _{i=1}^pa_i^2+a\Big (\sum _{i=1}^pb_i^2\Big )+q_1\varphi +\sqrt{a}\Big (q_2\varphi +2\sum _{i=1}^pa_ib_i\Big ). \end{aligned}$$

We apply the \(\kappa \)-involution \((.)^\sigma \) to the previous equality and obtain

$$\begin{aligned} \psi= & {} \sum _{i=1}^p(a_i-\sqrt{a}b_i)^2+(q_1-\sqrt{a}q_2)\varphi \\= & {} \sum _{i=1}^pa_i^2+a\Big (\sum _{i=1}^pb_i^2\Big )+q_1\varphi -\sqrt{a}\Big (q_2\varphi +2\sum _{i=1}^pa_ib_i\Big ). \end{aligned}$$

Adding both equalities and dividing by 2 we achieve

$$\begin{aligned} \psi =\sum _{i=1}^pa_i^2+a\Big (\sum _{i=1}^pb_i^2\Big )+q_1\varphi . \end{aligned}$$

As \(a\in {\Sigma {\kappa }^2}\), we deduce \(\psi \in {{\mathcal {P}}}(A)\), as required. \(\square \)

We are now ready to prove Theorem 1.8 for the rings \(A=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the series of order two quoted in its statement.

Theorem 5.4

(Order two) Let \(\kappa \) be a (formally) real field such that \(\tau (\kappa )<+\infty \). Set \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the following series:

  1. (i)

    \(a\mathtt{x}^2+b\mathtt{y}^{2k}\) where \(a\in {\Sigma {\kappa }^2}\), \(b\ne 0\) and \(k\ge 1\),

  2. (ii)

    \(a\mathtt{x}^2+\mathtt{y}^{2k+1}\) where \(a\in {\Sigma {\kappa }^2}\) and \(k\ge 1\),

  3. (iii)

    \(a\mathtt{x}^2\) where \(a\in {\Sigma {\kappa }^2}\).

Then \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) and \(p(A)\le 4\tau (\kappa )\).

Proof

We denote \(B:=\kappa [\mathtt{x},\mathtt{y},\mathtt{z}]/(\mathtt{z}^2-F)\) in such a way that \({\widehat{B}}=A\). As \(\tau (\kappa )<+\infty \), it holds \({{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])={\Sigma _{p_0}{\kappa [[\mathtt{x},\mathtt{y}]]}^2}\) and \({{\mathcal {P}}}(\kappa [[\mathtt{x}]][\mathtt{y}])={\Sigma _{p_0}{\kappa [[\mathtt{x}]][\mathtt{y}]}^2}\) for \(p_0:=2\tau (\kappa )\). Let \(\mathtt{i}:B\rightarrow {\widehat{B}}=A\). Along the proof it is enough to show that \(\mathtt{i}({{\mathcal {P}}}(B))\subset {\Sigma _p{A}^2}\) for \(p:=4\tau (\kappa )\).

(i) and (ii) Assume first \(a=1\) and \(F:=\mathtt{x}^2+b\mathtt{y}^k\). After the linear change of coordinates \((\mathtt{x},\mathtt{y},\mathtt{z})\mapsto (\frac{\mathtt{z}-\mathtt{x}}{2},\mathtt{y},\frac{\mathtt{z}+\mathtt{x}}{2})\) we assume that our equation is \(b\mathtt{y}^k-\mathtt{x}\mathtt{z}\). Consider the rational substitution \((\mathtt{y},\mathtt{z})\mapsto (\frac{b\mathtt{y}^k}{\mathtt{z}},\mathtt{y},\mathtt{z})\). Take \(P\in {{\mathcal {P}}}(B)\) (of degree \(\le k-1\) with respect to \(\mathtt{y}\)) and write

$$\begin{aligned} P\Big (\frac{\mathtt{y}^k}{\mathtt{z}},\mathtt{y},\mathtt{z}\Big )=\frac{Q}{\mathtt{z}^r} \end{aligned}$$

where \(r\ge 1\) and \(Q\in \kappa [\mathtt{y},\mathtt{z}]\). By Lemma 2.8 the product \(\mathtt{z}^rQ\in {{\mathcal {P}}}(\kappa [\mathtt{y},\mathtt{z}])\subset {{\mathcal {P}}}(\kappa [[\mathtt{y},\mathtt{z}]]) ={\Sigma _p{\kappa [[\mathtt{x},\mathtt{y}]]}^2}\). Thus, there exist \(a_1,\ldots ,a_p\in \kappa [[\mathtt{y},\mathtt{z}]]\) such that

$$\begin{aligned} \mathtt{z}^{2r}P\Big (\frac{\mathtt{y}^k}{\mathtt{z}},\mathtt{y},\mathtt{z}\Big )=\mathtt{z}^rQ=a_1^2+\cdots +a_p^2. \end{aligned}$$

We rewrite the previous equation as

$$\begin{aligned} \mathtt{z}^{2r}P(\mathtt{x},\mathtt{y},\mathtt{z})=a_1^2(\mathtt{y},\mathtt{z})+\cdots +a_p^2(\mathtt{y},\mathtt{z})+(b\mathtt{y}^k-\mathtt{x}\mathtt{z})q(\mathtt{x},\mathtt{y},\mathtt{z}), \end{aligned}$$

where \(q\in \kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]\). By Weierstrass division theorem there exist \(a_1',\ldots ,a_p',q'\in \kappa [[\mathtt{x},\mathtt{z}]][\mathtt{y}]\) of degree \(\le k-1\) with respect to \(\mathtt{y}\) such that

$$\begin{aligned} \mathtt{z}^{2r}P(\mathtt{x},\mathtt{y},\mathtt{z})=a_1'^2+\cdots +a_p'^2+(b\mathtt{y}^k-\mathtt{x}\mathtt{z})q'. \end{aligned}$$

By Lemma 5.2P is a sum of p squares in A.

In the following we approach the case when \(a\in {\Sigma {\kappa }^2}{\setminus }\{0\}\). Consider the inclusion

$$\begin{aligned} \mathtt{i}:A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\hookrightarrow A':=\kappa [\sqrt{a}][[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F) \end{aligned}$$

and the isomorphism of rings

$$\begin{aligned} \Phi :A'\rightarrow B':=\kappa [\sqrt{a}][[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F'),\ h\mapsto h\Big (\frac{\mathtt{x}}{\sqrt{a}},\mathtt{y},\mathtt{z}\Big ), \end{aligned}$$

where

$$\begin{aligned} F'={\left\{ \begin{array}{ll} \mathtt{x}^2+b\mathtt{y}^{2k}&{}\text {if }F=a\mathtt{x}^2+b\mathtt{y}^{2k},\\ \mathtt{x}^2+\mathtt{y}^{2k+1}&{}\text {if }F=a\mathtt{x}^2+\mathtt{y}^{2k+1}. \end{array}\right. } \end{aligned}$$

Let \(f,g\in \kappa [[\mathtt{x},\mathtt{y}]]\) be such that \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\). Then \(\Phi (f+\mathtt{z}g)\in {{\mathcal {P}}}(B')={\Sigma {B'}^2}\) (as we have proved above, when we assumed \(a=1\) and \(F=\mathtt{x}^2+b\mathtt{y}^k\)). Thus, \(f+\mathtt{z}g\in {\Sigma {A'}^2}\), so by Lemma 5.3\(f+\mathtt{z}g\in {\Sigma {A}^2}\). In addition, by [25, Prop.2.7] \(p(A)\le 4\tau (\kappa )\).

(iii) We use a ‘limit argument’. Let \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) and \(n\ge 1\). As \(a\in {\Sigma {\kappa }^2}{\setminus }\{0\}\),

$$\begin{aligned}&f\in {{\mathcal {P}}}(\{a\mathtt{x}^2\ge 0\})={{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]),\\&f^2-a\mathtt{x}^2g^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

If \(k\ge 2n+1\), we have \(2k-4n\ge 2\) and

$$\begin{aligned} (f+\mathtt{x}^{2n}+\mathtt{y}^{2n})^2-(a\mathtt{x}^2+\mathtt{y}^{2k})g^2=(f^2-a\mathtt{x}^2g^2) +2f(\mathtt{x}^{2n}+\mathtt{y}^{2n})\\ +\mathtt{x}^{4n}+2x^{2n}\mathtt{y}^{2n}+\mathtt{y}^{4n}(\sqrt{1-\mathtt{y}^{2k-4n}g^2})^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

As \(f+\mathtt{x}^{2n}+\mathtt{y}^{2n}\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])={{\mathcal {P}}}(\{a\mathtt{x}^2+\mathtt{y}^{2k}\ge 0\})\), we deduce \(f+\mathtt{x}^{2n}+\mathtt{y}^{2n}+\mathtt{z}g\in {{\mathcal {P}}}(A_k)\) where \(A_k:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-a\mathtt{x}^2-\mathtt{y}^{2k})\). As \({{\mathcal {P}}}(A_k)={\Sigma _p{A_k}^2}\) where \(p:=4\tau (\kappa )\), there exist \(a_{in},b_{in},q_n\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that

$$\begin{aligned} f+(\mathtt{x}^{2n}+\mathtt{y}^{2n})+\mathtt{z}g=(a_{1n}+\mathtt{z}b_{1n})^2+\cdots +(a_{pn}+\mathtt{z}b_{pn})^2-(\mathtt{z}^2-a\mathtt{x}^2-\mathtt{y}^{2k})q_n. \end{aligned}$$

Consequently,

$$\begin{aligned} f+\mathtt{z}g\equiv (a_{1n}+\mathtt{z}b_{1n})^2+\cdots +(a_{pn}+\mathtt{z}b_{pn})^2-(\mathtt{z}^2-a\mathtt{x}^2)q_n\ \mod {{\mathfrak {m}}}_2^{2n}. \end{aligned}$$

By Strong Artin’s approximation there exist \(a_i,b_i,q\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that

$$\begin{aligned} f+\mathtt{z}g=(a_1+\mathtt{z}b_1)^2+\cdots +(a_p+\mathtt{z}b_p)^2-(z^2-ax^2)q\in {\Sigma {A}^2}, \end{aligned}$$

as required. \(\square \)

5.2 Order three cases

Let \(\kappa \) be a (formally) real field such that \(\tau (\kappa )<+\infty \). To prove the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) for those rings \(A=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the series in the following list:

  1. (iv)

    \(\mathtt{x}^2\mathtt{y}+(-1)^ka\mathtt{y}^k\) where \(a\not \in -{\Sigma {\kappa }^2}\) and \(k\ge 3\),

  2. (v)

    \(\mathtt{x}^2\mathtt{y}\),

  3. (vi)

    \(\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\) irreducible,

  4. (vii)

    \(\mathtt{x}^3+a\mathtt{y}^4\) where \(a\not \in -{\Sigma {\kappa }^2}\),

  5. (viii)

    \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\),

  6. (ix)

    \(\mathtt{x}^3+\mathtt{y}^5\),

we develop a substantially different strategy to the one presented in [15]. As commented above if \(\tau (\kappa )>1\), the classical procedure to face the qualitative problem for Brieskorn’s singularity \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-\mathtt{x}^3-\mathtt{y}^5)\) does not work and new ideas are needed. In fact, we are going to provide a general tool (Theorem 5.5) that allows to solve all the cases of the list in Theorem 1.8 when \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) has order three.

The formulation of this tool is quite technical (because it also points out the obstructions to obtain the property \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) for the rings A satisfying the hypotheses in Theorem 5.5). We suggest the reader the following initial interpretation of Theorem 5.5 for a better understanding: If \(F\in \kappa [[\mathtt{y}]][\mathtt{x}]\) is a Weierstrass polynomial of order and degree 3 that satisfies some mild conditions and all the positive elements of \(f+\mathtt{z}g\in A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) such that \(f(\mathtt{x},0)\ne 0\) satisfies \(\omega (f(\mathtt{x},0))\ge 2\), then \({{\mathcal {P}}}(A)={\Sigma _p{A}^2}\) for \(p:=4\tau (\kappa )\). In addition, the rings A (satisfying the hypotheses of Theorem 5.5) such that \({{\mathcal {P}}}(A)\ne {\Sigma {A}^2}\) arise when there exist positive semidefinite elements \(f+\mathtt{z}g\in A\) such that \(f(\mathtt{x},0)\ne 0\) and \(\omega (f(\mathtt{x},0))=1\).

Theorem 5.5

(Elephant’s Theorem) Let \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) be a series of order 3 with \(\omega (F(\mathtt{x},0))=3\) and \(F(0,\mathtt{y}))=b\mathtt{y}^{\rho }v\) where \(v\in \kappa [[\mathtt{y}]]\) is a unit such that \(v(0)=1\), \(b\in \kappa {\setminus }\{0\}\) and \(\rho \ge 3\) is either odd or if it is even, we have in addition \(b\not \in -{\Sigma {\kappa }^2}\). Let \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) and \(f+\mathtt{z}g\in {{\mathcal {P}}}(A){\setminus }\{0\}\). We obtain:

  1. (i)

    There exist \(s\ge 1\) and \(f_1+\mathtt{z}g_1\in {{\mathcal {P}}}(A)\) such that \(f_1(\mathtt{x},0)\ne 0\) and \(f+\mathtt{z}g=\mathtt{y}^{2s}(f_1+\mathtt{z}g_1)\). In addition, if \(\omega (f_1(\mathtt{x},0))=q\ge 2\), then \(\omega (g_1)\ge 1\).

  2. (ii)

    If \(\omega (f(\mathtt{x},0))=q\ge 2\) and F is \(\rho \)-quasidetermined, then \(f+\mathtt{z}g\in {\Sigma _p{A}^2}\) where \(p:=4\tau (\kappa )\).

Before proving this theorem, we develop some preliminary results.

Lemma 5.6

Let A be a ring of characteristic 0 and \(P:=a_0+a_1\mathtt{z}+a_2\mathtt{z}^2\in A[\mathtt{z}]\). Then \(P\in {{\mathcal {P}}}(A[\mathtt{z}])\) if and only if \(a_0,a_2,4a_0a_2-a_1^2\in {{\mathcal {P}}}(A)\).

Proof

Suppose first that \(P\in {{\mathcal {P}}}(A[\mathtt{z}])\). Let \(\alpha \in {\text {Sper}}(A)\) and let us check: \(a_0\ge _\alpha 0\), \(a_2\ge _\alpha 0\) and \(4a_0a_2-a_1^2\ge _\alpha 0\).

Set \((K(\alpha ):={\text {qf}}(A/{\text {supp}}(\alpha )),<_\alpha )\) and denote \(\theta _i:=a_i+{\text {supp}}(\alpha )\) for \(i=0,1,2\). Consider the homomorphism \(\phi :A[\mathtt{z}]\rightarrow K(\alpha ),\ Q(\mathtt{z})\mapsto Q(0)+{\text {supp}}(\alpha )\). We have \(\phi (P)=\theta _0\ge _\alpha 0\), so \(a_0\ge _\alpha 0\). We claim: If \(\theta _2=0\), then \(\theta _1=0\). If such is the case, then \(4\theta _0\theta _2-\theta _1^2=0\).

Otherwise, consider the homomorphism

$$\begin{aligned} \gamma :A[\mathtt{z}]\rightarrow K(\alpha ),\ Q\mapsto Q\Big (\frac{-\theta _0-1}{\theta _1}\Big ) \end{aligned}$$

and observe that \(-1=\gamma (P)\ge _\alpha 0\), which is a contradiction.

Assume in the following \(\theta _2\ne 0\). Consider the homomorphism

$$\begin{aligned} \varphi :A[\mathtt{z}]\rightarrow K(\alpha ),\ Q(\mathtt{z})\mapsto Q\Big (\frac{\theta _1^2}{\theta _2^2}+\frac{\theta _0^2}{\theta _2^2}+1\Big ). \end{aligned}$$

We have

$$\begin{aligned} \varphi (P)=&\theta _2\Big (\Big (\frac{\theta _1^2}{\theta _2^2} +\frac{\theta _0^2}{\theta _2^2}+1\Big )^2+\frac{\theta _1}{\theta _2} \Big (\frac{\theta _1^2}{\theta _2^2}+\frac{\theta _0^2}{\theta _2^2}+1\Big ) +\frac{\theta _0}{\theta _2}\Big )\\ =&\theta _2\Big (\frac{\theta _1^2}{\theta _2^2}\Big (\frac{\theta _1}{\theta _2}+\frac{1}{2}\Big )^2+\Big (\frac{\theta _0^2}{\theta _2^2} +\frac{\theta _1}{2\theta _2}\Big )^2+\Big (\frac{\theta _1}{\theta _2} +\frac{1}{2}\Big )^2+\Big (\frac{\theta _0}{\theta _2}+\frac{1}{2}\Big )^2\\&+\frac{2\theta _1^2\theta _0^2}{\theta _2^4}+\frac{\theta _1^2}{2\theta _2^2} +\frac{\theta _0^2}{\theta _2^2}+\frac{1}{2}\Big ). \end{aligned}$$

As \(\varphi (P)\ge _\alpha 0\), we deduce \(a_2\ge _\alpha 0\).

We prove next that \(4a_0a_2-a_1^2\ge _\alpha 0\). Write

$$\begin{aligned} \theta _2\mathtt{z}^2+\theta _1\mathtt{z}+\theta _0=\theta _2\Big (\Big (\mathtt{z}+\frac{\theta _1}{2\theta _2}\Big )^2+\frac{\theta _0}{\theta _2} -\frac{\theta _1^2}{4\theta _2^2}\Big ). \end{aligned}$$

Consider the homomorphism

$$\begin{aligned} \psi :A[\mathtt{z}]\rightarrow K(\alpha ),\ Q\mapsto Q\Big (-\frac{\theta _1}{2\theta _2}\Big ) \end{aligned}$$

and, as \(\psi (P)=\theta _2((-\frac{\theta _1}{2\theta _2}+\frac{\theta _1}{2\theta _2})^2+\frac{\theta _0}{\theta _2}-\frac{\theta _1^2}{4\theta _2^2}) =\frac{4\theta _0\theta _2-\theta _1^2}{4\theta _2}\ge _\alpha 0\), we conclude \(4a_0a_2-a_1^2\ge _\alpha 0\).

Assume in the following that \(a_0,a_2,a_0a_2-a_1^2\in {{\mathcal {P}}}(A)\) and let us check: \(P\in {{\mathcal {P}}}(A[\mathtt{z}])\).

Let \(\beta \in {\text {Sper}}(A[\mathtt{z}])\) and consider the natural inclusion \(\mathtt{j:}A\hookrightarrow A[\mathtt{z}]\). Then \(\alpha :=\mathtt{j}^{-1}(\beta )\in {\text {Sper}}(A)\), and we consider the ordered field \((K(\alpha ):={\text {qf}}(A/{\text {supp}}(\alpha )),<_\alpha )\). Denote \(\eta _i:=a_i+{\text {supp}}(\alpha )\) for \(i=0,1,2\). We distinguish two cases:

Case 1. \(\eta _2=0\). As \(\eta _0\eta _2-\eta _1^2\ge _\alpha 0\), we deduce \(\eta _1=0\). Thus, \(P+{\text {supp}}(\beta )=\eta _0\ge _\alpha 0\). Consequently, \(P\ge _\beta 0\).

Case 2. \(\eta _2\ne 0\). As \(\eta _2\ge _\alpha 0\), to prove that \(P\ge _\beta 0\) it is enough to check \(\eta _2P\ge _\beta 0\). We have

$$\begin{aligned} \eta _2P+{\text {supp}}(\beta )=\eta _2(\eta _2\mathtt{z}^2+\eta _1\mathtt{z}+\eta _0) +{\text {supp}}(\beta )=\Big (\eta _2\mathtt{z}+\frac{1}{2}\eta _1\Big )^2+\frac{1}{4} (4\eta _0\eta _2-\eta _1^2)\ge _\beta 0. \end{aligned}$$

Thus, \(P\ge _\beta 0\).

We conclude \(P\in {{\mathcal {P}}}(A[\mathtt{z}])\), as required. \(\square \)

The previous result has its counterpart for sums of squares, which we include for the sake of completeness.

Lemma 5.7

Let A be an integral domain of characteristic 0 and \(P:=a_0+a_1\mathtt{z}+a_2\mathtt{z}^2\in A[\mathtt{z}]\). Then \(P\in {\Sigma _p{A[\mathtt{z}]}^2}\) if and only if the following polynomial system has a solution in \(A^{2p}\):

$$\begin{aligned}&\sum _{i=1}^p\mathtt{x}_i^2=a_0,\quad \sum _{j=1}^p\mathtt{y}_j^2=a_2,\\&\sum _{1\le i<j\le p}(2\mathtt{x}_i\mathtt{y}_j-2\mathtt{x}_j\mathtt{y}_i)^2=4a_0a_2-a_1^2. \end{aligned}$$

Proof

We will make use of Lagrange’s identity in the proof:

$$\begin{aligned}&\Big (\sum _{i=1}^p\mathtt{x}_i^2\Big )\Big (\sum _{j=1}^p\mathtt{y}_j^2\Big ) -\Big (\sum _{k=1}^p\mathtt{x}_k\mathtt{y}_k\Big )^2=\sum _{i=1}^p\sum _{j=1}^p \mathtt{x}_i^2\mathtt{y}_j^2-\sum _{i,j=1}^p\mathtt{x}_i\mathtt{y}_i\mathtt{x}_j\mathtt{y}_j\\&\quad =\sum _{i,j=1,\ i\ne j}^n\mathtt{x}_i^2\mathtt{y}_j^2-2\sum _{1\le i<j\le p}\mathtt{x}_i\mathtt{y}_i\mathtt{x}_j\mathtt{y}_j=\sum _{1\le i<j\le p}(\mathtt{x}_i\mathtt{y}_j-\mathtt{x}_j\mathtt{y}_i)^2. \end{aligned}$$

Suppose first \(P\in {\Sigma _p{A[\mathtt{z}]}^2}\). Then there exist \(\alpha _i,\beta _i\in A\) such that

$$\begin{aligned} a_0+a_1\mathtt{z}+a_2\mathtt{z}^2=\sum _{i=1}^p(\alpha _i+\mathtt{z}\beta _i)^2. \end{aligned}$$
(5.2)

Thus,

$$\begin{aligned} \sum _{i=1}^p\alpha _i^2=a_0,\quad \sum _{j=1}^p\beta _j^2=a_2,\quad 2 \sum _{k=1}^p\alpha _k\beta _k=a_1. \end{aligned}$$

We deduce

$$\begin{aligned} 4a_0a_2-a_1^2=4\Big (\sum _{i=1}^p\alpha _i^2\Big )\Big (\sum _{j=1}^p \beta _j^2\Big )-4\Big (\sum _{k=1}^p\alpha _k\beta _k\Big )^2=\sum _{1\le i<j\le p}(2\alpha _i\beta _j-2\alpha _j\beta _i)^2. \end{aligned}$$

Suppose next that the polynomial system

$$\begin{aligned} \sum _{i=1}^p\mathtt{x}_i^2=a_0,\quad \sum _{j=1}^p\mathtt{y}_j^2=a_2,\quad \sum _{1\le i<j\le p}(2\mathtt{x}_i\mathtt{y}_j-2\mathtt{x}_j\mathtt{y}_i)^2=4a_0a_2-a_1^2 \end{aligned}$$

has a solution \((\alpha _1,\ldots ,\alpha _p,\beta _1,\ldots ,\beta _p)\in A^{2p}\). Observe that

$$\begin{aligned} a_1^2=4\Big (\sum _{i=1}^p\alpha _i^2\Big )\Big (\sum _{j=1}^p\beta _j^2\Big ) -4\sum _{1\le i<j\le p}(\alpha _i\beta _j-\alpha _j\beta _i)^2=\Big (2\sum _{k=1}^p\alpha _k\beta _k \Big )^2. \end{aligned}$$

Consequently,

$$\begin{aligned} \Big (a_1-2\sum _{k=1}^p\alpha _k\beta _k\Big )\Big (a_1+2\sum _{k=1}^p \alpha _k\beta _k\Big )=0 \end{aligned}$$

and there exists \(\varepsilon =\pm 1\) such that \(a_1=2\varepsilon \sum _{k=1}^p\alpha _k\beta _k\). Thus,

$$\begin{aligned} a_0+a_1\mathtt{z}+a_2\mathtt{z}^2=\sum _{i=1}^p(\alpha _i+\mathtt{z}\varepsilon \beta _i)^2\in {\Sigma _p{A[\mathtt{z}]}^2}, \end{aligned}$$

as required. \(\square \)

We formalize the following result, which is a consequence of the main result of [25].

Lemma 5.8

Let \(\kappa \) be a (formally) real field with \(\tau (\kappa )<+\infty \) and \({\mathcal {Q}}:=a_0+a_1\mathtt{z}+a_2\mathtt{z}^2\in \kappa [[\mathtt{x},\mathtt{y}]][\mathtt{z}]\) a positive semidefinite quadratic polynomial. Then \({\mathcal {Q}}\) is a sum of \(p:=4\tau (\kappa )\) squares of polynomials of degree \(\le 1\) (with respect to \(\mathtt{z}\)) and coefficients in \(\kappa [[\mathtt{x},\mathtt{y}]]\).

Proof

By Lemma 5.6 we have \(a_0,a_2,4a_0a_2-a_1^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). Fix \(n\ge 1\) and observe that \(a_0+(\mathtt{x}^2+\mathtt{y}^2)^n,a_2+(\mathtt{x}^2+\mathtt{y}^2)^n\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]])\). In addition,

$$\begin{aligned}&4(a_0+(\mathtt{x}^2+\mathtt{y}^2)^n)(a_2+(\mathtt{x}^2+\mathtt{y}^2)^n)-a_1^2\\&\quad =(4a_0a_2-a_1^2)+4(a_0+a_2)(\mathtt{x}^2+\mathtt{y}^2)^n+4(\mathtt{x}^2+\mathtt{y}^2)^{2n} \in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

By Lemma 2.14 there exists \(r\ge 1\) such that if \(a_i-a_i'\in {{\mathfrak {m}}}_2^r\), then

$$\begin{aligned}&a_0'+(\mathtt{x}^2+\mathtt{y}^2)^n,a_2'+(\mathtt{x}^2+\mathtt{y}^2)^n,4(a_0'+(\mathtt{x}^2+\mathtt{y}^2)^n)\\&\quad (a_2'+(\mathtt{x}^2+\mathtt{y}^2)^n)-a_1'^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

In particular, we may assume that each \(a_i'\) is a polynomial and proceeding similarly to the proof of Lemma 4.3, we find \(M\in {\Sigma {\kappa }^2}\) such that

$$\begin{aligned}&a_0'+M^2(\mathtt{x}^2+\mathtt{y}^2)^n,a_2'+M^2(\mathtt{x}^2+\mathtt{y}^2)^n,4(a_0'+M^2(\mathtt{x}^2+\mathtt{y}^2)^n)\\&\quad (a_2'+M^2(\mathtt{x}^2+\mathtt{y}^2)^n)-a_1'^2\in {{\mathcal {P}}}^+(\kappa [\mathtt{x},\mathtt{y}]). \end{aligned}$$

By Lemma 5.6

$$\begin{aligned} {\mathcal {Q}}':= & {} a_0'+M^2(\mathtt{x}^2+\mathtt{y}^2)^n+a_1'\mathtt{z}+(a_2'+M^2(\mathtt{x}^2+\mathtt{y}^2)^n)\mathtt{z}^2\\\in & {} {{\mathcal {P}}}(\kappa [\mathtt{x},\mathtt{y}][\mathtt{z}])\subset {{\mathcal {P}}}(\kappa ((\mathtt{x}))[\mathtt{y}][\mathtt{z}]). \end{aligned}$$

As \(\tau (\kappa ((\mathtt{x})))=\tau (\kappa )<+\infty \), we deduce by [25, Thm.1.2] that \({\mathcal {Q}}'\) is a sum of p squares of polynomials \(A_i\in \kappa ((\mathtt{x}))[\mathtt{y}][\mathtt{z}]\) of degree \(\le 1\) with respect to \(\mathtt{z}\), that is,

$$\begin{aligned} {\mathcal {Q}}'=A_1^2+\cdots +A_p^2. \end{aligned}$$

Let \(m\ge 1\) be such that \(A'_i:=\mathtt{x}^mA_i\in \kappa [[\mathtt{x}]][\mathtt{y}][\mathtt{z}]\) for each i, so

$$\begin{aligned} \mathtt{x}^{2m}{\mathcal {Q}}'=A_1'^2+\cdots +A_p'^2. \end{aligned}$$

As \(\kappa \) is a (formally) real field and \(\mathtt{x}\) generates a real prime ideal of \(\kappa [[\mathtt{x}]][\mathtt{y}][\mathtt{z}]\), we deduce \(\mathtt{x}\) divides each \(A'_i\). Proceeding inductively (m times), we conclude \({\mathcal {Q}}'\) is a sum of p squares of polynomials \(B_i\in \kappa [[\mathtt{x}]][\mathtt{y}][\mathtt{z}]\) of degree \(\le 1\) with respect to \(\mathtt{z}\). Thus,

$$\begin{aligned} {\mathcal {Q}}=a_0+a_1\mathtt{z}+a_2\mathtt{z}^2=(\mathtt{X}_1+\mathtt{z}\mathtt{Y}_1)^2+\cdots +(\mathtt{X}_p+\mathtt{z}\mathtt{Y}_p)^2 \end{aligned}$$
(5.3)

has a solution modulo \({{\mathfrak {m}}}_2^n\) in \(\kappa [[\mathtt{x},\mathtt{y}]]\) for each \(n\ge 1\). By Strong Artin’s approximation Eq. (5.3) has a solution in \(\kappa [[\mathtt{x},\mathtt{y}]]\), so \({\mathcal {Q}}\) is a sum of p squares of polynomials of degree \(\le 1\) (with respect to \(\mathtt{z}\)) and coefficients in \(\kappa [[\mathtt{x},\mathtt{y}]]\), as required. \(\square \)

We are now ready to prove Theorem 5.5.

Proof of Theorem 5.5

By Weierstrass preparation theorem and Tschirnhaus trick there exist \(a,b,c\in \kappa \) with \(b,c\ne 0\), a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) with \(U(0,0)=1\), units \(u,v\in \kappa [[\mathtt{y}]]\) with \(u(0)=1\) and \(v(0)=1\) and a Weierstrass polynomial \(P:=\mathtt{x}^3+a\mathtt{x}\mathtt{y}^\ell u^\ell +b\mathtt{y}^\rho v\) such that \(\ell \ge 2\), \(\rho \ge 3\) and \(F=cU^2P\). In addition, either \(\rho \) is odd or \(\rho \) is even and \(b\not \in -{\Sigma {\kappa }^2}\). After the change of coordinates \((\mathtt{x},\mathtt{y},\mathtt{z})\mapsto (c\mathtt{x},c\mathtt{y},c^2U\mathtt{z})\) we assume \(F=\mathtt{x}^3+a'\mathtt{x}\mathtt{y}^\ell u'^\ell +b'\mathtt{y}^{\rho }v'\) where \(a',b'\in \kappa \) and \(u',v'\in \kappa [[\mathtt{y}]]\) are units such that \(u'(0)=1\) and \(v'(0)=1\). Again, either \(\rho \) is odd or \(\rho \) is even and \(b'\not \in -{\Sigma {\kappa }^2}\). After the change of coordinates \(\mathtt{y}u'\mapsto \mathtt{y}\) we suppose from the beginning \(F=\mathtt{x}^3+a\mathtt{x}\mathtt{y}^\ell +b\mathtt{y}^\rho w(\mathtt{y})\) where \(a,b\in \kappa \), \(b\ne 0\) and w is a unit such that \(w(0)=1\). In addition, either \(\rho \) is odd or \(\rho \) is even and \(b\not \in -{\Sigma {\kappa }^2}\).

(i) As \(f+\mathtt{z}g\in {{\mathcal {P}}}(A){\setminus }\{0\}\), we know that \(f\in {{\mathcal {P}}}(\{F\ge 0\})\) and \(f^2-Fg^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). Let \(u\in \kappa [[\mathtt{x}]]\) be a unit such that \(F(\mathtt{x},0)=\mathtt{x}^3u\). As \(-F\) is not positive semidefinite, if \(f=0\), then \(g=0\), so \(f\ne 0\). Assume \(f(\mathtt{x},0)=0\). We claim: \(\mathtt{y}^2\) divides f.

Otherwise, \(f=\mathtt{y}f'\) where \(f'\in \kappa [[\mathtt{x},\mathtt{y}]]\) and \(f'(\mathtt{x},0)\ne 0\). Thus, there exists a Weierstrass polynomial \(Q:=\mathtt{x}^q+\sum _{k=0}^{q-1}\mathtt{y}b_k(\mathtt{y})\mathtt{x}^k\) (where \(b_k\in \kappa [[\mathtt{y}]]\) for each k), \(\mu \in \kappa {\setminus }\{0\}\) and a unit \(V\in \kappa [[\mathtt{x},\mathtt{y}]]\) with \(V(0,0)=1\) such that \(f'=Q\mu V^2\).

For each \(m\ge 1\) consider the homomorphism

$$\begin{aligned} \varphi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(\mathtt{t}^2,\mathtt{t}^m). \end{aligned}$$

If m is odd and large enough,

$$\begin{aligned} \varphi (F)&=\mathtt{t}^6+a\mathtt{t}^{m\ell +2}+b\mathtt{t}^{\rho m}w(\mathtt{t}^m)=\mathtt{t}^6(1+a\mathtt{t}^{m\ell -4}+b\mathtt{t}^{\rho m-6}w(\mathtt{t}^m)),\\ \varphi (f)&=\varphi (\mathtt{y}f')=\mathtt{t}^m\Big (\mathtt{t}^{2q}+\sum _{k=0}^{q-1}\mathtt{t}^{m+2k}b_k(\mathtt{t}^m)\Big )\mu V^2(\mathtt{t}^2,\mathtt{t}^m)\\&=\mu \mathtt{t}^{m+2q}\Big (1+\sum _{k=0}^{q-1}\mathtt{t}^{m+2k-2q}b_k(\mathtt{t}^m) \Big )V^2(\mathtt{t}^2,\mathtt{t}^m). \end{aligned}$$

Observe that \(\varphi (F)\in {\Sigma {\kappa [[\mathtt{t}]]}^2}\), whereas \(\varphi (f)\not \in {\Sigma {\kappa }^2}\), as it has odd order. There exists a prime cone \(\alpha \in {\text {Sper}}(\kappa [[\mathtt{t}]])\) such that \(\varphi (F)>_\alpha 0\), whereas \(\varphi (f)<_\alpha 0\) (consider an ordering of \(\kappa \) and define the sign of \(\mathtt{t}\) to get \(\mu \mathtt{t}<0\)). This is a contradiction because \(f\in {{\mathcal {P}}}(\{F\ge 0\})\).

We conclude \(f'(\mathtt{x},0)=0\), so \(f=\mathtt{y}^2f''\) where \(f''\in \kappa [[\mathtt{x},\mathtt{y}]]\), as claimed.

Consequently,

$$\begin{aligned} f^2-Fg^2=\mathtt{y}^4f''^2-Fg^2=\mathtt{y}^4f''^2-(\mathtt{x}^3+a'\mathtt{x}\mathtt{y}^\ell u'^\ell +b'\mathtt{y}^{\rho }v')g^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

Setting \(\mathtt{y}=0\), we have \(-\mathtt{x}^3g^2(\mathtt{x},0)\in {{\mathcal {P}}}(\kappa [[\mathtt{x}]])\), so \(g(\mathtt{x},0)=0\) and there exists \(g'\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(g=\mathtt{y}g'\). Thus,

$$\begin{aligned} f^2-Fg^2=\mathtt{y}^2(\mathtt{y}^2f''^2-Fg'^2)\quad \leadsto \quad \mathtt{y}^2f''^2-Fg'^2 \in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

Setting again \(\mathtt{y}=0\), we have \(-\mathtt{x}^3g'^2(\mathtt{x},0)\in {{\mathcal {P}}}(\kappa [[\mathtt{x}]])\), so \(g'(\mathtt{x},0)=0\) and there exists \(g''\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(g=\mathtt{y}^2g''\). This means \(f+\mathtt{z}g=\mathtt{y}^2(f''+\mathtt{z}g'')\) where \(f''+\mathtt{z}g''\in {{\mathcal {P}}}(A)\). Proceeding recursively we find \(s\ge 1\) and \(f_1+\mathtt{z}g_1\in {{\mathcal {P}}}(A)\) such that \(f_1(\mathtt{x},0)\ne 0\) and \(f+\mathtt{z}g=\mathtt{y}^{2s}(f_1+\mathtt{z}g_1)\).

Assume \(\omega (f_1(\mathtt{x},0))=q\ge 2\). Substitute \(\mathtt{y}=0\) in \(f_1^2-Fg_1^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) and observe that

$$\begin{aligned} (f_1^2-Fg_1^2)(\mathtt{x},0)=f_1^2(\mathtt{x},0)-\mathtt{x}^3g_1^2(\mathtt{x},0)\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

Thus, \(\omega (-\mathtt{x}^3g_1^2(\mathtt{x},0))\ge 2q\), that is, \(\omega (g_1(\mathtt{x},0))\ge q-\frac{3}{2}>0\), so \(\omega (g_1)\ge 1\).

(ii) The proof of this part is conducted in several steps. For the sake of simplicity once we have finished a step, we reset the local notation involved in such step. Recall that \(F=\mathtt{x}^3+a\mathtt{x}\mathtt{y}^\ell +b\mathtt{y}^\rho w(\mathtt{y})\) where \(a,b\in \kappa \), \(b\ne 0\), \(\ell \ge 2\), \(\rho \ge 3\) and w is a unit such that \(w(0)=1\). In addition, either \(\rho \) is odd or \(\rho \) is even and \(b\not \in -{\Sigma {\kappa }^2}\).

As F is \(\rho \)-quasidetermined, there exists a constant \(c\in \kappa {\setminus }\{0\}\) and a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that F is right equivalent to \((\mathtt{x}^3+a\mathtt{x}\mathtt{y}^\ell +b\mathtt{y}^\rho )cU^2\). After the additional change of coordinates \((\mathtt{x},\mathtt{y},\mathtt{z})\mapsto (c\mathtt{x},c\mathtt{y},c^2U\mathtt{z})\), we may assume \(F=\mathtt{x}^3+a\mathtt{x}\mathtt{y}^\ell +b\mathtt{y}^\rho \) for some \(a,b\in \kappa \), \(b\ne 0\), \(\ell \ge 2\) and \(\rho \ge 1\). In addition, either \(\rho \) is odd or \(\rho \) is even and \(b\not \in -{\Sigma {\kappa }^2}\).

[5.i]. Let \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) be such that \(\omega (f(\mathtt{x},0))=k\ge 2\) and let us prove \(f+\mathtt{z}g\in {\Sigma _p{A}^2}\). If \(g=0\), then \(f\in {{\mathcal {P}}}(A){\setminus }\{0\}\). Thus, \(f+\mathtt{z}f=f(1+\mathtt{z})\in {{\mathcal {P}}}(A)\) and \(f\ne 0\). As \(\frac{1}{1+\mathtt{z}}\) is a square in A, changing \(f+\mathtt{z}g\) by \(f+\mathtt{z}f\), we may assume \(g\ne 0\). By Lemma 5.8 it is enough to find \(\eta \in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]){\setminus }\{0\}\) such that \(f+\mathtt{z}g+\eta (\mathtt{z}^2-F)\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]][\mathtt{z}])\). By Lemma 5.6 this is equivalent to find \(\eta \in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]){\setminus }\{0\}\) such that \(4\eta (f-\eta F)-g^2,f-\eta F\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). We claim that to prove (ii) in the statement (of Theorem 5.5): It is enough to find \(\eta \in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that \(4\eta (f-\eta F)-g^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). We have to check that under such hypotheses, also \(f-\eta F\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\).

Let \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) and \(\alpha \in {\text {Sper}}(\kappa )\) be such that \(\beta \rightarrow \alpha \) (see [1, Prop.II.2.4]). If \({\text {supp}}(\beta )={{\mathfrak {m}}}_2\), then \(f,F\in {\text {supp}}(\beta )\) and \(f-\eta F\in {\text {supp}}(\beta )\), so we assume \({\text {supp}}(\beta )\ne {{\mathfrak {m}}}_2\). If \({\text {supp}}(\beta )=0\), by [1, Prop.VII.5.1] there exists \(\beta _1\in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that \(\beta \rightarrow \beta _1\rightarrow \alpha \) and \({\text {supp}}(\beta _1)\) is a real prime ideal of height 1, so we may assume \(\mathrm{ht}({\text {supp}}(\beta ))=1\). We obtain

$$\begin{aligned} \eta +{\text {supp}}(\beta )\ge _\beta 0\quad \text {and}\quad 4\eta (f-\eta F)-g^2+{\text {supp}}(\beta )\ge _\beta 0. \end{aligned}$$

Assume first \({\text {supp}}(\beta )=(\mathtt{y})\). If \(f-\eta F+{\text {supp}}(\beta )=f(\mathtt{x},0)-\eta (\mathtt{x},0)F(\mathtt{x},0)<_\beta 0\), then \(\eta (\mathtt{x},0)=0\) and \(g(\mathtt{x},0)=0\) (because \(4\eta (\mathtt{x},0)(f(\mathtt{x},0)-\eta (\mathtt{x},0)F(\mathtt{x},0))-g^2(\mathtt{x},0)+{\text {supp}}(\beta )\ge _\beta 0\)), so \(f(\mathtt{x},0)<_\beta 0\). Let \(m\ge 1\) be such that \(\eta =\mathtt{y}^{2m}\eta '\) where \(\eta '\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) and \(\eta '(\mathtt{x},0)\ne 0\). As \(4\eta (f-\eta F)-g^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\), we deduce that \(\mathtt{y}^m\) divides g, so there exists \(g'\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(g=\mathtt{y}^mg'\). Thus, \(4\eta '(f-F\eta )-g'^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). Hence, \(4\eta '(\mathtt{x},0)f(\mathtt{x},0)-g'^2(\mathtt{x},0)\ge _\beta 0\), so \(\eta '(\mathtt{x},0)f(\mathtt{x},0)\ge _\beta 0\) and \(\eta '(\mathtt{x},0)\ge _\beta 0\). This means \(f(\mathtt{x},0)\ge _\beta 0\), which is a contradiction. Consequently, \(f-\eta F+{\text {supp}}(\beta )\ge _\beta 0\).

Assume next \(\mathtt{y}\not \in {\text {supp}}(\beta )\) and \(f-\eta F<_\beta 0\). Without loss of generality we suppose \(\mathtt{y}>_\beta 0\). Let \(R(\alpha )\) be the real closure of \((\kappa ,\le _\alpha )\). By Lemma 2.12 there exist \(\zeta \in R(\alpha )[[\mathtt{y}]]\) and \(q\ge 1\) such that \((f-\eta F)(\zeta ,\mathtt{y}^q)<0\), \(\eta (\zeta ,\mathtt{y}^q)\ge 0\) and \((4\eta (f-\eta F)-g^2)(\zeta ,\mathtt{y}^q)\ge 0\) (for \(\mathtt{y}>0\)). Thus, \(\eta (\zeta ,\mathtt{y}^q)=0\) and \(g(\zeta ,\mathtt{y}^q)=0\), so \(f(\zeta ,\mathtt{y}^q)<0\). Write \(\eta =\mathtt{y}^{2m}\eta '\) where \(m\ge 0\) and \(\eta '\in \kappa [[\mathtt{x},\mathtt{y}]]\) satisfies \(\eta '(\mathtt{x},0)\ne 0\). Thus, \(\eta '\) is a regular series with respect to \(\mathtt{x}\) and there exist a Weierstrass polynomial \(Q\in \kappa [[\mathtt{y}]][\mathtt{x}]\) and a unit \(V\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(\eta '=QV\) and \(\eta =\mathtt{y}^{2m}QV\). As \(\mathtt{y}^{2m}Q(\zeta (\mathtt{y}^{1/q}),\mathtt{y})V(\zeta (\mathtt{y}^{1/q}),\mathtt{y})=\eta (\zeta (\mathtt{y}^{1/q}),\mathtt{y})=0\), we deduce \(Q(\zeta (\mathtt{y}^{1/q}),\mathtt{y})=0\) and \(\zeta (\mathtt{y}^{1/q})\in R(\alpha )[[\mathtt{y}^{1/q})]]\) is integral over \(\kappa [[\mathtt{y}]]\). Thus, the minimal polynomial of \(\zeta (\mathtt{y}^{1/q})\) over \(\kappa ((\mathtt{y}))\) is an irreducible Weierstrass polynomial \(Q_0\in \kappa [[\mathtt{y}]][\mathtt{x}]\). As \(\eta \in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\subset {{\mathcal {P}}}(R(\alpha )[[\mathtt{x},\mathtt{y}]])\), we conclude there exist \(\mu \ge 1\) and \(\eta _1\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that \(\eta =Q_0^{2\mu }\eta _1\) and \(\eta _1(\zeta (\mathtt{y}^{1/q}),\mathtt{y})\ne 0\). As \(4\eta (f-\eta F)-g^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\subset {{\mathcal {P}}}(R(\alpha )[[\mathtt{x},\mathtt{y}]])\), we have \(Q_0^\mu \) divides g, so there exists \(g_1\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(g=Q_0^\mu g_1\). Thus, \(4\eta _1(f-FQ_0^{2\mu }\eta _1)-g_1^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\). Hence, \(4\eta _1(\zeta ,\mathtt{y}^q)f(\zeta ,\mathtt{y}^q)-g_1^2(\zeta ,\mathtt{y}^q)\ge 0\), so \(\eta _1(\zeta ,\mathtt{y}^q)f(\zeta ,\mathtt{y}^q)\ge 0\). As \(\eta _1(\zeta ,\mathtt{y}^q)>0\), we deduce \(f(\zeta ,\mathtt{y}^q)\ge 0\), which is a contradiction. Consequently, \(f-\eta F+{\text {supp}}(\beta )\ge _\beta 0\), as claimed.

[5.ii] We may assume: \(f,g\in \kappa [\mathtt{x},\mathtt{y}]{\setminus }\{0\}\), f is a Weierstrass polynomial with respect to \(\mathtt{x}\) and there exists \(r>q\) such that \(f-\mathtt{y}^{2r}+\mathtt{z}g\in {{\mathcal {P}}}^\oplus (A)\).

Write \(f(\mathtt{x},0):=c\mathtt{x}^q+\cdots \) for some \(c\in \kappa {\setminus }\{0\}\). Let \(\alpha \in {\text {Sper}}(\kappa )\) and \(R(\alpha )\) be the real closure of \((\kappa ,\le _\alpha )\). Consider the homomorphism \(\varphi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow R(\alpha )[[\mathtt{y}]],\ h\mapsto h(\mathtt{x}^2,0)\). As \(\varphi (F)=\mathtt{x}^6>0\), we have \(f(\mathtt{x}^2,0)=c\mathtt{x}^{2q}+\cdots >0\), so \(c\ge _\alpha 0\). Thus, c is non-negative for each ordering of \(\kappa \), so \(c\in {{\mathcal {P}}}(\kappa )={\Sigma {\kappa }^2}\). Hence, we divide \(f+\mathtt{z}g\) by c and assume in the following \(c=1\).

By Weierstrass preparation theorem there exist a Weierstrass polynomial \(P\in \kappa [[\mathtt{y}]][\mathtt{x}]\) of degree \(q=\omega (f(\mathtt{x},0))\) and a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(U(0,0)=1\) and \(f=PU^2\). We divide \(f+\mathtt{z}g\) by \(U^2\) and assume that f is a Weierstrass polynomial with respect to \(\mathtt{x}\) of degree q. Observe that \(f(\mathtt{x},0)=\mathtt{x}^q\) and \(f^2(\mathtt{x},0)-F(\mathtt{x},0)g^2(\mathtt{x},0)=\mathtt{x}^{2q}-\mathtt{x}^3g^2(\mathtt{x},0)\ge 0\), so \(f^2(\mathtt{x},0)-F(\mathtt{x},0)g^2(\mathtt{x},0)\ne 0\). As also \(g\ne 0\), if n is large enough, then \(f+\mathtt{y}^{2n}+\mathtt{z}g\in {{\mathcal {P}}}^\oplus (A)\) (use Lemma 4.1(iii)). By Corollaries 2.13 and 2.14 there exists \(r>\max \{2n,q\}\) such that for each \(f_n,g_n\in \kappa [\mathtt{x},\mathtt{y}]\) satisfying \(f-f_n,g-g_n\in {{\mathfrak {m}}}_2^r\) it holds \(f_n+\mathtt{y}^{2n}-\mathtt{y}^{2r}+\mathtt{z}g_n\in {{\mathcal {P}}}^\oplus (A)\). As f is a Weierstrass polynomial with respect to \(\mathtt{x}\), also \(f_n+\mathtt{y}^{2n}\) is a Weierstrass polynomial with respect to \(\mathtt{x}\).

If we show that each \(f_n+\mathtt{y}^{2n}+\mathtt{z}g_n\in {\Sigma _p{A}^2}\), Strong Artin’s approximation guarantees that \(f+\mathtt{z}g\in {\Sigma _p{A}^2}\). Thus, we assume in the following that [5.ii] holds.

[5.iii]. Strong Artin’s approximation implies the following: Let \(f,g\in \kappa [\mathtt{x},\mathtt{y}]{\setminus }\{0\}\) and \(r>q\) be such that f is a Weierstrass polynomial with respect to \(\mathtt{x}\) and \(f-\mathtt{y}^{2r}+\mathtt{z}g\in {{\mathcal {P}}}^\oplus (A)\). There exists \(n_0\ge 1\) such that if \(f+2\mathtt{x}^{2n}+\mathtt{z}g\in {\Sigma _p{A}^2}\) for some \(n\ge n_0\), then \(f+\mathtt{z}g\in {\Sigma _p{A}^2}\).

[5.iv]. To prove [5.iii] it is enough by [5.i] to show: Let \(f,g\in \kappa [\mathtt{x},\mathtt{y}]{\setminus }\{0\}\) and \(r>q\) be such that f is a Weierstrass polynomial with respect to \(\mathtt{x}\) and \(f-\mathtt{y}^{2r}+\mathtt{z}g\in {{\mathcal {P}}}^\oplus (A)\). Then there exist \(\eta \in \kappa [\mathtt{x},\mathtt{y}]\cap {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) and \(n\ge n_0\) such that \(4\eta (f+2\mathtt{x}^{n}-\eta F)-g^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\).

To find \(\eta \) we need some preliminary work. Write \(f^*:=f-\mathtt{y}^{2r}:=\mathtt{x}^q+\sum _{k=0}^{q-1}\mathtt{y}\lambda _k(\mathtt{y})\mathtt{x}^k\in \kappa [[\mathtt{y}]][\mathtt{x}]\). We have

$$\begin{aligned} f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)&=\mathtt{x}^q+\sum _{j=0}^{q-1}\mathtt{x}^q\mathtt{u}\lambda _j(\mathtt{u}\mathtt{x}^q)\mathtt{x}^j =\mathtt{x}^q\Big (1+\sum _{j=0}^{q-1}\lambda _j(\mathtt{u}\mathtt{x}^q)\mathtt{u}\mathtt{x}^j\Big ) \end{aligned}$$
(5.4)
$$\begin{aligned} F(\mathtt{x},\mathtt{u}\mathtt{x}^q)&=\mathtt{x}^3(1+a\mathtt{x}^{\ell q-2}\mathtt{u}^\ell +b\mathtt{x}^{\rho q-3}\mathtt{u}^{\rho }) \end{aligned}$$
(5.5)

Define \(W:=1+a\mathtt{x}^{\ell q-2}\mathtt{u}^\ell +b\mathtt{x}^{\rho q-3}\mathtt{u}^{\rho }\in \kappa [\mathtt{x},\mathtt{u}]\), which satisfies \(W(0,0)=1\) and \(F(\mathtt{x},\mathtt{u}\mathtt{x}^q)=\mathtt{x}^3W\). Define \(A':=\kappa [[\mathtt{x},\mathtt{u},\mathtt{v}]]/(\mathtt{v}^2-\mathtt{x}W)\) and consider the homomorphism

$$\begin{aligned} \psi :A\rightarrow A',\ h(\mathtt{x},\mathtt{y},\mathtt{z})\mapsto h(\mathtt{x},\mathtt{u}\mathtt{x}^q,\mathtt{v}\mathtt{x}). \end{aligned}$$

As \(f^*+\mathtt{z}g\in {{\mathcal {P}}}(A)\), we have

$$\begin{aligned} \psi (f^*+\mathtt{z}g)=f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)+\mathtt{v}\mathtt{x}g(\mathtt{x},\mathtt{u}\mathtt{x}^q)\in {{\mathcal {P}}}(A'). \end{aligned}$$

As \(W(0,0)=1\), there exists by the Implicit Function Theorem \(\varphi (\mathtt{u},\mathtt{v})\in \kappa [[\mathtt{u},\mathtt{v}]]\) such that \(\mathtt{x}=\varphi (\mathtt{u},\mathtt{v})\) is the unique solution of the equation \(\mathtt{v}^2-\mathtt{x}W=0\) satisfying \(\varphi (0,0)=0\). As \(\psi (f^*+\mathtt{z}g)\in {{\mathcal {P}}}(A')\), we get

$$\begin{aligned} h(\mathtt{u},\mathtt{v}):= & {} f^*(\varphi (\mathtt{u},\mathtt{v}),\mathtt{u}\varphi (\mathtt{u},\mathtt{v})^q) +\mathtt{v}\varphi (\mathtt{u},\mathtt{v})g(\varphi (\mathtt{u},\mathtt{v}),\mathtt{u}\varphi (\mathtt{u},\mathtt{v})^q) \in {{\mathcal {P}}}(\kappa [[\mathtt{u},\mathtt{v}]])\\= & {} {\Sigma _p{\kappa [[\mathtt{u},\mathtt{v}]]}^2}, \end{aligned}$$

so there exist \(h_i\in \kappa [[\mathtt{u},\mathtt{v}]]\) such that \(h=\sum _{i=1}^ph_i^2\).

Using the relation \(\mathtt{v}^2-\mathtt{x}W\), we find series \(a_i,b_i,c\in \kappa [[\mathtt{x},\mathtt{u}]]\) satisfying

$$\begin{aligned} f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)+\mathtt{v}\mathtt{x}g(\mathtt{x},\mathtt{u}\mathtt{x}^q)=\sum _{i=1}^p(a_i+\mathtt{v}b_i)^2-(\mathtt{v}^2-\mathtt{x}W)c. \end{aligned}$$

Comparing coefficients with respect to \(\mathtt{v}\), we obtain

$$\begin{aligned} c&=\sum _{i=1}^pb_i^2, \end{aligned}$$
(5.6)
$$\begin{aligned} f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)&=\sum _{i=1}^pa_i^2+\mathtt{x}Wc,\end{aligned}$$
(5.7)
$$\begin{aligned} \mathtt{x}g(\mathtt{x},\mathtt{u}\mathtt{x}^q)&=2\sum _{i=1}^pa_ib_i. \end{aligned}$$
(5.8)

As \(g\ne 0\), we have \(c\ne 0\). If we set \(\mathtt{x}=0\) in (5.7), we obtain \(0=\sum _{i=1}^pa_i^2(0,\mathtt{u})\), so \(a_i(0,\mathtt{u})=0\) for each i and there exists \(a_i'\in \kappa [[\mathtt{x},\mathtt{u}]]\) such that \(a_i=\mathtt{x}a_i'\). As \(q:=\omega (f(\mathtt{x},0))\ge 2\), we deduce \(\mathtt{x}^2\) divides \(f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)\). Thus, \(\mathtt{x}^2\) divides \(f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)-\sum _{i=1}^pa_i^2=\mathtt{x}Wc\), so \(\mathtt{x}\) divides \(c=\sum _{i=1}^pb_i^2\). Hence, \(\mathtt{x}\) divides \(b_i\) for each i, so \(b_i=\mathtt{x}b_i'\) for some \(b_i'\in \kappa [[\mathtt{x},\mathtt{u}]]\). Write \(c':=\sum _{i=1}^pb_i'^2\in {\Sigma {\kappa [[\mathtt{x},\mathtt{u}]]}^2}\), so \(c=\mathtt{x}^2c'\). Rewrite Eqs. (5.7) and (5.8) as

$$\begin{aligned}&f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)=\sum _{i=1}^p(\mathtt{x}a_i')^2+\mathtt{x}^3 Wc',\\&\mathtt{x}g(\mathtt{x},\mathtt{u}\mathtt{x}^q)=2\mathtt{x}^2\sum _{i=1}^pa_i'b_i'. \end{aligned}$$

As \(c'\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\) and

$$\begin{aligned} f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)+\mathtt{v}\mathtt{x}g(\mathtt{x},\mathtt{u}\mathtt{x}^q)+(\mathtt{v}^2-\mathtt{x}W)\mathtt{x}^2c'=\sum _{i=1}^p(a_i+\mathtt{v}b_i)^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]][\mathtt{v}]), \end{aligned}$$

we deduce by Lemma 5.6

$$\begin{aligned}&4\mathtt{x}^2c'(f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)-\mathtt{x}W\mathtt{x}^2c')-(\mathtt{x}g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]]),\\&f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)-\mathtt{x}^3Wc'=\sum _{i=1}^p(\mathtt{x}a_i')^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]]). \end{aligned}$$

As \(f^*=f-\mathtt{y}^{2r}\), we have \(f^*(\mathtt{x},\mathtt{u}\mathtt{x}^q)=f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-(\mathtt{u}\mathtt{x}^q)^{2r}\). As in addition \(c'\ne 0\), we deduce

$$\begin{aligned}&4\mathtt{x}^2c'(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-\mathtt{x}W\mathtt{x}^2c')-(\mathtt{x}g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]]){\setminus }\{0\},\\&f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-\mathtt{x}^3Wc'=(\mathtt{u}\mathtt{x}^q)^{2r}+\sum _{i=1}^p(\mathtt{x}a_i')^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]]){\setminus }\{0\}. \end{aligned}$$

Consequently,

$$\begin{aligned} \xi&:=4c'(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c')-(g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]]){\setminus }\{0\}, \end{aligned}$$
(5.9)
$$\begin{aligned} \psi&:=f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c'\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]]) {\setminus }\{0\}. \end{aligned}$$
(5.10)

[5.v]. One would like to construct \(\eta \in \kappa [\mathtt{x},\mathtt{y}]\cap {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) from \(c'\) substituting \(\mathtt{u}\) by \(\frac{\mathtt{y}}{\mathtt{x}^q}\). But at this point this does not work because \(c'\in \kappa [[\mathtt{x},\mathtt{u}]]\) and the desired substitution is not possible. We need to modify first both \(c'\) and \(\xi \) to have polynomials instead of series, but keeping both inside \({{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\).

Let \(\ell ,m\ge 1\) be such that \(\mathtt{x}^{2\ell }\) divides \(c'\) but \(\mathtt{x}^{2\ell +1}\) does not and \(\mathtt{x}^{2m}\) divides \(\xi \) but \(\mathtt{x}^{2m+1}\) does not. Write \(c'':=\frac{c'}{\mathtt{x}^{2\ell }}\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\) and \(\xi ':=\frac{\xi }{\mathtt{x}^{2m}}\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\), so \(c'=c''\mathtt{x}^{2\ell }\) and \(\xi =\xi '\mathtt{x}^{2m}\). Observe that \(c''(0,\mathtt{u})\ne 0\) and \(\xi '(0,\mathtt{u})\ne 0\). Thus, \(c''+\mathtt{x}^{2n},\xi '+\mathtt{x}^{2n}\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{u}]])\) for each \(n\ge 1\). Write \(k:=n_0+\ell \). We have

$$\begin{aligned} \begin{aligned} \xi ^*:&=4(c'+\mathtt{x}^{2k+2m})(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)+2\mathtt{x}^{2k+2m} -F(\mathtt{x},\mathtt{x}^q\mathtt{u})(c'+\mathtt{x}^{2k+2m}))-(g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2\\&=\xi \!+\!4(\mathtt{x}^{4k+4m}\!+\!\mathtt{x}^{2k+2m}c'(2-F(\mathtt{x},\mathtt{x}^q\mathtt{u}))\!+\!\mathtt{x}^{2k+2m}\psi \!+\!\mathtt{x}^{4k+4m}(1-F(\mathtt{x},\mathtt{x}^q\mathtt{u})))\\&=\mathtt{x}^{2m}(\xi '+4(\mathtt{x}^{4k+2m}+\mathtt{x}^{2k}c'(2-F(\mathtt{x},\mathtt{x}^q\mathtt{u}))+\mathtt{x}^{2k}\psi +\mathtt{x}^{4k+2m}(1-F(\mathtt{x},\mathtt{x}^q\mathtt{u})))). \end{aligned} \end{aligned}$$
(5.11)

As \(\xi '+\mathtt{x}^{4k+2m}\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{u}]])\) and \(\psi \in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\), also

$$\begin{aligned} \xi '':= & {} \xi '+4(\mathtt{x}^{4k+2m}+\mathtt{x}^{2k}c'(2-F(\mathtt{x},\mathtt{x}^q\mathtt{u}))+\mathtt{x}^{2k}\psi \\&+\mathtt{x}^{4k+2m}(1-F(\mathtt{x},\mathtt{x}^q\mathtt{u})))\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{u}]]). \end{aligned}$$

We have \(\xi ^*=\mathtt{x}^{2m}\xi ''\) and \(c''+\mathtt{x}^{2k+2m-2\ell }\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{u}]])\). As f is a Weierstrass polynomial, write

$$\begin{aligned}&f(\mathtt{x},\mathtt{u}\mathtt{x}^q)=\mathtt{x}^q\Big (1+\sum _{i=1}^d\mathtt{x}^if_i(\mathtt{u})\Big ),\\&g(\mathtt{x},\mathtt{u}\mathtt{x}^q)=\mathtt{x}^s\Big (\sum _{j=0}^e\mathtt{x}^jg_j(\mathtt{u})\Big ),\\&c''(\mathtt{x},\mathtt{u})=\sum _{i\ge 0}\mathtt{x}^ic''_i(\mathtt{u}) \end{aligned}$$

where \(f_i,g_j\in \kappa [\mathtt{u}]\), \(c''_i\in \kappa [[\mathtt{u}]]\), \(g_0,f_d,g_e\ne 0\) and \(c''_0=c''(0,\mathtt{u})\ne 0\). Let us collect more information concerning the structure and the properties of \(c'\).

[5.vi]. Denote \(\varepsilon =1\) if q is odd and \(\varepsilon =0\) if q is even. We claim: \(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c'=\mathtt{x}^{q+\varepsilon }H\) where \(H\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\) and \(c_i''\in \kappa [\mathtt{u}]\) for \(i=0,\ldots ,2m-2\ell -q-1\). Recall that \(c'=c''\mathtt{x}^{2\ell }\).

We have

$$\begin{aligned} \begin{aligned} \xi&=4c'(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c')-(g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2\\&=4\mathtt{x}^{2\ell }\Big (\sum _{i\ge 0}\mathtt{x}^ic''_i(\mathtt{u})\Big )\Big (\mathtt{x}^q \Big (1+\sum _{i=1}^d\mathtt{x}^if_i(\mathtt{u})\Big )-(\mathtt{x}^3 W)\mathtt{x}^{2\ell }\Big (\sum _{i\ge 0} \mathtt{x}^ic''_i(\mathtt{u})\Big )\Big )-\mathtt{x}^{2s}\Big (\sum _{j=0}^e\mathtt{x}^jg_j(\mathtt{u})\Big )^2\\&=4\mathtt{x}^{2\ell +q}\Big (\sum _{i\ge 0}\mathtt{x}^ic''_i(\mathtt{u})\Big )\Big (1+\sum _{i=1}^d \mathtt{x}^if_i(\mathtt{u})-\mathtt{x}^{2\ell +3-q} W\Big (\sum _{i\ge 0}\mathtt{x}^ic''_i(\mathtt{u})\Big )\Big )-\mathtt{x}^{2s}\Big (\sum _{j=0}^e \mathtt{x}^jg_j(\mathtt{u})\Big )^2. \end{aligned} \end{aligned}$$
(5.12)

Although we have not yet proved it, we will also see:

$$\begin{aligned} 2\ell +3-q\ge 0\quad \text {and}\quad 2m-2\ell -q\ge 0. \end{aligned}$$
(5.13)

We distinguish two cases:

Case 1. q is odd. As

$$\begin{aligned} \mathtt{x}^q\Big (1+\sum _{i=1}^d\mathtt{x}^if_i(\mathtt{u})\Big )-\mathtt{x}^{2\ell +3} W\Big (\sum _{i\ge 0}\mathtt{x}^ic''_i(\mathtt{u})\Big )\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]]), \end{aligned}$$
(5.14)

its initial form is positive semidefinite, so it cannot have degree q odd. As \(c_0''(\mathtt{u})\ne 0\) and \(W=1+a\mathtt{x}^{\ell q-2}\mathtt{u}^\ell +b\mathtt{x}^{\rho q-3}\mathtt{u}^{\rho }\) (where \(\ell \ge 1\), \(\rho \ge 3\) and \(q\ge 2\)), we deduce \(\mathtt{x}^q-\mathtt{x}^{2\ell +3}c_0''(\mathtt{u})=0\), so \(q=2\ell +3\) and \(c_0''(\mathtt{u})=1\). Thus, \(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c'=\mathtt{x}^{q+1}H\) where \(H\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\).

As \(\xi \in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\), we deduce \(2\ell +q+1\le 2s\) (see (5.12)). Write \(W=1+\mathtt{x}^2\Gamma \) where \(\Gamma :=a\mathtt{x}^{\ell q-4}\mathtt{u}^\ell +b\mathtt{x}^{\rho q-5}\mathtt{u}^{\rho }\in \kappa [\mathtt{x},\mathtt{u}]\) (as \(q\ge 2\), \(\ell \ge 2\) and \(\rho \ge 3\), we have \(\ell q-4\ge 0\) and \(\rho q-5\ge 1\)). We obtain from (5.12) (using that \(q=2\ell +3\), \(2\ell +q+1\le 2s\) and \(c_0''(\mathtt{u})=1\))

$$\begin{aligned} \begin{aligned} \mathtt{x}^{2m}\xi '&=\xi =4\mathtt{x}^{2\ell +q}\Big (\Big (1+\sum _{i\ge 1}\mathtt{x}^ic''_i(\mathtt{u})\Big ) \Big (1+\sum _{i=1}^d\mathtt{x}^if_i(\mathtt{u})-(1+\mathtt{x}^2\Gamma )\Big (1+\sum _{i\ge 1} \mathtt{x}^ic''_i(\mathtt{u})\Big )\Big )\\&-\mathtt{x}^{2s-2\ell -q}\Big (\sum _{j=0}^e\mathtt{x}^jg_j(\mathtt{u})\Big )^2\Big )=4\mathtt{x}^{2\ell +q+1} \Big (\Big (1+\sum _{i\ge 1}\mathtt{x}^ic''_i(\mathtt{u})\Big )\\&\cdot \Big (\sum _{i=1}^d\mathtt{x}^{i-1}f_i(\mathtt{u})-\sum _{i\ge 1}\mathtt{x}^{i-1}c''_i(\mathtt{u}) -\mathtt{x}\Gamma \Big (1+\sum _{i\ge 1}\mathtt{x}^ic''_i(\mathtt{u})\Big )\Big )\\&-\mathtt{x}^{2s-2\ell -q-1}\Big (\sum _{j=0}^e\mathtt{x}^jg_j(\mathtt{u})\Big )^2\Big ). \end{aligned} \end{aligned}$$

Consequently, \(2m-2\ell -q-1\ge 0\) and

$$\begin{aligned} 4\Big (1+\sum _{i\ge 1}\mathtt{x}^ic''_i(\mathtt{u})\Big )\Big (\sum _{i=1}^d\mathtt{x}^{i-1} (f_i(\mathtt{u})-c''_i(\mathtt{u}))-\mathtt{x}\Gamma \Big (1+\sum _{i\ge 1}\mathtt{x}^ic''_i(\mathtt{u})\Big )\Big )\\ -\mathtt{x}^{2s-2\ell -q-1}\Big (\sum _{j=0}^e\mathtt{x}^jg_j(\mathtt{u})\Big )^2 =\mathtt{x}^{2m-2\ell -q-1}\xi ', \end{aligned}$$

or equivalently,

$$\begin{aligned} \sum _{i\ge 1}\mathtt{x}^{i-1}(f_i-c_i'')+\mathtt{x}\Big (\Big (\sum _{i\ge 1} \mathtt{x}^{i-1}c_i''\Big )\Big (\sum _{i\ge 1}\mathtt{x}^{i-1}(f_i-c_i'')\Big ) -\Gamma \Big (1+\sum _{i\ge 1}\mathtt{x}^ic''_i\Big )^2\Big )\nonumber \\ -\mathtt{x}^{2s-2\ell -q-1}\frac{1}{4}\Big (\sum _{j=0}^e\mathtt{x}^jg_j(\mathtt{u})\Big )^2 =\mathtt{x}^{2m-2\ell -q-1}\frac{1}{4}\xi ' \end{aligned}$$
(5.15)

where \(f_i=0\) for \(i\ge d+1\). Observe that the coefficient of \(\mathtt{x}^i\) on the right hand side of Eq. (5.15) is zero for \(0\le i\le 2m-2\ell -q-2\).

Recall that \(\Gamma \in \kappa [\mathtt{x},\mathtt{u}]\) and \(c_0''=1\). If one compares coefficients with respect to \(\mathtt{x}\) in Eq. (5.15), one realizes that \(c_i''-P_i(f_1,\ldots ,f_d,g_0,\ldots ,g_e,c_1'',\ldots ,c_{i-1}'')=0\) for some polynomial

$$\begin{aligned} P_i\in \kappa [\mathtt{x}_1,\ldots ,\mathtt{x}_d,\mathtt{y}_0,\ldots ,\mathtt{y}_e,\mathtt{z}_1,\ldots ,\mathtt{z}_{i-1}] \end{aligned}$$

if \(i=1,\ldots ,2m-2\ell -q-1\). We conclude inductively that \(c_i''\in \kappa [\mathtt{u}]\) for \(i=0,\ldots ,2m-2\ell -q-1\).

Case 2. q is even. As

$$\begin{aligned} \mathtt{x}^q\Big (1+\sum _{i=1}^d\mathtt{x}^if_i(\mathtt{u})\Big )-\mathtt{x}^{2\ell +3}W\Big (\sum _{i\ge 0} \mathtt{x}^ic''_i(\mathtt{u})\Big )\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]]) \end{aligned}$$

and \(c''_0(\mathtt{u})\ne 0\), we have \(q<2\ell +3\), so \(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c'=\mathtt{x}^qH\) where \(H\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\).

As \(\xi \in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\) and \(\xi =\mathtt{x}^{2m}\xi '\), we deduce \(2\ell +q\le 2s\) and \(2\ell +q\le 2m\) (see (5.12)). Thus,

$$\begin{aligned} \Big (\sum _{i\ge 0}\mathtt{x}^ic''_i(\mathtt{u})\Big )\Big (1+\sum _{i=1}^d\mathtt{x}^if_i(\mathtt{u}) -\mathtt{x}^{2\ell +3-q}W\Big (\sum _{i\ge 0}\mathtt{x}^ic''_i(\mathtt{u})\Big )\Big )\nonumber \\ -\mathtt{x}^{2s-2\ell -q}\frac{1}{4}\Big (\sum _{j=0}^e\mathtt{x}^jg_j(\mathtt{u})\Big )^2 =\mathtt{x}^{2m-2\ell -q}\frac{1}{4}\xi '. \end{aligned}$$
(5.16)

Observe that the coefficient of \(\mathtt{x}^i\) on the right hand side of Eq. (5.16) is zero for \(0\le i\le 2m-2\ell -q-1\).

Recall that \(W\in \kappa [\mathtt{x},\mathtt{u}]\). If one compares coefficients with respect to \(\mathtt{x}\) in Eq. (5.16), one realizes that \(c_i''-Q_i(f_1,\ldots ,f_d,g_0,\ldots ,g_e,c_1'',\ldots ,c_{i-1}'')=0\) for some polynomial

$$\begin{aligned} Q_i\in \kappa [\mathtt{x}_1,\ldots ,\mathtt{x}_d,\mathtt{y}_0,\ldots ,\mathtt{y}_e,\mathtt{z}_1,\ldots ,\mathtt{z}_{i-1}] \end{aligned}$$

if \(i=0,\ldots ,2m-2\ell -q-1\). We conclude inductively that \(c_i''\in \kappa [\mathtt{u}]\) for \(i=0,\ldots ,2m-2\ell -q-1\), as claimed.

[5.vii]. We are ready to modify \(c',\xi \) in order to obtain polynomials \(c^\bullet ,\xi ^\bullet \in \kappa [\mathtt{x},\mathtt{u}]\cap {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\) (from which we will construct \(\eta \in \kappa [\mathtt{x},\mathtt{y}]\cap {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) and \(n\ge n_0\) in the statement of [5.iv]) instead of the positive semidefinite series \(c',\xi \).

As \(\xi '',c''+\mathtt{x}^{2k+2m-2\ell }\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{u}]])\), there exists by Corollary 2.14\(r'\ge 1\) such that if \(\zeta ,\theta \in \kappa [[\mathtt{x},\mathtt{u}]]\) satisfy \(\zeta -\xi '',\theta -c''\in {{\mathfrak {m}}}_2^{r'}\), then \(\zeta ,\theta +\mathtt{x}^{2k+2m-2\ell }\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{u}]])\). We may assume \(r'\) is strictly greater than the maximum of the degrees of the polynomials \(\mathtt{x}^ic_i''\) for \(i=0,\ldots ,2m-2\ell -q-1\).

Let \(c^\circ \in \kappa [\mathtt{x},\mathtt{u}]\) be a polynomial such that \(\omega (c^\circ -c'')\ge r'+2m\). Then \(c^\circ =\sum _{i=0}^{2m-2\ell -q-1}c_i''\mathtt{x}^i+\mathtt{x}^{2m-2\ell -q}h\) for some polynomial \(h\in \kappa [\mathtt{x},\mathtt{u}]\), so \(c^\circ =c''+\mathtt{x}^{2m-2\ell -q}h'\) for some \(h'\in \kappa [[\mathtt{x},\mathtt{u}]]\) and \(\mathtt{x}^{2\ell }c^\circ =c'+\mathtt{x}^{2m-q}h'\). Observe that

$$\begin{aligned} \omega (c^\circ +\mathtt{x}^{2k+2m-2\ell }-(c''+\mathtt{x}^{2k+2m-2\ell })) =\omega (c^\circ -c'')\ge r'+2m>r'. \end{aligned}$$

Thus, \(c^\circ +\mathtt{x}^{2k+2m-2\ell }\in \kappa [\mathtt{x},\mathtt{u}]\cap {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{u}]])\) and \(c^\bullet :=\mathtt{x}^{2\ell }c^\circ +\mathtt{x}^{2k+2m}\in \kappa [\mathtt{x},\mathtt{u}]\cap {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\). Consider the polynomial

$$\begin{aligned} \xi ^\bullet :=4c^\bullet (f(\mathtt{x},\mathtt{u}\mathtt{x}^q)+2\mathtt{x}^{2k+2m}-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c^\bullet ) -(g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2. \end{aligned}$$
(5.17)

We claim: \(\xi ^\bullet -\xi =\mathtt{x}^{2m}E\) for some \(E\in \kappa [[\mathtt{x},\mathtt{u}]]\).

By (5.9) and [5.vi] we have:

$$\begin{aligned}&4c'(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c')-(g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2=\xi ,\\&f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c'=\mathtt{x}^{q+\varepsilon }H. \end{aligned}$$

As \(F(\mathtt{x},\mathtt{x}^q\mathtt{u})=\mathtt{x}^3W\), \(\mathtt{x}^{2\ell }c^\circ =c'+\mathtt{x}^{2m-q}h\) and \(c^\bullet =\mathtt{x}^{2\ell }c^\circ +\mathtt{x}^{2k+2m}=c'+\mathtt{x}^{2m-q}h'+\mathtt{x}^{2k+2m}\), we conclude

$$\begin{aligned} \begin{aligned} \xi ^\bullet&=4c^\bullet (f(\mathtt{x},\mathtt{u}\mathtt{x}^q)+2\mathtt{x}^{2k+2m}-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c^\bullet ) -(g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2\\&=4(c'+\mathtt{x}^{2m-q}h'+\mathtt{x}^{2k+2m})(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)+2\mathtt{x}^{2k+2m}\\&\quad -F(\mathtt{x},\mathtt{x}^q\mathtt{u}) (c'+\mathtt{x}^{2m-q}h'+\mathtt{x}^{2k+2m})) -(g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2\\&=4c'(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c')-(g(\mathtt{x},\mathtt{u}\mathtt{x}^q))^2+4(\mathtt{x}^{2m-q}h'\\&\quad +\mathtt{x}^{2k+2m})(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)-F(\mathtt{x},\mathtt{x}^q\mathtt{u})c')\\&\quad +4(c'+\mathtt{x}^{2m-q}h'+\mathtt{x}^{2k+2m})(2\mathtt{x}^{2k+2m}-\mathtt{x}^3W(\mathtt{x}^{2m-q}h' +\mathtt{x}^{2k+2m}))\\&=\xi +4(\mathtt{x}^{2m-q}h'+\mathtt{x}^{2k+2m})\mathtt{x}^{q+\varepsilon }H+4(c'+\mathtt{x}^{2m-q}h'\\&\quad +\mathtt{x}^{2k+2m})(2\mathtt{x}^{2k+2m}-\mathtt{x}^3W(\mathtt{x}^{2m-q}h'+\mathtt{x}^{2k+2m})). \end{aligned} \end{aligned}$$

Thus, to justify that

$$\begin{aligned} \xi ^\bullet -\xi =4\mathtt{x}^{2m+\varepsilon }(h'+\mathtt{x}^{2k+q})H+4\mathtt{x}^{2k+2m} (2\mathtt{x}^{2k+2m}-\mathtt{x}^3W(\mathtt{x}^{2m-q}h'+\mathtt{x}^{2k+2m}))\\ +4(c'+\mathtt{x}^{2m-q}h')(2\mathtt{x}^{2k+2m}-\mathtt{x}^3W\mathtt{x}^{2k+2m})+4(c'+\mathtt{x}^{2m-q}h') (-\mathtt{x}^3W\mathtt{x}^{2m-q}h') \end{aligned}$$

is divisible by \(\mathtt{x}^{2m}\), we only have to clarify why the product

$$\begin{aligned} 4(c'+\mathtt{x}^{2m-q}h')(-\mathtt{x}^3W(\mathtt{x}^{2m-q}h'))=&4(\mathtt{x}^{2\ell }c''+\mathtt{x}^{2m-q}h') (-\mathtt{x}^3W(\mathtt{x}^{2m-q}h'))\\ =&-4\mathtt{x}^{2m+2\ell +3-q}c''Wh'-4\mathtt{x}^{4m+3-2q}Wh'^2 \end{aligned}$$

is divisible by \(\mathtt{x}^{2m}\). The first addend on the right hand side is divisible by \(\mathtt{x}^{2m}\) because \(q\le 2\ell +3\) (see (5.13)), whereas the second addend is divisible by \(\mathtt{x}^{2m}\) because, as \(2m-2\ell -q\ge 0\) and \(2\ell +3-q\ge 0\) (see (5.13)),

$$\begin{aligned} 4m+3-2q=2m+(2m-2\ell -q)+(2\ell +3-q)\ge 2m. \end{aligned}$$

We conclude \(\xi ^\bullet -\xi =\mathtt{x}^{2m}E\) for some \(E\in \kappa [[\mathtt{x},\mathtt{u}]]\).

As \(\mathtt{x}^{2m}\) divides \(\xi \), also \(\mathtt{x}^{2m}\) divides \(\xi ^\bullet \), so there exists a polynomial \(\xi ^\circ \in \kappa [\mathtt{x},\mathtt{u}]\) such that \(\xi ^\bullet =\mathtt{x}^{2m}\xi ^\circ \). By (5.11) and (5.17)

$$\begin{aligned} \xi ^\bullet -\xi ^*=4\mathtt{x}^{2\ell }(f(\mathtt{x},\mathtt{u}\mathtt{x}^q)+2\mathtt{x}^{2k+2m} -F(\mathtt{x},\mathtt{x}^q\mathtt{u})\mathtt{x}^{2k+2m})(c^\circ -c'')\\ -4\mathtt{x}^{2k+2m+2\ell }F(\mathtt{x},\mathtt{x}^q\mathtt{u})(c^\circ -c'')-4\mathtt{x}^{4\ell } F(\mathtt{x},\mathtt{x}^q\mathtt{u})(c^\circ +c'')(c^\circ -c''), \end{aligned}$$

so \(\omega (\xi ^\bullet -\xi ^*)\ge \omega (c^\circ -c'')\). As \(\xi ^\bullet -\xi ^*=\mathtt{x}^{2m}(\xi ^\circ -\xi '')\), we have \(\omega (\xi ^\circ -\xi '')=\omega (\xi ^\bullet -\xi ^*)-2m\). As \(\omega (c^\circ -c'')\ge r'+2m\), it holds \(\omega (\xi ^\circ -\xi '')\ge r'\), so \(\xi ^\circ \in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{u}]])\). This means that \(\xi ^\bullet =\mathtt{x}^{2m}\xi ^\circ \in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{u}]])\).

[5.viii]. Write \(\mathtt{u}:=\frac{\mathtt{y}}{\mathtt{x}^q}\) in \(\xi ^\bullet (\mathtt{x},\frac{\mathtt{y}}{\mathtt{x}^q})\in \kappa [\mathtt{x},\mathtt{u}]\):

$$\begin{aligned} \xi ^\bullet \Big (\mathtt{x},\frac{\mathtt{y}}{\mathtt{x}^q}\Big )=4c^\bullet \Big (\mathtt{x},\frac{\mathtt{y}}{\mathtt{x}^q}\Big )\Big (f(\mathtt{x},\mathtt{y})+2\mathtt{x}^{2k+2m} -F(\mathtt{x},\mathtt{y})c^\bullet \Big (\mathtt{x},\frac{\mathtt{y}}{\mathtt{x}^q}\Big )\Big )-(g(\mathtt{x},\mathtt{y}))^2, \end{aligned}$$

where \(c^\bullet \in \kappa [\mathtt{x},\mathtt{u}]\). After clearing denominators, by Lemma 2.8 we find an integer \(\mu \ge 1\) and a polynomial \(B\in \kappa [\mathtt{x},\mathtt{y}]\cap {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that

$$\begin{aligned} 4B(\mathtt{x}^{2\mu }f+2\mathtt{x}^{2k+2m+2\mu }-FB)-\mathtt{x}^{4\mu }g^2\in \kappa [\mathtt{x},\mathtt{y}] \cap {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

Thus, there exist series \(A_i\in \kappa [[\mathtt{x},\mathtt{y}]]\) satisfying

$$\begin{aligned} 4B(\mathtt{x}^{2\mu }f+2\mathtt{x}^{2k+2m+2\mu }-FB)-\mathtt{x}^{4\mu }g^2=\sum _{i=1}^pA_i^2. \end{aligned}$$
(5.18)

Setting \(\mathtt{x}=0\) in (5.18), we deduce

$$\begin{aligned} -4F(0,\mathtt{y})B^2(0,\mathtt{y})=-4b\mathtt{y}^{\rho }B^2(0,\mathtt{y})=\sum _{i=1}^pA_i^2(0,\mathtt{y}). \end{aligned}$$

As \(\rho \) is either odd or it is even and \(b\not \in -{\Sigma {\kappa }^2}\), we deduce \(B(0,\mathtt{y})=0\) and \(A_i(0,\mathtt{y})=0\), so there exist \(B',A_i'\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(B=\mathtt{x}^2 B'\) (recall that \(B\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\)) and \(A_i=\mathtt{x}A_i'\). We deduce

$$\begin{aligned} 4\mathtt{x}^4B'(\mathtt{x}^{2\mu -2}f+2\mathtt{x}^{2k+2m+2\mu -2}-FB')-\mathtt{x}^{4\mu }g^2 =\mathtt{x}^2\sum _{i=1}^pA_i'^2. \end{aligned}$$
(5.19)

Dividing (5.19) by \(\mathtt{x}^2\) and setting \(\mathtt{x}=0\) next, we deduce \(A_i'(0,\mathtt{y})=0\), so there exists \(A_i''\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(A_i=\mathtt{x}A_i''\). Consequently,

$$\begin{aligned} 4B'(\mathtt{x}^{2\mu -2}f+2\mathtt{x}^{2k+2m+2\mu -2}-FB')-\mathtt{x}^{4\mu -4}g^2 =\sum _{i=1}^pA_i''^2. \end{aligned}$$

Proceeding recursively with \(\mu \) we find the sought polynomial \(\eta \in \kappa [\mathtt{x},\mathtt{y}]\cap {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that

$$\begin{aligned} 4\eta (f+2\mathtt{x}^{2k+2m}-F\eta )-g^2\in \kappa [\mathtt{x},\mathtt{y}]\cap {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]) \end{aligned}$$

and \(n:=k+m\ge n_0+\ell \), as required. \(\square \)

We are ready to prove Theorem 1.8 for the rings \(A=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the series of order three quoted in its statement.

Theorem 5.9

(Order three) Let \(\kappa \) be a (formally) real field such that \(\tau (\kappa )<+\infty \). Denote \(A:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is one of the following series:

  1. (iv)

    \(\mathtt{x}^2\mathtt{y}+(-1)^ka\mathtt{y}^k\) where \(a\not \in -{\Sigma {\kappa }^2}\) and \(k\ge 3\),

  2. (v)

    \(\mathtt{x}^2\mathtt{y}\),

  3. (vi)

    \(\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\) irreducible,

  4. (vii)

    \(\mathtt{x}^3+a\mathtt{y}^4\) where \(a\not \in -{\Sigma {\kappa }^2}\),

  5. (viii)

    \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\),

  6. (ix)

    \(\mathtt{x}^3+\mathtt{y}^5\).

Then \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) and \(p(A)\le 4\tau (\kappa )\).

Proof

The general strategy to prove this result (except for case (v)) is to show that (maybe after a suitable change of coordinates when needed) there exists no positive semidefinite element \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) such that \(f(\mathtt{x},0)\) has order 1, whereas \(F(\mathtt{x},0)\) has order 3 and F satisfies the remaining hypotheses in the statement of Theorem 5.5. Once this is done, Theorem 5.5 applies and we conclude \({{\mathcal {P}}}(A)={\Sigma {A}^2}\) and \(p(A)\le 4\tau (\kappa )\).

We use Lemma 2.7 freely along the proof. We do not have to care about positive semidefinite units of A, because they can be written as \(cU^2\) for some \(c\in \kappa {\setminus }\{0\}\) and some unit \(U\in A\) with \(U(0,0,0)=1\). Thus, \(c\in {{\mathcal {P}}}(A)\), so \(c>_\alpha 0\) for each \(\alpha \in {\text {Sper}}(A)\) such that \({\text {supp}}(\alpha )={{\mathfrak {m}}}\). Such prime cones are in bijection with the orderings of \(\kappa \), so \(c\in {\Sigma {\kappa }^2}\).

(iv) This case is somehow special because with the current coordinates \(F(\mathtt{x},0)=0\), so a suitable change of coordinates is needed to apply Theorem 5.5. We prove first: if \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\), then \(\omega (f)\ge 2\).

Suppose that \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) and \(\omega (f)=1\). Observe that \(f\in {{\mathcal {P}}}(\{F\ge 0\})\). If \(\omega (f(\mathtt{x},0))=1\), there exist \(\zeta \in \kappa [[\mathtt{y}]]\) of order \(\ge 1\), \(b\in \kappa {\setminus }\{0\}\) and a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(U(0,0)=1\) and \(f=(\mathtt{x}-\zeta (\mathtt{y}))bU^2\). Consider the homomorphism

$$\begin{aligned} \varphi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(\zeta (\mathtt{t}^3)-b\mathtt{t}^2,\mathtt{t}^3). \end{aligned}$$

We have \(\varphi (F)=(\zeta (\mathtt{t}^3)-b\mathtt{t}^2)^2\mathtt{t}^3+(-1)^ka\mathtt{t}^{3k}\) and \(\varphi (f)=-b^2\mathtt{t}^2\varphi (U)^2\in -{\Sigma {\kappa [[\mathtt{t}]]}^2}\). As \(b\ne 0\) and \(k\ge 3\), we deduce \(\omega (\varphi (F))=7\) and \(\varphi (F)=b^2\mathtt{t}^7+\cdots \). Fix an ordering \(\alpha \in {\text {Sper}}(\kappa )\) and let \(\beta _0\in {\text {Sper}}(\kappa [[\mathtt{t}]])\) be a prime cone that extends \(\alpha \) such that \(\mathtt{t}>_\beta 0\). Thus, \(\varphi (F)>_{\beta _0}0\), whereas \(\varphi (f)=-b^2\mathtt{t}^2\varphi (U)^2<_{\beta _0}0\), which is a contradiction because \(f\in {{\mathcal {P}}}(\{F\ge 0\})\). Consequently, \(\omega (f(\mathtt{x},0))\ge 2\).

Assume next \(\omega (f(\mathtt{x},0))\ge 2\) and \(\omega (f(0,\mathtt{y}))=1\). There exist \(\xi :=\sum _{\ell \ge 2}\xi _\ell \mathtt{x}^\ell \in \kappa [[\mathtt{x}]]\) of order \(\ge 2\), \(c\in \kappa {\setminus }\{0\}\) and a unit \(V\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(V(0,0)=1\) and \(f=(\mathtt{y}-\xi (\mathtt{x}))cV^2\). Let \(\alpha \in {\text {Sper}}(\kappa )\) and \(M:=\xi _2^2+1\). Consider the homomorphism

$$\begin{aligned} \phi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(\mathtt{t},M\mathtt{t}^2). \end{aligned}$$

We have \(\phi (F)=M\mathtt{t}^4-a(-1)^k\mathtt{t}^{2k}>0\) because \(k\ge 3\), so \(\phi (f)=c(M\mathtt{t}^2-\xi (\mathtt{t}))\phi (V)^2>0\). As \(M>\xi _2\), we deduce \(c>_\alpha 0\). As this holds for each \(\alpha \in {\text {Sper}}(\kappa )\), we conclude \(c\in {\Sigma {\kappa }^2}{\setminus }\{0\}\).

Thus, we may assume \(f=\mathtt{y}-\xi (\mathtt{x})\). As the coefficient \(a\not \in -{\Sigma {\kappa }^2}\), there exists \(\alpha \in {\text {Sper}}(\kappa )\) such that \(a>_\alpha 0\). Consider the homomorphism

$$\begin{aligned} \psi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(\mathtt{t}^k,-\mathtt{t}^2). \end{aligned}$$

We have \(\psi (F)=-\mathtt{t}^{2k+2}+a\mathtt{t}^{2k}>0\) and \(\psi (f)=-\mathtt{t}^2-\xi (\mathtt{t}^k)<0\) because \(k\ge 3\). Thus, there exists a prime cone \(\beta _1\in {\text {Sper}}(\kappa [[\mathtt{t}]])\) extending \(\alpha \) such that \(\psi (F)>_{\beta _1}0\), whereas \(\psi (f)<_{\beta _1}0\), which is a contradiction because \(f\in {{\mathcal {P}}}(\{F\ge 0\})\).

Consequently, \(\omega (f)\ge 2\). By Example 2.6(ii) we know that F is k-determined. After a linear change of coordinates \(\mathtt{y}\mapsto \lambda \mathtt{x}+\mathtt{y}\) (for some \(\lambda \in \kappa \)) the series F becomes \(F(\mathtt{x},\mathtt{y})=\mathtt{x}^2(\lambda \mathtt{x}+\mathtt{y})+(-1)^ka(\lambda \mathtt{x}+\mathtt{y})^k\) and satisfies \(F(\mathtt{x},0)=\lambda \mathtt{x}^3+(-1)^ka\lambda ^k\mathtt{x}^k\) and \(F(0,\mathtt{y})=(-1)^ka\mathtt{y}^k\). In case \(k\ge 4\), we choose \(\lambda =1\), whereas in case \(k=3\), we choose \(\lambda \) such that \(\lambda (1-a\lambda ^2)\ne 0\) (in such a way that in both cases \(\omega (F(\mathtt{x},0))=3\)). As we have already proved, there exist no elements \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) such that \(\omega (f)=1\).

(v) For this case we use a ‘limit argument’. Let \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\). We may assume \(g\ne 0\) (Lemma 4.1(iv)). Then by Corollary 3.5

$$\begin{aligned}&f\in {{\mathcal {P}}}(\{\mathtt{x}^2\mathtt{y}\ge 0\})\subset {{\mathcal {P}}}(\{\mathtt{y}\ge 0\}),\\&f^2-\mathtt{x}^2\mathtt{y}g^2\in {{\mathcal {P}}}(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

By Lemma 4.1 if n is large enough, then \(f+(\mathtt{x}^2+\mathtt{y}^2)^n+\mathtt{z}g\in {{\mathcal {P}}}^\oplus (A)\), that is, by Sect. 4.1

$$\begin{aligned}&f+(\mathtt{x}^2+\mathtt{y}^2)^n\in {{\mathcal {P}}}^+(\{\mathtt{x}^2\mathtt{y}\ge 0\})\subset {{\mathcal {P}}}(\{\mathtt{y}\ge 0\}),\\&(f+(\mathtt{x}^2+\mathtt{y}^2)^n)^2-\mathtt{x}^2\mathtt{y}g^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

By Corollary 2.14 we deduce that if \(r\ge 1\) is large enough, then

$$\begin{aligned} (f+(\mathtt{x}^2+\mathtt{y}^2)^n)-(\mathtt{x}^2\mathtt{y}+\mathtt{y}^{2r})g^2\in {{\mathcal {P}}}^+(\kappa [[\mathtt{x},\mathtt{y}]]). \end{aligned}$$

Let us check: if \(r\ge 2n+2\) is large enough, then \(f+(\mathtt{x}^2+\mathtt{y}^2)^n\in {{\mathcal {P}}}^+(\{\mathtt{x}^2\mathtt{y}+\mathtt{y}^{2r}\ge 0\})\).

As \(f+(\mathtt{x}^2+\mathtt{y}^2)^n\in {{\mathcal {P}}}^+(\{\mathtt{x}^2\mathtt{y}\ge 0\})\), the series \(f+(\mathtt{x}^2+\mathtt{y}^2)^n\) is positive for each \(\gamma \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) such that \({\text {supp}}(\gamma )=(\mathtt{x})\). This means that there exist \(1\le s\le n\), \(c\in {\Sigma {\kappa }^2}{\setminus }\{0\}\) and a unit \(u\in \kappa [[\mathtt{y}]]\) such that \(u(0)=1\) and \(f(0,\mathtt{y})+\mathtt{y}^{2n}=\mathtt{y}^{2s}cu^2\). Let \(\beta \in {\text {Sper}}(\kappa [[\mathtt{x},\mathtt{y}]])\) be such that \(\mathtt{y}(\mathtt{x}^2+\mathtt{y}^{2r-1})\ge _\beta 0\). If \(\mathtt{y}\ge _\beta 0\), then \(\mathtt{x}^2\mathtt{y}\ge _\beta 0\), so \(f\ge _\beta 0\) and \(f+(\mathtt{x}^2+\mathtt{y}^2)^n\ge _\beta 0\). If \(\mathtt{y}<_\beta 0\), then \(\mathtt{x}^2+\mathtt{y}^{2r-1}\le _\beta 0\) and \(\mathtt{y}\not \in {\text {supp}}(\beta )\). Thus, as \(2r-1\ge 4n+3\),

$$\begin{aligned} \mathtt{x}^2\le _\beta -\mathtt{y}^{2r-1}\le _\beta \mathtt{y}^{4n+2}\le _\beta \mathtt{y}^{4s+2}. \end{aligned}$$

As \(\mathtt{y}<_\beta 0\), then \(|\mathtt{x}|_\beta <_\beta -\mathtt{y}^{2s+1}\) where

$$\begin{aligned} |h|_\beta :={\left\{ \begin{array}{ll} h&{}\text {if }h\ge _\beta 0,\\ -h&{}\hbox { if}\ h<_\beta 0\end{array}\right. } \end{aligned}$$

for each \(h\in \kappa [[\mathtt{x},\mathtt{y}]]\). Write

$$\begin{aligned} f+(\mathtt{x}^2+\mathtt{y}^2)^n=f(0,\mathtt{y})+\mathtt{y}^{2n}+\mathtt{x}\xi =\mathtt{y}^{2s}cu^2+\mathtt{x}\xi \end{aligned}$$

where \(\xi \in \kappa [[\mathtt{x},\mathtt{y}]]\). We have

$$\begin{aligned} f+(\mathtt{x}^2+\mathtt{y}^2)^n= & {} \mathtt{y}^{2s}cu^2+\mathtt{x}\xi \ge _\beta \mathtt{y}^{2s}cu^2 -|\mathtt{x}|_\beta |\xi |_\beta \\\ge & {} \mathtt{y}^{2s}cu^2+\mathtt{y}^{2s+1}(1+\xi ^2(0,0))>_\beta 0. \end{aligned}$$

Thus, \(f+(\mathtt{x}^2+\mathtt{y}^2)^n\in {{\mathcal {P}}}^+(\{\mathtt{x}^2\mathtt{y}+\mathtt{y}^{2r}\ge 0\})\), so \(f+(\mathtt{x}^2+\mathtt{y}^2)^n+\mathtt{z}g\in {{\mathcal {P}}}^\oplus (A_r)\) where \(A_r:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-\mathtt{x}^2\mathtt{y}-\mathtt{y}^{2r})\). As \({{\mathcal {P}}}(A_r)={\Sigma _p{A_r}^2}\), there exist \(a_{in},b_{in},q_n\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that:

$$\begin{aligned} f+(\mathtt{x}^{2n}+\mathtt{y}^{2n})+\mathtt{z}g=(a_{1n}+\mathtt{z}b_{1n})^2+\cdots +(a_{pn}+\mathtt{z}b_{pn})^2-(\mathtt{z}^2-\mathtt{x}^2\mathtt{y}-\mathtt{y}^{2r})q_n. \end{aligned}$$

Consequently,

$$\begin{aligned} f+\mathtt{z}g\equiv (a_{1n}+\mathtt{z}b_{1n})^2+\cdots +(a_{pn}+\mathtt{z}b_{pn})^2-(\mathtt{z}^2-\mathtt{x}^2\mathtt{y})q_n\ \mod {{\mathfrak {m}}}_2^{2n}. \end{aligned}$$

By Strong Artin’s approximation there exist \(a_i,b_i,q\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that

$$\begin{aligned} f+\mathtt{z}g\equiv (a_1+\mathtt{z}b_1)^2+\cdots +(a_p+\mathtt{z}b_p)^2-(\mathtt{z}^2-\mathtt{x}^2\mathtt{y})q, \end{aligned}$$

that is, \(f+\mathtt{z}g\in {\Sigma _p{A}^2}\).

(vi) In this case \(F(\mathtt{x},0)=\mathtt{x}^3\), \(F(0,\mathtt{y})=b\mathtt{y}^3\) and F is 3-determined (Example 2.6(iii)). We have to prove: if \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) and \(f(\mathtt{x},0)\ne 0\), then \(\omega (f(\mathtt{x},0))\ge 2\).

Assume \(\omega (f(\mathtt{x},0))=1\). There exist \(\zeta \in \kappa [[\mathtt{y}]]\) of order \(\ge 1\), \(c\in \kappa {\setminus }\{0\}\) and a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(U(0,0)=1\) and \(f=(\mathtt{x}-\zeta (\mathtt{y}))cU^2\). Consider the homomorphism

$$\begin{aligned} \varphi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(\zeta (\mathtt{t})-c\mathtt{t}^2,\mathtt{t}). \end{aligned}$$

We have \(\varphi (F)=(\zeta (\mathtt{t})-c\mathtt{t}^2)^3+a\mathtt{t}^2(\zeta (\mathtt{t})-c\mathtt{t}^2)+b\mathtt{t}^3\) and \(\varphi (f)=-c^2\mathtt{t}^2U^2(\zeta (\mathtt{t})-c\mathtt{t}^2,\mathtt{t})\). As \(b\ne 0\), we deduce

$$\begin{aligned} \omega ((\zeta (\mathtt{t})-c\mathtt{t}^2)^3+a\mathtt{t}^2(\zeta (\mathtt{t})-c\mathtt{t}^2)+b\mathtt{t}^3)={\left\{ \begin{array}{ll} \omega (F(d,1)\mathtt{t}^3+\cdots )=3&{}\hbox { if}\ \omega (\zeta )=1,\\ \omega (b\mathtt{t}^3+\cdots )=3&{}\hbox { if}\ \omega (\zeta )\ge 2, \end{array}\right. } \end{aligned}$$

for some \(d\in \kappa {\setminus }\{0\}\). We only have to explain the first row. As \(\zeta \in \kappa [[\mathtt{t}]]\) and \(\omega (\zeta )=1\), then \(\zeta =d\mathtt{t}+\cdots \), so

$$\begin{aligned} \varphi (F)=(\zeta (\mathtt{t})-c\mathtt{t}^2)^3+a\mathtt{t}^2(\zeta (\mathtt{t})-c\mathtt{t}^2)+b\mathtt{t}^3 =(d^3+ad+b)\mathtt{t}^3+\cdots =F(d,1)\mathtt{t}^3+\cdots . \end{aligned}$$

As \(F(\mathtt{x},1)\in \kappa [\mathtt{x}]\) is an irreducible polynomial, \(F(d,1)\ne 0\) and \(\varphi (F)\) has order 3.

Fix an ordering \(\alpha \) of \(\kappa \) and let \(\beta \in {\text {Sper}}(\kappa [[\mathtt{t}]])\) be a prime cone that extends \(\alpha \) such that \(F(d,1)\mathtt{t}>0\) in the first case and \(b\mathtt{t}>0\) in the second case. Thus, \(\varphi (F)>_\beta 0\), whereas \(\varphi (f)=-c^2\mathtt{t}^2U^2(\zeta (\mathtt{t})-c\mathtt{t}^2,\mathtt{t})<_\beta 0\). This is a contradiction because \(f\in {{\mathcal {P}}}(\{F\ge 0\})\). Consequently, \(\omega (f(\mathtt{x},0))\ge 2\).

(vii) In this case \(F(\mathtt{x},0)=\mathtt{x}^3\), \(F(0,\mathtt{y})=a\mathtt{y}^4\) and F is 4-determined (Example 2.6(v)). We have to prove: if \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) and \(f(\mathtt{x},0)\ne 0\), then \(\omega (f(\mathtt{x},0))\ge 2\).

Assume \(\omega (f(\mathtt{x},0))=1\). There exists \(\zeta \in \kappa [[\mathtt{y}]]\) of order \(\ge 1\), \(b\in \kappa {\setminus }\{0\}\) and a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(U(0,0)=0\) and \(f=(\mathtt{x}-\zeta (\mathtt{y}))bU^2\). As \(a\not \in -{\Sigma {\kappa }^2}\), there exists an ordering \(\alpha \in {\text {Sper}}(\kappa )\) such that \(a>_\alpha 0\). Consider the homomorphism

$$\begin{aligned} \varphi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(\zeta (\mathtt{t})-b\mathtt{t}^2,\mathtt{t}). \end{aligned}$$

We have \(\varphi (F)=(\zeta (\mathtt{t})-b\mathtt{t}^2)^3+a\mathtt{t}^4\) and \(\varphi (f)=-b^2\mathtt{t}^2\varphi (U)^2\in -{\Sigma {\kappa [[\mathtt{t}]]}^2}\). In addition,

$$\begin{aligned} \omega ((\zeta (\mathtt{t})-b\mathtt{t}^2)^3+a\mathtt{t}^4)={\left\{ \begin{array}{ll} 3&{}\hbox { if}\ \omega (\zeta )=1,\\ 4&{}\text {if }\omega (\zeta )\ge 2. \end{array}\right. } \end{aligned}$$

Let \(\beta \in {\text {Sper}}(\kappa [[\mathtt{t}]])\) be a prime cone that extends \(\alpha \) and satisfies \((\zeta (\mathtt{t})-b\mathtt{t}^2)^3+a\mathtt{t}^4>_\beta 0\). Observe that \(\varphi (f)=-b^2\mathtt{t}^2\varphi (U)^2<_\beta 0\). This is a contradiction because \(f\in {{\mathcal {P}}}(\{F\ge 0\})\). Consequently, \(\omega (f(\mathtt{x},0))\ge 2\).

(viii) We prove first: if \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\), then \(\omega (f(\mathtt{x},0))\ge 2\).

Suppose that \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) and \(\omega (f(\mathtt{x},0))=1\). There exist \(\zeta \in \kappa [[\mathtt{y}]]\) of order \(\ge 1\), \(a\in \kappa {\setminus }\{0\}\) and a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(U(0,0)=1\) and \(f=(\mathtt{x}+\zeta (\mathtt{y}))aU^2\). Let \(\alpha \in {\text {Sper}}(\kappa )\) and consider the homomorphism

$$\begin{aligned} \varphi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(\mathtt{t}^2,0). \end{aligned}$$

We have \(\varphi (F)=\mathtt{t}^6>0\), so \(\varphi (f)=a\mathtt{t}^2\phi (U)^2>0\). This means that \(a>_\alpha 0\) and as this holds for each \(\alpha \in {\text {Sper}}(\kappa )\), we conclude \(a\in {\Sigma {\kappa }^2}{\setminus }\{0\}\). Thus, we may assume \(f=\mathtt{x}+\zeta (\mathtt{y})\). Consider the homomorphism

$$\begin{aligned} \varphi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(0,\mathtt{t}). \end{aligned}$$

We have \(\varphi (F)=0\) and \(\varphi (f)=\zeta (\mathtt{t})\). As \(f\in {{\mathcal {P}}}(\{F\ge 0\})\) and \(\varphi (F)=0\), we deduce \(\zeta (\mathtt{t})\in {{\mathcal {P}}}(\kappa [[\mathtt{t}]])={\Sigma {\kappa [[\mathtt{t}]]}^2}\). In particular, \(\omega (\zeta (\mathtt{t}))\ge 2\) and we choose \(M:=\zeta _2^2+1\) where \(\zeta (\mathtt{t}):=\sum _{k\ge 2}\zeta _k\mathtt{t}^k\). Consider the homomorphism

$$\begin{aligned} \varphi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(-M\mathtt{t}^2,-\mathtt{t}). \end{aligned}$$

Choose \(\beta \in {\text {Sper}}(\kappa [[\mathtt{t}]])\) such that \(\mathtt{t}>_\beta 0\). Then \(\varphi (F)=-M^3\mathtt{t}^6+M\mathtt{t}^5>_\beta 0\) and \(\varphi (f)=-M\mathtt{t}^2+\zeta (\mathtt{t})<_\beta 0\) because \(M>_\beta \zeta _2\). This is a contradiction because \(f\in {{\mathcal {P}}}(\{F\ge 0\})\). Consequently, \(\omega (f(\mathtt{x},0))\ge 2\).

By Example 2.6(iv) F is 5-determined. After the change of coordinates \(\mathtt{x}\mapsto \mathtt{x}+\mathtt{y}^2\) the series F becomes \(F(\mathtt{x},\mathtt{y})=(\mathtt{x}+\mathtt{y}^2)^3+(\mathtt{x}+\mathtt{y}^2)\mathtt{y}^3\) and satisfies \(F(\mathtt{x},0)=\mathtt{x}^3\) and \(F(0,\mathtt{y})=\mathtt{y}^5+\mathtt{y}^6\). As we have already proved, there exists no element \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) such that \(\omega (f(\mathtt{x},0))=1\) (and this enough in our situation, because the performed change of coordinates was \(\mathtt{x}\mapsto \mathtt{x}+\mathtt{y}^2\)).

(ix) In this case \(F(\mathtt{x},0)=\mathtt{x}^3\), \(F(0,\mathtt{y})=\mathtt{y}^5\) and F is 5-determined (Example 2.6(v)). We have to prove: if \(f+\mathtt{z}g\in {{\mathcal {P}}}(A)\) and \(f(\mathtt{x},0)\ne 0\), then \(\omega (f(\mathtt{x},0))\ge 2\).

Assume \(\omega (f(\mathtt{x},0))=1\). There exists \(\zeta \in \kappa [[\mathtt{y}]]\) of order \(\ge 1\), \(b\in \kappa {\setminus }\{0\}\) and a unit \(U\in \kappa [[\mathtt{x},\mathtt{y}]]\) such that \(U(0,0)=1\) and \(f=(\mathtt{x}-\zeta (\mathtt{y}))bU^2\). Consider the homomorphism

$$\begin{aligned} \varphi :\kappa [[\mathtt{x},\mathtt{y}]]\rightarrow \kappa [[\mathtt{t}]],\ h\mapsto h(\zeta (\mathtt{t})-b\mathtt{t}^2,\mathtt{t}). \end{aligned}$$

We have \(\varphi (F)=(\zeta (\mathtt{t})-b\mathtt{t}^2)^3+\mathtt{t}^5\) and \(\varphi (f)=-b^2\mathtt{t}^2\varphi (U)^2\in -{\Sigma {\kappa [[\mathtt{t}]]}^2}\). In addition,

$$\begin{aligned} \omega ((\zeta (\mathtt{t})-b\mathtt{t}^2)^3+\mathtt{t}^5)={\left\{ \begin{array}{ll} 3&{}\hbox { if}\ \omega (\zeta )=1,\\ 5&{}\text {if }\omega (\zeta )\ge 2. \end{array}\right. } \end{aligned}$$

Fix an ordering \(\alpha \in {\text {Sper}}(\kappa )\) and let \(\beta \in {\text {Sper}}(\kappa [[\mathtt{t}]])\) be a prime cone that extends \(\alpha \) such that \((\zeta (\mathtt{t})-b\mathtt{t}^2)^3+\mathtt{t}^5>0\). Thus, \(\varphi (F)>_\beta 0\), whereas \(\varphi (f)=-b^2\mathtt{t}^2\varphi (U)^2<_\beta 0\). This is a contradiction because \(f\in {{\mathcal {P}}}(\{F\ge 0\})\). Consequently, \(\omega (f(\mathtt{x},0))\ge 2\), as required. \(\square \)

Remark 5.10

(i) Although Theorem 5.5 has been thought as a main tool to prove Theorem 5.9, it provides further information. If \(A=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where

  • \(\kappa \) is a (formally) real field such that \(\tau (\kappa )<+\infty \),

  • \(F(0,\mathtt{y}))=b\mathtt{y}^{\rho }v\) where \(v\in \kappa [[\mathtt{y}]]\) is a unit such that \(v(0)=1\), \(b\ne 0\) and \(\rho \ge 3\) is either odd or \(\rho \) is even and \(b\not \in -{\Sigma {\kappa }^2}\),

  • \(\omega (F(\mathtt{x},0))=3\) and F is \(\rho \)-quasidetermined,

then the possible elements belonging to the difference \({{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\) are series of order 1. Thus, for this type of rings there exist either none or ‘few’ series that are positive semidefinite but they are not sums of squares.

(ii) In the statement of Theorem 5.5(ii) we have required that the series \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) is \(\rho \)-quasidetermined where \(\rho =\omega (F(0,\mathtt{y}))\). In fact, it is enough that it is k-quasidetermined for some \(k\ge 1\). The reason for our assumption is that under such hypotheses the proof has a simpler presentation and all the cases to which we apply Theorem 5.5(ii) to prove Theorem 5.9 are included. However, the alternative formulation provides further singularities to which we can apply the previous remark, see Examples 2.6(iii)-(vii).

(iii) In [40] Scheiderer gives a negative answer (if \(n\ge 2\)) to the following question raised by Sturmfels: Let \(f\in {{\mathbb {Q}}}[\mathtt{x}_1,\ldots ,\mathtt{x}_n]\) be a polynomial, which is a sum of squares in \({{\mathbb {R}}}[\mathtt{x}_1,\ldots ,\mathtt{x}_n]\). Is f necessarily a sum of squares in \({{\mathbb {Q}}}[\mathtt{x}_1,\ldots ,\mathtt{x}_n]\)?

We can formulate a similar question for the rings \(A=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) where \(\kappa \) admits a unique ordering, \(\tau (\kappa )<+\infty \) and \(F\in \kappa [[\mathtt{x},\mathtt{y}]]\) satisfies the hypotheses of Theorem 5.5(ii) (even the relaxed ones quoted in the previous remark). Let R be the real closure of \(\kappa \) (endowed with its unique ordering) and \(B:=R[[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\). By Lemma 2.7, an adapted version of Lemma 2.12 and [1, Prop.VII.5.1] one deduces that \({{\mathcal {P}}}(A)={{\mathcal {P}}}(B)\cap A\). Let \(f+\mathtt{z}g\in A\cap {\Sigma {B}^2}\subset A\cap {{\mathcal {P}}}(B)={{\mathcal {P}}}(A)\). By Theorem 5.5(i) there exists \(\ell \ge 0\) and \(f_1+\mathtt{z}g_1\in {{\mathcal {P}}}(A)\) such that \(f_1(\mathtt{x},0)\ne 0\) and \(f+\mathtt{z}g=\mathtt{y}^{2\ell }(f_1+\mathtt{z}g_1)\). As \(f+\mathtt{z}g\in {\Sigma {B}^2}\), there exist \(a_i,b_i,q\in R[[\mathtt{x},\mathtt{y}]]\) such that

$$\begin{aligned} \mathtt{y}^{2\ell }(f_1+\mathtt{z}g_1)&=\sum _{i=1}^p(a_i+\mathtt{z}b_i)^2-(\mathtt{z}^2-F)q, \end{aligned}$$
(5.20)
$$\begin{aligned} \mathtt{y}^{2\ell }f_1&=\sum _{i=1}^pa_i^2+F\sum _{i=1}^pb_i^2,\end{aligned}$$
(5.21)
$$\begin{aligned} \mathtt{y}^{2\ell }g_1&=2\sum _{i=1}^pa_ib_i. \end{aligned}$$
(5.22)

Observe that \(q=\sum _{i=1}^pb_i^2\). If \(\ell \ge 1\), we set \(\mathtt{y}=0\) in (5.21) and deduce

$$\begin{aligned} 0=\sum _{i=1}^pa_i^2(\mathtt{x},0)+\mathtt{x}^3\sum _{i=1}^pb_i^2(\mathtt{x},0), \end{aligned}$$

so \(a_i(\mathtt{x},0)=0\) and \(b_i(\mathtt{x},0)=0\) for each i. There exist \(a_i',b_i',q'\in R[[\mathtt{x},\mathtt{y}]]\) satisfying \(a_i=\mathtt{y}a_i'\), \(b_i=\mathtt{y}b_i'\) and \(q=\sum _{i=1}^pb_i^2=\mathtt{y}^2q'\). This means that we can divide (5.20) by \(\mathtt{y}^2\). Proceeding recursively we conclude \(f_1+\mathtt{z}g_1\in A\cap {\Sigma {B}^2}\). Thus, either \(f_1+\mathtt{z}g_1\) is a unit in A and \(f_1+\mathtt{z}g_1\in {\Sigma {A}^2}\) (see the beginning of the proof of Theorem 5.9) or there exist series \(c_i,d_i\in R[[\mathtt{x}]]\) such that \(f_1(\mathtt{x},0)=\sum _{i=1}^pc_i^2+\mathtt{x}^3\sum _{i=1}^pd_i^2\) (set \(\mathtt{y}=0,\mathtt{z}=0\) in a representation of \(f_1+\mathtt{z}g_1\) as a sum of squares in B). Consequently, \(\omega (f_1(\mathtt{x},0))\ge 2\) and by Theorem 5.5(ii) \(f_1+\mathtt{z}g_1\in {\Sigma {A}^2}\), so \(f+\mathtt{z}g\in {\Sigma {A}^2}\). Thus, the answer to the corresponding Sturmfels question for this family of rings is positive!

6 Applications: Principal saturated preorderings of low order

In this section we generalize some results of [38, 39] concerning the characterization of the principal saturated preorderings \(T:=\mathrm{PO}(F):=\{s_1+s_2F:\ s_1,s_2\in {\Sigma {A}^2}\}\) of low order in a 2-dimensional excellent henselian regular local ring \((A,{{\mathfrak {m}}})\) whose residue field \(\kappa :=A/{{\mathfrak {m}}}\) is (formally) real and has \(\tau (\kappa )<+\infty \). If we denote \(X(T):=\{\alpha \in {\text {Sper}}(A):\ f\ge _{\alpha }0\ \forall f\in T\}\), the saturation of T is \(\mathrm{Sat}(T):=\{f\in A:\ f\ge _{\alpha }0\ \forall \alpha \in X(T)\}\). As one can expect, T is saturated if \(T=\mathrm{Sat}(T)\). If \(F\in A{\setminus }{{\mathfrak {m}}}^2\), then T is always saturated [37, Lem.3.1], so we focus our attention on elements \(F\in {{\mathfrak {m}}}^2\). A general strategy in [38, 39] to prove that a principal preordering \(T:=\mathrm{PO}(F)\) of \(\kappa [[\mathtt{x},\mathtt{y}]]\) is saturated is to consider the extended ring \(B:=\kappa [[\mathtt{x},\mathtt{y},\mathtt{z}]]/(\mathtt{z}^2-F)\) and to observe that \(\mathrm{Sat}(T)={{\mathcal {P}}}(\{F\ge 0\})\subset {{\mathcal {P}}}(B)\) (Corollary 3.5). If \(f\in \mathrm{Sat}(T)\) and \({{\mathcal {P}}}(B)={\Sigma {B}^2}\), then there exist \(a_i,b_i,q\in \kappa [[\mathtt{x},\mathtt{y}]]\) for \(i=1,\ldots ,p\) such that

$$\begin{aligned} f=\sum _{i=1}^p(a_i+b_i\mathtt{z})^2-(\mathtt{z}^2-F)q\quad \leadsto \quad f=\sum _{i=1}^pa_i^2+F\sum _{i=1}^pb_i^2\in T. \end{aligned}$$

The previous implication is used in the sketches of proofs of the following results.

Corollary 6.1

(Order two) Let \((A,{{\mathfrak {m}}})\) be an excellent henselian regular local ring of dimension 2 such that its residue field \(\kappa :=A/{{\mathfrak {m}}}\) admits a unique ordering and has \(\tau (\kappa )<+\infty \). Let \(F\in {{\mathfrak {m}}}^2{\setminus }{{\mathfrak {m}}}^3\) and T be the principal preordering of A generated by F. Then T is saturated in A if and only if there exists \(c\in \kappa {\setminus }{0}\) such that \(c^2F\) is right equivalent in \({\widehat{A}}\cong \kappa [[\mathtt{x},\mathtt{y}]]\) to one of the following series:

  1. (i)

    \(a\mathtt{x}^2+b\mathtt{y}^{2k}\) such that \(a>0\), \(b\ne 0\) and \(k\ge 1\),

  2. (ii)

    \(a\mathtt{x}^2+\mathtt{y}^{2k+1}\) where \(a>0\) and \(k\ge 1\),

  3. (iii)

    \(a\mathtt{x}^2\) where \(a>0\).

Sketch of proof

The result follows straightforwardly from Corollary 1.11, the proof of Theorem 3.7 and Theorem 5.4. A key fact for our purposes is that in the proof of Theorem 3.7 if the difference \({{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\ne \varnothing \), then \({{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2}\ne \varnothing \). As a guideline, the reader can have a look at [38, Sect. 5.7]. \(\square \)

In the case of order 3 the result is even more satisfactory, because we do not need to impose that \(\kappa \) admits a unique ordering, but only that \(\kappa \) is a (formally) real field.

Corollary 6.2

(Order three) Let \((A,{{\mathfrak {m}}})\) be an excellent henselian regular local ring of dimension 2 such that its residue field \(\kappa :=A/{{\mathfrak {m}}}\) is a (formally) real field and has \(\tau (\kappa )<+\infty \). Let \(F\in {{\mathfrak {m}}}^3{\setminus }{{\mathfrak {m}}}^4\) and T be the principal preordering of A generated by F. Then T is saturated in A if and only if there exists \(c\in \kappa {\setminus }{0}\) such that \(c^2F\) is right equivalent in \({\widehat{A}}\cong \kappa [[\mathtt{x},\mathtt{y}]]\) to one of the following series:

  1. (iv)

    \(\mathtt{x}^2\mathtt{y}+(-1)^ka\mathtt{y}^k\) where \(a>0\) and \(k\ge 3\),

  2. (v)

    \(\mathtt{x}^2\mathtt{y}\),

  3. (vi)

    \(\mathtt{x}^3+a\mathtt{x}\mathtt{y}^2+b\mathtt{y}^3\) irreducible,

  4. (vii)

    \(\mathtt{x}^3+a\mathtt{y}^4\) where \(a>0\),

  5. (viii)

    \(\mathtt{x}^3+\mathtt{x}\mathtt{y}^3\),

  6. (ix)

    \(\mathtt{x}^3+\mathtt{y}^5\).

Sketch of proof

The result follows straightforwardly from Corollary 1.11, the proof of Theorem 3.8 and Theorem 5.9. A key fact for our purposes is that in the proof of Theorem 3.8 if the difference \({{\mathcal {P}}}(A){\setminus }{\Sigma {A}^2}\ne \varnothing \), then \({{\mathcal {P}}}(\{F\ge 0\}){\setminus }{\Sigma {A}^2}\ne \varnothing \). As a guideline the reader can have a look at [39, Sect. 6.5]. \(\square \)

In [39, Rem.6.8] Scheiderer explains that going beyond order three seems difficult because we do not even know whether the saturatedness of \(\mathrm{PO}(F)\) depends only on the pair \(({\widehat{A}},F)\). In [39, Thm.6.3 and Thm.6.6] Scheiderer extends the analogous results to Corollaries 6.1 and 6.2 when \(\kappa \) is a real closed field to the setting of excellent regular local rings of dimension 2, that is, he erases the ‘henselian condition’. The strategy proposed there uses strongly the fact that the residue field is real closed. It seems to us that the extension of our results (Corollaries 6.1 and 6.2 ) to the setting of an excellent regular local ring of dimension 2 when the residue field \(\kappa \) is (formally) real and has \(\tau (\kappa )<+\infty \) needs a new strategy, even if we impose that \(\kappa \) admits a unique ordering.