Comptes Rendus Mathématique

. We first interpret Pell’s equation satisfied by Chebyshev polynomials for each degree t , as a certain Positivstellensatz, which then yields for each integer t , what we call a generalized Pell’s equation, satisfied by reciprocals of Christo ff el functions of “degree” 2 t , associated with the equilibrium measure µ of the interval [ − 1,1] and the measure (1 − x 2 )d µ . We next extend this point of view to arbitrary compact basic semi-algebraic set S ⊂ R n and obtain a generalized Pell’s equation (by analogy with the interval [ − 1,1]). Under some conditions, for each t the equation is satisfied by reciprocals of Christo ff el functions of “degree” 2 t associated with (i) the equilibrium measure µ of S and (ii), measures g d µ for an appropriate set of generators g of S . These equations depend on the particular choice of generators that define the set S . In addition to the interval [ − 1,1], we show that for t = 1,2,3, the equations are indeed also satisfied for the equilibrium measures of the 2 D -simplex, the 2 D -Euclidean unit ball and unit box. Interestingly, this view point connects orthogonal polynomials, Christo ff el functions and equilibrium measures on one side, with sum-of-squares, convex optimization and certificates of positivity in real algebraic geometry on another side. Résumé. Nous fournissons d’abord une interprétation particulière de l’équation polynomiale de Pell satis-faite par les polynômes de Chebyshev.


Introduction
One goal of this paper is to introduce what we call a generalized Pell's equation which, under certains conditions, is satisfied by reciprocals of Christoffel functions associated with (i) the equilibrium measure λ S of a compact basic semi-algebraic set S ⊂ R n , and (ii) associated measures g dλ S , g ∈ G, for an appropriate set G of generators of S. Moreover, checking whether a chosen set G of generators is appropriate, can be done by solving a sequence of convex optimization problems.
Another goal is to reveal via the path to obtain the result, strong links between orthogonal polynomials, Christoffel functions and equilibrium measures on one side, and certificates of positivity in real algebraic geometry, optimization and sum-of-squares, as well as a duality result on convex cones by Nesterov, on the other side.
The measure µ is called the equilibrium measure associated with the interval [−1, 1]. Next, it turns out that (4) is in fact a particular case of [8,Theorem 17.7] which, rephrased later in the polynomial context by the author in [5,Lemma 4], states that every polynomial p ∈ R[x] (here the constant polynomial p = 2t + 1) in the interior of a certain convex cone, has a distinguished representation in terms of certain SOS. Namely, such SOS are reciprocals of Christoffel functions associated with some rather "intriguing" linear functional φ p ∈ R[x] * associated with p (see [5,Equation (10)]). However in [5,Lemma 4] we did not provide any clue on what is the link between p and φ p . So when S = [−1, 1], (4) tells us that this intriguing linear functional φ p associated with constant polynomials p, is in fact proportional to the (Chebyshev) equilibrium measure dx/π 1 − x 2 of the interval [−1, 1].
So the message of this introductory example is that we can view the polynomial Pell's equation (1) as well as its generalization (4), as algebraic Putinar certificates of increasing degree t = 1, 2, . . . , that the constant polynomials (p = 1 for (1) and p = 2t + 1 for (4)) are positive on the interval [−1, 1].

Contribution
The goal of this paper is (i) to define a framework that extends the above point of view to the broader context of compact basic semi-algebraic sets, (ii) to provide conditions under which a multivariate analogue of (4) holds, and (iii) to show that indeed (4) holds for t = 1, 2, 3 for the 2D-Euclidean ball, the 2D-unit box, and the 2D-simplex. As we next see, Equation (4) is particularly interesting as it links statistics, orthogonal polynomials and equilibrium measures on one side, with convex optimization and duality, sum-of-squares and algebraic certificates of positivity, on another side.
More precisely, with g j ∈ R[x], j = 1, . . . , m, let be compact with nonempty interior. Our contribution is to investigate an appropriate multivariate analogue for S in (5) and its equilibrium measure, of the SOS characterization (4) for the Chebyshev measure dx/π 1 − x 2 on [−1, 1]. Given g ∈ R[x], let t g := ⌈deg(g )/2⌉, and let s(t ) := n+t n . With g 0 = 1, introduce G := {g 0 , g 1 , . . . , g m } and for every t ∈ N, let G t := {g ∈ G : t g ≤ t } (when g ∈ R[x] 2 for all g ∈ G then G t = G for all t ≥ 1). For two polynomials g , h ∈ R[x], we sometimes use the notation g · h for their usual product, when needed to avoid ambiguity. Given a Borel measure φ on S, denote by g · φ, g ∈ G, the measure g dφ on S. Then define the sets respectively called the quadratic module and 2t -truncated quadratic module associated with is convex cone of sum-of-squares polynomials (SOS in short).)

(i).
We first show that if a Borel probability measure φ on S (with well-defined Christoffel functions Λ g ·φ t , g ∈ G, t ∈ N) satisfies 1 for some t 0 ∈ N, and (S, g · φ) satisfies the Bernstein-Markov property for every g ∈ G, then necessarily φ is the equilibrium measure λ S of S (as defined in e.g. [1]). Notice that (8) is the perfect multivariate analogue of the univariate (4) for S = [−1, 1] and its equilibrium measure φ = dx/π 1 − x 2 ; therefore we propose to name (8) a generalized Pell's equation as it is the analogue of (4) for several polynomials g , and the solutions (1/Λ g ·φ t ) g ∈G are sums-of-squares (and not a single square as in the multivariate Pell's equation [7].) So in this case, for every t ≥ t 0 , as an element of int(Q t (G) * ), the vector of degree-2t moments of the equilibrium measure λ S , is strongly related to the constant polynomial "1" in int(Q t (G)) (which can be viewed as the density of λ S w.r.t. λ S ). Such a situation is likely to hold only for specify cases of sets S (with S = [−1, 1] and λ S = dx/π (1 − x 2 ) being the prototype example).
However we also show that in the general case, the vector of degree-2t moments of the equilibrium measure λ S , is still related to the constant polynomial "1" but in a weaker fashion. Namely, let µ t = p * t λ S be the probability measure whose density p * t w.r.t. λ S is the polynomial in the left-hand-side of (8) (with φ = λ S ). Then lim t →∞ µ t = λ S for the weak convergence of probability measures. That is, asymptotically as t grows, and as a density w.r.t. λ S , p * t behaves like the constant density "1" when integrating continuous functions against p * t λ S .
(ii). We next provide an if and only if condition on S and its representation (5) so that indeed, for every t ≥ t 0 , there exists a distinguished linear functional φ * 2t ∈ R[x] * 2t , positive on Q t (G), which an analogue of (8) with Christoffel functions Λ g ·φ * 2t t associated with φ * 2t . Interestingly, this condition which states that is a question of real algebraic geometry related to a (degree-2t truncated) quadratic module associated with a set G of generators of S. Among all possible sets of generators for a given compact semi-algebraic set S, those G for which (10) holds, deserve to be distinguished.
(iii). Next, if condition (10) is satisfied then for every fixed t , the moment vector φ * 2t associated with the linear functional φ * 2t in (ii), is the unique optimal solution of a convex optimization problem (with a "log det" criterion) which can be solved efficiently via off-the-shelf softwares like e.g. CVX [3] or Julia [2]. In fact, (9) is an algebraic "certificate" that condition (10) holds, and even more, (9) and (10) are equivalent. Of course, the larger t is, the larger is the size of the resulting convex optimization problem to solve.
Moreover, every (infinite sequence) accumulation point φ * = (φ * α ) α∈N n of the sequence of finite moment-vectors (φ * 2t ) t ∈N associated with the linear functional φ * 2t , is represented by a Borel measure φ on S. Then φ satisfies (8) if and only if the whole sequence (φ * 2t ) t ∈N converges to φ * and the convergence is finite. That is, there exists t 0 ∈ N such that for every t ≥ t 0 , φ is a representing measure of φ * 2t . Equivalently, for every t ≥ t 0 , φ * 2(t +1) is an extension of φ * 2t . In addition, if the measure φ is such that (S, g · φ) satisfies the Bernstein-Markov property for all g ∈ G, then necessarily φ is the equilibrium measure λ S of S (by (i)).
Interestingly, this hierarchy of convex optimization problems provides a practical numerical scheme (at least for moderate values of t ) to check whether the (unique) optimal solution φ *

2(t +1)
is an extension of φ * 2t , for an arbitrary fixed t ∈ N, which should eventually happen if (8) has ever to hold for the limit measure φ associated with the sequence (φ * 2t ) t ∈N . If φ * 2(t +1) is an extension of φ * 2t for some t , then it is a good indication that indeed (8) may hold with φ * 2t being moments of φ (up to degree 2t ). On the other hand, if φ * 2(t +1) is not an extension of φ * 2t then it may be because (i) there is no limit measure φ that satisfies (8), or (ii) one must wait for a larger t (t ≥ t 0 ) to see a possible "extension", or (iii) perhaps G is not an appropriate set of generators of S. However, in that case it remains to check whether the limit measure φ is still the equilibrium measure of S, and if not, to detect its distinguishing features.

Notation and definitions
Let R[x] denote the ring of real polynomials in the variables x = (x 1 , . . . , 2t be the convex cone of polynomials of total degree at most 2t which are sum-ofsquares (in short SOS).
For a real symmetric matrix A = A T the notation A ⪰ 0 (resp. A ≻ 0) stands for A is positive semidefinite (p.s.d.) (resp. positive definite (p.d.)). The support of a Borel measure µ on R n is the smallest closed set A such that µ(R n \ A) = 0, and such a set A is unique. Denote by C (S) the space of real continuous functions on S.

Riesz functional, moment and localizing matrix. With a real sequence
, and the moment matrix M t (φ) with rows and columns indexed by N n t (hence of size s(t ) := n+t t ), and with entries , and the localizing matrix associated with φ and g , is the moment matrix associated with the new sequence g · φ. The Riesz linear functional g · φ associated with the sequence g · φ satisfies In particular, for any real symmetric A real sequence φ = (φ α ) α∈N n has a representing mesure if its associated linear functional φ is a Borel measure on R n . In this case M t (φ) ⪰ 0 for all t ; the converse is not true in general. In addition, if φ is supported on the set { x ∈ R n : g (x) ≥ 0 } then necessarily M t (g · φ) ⪰ 0 for all t .

Christoffel function.
Let φ ∈ R[x] * be a Riesz functional (not necessarily with a representing measure) such that M t (φ) ≻ 0. As for Borel measures, we may also define the (degree-t ) Christoffel function is a family of polynomials which are orthonormal with respect to φ, then Similarly, if M t (g · φ) ≻ 0, we may also define the (degree-t ) Christoffel function associated with the Riesz functional g · φ.
All the above definitions also hold for finite sequences φ 2t = (φ α ) α∈N n 2t and associated Riesz to all moments up to degree 2t .
A compact set S is said to be regular if its associated Siciak's function is continuous everywhere in R n (the same definition also extends to C n ; see [6, Definition 4.4.2, p. 53]). If S is regular and (S, µ) satisfies the Bernstein-Markov property, then uniformly on compact subsets of R n : lim Equilibrium measure. The notion of equilibrium measure associated to a given set, originates from logarithmic potential theory (working in C in the univariate case) to minimize some energy functional. For instance, the equilibrium (Chebsyshev) measure dφ := dx/π 1 − x 2 minimizes the Riesz s-energy functional 1 |x − y| s dµ(x) dµ(y) with s = 2, among all measure µ equivalent to φ. Some generalizations have been obtained in the multivariate case via pluripotential theory in C n . In particular if S ⊂ R n ⊂ C n is compact then the equilibrium measure (let us denote it by λ S ) is equivalent to Lebesgue measure on compact subsets of int(S). It has an even explicit expression if S is convex and symmetric about the origin; see e.g. Bedford , t ∈ N, converges to λ S for the weak-⋆ topology and therefore in particular: (see e.g. [6,Theorem 4.4.4]). In addition, if a compact S ⊂ R n is regular then (S, λ S ) has the Bernstein-Markov property; see [6, p. 59]. For a brief account on equilibrium mesures see the discussion in [6, Section 4-5, pp. 56-60] while for more detailed expositions see some of the references indicated there.

Brief summary of main results
In Section 2.3, Theorem 2 shows that if a linear functional φ ∈ R[x] * satisfies the multivariate analogue (8) of (4) for S in (5), then under a certain technical assumption, φ is necessarily the equilibrium measure λ S of S. Corollary 4 shows that (8) is also a strong property of orthonormal polynomials associated with λ S , the perfect analogue of (2) for Chebyshev polynomials on S = [−1, 1]. As this strong property is not expected to hold for general sets S in (5), we next show in Theorem 3 that in general, the polynomial associated with λ S (now not necessarily constant (equal to 1) as in Theorem 2) has still a strong property related to the constant polynomial "1". Namely asymptotically, the sequence of probability measures That is, informally, the polynomial density p * t "behaves" asymptotically like the constant (equal to 1) density when integrating continuous functions against p * t λ S . Hence somehow, the vector of degree-2t moments of λ S in the convex cone (Q t (G)) * are still intimately related to the constant polynomial 1 in Q t (G) (but not as directly as in Theorem 2).
Next, in Section 2.4 we still consider again the constant polynomial 1 and in Theorem 6 we show that under a simple condition, indeed 1 ∈ int(Q t (G) for all t , and therefore there exists a sequence of linear functional (φ 2t ) t ∈N that satisfies (9) for all t . For each t , the linear functional φ 2t is the unique optimal solution of a simple convex optimization problem with log det criterion to maximize. (In addition, in the case when S = {x : g (x) ≥ 0} for some g ∈ R[x], Lemma 9 relates solutions to Pell's equation with φ 2t and S.) In Section 2.5 one is concerned with the asymptotic behavior of the linear functionals (φ 2t ) t ∈N as t grows, and Theorem 10 shows that there exists a limit moment sequence φ which has a representing probability measure φ on S. Moreover φ satisfies (8) and is the equilibrium measure λ S , if and only if finite convergence takes place, that is, for every t ≥ t 0 , φ 2t is the vector of degree-2t moments of φ. So an interesting issue (not treated here) is to relate φ and λ S when the convergence is only asymptotic and not finite.
Finally in Section 3 we provide numerical examples of sets S where (8) holds at least for t = 1, 2, 3.

Two preliminary results
For simplicity of exposition, we will consider sets S in (5) for which the quadratic polynomial x → R − ∥x∥ 2 belongs to Q 1 (G); in particular, S is contained in the Euclidean ball of radius R for some R > 0, and the quadratic module Q(G) is Archimedean; see e.g. [4]. Let λ S be the equilibrium measure of S (as described in e.g. [1]) and recall that g 0 = 1 (so that g 0 · λ S = λ S ). Let C (S) be the space of continuous functions on S. (5) is compact with nonempty interior. Moreover, there exists R > 0 such that the quadratic polynomial x → θ(x) := R − ∥x∥ 2 is an element of Q 1 (G). In other words, h ∈ Q 1 (G) is an "algebraic certificate" that S in (5) is compact. (5), let Assumption 1 hold. Let φ = (φ α ) α∈N n (with φ 0 = 1) be such that M t (g · φ) ≻ 0 for all t ∈ N and all g ∈ G, so that the Christoffel functions Λ g ·φ t are all well defined (recall that φ ∈ R[x] * is the Riesz linear functional associated with the moment sequence φ). In addition, suppose that there exists t 0 ∈ N such that

Theorem 2. With S as in
Then φ is a Borel measure on S and the unique representing measure of φ. Moreover, if (S, g · φ) satisfies the Bernstein-Markov property for every g ∈ G, then φ = λ S and therefore the Christoffel polynomials (Λ g ·λ S t ) −1 g ∈G t satisfy the generalized Pell's equations: Proof. In view of Assumption 1, the quadratic module Q(G) is Archimedean. Next, as M t (g ·φ) ≻ 0 for all t ∈ N and all g ∈ G, then by Putinar's Positivstellensatz [10], φ has a unique representing measure on S; that is, the Riesz linear functional φ associated with φ is a Borel measure on S. Next, write (15) as and let α ∈ N n be fixed arbitrary. As (S, g · φ) satisfies the Bernstein-Markov property for every g ∈ G, then by [6,Theorem 4.4.4], where λ S is the equilibrium measure of S; see [1,6]. Hence multiplying (17) by x α and integrating w.r.t. φ yields Each term of the product in the above sum of the right-hand-side has a limit as t grows. Moreover G t = G for t sufficiently large. Therefore taking limit as t increases yields As α ∈ N n was arbitrary and S is compact, then necessarily φ = λ S . and is likely to hold only in some specific cases. The prototype example is Then indeed (4) is exactly (16), and by analogy with the Chebyshev univariate case, we propose to call Equation (16) a generalized Pell's (polynomial) equation of degree 2t . It is satisfied by the polynomials (g · (Λ g ·λ S t −t g ) −1 ) g ∈G t , all of degree less than 2t . If true for all t , then (S, λ S ) satisfies the generalized Pell's equations for all degrees.
Of course, to be valid (16) requires conditions on S and its representation (5) by the polynomials g ∈ G. For instance, as shown in Section 3 below, if S is the 2D-Euclidean unit ball with g = 1 − ∥x∥ 2 , (in which case G t = G 1 for all t ≥ 1), then λ S = dx/(π 1 − ∥x∥ 2 ) and we can show that (16) holds for t = 1, 2, 3. Similarly, if S is the 2D-simplex {x : and we can show that (16) holds for t = 1, 2, 3, for the quadratic generators in G = {g 0 , g 1 , g 2 , g 3 However in the general case we have the following weaker result, still related to Theorem 2.
Theorem 3. Let λ S be the equilibrium measure of S and assume that for every g ∈ G, (S, g · λ S ) satisfies the Bernstein-Markov property. For every t , define the polynomial Then the sequence of probability measures (µ t := p * t λ S ) t ≥t 0 converges to λ S for the weak-⋆ topology Proof. The polynomial p * t in (18) is well defined because the matrices M t −t g (g · λ S ) are non singular. Each µ t is a probability measure on S because As (S, g · λ S ) satisfies the Bernstein-Markov property for every g ∈ G, then by [6,Theorem 4.4.4], Hence multiplying (18) by f ∈ C (S) and integrating w.r.t. λ S , yields Each term of the product in the above sum of the right-hand-side has a limit as t grows. Moreover G t = G for t sufficiently large. Therefore taking limit as t increases, yields As S is compact it implies that the sequence of probability measures (µ t ) t ∈N ⊂ M (S) + converges to λ S for the weak-⋆ topology σ(M (S), C (S)) of M (S). □ In other words (and in an informal language), when integrating continuous functions against µ t , the density p * t of µ t w.r.t. λ S behaves asymptotically like the constant (equal to 1) density. That is, Theorem 3 is a more general (but weaker) version of Theorem 2.

Corollary 4.
Let φ be the Borel measure on S in Theorem 2, and for each g ∈ G, let (P g ·φ α ) α∈N n be a family of polynomials, orthonormal with respect to the measure g · φ. Then for every t ≥ t 0 + 1: Proof. Recalling (12), for each g ∈ G t with t ≥ t 0 + 1: which combined with (15) yields (20).

Remark 5.
Observe that (20) which states a property satisfied by orthonormal polynomials associated with g · φ, g ∈ G t , is a multivariate and multi-generator analogue of (2), the polynomial Pell's equation satisfied by normalized Chebyshev polynomials. However there are several differences between (20) and (2).
In (2), where G = {g } with g = (1−x 2 ) (and so with t g = 1), the triplet ( T t , −g , U t −t g ) is a solution to the polynomial Pell equation C 2 − F H 2 = 1 which involves single squares C 2 and H 2 and a single generator F . On the other hand, (20) addresses the multivariate case with possibly several generators g ∈ G t and in compact form reads g ∈G t g C g = 1 which now involves SOS polynomials (C g ) g ∈G t and several generators g ∈ G t .
This is why we think that it is fair to call (20) (as well as (8)

A convex optimization problem and its dual
In Theorem 2 we have taken for granted existence of a linear functional φ such that its moment sequence φ satisfies (15). The next issue is: Given a compact set S as in (5), can we provide such a moment sequence φ? At least, can we define a numerical scheme which provides finite sequences (φ 2t ) t ∈N which "converge" to such a desirable φ as t grows?
As we next see, this issue essentially translates to the following simple issue in real algebraic geometry. Do we have 1 ∈ int(Q t (G)) for every t ∈ N? If the answer is yes then indeed such a φ exists. But then the associated linear functional φ will satisfy (15) only if the convergence is finite. Moreover the conditions can be checked by solving a sequence of convex optimization problems described in the next section.

Theorem 6.
With t ∈ N fixed, Problems (21) and (22) have same finite optimal value ρ t = ρ * t if and only if 1 ∈ int(Q t (G)). Then both have a unique optimal solution φ * 2t ∈ R s(2t ) and (Q * g ) g ∈G t respectively, which satisfy Q * g = M t −t g (g · φ * 2t ) −1 for all g ∈ G t . Therefore Proof. For every fixed t , the convex cone Q t (G) is a particular case of the convex cone K (q) investigated in Nesterov [8, p. 415, Section 2.2] when the functional system {v(x)} in [8] is the set of monomials (x α ) α∈N n 2t and the functions (q 1 , . . . ,q l ) are our polynomials g in G t . Then By [8,Theorem 17.7] p ∈ int(K (q 1 , . . . ,q l )) if and only if p = for some unique φ p ∈ K (q 1 , . . . ,q l ) * . In addition, letting Q g := M t −t g (g · φ p ) −1 , g ∈ G t , the sequence (Q g ) g ∈G t is the unique solution of (22), with p instead of g ∈G t s(t −t g ) in the left-handside of the constraint. Therefore, by [8,Theorem 17.7] for the constant polynomial p = 1, for some distinguished φ ∈ Q t (G) * . Then as 1 ∈ int(Q t (G)) for every t , letting p be the constant polynomial g ∈G t s(t − t g ), one obtains for some unique φ * 2t ∈ Q t (G) * , and Q * g := M t −t g (g · φ * 2t ) −1 , g ∈ G t , is the unique optimal solution of (22). Next, φ * 2t is a feasible solution of (21), and We next prove weak duality, i.e., ρ * t ≤ ρ t , so that φ * 2t (resp. (Q * g ) g ∈G t ) is the unique optimal solution of (21) (resp. (22)) and ρ t = ρ * t . So let φ 2t (resp. (Q g ) g ∈G t ) be an arbitrary feasible solution of (21) (resp. (22)). Then by Lemma 12, for every g ∈ G t , s(t − t g ) + log det(M t −t g (g · φ 2t )) + log det(Q g ) ≤ 〈M t −t g (g · φ 2t ), Q g 〉 .
In addition, as φ 2t (1) = 1 from which we deduce weak duality, that is, □ So as one can see, (23) is a multivariate analogue of (4). Crucial in Theorem 6 is the condition 1 ∈ int(Q t (G)) for all t . Below is a simple sufficient condition. (5) with G = {g 0 , g 1 , . . . , g m }, and let Assumption 1 hold. Then 1 ∈ int(Q t (G)) for every t .

Lemma 7. Let S be as in
For clarity of exposition the proof is postponed to Section 3.1.

Lemma 9.
Let g ∈ R[x] of even degree be fixed, G := {g }, and suppose that there are two polynomials of even degree p ∈ int(Σ t ), and q ∈ int(Σ t −t g ) such that p + g q = 1. Then there exists a linear In particular with g ∈ R[x] fixed: If there exist polynomials , then (24) holds for some φ ∈ int(Q t (G) * ).
Proof. Let G := {g } and let Q t (G) be as in (7). As p ∈ int(Σ t ), and q ∈ int(Σ t −t g ), 1 = p + g q ∈ int(Q t (G)) and by [5,Lemma 4], (24) holds. The second statement is a direct consequence by taking p = i ∈I C 2 i and q = i ∈I H 2 i .

□
So Lemma 9 states that if the triple (p, g , q) solve the generalized Pell's equation p + g q = 1, with p ∈ int(Σ t ) and q ∈ int(Σ t −t g ), then p (resp. q) is the Christoffel polynomial (

An asymptotic result
We now consider asymptotics for the sequence (φ * 2t ) t ∈N obtained in Theorem 6, as t grows. Theorem 10. Under Assumption 1, let φ * 2t be an optimal solution of (21), t ∈ N, guaranteed to exist by Theorem 6. Then: (i) The sequence (φ * 2t ) t ∈N has accumulation points, and for each converging subsequence (t k ) k∈N , (φ * 2t k ) k∈N converges pointwise to the vector φ = (φ α ) α∈N n of moments of some probability measure φ on S, that is, (ii) A limit probability measure φ as in (i) satisfies (15) if and only if the whole sequence (φ * 2t ) t ∈N converges to φ and finite convergence takes place. That is, there exists t 0 such that for all t ≥ t 0 , and so φ is a representing measure of φ * 2t for all t ≥ t 0 . In addition, under the condition of Theorem 2, φ is the equilibrium measure λ S of S. Proof.
By completing with zeros, the finite sequence φ * 2t is viewed as an infinite sequence indexed by N n . Then by a standard argument involving scaling and the σ(ℓ ∞ , ℓ 1 ) weak-⋆ topology, the sequence (φ * 2t ) t ∈N has accumulation points and for each subsequence (t k ) k∈N converging to some φ ∈ N n , one obtains the pointwise convergence lim k→∞ (φ * 2t k ) α = φ α , for every α ∈ N n . Next, let d ∈ N and g ∈ G be fixed, arbitrary. Observe that ⪰ 0 as k increases. As Q(G) is Archimedean, then by Putinar's Positivstellensatz [10], φ is a Borel probability measure on S (as φ * 2t k (1) = 1 for all k).
(ii). Let φ be as in (i) and suppose that φ satisfies (15). Then for each t ≥ t 0 , the vector φ 2t = (φ α ) α∈N n 2t is an optimal solution of (21), and by uniqueness, φ 2t = φ * 2t . That is, φ is a representing measure for φ * 2t for all t ≥ t 0 . But this implies that φ * 2(t +1) is an extension of φ * 2t for all t ≥ t 0 , and therefore the whole sequence converges to φ, and the convergence is finite.
Conversely, if finite convergence takes place, that is, if φ * 2(t +1) is an extension of φ * 2t for all t ≥ t 0 , then φ in (i) is the unique accumulation point and its associated measure φ satisfies (15).
Finally, if (S, g · φ) satisfies the Bernstein-Markov property for all g ∈ G, then by Theorem 2, φ = λ S , which concludes the proof. □ Remark 11. Theorem 10 provides a simple test to detect whether the set G of generators of S is a good one, and if so, a numerical scheme to compute moments of the equilibrium measure λ S of S. Indeed if (26) has to hold for the equilibrium measure λ S , then necessarily, the unique optimal solution φ * 2(t +1) of (21) for t + 1 must be an extension of the unique optimal solution φ * 2t of (21) for t , whenever t is sufficiently large. So for instance, if one observes that φ * 2 is an extension of φ * 1 after solving (21) for t = 1 and t = 2, then it already provides a good indication that finite convergence may indeed take place.

Discussion
There are several issues that are worth investigating. The first one is to completely validate our result for t > 3, for the cases where S is the unit box, the Euclidean unit ball, and the simplex. One possibility is to use Corollary 4 for each degree t , which only requires to show (20) (a property of orthonormal polynomials associated with the measures (g · λ S ) g ∈G ) as we did on some of the above examples. Another issue is to investigate what is a distinguishing feature of the limit measure φ in Theorem 10 when φ does not satisfy the generalized Pell's equation (8). Could φ still be the equilibrium measure of S? with a g ≥ 0 and A 0 ⪰ 0, to obtain , and therefore (R + 1) t ∈ int(Q t (G)). □