ON SUMS OF SQUARES IN LOCAL RINGS

CLAUS SCHEIDERER

Abstract. Let A be a semilocal ring. We compare the set of positive semidefinite (psd) elements of A and the set of sums of squares in A. For psd f ∈ A, whether f is a sum of squares or not depends only on the behavior of f in an infinitesimal neighborhood of the real zeros of f in Spec A. We apply this observation, first to 1-dimensional local rings, then to 2-dimensional regular semilocal rings. For the latter, we show that every psd element is a sum of squares. On the quantitative side, we obtain explicit (finite) upper bounds for the Pythagoras number, for various classes of local rings for which finiteness of this invariant has been an open question so far. For example, a regular 2dimensional local ring has finite Pythagoras number if and only if its quotient field does.

Introduction

Let A be a local ring, or more generally, a semilocal ring. The aim of this paper is a study of the set ΣA^{2} of all sums of squares of elements of A, both from a qualitative and from a quantitative point of view. Briefly, we try to characterize the set ΣA^{2} inside A, and we try to study the number of squares needed for sums of squares representations.

Sums of squares are, of course, a subject with an extremely rich and beautiful history. Having always been a traditional topic of classical number theory (Fermat, Legendre, Gauß), it received an additional momentum in the last century from Hilbert’s 17th problem and the developments that emerged from it. Sums of squares have become a central topic in the algebraic theory of quadratic forms over fields, much due to Pfister’s elegant theorems, and they lie at the very basis of real algebra, ever since Artin solved Hilbert’s 17th problem and established the connection with the concept of orderings.

In the 1970’s, much of the algebraic theory of quadratic forms has been successfully transfered from fields to the broader context of local and semilocal rings. Still, there is a drawback in the local situation, since quadratic form theory does often not provide much insight about non-units. For example, results on representations of elements as sums of squares (or as values of more general quadratic forms) are typically restricted to units. The reason is simply that a non-unit does not give rise to a non-degenerate quadratic form.

Therefore, although our subject belongs to the intersection of quadratic form theory and real algebra, the presence of the second will be felt stronger than the presence of the first. The questions we take up are mostly well-established for units, but are much less clear for non-units.

Date: January 2, 2001.

1991 Mathematics Subject Classification. Primary 11E25; Secondary 13H, 14P.

Key words and phrases. Sums of squares, semilocal rings, Pythagoras number, quadratic forms, orderings, real spectrum.

For much information on sums of squares, in particular in the more general context of rings rather than fields, we refer to Ch. 7 of Pfister’s book [23], and to the important papers by Choi, Dai, Lam, Reznick [9] and by Mahé [18].

One of our main concerns will be to characterize the sums of squares inside A. If K is the total ring of quotients of A, then for f ∈ A to be a sum of squares in A, it is obviously necessary that f is a sum of squares in K. However, there is another necessary condition, stronger if A is reduced and noetherian, and often strictly stronger. Namely, a sum of squares in A has non-negative sign with respect to any ordering of any residue field of A. An element with this latter property will be called positive semi-definite (or psd, for short). We will try to understand in which (semi-) local rings it is true that, conversely, every psd element is a sum of squares (or sos, for short).

For example, this is known to be the case if A is a field (Artin) or a valuation ring (Kneser, Colliot-Thélène, see [10]). On the other hand, one cannot usually expect it to be true if dim A ≥ 3, for quite elementary reasons (see 1.11). Therefore, the emphasis will be on semilocal rings of dimension one or two.

Our starting point is an observation (Thm. 2.2) which, although elementary, seems to have escaped earlier notice. It lies at the basis of most of our results. Given any semilocal ring A and a psd element f in A, assume that f is a sum of squares modulo the ideal (f^{2}). Then f is a sum of squares altogether. Therefore, the behavior of f in an infinitesimal algebraic neighborhood of its zero locus decides (for psd f), whether or not f is a sum of squares in A. It is interesting that, in this way, rings with nilpotent elements become useful for the study of sums of squares in very “well-behaved” (semi-) local rings, like regular domains.

There is a refinement of this result, to the effect that it suffices even that f is a sum of squares in a suitable infinitesimal neighborhood of its real zero locus in Spec A (Thm. 2.5). A consequence is the following: If A is a noetherian semilocal ring, and f is a psd element in A whose real zero locus has dimension ≤ 0, then f is a sum of squares in A if(f) it is a sum of squares in the completion Â (Cor. 2.7). This is a fact that is much exploited in the rest of the paper.

In Sect. 3, we study one-dimensional local noetherian rings A, and try to determine those in which every psd element is a sum of squares (or briefly, in which psd = sos holds). The main result (Thm. 3.9) says, under a mild restriction (A has to be a Nagata ring), that psd = sos holds in A iff it holds in the completion Â. Moreover, under the condition that the residue field of A is real closed, we succeed in giving a complete classification of these rings.

In Sect. 4, we turn to the case of dimension two. Here the main result is that psd = sos holds in any two-dimensional regular semilocal ring (Thm. 4.8). This answers an open question from [28]. With the help of Cor. 2.7, the proof gets reduced to the case of a power series ring k[[x, y]], which in turn is treated using Weierstraß preparation and again 2.7. If the field k is real closed, it has long been known that every psd element in k[[x, y]] is a sum of squares (of two squares, in fact), but already the case of k[[x, y]] for general k seems to be new.

It turns out that our methods, aiming originally at qualitative information on sums of squares, provide a lot of quantitative information as well. This is exploited in the final Sect. 5. Recall that the Pythagoras number p(A) of a ring A is the least integer n such that every sum of squares in A is a sum of n squares. This is an invariant which has received much attention, and which is often hard to get a hold on, even in the case of fields. For simplicity, we restrict to local (instead of semilocal) rings. Our methods lead to significant progress on the Pythagoras numbers of such rings. Briefly, we establish not only finiteness, but also (reasonable) upper bounds for p(A), for several classes of rings for which not even finiteness of p(A) was known before.

Here is a brief summary of the main results. We show that the square lengths of totally positive elements in semilocal rings of geometric type over a real closed field are bounded, and in fact, bounded in terms of the transcendence degree (5.10). This answers a question of Mahé. Another application is to local rings A of algebraic curves over a real closed field, where we compare p(A) to p(Â) (5.11). We then turn to local rings of dimension two. First, we estimate the Pythagoras number of power series rings k[[x, y]] (5.17), and then produce a general upper bound for p(A), for factorial A, in terms of its units Pythagoras number and its completion (5.18).

The use of this bound is illustrated by several concrete applications. Let A be a regular two-dimensional local ring of an algebraic variety V over a real closed field. If dim V = d, we show that p(A) ≤ 2^{d}, which is the best bound one can reasonably expect (5.23). Even the finiteness of p(A) was not known before. Similarly, we give a bound on the Pythagoras number of two-dimensional local rings of regular arithmetic schemes (5.25). Finally, we solve a general open problem posed by Choi, Dai, Lam and Reznick, by showing that a two-dimensional regular local ring A has finite Pythagoras number if (and only if) its quotient field K has finite Pythagoras number. In fact, p(A) can be bounded in terms of p(K), and in particular, the bound p(A) ≤ 4p(K) − 4 is valid (Thm. 5.26).

Our results for local rings have consequences for rings of global nature as well, like coordinate rings of algebraic curves or surfaces. These applications will be contained in a future paper.

1. Notations and generalities

All rings are commutative with unit, and contain \frac{1}{2}. The total ring of quotients of A is Quot(A) = A_{S}, where S is the monoid of non-zero divisors of A. By A^{∗} we denote the group of units in A.

If A is a semilocal ring, the radical Rad(A) of A is the intersection of the maximal ideals of A. We write Â for the Rad(A)-adic completion of A. If A is a local ring, Rad(A) is often written 𝔪_{A}, or simply 𝔪, if there is no danger of confusion; and 𝔪̂ is the maximal ideal of Â.

1.1. If A is a ring, then Sper A is the real spectrum of A, i.e., the topological space consisting of all pairs α = (𝔭, ω) with 𝔭 ∈ Spec A and ω an ordering of the residue field k(𝔭) of 𝔭 [12], [2], [16]. The prime ideal 𝔭 is called the support of α, written 𝔭 = supp(α). A prime ideal is called real if it supports an element of Sper A, i.e., if its residue field can be ordered. Accordingly, a prime element π of A is called real if the prime ideal πA is real.

1.2. Recall that for f ∈ A, the notation “f(α) ≥ 0” (resp., “f(α) > 0”) indicates that the residue class f mod 𝔭 is non-negative (resp., positive) with respect to ω. For every f, the set of all α with f(α) > 0 is open in Sper A, and these sets constitute a subbasis of open sets for the topology of Sper A.

The support map is continuous as a map from Sper A to Spec A. If α, β ∈ Sper A, one says that β is a specialization of α if β ∈ \overline{\{α\}}.

An element f ∈ A is said to be positive semidefinite (or psd, for short), if f(α) ≥ 0 for every α ∈ Sper A. We write A_{+} for the set of all psd elements of A. An element f ∈ A is said to be a sum of squares (or sos, for short), if it is a sum of squares of elements of A. The set of sums of squares in A is written ΣA^{2}.

One always has ΣA^{2} ⊂ A_{+}. For brevity, we will say that psd = sos holds in A if this inclusion is an equality.

An element f ∈ A is called totally positive if f(α) > 0 for every α ∈ Sper A.

Let A be a ring, and let K = Quot(A) be its total ring of quotients. In the literature, the question when equality ΣA^{2} = A ∩ ΣK^{2} holds has been discussed for certain classes of rings (e.g., [10]). We first clarify the relation between this condition and the condition that psd = sos holds in A, for A a reduced noetherian ring:

1.3. Lemma. Let A be a reduced noetherian ring, let K = Quot(A) be its total ring of quotients.

(a) A_{+} ⊂ A ∩ ΣK^{2}, and equality holds if Sper K is dense in Sper A.

(b) A ∩ ΣK^{2} = ΣA^{2} implies that psd = sos holds in A. The converse is true if Sper K is dense in Sper A.

Proof. Of course, Sper K is considered as a subspace of Sper A here. It is obvious that A_{+} ⊂ K_{+}, and K_{+} = ΣK^{2} is true since K is a direct product of fields. Clearly, if Sper K is dense in Sper A, then A ∩ K_{+} ⊂ A_{+}. (b) follows immediately from (a). □

1.4. Example. Here are a few standard examples where A∩ΣK^{2} is not contained in A_{+}. This happens if K nonreal, but Sper A ≠ ∅, like for the local ring of the singular plane real curve y^{2} + x^{2} + x^{4} = 0 at the origin. But it can also happen when K is real, as shown by the local ring at the origin of the singular plane curve y^{2} = x^{2}(x − 1) (take f = x − 1), or of the Whitney umbrella y^{2} = x^{2}z (take f = z). However, it cannot happen in a regular ring:

1.5. Corollary. If A is a regular noetherian domain, and K = Quot(A), then A_{+} = A ∩ ΣK^{2}, and therefore psd = sos holds in A iff ΣA^{2} = A ∩ ΣK^{2}.

Proof. Sper K is dense in Sper A ([28] Lemma 0.1), so the corollary follows from 1.3. □

1.6. If A is a ring and I is an ideal in A, the real radical of I is denoted \sqrt[re]{I}, and is by definition the intersection of all real prime ideals of A which contain I. The ideal \sqrt[re]{(0)} is called the real nilradical of A. The ring A will be said to be real reduced if its real nilradical is zero. One can show that A is real reduced if and only if A is reduced and every minimal prime ideal of A is real ([16] p. 104).

The real nilradical is described by the weak real Nullstellensatz (e.g. [2] p. 85,

[16] p. 105):

1.7. Proposition. Let A be a ring. Then the real nilradical of A consists of all elements a ∈ A for which −a^{2m} is sos in A for some m ≥ 1. □

In particular, the following equivalences hold:

s(A) < ∞ ⇔ A_{+} = A ⇔ ΣA^{2} = A ⇔ \sqrt[re]{(0)} = (1) ⇔ Sper A = ∅.

The study of the set ΣA^{2} is therefore interesting only when Sper A is non-empty. We will often use the following basic fact:

1.8. Lemma. If k is a field and v is a (Krull) valuation on k with real residue field, then v(x_{1}^{2} + ⋯ + x_{n}^{2}) = 2 min_{i} v(x_{i}) for any x_{1}, …, x_{n} ∈ K.

1.9. Corollary. Let A be a factorial ring, K = Quot(A), and let f be a square-free element in A ∩ ΣK^{2}. Then f is not divisible by any real prime element of A. □

We will try to understand better what it means for a semilocal ring A that every psd element is a sum of squares. Here are two necessary conditions:

1.10. Lemma. ([28], Lemma 6.3) Let A be a connected noetherian ring with Sper A ≠ ∅, and suppose that A is not real reduced. Then there is an element in the real nilradical of A which is not a sum of squares in A.

1.11. Proposition. ([28], Cor. 1.3) If A is a noetherian ring which has a prime ideal 𝔭 of height ≥ 3 with real residue field for which the local ring A_{𝔭} is regular, then there exists a psd element in A which is not a sum of squares.

However, it does not seem to be known whether there exists a local noetherian ring with non-empty real spectrum of dimension ≥ 3 in which psd = sos holds.

2. Basic Constructions

We start by recalling a well-known fact:

2.1. Proposition. ([15], p. 231) Let A be a semilocal ring. Then any positive semidefinite unit in A is a sum of squares.

This can be proved by establishing for the Witt ring of A the “same” properties as for the Witt ring of a field, and in particular, the characterization of its prime ideals and Pfister’s local-global principle.

The following theorem is basic for most results of this paper. Its proof is completely elementary, at least modulo the use of 2.1. We first give the strongest form, and then supply two weaker versions which are less technical:

2.2. Theorem. Let A be a semilocal ring, and let f ∈ A be a psd element. Let 𝔪_{1}, …, 𝔪_{r} be the maximal ideals of A which contain f, and put I = \sqrt[re]{(f)} ∩ 𝔪_{1} ∩ ⋯ ∩ 𝔪_{r}. If f is a sum of squares in A/fI, then f is a sum of squares in A.

Proof. By assumption, we have an identity f = s + fg in which g ∈ I and s is a sum of squares in A. Rewriting it as s = f(1 − g), we see that 1 − g is a psd element since g ∈ \sqrt[re]{(f)}. Moreover, if 𝔪 is a maximal ideal of A with 1 − g ∈ 𝔪, then f ∉ 𝔪.

We would like 1−g to be a unit. To achieve this, we modify the original identity. Let 𝔫_{1}, …, 𝔫_{m} be those maximal ideals of A which contain 1−g, and 𝔫′_{1}, …, 𝔫′_{n} those which don’t. Choose h ∈ A with h ∉ 𝔫_{i} (i = 1, …, m) and h ∈ 𝔫′_{j} (j = 1, …, n). The element s′ := s + (fh)^{2} is a sum of squares, and we have the new identity f = s′ + fg′ with g′ = g − fh^{2}. Note that g′ ∈ I. Now 1 − g′ is a unit, since it is not contained in any of the 𝔫_{i} or 𝔫′_{j}. Since 1 − g′ is psd, (1 − g′)^{−1} is a sum of squares by 2.1, and so f = (1 − g′)^{−1}s′ is a sum of squares in A. □

For most applications, one of the following slightly weaker versions will suffice:

2.3. Corollary. Let A be a semilocal ring, and let f ∈ A be a psd element.

(a) If f is sos in A/f\sqrt{(f)}, then f is sos in A.

(b) If f is sos in A/(f^{2}), then f is sos in A.

Indeed, (f^{2}) ⊂ f\sqrt{(f)} ⊂ fI, with I as in Thm. 2.2. □

Speaking very informally, one can say that if a psd element f is a sum of squares modulo (f^{1+ϵ}), for some ϵ > 0, then it is a sum of squares altogether.

Here is a first application:

2.4. Corollary. Let A be a semilocal ring. Then every totally positive element of A is a sum of squares.

Proof. Let f ∈ A be totally positive. By Cor. 2.3, it suffices to show that f is sos in A/(f^{2}). But this is obvious since Sper A/(f^{2}) = ∅. □

Note that if A/𝔪 is real for every maximal ideal 𝔪, the last corollary is just a particular case of Prop. 2.1. But the general case seems to be new.

Theorem 2.2 reduces the question of whether a psd element f in A is sos from A to A/fI, which is a non-reduced version of the “zero locus” of f. The following result reduces the question to (a non-reduced version of) an even smaller locus, namely the “real zero locus” of f:

2.5. Theorem. Let A be a semilocal ring, and let f ∈ A be a psd element. Then there is an ideal J of A with \sqrt{J} = \sqrt[re]{(f)}, such that the following is true: If f is sos in A/J, then f is sos in A.

2.6. Lemma. Let A be a semilocal ring, let f be a psd element in A, and let s ∈ A be such that ±s are sos in A. If f is sos in A/(f + s)^{2}, then f is sos in A.

Proof. If f is sos in A/(f +s)^{2}, then also f +s is sos in A/(f +s)^{2}. Since s vanishes identically on Sper A, the element f + s is psd in A. So Cor. 2.3 implies that f + s is sos in A. A fortiori, f = (f + s) − s is sos in A. □

Proof of Thm. 2.5. There is a family of elements g_{λ} ∈ \sqrt[re]{(f)} (λ ∈ Λ) such that −g_{λ}^{2} is sos in A/(f^{2}) for every λ, and \sqrt[re]{(f)} = \sqrt{(f) + (g_{λ})_{λ}}. (This follows from the weak real Nullstellensatz 1.7.) Put J := (f^{2}) + ((f + g_{λ}^{2})^{2} : λ ∈ Λ). Assume that f is sos in A/J. Then there are finitely many among the g_{λ}, say g_{1}, …, g_{r}, such that f is sos modulo (f^{2}, (f +g_{1}^{2})^{2}, …, (f +g_{r}^{2})^{2}). Now a repeated application of Lemma 2.6 shows that f is sos in A/(f^{2}). Hence f is sos in A by Cor. 2.3. □

2.7. Corollary. Let A be a noetherian semilocal ring, and let f ∈ A be a psd element with Rad(A) ⊂ \sqrt[re]{(f)}. The following conditions are equivalent:

(i) f is sos in A; (ii) f is sos in Â (:= the Rad(A)-adic completion of A); (iii) f is sos in A/𝔪^{n} for every real maximal ideal 𝔪 of A and every n ≥ 1.

Proof. (i) ⇒ (ii) ⇒ (iii) are trivial. Assuming (iii), f is sos in A/Rad(A)^{n} for every n ≥ 1, since A/Rad(A)^{n} = A/𝔪_{1}^{n} ×⋯×A/𝔪_{r}^{n} if 𝔪_{1}, …, 𝔪_{r} are the maximal ideals of A. So f is sos in A by 2.5. □

Geometrically speaking, the hypothesis Rad(A) ⊂ \sqrt[re]{(f)} means that the locus of real zeros of f in Spec A has dimension ≤ 0.

3. One-dimensional local rings

In this section, we try determine the one-dimensional local noetherian rings in which every psd element is a sum of squares. The main result is Thm. 3.9 below. Before we can give its proof, we need a series of preparatory steps.

Let A be a ring. To have a convenient way of speaking, we will often say that an element of A is a regular element if it is not a zero divisor in A.

Accordingly, we say that psd = sos holds for regular elements in A, if every psd element of A which is regular is a sum of squares of elements of A.

3.1. Lemma. Let A be a noetherian complete local ring, dim A = 1. If f ∈ A is not a zero divisor, then there is n ≥ 1 such that every element in f + 𝔪^{n} has the form u^{2}f with u ∈ A^{∗}.

Proof. We have 𝔪 ⊂ \sqrt{(f)}, since f is not a zero divisor. So there is r ≥ 1 with 𝔪^{r} ⊂ (f), and hence with 𝔪^{r+1} ⊂ f𝔪. If g ∈ f + 𝔪^{r+1}, then g = f(1 + a) with a ∈ 𝔪, and 1 + a is a unit square in A. □

3.2. Proposition. Let A be a noetherian local ring of dimension one. Then psd = sos for regular elements holds in A if and only if it holds in Â.

Proof. Assume that psd = sos for regular elements holds in Â. Let f be a psd element in A, not a zero divisor in A. Then f is not a zero divisor in Â either, since A → Â is flat. So f is sos in Â by hypothesis, and therefore is sos in A by Cor. 2.7.

Conversely, assume that there is a psd element g in Â, not a zero divisor, which is not sos in Â. By 3.1, there is n ≥ 1 such that every element in g + 𝔪̂^{n} is psd and regular, but no element in g + 𝔪̂^{n} is sos in Â. Choose f ∈ A with f ≡ g mod 𝔪̂^{n}. From Lemma 3.3 below, it follows that f(α) ≥ 0 for every α ∈ Sper A which has a specialization with support 𝔪. By [28] Cor. 5.4, this implies that there is h ∈ 𝔪^{n} for which f + h is psd in A. By construction, f + h is neither sos nor a zero divisor in Â, and hence is neither sos nor a zero divisor in A. □

The following lemma was used in the last proof:

3.3. Lemma. Let A be a one-dimensional noetherian local ring, with completion Â, and let ψ: Sper Â → Sper A be the canonical map. Then im(ψ) consists of all α ∈ Sper A which have a specialization with support 𝔪.

If the local ring A is excellent, of any dimension, this has been proved by Ruiz ([26] Thm. 1.1). The case of a one-dimensional local ring is so special that it can be proved without the excellence hypothesis.

Proof. One inclusion is clear, since every closed point in Sper Â has support 𝔪̂. Conversely, let α ∈ Sper A have a specialization with support 𝔪, and let 𝔭 = supp(α). We can assume 𝔭 ≠ 𝔪. Let K = Quot(A/𝔭), and let B be the convex hull of A/𝔭 in K with respect to the ordering α. The valuation ring B dominates the local ring A/𝔭. The integral closure of A/𝔭 in K is a (semilocal) Dedekind domain, by the Krull-Akizuki theorem, and is contained in B. It follows that B is a discrete valuation ring. The homomorphism A → B is a homomorphism of local rings, and hence it induces a homomorphism Â → B̂ between the completions. Since α has in Sper B a specialization whose support is the maximal ideal 𝔪_{B}, it follows that α lies in the image of Sper B̂ → Sper B. The assertion follows therefore from the commutative diagram

\xymatrix{A \ar[r] \ar[d] & B \ar[d] \\ Â \ar[r] & B̂}

□

3.4. Lemma. Let A be a noetherian local one-dimensional integral domain, and assume that the completion Â has at least one minimal prime ideal which is real. Then for every ideal I ≠ (0) in A, there exists an ideal J ⊂ I in A, J ≠ (0), such that the following property holds: (∗) If x_{1}, …, x_{n} ∈ A and ∑_{i} x_{i}^{2} ∈ J^{2}, then x_{1}, …, x_{n} ∈ J.

Proof. Let 𝔮 be a minimal prime ideal of Â which is real, and let B be the integral closure of Â/𝔮 in its quotient field. Then B is a complete DVR with real residue field. Let 𝔫 be the maximal ideal of B. We consider A ⊂ B as an extension of local rings. For every n ≥ 0, the ideal J = A ∩ 𝔫^{n} of A (is non-zero and) satisfies condition (∗) (1.8). On the other hand, every non-zero ideal of A contains A ∩ 𝔫^{n} for some n ≥ 0. The lemma is proved. □

3.5. Lemma. Let A be a one-dimensional complete local noetherian ring with real residue field k. If A is reduced and psd = sos for regular elements holds in A, then A is real reduced.

Proof. Let 𝔭_{1}, …, 𝔭_{r} be the minimal prime ideals of A. For each i, write A_{i} = A/𝔭_{i} and K_{i} = Quot(A_{i}). Let A′_{i} be the integral closure of A_{i} in K_{i}, and let A′ = A′_{1}×⋯×A′_{r}, the integral closure of A in its total ring of quotients K := K_{1}×⋯×K_{r}. We consider A as a subring of A′, and hence, of K. Let π_{i}: K → K_{i} denote the i-th projection.

The ring A′_{i} is a complete DVR, and we denote by v_{i} the associated discrete valuation of K_{i}. By abuse of notation, we also write v_{i}(x) := v_{i}(π_{i}(x)) for x ∈ K. Since A′ is finite over A ([5] ch. IX §4 no. 2, Cor. à Thm. 2), there exists a regular element f ∈ A with fA′ ⊂ A. In particular, there are integers m_{i} ≥ 0 such that every x ∈ K with v_{i}(x) ≥ m_{i} for all i lies in A.

Let 𝔭_{1}, …, 𝔭_{s} be the real ones and 𝔭_{s+1}, …, 𝔭_{r} the non-real ones among the minimal prime ideals of A. Let N be the real nilradical of A. So N = 𝔭_{1} ∩ ⋯ ∩ 𝔭_{s} if s ≥ 1, and N = 𝔪 if s = 0. Assume that N ≠ (0). Then N ≠ N^{2}. Since N ⊄ 𝔭_{j} for j = s + 1, …, r, there exists a ∈ N ∖ N^{2} with a ∉ 𝔭_{s+1} ∪ ⋯ ∪ 𝔭_{r} ([4] ch. II §1 Prop. 2). There is x ∈ 𝔭_{s+1} ∩ ⋯ ∩ 𝔭_{r} with v_{i}(x) = m_{i} for i = 1, …, s. The element x^{2} + a is psd in A, and is not a zero divisor in A. Hence, by hypothesis on A, x^{2} +a = ∑_{ν} y_{ν}^{2} with y_{ν} ∈ A. For i = 1, …, s, we have v_{i}(y_{ν}) ≥ v_{i}(x) = m_{i} since the valuation v_{i} has real residue field (1.8). Let e be the idempotent element in A′ with π_{i}(e) = 0 for i = 1, …, s and π_{i}(e) = 1 for i = s + 1, …, r. Then ey_{ν} ∈ A for all ν. From a = e(x^{2} + a) = ∑_{ν}(ey_{ν})^{2} and a ∈ N, it follows that ey_{ν} ∈ N for each ν. But then a ∈ N^{2}, in contradiction to the choice of a. □

3.6. Remark. Recall that a noetherian ring A is called a Nagata ring if, for every 𝔭 ∈ Spec A and every finite field extension L of the residue field k(𝔭) of 𝔭, the integral closure of A in L is a finite A-module ([5] ch. IX §4).

Here are some important facts about Nagata rings (see loc. cit. for references):

(a) If k is a field, every localization A_{S} of a finitely generated k-algebra A is a Nagata ring.

(b) Every complete local noetherian ring is a Nagata ring (Nagata’s theorem).

(c) If A is a local noetherian ring with char(A/𝔪) = 0, then A is a Nagata ring if and only if, for every 𝔭 ∈ Spec A, the completion Â/𝔭 is reduced (no. 4, Cor. 3).

(d) If A is a reduced local Nagata ring, then its completion Â is again reduced (no. 4, Cor. 1), and the integral closure A′ of A is a finite A-module (no. 2, Cor. à Thm. 2).

3.7. Lemma. Let A be a one-dimensional reduced local Nagata ring, with real residue field k. If psd = sos for regular elements holds in A, then psd = sos holds in A for arbitrary elements.

Proof. Let 𝔭_{1}, …, 𝔭_{r} be the minimal prime ideals of A. For each i, write A_{i} = A/𝔭_{i} and K_{i} = Quot(A_{i}). Let A′_{i} be the integral closure of A_{i} in K_{i}, and let A′ = A′_{1} × ⋯ × A′_{r}, the integral closure of A in its total ring of quotients K_{1} × ⋯ × K_{r}. We consider A as a subring of A′. Let π_{i}: A′ → A′_{i} be the i-th projection.

By 3.2, psd = sos for regular elements holds in Â. Since Â is reduced (3.6(d)), we can apply Lemma 3.5 and conclude that every minimal prime ideal of Â is real.

Since A′ is a finite A-module (3.6(d)), there exists a regular element f in A with fA′ ⊂ A. For each i, write I_{i} = π_{i}(A′f) = A′_{i}π_{i}(f), an ideal of A′_{i} which is contained in A_{i}. Every minimal prime ideal of Â_{i} is real. By Lemma 3.4, there exists an ideal (0) ≠ J_{i} ⊂ I_{i} of A_{i} such that

(∗) x_{ν} ∈ A_{i} and ∑_{ν} x_{ν}^{2} ∈ J_{i}^{2} imply x_{ν} ∈ J_{i} for all ν.

Define J := J_{1} × ⋯ × J_{r}, an ideal of A′ which is contained in A.

Let a be a psd element in A. Choose an element b in J with ab = 0 and with π_{i}(b) ≠ 0 for every i with π_{i}(a) = 0. The element a + b^{2} is psd in A, and is not a zero divisor. By hypothesis, there are x_{ν} ∈ A with a + b^{2} = ∑_{ν} x_{ν}^{2}. For each i with π_{i}(a) = 0, we have π_{i}(x_{ν}) ∈ J_{i} for every ν, by (∗). Let e be the idempotent element in A′ with ea = a and eb = 0. Then ex_{ν} ∈ A for each ν. Since a = e(a + b^{2}) = ∑_{ν}(ex_{ν})^{2}, it follows that a is sos in A. □

3.8. Example. If k is a field and A = k[[x_{1}, …, x_{n}]]/(x_{i}x_{j}: i < j), then every psd element in A is a sum of squares. Indeed, A is isomorphic to the subring of the direct product ring k[[x_{1}]] × ⋯ × k[[x_{n}]] which consists of all tuples (f_{1}, …, f_{n}) with f_{1}(0) = ⋯ = f_{n}(0). From this description, it is obvious that psd = sos holds in A.

Let A be a one-dimensional local noetherian ring. The condition 𝔪 ∉ Ass(A) is equivalent to the existence of a regular element in A which is not a unit; or also, to the condition that the set of zero divisors in A is the union of the minimal prime ideals of A. In particular, it is satisfied if A is reduced.

3.9. Theorem. Let A be a one-dimensional local Nagata ring with real residue field k, and assume 𝔪 ∉ Ass(A). Consider the following five conditions:

(1) psd = sos holds in A;

(2) psd = sos holds in Â;

(3) psd = sos for regular elements holds in A;

(4) psd = sos for regular elements holds in Â;

(5) there is n ≥ 1 such that Â ≅ k[[x_{1}, …, x_{n}]]/(x_{i}x_{j}: i < j).

Then the following are true:

(a) Each of these conditions implies that A is reduced.

(b) Conditions (1)–(4) are equivalent, and are all implied by (5).

(c) If k is real closed, then all five conditions are equivalent.

Proof. (1) ⇒ (3) and (2) ⇒ (4) are trivial. The equivalence of (3) and (4) has been shown in 3.2. We prove (3) ⇒ (1). So assume that psd = sos for regular elements holds in A. By 3.7, it suffices to show that A is reduced.

Let N = \sqrt{(0)}, let A_{red} = A/N, and denote residue classes mod N by a bar. If f ∈ A is such that \overline{f} is regular in A_{red}, then f is regular in A, since 𝔪 ∉ Ass(A). Therefore, psd = sos for regular elements holds in A_{red} as well, and so A_{red} satisfies the conditions of Lemma 3.7. From the proof of this lemma, we see that there is an element x ∈ 𝔪 for which \overline{x} is regular and has the property that for all y_{1}, …, y_{r} ∈ A, \overline{x}^{2} | ∑_{i} \overline{y}_{i}^{2} (in A_{red}) implies \overline{x} | \overline{y}_{i} for each i. Assume N ≠ (0), and choose a ∈ N with a ∉ 𝔪N (Nakayama lemma). The element x^{2} + a is psd in A and regular, hence is sos by hypothesis. By the choice of x, there are elements b_{i} ∈ A and c_{i} ∈ N with x^{2} + a = ∑_{i}(b_{i}x + c_{i})^{2}, and hence with

(∑_{i} b_{i}^{2} − 1)x^{2} = a − 2x ∑_{i} b_{i}c_{i} − ∑_{i} c_{i}^{2}.

The right hand side lies in N. Since \overline{x} is regular, it follows that 1 − ∑_{i} b_{i}^{2} ∈ N. But this implies a ∈ 𝔪N. This contradicts the choice of a, and proves that A is reduced.

Since m̂ ∉ Ass(Â), the last implication can be applied to Â, which shows (4) ⇒ (2). For (5) ⇒ (2), see Example 3.8. It remains to prove (2) ⇒ (5) under the hypothesis that k is real closed.

We assume that A is complete. Note that A is reduced. Let 𝔭_{1}, …, 𝔭_{r} be the minimal prime ideals of A. By 3.5, each 𝔭_{i} is real. Fix an index i. The integral closure A′_{i} of A_{i} = A/𝔭_{i} is isomorphic to a power series ring k_{i}[[x]], where k_{i} is a finite real extension of k. Since k is real closed, k_{i} = k. We use the notation v_{i}(f) as in the proof of 3.5. Choose f ∈ A with v_{i}(f) = 2^{n} for some n ≥ 1 and with f ∈ ⋂_{j≠i} 𝔭_{j} (this is possible, c.f. the proof of 3.5). Replacing f by −f, if necessary, we can assume that f is psd. Therefore, f is a sum of squares in A by hypothesis (2). Since the 𝔭_{j} are real, this implies that there is g ∈ ⋂_{j≠i} 𝔭_{j} with v_{i}(g) = 2^{n−1} (1.8). Iterating this step, we see that A contains an element x_{i} ∈ ⋂_{j≠i} 𝔭_{j} with v_{i}(x_{i}) = 1, for each i = 1, …, r.

If 𝔪′_{i} is the maximal ideal of A′_{i}, this shows 𝔪′_{1} ×⋯×𝔪′_{r} ⊂ A (again, we consider A as a subring of ∏_{i} A_{i}, and hence of ∏_{i} A′_{i}). But this means that A is isomorphic to the ring in (5). □

3.10. Remark. In the theorem, the condition 𝔪 ∉ Ass(A) is necessary for the equivalence of (1)–(4). Indeed, if 𝔪 ∈ Ass(A), then A has nilpotent elements, and so (1) and (2) do not hold (1.10); but (3) holds by 2.1 since every regular element in A is a unit. An example is given by the ring A = k[[x, y]]/(xy, y^{2}).

3.11. Remark. If k is not real closed, then conditions (1)–(4) do not imply condition (5): Let k′/k be a finite field extension which is real, k′ ≠ k, let A′ = k′[[x]], and put A = k + xA′. Then A satisfies (1)–(4), but not (5).

3.12. Remark. We briefly discuss what happens when the residue field k is nonreal. Then Sper Â = ∅, so (2) and (4) hold trivially. Also (3) holds, by 2.4, since every regular psd element in A is totally positive. On the other hand, (1) may fail, i.e., there may be psd zero divisors in A which are not sums of squares. Here is an example:

Let C be the reduced curve over ℝ which is the union of the circle C_{1} = {x^{2}+y^{2} = 1} and the line C_{2} = {x = 2} in the affine plane. Let A be the local ring of C at the intersection point (2, \sqrt{−3}) of C_{1} and C_{2}, an ordinary double point with residue field ℂ. The function f = 2 − x vanishes identically on C_{2} and is strictly positive on C_{1}. In particular, f is psd, and is a zero divisor in A. But f is not sos in A: If we had f = ∑_{i} f_{i}^{2} with f_{i} ∈ A, then the f_{i} would have to vanish identically on C_{2}, and hence lie in the maximal ideal 𝔪 of A. This would imply f ∈ 𝔪^{2}, which however is not the case.

4. Two-dimensional semilocal rings

We now apply our methods from Sect. 2 to (semi-) local rings A of dimension two. We always need the hypothesis that A is factorial, since it is this condition which permits us to restrict to square-free elements, c.f. 1.9.

Our first main result is:

4.1. Theorem. Let k be a field. Then every psd element in the power series ring k[[x, y]] is a sum of squares.

In the proof, we use the following lemma:

4.2. Lemma. If A is a complete local noetherian ring, then the image of the canonical map ψ: Sper A[[t]] → Sper A[t] consists of those α ∈ Sper A[t] which have a specialization whose support contains t.

Proof. Let 𝔫 be the ideal in A[t] generated by 𝔪_{A} and by t. Then 𝔫 is a maximal ideal, and A[[t]] is the completion of the local ring A[t]_{𝔫}. The ring A, and therefore also A[t]_{𝔫}, is excellent. By Ruiz’s theorem [26], the image of Sper A[[t]] → Sper A[t] consists of those α ∈ Sper A[t] which have a specialization with support 𝔫. But these are the same as the α which have a specialization whose support contains t. This proves the lemma. □

4.3. Now we prove Thm. 4.1. We can assume that the field k is real. Given a psd power series 0 ≠ f ∈ k[[x, y]], we can assume that f is square-free, not a unit. Then \sqrt[re]{(f)} = 𝔪, the maximal ideal of k[[x, y]] (1.9). After a linear change of coordinates, we may assume f = ug, where u is a unit in k[[x, y]] and g ∈ k[[x]] [y] (Weierstraß Preparation Theorem). Put c = u(0, 0), and replace u by c^{−1}u and g by cg. Then u is a square, and g is psd and square-free in k[[x, y]]. By 2.7, it suffices to prove that g is sos in k[[x, y]]/𝔪^{n}, for every n ≥ 1.

Fix n ≥ 1. By Lemma 4.2, g(α) ≥ 0 for every α ∈ Sper k[[x]] [y] which has a specialization whose support contains y. By [28] 5.4, this implies that there exists h ∈ k[[x]] [y] such that g + y^{n}h is psd in k[[x]] [y]. Now psd = sos holds in this ring ([28] 1.8). Therefore, g is a sum of squares in k[[x]] [y]/(y^{n}) = k[[x, y]]/(y^{n}). A fortiori, g is sos in k[[x, y]]/𝔪^{n}. This completes the proof of Thm. 4.1. □

4.4. Remark. In the case k = ℝ, Thm. 4.1 was proved by Bochnak and Risler in 1975 [3]. The authors worked with the ring of convergent power series, but their proof works for formal power series as well. They proved in fact that every positive semidefinite power series is a sum of two squares of power series.

4.5. Remark. In their paper [9] (p. 69), Choi, Dai, Lam and Reznick ask for a characterization of the sums of squares in k[[x, y]], and in particular, for the polynomials which are a sum of squares in k[[x, y]]. Using Thm. 4.1, we can describe the latter as follows:

4.6. Corollary. Let k be a field, and let f ∈ k[x, y]. Then f is a sum of squares in the power series ring k[[x, y]] if, and only if, for every real closure R of k, the polynomial f has non-negative values in a neighborhood of the origin in R^{2}.

Proof. The image of the natural map Sper k[x, y] → Sper k[[x, y]] is equal to the set G of all α ∈ Sper k[x, y] which have a specialization whose support is the maximal ideal (x, y) [26]. Write X = Sper k[x, y] and K = {α ∈ X: f(α) ≥ 0}. By 4.1, f is sos in k[[x, y]] iff G ⊂ K. Now G ⊂ K is equivalent to G_{ξ} ⊂ K_{ξ} for every ξ ∈ Sper k, where for every subset M of X, M_{ξ} denotes the set of α ∈ M which restrict to ξ in k. Fix ξ ∈ Sper k, and let k_{ξ} be the corresponding real closure of k. Then X_{ξ} is identified with Sper k_{ξ}[x, y], and under this identification, the condition G_{ξ} ⊂ K_{ξ} is equivalent to the condition that f is non-negative on a neighborhood of the origin in k_{ξ}^{2}. □

If A is a semilocal ring, we denote the Rad(A)-adic completion of A by Â. If 𝔪_{1}, …, 𝔪_{r} are the maximal ideals of A, then Â = Â_{𝔪_{1}} × ⋯ × Â_{𝔪_{r}} ([19] p. 62).

The second main result of this section is:

4.7. Theorem. Let A be a two-dimensional semilocal noetherian domain, with quotient field K. Suppose, for each maximal ideal 𝔪 of A, that Â_{𝔪} is a factorial ring in which psd = sos holds. Then ΣA^{2} = A ∩ ΣK^{2}. In particular, psd = sos holds in A.

Remark: The hypothesis implies that A itself is factorial ([19], exerc. 20.4 and 20.5).

Proof. We first show that A ∩ ΣK^{2} ⊂ A_{+} (c.f. 1.3). Assume false. Then there are f ∈ A ∩ ΣK^{2} and α ∈ Sper A with f(α) < 0. The prime ideal supp(α) cannot have height one, since this would imply that A_{supp(α)} is a DVR, and hence that there is β ∈ Sper K with f(β) < 0. So supp(α) =: 𝔪, a maximal ideal of A. Let B := Â_{𝔪}. By hypothesis, B is a local factorial ring in which psd = sos holds. In particular, the quotient field of B is real (1.10). By [26] Thm. 1.3, B contains a real prime element π. The element f is positive in every point of Sper B whose support is not the maximal ideal of B. Therefore, the element fπ^{2} is psd in B, and hence is a sum of squares in B by assumption. But fπ^{2} = ∑_{i} h_{i}^{2} implies π | h_{i} for every i (1.8), and so f is sos in B, which is absurd in view of f(α) < 0. This proves A ∩ ΣK^{2} = A_{+}.

Let now f ≠ 0 be an element in A ∩ ΣK^{2}. Since A is factorial, we can write f = gh^{2} with g, h ∈ A, where g is square-free. Clearly, g ∈ ΣK^{2}, and therefore g is psd in A by the first step. Moreover, \sqrt[re]{(g)} ⊃ Rad(A) (1.9). By the hypothesis, g is sos in Â, and hence is sos in A by Cor. 2.7. In particular, f is sos in A. □

In particular, we have the following result, which solves an open problem from [28] (Problem 1, p. 1067):

4.8. Theorem. If A is a two-dimensional regular semilocal ring, and K = Quot(A), then ΣA^{2} = A ∩ ΣK^{2}: Every psd element in A is a sum of squares.

Proof. We may assume, by Thm. 4.7, that A is local and complete. If the residue field k of A has characteristic 0, then A ≅ k[[x, y]], and we are done by Thm. 4.1. If char(k) > 0 (or more generally, if k is non-real), then Sper A = ∅. Alternatively, one can use Cor. 4.9 (below) in this case. □

4.9. Corollary. If A is a two-dimensional semilocal factorial ring such that A/𝔪 is non-real for every maximal ideal 𝔪, then psd = sos in A.

Proof. Given a psd element f, write f as f = gh^{2} where g is not divisible by any real prime element. It follows that g is totally positive in A, and hence is a sum of squares (2.4). □

4.10. Remark. There do exist singular two-dimensional local rings A with real residue field in which psd = sos holds. This follows from the results proved by Ruiz in [27]. He shows in fact that every psd element is a sum of two squares, for each of the following real analytic surface singularities: The Brieskorn singularity (x^{2} + y^{3} + z^{5} = 0), the union of two planes (xy = 0) and the Whitney umbrella (x^{2} + y^{2}z = 0). The Brieskorn singularity is factorial, the other two are not.

5. Pythagoras numbers of local rings

In this final section, we collect the quantitative information on sums of squares that are implied by the techniques of the previous sections. We usually concentrate on the case of local rings, but it should be clear that most results can be generalized to semilocal rings.

5.1. First, here are some reminders and remarks of general nature. Let A be any ring, and let f ∈ A. By ℓ(f) = ℓ_{A}(f), we denote the “sums of squares length” of f, i.e., the least integer n such that f is a sum of n squares in A. If f is not a sum of squares, we put ℓ(f) = ∞. The level of A is defined as s(A) := ℓ(−1). If A is a field, or more generally, a semilocal ring, then s(A), if finite, is a power of 2, but for more general rings it can be an arbitrary positive integer.

The Pythagoras number p(A) of A is defined as p(A) = sup{ℓ(f): f ∈ ΣA^{2}}. It is obvious that p(A) ≥ p(A/I) for any ideal I of A, and that p(A) ≥ p(A_{S}) for any multiplicative subset S of A. In particular, p(A) ≥ p(k(𝔭)) for any prime ideal 𝔭 of A.

If s(A) < ∞ (and 2 is invertible in A, as always in this paper), then p(A) is either s(A) or 1 + s(A), as follows from the identity x = (\frac{x+1}{2})^{2} − (\frac{x−1}{2})^{2}.

5.2. We introduce a few more invariants which are related to the Pythagoras number:

• p^{∗}(A) := sup{ℓ(u): u ∈ A^{∗} ∩ ΣA^{2}}, the units Pythagoras number of A;

• p^{+}(A) := sup{ℓ(f): f ∈ ΣA^{2} and f is totally positive}, the totally positive Pythagoras number; and

• if A is a semilocal ring, with radical Rad(A), we write p^{1}(A) := sup{ℓ(u):

u ∈ ΣA^{2}, u ≡ 1 mod Rad(A)}, the principal units Pythagoras number of A. It is obvious that p^{1}(A) ≤ p^{∗}(A) ≤ p^{+}(A) ≤ p(A) (for semilocal A).

5.3. If m, n are positive integers, the integer m∘n is defined by the following rules:

(1) m ∘ n = n ∘ m;

(2) If m ≤ n, and 2^{r} is the smallest power of 2 which is ≥ m, then m ∘ n is the smallest multiple of 2^{r} which is ≥ n.

We complete this definition by setting ∞ ∘ n = n ∘ ∞ = ∞ ∘ ∞ = ∞.

So 1 ∘ n = n, 2 ∘ n = 2⌈\frac{n}{2}⌉, 3 ∘ n = 4 ∘ n = 4⌈\frac{n}{4}⌉ for n > 1, etc. The following estimates are obvious:

5.4. Lemma. max{m, n} ≤ m ∘ n < 2 max{m, n} (if m, n < ∞).

The reason for introducing this notation is the following well-known fact:

5.5. Lemma. Let A be a semilocal ring, let a ∈ A be a sum of m squares and b ∈ A a sum of n squares. If one of a, b is a unit, then ab is a sum of m ∘ n squares.

Proof. Assume m ≤ n. Let 2^{r} ≥ m, and let k ≥ 1 be such that 2^{r}k ≥ n. Then a is a sum of 2^{r} squares, and b = b_{1} + ⋯ + b_{k} where each b_{i} is a sum of 2^{r} squares. If b is a unit, one can furthermore achieve that each b_{i} is a unit as well ([1] Thm. III.5.2(ii), p. 85). For each i, ab_{i} is a sum of 2^{r} squares, by the following

5.6. Lemma. Let A be a semilocal ring and φ a Pfister form over A. If a, b ∈ A are represented by φ over A, and if a is a unit, then also ab is represented by φ over A.

Proof. If M is the (free) A-module on which φ is defined, then by “a ∈ A is represented by φ over A”, we mean that there is x ∈ M with φ(x) = a. The lemma follows immediately from aφ ≅ φ [1]. □ □

We start by recording the quantitative side of Thm. 2.2:

5.7. Proposition. Let A be a semilocal ring, and let f be a psd element in A. Assume that f is a sum of n squares in A/fI, where I = \sqrt[re]{(f)} ∩ 𝔪_{1} ∩ ⋯ ∩ 𝔪_{r} and 𝔪_{1}, …, 𝔪_{r} are the maximal ideals of A which contain f.

(a) f is a sum of p^{∗}(A) ∘ (1 + n) squares in A.

(b) If f ∈ Rad(A), then f is a sum of p^{1}(A) ∘ n squares in A.

(c) If f ∈ Rad(A), and A is henselian with respect to its radical, then f is a sum of n squares in A.

Proof. (a) There is an identity f = s + fg with s a sum of n squares and g ∈ I. The proof of Thm. 2.2 has shown how to modify it, in order to make 1 − g a unit sum of squares, at the cost of adding one square to s. By 5.5, this proves (a). If f ∈ Rad(A), we need not modify the original identity since 1 − g ≡ 1 mod Rad(A). This proves (b), and (c) is a particular case of (b) since here p^{1}(A) = 1. □

Recall that in a semilocal ring, every totally positive element is a sum of squares (2.4). For its length, we can give the following bound, which sometimes results in better estimates than 5.7:

5.8. Proposition. Let A be a semilocal ring, with radical Rad(A) = 𝔯, and let f be a totally positive element in A. Then f is a sum of p^{1}(A) ∘ (1 + p^{∗}(A/f𝔯)) squares in A. In particular,

p^{+}(A) ≤ p^{1}(A) ∘ (1 + p^{∗}(A)).

Proof. For every ideal I of A, the map A^{∗} → (A/I)^{∗} is surjective. Therefore, p^{∗}(A) ≥ p^{∗}(A/I), and so the second assertion follows from the first. To prove the first, it suffices to show that f is a sum of m := 1 + p^{∗}(A/f𝔯) squares in A/f𝔯. Indeed, this gives an identity f = s + fg in A where s is a sum of m squares and g ∈ 𝔯. Since 1 − g is a principal unit, the first assertion follows from this.

Let 𝔪_{1}, …, 𝔪_{r} be those maximal ideals of A which contain f, and 𝔫_{1}, …, 𝔫_{s} those which don’t. Choose a ∈ ⋂_{j} 𝔫_{j} with a ∉ ⋃_{i} 𝔪_{i}. Then f − a^{2} is a unit. Every real prime ideal which contains f𝔯 is one of 𝔫_{1}, …, 𝔫_{s}, since f is totally positive. So f − a^{2} is psd in A/f𝔯, and being a unit, is a sum of p^{∗}(A/f𝔯) squares in this ring. Hence f is a sum of 1 + p^{∗}(A/f𝔯) = m squares in A/f𝔯. □

5.9. Corollary. Let A be a semilocal ring. Then p^{+}(A) ≤ p^{∗}(A) ∘ (1 + p^{∗}(A)). In particular, p^{+}(A) is finite iff p^{∗}(A) is finite. □

As a first application, we address a question of Mahé. Let R be a real closed field, and let A be a semilocal R-algebra of finite transcendence degree d. Having proved p^{∗}(A) ≤ 2^{d} for such A ([18] Thm. 6.1), Mahé asked whether also the totally positive Pythagoras number p^{+}(A) is finite, and if so, whether it can be bounded in terms of d (loc. cit., p. 628, Question 2). We show that this is indeed the case:

5.10. Theorem. Let R be a real closed field, and let A be a semilocal R-algebra of transcendence degree d < ∞. Let f be a totally positive element of A.

(a) f is a sum of 2^{d+1} squares in A.

(b) If f is not a zero divisor, f is a sum of 2^{d} squares in A.

Proof. If d = 0, then A is a direct product of local artinian rings with residue fields R or R(\sqrt{−1}), and the assertions are easily checked directly. Otherwise, both statements follow immediately from Mahé’s bound for p^{∗}, together with 5.8 (in case (b), the transcendence degree of A/f𝔯 is d − 1). □

Next, we give an application to the Pythagoras numbers of local rings of real curves:

5.11. Proposition. Let R be a real closed field, let B be an integral one-dimensional R-algebra of finite type, and let A = B_{𝔪} where 𝔪 is a maximal ideal of B. Let q be the “regular” Pythagoras number of Â, i.e., q = sup{ℓÂ(f): f sos, not a zero divisor}.

(a) p(A) ∈ {q, q + 1}, and p(A) = q if q is even;

(b) p(A) = 2 if q ≤ 2.

Note that q = p(Â) if Â is a domain, i.e., if A is unibranch. In this case, much information on the Pythagoras number p(Â) is available, see [25], [6] and [21].

Proof. We first show p(A) ≥ q. Let g ∈ Â be a regular element which is a sum of r, but not of r − 1, squares in Â. By Lemma 3.1, there is n ≥ 1 such that every element in g + m^{n} is a sum of r, but not of r − 1, squares in Â. It is clear that one can find f ∈ A with f ≡ g mod m^{n}, such that f is a sum of squares in A. Clearly, f is not a sum of less than r squares in A.

According to Mahé, we have p^{∗}(A) ≤ 2 ([18], Thm. 6.1). If f ≠ 0 is a sum of squares in A, then A/(f^{2}) is an epimorphic image of Â, and f is a regular element in Â. So f is a sum of q squares in A/(f^{2}), and is therefore a sum of 2∘q squares in A by Prop. 5.7(b). This proves (a); and (b) follows from p(A) ≥ p(Quot(A)) = 2. □

Finally, we study the Pythagoras numbers of two-dimensional local rings which are regular (and sometimes factorial). We start with complete rings, since the general case gets partially reduced to the complete case. First, here are a few preparations.

5.12. Lemma. If k is a field, we put

τ(k) := sup{s(F): F/k finite, non-real}.

Then p(k[t]) = p(k(t)), and 1 + τ(k) ≤ p(k(t)) ≤ 2τ(k).

Proof. p(k(t)) = p(k[t]) is due to Cassels [7], and p(k(t)) ≤ 2τ(k) is due to Pfister ([22] Satz 2). The inequality 1 + τ(k) ≤ p(k(t)) is elementary. (See also [17], p. 305.) □

5.13. Lemma. For any field k, τ(k((t))) = τ(k).

Proof. If L is a finite field extension of k((t)), then L is isomorphic to F ((u)) for some finite field extension F of k. This implies the lemma, since F ((u)) and F have the same level. □

5.14. Remark. If k is a field (of characteristic ≠ 2), the virtual cohomological 2-dimension vcd_{2}(k) of k is defined as the cohomological 2-dimension cd_{2}(k(\sqrt{−1})) of k(\sqrt{−1}). From the Milnor conjecture, as proved by Voevodsky, it follows immediately that vcd_{2}(k) ≤ d implies τ(k) ≤ 2^{d}. Indeed, if F/k is a finite non-real extension, then (−1)^{d+1} = 0 in H^{d+1}(F, ℤ/2), and by the Milnor conjecture, this implies that the (d + 1)-fold Pfister form <1, 1> ⊗ ⋯ ⊗ <1, 1> is hyperbolic.

5.15. Definition. If A is a local ring with maximal ideal 𝔪, we write \overline{p}(A) := sup_{n} p(A/𝔪^{n}).

Obviously, \overline{p}(A) = \overline{p}(Â) ≤ p(Â).

5.16. Lemma. Let A be a two-dimensional regular local ring, with residue field k and quotient field K.

(a) \overline{p}(A) ≥ p(k(t)).

(b) p(K) ≥ p(k(t)).

Proof. (a) Let K = Quot(A), and let μ be the discrete valuation on K which is defined by μ(f) = sup{n: f ∈ 𝔪^{n}} for f ∈ A. (μ comes from the exceptional divisor on the blowing-up of Spec A in its closed point.) Let B be the valuation ring of μ, and 𝔫 its maximal ideal. The local ring B dominates A, and B/𝔫 ≅ k(t).

Let u ∈ B^{∗} be a sum of squares in B, and assume that \overline{u} = u + 𝔫 is not a sum of less than n squares in B/𝔫. Write u = a/b with 0 ≠ a, b ∈ A. Since ab ∈ A is a sum of squares in K, it is a sum of squares in A (4.8). Let r = μ(a) = μ(b), and let x_{1}, …, x_{m} ∈ A such that ab ≡ ∑_{i} x_{i}^{2} mod 𝔪^{2r+1}. If μ(x_{i}) ≥ r for each i, then x_{i}/b ∈ B for each i, and u ≡ ∑_{i}(x_{i}/b)^{2} mod 𝔫, which implies m ≥ n. If μ(x_{i}) < r for some i, then k is non-real (1.8), and μ(x_{i}) < r for at least 1 + s(B/𝔫) different indices i. In particular, then, m ≥ 1 + s(B/𝔫) ≥ p(B/𝔫).

(b) follows from the following general fact: If B is a valuation ring with residue field κ and quotient field K, then p(K) ≥ p(κ). The argument is essentially the same as for (a), but somewhat simpler: If u ∈ B^{∗} is a sum of squares in B, let u = a_{1}^{2} + ⋯ + a_{r}^{2} with a_{i} ∈ K; we show r ≥ ℓ_{κ}(\overline{u}). This is clear if each a_{i} lies in B. If not, then κ is non-real, and at least 1 + s(κ) of the a_{i} have the same (negative) valuation, whence r ≥ 1 + s(κ) ≥ p(κ). □

5.17. Proposition. Let A be a two-dimensional regular local ring, with residue field k. Then

1 + τ(k) ≤ p(k(t)) ≤ \overline{p}(A) ≤ p(k((x)) (y)) ≤ 2τ(k) ≤ 2p(k(t)) − 2.

Proof. The first, fourth and fifth inequality follow from 5.12 and 5.13, while the second was shown in 5.16. For the remaining inequality, we can assume that A is complete. First let k be non-real. Then we have the chain of inequalities

\overline{p}(A) ≤ p(A) ≤ 1 + s(A) ≤ 1 + s(k) = p(k(t)) ≤ \overline{p}(A),

from which \overline{p}(A) = p(A) = 1 + s(k) = p(k((x)) (y)) follows. Now let k be real, so we can assume A = k[[x, y]]. From the series of ring epimorphisms

k[[x]] [y] \overrightarrow{→} k[[x]] [y]/(y^{n}) = A/(y^{n}) \overrightarrow{→} A/𝔪^{n},

it follows that \overline{p}(A) ≤ p(k[[x]] [y]). Moreover, p(k[[x]] [y]) = p(k((x)) (y)), since p(B[t]) = p(K(t)) holds for every DVR B with real residue field and with quotient field K. (This is elementary, using p(K[t]) = p(K(t)) [7].) □

Now here is the basic estimate for the Pythagoras number of a two-dimensional factorial local ring:

5.18. Proposition. Let A be a two-dimensional factorial local ring.

(a) If f is a sum of squares in A, then f is a sum of

p^{1}(A) ∘ (1 + p^{1}(A/f) ∘ \overline{p}(A))

squares.

(b) In particular, p(A) ≤ p^{1}(A) ∘ (1 + p^{1}(A) ∘ \overline{p}(A)) ≤ p^{1}(A) ∘ (1 + p^{1}(A) ∘ p(Â)).

Before we give the proof, here are two simple lemmas:

5.19. Lemma. If A is a local ring with residue field k, then p^{∗}(A) ≤ p(k) ∘ p^{1}(A).

Proof. Any unit sum of squares u can be written u = vw, where v is a sum of at most p(k) squares and w is a principal unit. □

5.20. Lemma. Let A be a ring, let I be an ideal of A contained in the nilradical of A, and let u be a unit in A which is a sum of n squares in A/I. Then u is a sum of n squares in A. In particular, p^{∗}(A) = p^{∗}(A_{red}).

Proof. We can assume that I is nilpotent, and then, by induction, that I^{2} = 0. Let u = x_{1}^{2} + ⋯ + x_{n}^{2} + a with x_{i} ∈ A and a ∈ I. Since u ∈ A^{∗}, there are y_{1}, …, y_{n} ∈ I with a = 2 ∑_{i} x_{i}y_{i}. It follows that u = ∑_{i}(x_{i} + y_{i})^{2}. □

Proof of Prop. 5.18. It is clear that (b) follows from (a). Let f be a sum of squares in A. Since p^{∗}(A) ≤ p^{1}(A) ∘ p(k), where k = A/𝔪 (5.19), and since p(k) ≤ \overline{p}(A), we can assume that f is not a unit. Write f = gh^{2} where h is a product of real prime elements and g is not divisible by any real prime element. Then g is a sum of squares in A, and we can replace f by g since p^{1}(A/f ≥ p^{1}(A/g). So assume f ∈ 𝔪 and 𝔪 ⊂ \sqrt[re]{(f)}. Put B = A/(f^{2}). By 1.7, there is g ∈ 𝔪 such that \sqrt{(f, g)} = 𝔪 and such that −ḡ^{2} is sos in B. Put \overline{B} = B/(f̄ − ḡ^{2})^{2}. Then \overline{B} is artinian, i.e., is an epimorphic image of A/𝔪^{n}, for some n. So f̄− ḡ^{2} is a sum of \overline{p}(A) squares in \overline{B}. From 5.7(b), it follows that f̄ − ḡ^{2} is a sum of p^{1}(B) ∘ \overline{p}(A) squares in B. Hence f̄ is a sum of 1 + p^{1}(B) ∘ \overline{p}(A) squares in B. Again by 5.7(b), f is a sum of p^{1}(A) ∘ (1 + p^{1}(B) ∘ \overline{p}(A)) squares in A. By 5.20, p^{1}(B) = p^{1}(A/f). □

5.21. Corollary. Let A be a two-dimensional complete regular local ring, with residue field k.

(a) p(A) is either \overline{p}(A) or \overline{p}(A) + 1.

(b) If k is non-real, then p(A) = \overline{p}(A) = s(k) + 1.

Proof. \overline{p}(A) ≤ p(A) is trivial, and p(A) ≤ \overline{p}(A) + 1 follows from 5.18. Part (b) has already been shown in the proof of 5.17. □

5.22. Remark. In particular,

1 + τ(k) ≤ p(k(t)) ≤ p(k[[x, y]]) ≤ 1 + p(k((x)) (t)) ≤ 1 + 2τ(k)

for every field k. We wonder whether the inequality p(k(t)) ≤ p(k((x)) (t)) can be strict.

A series of results on sums of squares in power series rings B[[x]], for suitable one-dimensional rings B, is contained in §5 of the paper [9] by Choi, Dai, Lam and Reznick. Typically, B is a discrete valuation ring, or a principal ideal domain of finite type over a real closed field. Under various conditions, the authors are able to show p(B[[x]]) = 2.

In particular, they prove p(k[[x, y]]) = 2 for any hereditarily pythagorean field k (Cor. 5.14). In the case k = ℝ, this had been shown before by Bochnak and Risler [3].

We illustrate the use of Prop. 5.18 by three applications. First, we consider two-dimensional regular local rings of real algebraic varieties. So far, it was not known whether the Pythagoras number of such a ring is finite (see [9] p. 64, where the finiteness question was raised). We get the following result:

5.23. Theorem. Let R be a real closed field, and let B be an integral, finitely generated R-algebra of dimension d. Let 𝔭 be a prime ideal in B of height two, and put A = B_{𝔭}. If A is regular, of if A is factorial and the residue field of 𝔭 is non-real, then p(A) ≤ 2^{d}.

Proof. Let k(𝔭) be the residue field of 𝔭. If A is factorial and k(𝔭) is non-real, then every sum of squares f in A can be written f = gh^{2} with g, h ∈ A and g totally positive, and so the bound follows from Prop. 5.10 in this case.

Assume that A is regular. We know p^{∗}(A) ≤ 2^{d} [18], and p^{∗}(A/f) ≤ 2^{d−1} for every 0 ≠ f ∈ A (same reference). According to Pfister, τ(k(𝔭)) ≤ 2^{d−2}, and hence \overline{p}(A) ≤ 2^{d−1} (5.17c). From 5.18(a), it follows therefore that p(A) ≤ 2^{d} ∘ (1 + 2^{d−1} ∘ 2^{d−1}) = 2^{d}. □

5.24. Remark. In the situation of the last theorem, it is known that p(K) ≤ 2^{d} for K = Quot(A) (Pfister), and no smaller bound is known. Therefore, the bound in our theorem is the best one can reasonably expect. Since p(R(x, y)) = 4 is known [8], it follows in particular that for every maximal ideal 𝔪 of R[x, y], the local ring R[x, y]_{𝔪} has Pythagoras number equal to 4.

As a second application, we consider two-dimensional local rings of arithmetic nature:

5.25. Corollary. Let A be a regular local ring of dimension two (containing \frac{1}{2}) whose quotient field is an n-dimensional function field over a number field. If n ≥ 3, assume that Kato’s cohomological Hasse principle holds (see comment below). Then p(A) ≤ 2^{n+2}.

Comment and proof. Let F/ℚ be a field extension of transcendence degree d. It is known that p(F) ≤ 4 if d = 0, p(F) ≤ 7 if d = 1 (see Colliot-Thélène’s appendix to [14]; the sharper bound p(F) ≤ 6 is contained in an unpublished preprint of Pop, according to [23] p. 100), p(F) ≤ 8 if d = 2 [11] and p(F) ≤ 2^{d+2} for any d. The last is an easy consequence of the Milnor conjecture and of Pfister’s classical theorems, see [24] pp. 37–38. It is conjectured that the better bound p(F) ≤ 2^{d+1} holds for all d ≥ 2. This conjecture is known to be a consequence of the Milnor conjecture and of Kato’s (conjectural) Hasse principle for Galois cohomology of degree d + 2 of F with coefficients ℤ/2; see [11]. The Milnor conjecture has been proved by Voevodsky. Kato’s Hasse principle was proved by Kato for d = 1 [14] and by Jannsen for d = 2 [13]. There is rumor that Jannsen has proved it for all values of d, but this could not be verified.

Note that, in particular, τ(F) ≤ 4 if d ≤ 1, and τ(F) ≤ 2^{d+1} if d ≥ 1 (if one assumes Kato’s Hasse principle).

In the situation of the theorem, let K = Quot(A). Since p^{∗}(A) ≤ p(K) (Ojanguren [20]), we get (using Kato’s Hasse principle) p^{∗}(A) ≤ 7 if n = 1 and p^{∗}(A) ≤ 2^{n+1} if n ≥ 2. On the other hand, if the residue field k of A has characteristic 0, it has transcendence degree n − 2 over ℚ. From \overline{p}(A) ≤ 2τ(k) (5.17), it follows therefore that \overline{p}(A) ≤ 8 if n = 2 and \overline{p}(A) ≤ 2^{n} if n ≥ 3. If char(k) > 0 (this will always be the case for n = 1), then \overline{p}(A) = 1 + s(k) ≤ 3 (5.21). In any case, \overline{p}(A) ≤ 2^{n+1} for n ≥ 2.

For n ≥ 2, the assertion follows now from Prop. 5.18: p(A) ≤ 2^{n+1} ∘ (1 + 2^{n+1} ∘ 2^{n+1}) = 2^{n+2}. If n = 1, then char(k) > 0, and therefore p(A) = p^{+}(A) ≤ p^{∗}(A) ∘ (1 + p^{∗}(A)) (5.8), which gives p(A) ≤ 7 ∘ (1 + 7) = 8. □

If we do not assume Kato’s Hasse principle for n ≥ 3, we get the weaker bound p(A) ≤ 2^{n+3} for n ≥ 3.

Our final main result gives, in particular, a complete answer to Problem 5 from the list of open problems in [9] (§9, p. 80). This problem asked whether part (a) of the following theorem is true:

5.26. Theorem. Let A be a regular local two-dimensional domain, and let K be its quotient field.

(a) If p(K) is finite, then also p(A) is finite.

(b) More precisely, if 2^{r} is the smallest 2-power ≥ p(K), then p(A) ≤ 2^{r+1}. In particular, we always have p(A) ≤ 4p(K) − 4.

Proof. p^{∗}(A) ≤ p(K) ≤ 2^{r}, according to Ojanguren [20]. On the other hand, let k be the residue field of A. Then p(k(t)) ≤ p(K) ≤ 2^{r} (5.16), so τ(k) ≤ 2^{r−1} (5.12), and so \overline{p}(A) ≤ 2τ(k) ≤ 2^{r} (5.17). By 5.18, therefore, p(A) ≤ 2^{r}∘(1+2^{r}∘2^{r}) = 2^{r+1}.

□

In the situation of Cor. 5.25, note that the bound obtained there is just a particular case of the general bound in the last theorem, if n ≥ 2 (but not if n = 1).

References

[1] R. Baeza: Quadratic Forms over Semilocal Rings. Lect. Notes Math. 655, Springer, Berlin 1978.

[2] J. Bochnak, M. Coste, M.-F. Roy: Real Algebraic Geometry. Erg. Math. Grenzgeb. (3) 36, Springer, Berlin, 1998.

[3] J. Bochnak, J.-J. Risler: Le théorème des zéros pour les variétés analytiques réelles de dimension 2. Ann. sci. Éc. Norm. Sup. (4) 8, 353–364 (1975).

[4] M. Bourbaki: Algèbre Commutative. Chapitres 1 à 4. Masson, Paris, 1985.

[5] M. Bourbaki: Algèbre Commutative. Chapitres 8 et 9. Masson, Paris, 1983.

[6] A. Campillo, J. M. Ruiz: Some remarks on pythagorean real curve germs. J. Algebra 128, 271–275 (1990).

[7] J. W. S. Cassels: On the representation of rational functions as sums of squares. Acta arith. 9, 79–82 (1964).

[8] J. W. S. Cassels, W. J. Ellison, A. Pfister: On sums of squares and on elliptic curves over function fields. J. Number Theory 3, 125–149 (1971).

[9] M. D. Choi, Z. D. Dai, T. Y. Lam, B. Reznick: The Pythagoras number of some affine algebras and local algebras. J. reine angew. Math. 336, 45–82 (1982).

[10] M. D. Choi, T. Y. Lam, B. Reznick, A. Rosenberg: Sums of squares in some integral domains. J. Algebra 65, 234–256 (1980).

[11] J.-L. Colliot-Thélène, U. Jannsen: Sommes de carrés dans les corps des fonctions. C. R. Acad. Sci. Paris 312, Sér. I, 759–762 (1991).

[12] M. Coste, M.-F. Roy: La topologie du spectre réel. In: Ordered Fields and Real Algebraic Geometry (San Francisco 1981), D. W. Dubois, T. Recio (eds.), Contemp. Math. 8, Providence, RI, 1982, pp. 27–59.

[13] U. Jannsen: Principe de Hasse cohomologique. In: Séminaire de Théorie des Nombres, Paris, 1989-1990, ed. S. David, Progress in Mathematics 102, Birkhäuser, Boston, 1992, pp. 121– 140.

[14] K. Kato: A Hasse principle for two-dimensional global fields. J. reine angew. Math. 366, 142–183 (1986).

[15] M. Knebusch, A. Rosenberg, R. Ware: Signatures on semilocal rings. J. Algebra 1973, 208– 250 (1973).

[16] M. Knebusch, C. Scheiderer: Einführung in die reelle Algebra. Vieweg, Wiesbaden, 1989.

[17] T. Y. Lam: The Algebraic Theory of Quadratic Forms. Benjamin, Reading, Mass., 1973.

[18] L. Mahé: Level and Pythagoras number of some geometric rings. Math. Z. 204, 615-629 (1990); Erratum, ibid. 209, 481–483 (1992).

[19] H. Matsumura: Commutative ring theory. Cambridge University Press, Cambridge, 1986.

[20] M. Ojanguren: Unités representées par des formes quadratiques ou par des normes réduites. In: Algebraic K-Theory, Part II, K. R. Dennis (ed.), Proc. Oberwolfach 1980, Lect. Notes Math. 967, Springer, Berlin, 1987, pp. 291–299.

[21] J. J. Ortega: On the Pythagoras number of a real irreducible algebroid curve. Math. Ann. 289, 111–123 (1991).

[22] A. Pfister: Zur Darstellung definiter Funktionen als Summe von Quadraten. Invent. math. 4, 229–237 (1967).

[23] A. Pfister: Quadratic Forms with Applications to Algebraic Geometry and Topology. London Math. Soc. Lect. Notes 217, Cambridge University Press, Cambridge, 1995.

[24] A. Pfister: On the Milnor conjectures: History, influence, applications. Jber. Dt. Math.- Verein. 102, 15–41 (2000).

[25] J. M. Ruiz: Pythagorean real curve germs. J. Algebra 94, 126–144 (1985).

[26] J. M. Ruiz: Cônes locaux et complétions. C. R. Acad. Sc. Paris 302, sér. I, 67–69 (1986).

[27] J. M. Ruiz: Sums of two squares in analytic rings. Math. Z. 230, 317–328 (1999).

[28] C. Scheiderer: Sums of squares of regular functions on real algebraic varieties. Trans. Am. Math. Soc. 352, 1039–1069 (1999).

Fachbereich Mathematik, Universität Duisburg, 47048 Duisburg, Germany

E-mail address: claus@math.uni-duisburg.de