Detecting optimality and extracting solutions in polynomial optimization with the truncated GNS construction

A basic closed semialgebraic subset of $\mathbb{R}^{n}$ is defined by simultaneous polynomial inequalities $p_{1}\geq 0,\ldots,p_{m}\geq 0$. We consider Lasserre's relaxation hierarchy to solve the problem of minimizing a polynomial over such a set. These relaxations give an increasing sequence of lower bounds of the infimum. In this paper we provide a new certificate for the optimal value of a Lasserre relaxation be the optimal value of the polynomial optimization problem. This certificate is that a modified version of an optimal solution of the Lasserre relaxation is a generalized Hankel matrix. This certificate is more general than the already known certificate of an optimal solution being flat. In case we have optimality we will extract the potencial minimizers with a truncated version of the Gelfand-Naimark-Segal construction on the optimal solution of the Lasserre relaxation. We prove also that the operators of this truncated construction commute if and only if the matrix of this modified optimal solution is a generalized Hankel matrix. This generalization of flatness will bring us to reprove a result of Curto and Fialkow on the existence of quadrature rule if the optimal solution is flat and a result of Xu and Mysovskikh on the existance of a Gaussian quadrature rule if the modified optimal solution is generalized Hankel matrix. At the end, we provide a numerical linear algebraic algorithm for dectecting optimality and extracting solutions of a polynomial optimization problem.

polynomial inequalities p1 ≥ 0, . . . , pm ≥ 0. We consider Lasserre's relaxation hierarchy to solve the problem of minimizing a polynomial over such a set. These relaxations give an increasing sequence of lower bounds of the infimum. In this paper we provide a new certificate for the optimal value of a Lasserre relaxation be the optimal value of the polynomial optimization problem. This certificate is that a modified version of an optimal solution of the Lasserre relaxation is a generalized Hankel matrix. This certificate is more general than the already known certificate of an optimal solution being flat. In case we have optimality we will extract the potencial minimizers with a truncated version of the Gelfand-Naimark-Segal construction on the optimal solution of the Lasserre relaxation. We prove also that the operators of this truncated construction commute if and only if the matrix of this modified optimal solution is a generalized Hankel matrix. This generalization of flatness will bring us to reprove a result of Curto and Fialkow on the existence of quadrature rule if the optimal solution is flat and a result of Xu and Mysovskikh on the existance of a Gaussian quadrature rule if the modified optimal solution is generalized Hankel matrix. At the end, we provide a numerical linear algebraic algorithm for dectecting optimality and extracting solutions of a polynomial optimization problem.

Notation
Throughout this paper, we suppose n ∈ N = {1, 2, . . .} and abbreviate (X1, . . . , Xn) by X. We let R[X] denote the ring of real polynomials in n indeterminates. We denote N0 := N ∪ {0}. For α ∈ N n 0 , we use the standard notation : |α| := α1 + · · · + αn and X α := X α 1 1 · · · X αn n For a polynomial p ∈ R[X] we denote p = α pαX α (aα ∈ R). For d ∈ N0, by the notation R[X] d := { |α|≤d aαX α | aα ∈ R} we will refer to the vector space of polynomials with degree less or equal to d. Polynomials all of whose monomials have exactly the same degree d ∈ N0 are called d-forms. They form a finite dimensional vector space that we will denote by: We will denote by s k := dim R[X] k and by r k := dim R[X] =k . For d ∈ N0 we denote R[X] * d the dual space of R[X] d i.e. the set of linear forms from R[X] d to R and for ℓ ∈ R[X] * 2d we denote by ℓ ′ := ℓ |R[X] 2d−2 the restricction of the linear form ℓ to the space R[X] 2d−2 . For d ∈ N0 and a ∈ R n we denote eva ∈ R[X] * d the linear form such that for all p ∈ R[X] d , eva(p) = p(a).

Introduction
Let polynomials f, p1, . . . , pm ∈ R[X] with m ∈ N0 be given. A polynomial optimization problem involves finding the infimum of f over the so called basic closed semialgebraic set 1 S, defined by: (1) S := {x ∈ R n | p1(x) ≥ 0, . . . , pm(x) ≥ 0} and also, if it is possible, a polynomial optimization problem involves extracting optimal points or minimizers i.e. elements in the set: So from now on we will denote as (P ), to refer us to the above defined polynomial optimization problem, that is to say: The optimal value of (P ), i.e. the infimum of f (x) where x ranges over all feasible solutions S will be denoted by P * , that is to say: (3) Note that P * = +∞ if S = ∅ and P * = −∞ if and only if f is unbounded from below on S, for example if S = R n and f is of odd degree.
For d ∈ N0 let us define: X 2 2 , X2X3, . . . , X 2 n , . . . , . . . , X d n ) T as a basis for the vector space of polynomials in n variables of degree at most d. Then Let us substitute for every monomial X α ∈ R[X] 2d a new variable Yα. This matrix has the following form: Definition 2.1. Every matrix M ∈ R s d ×s d with the same shape than the matrix (5) is called a generalized Hankel matrix of order d. We denote the affine linear space of generalized Hankel matrix of order d by: For p ∈ R[X] k denote dp := ⌊ k−deg p 2 ⌋ and consider the following symmetric matrix: (6) pV t dp V dp =         p pX1 pX2 · · · pX dp n pX1 pX 2 1 pX1X2 · · · pX1X dp n pX2 pX2X1 pX 2 2 · · · pX2X dp n . . . . . . . . . . . . . . . pX dp n pX1X dp n pX dp n X2 · · · pX 2dp n s dp ×s dp k Definition 2.2. For p ∈ R[X] k the localizing matrix of p of degree k is the matrix resulting from substitute every monomial X α such that |α| ≤ k in (6) for a new variable Yα. We denote this matrix by M k,p ∈ R[Y ] s dp ×s dp 1 . Definition 2.3. For a t × t real symmetric matrix A, the notation A 0 means that A is positive semidefinite, i.e. a T Aa ≥ 0 for all a ∈ R t .
In order to give further characterizations of positive semidefiniteness, let us remember a very well know theorem in linear algebra.
Reminder 2.4. Suppose A ∈ R t×t is symmetric. Then there is a diagonal matrix D ∈ R t×t and U ∈ R t×t orthogonal matrix, i.e. U U T = U T U = It, such that U T AU = D Reminder 2.5. Let A ∈ R t×t symmetric. The following are equivalent: (1) A 0.
(2) All eigenvalues of A are nonnegative.
(3) There exists B ∈ R t×t such that A = B T B. Proof.
(2) =⇒ (3). Suppose that all eigenvalues of A are nononnegative then by 2.4 there exits D diagonal matrix with nonnegative entries λi ≥ 0 and U orthogonal matrix such that U T AU = D. Take B := RU T ∈ R t×t where R is the diagonal matrix which entries are √ λi. (3) =⇒ (1). Suppose there is B ∈ R t×t such that A = B T B, take a ∈ R t then a t Aa = a t B T Ba = (Ba)(Ba) = Ba 2 ≥ 0.
Given a polynomial optimization problem (P ) as in (2) and M := M d (y) ∈ R s d ×s d an optimal solution of (P 2d ), it is always possible to find a matrix WM ∈ R s d ×r d such that M can be decomposed in a block matrix of the following form (see 4.8 below for a proof): This useful result can be also found in [23] and in [3,Lemma 2.3]. Define the following matrix: In this paper we prove that M is well-defined, that is to say it does not depend from the election of WM , and assuming that W T M AM WM is a generalized Hankel matrix we will use a new method to find a decomposition: where r := rank M ,a1, . . . , ar ∈ R n and λ1 > 0, . . . , λr > 0. In this paper we will show that for some polynomial optimization problems if we have that W T M AM WM is generalized Hankel and the nodes are contained in S, even if M is not flat i.e. W T M AM WM = CM (see the definition in 5.17), we can still claim optimality, that is to say that a1, . . . , ar are global minimizers. We will also see some examples to discard optimality or in other words to discard that M has a factorization as in (8), see 6.7. Let us advance two results concerning optimality. Theorem 2.7. Let (P ) be a polynomial optimization problem as in (2) and suppose that M d (y) ∈ R s d ×s d is an optimal solution of (P 2d ) and M d (y) is a generalized Hankel matrix. Then there are a1, . . . , ar ∈ R n points and λ1 > 0, . . . , λr > 0 weights such that: . . , ar} ⊆ S and f ∈ R[X] 2d−1 then a1, . . . , ar are global minimizers of (P ) and P * = P * 2d = f (ai) for all i ∈ {1, . . . , r}.
Proof. The correspondence given in 3.5 together with the Theorem 7.1 will give us the proof.
Remark 2.8. Let (P ) be a polynomial optimization problem without constraints. Suppose M d (y) ∈ R s d ×s d is an optimal solution of (P 2d ) with M d (y) a generalized Hankel matrix and that f ∈ R[X] 2d−1 . Applying Theorem 2.7 we get the decomposition (9), and since we can ensure that a1, . . . , ar ⊆ S = R n then they are global minimizers of (P ) and P * = P * 2d = f (ai) for all i ∈ {1, . . . , r}.
Example 2.9. Let us considerer the following polynomial optimization problem taken from [8,Problem 4.7]: We get the optimal value P * 4 = −16.7389 associated to the following optimal solution:  (8) and check if the points are in S. We will see in Section 5 in 5.20 how to compute this factorization, in this case, it is easy to see that: where α := 0.7175 and β := 1.4698. One can verify that (α, β) ∈ S and therefore we can conclude that P * 4 = P * = −16.7389 is the optimal value and (α, β) is a minimizer.
Theorem 2.10. Let (P ) be a polynomial optimization problem given as in (2) and suppose that the pi from (1) are all of degree at most 1 (so that S is a polyhedron). Suppose that M d (y) ∈ R s d ×s d is an optimal solution of (P 2d ) and that M d (y) is a generalized Hankel matrix. Then there are a1, . . . , ar ∈ S and λ1 > 0, . . . , λr > 0 weights such that: . . , ar are global minimizers of (P ) and P * = P * 2d = f (ai) for all i = 1, . . . , r.
Proof. The correspondence given in Corollary 3.5 together with the Theorem 7.3 will give us the result.
We get the optimal value P * 8 = 6.2244 · 10 −9 from the following optimal solution of (P8): where:  is a Hankel matrix, what implies that M is generalized Hankel and since we are minimizing over a polyhedron defined by linear polynomials by Theorem 2.10 P * 8 = P * . The goal of this paper is to find optimality conditions and extracting global minimizers from an optimal solution of the moment relaxation. That is to say given a polynomial optimization problem (P ) as in (2) and an optimal solution of the moment relaxation (P k ) as in 2.6, find conditions to conclude if the optimal value is also the optimal value of the original polynomial optimization problem, i.e. P * = P * k and in this case extracting global minimizers. In the first section we outline Lasserres approach [11] to solve polynomial optimization problems with the language of linear forms, at the end of this section we will reformulate the problem of optimality, that is to say we reformulate the problem of finding a decomposition of the modified moment matrix as in (9) to the problem of finding a commutative truncated version of the Gelfand-Naimark-Segal construction for a linear form L ∈ R[X] * 2d with d ∈ N0 ∪ {∞}, which take nonnegative values in R[X] 2 d . The truncated GNS construction for this linear form will be defined in Section 4 and at the end of this section we give a proof of the very useful result of Smul'jan [23] using the inner product defined in the truncated GNS construction. In Section 5 we prove that if the truncated GNS multiplication operators of the optimal solution commute we are able to get the factorization (8) or in other words we find a Gaussian quadrature rule 5.11 representation for the linear form. In this section we will also prove that the commutativity of the truncated GNS operators is a more general fact than the very well know flatness condition, that is the case CM = W T M AM WM , but the reverse it does not always hold (see (10),5.19,46,(47), (50) for examples), at the end of this section we review a result of Curto and Fialkow for the characterization of linear forms with quadrature rule on the whole space with minimal number of nodes. In Section 6 we prove the main result, which is that the truncated GNS multiplication operators of M commute if and only if W T M AM WM is a Hankel matrix. This fact will help us to detect optimality in polynomial optimization problems and to slightly generalize some classical results of Dunkl, Xu ,Mysovskikh, Möller and Putinar [7,Theorem 3.8.7], [16,17], [18, pages 189-190] on Gaussian quadratue rules. with underlying ideas of [18]. In the last section we group all the results about optimality and global minimizers for an optimal solution of the moment relaxation, at the end we also give an algorithm for detecting the optimality and extracting minimizers with numerical examples.

Formulation of the problem
To solve polynomial optimization problems we use the very well known moment relaxations defined in 2.6. An introduction in to moment relaxations can also be found for instance in: [13], [11] and [21]. Likewise we will give the equivalent definition using linear forms instead of matrices in 3.4. We will now outline Lasserre's [11] approach to solve this problem. This method constructs a hierarchy of semidefinite programming relaxations, which are generalization of linear programs, and possible to solve efficiently, see [22] and [13] for an introduction. In each relaxation of degree k we build convex set, obtained through the linearization of a equivalent polynomial optimization problem of (P ) defined in (2). This equivalent formulation of the problem consists in adding infinitely many redundant inequalites of the form p ≥ 0 for all p ∈ R[X] 2 pi ∩ R[X] k (with the notation R[X] 2 pi we mean the set of all finite sums of elements of the form p 2 pi, for p ∈ R[X]). The set of this redundant inequalities builds a cone, which is a set containing 0, closed under addition and closed under multiplication for positive scalars. The cone generated for this redundant inequalities is called truncated quadratic module generated by the polynomials p1, . . . , pm, as we see in Definition 3.1. This relaxations give us an increasing sequence of lower bounds of the infimum P * , as you can see in 3.9. Lasserre proved that this sequence converge asymptotically to the infimum if we assume some arquimedean property in the cone generetated for the redundant inequalities, see [21,Theorem 5] for a proof.
Remark 3.2. Note that: For a proof this see [21,Page 5].
Then it holds: Proof. Let us set the matrices Aα ∈ R s d ×s d for |α| ≤ k, as the matrices such that: and yα := L(X α ) for |α| ≤ k.
Due to Lemma 3.3 the following definition of moment relaxation using linear forms is equivalent to the definition given in 2.6 Definition 3.4. Let (P ) be a polynomial optimization problem given as in 2 and let k ∈ N0 ∪{∞} such that f, p1, . . . , pm ∈ R[X] k . The moment relaxation (or Lasserre relaxation) of (P ) of degree k is the semidefinite optimization problem: the optimal value of (P k ) i.e., the infimum over all L(f ) where L ranges over all optimal solutions of (P k ) is denoted by P * k ∈ {−∞} ∪ R ∪ {∞}. Corollary and Notation 3.5. Let d ∈ N0. The correspondence: defines a bijection between the linear forms L ∈ R[X] * 2d such that L( R[X] 2 d ]) ⊆ R ≥0 and the set of positive semidefinite generalized Hankel matrices of order d i.e.
Proof. As usual let us set the matrices Aα ∈ R s d ×s d for |α| ≤ 2d as the matrices such that: Then: We call the elements of N the nodes of the quadrature rule.
Proposition 3.9. Let (P ) be the polynomial optimization problem given in (2) with f, p1, . . . , pm ∈ R[X] k . Then the following holds: Suppose L has a quadrature rule with nodes in S, then L is a feasible solution of (P k ) with L(f ) ≥ P * . (iii) Suppose (P k ) has an optimal solution L * , which has a quadrature rule on R[X] l for some l ∈ {1, . . . , k} with f ∈ R[X] l and the nodes are in S. Then L * (f ) = P * , moreover we have P * = P * k+m for m ≥ 0 and the nodes of the quadrature rule are global minimizers of (P ). (iv) In the situation of (iii), suppose moreover that (P ) has an unique global minimizer x * , then L * (f ) = f (x * ) and x * = (L * (X1), . . . , L * (Xn)).
Proof. (i) P * ≥ P * ∞ since if x is a feasible solution for (P ) then evx ∈ R[X] * is a feasible solution for P∞ with the same value, that is f (x) = evx(f ). It remains to prove P * l ≥ P * k for l ∈ N ≥k ∪ {∞}. For this let L be a feasible solution of (P l ), as M k (p1, . . . , pm) ⊆ M l (p1, . . . , pm) then L |R[X] k is a feasible solution of (P k ) with the same optimal value. (ii) Suppose L has a quadrature rule with nodes a1, . . . , aN ∈ S and weights λ1 > 0, . . . , λN > 0. From L(1) = 1 we get N i=1 λi = 1 and since the nodes are in S it holds L(M k (p1, . . . , pm)) ⊆ R ≥0 . Hence L is a feasible solution of (P k ). Moreover the following holds: where the inequality follows from the fact that P * ≤ f (x) for all x ∈ S. (iii) Suppose L * is an optimal solution of (P k ) then L * (f ) = P * k ≤ P * using (i) and on other side since L * (1) = 1 and L * has a quadrature rule on R[X] l with nodes in S and f ∈ R[X] l , there exist a1, . . . , aN ∈ S nodes, and λ1 > 0, . . . , λN > 0 weights, such that: Therefore L * (f ) = P * , and since P * k = P * we get equality everywhere in (i) and we can conclude that P * = P * k+m for m ≥ 0. It remains to show that the nodes are global minimimizers of (P ), but this is true since in (18) we have equality everywhere, and if we factor (iv) Using (iii) we have that L * (f ) = P * = f (x * ), and continuing with the same notation as in the proof of (iii) we got by unicity of the minimizer x * , that ai = x * for all i ∈ {1, . . . , N }. This implies that L * = evx * on R[X] * l , and evaluating in the polinomials X1, . . . , XN ∈ R[X]1 we got that: That is to say, x * = (L * (X1), . . . , L * (Xn)).
Using this theorem we can continue with our reformulation of the problem: given d ∈ N0 , to find a quadrature rule for L is the same as to find commuting symmetric matrices M1, . . . , Mn ∈ R r×r and a vector a ∈ R r such that: We end the reformulation of the problem once and for all with the languages of endomorphisms, instead of matrices. That is to say: given d ∈ N0 and L ∈ R[X] * 2d+2 such that , we would like to obtain a finite dimensional euclidean vector space V , commuting self-adjoint endomorphisms M1, . . . , Mn of V and a ∈ V such that: (20) L(p) = p(M1, . . . , Mn)a, a Remark 3.11. Gelfand, Naimark and Segal gave a solution for the case we allow to the space V to be infinite dimensional and the linear form to be stricly positive in the sums of squares, that is to say, in the case we are given a linear form L ∈ R[X] * such that L(p 2 ) > 0 for all p = 0. The solution was given by defining the inner product: and defining the self adjoint operators Mi, for all i ∈ {1, . . . , n}, on the infinite dimensional vector space R[X], in the following way: we have the searched equality (20).
From now on we will assume we are given a linear form or what is the same due to 3.5 and 3.3 ML is positive semidefinite, unless L is defined explicitely in other way.

truncated GNS-construction
In this section we will explain how we can define the euclidean vector space and multiplications operators required in (20) from this positive semidefinite linear form L, in a similar way as in the Gelfand-Neimark-Segal construction 3.11.
First, we will get rid of the problem that, L(p 2 ) = 0 does not imply p = 0 for every p ∈ R[X] d+1 , that is to say (21) does not define an inner product if the linear form is positive semidefinite. By grouping together the polynomials with this property we will be able to define an inner product, on a quotient space. As a consequence, we will obtain an euclidean vector space. With respect to the multiplication operators, we will need to do the orthogonal projection on the class of polynomials with one degree less, in such a way that when we do the multiplication for the variable Xi we are not out of our ambient space. This construction was already done in [18].
Definition and Notation 4.1. We define and denote the truncated GNS kernel of L: The truncated GNS kernel of L is a vector subspace in R[X] d+1 . Moreover: Proof. The fact that UL is a vector subspace follows directly from the linearity of L. Let us prove the equality (22). For this let us denote For the other inclusion we will demonstrate first, due to L is positive semidefinite and linear, that the Cauchy-Schwarz inequality holds: Indeed, for all t ∈ R and p, q ∈ R[X] d+1 it holds: Therefore the polynomial r : In the case L(q 2 ) = 0, the discriminant of r has to be less or equal to cero i.e. 4L(pq) 2 − 4L(p 2 L(q 2 )) ≤ 0 and we get the searched inequality (23). In the case L(q 2 ) = 0, then L(pq) = 0 and trivially we get also the inequality (23). As a consequence if p ∈ A then L(p 2 ) = 0, and this implies due to (23), L(pq) = 0 for all q ∈ R[X] d , and therefore p ∈ UL.
Definition and Notation 4.3. We define and denote the GNS representation space of L, as the following quotient of vector spaces: For every p ∈ R[X] d+1 we will write p L to refer us to the class of p in VL. We define and denote the GNS inner product of L, in the following way: Proof. Let us prove first that . , . L is well defined. To do this take p1, q1, p2, q2 ∈ R[X] d+1 with p1 L = p2 L and q1 L = q2 L then: The last equality holds since p1 − p2, q2 − q1 ∈ UL. The bilinearity and symmetry is trivial.
It remains to prove that . , . L is even positive definite. Indeed, for all p ∈ R[X] d+1 with p L , p L L = 0 then L(p 2 ) = 0 and then p ∈ UL as we have shown in 22.
Definition and Notation 4.5. For i ∈ {1, . . . , n}, we define the i-th truncated GNS multiplication operator of L as the following map between euclidean vector subspaces of VL, and denote by ML,i: where ΠL is the orthogonal projection map of VL into the vector subspace { p L | p ∈ R[X] d } with respect to the inner product . , . L. We will call and denote the subvector vector space: Proposition 4.6. The i-th truncated GNS multiplication operator of L is a self-adjoint endomorphism of TL.
Proof. Let us demonstrate first that the i-th truncated GNS multiplication operator of L is well defined. ML,i is well defined if and only if ML,i( and then: Let us see now that ML,i are self-adjoint endomorphisms, for this let p, q ∈ R[X] d then: is the same as the original (3.11) modulo UL. The GNS representation space of L and the GNS truncation of L are the same R[X] U L , where: The truncated GNS multiplication operators of L commute, since R[X] U L is a commutative ring. One can easily prove that UL is an ideal. Indeed it is clear that if p, q ∈ UL then Lemma and Notation 4.8. Remember that L ′ := L R[X] 2d+1 . Let us denote as BL the transformation matrix of the following bilinear form with respect to the standard monomial basis: Then it holds rank M L ′ = rank BL and for every such L linear form we can define its respective modified moment matrix as: where CL is the submatrix of BL remaining from eliminating the columns corresponding to the matrix M L ′ . ML is well defined since it does not depend from the election of WL and it is positive semidefinite.
Proof. Notice that M L ′ is the transformation matrix of the linear map: with respect to the standard monomial basis and in the same way BL is the transformation matrix of the linear map: with respect to the standard monomial basis. Note that to prove rank In other words, we want to show that there exists g ∈ R[X] d such that : L(pq) = L(gq) for every q ∈ R[X] d . With more different words, our aim is to find g ∈ R[X] d such that: For this we define the following linear form: is a finite dimensional euclidean vector space is in particular a Hilbert space and then by the Fréchet-Riesz Representation Theorem there exists g ∈ Therefore L(pq) = Λp(q) = q, g = L(qg) for every q ∈ R[X] d . Then rank M L ′ = rank BL and therefore there exits WL (may not be unique) such that M L ′ WL = CL. Now, we claim that the modified moment matrix ML, does not depend from the choice of the matrix WL with the property M L ′ W = CL. Indeed, assume there are matrices W1, W2 such that Let i ∈ {1, . . . , r d+1 } then: pi −qi ∈ U L ′ This implies L ′ (pipj) = L ′ (qiqj ) and again due to 3.7 we get that: . . , r} Then we have got that: , and we can conclude that ML is well defined. Moreover since M L ′ is a is a positive semidefinite matrix, then there exists a matrix C ∈ R s d ×s d such that M L ′ = CC T due to 2.5. Then we have the following factorization: we get that ML = P P T , which due to 2.5, proves ML is positive semidefinite.

Gaussian quadrature rule
In this section we will prove the existence of a quadrature rule representation for the positive semidefinite linear form L on a set that cointains R[X] 2d+1 by providing that the truncated GNS multiplication operators commute. We will also demonstrate that this condition it is strictly more general than the very well known condition of being flat, condition that for its part ensure the existence of a quadrature rule representation for L on the whole space in contrast with the quadrature rule in a space that contains R[X] 2d+1 that we get in case the truncated GNS multiplication operators commute. Proof. Let us consider the following linear map between euclidean vector spaces: where remember we denoted L ′ := L |R[X] 2d . It is well defined since for every p L , q L ∈ TL such that p L = q L we can assume without loss of generality that p, q ∈ R[X] d , and therefore: σ0 is also a linear isometry, since for every p, q ∈ R[X] d we have: , σL(q L ) L ′ Then σL is immediately injective. On other side, σL is surjective since for every p L ′ ∈ V L ′ with p ∈ R[X] d , it holds that σL(p L ) = p L ′ . Thence σL is an isomorphism between vector spaces.
) ⊆ R ≥0 we will detone by σ ℓ the following isomorphism of euclidean vector spaces already defined in (29): The following Theorem and Lemma, are probably very well known and we will use them to prove Proposition (5.8). The proofs can be seen for example in [2] and [13].
Proof. In 4.7 we saw that UΛ is and ideal, let us prove that it is real radical ideal. Let g ∈ R[X] such that g 2 ∈ UΛ. In particular Λ(g 2 1) = 0 and this implies g ∈ UΛ.
. . , λN > 0, and a1, . . . , aN ∈ R n then: We have the following equalities: Let us review some known bounds on the number of nodes of quadrature rules for L on R[X] 2d+2 and on R[X] 2d+1 (see [4] and [18]).
Proposition 5.9. Then number of nodes N , of a quadrature rule for L satisfies: for ai, . . . , aN ∈ R n pairwise different points and λ1, . . . , λN > 0 weights and define Λ :  Proof. Assume that L has a quadrature rule on R[X] 2d+1 such that: for every p ∈ R[X] 2d+1 , where we can assume without loss of generality that the points a1, . . . , aN ∈ R n are pairwise different and λ1, . . . , λN > 0 with N < ∞ for N ∈ N. Let us set Λ := N i=1 λi eva i ∈ R[X] * . Then, the following linear map between euclidean vector spaces is an isometry: It is easy to see that is well defined since UL ⊆ UΛ. It holds also that σ1 is a linear isometry since, for all p, q ∈ R[X] d : Since, σ1 is a linear isometry is inmmediately injective, and then: And now we can apply the Proposition 5.8, to conclude the proof.
Definition 5.11. A quadrature rule for L on R[X] 2d+1 with minimal number of nodes, that is to say with dim(TL) nodes is called a Gaussian quadrature rule.
Lemma 5.12. Assume that the truncated multiplication operators commute. Then for all p ∈ R[X] d+1 we have the following equality: Proof. Let p = X α for α ∈ N n with |α| ≤ d + 1. We continue the proof by induction on |α|: • For |α| = 0, we have that X α = 1 then: • Let assume the statement is true for |α| = d. Let us show it is also true for |α| = d + 1. Let p = Xiq for some i ∈ {1, . . . , n} and q = X β with |β| = d, then ΠL(q L ) = q L since q L ∈ TL, and we have: Using this equalities (36), using that the orthogonal projection ΠL is selfadjoint, using that {v1, . . . , vN } is an orthonormal basis of TL consisting of common eigenvectors of the GNS truncated multiplication operators of L and also using the equation (35), with the same idea as we got the reformulation of the problem in (20) we have: Then by linearity it holds that L(p) = N i=1 λip(ai) for all p ∈ GL. It remains to prove that the nodes of the quadrature rule for L that we got, a1, . . . , aN ∈ R n are pairwise different, but this is true since N = dim TL is the minimal possible number of nodes for a quadrature rule on R[X] 2d+1 as we proved in 5.10.
Remark 5.14. Since R[X] 2d+1 ⊆ GL, in the conditions of Theorem 5.13 we got in particular a Gaussian quadrature rule for the linear form L. Proof. L has one truncated GNS multiplication operator, therefore the hypothesis of Theorem 5.13 holds and there is a quadrature rule on GL for L.
Proof. Note that the map (37) it is well defined since R[X] d ∩ UL = U L ′ . And one can see inmediately that: Let us show (v) ⇐⇒ (vi): (L(X α+β )) |α|,|β|≤d+1 is the transformation matrix (or the associated matrix) of the bilinear form: with respect to the the standard monomial basis, and therefore it is also the transformation matrix (or the associated matrix) of the linear map: , p → (q → L(pq)) with respect to the corresponding dual basis of the standard monomial basis. The kernel of this linear map (38) is UL, in consequence: rank((L(X α+β )) |α|,|β|≤d+1 ) = dim R[X] d+1 − UL = dim VL reasoning in the same way: Example 5.19. The truncated GNS multiplication operators of the following linear form: commute but L is not flat. Indeed, if we do the truncated GNS-construction we have: Let us compute the truncated GNS multiplication operators of L. First note that: L ′ Therefore by Remark 5.3 the truncated GNS space of L is: With the Gram-Schmidt orthonormalization process we get the following orthonormal basis with respect to the GNS product of L: The matrices of the GNS-multiplication operators with respect to this orthonormal basis are: It is easy to check that the truncated GNS multiplication operators of L commute, that is ML,X 1 • ML,X 2 − ML,X 2 • ML,X 1 = 0. Now since ML,X 1 and ML,X 2 commute we can do the simultaneous diagonalization on both of them, in order to find an orthonormal basis of the GNS truncation of L consisting of common eigenvectors of ML,X 1 and ML,X 2 . To do this we follow the same idea as in [15, Algorithm 4.1, Step 1] and compute for a matrix: A = r1A1 + r2A2 where r 2 1 + r 2 2 = 1 a matrix P orthogonal such that P T AP is a diagonal matrix. In this case, we get for: Looking over the proof of 5.13 we can obtain the weights λ1, λ2, λ3 ∈ R>0 through the following operations: 4 ) 2 . Therefore we get the following decomposition: Example 5.20. Let us do the truncated GNS construction for the optimal solution that we got on the polynomial optimization problem described in 2.9, that is: Setting α := M(1, 2) and β := M (1, 3), the truncated GNS kernel of M is: the truncated GNS representation space is: we have that: We need to add the polynomial 1 to U M ∩ R[X1, X2]1 to get basis of R[X1, X2]1 therefore we have that: Thence by Remark 5.3 we get that: M } is also an orthonormal basis with respect to the GNS product of L we can directly compute the matrices of truncated GNS multiplication operators of M: Therefore: Then M admits a Gaussian quadrature rule. However it does not admit a quadrature rule. Indeed, suppose M admits a quadrature rule with N nodes, then according to 5.9: This matrix does not have a quadrature rule representation with the minimal number of nodes, as has been proved in [6,Example 1.13], however it admits a Gaussian quadrature rule. Indeed, we can compute with the truncated GNS construction that: The following corollary is a very well known result of Curto and Fialkow (see [4, corollary 5.14] ) in terms of quadrature rules instead of nonnegative measures. In [1] there is a proof about the correspondence between quadrature rules and nonnegative measures. This result of Curto and Fialkow uses tools of functional analysis like the the Spectral theorem and the Riesz representation theorem. Monique Laurent gave also a more elementary proof (see [12, corollary 1.4] ) that uses a corollary of the Hilbert Nullstellensatz and elementary linear algebra. The main contribution of this proof is that it does not need to find a flat extension of the linear form since the truncated GNS multiplication operators commute and we can apply directly the Theorem 3.10, and despite of it uses the Hilbert Nullstellensatz in the proof of Theorem 5.4, we do not need to apply the Hilbert Nullstellensatz to show that the nodes are in R n , since the nodes are real because its coordinates are the eigenvalues of a real symmetric matrix. L is flat = dim(VL) = rank(ML) many nodes. Since L is flat R[X] d+1 = R[X] d + UL and therefore one can easily see that GL = R[X] 2d+2 . As a conclusion we get a quadrature rule for L with rank(ML) many nodes.

Main Theorem
In this section we will demonstrate that the commutativity of the truncated GNS multiplication operators of L is equivalent to the matrix W T L ALWL being Hankel.
Proof. 1⇒2. By the theorem 5.13 there exist a1, . . . , aN ∈ R n pairwise different nodes and λ1 > 0, . . . , λN > 0 weights, where N := dim(TL) such that: L(p) = N i=1 λip(ai) for all p ∈ GL, where GL was defined in (34). Let us define,L : Since UL ∩ R[X] d = UL ∩ R[X] d and using again proposition 5.1, we have the following: therefore, in the following we will prove dim( For this, let us consider the following linear map, between euclidean vector spaces: Notice that the canonical map (40) is well defined since UL = UΛ ∩ R[X] d and therefore it is injective. Then ). But this is true, since: 2⇒1. SinceL is flat, then by 5.18 we know that the truncated GNS multiplication operators ofL pairwise commute. Then by applying again 5.13 there exists a1, . . . , aN ∈ R n , pairwise different nodes, and λ1 > 0, . . . , λN > 0 weights, with N = dim(TL) such that if we set Λ := N i=1 λi eva i ∈ R[X] * , we get Λ(p) =L(p) = L(p) for all p ∈ R[X] 2d+1 , and UL ⊆ UL ⊆ UΛ. Indeed notice that UL ⊆ UL since for p ∈ UL, L(pq) =L(pq) = 0 for all q ∈ R[X] d , and sinceL is flat this implies p ∈ UL. Obviously MΛ,i pairwise commute for all i ∈ {1, . . . , n}, since they are the original GNS operators modulo UΛ defined in 4.7. In order to prove that ML,i pairwise commute for all i ∈ {1, . . . , n}, let us first consider the linear isometry σ1 (32) of the proposition 5.10. Since σ1 is a linear isometry is inmmediately injective, and then dim(TL) ≤ dim( R[X] U Λ ). Therefore we have the following inequalities: . Then σ1, in this case, is in particular surjective and in conclusion is an isomorphism. With this result we be able to prove that the following diagram is commutative, for all i ∈ {1, . . . , n}: To show this let p, q ∈ R[X] d , then we have: Finally we can conclude that the truncated GNS multiplication operators of L pairwise commute, using the commutativity of the GNS multiplication operators of Λ. Indeed: (2) ⇒ (1) Suppose ML is a Generalized Hankel matrix, and denoteL := L M L ∈ R[X] * 2d+2 . Since ML is the moment matrix of the linear formL ∈ R[X] * 2d+2 thenL is flat and by Theorem 5.18 the truncated GNS multiplication operators ofL commute. Now, to prove the truncated GNS operators commute let us define σ := σ −1 L • σL an isomorphism of euclidean vector spaces. We will prove that the following diagram is commutative: The diagram is commutative if and only if ML,i = σ • ML ,i • σ −1 . To prove this equality let us take p, q ∈ R[X] d . Then: Finally we can conclude the truncated GNS multiplication operators of L commute using the commutativity of the truncated GNS multiplication operators ofL in the identical way we already did in the previous Theorem in (42). Proof. If L is flat then by Theorem 5.18 the truncated GNS multiplication operators of L commute, and therefore by Theorem 6.2 we get that this is equivalent to ML being a generalized Hankel matrix.
The following result uses the Theorem 6.1 together with ideas from [18] and give us a generalization of a classical Theorem from Mysovskikh [16], Dunkl and Xu [7, Theorem 3.8.7] and Putinar [18, pages 189-190]. They proved the equivalence between the existence of a minimal Gaussian quadrature rule with the commutativity of the truncated GNS multiplication operators for a positive definite linear form on R[X]. The generalization here comes from the fact that the result holds also if the linear form is defined on R[X] 2d+2 for d ∈ N0 and it is positive semidefinite i.e. we do not assume UL = {0}. We also provide a third equivalent condition in the result which is W T L ALWL is a generalized Hankel matrix, a fact which seems no to have been noticed so far.
Corollary 6.4. The following assertions are equivalent: (1) The linear form L admits a Gaussian quadrature rule.
(2) The truncated GNS multiplication operators of L commute.
(1) ⇒ (2). Assume that L admits a Gaussian quadrature rule, that is to say where N := dim(TL), the points a1, . . . , aN are pairwise different and λ1 > 0, . . . , λN > 0. Let us set Λ := N i=1 λi eva i ∈ R[X] * . Using 5.8 we have the following: Let us consider again the linear isometry σ1, already defined in (32): As we proved in 5.10 is well defined and is an isometry, what implies σ1 is injective, and considering that in this case it holds (43), σ1 is moreover an isomorphism. We continue as in the implication 2⇒1 of the proof of Theorem 6.1, showing that the diagram (41) is commutative, what together with the fact that MΛ,i always commute for all i ∈ {1, . . . , n} implies that the truncated GNS multiplication operators of L commute.
(2) ⇒ (1). This part was alredy proved in the Remark 5.14 as a consequece of the Theorem 5.13.
The following result of Möller will give us a better lower bound in the number of nodes of a quadrature rule on R[X] 2d+1 than the very well-known bound given in Proposition 5.10. This bound, was already found for positive linear forms by Möller in 1975 and by Putinar in 1997 ([17], [18]). This result will show that the bound it is also true for positive semidefinite linear forms and it uses the same ideas as in [18]. We include the proof for the convenience of the reader. This bound will help us in polynomial optimization problems in which we know the number of global minimizers in advance, to discard optimality if this bound is bigger than the number of global minimizers, see Example 6.7 below.
Theorem 6.5. The number of nodes N of a Gaussian quadrature rule for L satisfies: Proof. Assume L has a quadrature rule with N nodes, that is to say, there exist λ1 > 0, . . . , λN > 0 weights and a1, . . . , aN in R n pairwise different nodes, such that L(p) = N i=1 λip(ai) for all p ∈ R[X] 2d+1 . Let us set Λ := N i=1 λi eva i ∈ R[X] * . By using the proposition 5.8 we have that:  Taking σ1 the isometry defined in (32), we get: Hence, we get: Therefore βL := {β1 L , . . . , βr L } generate a basis of TL. It remains to show that βL is orthonormal. To see that βL is orthonormal we use again the fact that σ1 is an isometry and that σ1(TL) = A. Indeed for 1 ≤ i, j ≤ r: Therefore we have shown that: Ci where we use the notation: Remark 6.6. Note that we can use the previous Theorem 6.5 to show in a different way (1) ⇒ (2) in the Corollary 6.4. Indeed, let us suppose that L has a Gaussian quadrature rule that is to say with N = dim TL nodes. Using the inequality (44) we get that rank[ML,j , M L,k ] = 0 for j, k ∈ {1, . . . , n} therefore the truncated GNS multiplication operators of L commute.
Example 6.7. Let us consider the following polynomial optimization problem taken from [11]: minimize f (x) = x 2 1 x 2 2 (x 2 + y 2 − 1) subject to x1, x2 ∈ R By Calculus we know that the minimizers of f occur in the real points common to the partial derivatives of f (the real gradient variety) and we can easily check that this derivatives intersect in 4 real points: ∈ R 2 . Therefore we know in advance that (P ) has at most 4 minimizers. On other side, an optimal solution of the moment relaxation of order 8 (P8), that is M := M8,1(y) read as: and the rank of the commutator of the truncated GNS multiplication operators is: Therefore the polynomial f would have at least 12 global minimizers and this is a contradiction with the fact that f has at most 4 global minimizers. Notice that then M does not have a quadrature rule on R[X]7, and in particular it does not have a quadrature rule.

Algorithm for extracting minimizers in polynomial optimization problems
As an application of all the previous results in this section we find a stopping criterion for the moment relaxation hierarchy, in other words, we find a condition on the optimal solution of (P d ) L, such that L(f ) = P * d = P * . In this this case we also find potencial global minimizers. In [9] Henrion and Lasserre the stopping criterion was L to be flat and in this algorithm the stopping criterium is W T L M L ′ WL being Hankel, and as we have already seen in 6.3 this condition is more general. It important to point out that despite this condition is more general than being flat we can not ensure optimality until we check that the candidate to minimizers are inside to the basic closed semialgebraic set S, condition that it is always possible to ensure if the set S is a set described with linear polynomials, if the set S is R n or we have flat extension of some degree on the optimal solution, that is to say rank M d (y) = rank Ms(y) for sufficient small s, see [13,Theorem 6.18] or [5, Theorem 1.6] for a proof. At the end of this paper we summarize all this results in an algorithm with examples and also we illustrate polynomial optimization problems where this new stopping criterion allow us to conclude optimality even in case where the optimal solution is not flat as we already advance in 2.9 and in 2.11. Theorem 7.1. Let f, p1, . . . , pm ∈ R[X] 2d and L be an optimal solution of (P 2d ). Suppose that W T L ALWL is a generalized Hankel matrix. Then L has a quadrature rule on GL. Moreover, suppose the nodes of the quadrature rule lie on S and f ∈ R[X] 2d−1 , then L(f ) = P * and the nodes are global minimizers.
The following Lemma was already proved in [12, lemma 2.7]. We will use it to prove the Corollary 7.3.
Remark 7.4. The above results: Theorem 7.1 and Corollary 7.3 can be written in terms of an optimal solution of a Moment relaxation of even degree by taking as an optimal solution its restriction to one degree less.

Software and examples
To find an optimal solution of the Moment relaxation and for the big calculations we have used the following softwares: We initialize k = 4 and compute an optimal solution of the moment relaxation (P4). In this case reads as: We can calculate that:   M flat, and continue with the algorithm and we could obtain already the minimizers, but to be more precise let us increase to k = 6 and we get the following optimal solution in the moment relaxation (P6): where:   We calculate that: We initialize k = 4. An optimal solution of (P4) reads as:  Again we follow the same idea as in [15, algorithm 4.1 Step 1] to apply simultaneous diagonalization to the matrices A1 and A2. For this we find the orthogonal matrix P that diagonalize a matrix of the following form:  (2,2), and (2, 3) lie on S, as we already know since it holds the condition of the Theorem 1.6 in [5], and therefore they are global minimizers of (P ), and the minimum is P * = P * 4 = −2.