1 Notation

Throughout this paper, we suppose \(n\in {\mathbb {N}}=\{1,2,\ldots \}\) and abbreviate \((X_{1},\ldots ,X_{n})\) by \({\underline{X}}\). We let \({\mathbb {R}}[{\underline{X}}]\) denote the ring of real polynomials in n indeterminates. We denote \({\mathbb {N}}_{0}:={\mathbb {N}}\cup \{0\}\). For \(\alpha \in {\mathbb {N}}^{n}_{0}\), we use the standard notation :

$$\begin{aligned} |\alpha |:=\alpha _{1}+ \cdots + \alpha _{n} and {\underline{X}}^{\alpha }:=X_{1}^{\alpha _{1}}\cdots X_{n}^{\alpha _{n}} \end{aligned}$$

For a polynomial \(p\in {\mathbb {R}}[{\underline{X}}]\) we denote \(p=\sum _{\alpha }p_{\alpha }{\underline{X}}^{\alpha }\) (\(a_{\alpha }\in {\mathbb {R}}\)). For \(d\in {\mathbb {N}}_{0}\), by the notation \({\mathbb {R}}[{\underline{X}}]_{d}:=\{\sum _{|\alpha |\le d}a_{\alpha }{\underline{X}}^{\alpha }\text { } |\text { } a_{\alpha }\in {\mathbb {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\in {\mathbb {N}}_{0}\) are called d-forms. They form a finite dimensional vector space that we will denote by:

$$\begin{aligned} {\mathbb {R}}[{\underline{X}}]_{=d}:=\left\{ \sum _{|\alpha |=d}a_{\alpha } {\underline{X}}^{\alpha }\text { }|\text { }a_{\alpha }\in {\mathbb {R}}\right\} \end{aligned}$$

so that

$$\begin{aligned} {\mathbb {R}}[{\underline{x}}]_{d}={\mathbb {R}}[{\underline{X}}]_{=0}\oplus \cdots \oplus {\mathbb {R}}[{\underline{X}}]_{=d}. \end{aligned}$$

We will denote by \(s_{k}:=\dim {\mathbb {R}}[{\underline{X}}]_{k}\) and by \(r_{k}:=\dim {\mathbb {R}}[{\underline{X}}]_{=k}\). For \(d\in {\mathbb {N}}_{0}\) we denote \({\mathbb {R}}[{\underline{X}}]^{*}_{d}\) the dual space of \({\mathbb {R}}[{\underline{X}}]_{d}\) i.e. the set of linear forms from \({\mathbb {R}}[{\underline{X}}]_{d}\) to \({\mathbb {R}}\) and for \(\ell \in {\mathbb {R}}[{\underline{X}}]_{2d}^{*}\) we denote by \(\ell ':=\ell _{|{\mathbb {R}}[{\underline{X}}]_{2d-2}}\) the restriction of the linear form \(\ell \) to the space \({\mathbb {R}}[{\underline{X}}]_{2d-2}\). For \(d\in {\mathbb {N}}_{0}\) and \(a\in {\mathbb {R}}^{n}\) we denote \({{\,\mathrm{ev}\,}}_{a}\in {\mathbb {R}}[{\underline{X}}]^{*}_{d}\) the linear form such that for all \(p\in {\mathbb {R}}[{\underline{X}}]_{d}\), \({{\,\mathrm{ev}\,}}_{a}(p)=p(a)\). We will denote by \({{\,\mathrm{Sym}\,}}{\mathbb {R}}^{t\times t}\), the space of symmetric matrices of dimension t.

2 Introduction

Let polynomials \(f,p_{1},\ldots ,p_{m}\in {\mathbb {R}}[{\underline{X}}]\) with \(m\in {\mathbb {N}}_{0}\) be given. A polynomial optimization problem involves finding the infimum of f over the so called basic closed semialgebraic set S, defined by:

$$\begin{aligned} S:=\{x\in {\mathbb {R}}^{n} |\text { } p_{1}(x)\ge 0,\ldots ,p_{m}(x)\ge 0 \} \end{aligned}$$
(1)

and also, if it is possible, a polynomial optimization problem involves extracting optimal points or minimizers i.e. elements in the set:

$$\begin{aligned} S^{*}:=\{x^{*}\in S | \forall x\in S: f(x^{*})\le f(x)\} \end{aligned}$$

So from now on we will denote by (P), the following polynomial optimization problem:

$$\begin{aligned} \begin{aligned} (P) \text { minimize } f(x) \text { subject to } x\in S \end{aligned} \end{aligned}$$
(2)

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:

$$\begin{aligned} \begin{aligned}&P^{*}:=&\inf \{\text { }f(x)\text { } |\text { } x\in S \}\in \{-\infty \}\cup {\mathbb {R}}\cup \{\infty \} \end{aligned} \end{aligned}$$
(3)

Note that \(P^{*}=+\infty \) if \(S=\emptyset \) and \(P^{*}=-\infty \) if and only if f is unbounded from below on S, for example if \(S={\mathbb {R}}^{n}\) and f is of odd degree.

For \(d\in {\mathbb {N}}_{0}\) let us define the matrix:

$$\begin{aligned} V_{d}:= (&1,X_{1}, X_{2}, \ldots , X_{n},X_{1}^2,X_{1}X_{2},\ldots ,X_{1}X_{n},\nonumber \\&X_{2}^2,X_{2}X_{3},\ldots ,X_{n}^2,\ldots ,\ldots ,X_{n}^d)^{T} \end{aligned}$$
(4)

consisting of all monomials up to degree d in n variables in the graded reverse lexicographical order. Then

$$\begin{aligned} V_{d}V_{d}^{T}=\left( \begin{array}{ccccc} 1 &{}\quad X_{1} &{}\quad X_{2} &{}\quad \cdots &{}\quad X_{n}^{d} \\ X_{1} &{}\quad X_{1}^2 &{}\quad X_{1}X_{2} &{}\quad \cdots &{}\quad X_{1}X_{n}^{d} \\ X_{2} &{}\quad X_{1}X_{2} &{}\quad X_{2}^2 &{}\quad \cdots &{}\quad X_{2}X_{n}^{d} \\ \vdots &{}\quad \vdots &{}\quad \vdots &{}\quad \ddots &{}\quad \vdots \\ X_{n}^{d} &{}\quad X_{1}X_{n}^{d} &{}\quad X_{2}X_{n}^{d} &{}\quad \cdots &{}\quad X_{n}^{2d}\\ \end{array} \right) \in {\mathbb {R}}[{\underline{X}}]_{2d}^{s_{d}\times s_{d}} \end{aligned}$$

Let us substitute for every monomial \({\underline{X}}^{\alpha }\in {\mathbb {R}}[{\underline{X}}]_{2d}\) a new variable \(Y_{\alpha }\). This matrix has the following form:

$$\begin{aligned} M_{d}:=\left( \begin{array}{ccccc} Y_{(0,\ldots ,0)} &{}\quad Y_{(1,\ldots ,0)} &{}\quad Y_{(0,1,\ldots ,0)} &{}\quad \cdots &{}\quad Y_{(0,\ldots ,1)} \\ Y_{(1,\ldots ,0)} &{}\quad Y_{(2,\ldots ,0)} &{}\quad Y_{(1,1,\ldots ,0)} &{}\quad \cdots &{}\quad Y_{(1,\ldots ,d)} \\ Y_{(0,1,\ldots ,0)} &{}\quad Y_{(1,1,\ldots ,0)} &{}\quad Y_{(0,2,\ldots ,0)} &{}\quad \cdots &{}\quad Y_{(0,1,\ldots ,d)} \\ \vdots &{}\quad \vdots &{}\quad \vdots &{}\quad \ddots &{}\quad \vdots \\ Y_{(0,\ldots ,d)} &{}\quad Y_{(1,\ldots ,d)} &{}\quad Y_{(0,1,\ldots ,d)} &{}\quad \cdots &{}\quad Y_{(0,\ldots ,2d)} \\ \end{array} \right) \in {\mathbb {R}}[{\underline{Y}}]_{1}^{s_{d}\times s_{d}} \end{aligned}$$
(5)

Remark 2.1

Note that changing the order of the entries of \(V_{d}\) would have resulted in a new matrix \(M_{d}\) which is unitary equivalent to the one defined here.

Definition 2.2

Every matrix \(M\in {\mathbb {R}}^{s_{d}\times s_{d}}\) with the same shape than the matrix in Eq. (5) is called a generalized Hankel matrix of order d. We denote the linear space of generalized Hankel matrix of order d by:

$$\begin{aligned} H_{d}:=\{\text { }M_{d}(y)\text { }|\text { }y\in {\mathbb {R}}^{s_{2d}} \} \end{aligned}$$

For \(p\in {\mathbb {R}}[{\underline{X}}]_{k}-\{0\}\) denote \(d_{p}:=\lfloor \frac{k-\deg {p}}{2}\rfloor \) and consider the following symmetric matrix:

$$\begin{aligned} \begin{aligned} pV_{d_{p}}V_{d_{p}}^{T}= \left( \begin{array}{ccccc} p &{}\quad pX_{1} &{}\quad pX_{2} &{}\quad \cdots &{}\quad pX_{n}^{d_{p}}\\ pX_{1} &{}\quad pX_{1}^2 &{}\quad pX_{1}X_{2} &{}\quad \cdots &{}\quad pX_{1}X_{n}^{d_{p}}\\ pX_{2} &{}\quad pX_{2}X_{1} &{}\quad pX_{2}^{2} &{}\quad \cdots &{}\quad pX_{2}X_{n}^{d_{p}}\\ \vdots &{}\quad \vdots &{}\quad \vdots &{}\quad \ddots &{}\quad \vdots \\ pX_{n}^{d_{p}} &{}\quad pX_{1}X_{n}^{d_{p}} &{}\quad pX_{n}^{d_{p}}X_{2} &{}\quad \cdots &{}\quad pX_{n}^{2d_{p}} \end{array}\right) \in {\mathbb {R}}[{\underline{X}}]_{k}^{s_{d_{p}}\times s_{d_{p}}} \end{aligned} \end{aligned}$$
(6)

Definition 2.3

For \(p\in {\mathbb {R}}[{\underline{X}}]_{k}-\{0\}\) the localizing matrix of p of degree d is the matrix resulting from substituting every monomial in n variables of degree at most k, for a new variable \(Y_{\alpha }\). We denote this matrix by \(M_{k,p}\in {\mathbb {R}}[{\underline{Y}}]_{1}^{s_{d_{p}}\times s_{d_{p}}}\).

Definition 2.4

Let \(A\in {\mathbb {R}}^{t\times t}\) symmetric, the notation \(A\succeq 0\) means that A is positive semidefinite, i.e. \(a^{T}Aa\ge 0\) for all \(a\in {\mathbb {R}}^{t}\).

Reminder 2.5

Let \(A\in {\mathbb {R}}^{t\times t}\) symmetric. The following are equivalent:

  1. (1)

    \(A\succeq 0\).

  2. (2)

    All eigenvalues of A are nonnegative.

  3. (3)

    There exists \(B\in {\mathbb {R}}^{t\times t}\) such that \(A=B^{T}B\).

Definition 2.6

Let (P) be a polynomial optimization problem as in Eq. (2) and let \(k\in \) \({\mathbb {N}}_{0}\cup \{\infty \}\) such that \(f,p_{1},\ldots , p_{m}\in {\mathbb {R}}[{\underline{X}}]_{k}\). The Moment relaxation (or Lasserre relaxation) of (P) of degree k is the following semidefinite optimization problem:

$$\begin{aligned} (P_{k}) : \text { } {\left\{ \begin{array}{ll} \text { minimize }&{}\sum _{|\alpha |\le k} f_{\alpha }y_{\alpha } \\ \text {subject to: }&{} y_{\left( 0,\ldots ,0\right) }=1\\ \text { } &{}M_{k,1}(y)\succeq 0\text { and}\\ \text { } &{}M_{k,p_{i}}(y)\succeq 0\text { for all }i\in \{1,\ldots ,m\}\\ \end{array}\right. } \end{aligned}$$

the optimal value of \((P_{k})\) that is to say, the infimum over all

$$\begin{aligned} y=(y_{\left( 0,\ldots ,0 \right) },\ldots ,y_{\left( 0,\ldots ,k \right) })\in {\mathbb {R}}^{s_{k}} \end{aligned}$$

that ranges over all feasible solutions of \((P_{k})\) is denoted by \(P^{*}_{k}\in \{-\infty \}\cup {\mathbb {R}}\cup \{\infty \} \).

Given a polynomial optimization problem (P) as in Eq. (2) and \(M:=M_{d}(y)\in {\mathbb {R}}^{s_{d}\times s_{d}}\) an optimal solution of \((P_{2d})\), it is always possible to find a matrix \(W_{M}\in {\mathbb {R}}^{s_d\times r_{d}}\) such that M can be decomposed in a block matrix of the following form (see 4.7 below for a proof):

This useful result can be also found in [28] and in [6, Lemma 2.3]. Define the following matrix:

In this paper we prove that \({\widetilde{M}}\) is well-defined, that is to say it does not depend on the choice of \(W_{M}\), and assuming that \(W^{T}_{M}A_{M}W_{M}\) is a generalized Hankel matrix we will use a new method to find a decomposition:

$$\begin{aligned} {\widetilde{M}}=\sum _{i=1}^{r}\lambda _{i}V_{d}(a_{i})V_{d}(a_{i})^{T} \end{aligned}$$
(7)

where \(r:={{\,\mathrm{rank}\,}}A_{M}\) ,\(a_{1},\ldots ,a_{r}\in {\mathbb {R}}^{n}\) and \(\lambda _{1}>0,\ldots ,\lambda _{r}>0\). In this paper we will show that for some polynomial optimization problems if we have that \(W_{M}^{T}A_{M}W_{M}\) is generalized Hankel and the nodes are contained in S, even if M is not flat i.e. \(W_{M}^{T}A_{M}W_{M}\ne C_{M}\) (see the definition in 5.18), we can still claim optimality, that is to say that \(a_{1},\ldots ,a_{r}\) 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 Eq. (7), see Example 6.6. Let us advance two results concerning optimality.

Theorem 2.7

Let (P) be a polynomial optimization problem as in Eq. (2) and suppose that \(M_{d}(y)\in {\mathbb {R}}^{s_{d}\times s_{d}}\) is a feasible solution of \((P_{2d})\) and \(\widetilde{M_{d}(y)}\) is a generalized Hankel matrix. Then there are \(a_{1},\ldots ,a_{r}\in {\mathbb {R}}^{n}\) points and \(\lambda _{1}>0,\ldots ,\lambda _{r}>0\) weights such that:

$$\begin{aligned} \widetilde{M_{d}(y)}=\sum _{i=1}^{r}\lambda _{i}V_{d}(a_{i})V_{d}(a_{i})^{T} \end{aligned}$$
(8)

where \(r={{\,\mathrm{rank}\,}}A_{M}\). Moreover if \(\{a_{1},\ldots ,a_{r}\}\subseteq S\) and \(f\in {\mathbb {R}}[{\underline{X}}]_{2d-1}\) then \(a_{1},\ldots ,a_{r}\) are global minimizers of (P) and \(P^{*}=P^{*}_{2d}=f(a_{i})\) for all \(i\in \{1,\ldots ,r \}\).

Proof

The correspondence given in Corollary 3.5 together with the Theorem 7.1 will give us the proof. \(\square \)

Remark 2.8

Let (P) be a polynomial optimization problem without constraints. Suppose \(M_{d}(y)\in {\mathbb {R}}^{s_{d}\times s_{d}}\) is a feasible solution of \((P_{2d})\) with \(\widetilde{M_{d}(y)}\) a generalized Hankel matrix and that \(f\in {\mathbb {R}}[{\underline{X}}]_{2d-1}\). Applying Theorem 2.7 we get the decomposition (8), and since we can ensure that \(a_{1},\ldots ,a_{r}\subseteq S ={\mathbb {R}}^{n}\) then they are global minimizers of (P) and \(P^{*}=P^{*}_{2d}=f(a_{i})\) for all \(i\in \{1,\ldots ,r \}\).

Example 2.9

Let us consider the following polynomial optimization problem taken from [14, Problem 4.7]:

$$\begin{aligned} \begin{aligned}&{\text {minimize}}&\quad&\quad f({\underline{x}})=-12x_{1}-7x_{2}+x_{2}^2 \\&\quad \text {subject to}&\quad&\quad -2x_{1}^4+2-x_{2}=0\\&\quad&\quad&\quad 0\le x_{1}\le 2\\&\quad&\quad&\quad 0\le x_{2}\le 3\\ \end{aligned} \end{aligned}$$

We get the optimal value \(P^{*}_{4}=-16.7389\) associated to the following optimal solution:

(9)

and the modified moment matrix of \(M_{2}(y)\) is the following:

$$\begin{aligned} \widetilde{M_{2}(y)} = \left( \begin{array}{rrr|rrr} 1.0000 &{}\quad 0.7175 &{}\quad 1.4698 &{}\quad 0.5149 &{}\quad 1.0547 &{}\quad 2.1604 \\ 0.7175 &{}\quad 0.5149 &{}\quad 1.0547 &{}\quad 0.3694 &{}\quad 0.7568 &{}\quad 1.5502 \\ 1.4698 &{}\quad 1.0547 &{}\quad 2.1604 &{}\quad 0.7568 &{}\quad 1.5502 &{}\quad 3.1755 \\ 0.5149 &{}\quad 0.3694 &{}\quad 0.7568 &{}\quad 0.2651 &{}\quad 0.5430 &{}\quad 1.1123 \\ 1.0547 &{}\quad 0.7568 &{}\quad 1.5502 &{}\quad 0.5430 &{}\quad 1.1123 &{}\quad 2.2785 \\ 2.1604 &{}\quad 1.5502 &{}\quad 3.1755 &{}\quad 1.1123 &{}\quad 2.2785 &{}\quad \mathbf{4}.6675 \end{array} \right) \end{aligned}$$
(10)

We get that \(\widetilde{M_{2}(y)}\) is a generalized Hankel matrix and \(f\in {\mathbb {R}}[X_{1},X_{2}]_{3}\) to conclude optimality, according with Theorem 2.7, it remains to calculate the factorization as in Eq. (7) and check if the points are in S. We will see in Sect. 5 in Example 5.21 how to compute this factorization, in this case, it is easy to see that:

$$\begin{aligned} \widetilde{M_{2}(y)}=V_{2}(\alpha ,\beta )V_{2}(\alpha ,\beta )^{T} \end{aligned}$$

where \(\alpha :=0.7175\) and \(\beta :=1.4698\). One can verify that \((\alpha ,\beta )\in S\) and therefore we can conclude that \(P^{*}_{4}=P^{*}=-16.7389\) is the optimal value and \((\alpha ,\beta )\) is a minimizer.

Theorem 2.10

Let (P) be a polynomial optimization problem given as in Eq. (2) and suppose that the \(p_{i}\)’s from Eq. (1) are all of degree at most 1 (so that S is a polyhedron). Suppose that \(M_{d}(y)\in {\mathbb {R}}^{s_{d}\times s_{d}}\) is a feasible solution of \((P_{2d})\) and that \(\widetilde{M_{d}(y)}\) is a generalized Hankel matrix. Then there are \(a_{1},\ldots ,a_{r}\in S\) and \(\lambda _{1}>0,\ldots ,\lambda _{r}>0\) weights such that:

$$\begin{aligned} \widetilde{M_{d}(y)}=\sum _{i=1}^{r}\lambda _{i}V_{d}(a_{i})V_{d}(a_{i})^{T} \end{aligned}$$

Moreover if \(f\in {\mathbb {R}}[{\underline{X}}]_{2d-1}\) then \(a_{1},\ldots ,a_{r}\) are global minimizers of (P) and \(P^{*}=P^{*}_{2d}=f(a_{i})\) for all \(i=1,\ldots ,r\).

Proof

The correspondence given in Corollary 3.5 together with the Theorem 7.3 will give us the result. \(\square \)

Example 2.11

Let us consider the following polynomial optimization problem, taken from [13, page 18], whose objective function is the Motzkin polynomial [19, Prop.1.2.2]:

$$\begin{aligned} \begin{aligned}&{\text {minimize}}&\quad&\quad f(x)=x_{1}^{4}x_{2}^{2}+x_{1}^2x_{2}^{4}-3x_{1}^2x_{2}^2+1 \\&\quad \text {subject to}&\quad&\quad -2\le x_{1}\le 2\\&\quad&\quad&\quad -2\le x_{2}\le 2\\ \end{aligned} \end{aligned}$$

We get the optimal value \(P^{*}_{8}=6.2244\cdot 10^{-9}\) from the following optimal solution of \((P_{8})\):

(11)

where:

(12)
(13)

In this case:

has a generalized Hankel matrix structure, what implies that \({\widetilde{M}}\) is generalized Hankel and since we are minimizing over a polyhedron defined by linear polynomials by Theorem 2.10\(P^{*}_{8}=P^{*}\).

The aim of this paper is to make use of the truncated Gelfand–Naimark–Segal (GNS) construction to prove classical results of the existing theory in polynomial optimization. The use of the truncated GNS construction will allow us to prove again this results using basic tools of linear algebra and generalize some of them. The paper is distributed as follows. In Sect. 3 we outline Lasserre’s approach [16] to solve polynomial optimization problems with the language of linear forms. The novelty in Sect. 3 is that we reformulate the problem of finding a decomposition of the modified moment matrix as in Eq. (8) or in other words the problem of finding a quadrature rule representation for a positive semidefinite linear form (\(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d})\subseteq {\mathbb {R}}_{\ge 0}\)) to the problem of finding a commutative truncated version of the GNS construction. The truncated GNS construction for this positive semidefinite linear form will be defined in Sect. 4 and at the end of this section we give a new proof of a very useful result of Smul’jan [28] using the inner product defined in the truncated GNS construction. In Sect. 5 we give a general new definition of Gaussian quadrature rule for a positive semidefinite linear form and we get a result concerning commutativity of the truncated GNS multiplication operators associated to this linear form and existence of Gaussian quadrature rule. More precisely, providing these operators commute we are able to get the factorization (7) or in other words we find a Gaussian quadrature rule representation for this positive semidefinite linear form, that is to say a quadrature rule for L on \({\mathbb {R}}[{\underline{X}}]_{2d-1}\) which number of nodes is the rank of \(M_{L_{|{\mathbb {R}}[{\underline{X}}]_{2d-2}}}\), see the Notation 3.5. Actually we prove that if the operators commute we can find a quadrature rule representation of the linear form in the set \(G_{L}\supseteq {\mathbb {R}}[{\underline{X}}]_{2d-1}\), defined in Eq. (32), another fact that it seems not have been notice so far. In this section we also relate the commutativity of the truncated GNS operators with the concept of flat extension. More precisely we prove that the commutativity of the truncated GNS operators is a more general fact than the very well know flatness condition, equivalent to the following equality \(C_{M}=W_{M}^{T}A_{M}W_{M}\). We also prove that the converse does not always hold. This fact will have an impact in finding optimality in polynomial optimization in lower degree of relaxation, since in many cases we do not need to have a flat optimal solution but the general condition of \(W_{M}^{T}A_{M}W_{M}\) being generalized Hankel to ensure optimality. See Examples (9), (5.20), (44), (45), (48). To find optimality in lower degree of relaxations is an useful fact in polynomial optimization to avoid increment the degree of relaxation or the number of variables and in this way do not run into numerical problems. At the end of this section we review, with the truncated GNS construction, a classical result of Curto and Fialkow for the characterization of positive semidefinite linear forms with quadrature rule on the whole space. In Sect. 6, in the Main Theorem 6.1, we prove the equivalence of the commutativity of the GNS truncated operators with \(\widetilde{M_{L}}\) being a generalized Hankel matrix and with the existence of a quadrature rule for L on the set \({\mathbb {R}}[{\underline{X}}]_{2d+1}\). These are analogous conditions to the conditions given in [2, Theorem 4.5.3]. Note that the multiplication operators defined in [2] and in [3] are defined in a different way than the GNS truncated multiplication operators (see page 24 for more information). The multiplication operators in [3] despite they are not defined in the non commutative case they are defined in a more general context, in particular the linear form in this article does not need to be positive semidefinite. In contrast in our case, the condition of being positive semidefinite allows us to define an inner product, the GNS truncated inner product, to get well defined truncated GNS multiplication operators, even in the case they do not commute (see Theorem 6.4 as an application of this fact). Moreover, due to the positive definiteness we can prove that the nodes of the quadrature rule, in the commutative case, are pairwise different and therefore we get a Gaussian quadrature rule. The main theorem will also allow us to generalize to a positive semidefinite linear forms a classical theorem of Mysovskikh and Putinar [11, Theorem 3.8.7] and [23, pages 189–190]. At the end of this section we also generalize to a positive semidefinite linear form a result of Möller on the number of nodes of the existence of a quadrature rule on \({\mathbb {R}}[{\underline{X}}]_{2d-1}\). This generalization helps us in polynomial optimization problems to discard optimality or to discard existence of quadrature rules in some cases. Finally in Sect. 7, we group all the results about optimality and global minimizers for an optimal solution of the moment relaxation, where we use the truncated GNS construction to ensure optimality in a more general context than the flat case and we give examples. Another slight novelty in this section is Corollary 7.3 where we prove providing \(\widetilde{M_{L}}\) is generalized Hankel and the polynomial \(p_{1},\ldots ,p_{m}\) describing the basic closed semialgebraic set S as in Eq. (1) are linear than the nodes describing the Gaussian quadrature rule are contained in S. Notice that if the polynomials are not linear there are cases where the nodes are not contained in S, see Example 8.2. Finally we provide an algorithm for detecting optimality and extracting minimizers with the truncated GNS construction and we include numerical examples.

3 Formulation of the problem

To solve polynomial optimization problems we use the very well known moment relaxations defined in the Definition 2.6. An introduction to moment relaxations can also be found for instance in: [16, 18], and [26]. Likewise we will give the equivalent definition using linear forms instead of matrices in Definition 3.4. We will now outline Lasserre’s [16] 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 [27] and [18] for an introduction. In each relaxation of degree k we build convex sets, obtained through the linearization of a equivalent polynomial optimization problem of (P) defined in (2). This equivalent formulation of the relaxation consists in adding infinitely many redundant inequalites of the form \(p\ge 0\) for all \(p\in \sum {\mathbb {R}}[{\underline{X}}]^2p_{i}\cap {\mathbb {R}}[{\underline{X}}]_{k}\) (with the notation \(\sum {\mathbb {R}}[{\underline{X}}]^2p_{i}\) we mean the set of all finite sums of elements of the form \(p^{2}p_{i}\), for \(p\in {\mathbb {R}}[{\underline{X}}]\)). The set of these redundant inequalities builds a cone, which is a set containing 0, closed under addition and under multiplication by positive scalars. The cone generated for this redundant inequalities is called truncated quadratic module generated by the polynomials \(p_{1},\ldots ,p_{m}\), as we see in Definition 3.1. These relaxations give us an increasing sequence of lower bounds of the infimum \(P^{*}\), as you can see in Proposition 3.9. Lasserre proved that this sequence converge asymptotically to the infimum if we assume some archimedean property of the cone generetated by the redundant inequalities, see [26, Theorem 5] for a proof of this.

Definition 3.1

Let \(p_{1},\ldots ,p_{m}\in {\mathbb {R}}[{\underline{X}}]_k\) and \(k\in {\mathbb {N}}_{0}\cup \{\infty \}\). We define the k-truncated quadratic module M, generated by \(p_{1},\ldots ,p_{m}\) as:

$$\begin{aligned} \begin{aligned} M_{k}(p_{1},\ldots ,p_{m}):=&\left( {\mathbb {R}}[{\underline{X}}]_{k}\cap \sum {\mathbb {R}}[{\underline{X}}]^{2}\right) + \left( {\mathbb {R}}[{\underline{X}}]_{k}\cap \sum {\mathbb {R}}[{\underline{X}}]^{2}p_{1}\right) \\&+\cdots +\left( {\mathbb {R}}[{\underline{X}}]_{k}\cap \sum {\mathbb {R}}[{\underline{X}}]^{2}p_{m}\right) \subseteq {\mathbb {R}}[{\underline{X}}]_{k} \\ \end{aligned} \end{aligned}$$
(14)

where here \({\mathbb {R}}[{\underline{X}}]_{\infty }:={\mathbb {R}}[{\underline{X}}]\). We use the notation \(M(p_{1},\ldots ,p_{m}):=M_{\infty }(p_{1},\ldots ,p_{m})\), to refer to the quadratic module generated by the polynomials \(p_{1},\ldots ,p_{m}\in {\mathbb {R}}[{\underline{X}}]\).

Remark 3.2

Note that:

$$\begin{aligned} {\mathbb {R}}[{\underline{X}}]_{k}\cap \sum {\mathbb {R}}[{\underline{X}}]^{2}p =\left\{ \sum _{i=1}^{l}h_{i}^{2}p\text { }|\text { }h_{i}\in {\mathbb {R}}[{\underline{X}}],2\deg (h_{i})\le k -\deg (p) \right\} \end{aligned}$$

For a proof of this see [26, Page 5].

In the following we state several classical results: Lemma 3.3, Corollary 3.5 and Proposition 3.7. We refer to [26] and [18] for a proof of these results and more details.

Lemma 3.3

Let \(k\in {\mathbb {N}}\), \(p\in {\mathbb {R}}[{\underline{X}}]_{k}\setminus \{0\}\). Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{k}\). Then it holds:

$$\begin{aligned} L(\sum {\mathbb {R}}[{\underline{X}}]_{k}\cap {\mathbb {R}}[{\underline{X}}]^{2}p)\subseteq {\mathbb {R}}_{\ge 0}\iff M_{k,p}(y)\succeq 0 \end{aligned}$$
(15)

where \(y_{\alpha }:=L({\underline{X}}^{\alpha })\) for all \(\alpha \in {\mathbb {N}}^{n}\) with \(|\alpha |\le k\).

Due to Lemma 3.3 the following Definition 3.4 of a 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 Eq. (2) and let \(k\in \) \({\mathbb {N}}_{0}\cup \{\infty \}\) such that \(f,p_{1},\ldots , p_{m}\in {\mathbb {R}}[{\underline{X}}]_{k}\). The Moment relaxation (or Lasserre relaxation) of (P) of degree k is the semidefinite optimization problem:

$$\begin{aligned} (P_{k}) : \text { } {\left\{ \begin{array}{ll} \text { minimize }&{}L(f) \\ \text {subject to: }&{} L\in {\mathbb {R}}[{\underline{X}}]_{k}^{*}\\ \text { } &{}L(1)=1 \text { and}\\ \text { } &{}L(M_{k}(p_{1},..., p_{m}))\subseteq {{\mathbb {R}}_{\ge 0}}\\ \end{array}\right. } \end{aligned}$$

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}\in \{-\infty \}\cup {\mathbb {R}}\cup \{\infty \} \).

Corollary and Notation 3.5

Let \(d\in {\mathbb {N}}_{0}\). The correspondence:

defines a bijection between the linear forms \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d})\subseteq {\mathbb {R}}_{\ge 0}\) and the set of positive semidefinite generalized Hankel matrices of order d i.e. \( H_{d}\cap {\mathbb {R}}_{\succeq 0}^{s_{d}\times s_{d}}\). Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d}])\subseteq {\mathbb {R}}_{\ge 0}\) we denote \(M_{L}:=(L({\underline{X}}^{\alpha +\beta }))_{|\alpha |,|\beta |\le d}\) and let \(M_{d}(y)\succeq 0\) for \(y\in {\mathbb {R}}^{s_{d}}\) we denote:

$$\begin{aligned} L_{M_{d}(y)}:{\mathbb {R}}[{\underline{X}}]_{2d}\longrightarrow {\mathbb {R}},{\underline{X}}^{\alpha }\mapsto y_{\alpha }. \end{aligned}$$

Notation 3.6

We denote the following isomorphism of vector spaces by:

$$\begin{aligned} {{\,\mathrm{poly}\,}}:{\mathbb {R}}^{s_{d}}\longrightarrow {\mathbb {R}}[{\underline{X}}]_{d},a\mapsto a^{T}V_{d} \end{aligned}$$

Proposition 3.7

Let \(d\in {\mathbb {N}}_{0}\) and \(L\in {\mathbb {R}}[{\underline{X}}]_{2d}^{*}\) then:

$$\begin{aligned} L(pq)=P^{T}M_{L}Q \text { for all }p,q\in {\mathbb {R}}[{\underline{X}}]_{d} \end{aligned}$$

where \(P:={{\,\mathrm{poly}\,}}^{-1}(p)\) and \(Q:={{\,\mathrm{poly}\,}}^{-1}(q)\).

Definition 3.8

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{d}\) . A quadrature rule for L on \(U\subseteq {\mathbb {R}}[{\underline{X}}]_{d}\) is a function \(w:N\rightarrow {\mathbb {R}}_{>0}\) defined on a finite set \(N\subseteq {\mathbb {R}}^{n}\), such that:

$$\begin{aligned} L(p)= \sum \limits _{x\in N} w(x)p(x) \end{aligned}$$
(16)

for all \(p\in U\). A quadrature rule for L is a quadrature for L on \({\mathbb {R}}[{\underline{X}}]_{d}\). We call the elements of N the nodes of the quadrature rule.

Proposition 3.9

Let (P) be the polynomial optimization problem given in Eq. (2) with \(f,p_{1},\ldots ,p_{m}\in {\mathbb {R}}[{\underline{X}}]_{k}\). Then the following holds:

  1. (i)

    \(P^{*}\ge P_{\infty }^{*}\ge \cdots \ge P^{*}_{k+1} \ge P^{*}_{k}\).

  2. (ii)

    Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{k}\) with \(L(1)=1\). Suppose L has a quadrature rule with nodes in S, then L is a feasible solution of \((P_{k})\) with \(L(f)\ge P^{*}\).

  3. (iii)

    Suppose \((P_{k})\) has an optimal solution \(L^{*}\), which has a quadrature rule on \({\mathbb {R}}[{\underline{X}}]_{l}\) for some \(l\in \{1,\ldots ,k\}\) with \(f\in {\mathbb {R}}[{\underline{X}}]_{l}\) and the nodes are in S. Then \(L^{*}(f)=P^{*}\), moreover we have \(P^{*}=P^{*}_{k+m}\) for \(m\ge 0\) and the nodes of the quadrature rule are global minimizers of (P).

  4. (iv)

    In the situation of (iii), suppose moreover that (P) has an unique global minimizer \(x^{*}\), then \(L^{*}(f)=f(x^{*})\) and \(x^{*}=(L^{*}(X_{1}),\ldots ,L^{*}(X_{n}))\).

Proof

  1. (i)

    \(P^{*}\ge P^{*}_{\infty }\) since if x is a feasible solution for (P) then \({{\,\mathrm{ev}\,}}_{x}\in {\mathbb {R}}[{\underline{X}}]^{*}\) is a feasible solution for \(P^{*}_{\infty }\) with the same value, that is \(f(x)={{\,\mathrm{ev}\,}}_{x}(f)\). It remains to prove \(P^{*}_{l}\ge P^{*}_{k}\) for \(l\in {\mathbb {N}}_{\ge k}\cup \{ \infty \}\). For this let L be a feasible solution of \((P_{l})\), as \(M_{k}(p_{1},\ldots ,p_{m})\subseteq M_{l}(p_{1},\ldots ,p_{m})\) then \(L_{|{\mathbb {R}}[{\underline{X}}]_{k}}\) is a feasible solution of \((P_{k})\) with the same optimal value.

  2. (ii)

    Suppose L has a quadrature rule with nodes \(a_{1},\ldots ,a_{N}\in S\) and weights \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\). From \(L(1)=1\) we get \(\sum _{i=1}^{N}\lambda _{i}=1\) and since the nodes are in S it holds \(L(M_{k}(p_{1},\ldots ,p_{m}))\subseteq {\mathbb {R}}_{\ge 0}\). Hence L is a feasible solution of \((P_{k})\). Moreover the following holds:

    $$\begin{aligned} P^{*}=L(1)P^{*}=\sum _{i=1}^{N}\lambda _{i}P^{*}\le \sum _{i=1}^{N} \lambda _{i}f(a_{i})=L(f) \end{aligned}$$

    where the inequality follows from the fact that \(P^{*}\le f(x)\) for all \(x\in S\).

  3. (iii)

    Suppose \(L^{*}\) is an optimal solution of \((P_{k})\) then \(L^{*}(f)=P^{*}_{k}\le P^{*}\) using (i) and on the other side since \(L^{*}(1)=1\) and \(L^{*}\) has a quadrature rule on \({\mathbb {R}}[{\underline{X}}]_{l}\) with nodes in S and \(f\in {\mathbb {R}}[{\underline{X}}]_{l}\), there exist \(a_{1},\ldots ,a_{N}\in S\) nodes, and \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\) weights, such that:

    $$\begin{aligned} P^{*}_{k}=L^{*}(f)=\sum _{i=1}^{N}\lambda _{i}f(a_{i})\ge \sum _{i=1}^{N} \lambda _{i}P^{*}=P^{*} \end{aligned}$$
    (17)

    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\ge 0\). It remains to show that the nodes are global minimimizers of (P), but this is true since in Eq. (17) we have equality everywhere, and if we factor out we get \(\sum _{i=1}^{N}\lambda _{i}(f(a_{i})-P^{*})=0\), as \(\lambda _{i}>0\) and \(f(a_{i})-P^{*}\ge 0\) for all \(i\in \{1,\ldots ,N\}\), implying \(f(a_{i})=P^{*}\) for all \(i\in \{1,\ldots ,N\}\).

  4. (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 uniqueness of the minimizer \(x^{*}\), that \(a_{i}=x^{*}\) for all \(i\in \{1,\ldots ,N\}\).

    This implies that \(L^{*}={{\,\mathrm{ev}\,}}_{x^{*}}\text { on }{\mathbb {R}}[{\underline{X}}]^{*}_{l}\), and evaluating in the polynomials \(X_{1},\ldots ,X_{N}\in {\mathbb {R}}[{\underline{X}}]_{1}\) we got that:

    $$\begin{aligned} L^{*}(X_{i})={{\,\mathrm{ev}\,}}_{x^{*}}(X_{i})=x_{i}^{*} for all i\in \{1,\ldots ,N\}. \end{aligned}$$

    That is to say, \(x^{*}=(L^{*}(X_{1}),\ldots ,L^{*}(X_{n}))\). \(\square \)

We can now reformulate our problem as:

Given \(d\in {\mathbb {N}}_{0}\) and \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\), we would like to obtain for all \(p\in {\mathbb {R}}[{\underline{X}}]_{2d+2}\):

  • Nodes \(x_{1},\ldots ,x_{r}\in {\mathbb {R}}^{n}\) and and weights \(\lambda _{1},\ldots ,\lambda _{r}>0\) such that:

    $$\begin{aligned} L(p)=\sum _{i=1}^{r}\lambda _{i}p(x_{i}) \end{aligned}$$

in other words:

  • \(x_{1,1},\ldots ,x_{1,n},\ldots ,x_{r,1},\ldots ,x_{r,n}\in {\mathbb {R}}\) and \(a_{1},\ldots ,a_{r}\in {\mathbb {R}}\) such that:

    $$\begin{aligned} L(p)=\sum _{i=1}^{r}a_{i}^{2}p(x_{i,1},\ldots ,x_{i,n}) \end{aligned}$$

again with other words:

  • \(x_{1,1},\ldots ,x_{1,n},\ldots ,x_{r,1},\ldots ,x_{r,n}\in {\mathbb {R}}\) and \(a_{1},\ldots ,a_{r}\in {\mathbb {R}}\) such that:

    $$\begin{aligned} \begin{aligned}&L(p)=&\left\langle {\left( \begin{array}{lll} p(x_{1,1},\ldots ,x_{1,n}) &{}\quad &{}\quad \\ &{}\quad \ddots &{}\quad \\ &{}\quad &{}\quad p(x_{r,1},\ldots ,x_{r,n}) \\ \end{array} \right) \left( \begin{array}{l} a_{1}\\ \vdots \\ a_{r}\\ \end{array} \right) , \left( \begin{array}{l} a_{1}\\ \vdots \\ a_{r}\\ \end{array} \right) } \right\rangle \\ \end{aligned} \end{aligned}$$

again written differently:

  • \(x_{1,1},\ldots ,x_{1,n},\ldots ,x_{r,1},\ldots ,x_{r,n}\in {\mathbb {R}}\) and \(a\in {\mathbb {R}}^{r}\) such that:

$$\begin{aligned} \begin{aligned}&L(p)=&\left\langle {p\left[ \begin{pmatrix} x_{1,1} &{}\quad &{}\quad \\ &{}\quad \ddots &{}\quad \\ &{}\quad &{}\quad x_{r,1} \end{pmatrix},..., \begin{pmatrix} x_{1,n} &{}\quad &{}\quad \\ &{}\quad \ddots &{}\quad \\ &{}\quad &{}\quad x_{r,n} \end{pmatrix} \right] \left( \begin{array}{l} a_{1}\\ \vdots \\ a_{r}\\ \end{array} \right) , \left( \begin{array}{l} a_{1}\\ \vdots \\ a_{r}\\ \end{array} \right) } \right\rangle \\ \end{aligned} \end{aligned}$$

again with less words:

  • Diagonal matrices \(D_{1},\ldots ,D_{n}\in {\mathbb {R}}^{r\times r}\) and \(a\in {\mathbb {R}}^{r}\) such that:

    $$\begin{aligned} L(p)=\langle p(D_{1},\ldots ,D_{n})a,a\rangle \end{aligned}$$

Reminder 3.10

Let \(r,n\in {\mathbb {N}}\) and \(M_{1},\ldots ,M_{n}\in {\mathbb {R}}^{r \times r}\) symmetric commuting matrices. Then there exist an orthogonal matrix \(P\in {\mathbb {R}}^{r\times r}\) such that \(P^{T}M_{i}P\) is a diagonal matrix for all \( i\in \{1,\ldots ,n\}\).

Using this Reminder 3.10 we can continue with our reformulation of the problem: given \(d\in {\mathbb {N}}_{0}\) and \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\), to find a quadrature rule for L is the same as to find commuting symmetric matrices \(M_{1},\ldots ,M_{n}\in {\mathbb {R}}^{r\times r}\) and a vector \(a\in {\mathbb {R}}^{r}\) such that:

$$\begin{aligned} L(p)=\langle p(M_{1},\ldots ,M_{n})a,a\rangle \end{aligned}$$
(18)

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\in {\mathbb {N}}_{0}\) and \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\), we would like to obtain a finite dimensional Euclidean vector space V, commuting self-adjoint endomorphisms \(M_{1},\ldots ,M_{n}\) of V and \(a\in V\) such that:

$$\begin{aligned} L(p)=\langle p(M_{1},\ldots ,M_{n})a,a\rangle \end{aligned}$$
(19)

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\in {\mathbb {R}}[{\underline{X}}]^{*}\) such that \(L(p^{2})>0\) for all \(p\ne 0\). The solution was given by defining the inner product:

$$\begin{aligned} \langle p,q \rangle :=L(pq) \end{aligned}$$
(20)

and defining the self adjoint operators \(M_{i}\), for all \(i\in \{1,\ldots ,n\}\), on the infinite dimensional vector space \({\mathbb {R}}[{\underline{X}}]\), in the following way:

\(M_{i}:{\mathbb {R}}[{\underline{X}}]\longrightarrow {\mathbb {R}}[{\underline{X}}]\), \(p\mapsto X_{i}p\)

Taking \(a:=1\in {\mathbb {R}}[{\underline{X}}]\) we have the searched equality (19). More information about this construction can be found in the book [10].

figure a

4 Truncated GNS-construction

In this section we will explain how we can define the Euclidean vector space and multiplications operators required in Eq. (19) from this positive semidefinite linear form L, in a similar way as in the Gelfand–Neimark–Segal construction 3.11. This construction was already done in [23] for the particular case \(U_{L}=\{0\}\).

Definition and Notation 4.1

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). We define and denote the truncated GNS kernel of L:

$$\begin{aligned} U_{L}:=\{ p\in {\mathbb {R}}[{\underline{X}}]_{d+1}\text { }|\text { }L(pq)=0 \text { for all } q\in {\mathbb {R}}[{\underline{X}}]_{d+1} \} \end{aligned}$$

We get the following useful result as a consequence of the assumption that the linear form is positive semidefinite since then it satisfies the Cauchy-Schwarz inequality. We leave the proof to the reader.

Proposition 4.2

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). The truncated GNS kernel of L is a vector subspace in \({\mathbb {R}}[{\underline{X}}]_{d+1}\). Moreover:

$$\begin{aligned} U_{L}=\{ p\in {\mathbb {R}}[{\underline{X}}]_{d+1}\text { }|\text { }L(p^{2})=0 \} \end{aligned}$$
(21)

Definition, Notation and Proposition 4.3

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). We define and denote the GNS representation space of L, as the following quotient of vector spaces:

$$\begin{aligned} V_{L}:=\frac{{\mathbb {R}}[{\underline{X}}]_{d+1}}{U_{L}} \end{aligned}$$
(22)

For every \(p\in {\mathbb {R}}[{\underline{X}}]_{d+1}\) we will write \({\overline{p}}^{L}\) to refer to the class of p in \(V_{L}\). We define and denote the GNS inner product of L, in the following way:

$$\begin{aligned} \langle {\overline{p}}^{L},{\overline{q}}^{L}\rangle _{L}:=L(pq) \end{aligned}$$
(23)

for every \(p,q\in {\mathbb {R}}[{\underline{X}}]_{d+1}\). \((V_{L},\langle \text { . } ,\text { . } \rangle _{L})\), is a symmetric bilinear form.

Proof

Let us prove first that \(\langle \text { . } ,\text { . } \rangle _{L}\) is well defined. To do this take \(p_{1},q_{1},p_{2},q_{2}\in {\mathbb {R}}[{\underline{X}}]_{d+1}\) with \(\overline{p_{1}}^{L}=\overline{p_{2}}^{L}\) and \(\overline{q_{1}}^{L}=\overline{q_{2}}^{L}\) then:

$$\begin{aligned} \begin{aligned} \langle \overline{p_{1}}^{L},\overline{q_{1}}^{L} \rangle _{L}=\langle \overline{p_{2}}^{L},\overline{q_{2}}^{L} \rangle _{L}&\iff L(p_{1}q_{1})=L(p_{2}q_{2}) \iff L(p_{1}q_{1})-L(p_{2}q_{2})=0&\\&\iff L(p_{1}q_{1})+L(-p_{2}q_{1})-L(-p_{2}q_{1})-L(p_{2}q_{2})=0&\\&\iff L((p_{1}-p_{2})q_{1})-L(p_{2}(q_{2}-q_{1}))=0&\\ \end{aligned} \end{aligned}$$

The last equality holds since \(p_{1}-p_{2},q_{2}-q_{1}\in U_{L}\). The bilinearity and symmetry is trivial. \(\langle \text { . } ,\text { . } \rangle _{L}\) is positive semidefinite since \(L(\sum {\mathbb {R}}[{\underline{X}}]_{d+1}^{2})\subseteq {\mathbb {R}}_{\ge 0}\). It remains to prove that \(\langle \text { . } ,\text { . } \rangle _{L}\) is even positive definite. Indeed, for all \(p\in {\mathbb {R}}[{\underline{X}}]_{d+1}\) with \(\langle {\overline{p}}^{L},{\overline{p}}^{L} \rangle _{L}=0\) then \(L(p^{2})=0\) and then \(p\in U_{L}\). \(\square \)

Definition and Notation 4.4

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). For \(i\in \{1,\ldots ,n\}\), we define the i-th truncated GNS multiplication operator of L as the following map between Euclidean vector subspaces of \(V_{L}\), and denote by \(M_{L,i}\):

$$\begin{aligned} M_{L,i}:\Pi _{L}(V_{L})\longrightarrow \Pi _{L}(V_{L}),\text { }{\overline{p}}^{L}\mapsto \Pi _{L}(\overline{pX_{i}}^{L})\text { for } p\in {\mathbb {R}}[{\underline{X}}]_{d} \end{aligned}$$
(24)

where \(\Pi _{L}\) is the orthogonal projection map of \(V_{L}\) onto the vector subspace \(\{\text { }{\overline{p}}^{L}\text { }|\text { }p\in {\mathbb {R}}[{\underline{X}}]_{d}\}\) with respect to the inner product \(\langle \text { . } ,\text { . } \rangle _{L}\). We will call and denote the subvector vector space:

$$\begin{aligned} T_{L}:=\Pi _{L}(V_{L})=\{\text { }{\overline{p}}^{L}\text { }|\text { }p\in {\mathbb {R}}[{\underline{X}}]_{d}\} \end{aligned}$$
(25)

of \(V_{L}\), the GNS-truncation of L.

Proposition 4.5

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). The i-th truncated GNS multiplication operator of L is a self-adjoint endomorphism for \(<,>_{L}\).

Proof

Let us demonstrate first that the i-th truncated GNS multiplication operator of L is well defined. \(M_{L,i}\) is well defined if and only if \(M_{L,i}({\overline{p}}^{L})={\overline{0}}^{L}\) for all \(p\in U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d} \) implies \(\Pi _{L}(\overline{X_{i}p}^{L})={\overline{0}}^{L}\) for all \(p\in U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}\). Since \(\Pi _{L}(\overline{X_{i}p}^{L})\in T_{L}\) we can choose \(q\in {\mathbb {R}}[{\underline{X}}]_{d}\) such that \({\overline{q}}^{L}=\Pi _{L}(\overline{X_{i}p}^{L})\) and then:

$$\begin{aligned} L(q^2)=\langle {\overline{q}},{\overline{q}} \rangle _{L}&=\langle \Pi _{L}(\overline{X_{i}p}^{L}), \Pi _{L}(\overline{X_{i}p}^{L}) \rangle _{L} {\mathop {=}\limits ^{\Pi _{L}\circ \Pi _{L}=\Pi _{L}}}\langle \Pi _{L}(\overline{X_{i}p}^{L}), \overline{X_{i}p}^{L} \rangle _{L} \\&=\langle {\overline{q}}^{L},\overline{X_{i}p}^{L} \rangle _{L} =L(q(X_{i}p))=L((qX_{i})p){\mathop {=}\limits ^{p\in U_{L}}}0 \end{aligned}$$

Therefore \(\Pi _{L}(\overline{X_{i}p}^{L})={\overline{0}}^{L}\) for all \(p\in U_{L}\). Let us see now that \(M_{L,i}\) are self-adjoint endomorphisms, for this let \(p,q\in {\mathbb {R}}[{\underline{X}}]_{d}\) then:

$$\begin{aligned} \langle M_{L,i}&({\overline{p}}^{L}) , {\overline{q}}^{L} \rangle _{L}= \langle \Pi _{L}(\overline{X_{i}p}^{L}), {\overline{q}}^{L} \rangle _{L}=\langle \overline{X_{i}p}^{L}, \Pi _{L}({\overline{q}}^{L}) \rangle _{L}=\langle \overline{X_{i}p}^{L}, {\overline{q}}^{L} \rangle _{L}=L((X_{i}p)q)\\ =L(p(&X_{i}q))=\langle {\overline{p}}^{L}, \overline{X_{i}q}^{L}\rangle _{L} =\langle \Pi _{L}({\overline{p}}^{L}), \overline{X_{i}q}^{L}\rangle _{L}=\langle {\overline{p}}^{L}, \Pi _{L}(\overline{X_{i}q}^{L})\rangle _{L}=\langle {\overline{p}}^{L}, M_{L,i}({\overline{q}}^{L})\rangle _{L} \end{aligned}$$

\(\square \)

Remark 4.6

The GNS construction for \(L\in {\mathbb {R}}[{\underline{X}}]^{*}\) with \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2})\subseteq {\mathbb {R}}_{\ge 0}\) is the same as the original , see Remark (3.11), modulo \(U_{L}\), where:

$$\begin{aligned} U_{L}=\{p\in {\mathbb {R}}[{\underline{X}}]\text { }|\text { }L(p^{2})=0\} \end{aligned}$$
(26)

The truncated GNS multiplication operators of L commute, since \(\frac{{\mathbb {R}}[{\underline{X}}]}{U_{L}}\) is a commutative ring. One can easily prove that \(U_{L}\) is an ideal. Indeed it is clear that if \(p,q\in U_{L}\) then \(L((p+q)^{2})=0\), and if \(p\in U_{L}\) and \(q\in {\mathbb {R}}[{\underline{X}}]\) then \(L(p^{2}q^{2})=L(p(pq^{2})){\mathop {=}\limits ^{p\in U_{L}}}0\) implies \(pq\in U_{L}\).

Let us remember a very useful result which is a particular case of a result of Smul’jan [28]. In the recent textbook of Schmüdgen on the moment problem, one can find a proof of the more general matrix version of Smul’jan’s result in [29, Appendix A.4].

Lemma and Notation 4.7

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). Remember that \(L':=L_{{\mathbb {R}}[{\underline{X}}]_{2d}}\). Let us denote by \(B_{L}\) the transformation matrix of the following bilinear form with respect to the standard monomial basis:

$$\begin{aligned} {\mathbb {R}}[{\underline{X}}]_{d+1}\times {\mathbb {R}}[{\underline{X}}]_{d}\longrightarrow {\mathbb {R}}, (p,q) \longmapsto L(pq) \end{aligned}$$

Then it holds \({{\,\mathrm{rank}\,}}M_{L'}={{\,\mathrm{rank}\,}}B_{L} \) and for every such L linear form we can define its respective modified moment matrix as:

where \(W_{L}\) is a matrix such that \(M_{L'}W_{L}=D_{L}\), where \(D_{L}\) is the submatrix of \(B_{L}\) remaining from eliminating the columns corresponding to the matrix \(M_{L'}\). \(\widetilde{M_{L}}\) is well defined since it does not depend from the choice of a matrix \(W_{L}\) such that \(M_{L'}W_{L}=D_{L}\) and it is positive semidefinite. Moreover, for every \(S\in {{\,\mathrm{Sym}\,}}{\mathbb {R}}^{r_{d+1}\times r_{d+1}}\) such that:

There exists \(X\in {\mathbb {R}}^{r_{d+1}\times r_{d+1}}\) such that:

$$\begin{aligned} S=W_{L}^{T}M_{L'}W_{L}+XX^{T} \end{aligned}$$

5 Gaussian quadrature rule

In this chapter we generalize the notion of Gaussian quadrature given by Dunkl and Xu in [12, Page 108, Definition 3.8.2]. This generalization comes from the fact that the linear form L is now assumed to be positive semidefinite instead of being positive definite, fact that turns out to be useful, if L is a feasible solution of a SDP relaxation, as we will see in Chapter 7. For more information about the notion of Gaussian quadrature rule we refer to the reader to 5.11 and references therein. 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 \({\mathbb {R}}[{\underline{X}}]_{2d+1}\) by providing that the truncated GNS multiplication operators commute. We will also demonstrate that this condition is strictly more general than the very well known condition of being flat (see definition in 5.18), 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 \({\mathbb {R}}[{\underline{X}}]_{2d+1}\) that we get in case the truncated GNS multiplication operators commute.

Proposition 5.1

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). The vector spaces \(T_{L}\) and \(\frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}}\) are canonically isomorphic.

Proof

Let us consider the following linear map between Euclidean vector spaces:

$$\begin{aligned} \sigma _{L}: T_{L}\longrightarrow V_{L'}:{\overline{p}}^{L} \longmapsto {\overline{p}}^{L'}\text { for every } p\in {\mathbb {R}}[{\underline{X}}]_{d} \end{aligned}$$
(27)

where remember we denoted \(L':=L_{|{\mathbb {R}}[{\underline{X}}]_{2d}}\). It is well defined since for every \({\overline{p}}^{L}\), \({\overline{q}}^{L}\in T_{L}\) such that \({\overline{p}}^{L}={\overline{q}}^{L}\) we can assume without loss of generality that \(p,q\in {\mathbb {R}}[{\underline{X}}]_{d}\), and therefore:

$$\begin{aligned} {\overline{p}}^{L}={\overline{q}}^{L}\Leftrightarrow L((p-q)^{2})=0\Leftrightarrow L'((p-q)^2)=0\Leftrightarrow {\overline{p}}^{L'}={\overline{q}}^{L'}\Leftrightarrow \sigma _{L}({\overline{p}}^{L})=\sigma _{L}({\overline{q}}^{L}) \end{aligned}$$

\(\sigma _{L}\) is also a linear isometry, since for every \(p,q\in {\mathbb {R}}[{\underline{X}}]_{d}\) we have:

$$\begin{aligned} \langle {\overline{p}}^{L},{\overline{q}}^{L} \rangle _{L}=L(pq)=L^{'}(pq)=\langle {\overline{p}}^{L'},{\overline{q}}^{L'} \rangle _{L'}=\langle \sigma _{L}({\overline{p}}^{L}), \sigma _{L}({\overline{q}}^{L})\rangle _{L'} \end{aligned}$$

Then \(\sigma _{L}\) is immediately injective. On the other side, \(\sigma _{L}\) is surjective since for every \({\overline{p}}^{L'}\in V_{L'}\) with \(p\in {\mathbb {R}}[{\underline{X}}]_{d}\), it holds that \(\sigma _{L}({\overline{p}}^{L})={\overline{p}}^{L'}\). Thence \(\sigma _{L}\) is an isomorphism between vector spaces. \(\square \)

Notation 5.2

For a linear form \(\ell \in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(\ell (\sum {\mathbb {R}}[{\underline{X}}]_{d+1}^2)\subseteq {\mathbb {R}}_{\ge 0}\) we will denote by \(\sigma _{\ell }\) the following isomorphism of Euclidean vector spaces already defined in Eq. (27):

$$\begin{aligned} \sigma _{\ell }:T_{\ell }\longmapsto V_{\ell '},{\overline{p}}^{\ell }\mapsto {\overline{p}}^{\ell '},\text { for }p\in {\mathbb {R}}[{\underline{X}}]_{d} \end{aligned}$$
(28)

Remark 5.3

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). For \(v_{1},\ldots ,v_{r}\in {\mathbb {R}}[{\underline{X}}]_{d}\), we have \(\overline{v_{1}}^{L},\ldots ,\overline{v_{r}}^{L}\) is an orthonormal basis of \(T_{L}\) if and only if \( \overline{v_{1}}^{L'},\ldots ,\overline{v_{r}}^{L'} \) is an orthonormal basis of \(V_{L'}\).

The following Theorem 5.5 and Lemma 5.6, are very well known and we will use them to prove Proposition 5.8. The proofs can be found respectively in [18, Page 15, Theorem 2.6] and in [18, Page 13, Lemma 2.2].

Definition 5.4

Let \(I\subseteq {\mathbb {R}}[{\underline{X}}]\) be an ideal. I is said to be radical when \(I={\mathcal {I}}(V_{{\mathbb {C}}}(I))\).

Theorem 5.5

An ideal \(I\subseteq {\mathbb {R}}[{\underline{X}}]\) is zero dimensional (i.e. \(|V_{{\mathbb {C}}}(I)|<\infty \)) if and only if the vector space \({\mathbb {R}}[{\underline{X}}]/I\) is finite dimensional. Moreover \(|V_{{\mathbb {C}}}(I)|\le \dim ({\mathbb {R}}[{\underline{X}}]/I)\), with equality if and only if the ideal I is radical.

Lemma 5.6

Let \(I\subseteq {\mathbb {R}}[{\underline{X}}]\) be an ideal. I is radical if and only if

$$\begin{aligned} \text {For all } g\in {\mathbb {R}}[{\underline{X}}]\text { such that }g^{2}\in I{\implies }g\in I \end{aligned}$$
(29)

Proposition 5.7

Let \(\Lambda \in {\mathbb {R}}[{\underline{X}}]^{*}\) such that \(\Lambda (\sum {\mathbb {R}}[{\underline{X}}]^{2})\subseteq {\mathbb {R}}_{\ge 0}\). Then \(U_{\Lambda }\) is a radical ideal.

Proof

In Remark 4.6 we saw that \(U_{\Lambda }\) is an ideal, let us prove that it is radical ideal. Let \(g\in {\mathbb {R}}[{\underline{X}}]\) such that \(g^{2}\in U_{\Lambda }\). In particular \(\Lambda (g^{2}1)=0\) and this implies \(g\in U_{\Lambda }\). \(\square \)

Proposition 5.8

Let \(\Lambda =\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]^{*}\), with \(N\in {\mathbb {N}}\), \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\), and \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\) then:

$$\begin{aligned} \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}\right) =|\{a_{1},\ldots ,a_{N}\}| \end{aligned}$$

Proof

We have the following equalities:

$$\begin{aligned} U_{\Lambda }&=\{ p\in {\mathbb {R}}[{\underline{X}}]\text { }|\sum _{i=1}^{N}\lambda _{i}p^{2}(a_{i})=0\}= \text { }\{p\in {\mathbb {R}}[{\underline{X}}]\text { }|\text { }p^{2}(a_{i})=0\text { for all }i\in \{1,\ldots ,n\} \} \\&=\{p\in {\mathbb {R}}[{\underline{X}}]\text { }|\text { }p(a_{i})=0\text { for all }i\in \{1,\ldots ,n\} \}= {I}(\{a_{1},\ldots ,a_{N}\}) \end{aligned}$$

and since \(\{a_{1},\ldots ,a_{N}\}\subseteq {\mathbb {R}}^{n}\) is an algebraic set, by the ideal-variety correspondence (see [5]), it holds:

$$\begin{aligned} V_{{\mathbb {C}}}( {I}(\{a_{1},\ldots ,a_{N}\}))=\{a_{1},\ldots ,a_{N}\} \end{aligned}$$

which is the same as \(V_{{\mathbb {C}}}(U_{\Lambda })=\{a_{1},\ldots ,a_{N}\}\). Notice that by Theorem 5.5, it is enough to prove that \(U_{\Lambda }\) is radical to conclude the proof. In fact by Proposition 5.7\(U_{\Lambda }\) is radical. Applying Theorem 5.5 we have the result. \(\square \)

Let us review some known bounds on the number of nodes of quadrature rules for L on \({\mathbb {R}}[{\underline{X}}]_{2d+2}\) and on \({\mathbb {R}}[{\underline{X}}]_{2d+1}\) (see [7] and [23]).

Proposition 5.9

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). The number of nodes N, of a quadrature rule for L satisfies:

$$\begin{aligned} {{\,\mathrm{rank}\,}}M_{L}\le N\le |V_{{\mathbb {R}}}(U_{L})| \end{aligned}$$

Proof

Let \(L=\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) for \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\) pairwise different points and \(\lambda _{1},\ldots ,\lambda _{N}>0\) weights and define \(\Lambda :=\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]^{*}\). Let us consider the following canonical map:

$$\begin{aligned} \frac{{\mathbb {R}}[{\underline{X}}]_{d+1}}{U_{L}}\hookrightarrow \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }} \end{aligned}$$

By Proposition 5.8 we have that:

$$\begin{aligned} {{\,\mathrm{rank}\,}}M_{L} = \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d+1}}{U_{L}}\right) \le \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}\right) =N \end{aligned}$$

On the other side, it holds that \(\{a_{1},\ldots ,a_{N} \}\subseteq V_{{\mathbb {C}}}(U_{L})\cap {\mathbb {R}}^{n}=V_{{\mathbb {R}}}(U_{L})\), since for all \(p\in U_{L}\) we have \(L(p^{2})=0\) and then \(p(a_{i})=0\) for all \(i\in \{1,\ldots ,N\}\). this implies \( N\le |V_{{\mathbb {R}}}(U_{L})|\).

\(\square \)

Proposition 5.10

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). The number of nodes N, of a quadrature rule for L on \({\mathbb {R}}[{\underline{X}}]_{2d+1}\) satisfies:

$$\begin{aligned} N\ge \dim (T_{L}) \end{aligned}$$

Proof

Assume that L has a quadrature rule on \({\mathbb {R}}[{\underline{X}}]_{2d+1}\) such that:

$$\begin{aligned} L(p)=\sum _{i=1}^{N}\lambda _{i}p(a_{i}) \end{aligned}$$

for every \(p\in {\mathbb {R}}[{\underline{X}}]_{2d+1}\), where we can assume without loss of generality that the points \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\) are pairwise different and \(\lambda _{1},\ldots ,\lambda _{N}>0\) for \(N\in {\mathbb {N}}\). Let us set \(\Lambda :=\sum _{i=1}^N\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]^{*}\). Then, the following linear map between Euclidean vector spaces is an isometry:

$$\begin{aligned} \sigma _{1}:T_{L}\longrightarrow \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}, {\overline{p}}^{L}\mapsto {\overline{p}}^{\Lambda }\text { for every }p\in {\mathbb {R}}[{\underline{X}}]_{d} \end{aligned}$$
(30)

It is easy to see that it is well defined since \(U_{L}\subseteq U_{\Lambda }\). It holds also that \(\sigma _{1}\) is a linear isometry since, for all \(p,q\in {\mathbb {R}}[{\underline{X}}]_{d}\):

$$\begin{aligned} \left\langle {\overline{p}}^{L},{\overline{q}}^{L}\right\rangle _{L}=L(pq)=\Lambda (pq)=\left\langle {\overline{p}}^{\Lambda },{\overline{q}}^{\Lambda } \right\rangle _{\Lambda }=\langle \sigma _{1}({\overline{p}}^{L}),\sigma _{1}({\overline{q}}^{L}) \rangle _{\Lambda } \end{aligned}$$

Since, \(\sigma _{1}\) is a linear isometry is inmmediately injective, and then:

$$\begin{aligned} \dim (T_{L})\le \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}\right) \end{aligned}$$

And now we can apply the Proposition 5.8, to conclude the proof. \(\square \)

Definition 5.11

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). A quadrature rule for L on \({\mathbb {R}}[{\underline{X}}]_{2d+1}\) with \(\dim (T_{L})\) nodes is called a Gaussian quadrature rule.

Remark 5.12

Note that in the above Definition 5.11, a Gaussian quadrature rule for L is not a quadrature rule for L but only for the restriction of L on polynomials of one degree less.

Lemma 5.13

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). Assume that the truncated multiplication operators commute. Then for all \(p\in {\mathbb {R}}[{\underline{X}}]_{d+1}\) we have the following equality:

$$\begin{aligned} p(M_{L,1},\ldots ,M_{L,n})({\overline{1}}^{L})=\Pi _{L}({\overline{p}}^{L}) \end{aligned}$$
(31)

Proof

Let \(p={\underline{X}}^{\alpha }\) for \(\alpha \in {\mathbb {N}}^{n}\) with \(|\alpha |\le d+1\). We continue the proof by induction on \(|\alpha |\):

  • For \(|\alpha |=0\), we have that \({\underline{X}}^{\alpha }=1\) then:

    $$\begin{aligned} 1(M_{L,1},\ldots ,M_{L,n})({\overline{1}}^{L})={{\,\mathrm{Id}\,}}_{V_{L}}({\overline{1}}^{L}) ={\overline{1}}^{L}=\Pi _{L}({\overline{1}}^{L}) \end{aligned}$$
  • Let assume the statement is true for \(|\alpha |=d\). Let us show it is also true for \(|\alpha |=d+1\). Let \(p=X_{i}q\) for some \(i\in \{1,\ldots ,n\}\) and \(q={\underline{X}}^{\beta }\) with \(|\beta |=d\), then \(\Pi _{L}({\overline{q}}^{L})={\overline{q}}^{L}\) since \({\overline{q}}^{L}\in T_{L}\), and we have:

    $$\begin{aligned} p(M_{L,1},\ldots ,M_{L,n})({\overline{1}}^{L})&=(M_{L,i}\circ q(M_{L,1},\ldots ,M_{L,n}))({\overline{1}}^{L})\\ =M_{L,i}(q(M_{L,1},\ldots ,M_{L,n})({\overline{1}}^{L}))&=M_{L,i} ({\overline{q}}^{L})=\Pi _{L}(\overline{X_{i}q}^{L})=\Pi _{L}({\overline{p}}^{L}) \end{aligned}$$

since we have proved the equality (31) for monomials then by the linearity of the orthogonal projection, the Eq. (31) is also true for polynomials. \(\square \)

Theorem 5.14

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\) and \(d\in {\mathbb {N}}_{0}\). Assume the truncated GNS multiplication operators of L commute, and consider the set:

$$\begin{aligned} G_{L}:=\{\sum _{i=1}^{s}p_{i}q_{i}\text { }|\text { }s\in {\mathbb {N}}\text {, }p_{i}\in {\mathbb {R}}[{\underline{X}}]_{d+1}\text { and } q_{i}\in {\mathbb {R}}[{\underline{X}}]_{d}+U_{L} \} \end{aligned}$$
(32)

then there exists a quadrature rule for L on \(G_{L}\) with \(\dim (T_{L})\) many nodes.

Proof

Since the truncated GNS multiplication operators of L commute by Reminder 3.10 there exists an orthonormal basis \(v:=\{v_{1},\ldots ,v_{N}\}\) of \(T_{L}\) consisting of common eigenvectors of the truncated GNS multiplication operators of L. That is to say, there exist \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\) such that:

$$\begin{aligned} M_{L,i}v_{j}=a_{j,i}v_{j} for all i\in \{1,\ldots ,n\} and j\in \{1,\ldots ,N\} \end{aligned}$$

where \(N:=\dim (T_{L})\). Since it always holds \({\overline{1}}^{L}\in T_{L}\), we can write:

$$\begin{aligned} {\overline{1}}^{L}=b_{1}v_{1}+\cdots +b_{N}v_{N} \end{aligned}$$
(33)

for some \(b_{1},\ldots ,b_{N}\in {\mathbb {R}}\). Let us define \(\lambda _{i}:=b_{i}^{2}\) for all \(i\in \{1,\ldots ,N\}\).

Let \(g=pq\) such that \(p\in {\mathbb {R}}[{\underline{X}}]_{d+1}\) and \(q\in {\mathbb {R}}[{\underline{X}}]_{d}+U_{L}\), then using Lemma 5.13 we have the two equalities:

$$\begin{aligned} \Pi _{L}({\overline{p}}^{L})=p(M_{L,1},\ldots ,M_{L,n})({\overline{1}}^{L})\text { and }{\overline{q}}^{L}=q(M_{L,1},\ldots ,M_{L,n})({\overline{1}}^{L}) \end{aligned}$$
(34)

Using this equalities (34), using that the orthogonal projection \(\Pi _{L}\) is selfadjoint, using that \(\{v_{1},\ldots ,v_{N}\}\) is an orthonormal basis of \(T_{L}\) consisting of common eigenvectors of the truncated GNS multiplication operators of L and also using the Eq. (33), with the same idea as we got the reformulation of the problem in Eq. (19) we have:

$$\begin{aligned} L(g)&=L(pq)=\langle {\overline{p}}^{L},{\overline{q}}^{L} \rangle _{L}{\mathop {=}\limits ^{{\overline{q}}^{L}\in T_{L}}} \langle {\overline{p}}^{L},\Pi _{L}({\overline{q}}^{L})\rangle _{L}= \\&\langle \Pi _{L}({\overline{p}}^{L}),{\overline{q}}^{L} \rangle _{L} =\sum _{j=1}^{N}b_{j}^{2}p(a_{j})q(a_{j})=\sum _{j=1}^{N}\lambda _{j}p(a_{j})q(a_{j}) \end{aligned}$$

Then by linearity \(L(p)=\sum _{i=1}^{N}\lambda _{i}p(a_{i})\) for all \(p\in G_{L}\). It remains to prove that the nodes of the quadrature rule for L that we got, \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\) are pairwise different, but this is true since \(N=\dim T_{L}\) is the minimal possible number of nodes for a quadrature rule on \({\mathbb {R}}[{\underline{X}}]_{2d+1}\) as we proved in Proposition 5.10.

\(\square \)

Remark 5.15

Since \({\mathbb {R}}[{\underline{X}}]_{2d+1}\subseteq G_{L}\), in the conditions of Theorem 5.14 we got in particular a Gaussian quadrature rule for the linear form L.

Corollary 5.16

Let \(n=1\), i.e. \(L\in {\mathbb {R}}[X]^{*}_{2d+2}\) with \(L(\sum {\mathbb {R}}[X]^{2}_{d+1})\ge 0\). Then L has a quadrature rule on \(G_{L}\), defined in the Eq. (32).

Proof

L has one truncated GNS multiplication operator, therefore the hypothesis of Theorem 5.14 holds and there is a quadrature rule on \(G_{L}\) for L. \(\square \)

Proposition 5.17

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). The following assertions are equivalent:

  1. (i)

    \({\mathbb {R}}[{\underline{X}}]_{d+1}={\mathbb {R}}[{\underline{X}}]_{d}+U_{L}\)

  2. (ii)

    \(T_{L}=V_{L}\)

  3. (iii)

    For all \(\alpha \in {\mathbb {N}}_{0}^{n}\) with \(|\alpha |=d+1\), there exists \(p\in {\mathbb {R}}[{\underline{X}}]_{d}\) such that \({\underline{X}}^{\alpha }-p\in U_{L}\)

  4. (iv)

    The canonical map:

    $$\begin{aligned} V_{L^{'}}={\mathbb {R}}[{\underline{X}}]_{d}/ U_{L^{'}}\hookrightarrow {\mathbb {R}}[{\underline{X}}]_{d+1} /U_{L}=V_{L} \end{aligned}$$
    (35)

    is an isomorphism.

  5. (v)

    \(\dim (V_{L^{'}})=\dim (V_{L})\)

  6. (vi)

    The moment matrices \((L({\underline{X}}^{\alpha +\beta }))_{|\alpha |,|\beta |\le d}\) and \((L({\underline{X}}^{\alpha +\beta }))_{|\alpha |,|\beta |\le d+1}\) have the same rank.

  7. (vii)

    \(M_{L}=\widetilde{M_{L}}\).

Proof

Note that the map (35) is well defined since \({\mathbb {R}}[{\underline{X}}]_{d}\cap U_{L}=U_{L'}\). And one can see inmediately that:

$$\begin{aligned} (i)\iff (ii)\iff (iii)\iff (iv)\iff (v). \end{aligned}$$

Let us show \((v)\iff (vi)\): \((L({\underline{X}}^{\alpha +\beta }))_{|\alpha |,|\beta |\le d+1}\) is the transformation matrix (or the associated matrix) of the bilinear form:

$$\begin{aligned} {\mathbb {R}}[{\underline{X}}]_{d+1}\times {\mathbb {R}}[{\underline{X}}]_{d+1} \longrightarrow {\mathbb {R}},(p,q)\mapsto L(pq) \end{aligned}$$

with respect to the standard monomial basis, and therefore it is also the transformation matrix (or the associated matrix) of the linear map:

$$\begin{aligned} {\mathbb {R}}[{\underline{X}}]_{d+1}\longrightarrow {\mathbb {R}}[{\underline{X}}]^{*}_{d+1},p\mapsto (q\mapsto L(pq)) \end{aligned}$$
(36)

with respect to the corresponding dual basis of the standard monomial basis. The kernel of this linear map (36) is \(U_{L}\), in consequence:

$$\begin{aligned} {{\,\mathrm{rank}\,}}((L({\underline{X}}^{\alpha +\beta }))_{|\alpha |,|\beta |\le d+1})=\dim {\mathbb {R}}[{\underline{X}}]_{d+1}-U_{L}=\dim V_{L} \end{aligned}$$

reasoning in the same way:

$$\begin{aligned} {{\,\mathrm{rank}\,}}((L({\underline{X}}^{\alpha +\beta }))_{|\alpha |,|\beta |\le d})=\dim V_{L^{'}} \end{aligned}$$

Finally \((vi)\iff (vii)\):

\(\square \)

Definition 5.18

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). We say the linear form L is flat if the conditions (i), (ii), (iii), (iv), (v), (vi) and (vii) in Proposition 5.17 are satisfied.

Proposition 5.19

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). Suppose L is flat then the truncated GNS operators of L commute.

Proof

Assume that L is flat, and let \(i,j\in \{1,\ldots ,n\}\) and \(p\in {\mathbb {R}}[{\underline{X}}]_{d}\) . We want to prove:

$$\begin{aligned} M_{L,i}\circ M_{L,j}({\overline{p}}^{L})= M_{L,j}\circ M_{L,i}({\overline{p}}^{L}) \end{aligned}$$

Since L is flat, by the characterization (iii) of Proposition 5.17, we can write: \(X_{i}p=p_{1}+q_{1}\) and \(X_{j}p=p_{2}+q_{2}\) with \(p_{1},p_{2}\in {\mathbb {R}}[{\underline{X}}]_{d}\) and \(q_{1},q_{2}\in U_{L}\). Then, the following holds:

$$\begin{aligned} M_{L,j}({\overline{p}}^{L})=\Pi _{L}(\overline{X_{j}p}^{L}) =\Pi _{L}(\overline{p_{2}+q_{2}}^{L})=\Pi _{L}(\overline{p_{2}}^{L}) +\Pi _{L}(\overline{q_{2}}^{L})=\Pi _{L}(\overline{p_{2}}^{L}) =\overline{p_{2}}^{L}. \end{aligned}$$

In the same way we get \(M_{L,i}({\overline{p}}^{L})=\overline{p_{1}}^{L}\). Therefore:

$$\begin{aligned} M_{L,i}\circ M_{L,j}({\overline{p}}^{L})= M_{L,j}\circ M_{L,i}({\overline{p}}^{L})\iff&\\ M_{L,i}(\overline{p_{2}}^{L})=M_{L,j}(\overline{p_{1}}^{L})\iff&\\ \Pi _{L}(\overline{X_{i}p_{2}}^{L})=\Pi _{L}(\overline{X_{j}p_{1}}^{L}) \end{aligned}$$

Let \(f\in {\mathbb {R}}[{\underline{X}}]_{d+1}\) and write \(\Pi _{L}(f):={\overline{g}}\) for some \(g\in {\mathbb {R}}[{\underline{X}}]_{d}\). Then it holds:

$$\begin{aligned} \left\langle \Pi _{L}(\overline{X_{i}p_{2}-X_{j}p_{1}}^{L}),{\overline{f}}^{L} \right\rangle _{L} =\left\langle \overline{ X_{i}p_{2}}^{L},\Pi _{L}({\overline{f}}^{L})\right\rangle _{L} -\left\langle \overline{ X_{j}p_{1}}^{L},\Pi _{L}({\overline{f}}^{L}) \right\rangle _{L}&= \\ \left\langle \overline{X_{i}p_{2}}^{L},{\overline{g}}^{L} \right\rangle _{L}-\left\langle \overline{ X_{j}p_{1}}^{L},{\overline{g}}^{L} \right\rangle _{L} =L(X_{i}p_{2}g)-L(X_{j}p_{1}g)&= \\ L(X_{i}p_{2}g)-L(X_{j}p_{1}g)=L(X_{i}g(X_{j}p-q_{2}))-L(X_{j}g(X_{i}p-q_{1}))&= \\ L(X_{i}gX_{j}p)-L(X_{i}gq_{2})-L(X_{j}qX_{i}p)-L(X_{j}gq_{1})&=0 \end{aligned}$$

\(\square \)

Here we show some examples which show that the converse of Proposition 5.19 does not always hold.

Example 5.20

The truncated GNS multiplication operators of the following linear form:

$$\begin{aligned} L:{\mathbb {R}}[X_{1},X_{2}]_{4}\rightarrow {\mathbb {R}}, p \mapsto \frac{1}{4}(p(0,0)+p(1,0)+p(-1,0)+p(0,1)) \end{aligned}$$

commute but L is not flat. Indeed, if we do the truncated GNS-construction we have:

is the associated moment matrix of the linear form L and a basis of the truncated GNS-kernel of L is \(\left\langle X_{1}X_{2},X_{2}^{2}-X_{2}\right\rangle \). That is, the rank of \(M_{L}\) is 4. Moreover since in the kernel there is no polynomials of degree less or equal to 1, we get that the unique element in the kernel of \(L'\) is 0, then the truncated GNS space is \(\frac{{\mathbb {R}}[X_{1},X_{2}]_{1}}{U_{L'}}\cong {\mathbb {R}}[X_{1},X_{2}]_{1}\), which implies the dimension of the GNS-truncated space is 3 and therefore L is not flat by (vi) in Proposition 5.17. We can also verify that L is not flat by computing \(\widetilde{M_L}\). Indeed, in this case \(A_{M}\) is invertible and \(W_{M}\) is uniquely defined by \(W_M=A_{M}^{-1}B_{M}\), then \(\widetilde{M_{L}}\) reads:

$$\begin{aligned} \widetilde{M_{L}} = \left( \begin{array}{ccc|ccc} 1 &{}\quad 0 &{}\quad \frac{1}{4} &{}\quad \frac{1}{2} &{}\quad 0 &{}\quad \frac{1}{4} \\ 0 &{}\quad \frac{1}{2} &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ \frac{1}{4} &{}\quad 0 &{}\quad \frac{1}{4} &{}\quad 0 &{}\quad 0 &{}\quad \frac{1}{4}\\ \frac{1}{2} &{}\quad 0 &{}\quad 0 &{}\quad \frac{\mathbf{1 }}{\mathbf{3 }} &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0 \\ \frac{1}{4} &{}\quad 0 &{}\quad \frac{1}{4} &{}\quad 0 &{}\quad 0 &{}\quad \frac{1}{4} \end{array} \right) \end{aligned}$$

Since \(\widetilde{M_{L}}\ne M_{L}\) then L is not flat by (vii) in Proposition 5.17. Let us compute the truncated GNS multiplication operators of L. First note that:

$$\begin{aligned} T_{L}\cong \frac{{\mathbb {R}}[X_{1},X_{2}]_{1}}{U_{L'}}=\left\langle {\overline{1}}^{L'},\overline{X_{1}}^{L'},\overline{X_{2}}^{L'} \right\rangle \end{aligned}$$

Therefore by Remark 5.3 the truncated GNS space of L is:

$$\begin{aligned} T_{L}=\left\langle {\overline{1}}^{L},\overline{X_{1}}^{L},\overline{X_{2}}^{L} \right\rangle \end{aligned}$$

With the Gram-Schmidt orthonormalization process we get the following orthonormal basis with respect to the GNS product of L:

$$\begin{aligned} {\underline{v}} := \left\{ {\overline{1}}^{L}, \overline{\sqrt{2}X_{1}}^{L}, \overline{-\frac{\sqrt{3}}{3} + \frac{4\sqrt{3}}{3}X_{2}}^{L} \right\} \end{aligned}$$

The matrices of the GNS-multiplication operators with respect to this orthonormal basis are:

$$\begin{aligned}&A_{1}:=M(M_{L,X_{1}},{\underline{v}}) = \left( \begin{array}{ccc} 0 &{}\quad \frac{\sqrt{2}}{2} &{}\quad 0 \\ \frac{\sqrt{2}}{2}&{}\quad 0 &{}\quad -\frac{\sqrt{6}}{6} \\ 0 &{}\quad -\frac{\sqrt{6}}{6} &{}\quad 0 \end{array} \right) \\&A_{2}:=M(M_{L,X_{2}},{\underline{v}}) = \left( \begin{array}{ccc} \frac{1}{4} &{}\quad 0 &{}\quad \frac{\sqrt{3}}{4} \\ 0 &{}\quad 0 &{}\quad 0 \\ \frac{\sqrt{3}}{4} &{}\quad 0 &{}\quad \frac{3}{4} \end{array} \right) \end{aligned}$$

It is easy to check that the truncated GNS multiplication operators of L commute, that is \(M_{L,X_{1}}\circ M_{L,X_{2}}-M_{L,X_{2}}\circ M_{L,X_{1}}=0\). Now since \(M_{L,X_{1}}\) and \(M_{L,X_{2}}\) commute we can do the simultaneous diagonalization on both of them, in order to find an orthonormal basis of the truncation GNS of L consisting of common eigenvectors of \(M_{L,X_{1}}\) and \(M_{L,X_{2}}\). To do this we follow the same idea as in [20, Algorithm 4.1, Step 1] and compute for a matrix:

$$\begin{aligned} A=r_{1}A_{1}+r_{2}A_{2} \hbox { where } r_{1}^{2}+r_{2}^{2}=1 \end{aligned}$$

a matrix P orthogonal such that \(P^{T}AP\) is a diagonal matrix. In this case, we get for:

$$\begin{aligned} P= & {} \left( \begin{array}{ccc} \frac{1}{2} &{}\quad -\frac{\sqrt{6}}{4} &{}\quad -\frac{\sqrt{6}}{4} \\ 0 &{}\quad \frac{\sqrt{2}}{2} &{}\quad -\frac{\sqrt{2}}{2} \\ \frac{\sqrt{3}}{2} &{}\quad \frac{\sqrt{2}}{4} &{}\quad \frac{\sqrt{2}}{4} \\ \end{array} \right) \\ P^{T}A_{1}P= & {} \left( \begin{array}{ccc} 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad -\frac{\sqrt{6}}{3} &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad \frac{\sqrt{6}}{3} \\ \end{array} \right) \text{ and } P^{T}A_{2}P=\left( \begin{array}{ccc} 1 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 0 &{}\quad 0 \\ \end{array} \right) \end{aligned}$$

Looking over the proof of Theorem 5.14 we can obtain the weights \(\lambda _{1},\lambda _{2},\lambda _{3}\in {\mathbb {R}}_{>0}\) through the following operations:

$$\begin{aligned} P^{T}\left( \begin{array}{c} 1 \\ 0 \\ 0 \\ \end{array} \right) =\left( \begin{array}{c} \text { }\frac{1}{2}\\ -\frac{\sqrt{6}}{4} \\ -\frac{\sqrt{6}}{4} \\ \end{array} \right) \end{aligned}$$

then \(\lambda _{1}=(\frac{1}{2})^2\) and \(\lambda _{2}=\lambda _{3}=(-\frac{\sqrt{6}}{4})^2\). Therefore we get the following decomposition:

$$\begin{aligned} {\widetilde{M}}_{L}=\frac{1}{4}V_{2}\left( 0,1\right) V_{2} \left( 0,1\right) ^{T}+\frac{3}{8}V_{2}\left( -\frac{\sqrt{6}}{3},0\right) V_{2} \left( -\frac{\sqrt{6}}{3},0\right) ^{T}+\frac{3}{8}V_{2} \left( \frac{\sqrt{6}}{3},0\right) V_{2}\left( \frac{\sqrt{6}}{3},0\right) ^{T}. \end{aligned}$$

Example 5.21

Let us do the truncated GNS construction for the optimal solution that we got on the polynomial optimization problem described in Example 2.9, that is:

(37)

Setting \(\alpha :=\mathbf{M }(1,2)\) and \(\beta :=\mathbf{M }(1,3)\), the truncated GNS kernel of M is:

$$\begin{aligned} U_{\mathbf{M }}=\left\langle -\alpha +X_{1},-\beta +X_{2},-\alpha ^{2}+X_{1}^2, -\alpha \beta +X_{1}X_{2}\right\rangle \end{aligned}$$

the truncated GNS representation space is:

$$\begin{aligned} V_{\mathbf{M }}=\left\langle 1, X_{2}^{2} \right\rangle \end{aligned}$$

we have that:

$$\begin{aligned} U_{\mathbf{M }}\cap {\mathbb {R}}[X_{1},X_{2}]_{1}=\left\langle -\alpha +X_{1}, -\beta +X_{2}\right\rangle \end{aligned}$$

We need to add the polynomial 1 to \(U_{\mathbf{M }}\cap {\mathbb {R}}[X_{1},X_{2}]_{1}\) to get basis of \({\mathbb {R}}[X_{1},X_{2}]_{1}\) therefore we have that:

$$\begin{aligned} \frac{{\mathbb {R}}[X_{1},X_{2}]_{1}}{U_{\mathbf{M }}\cap {\mathbb {R}}[X_{1},X_{2}]_{1}}=\left\langle {\overline{1}}^{\mathbf{M }'} \right\rangle \end{aligned}$$

Hence By Remark 5.3 we get that:

$$\begin{aligned} T_{\mathbf{M }}=\left\langle {\overline{1}}^{L} \right\rangle \end{aligned}$$

Since \(v:=\left\langle {\overline{1}}^{\mathbf{M }}\right\rangle \) 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 \(\mathbf{M }\):

$$\begin{aligned} M(M_{\mathbf{M },X_{1}},v)={{\,\mathrm{poly}\,}}^{-1}(X_{1}1)\mathbf{M }{{\,\mathrm{poly}\,}}^{-1}(1)=&\left( \begin{array}{llllll} 0 &{}\quad 1 &{}\quad 0 &{}\quad 0 &{}\quad 0 &{}\quad 0\\ \end{array}\right) \mathbf{M } \left( \begin{array}{l} 1\\ 0\\ 0\\ 0\\ 0\\ 0\\ \end{array}\right) =\left( \alpha \right) \\ M(M_{\mathbf{M },X_{2}},v)={{\,\mathrm{poly}\,}}^{-1}(X_{2}1)\mathbf{M }{{\,\mathrm{poly}\,}}^{-1}(1)=&\left( \begin{array}{llllll} 0 &{}\quad 0 &{}\quad 1 &{}\quad 0 &{} 0 &{} 0\\ \end{array}\right) \mathbf{M } \left( \begin{array}{l} 1\\ 0\\ 0\\ 0\\ 0\\ 0\\ \end{array}\right) =\left( \beta \right) \end{aligned}$$

Therefore:

$$\begin{aligned} \widetilde{\mathbf{M }}=V_{2}(\alpha ,\beta )V_{2}(\alpha ,\beta )^{T} \end{aligned}$$

Then M admits a Gaussian quadrature rule. However it does not admit a quadrature rule. Indeed, suppose \(\mathbf{M }\) admits a quadrature rule with N nodes, then according to Proposition 5.9:

$$\begin{aligned} 2={{\,\mathrm{rank}\,}}\mathbf{M }\le N \le |V_{{\mathbb {C}}}(U_{\mathbf{M }})| \end{aligned}$$

But we can easily see that \(V_{{\mathbb {C}}}(U_{\mathbf{M }})=\{\left( \alpha ,\beta \right) \}\) and

$$\begin{aligned} {{\,\mathrm{rank}\,}}\mathbf{M }=2>|V_{{\mathbb {C}}}(\mathbf{U }_{\mathbf{M }})|=1 \end{aligned}$$

prevents to \(\mathbf{M }\) to have a quadrature rule.

Example 5.22

Let us consider the following generalized Hankel matrix in two variables of order 2 taken from [9, Example 1.13]:

This matrix does not have a quadrature rule representation with 3 nodes, as it has been proved in [9, Example 1.13], however it admits a Gaussian quadrature rule. Indeed, we can compute with the truncated GNS construction that:

$$\begin{aligned} {\widetilde{M}}=\frac{1}{6}V_{2}(0,0)V_{2}(0,0)^{T}+\frac{1}{3}V_{2} (0,3)V_{2}(0,3)^{T}+\frac{1}{2}V_{2}(2,0)V_{2}(2,0)^{T}. \end{aligned}$$

The following corollary is a very well known result of Curto and Fialkow (see [7, 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 [17, 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 it uses the Hilbert Nullstellensatz in the proof of Theorem 5.5, we do not need to apply the Hilbert Nullstellensatz to show that the nodes are in \({\mathbb {R}}^{n}\), since the nodes are real because their coordinates are the eigenvalues of a real symmetric matrix.

Corollary 5.23

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). Suppose L is flat then L has a quadrature rule with \({{\,\mathrm{rank}\,}}(M_{L})\) many nodes.

Proof

If L is flat by Proposition 5.19 the truncated GNS multiplication operators of L commute and applying Theorem 5.14 then L has a quadrature rule on \(G_{L}\), see Eq. (32), with \(\dim (T_{L}){\mathop {=}\limits ^{L \text { is flat }}} \dim (V_{L})={{\,\mathrm{rank}\,}}(M_{L})\) many nodes. Since L is flat \({\mathbb {R}}[{\underline{X}}]_{d+1}={\mathbb {R}}[{\underline{X}}]_{d}+U_{L}\) and therefore one can easily see that \(G_{L}={\mathbb {R}}[{\underline{X}}]_{2d+2}\). As a conclusion we get a quadrature rule for L with \({{\,\mathrm{rank}\,}}(M_{L})\) many nodes. \(\square \)

6 Main theorem

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). 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}M_{L'}W_{L}\) being a generalized Hankel and existence of a unique flat extension for the linear form \(L'\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d}\). The novelty of this result is the relation of the truncated GNS construction with existing results in polynomial optimization. In [3] and [3, Theorem 4.5.4, Theorem 4.5.5] the Theorem 6.1 is proved for a linear form \(\Lambda \in {\mathbb {R}}[{\underline{X}}]^{*}\) not necessarily positive semidefinite where instead of working with the truncated GNS multiplication operators they defined the multiplication operators in a different way where it is necessarily to assume \(\dim \left( \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}\right) <\infty \).

Main Theorem 6.1

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). The following assertions are equivalent:

  1. (i)

    The truncated GNS multiplication operators \(M_{L,1},\ldots , M_{L,n}\) pairwise commute.

  2. (ii)

    There exists an (unique) \({\hat{L}}\in {\mathbb {R}}[{\underline{X}}]_{2d+2}^{*}\) such that:

    $$\begin{aligned} {\left\{ \begin{array}{ll} {\hat{L}}=L\text { on }{\mathbb {R}}[{\underline{X}}]_{2d+1} \\ {\hat{L}}(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\text { and}\\ {\hat{L}}\text { is flat}. \end{array}\right. } \end{aligned}$$
  3. (iii)

    \(\widetilde{M_{L}}\) is a generalized Hankel matrix

Proof

(i)\(\implies \)(ii). By the Theorem 5.14 there exist \(a_1,\ldots ,a_N\in {\mathbb {R}}^{n}\) pairwise different nodes and \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\) weights, where \(N:=\dim (T_{L})\) such that:

$$\begin{aligned} L(p)=\sum _{i=1}^{N}\lambda _{i}p(a_{i})\text { for all }p\in G_{L} \end{aligned}$$

where \(G_{L}\) was defined in Eq. (32). Let us define, \({\hat{L}}:=\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]_{2d+2}^{*}\). We have shown in Theorem 5.14 that:

$$\begin{aligned} {\left\{ \begin{array}{ll} {\hat{L}}=L\text { on }{\mathbb {R}}[{\underline{X}}]_{2d+1} \\ {\hat{L}}(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\text { and}\\ \end{array}\right. } \end{aligned}$$

So it remains to show that \({\tilde{L}}\) is flat and according to the characterization (v) of Proposition 5.17 and Proposition 5.1, this is equivalent to prove:

$$\begin{aligned} \dim V_{{\hat{L}}}=\dim T_{{\hat{L}}} \end{aligned}$$

or equivalently using Proposition 5.1, it remains to show:

$$\begin{aligned} \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d+1}}{U_{{\hat{L}}}}\right) =\dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{{\hat{L}}} \cap {\mathbb {R}}[{\underline{X}}]_{d}}\right) \end{aligned}$$

Now, since \(U_{{\hat{L}}}\cap {\mathbb {R}}[{\underline{X}}]_{d}=U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}\) and using again Proposition 5.1, we have the following:

$$\begin{aligned} \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{{\hat{L}}}\cap {\mathbb {R}}[{\underline{X}}]_{d}}\right) =\dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}}\right) {\mathop {=}\limits ^{5.1}}\dim (T_{L})=N \end{aligned}$$

On the other side, we will prove \(\dim (\frac{{\mathbb {R}}[{\underline{X}}]_{d+1}}{U_{{\hat{L}}}})=N\). For this purpose, let us consider the following linear map, between Euclidean vector spaces:

$$\begin{aligned} \frac{{\mathbb {R}}[{\underline{X}}]_{d+1}}{U_{{\hat{L}}}} \hookrightarrow \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }},{\overline{p}}^{{\hat{L}}} \mapsto {\overline{p}}^{\Lambda }\text {, for }p\in {\mathbb {R}}[{\underline{X}}]_{d+1} \end{aligned}$$
(38)

where \(\Lambda :=\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_ {a_{i}}\in {\mathbb {R}}[{\underline{X}}]^{*}\). Notice that the canonical map (38) is well defined since \(U_{{\hat{L}}}= U_{\Lambda }\cap {\mathbb {R}}[{\underline{X}}]_{d+1}\) and therefore it is injective. Then

$$\begin{aligned} \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d+1}}{U_{{\hat{L}}}}\right) \le \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}\right) {\mathop {=}\limits ^{5.8}} N \end{aligned}$$

It remains to show \(N\le \dim (\frac{{\mathbb {R}}[{\underline{X}}]_{d+1}}{U_{{\hat{L}}}})\). But this is true, since:

$$\begin{aligned} N=\dim (T_{L}){\mathop {=}\limits ^{5.1}}\dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}}\right) = \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{{\hat{L}}}\cap {\mathbb {R}}[{\underline{X}}]_{d}} \right) \le \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d+1}}{U_{{\hat{L}}}}\right) \end{aligned}$$

(ii)\(\implies \)(i). Since \({\hat{L}}\) is flat, then by Proposition 5.19 we know that the truncated GNS multiplication operators of \({\hat{L}}\) pairwise commute. Then by applying again Theorem 5.14 there exists \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\), pairwise different nodes, and \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\) weights, with \(N=\dim ( T_{{\hat{L}}})\) such that if we set \(\Lambda :=\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]^{*}\), we get \(\Lambda (p)={\hat{L}}(p)=L(p)\) for all \(p\in {\mathbb {R}}[{\underline{X}}]_{2d+1}\), and \(U_{L}\subseteq U_{{\hat{L}}}\subseteq U_{\Lambda }\). Indeed notice that \(U_{L}\subseteq U_{{\hat{L}}}\) since for \(p\in U_{L}\), \(L(pq)={\hat{L}}(pq)=0\) for all \(q\in {\mathbb {R}}[{\underline{X}}]_{d}\), and since \({\hat{L}}\) is flat this implies \(p\in U_{ {\hat{L}}}\). Obviously \(M_{\Lambda ,i}\) pairwise commute for all \(i\in \{1,\ldots ,n\}\), since they are the original GNS operators modulo \(U_{\Lambda }\) defined in 4.6. In order to prove that \(M_{L,i}\) pairwise commute for all \(i\in \{1,\ldots ,n\}\), let us first consider the linear isometry \(\sigma _{1}\) (30) of the Proposition 5.10. We proved already that \(\sigma _{1}\) is a linear isometry then:

$$\begin{aligned} \dim (T_{L})\le \dim (\frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}) \end{aligned}$$

Therefore we have the following inequalities:

$$\begin{aligned} \begin{aligned} N=\dim (T_{{\hat{L}}})=\dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{{\hat{L}}}\cap {\mathbb {R}}[{\underline{X}}]_{d}}\right) =\dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}}\right) =&\\ \dim (T_{L})\le \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }} \right) {\mathop {=}\limits ^{5.8}}N&\\ \end{aligned} \end{aligned}$$

then we have equality everywhere and \(\dim (T_{L})=\dim (\frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }})\). Then \(\sigma _{1}\) in this particular case is surjective and in conclusion is an isomorphism of vector spaces. This last fact will allow us to prove that the following diagram is commutative for all \(i\in \{1,\ldots ,n\}\):

(39)

That is to say \(M_{L,i}=\sigma _{1}^{-1}\circ M_{\Lambda ,i}\circ \sigma _{1}\). To show this let \(p,q\in {\mathbb {R}}[{\underline{X}}]_{d}\), then we have:

$$\begin{aligned} \left\langle M_{L,i}({\overline{p}}^{L}),{\overline{q}}^{L} \right\rangle _{L} = \left\langle \Pi _{L}(\overline{X_{i}p}^{L}),{\overline{q}}^{L} \right\rangle _{L}{\mathop {=}\limits ^{\Pi _{L}\circ \Pi _{L}=\Pi _{L}}} \left\langle \overline{X_{i}p}^{L},{\overline{q}}^{L} \right\rangle _{L} =L(X_{i}pq)&= \\ \Lambda (X_{i}pq)=\left\langle \overline{X_{i}p}^{\Lambda },{\overline{q}}^{\Lambda }\right\rangle _{\Lambda } =\left\langle \sigma _{1}\circ \sigma ^{-1}_{1}(\overline{X_{i}p}^{\Lambda }),{\overline{q}}^{\Lambda } \right\rangle _{\Lambda } = \left\langle \sigma ^{-1}_{1}(\overline{X_{i}p}^{\Lambda }),\sigma ^{-1}_{1}({\overline{q}}^{\Lambda }) \right\rangle _{L}&=\\ \left\langle \sigma ^{-1}_{1}\circ M_{\Lambda ,i}({\overline{p}}^{\Lambda }),{\overline{q}}^{L}\right\rangle _{L}= \left\langle \sigma ^{-1}_{1}\circ M_{\Lambda ,i}\circ \sigma _{1} ({\overline{p}}^{L}),{\overline{q}}^{L} \right\rangle _{L}&\\ \end{aligned}$$

Finally we can conclude that the truncated GNS multiplication operators of L pairwise commute, using the commutativity of the GNS multiplication operators of \(\Lambda \). Indeed:

$$\begin{aligned} M_{L,i}\circ M_{L,j}=\sigma ^{-1}_{1}\circ M_{\Lambda ,i}\circ \sigma _{1}\circ \sigma ^{-1}_{1}\circ M_{\Lambda ,j}\circ \sigma _{1}=\sigma ^{-1}_{1}\circ M_{\Lambda ,i}\circ M_{\Lambda ,j}\circ \sigma _{1}=&\nonumber \\ \sigma ^{-1}_{1}\circ M_{\Lambda ,j}\circ M_{\Lambda ,i}\circ \sigma _{1}=\sigma ^{-1}_{1}\circ M_{\Lambda ,j}\circ \sigma _{1}\circ \sigma ^{-1}_{1}\circ M_{\Lambda ,i}\circ \sigma _{1}=M_{L,j}\circ M_{L,i}&\end{aligned}$$
(40)

(ii)\(\implies \)(iii). Due to \({\hat{L}}=L\) on \({\mathbb {R}}[{\underline{X}}]_{2d+1}\) the moment matrix \(M_{{\hat{L}}}\) is of the form:

(41)

for some \(S\in {\mathbb {R}}_{\succeq 0}^{r_{d+1}\times r_{d+1}}\). Since \({\hat{L}}\) is flat it must be \(S=W^{T}_{L}M_{L'}W_{L}\), uniquely determined due to the welldefinedness of the modified moment matrix \(\widetilde{M_{L}}\) as we proved in Lemma 4.7. Hence \(M_{{\hat{L}}}=\widetilde{M_{L}}\), and since \(M_{{\hat{L}}}\) is obviously generalized Hankel, \(\widetilde{M_{L}}\) is generalized Hankel as well.

(iii)\(\implies \)(ii). Define the following linear form \({\hat{L}}\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that for all \(p,q\in {\mathbb {R}}[{\underline{X}}]_{d+1}\):

$$\begin{aligned} {\hat{L}}(pq):={{\,\mathrm{poly}\,}}^{-1}(p)^{T}\widetilde{M_{L}}poly^{-1}(q) \end{aligned}$$

It is obviouly well defined since \(\widetilde{M_{L}}\) is generalized Hankel, and it is positive semidefinite since \({\widetilde{M}}\) is always positive semidefinite, see Lemma 4.7 for a proof. \({\hat{L}}\) is flat since its moment matrix is \(M_{{\hat{L}}}=\widetilde{M_{L}}\) which is flat.

Note that the uniqueness of the linear form \({\hat{L}}\) in the second statement is determined because \({\hat{L}}\) is flat and \({\hat{L}}=L\) on \({\mathbb {R}}[{\underline{X}}]_{2d+1}\). Indeed, the modified moment matrix of L, by the Lemma 4.7 is of the form:

for some matrices \(W\in {\mathbb {R}}^{s_{d}\times r_{d+1}}\) and \(X\in {\mathbb {R}}^{r_{d+1}\times r_{d+1}}\). Since \({\hat{L}}=L\) on \({\mathbb {R}}[{\underline{X}}]_{2d+1}\) and \({\hat{L}}\) is flat its moment matrix it is uniquely determined, that is to say has the form:

and therefore \({\hat{L}}\) is unique. \(\square \)

Comparison between Theorem 6.1 and [3, Theorem 4.2] 6.2 6.2

It is important to point out that the results in [3, Theorem 4.2] are more general than the main Theorem 6.1 in this paper. Due to here we work with a linear form which is non-negative on the sum of squares of polynomials and in [3, Theorem 4.2], is not necessary this condition. Moreover in the flat case, the results are the same. In the other cases the multiplication operators are only well defined with the GNS truncated construction. We refer also the reader to the paper [4, Theorem 3.3], so far the theorem with the most general setting of this Theorem 6.1.

The following result is a corollary of Theorem 6.1 and gives us a generalization of a classical Theorem from Putinar [23, pages 189–190]. They proved the equivalence between the existence of a Gaussian quadrature rule with the commutativity of the truncated GNS multiplication operators for a positive definite linear form on \({\mathbb {R}}[{\underline{X}}]\). The generalization here comes from the fact that the result holds also if the linear form is defined on \({\mathbb {R}}[{\underline{X}}]_{2d+2}\) for \(d\in {\mathbb {N}}_{0}\) and it is positive semidefinite i.e. we do not assume \(U_{L}=\{0\}\). We also provide a third equivalent condition in the result which is \(W^{T}_{L}M_{L'}W_{L}\) is a generalized Hankel matrix, a fact which seems no to have been noticed so far.

Corollary 6.3

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). The following assertions are equivalent:

  1. (i)

    The linear form L admits a Gaussian quadrature rule.

  2. (ii)

    The truncated GNS multiplication operators of L commute.

  3. (iii)

    \(\widetilde{M_{L}}\) is a generalized Hankel matrix.

Proof

(i)\(\implies \)(ii). Assume that L admits a Gaussian quadrature rule, that is to say:

$$\begin{aligned} L(p)=\sum _{i=1}^{N}\lambda _{i}p(a_{i})\text { for all }p\in {\mathbb {R}}[{\underline{X}}]_{2d+1} \end{aligned}$$

where \(N:=\dim (T_{L})\), \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\) and the points \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\) are pairwise different. Let us set \(\Lambda :=\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]^{*}\). Using Proposition 5.8 we have the following:

$$\begin{aligned} \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}\right) =N=\dim T_{L} \end{aligned}$$

Let us consider the following canonical map \(\sigma _{2}\):

$$\begin{aligned} \sigma _{2}:\frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}} \hookrightarrow \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }} \end{aligned}$$

By Proposition 5.1:

$$\begin{aligned} \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}}\right) =\dim (T_{L}) \end{aligned}$$

Therefore the canonical map \(\sigma _{2}\), is an isomorphism of Euclidean vector spaces. Now, define the following isomorphism of Euclidean vector spaces:

$$\begin{aligned} \beta :=\sigma _{2}\circ \sigma _{L} \end{aligned}$$

where \(\sigma _{L}\) was defined in (28). The proof continues in the same way we proved (ii)\(\implies \)(i) of Theorem 6.1 by proving the following diagram is commutative:

Notice that here \(\beta \) does the job of \(\sigma _{1}\) in (ii)\(\implies \)(i) in Theorem 6.1.

\((ii)\implies (i)\).

It is a particular case of (i)\(\implies \)(ii) in Theorem 6.1. \((ii)\iff (iii)\). It is (i)\(\iff \)(iii) in Theorem 6.1. \(\square \)

The following Theorem 6.4 is a slight generalization of a result of Möller and it will give us a better lower bound in the number of nodes of a quadrature rule on \({\mathbb {R}}[{\underline{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 ([22, 23]). This result will show that the bound is also true for positive semidefinite linear forms and it uses the same ideas as in [23]. This generalization 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.6 below.

Theorem 6.4

Let \(L\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d+2}\) such that \(L(\sum {\mathbb {R}}[{\underline{X}}]^{2}_{d+1})\subseteq {\mathbb {R}}_{\ge 0}\). The number of nodes N of a Gaussian quadrature rule for L satisfies:

$$\begin{aligned} N\ge \dim (T_{L})+\frac{1}{2}\max _{1\le j,k\le n}({{\,\mathrm{rank}\,}}[M_{L,j},M_{L,k}]) \end{aligned}$$
(42)

Proof

Assume L has a quadrature rule with N nodes, that is to say, there exist \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\) weights and \(a_{1},\ldots ,a_{N}\) in \({\mathbb {R}}^{n}\) pairwise different nodes, such that \(L(p)=\sum _{i=1}^{N}\lambda _{i}p(a_{i})\) for all \(p\in {\mathbb {R}}[{\underline{X}}]_{2d+1}\). Let us set \(\Lambda :=\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]^{*}\). By using Proposition 5.8 we have that:

$$\begin{aligned} \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}\right) =N<\infty . \end{aligned}$$

Then we can choose an orthonormal basis of \(\frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}\). Let us denote such a basis by \(\beta _{\Lambda }:=\{\overline{\beta _{1}}^{\Lambda }, \ldots ,\overline{\beta _{N}}^{\Lambda } \}\) for \(\beta _{1},\ldots ,\beta _{N}\in {\mathbb {R}}[{\underline{X}}]\) pairwise different. Then we have that the transformation matrix of the multiplication operators \(M_{\Lambda ,i}\) with respect to this orthonormal basis is:

$$\begin{aligned} (\Lambda (X_{i}\beta _{k}\beta _{j}))_{1\le k,j \le N} \end{aligned}$$

The set \(A:=\{\text { }{\overline{p}}^{\Lambda }\text { }|\text { }p\in {\mathbb {R}}[{\underline{X}}]_{d}\}\) is a subspace of \(\frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }}\) so we can assume without loss of generality that \(\beta _{1},\ldots ,\beta _{r}\in {\mathbb {R}}[{\underline{X}}]_{d}\) where \(r:=\dim A\) is a basis of A. Then since \(L=\Lambda \) on \({\mathbb {R}}[{\underline{X}}]_{2d+1}\), we obtain:

$$\begin{aligned} (M(M_{\Lambda ,i},\beta _{\Lambda })):=(\Lambda (X_{i}\beta _{k}\beta _{j}))_{1\le k,j \le N}=\left( \begin{array}{c|ccc} (L(X_{i}\beta _{k}\beta _{j}))_{1\le k,j \le r} &{} B_{i}\\ \hline B_{i}^{t}&{} C_{i}\\ \end{array} \right) \end{aligned}$$
(43)

\((M(M_{\Lambda ,i},\beta _{\Lambda }))\) is the transformation matrix of the i-th truncated GNS multiplication operator of \(\Lambda \) with respect to the basis \(\beta _{\Lambda }\) and where \(B_{i}\in {\mathbb {R}}^{r\times N-r}\) and \(C_{i}\in {\mathbb {R}}^{N-r\times N-r}\) are symmetric matrices. We will show that \(\beta _{L}:=\{\overline{\beta _{1}}^{L}, \ldots , \overline{\beta _{r}}^{L}\}\) is an orthonormal basis of \(T_{L}\).

To this end, note that by Proposition 5.10, \(\dim T_{L}\ge N\), and then by Proposition 5.1 it also holds that:

$$\begin{aligned} \dim \left( \frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}}\right) \ge N \end{aligned}$$

This last inequality together with Proposition 5.8 implies that the following canonical map:

$$\begin{aligned} \sigma _{2}:\frac{{\mathbb {R}}[{\underline{X}}]_{d}}{U_{L}\cap {\mathbb {R}}[{\underline{X}}]_{d}} \hookrightarrow \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }} \end{aligned}$$

is an isomorphism of Euclidean vector spaces. Then we have that:

$$\begin{aligned} \sigma :=\sigma _{2}\circ \sigma _{L} \end{aligned}$$

is also an isomorphism of Euclidean vector spaces, where \(\sigma _{L}\) was defined in (28). And then:

$$\begin{aligned} \sigma (T_{L})=\{ \sigma ({\overline{p}}^{L})\text { }|\text { }{\overline{p}}^{L}\in T_{L} \}=\{\sigma ({\overline{p}}^{L})\text { }|\text { }p\in {\mathbb {R}}[{\underline{X}}]_{d}\}=\{\text { }{\overline{p}}^{\Lambda }\text { }|\text { }p\in {\mathbb {R}}[{\underline{X}}]_{d}\}=A \end{aligned}$$

Hence, we get:

$$\begin{aligned} \sigma (T_{L})=\langle \overline{\beta _{1}}^{\Lambda },\ldots ,\overline{\beta _{r}}^{\Lambda }\rangle \end{aligned}$$

And since we have chosen \(\beta _{i}\in {\mathbb {R}}[{\underline{X}}]_{d}\) for all \(i\in \{1,\ldots ,r\}\), then we have \(\sigma (\overline{\beta _{i}}^{L})=\overline{\beta _{i}}^{\Lambda }\). Therefore \(\beta _{L}:=\{\overline{\beta _{1}}^{L},\ldots ,\overline{\beta _{r}}^{L}\}\) generate a basis of \(T_{L}\). It remains to show that \(\beta _{L}\) is orthonormal. To see that \(\beta _{L}\) is orthonormal we use the fact that \(\sigma \) is an isometry and that \(\sigma (T_{L})=A\). Indeed for \(1\le i,j \le r\):

$$\begin{aligned} \delta _{ij}=\Lambda (\beta _{i}\beta _{j})=\langle \overline{\beta _{j}}^{\Lambda },\overline{\beta _{i}}^{\Lambda } \rangle _{\Lambda }{\mathop {=}\limits ^{}}\langle \sigma ^{-1}(\overline{\beta _{j}}^{\Lambda }),\sigma ^{-1} (\overline{\beta _{i}}^{\Lambda })\rangle _{L}=\langle \overline{\beta _{j}}^{L},\overline{\beta _{i}}^{L}\rangle _{L} \end{aligned}$$

Therefore we have shown that:

where :

$$\begin{aligned} (M(M_{L,i},\beta _{L})):=(L(X_{i}\beta _{k}\beta _{j}))_{1\le k,j \le N} \end{aligned}$$

Using the fact that the matrices \(M(M_{\Lambda ,i},\beta _{\Lambda })\) commute, we have the following equality:

$$\begin{aligned} M(M_{L,j},\beta _{L})M(M_{L,i},\beta _{L})-M(M_{L,i},\beta _{L})M(M_{L,j}, \beta _{L})=B_{i}B_{j}^{T}-B_{j}B_{i}^{T} \end{aligned}$$

Therefore the following holds:

$$\begin{aligned} {{\,\mathrm{rank}\,}}(B_{i}B_{j}^{T}-B_{j}B_{i}^{T})\le 2{{\,\mathrm{rank}\,}}(B_{i}B_{j}^{T})\le 2{{\,\mathrm{rank}\,}}(B_{i})\le 2\min \{r,N-r\} \le 2 (N-r) \end{aligned}$$

and then:

$$\begin{aligned} {{\,\mathrm{rank}\,}}[M(A_{L,j},\beta _{L}),M(A_{L,i},\beta _{L})]\le 2(N-r) \end{aligned}$$

Since we have already proved \(r=\dim T_{L}\) we can conclude the proof.

\(\square \)

Remark 6.5

Note that we can use the previous Theorem 6.4 to show in a different way \((1)\Rightarrow (2)\) in the Corollary 6.3. Indeed, let us suppose that L has a Gaussian quadrature rule that is to say with \(N=\dim T_{L}\) nodes. Using the inequality (42) we get that \({{\,\mathrm{rank}\,}}[M_{L,j},M_{L,k}]=0\) for \(j,k\in \{ 1,\ldots ,n\}\) therefore the truncated GNS multiplication operators of L commute.

Example 6.6

Let us consider the following polynomial optimization problem taken from [16]:

$$\begin{aligned} \begin{aligned}&{\text {minimize}}&f(x)=x_{1}^2x_{2}^2(x_{1}^2+x_{2}^2-1) \\&\text {subject to}&x_{1},x_{2}\in {\mathbb {R}}\end{aligned} \end{aligned}$$

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 these derivatives intersect in 4 real points: \(\left( \pm \frac{1}{\sqrt{3}},\pm \frac{1}{\sqrt{3}} \right) \in {\mathbb {R}}^{2}\). Therefore we know in advance that (P) has at most 4 minimizers. On the other side, an optimal solution of the Moment relaxation of order 8 \((P_{8})\), that is \(\mathbf{M }:=M_{8,1}(y)\) read as:

$$\begin{aligned} \left( \begin{array}{rrrrrrrrrrrrrrr} 1.00&{}\quad 0.00&{}\quad 0.00&{}\quad 62.12&{}\quad -0.00&{}\quad 62.12&{}\quad 0.00&{}\quad 0.00&{}\quad 0.00&{}\quad 0.00\\ 0.00&{}\quad 62.12&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad 0.00&{}\quad 9666.23&{}\quad -0.00&{}\quad 8.33&{}\quad -0.00\\ 0.00&{}\quad -0.00&{}\quad 62.12&{}\quad 0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00&{}\quad 8.33&{}\quad -0.00&{}\quad 9666.23\\ 62.12&{}\quad 0.00&{}\quad 0.00&{}\quad 9666.23&{}\quad -0.00&{}\quad 8.33&{}\quad 0.00&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00\\ -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00&{}\quad 8.33&{}\quad -0.00&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00\\ 62.12&{}\quad 0.00&{}\quad 0.00&{}\quad 8.33&{}\quad -0.00&{}\quad 9666.23&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00&{}\quad 0.00\\ 0.00&{}\quad 9666.23&{}\quad -0.00&{}\quad 0.00&{}\quad -0.00&{}\quad 0.00&{}\quad 3150633.17&{}\quad -0.00&{}\quad 2.27&{}\quad 0.00\\ 0.00&{}\quad -0.00&{}\quad 8.33&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00&{}\quad 2.27&{}\quad 0.00&{}\quad 2.27\\ 0.00&{}\quad 8.33&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00&{}\quad 2.27&{}\quad 0.00&{}\quad 2.27&{}\quad -0.00\\ 0.00&{}\quad -0.00&{}\quad 9666.23&{}\quad 0.00&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad 2.27&{}\quad -0.00&{}\quad 3150630.69\\ 9666.23&{}\quad 0.00&{}\quad -0.00&{}\quad 3150633.17&{}\quad -0.00&{}\quad 2.27&{}\quad 0.42&{}\quad -0.00&{}\quad -0.00&{}\quad 0.00\\ -0.00&{}\quad -0.00&{}\quad 0.00&{}\quad -0.00&{}\quad 2.27&{}\quad 0.00&{}\quad -0.00&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00\\ 8.33&{}\quad 0.00&{}\quad 0.00&{}\quad 2.27&{}\quad 0.00&{}\quad 2.27&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00\\ -0.00&{}\quad 0.00&{}\quad -0.00&{}\quad 0.00&{}\quad 2.27&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00&{}\quad -0.00\\ 9666.23&{}\quad -0.00&{}\quad 0.00&{}\quad 2.27&{}\quad -0.00&{}\quad 3150630.69&{}\quad 0.00&{}\quad -0.00&{}\quad -0.00&{}\quad 0.33 \end{array}\right. \\ \left. \begin{array}{rrrrrrrrrrrrrrr} 9666.23&{}\quad -0.00&{}\quad 8.33&{}\quad -0.00&{}\quad 9666.23\\ 0.00&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00\\ -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00&{}\quad 0.00\\ 3150633.17&{}\quad -0.00&{}\quad 2.27&{}\quad 0.00&{}\quad 2.27\\ -0.00&{}\quad 2.27&{}\quad 0.00&{}\quad 2.27&{}\quad -0.00\\ 2.27&{}\quad 0.00&{}\quad 2.27&{}\quad -0.00&{}\quad 3150630.69\\ 0.42&{}\quad -0.00&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00\\ -0.00&{}\quad -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00\\ -0.00&{}\quad 0.00&{}\quad 0.00&{}\quad -0.00&{}\quad -0.00\\ 0.00&{}\quad 0.00&{}\quad -0.00&{}\quad -0.00&{}\quad 0.33\\ 2466755083.36&{}\quad -43.48&{}\quad 169698627.89&{}\quad -6.08&{}\quad 134568970.57\\ -43.48&{}\quad 169698627.89&{}\quad -6.08&{}\quad 134568970.57&{}\quad 15.08\\ 169698627.89&{}\quad -6.08&{}\quad 134568970.57&{}\quad 15.08&{}\quad 169698562.66\\ -6.08&{}\quad 134568970.57&{}\quad 15.08&{}\quad 169698562.66&{}\quad 25.61\\ 134568970.57&{}\quad 15.08&{}\quad 169698562.66&{}\quad 25.61&{}\quad 2466752654.76 \end{array} \right) \end{aligned}$$

and the rank of the commutator of the truncated GNS multiplication operators is:

$$\begin{aligned}&{{\,\mathrm{rank}\,}}[M_{\mathbf{M },X_{1}},M_{\mathbf{M },X_{1}}]= \\&{{\,\mathrm{rank}\,}}\left( \begin{array}{rrrrrrrrrr} 0 &{}\quad 0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad -0.00 \\ -0.00 &{}\quad 0 &{}\quad -0.00 &{}\quad 0.00 &{}\quad 0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad 0.00 &{}\quad -0.00 \\ -0.00 &{}\quad 0.00 &{}\quad 0 &{}\quad 0.00 &{}\quad 0.00 &{}\quad 0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad 0.00 \\ 0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad 0 &{}\quad -0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad -0.00 \\ 0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad 0 &{}\quad 0.00 &{}\quad 0.00 &{}\quad 0.00 &{}\quad 0.00 &{}\quad 0.00 \\ -0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad 0 &{}\quad -0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad -0.00 \\ -0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad 0 &{}\quad -313.91 &{}\quad -0.00 &{}\quad 115.50 \\ 0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad 313.91 &{}\quad 0 &{}\quad 0.18 &{}\quad 0.00 \\ -0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad -0.18 &{}\quad 0 &{}\quad 0.05 \\ 0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad -0.00 &{}\quad 0.00 &{}\quad -115.50&{}\quad -0.00 &{}\quad -0.05 &{}\quad 0 \end{array}\right) =4 \end{aligned}$$

If \(\mathbf{M }\) had a quadrature rule on \({\mathbb {R}}[X_{1},X_{2}]_{7}\) with N nodes, since \(f\in {\mathbb {R}}[X_{1},X_{2}]_{7}\) by Proposition 3.9 (iii) the N nodes of the quadrature rule would be global minimizers of f and \(P^{*}=P^{*}_{8}\), and according to Theorem 6.4:

$$\begin{aligned} N\ge \dim (T_{L})+\frac{1}{2}\max _{1\le j,k\le n}({{\,\mathrm{rank}\,}}[M_{L,j},M_{L,k}])=10 + \frac{1}{2}4=12 \end{aligned}$$

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 \(\mathbf{M }\) does not have a quadrature rule on \({\mathbb {R}}[{\underline{X}}]_{7}\), and in particular it does not have a quadrature rule.

7 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 case we also find potential global minimizers. In the article [15] Henrion and Lasserre the stopping criterion was L to be flat and in this algorithm the stopping criterium is \(W_{L}^{T}M_{L'}W_{L}\) being Hankel, and as we have already seen in Proposition 5.19 and in Example 5.21 this condition is more general. It is 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 by linear polynomials (in particular if the set S is \({\mathbb {R}}^{n}\)) or we have flat extension of some degree on the optimal solution, that is to say \({{\,\mathrm{rank}\,}}M_{d}(y)={{\,\mathrm{rank}\,}}M_{s}(y)\) for sufficient small s, see [18, Theorem 6.18] or [8, Theorem 1.6] for a proof. At the end of this paper we summarize all these 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 Example 2.9 and in Example 2.11.

Theorem 7.1

Let \(f,p_{1},\ldots ,p_{m}\in {\mathbb {R}}[{\underline{X}}]_{2d}\) and L be a feasible solution of \((P_{2d})\). Suppose that \(W_{L}^{T}A_{L}W_{L}\) is a generalized Hankel matrix. Then L has a quadrature rule on \(G_{L}\). Moreover, suppose the nodes of the quadrature rule lie on the basic closed semialgebraic set S, see Eq. (1), and \(f\in {\mathbb {R}}[{\underline{X}}]_{2d-1}\), then \(L(f)=P^{*}\) and the nodes are global minimizers.

Proof

Since \(W^{T}_{L}A_{L}W_{L}\) is generalized Hankel by Corollary 6.3 and Theorem 5.14 there exist nodes \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\) and weights \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\), where \(N:=\dim T_{L}\) such that:

$$\begin{aligned} L(p)=\sum _{i=1}^{N}\lambda _{i}p(a_{i})\text { for all }p\in G_{L} \end{aligned}$$

Moreover if the nodes of this quadrature rule are contained in S by Proposition 3.9 (iii) \(P^{*}=P^{*}_{d}=f(a_{i})\) for \(i\in \{1,\ldots ,N\}\). \(\square \)

The following Lemma was already proved in [17, lemma 2.7]. We will use it to prove the Corollary 7.3.

Lemma 7.2

Let \(L=\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]_{2d}^{*}\) for \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\) pairwise different points and \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\) such that \(N=\dim T_{L}\). Then there exist interpolation polynomials \(q_{1},\ldots ,q_{N}\in {\mathbb {R}}[{\underline{X}}]_{d-1}\) at the points \(a_{1},\ldots ,a_{N}\).

Proof

Let us consider the isometry map (30) already defined in Proposition 5.10:

$$\begin{aligned} \sigma _{1}:T_{L} \longrightarrow \frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }},{\overline{p}}^{L} \mapsto {\overline{p}}^{\Lambda },\text { for }p\in {\mathbb {R}}[{\underline{X}}]_{d-1} \end{aligned}$$

It is moreover an isomorphism of Euclidean vector spaces since \(\dim (\frac{{\mathbb {R}}[{\underline{X}}]}{U_{\Lambda }})=N\) by Proposition 5.8. It is very well known that there exist interpolation polynomials \(h_{1},\ldots ,h_{N}\in {\mathbb {R}}[{\underline{X}}]\) at the points \(a_{1},\ldots ,a_{N}\), such that \(h_{i}(a_{j})=\delta _{i,j}\) for \(i,j\in \{1,\ldots ,n\}\). Define \(\overline{q_{j}}^{L}:=\sigma ^{-1}(\overline{h_{j}}^{\Lambda })\) for \(q_{j}\in {\mathbb {R}}[{\underline{X}}]_{d-1}\). Then for \(j\in \{1,\ldots ,N\}\):

$$\begin{aligned} 0\le \sum _{i=1}^{N}\lambda _{i}q_{j}^{2}(a_{i})=L(q_{j}^{2})=\left\langle \overline{q_{j}}^{L},\overline{q_{j}}^{L} \right\rangle _{L}=\left\langle \overline{h_{j}}^{\Lambda } , \overline{h_{j}}^{\Lambda } \right\rangle _{\Lambda }=\Lambda (h_{j}^{2})=\lambda _{j} \end{aligned}$$

and therefore \(q_{j}(a_{i})=\delta _{i,j}\) for \(i,j\in \{1,\ldots ,N\}\). \(\square \)

Corollary 7.3

Let \(p_{1},\ldots ,p_{m}\in {\mathbb {R}}[{\underline{X}}]_{1}\) and L be a feasible solution of \((P_{2d})\) with \(f\in {\mathbb {R}}[{\underline{X}}]_{2d-1}\). Suppose that \(W_{L}^{T}A_{L}W_{L}\) is a generalized Hankel matrix. Then L has a quadrature rule representation on \(G_{L}\), \(L(f)=P^{*}\) and the nodes are minimizers of (P).

Proof

From Theorem 7.1 there exist nodes \(a_{1},\ldots ,a_{N}\in {\mathbb {R}}^{n}\) and weights \(\lambda _{1}>0,\ldots ,\lambda _{N}>0\), where \(N:=\dim T_{L}\) such that:

$$\begin{aligned} L(p)=\sum _{i=1}^{N}\lambda _{i}p(a_{i})\text { for all }p\in G_{L} \end{aligned}$$

To conclude the proof of Corollary 7.3 by Theorem 7.1 it is enough to show that the nodes \(a_{1},\ldots ,a_{N}\) are contained in S. In Theorem 6.1 we proved that \({\hat{L}}:=\sum _{i=1}^{N}\lambda _{i}{{\,\mathrm{ev}\,}}_{a_{i}}\in {\mathbb {R}}[{\underline{X}}]^{*}_{2d}\) is flat. Then by Lemma 7.2 there are interpolation polynomials \(q_{1},\ldots ,q_{N}\) at the points \(a_{1},\ldots ,a_{N}\) having at most degree \(d-1\). Since \(\deg (q_{i}^{2}p_{j})\le 2d -1\) then \(q_{i}^{2}p_{j}\in T_{2d}(p_{1},\ldots ,p_{m})\) and therefore:

$$\begin{aligned} 0\le L(q_{i}^{2}p_{j})={\hat{L}}(q_{i}^2p_{j})=\lambda _{i}p_{j}(a_{i}) \end{aligned}$$

This equality proves that \(p_{j}(a_{i})\ge 0\) for \(j\in \{1,\ldots ,m \}\) and \(i\in \{1,\ldots ,N \}\) so we can conclude \(\{a_{1},\ldots ,a_{N} \}\subseteq S\). \(\square \)

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.

figure b

Remark 7.5

Note that this algorithm is not always terminating for all polynomial optimization problems, since if we end up in step 19 then we try again to solve a new semidefinite program and check if for this case the associated matrix has a generalized Hankel form. We refer the reader to Chapter 6 in [18] for more details about the conditions required in the polynomial optimization problem to find minimizers.

Remark 7.6

Note that this algorithm is not always terminating for all polynomial optimization problems, since if we end up in step 19 then we try again to solve a new semidefinite program and check if for this case the associated matrix has a generalized Hankel form. We refer the reader to Chapter 6 in [18] for more details about the conditions required in the polynomial optimization problem to find minimizers.

8 Software and examples

To find an optimal solution of the Moment relaxation and for solving the semidefinite optimization problems we have used the following softwares:

  • YALMIP: developed by J. Löfberg. It is a toolbox for Modeling and Optimization in MATLAB. Published in the Journal Proceedings of the CACSD Conference in 2004. For more information see: http://yalmip.github.io/.

  • SEDUMI: developed by J. F. Sturm. It is a toolbox for optimization over symmetric cones. Published in the Journal Optimization Methods and Software in 1999. For more information see: http://sedumi.ie.lehigh.edu/.

  • MATLAB and Statistics Toolbox Release 2016a, The MathWorks, Inc., Natick, Massachusetts, United States.

Example 8.1

Let us apply the algorithm to the following polynomial optimization problem, taken from [13] :

$$\begin{aligned} \begin{aligned}&{\text {minimize}}&f(x)=100(x_{2}-x_{1}^2)^2+100(x_{3}-x_{2}^2)^2+(x_{1}-1)^2+(x_{2}-1)^2 \\&\text {subject to}&-2.048\le x_{1}\le 2.048\\&&-2.048\le x_{2}\le 2.048\\&&-2.048\le x_{3}\le 2.048 \\ \end{aligned} \end{aligned}$$

We initialize \(\mathbf{k }=4\) and compute an optimal solution of the Moment relaxation \((P_{4})\). In this case, it reads as:

We can check that:

$$\begin{aligned} W^{T}_{\mathbf{M }}A_{\mathbf{M }}W_{\mathbf{M }} =\left( \begin{array}{cccccc} 1.0000 &{} \quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad \mathbf{1}.0000 \end{array} \right) \end{aligned}$$

is a generalized Hankel matrix but \(f\notin {\mathbb {R}}[X_{1},X_{2},X_{3}]_{3}\) and \(C_{\mathbf{M }}\ne W^{T}_{\mathbf{M }}A_{\mathbf{M }}W_{\mathbf{M }}\), so we need to try again with \(\mathbf{k }=5\) and in this case the solution of the Moment relaxation \((P_{5})\) reads as:

we can calculate that:

$$\begin{aligned} W^{T}_{\mathbf{M }}A_{\mathbf{M }}W_{\mathbf{M }} =\left( \begin{array}{cccccc} 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad \mathbf{1}.0000 \end{array} \right) \end{aligned}$$

is a Hankel matrix but \(f\notin {\mathbb {R}}[X_{1},X_{2},X_{3}]_{3}\) and \(C_{\mathbf{M }}\ne W^{T}_{\mathbf{M }}A_{\mathbf{M }}W_{\mathbf{M }}\). In this case if by rounding we can consider \(C_{\mathbf{M }}=W^{T}_{\mathbf{M }}A_{\mathbf{M }}W_{\mathbf{M }}\), i.e. M flat, and continue with the algorithm and we could obtain already the minimizers, but to be more precise let us increase to \(\mathbf{k }=6\) and we get the following optimal solution in the Moment relaxation \((P_{6})\):

(44)

where:

and

We calculate that:

$$\begin{aligned} W^{T}_{\mathbf{M }}A_{\mathbf{M }}W_{\mathbf{M }}= \left( \begin{array}{cccccccccc} 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 \\ 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000 &{}\quad 1.0000\\ \end{array} \right) \end{aligned}$$

is a generalized Hankel matrix and \(f\in {\mathbb {R}}[X_{1},X_{2},X_{3}]_{5}\). By Theorem 7.3 we have optimality with optimal value \(P^{*}=P^{*}_{6}=2.3527\cdot 10^{-8}\approx 0\). Finally we get that the matrices of the truncated GNS operators with respect to the orthonormal basis \(v:=\left\langle 1 \right\rangle _{\mathbf{M }}\) are:

$$\begin{aligned} M(M_{\mathbf{M },X_{1}},v)=\left( 1 \right) , M(M_{\mathbf{M },X_{2}},v)=\left( 1 \right) \text { and } M(M_{\mathbf{M },X_{2}},v)=\left( 1 \right) \end{aligned}$$

The operators are in diagonal form so we have already an orthonormal basis of \(T_{\mathbf{M }}\) of common eigenvectors of the truncated GNS operators of \(\mathbf{M }\) \(v:=\left\langle 1 \right\rangle _{\mathbf{M }}\), then a global minimizer is \(\left( 1,1,1\right) \in {\mathbb {R}}^{n}\), and:

$$\begin{aligned} \widetilde{\mathbf{M }}=V_{3}(1,1,1)V_{3}^{T}(1,1,1). \end{aligned}$$

Example 8.2

Let us consider the following polynomial optimization problem, defined on a non convex closed semialgebraic set, taken from [14, problem 4.6] :

$$\begin{aligned} \begin{aligned}&{\text {minimize}}&f(x)=-x_{1}-x_{2}\\&\text {subject to}&x_{2}\le 2x_{1}^4-8x_{1}^3+8x_{1}^2+2\\&&x_{2}\le 4x_{1}^4-32x_{1}^3+88x_{1}^2-96x_{1}+36\\&&0\le x_{1} \le 3\\&&0\le x_{2} \le 4\\ \end{aligned} \end{aligned}$$

We initialize \(\mathbf{k }=4\). An optimal solution of \((P_{4})\) reads as:

(45)

and

(46)

taking for example:

$$\begin{aligned} W_{\mathbf{M }} = \left( \begin{array}{lll} 9 &{}\quad 0 &{}\quad 0\\ 0 &{}\quad 0 &{}\quad 0 \\ 0 &{}\quad 3 &{}\quad 4 \\ \end{array} \right) \end{aligned}$$

\(\widetilde{\mathbf{M }}\) is a generalized Hankel matrix. The matrix of the truncated GNS multiplication operators with respect to the orthonormal basis \(v=\left\langle {\overline{1}}^{\mathbf{M }} \right\rangle \) are:

$$\begin{aligned} M(M_{\mathbf{M },1},v) = \left( \begin{array}{l} 3 \\ \end{array} \right) and M(M_{\mathbf{M },1},v)= \left( \begin{array}{l} 4 \\ \end{array} \right) \end{aligned}$$

Hence the candidate to minimizer is \(\left( 3,4\right) \), however it does not lie in S, then \(\left( 3,4\right) \) cannot be a minimizer and \(f(3,4)=-7\) cannot be the minimum. Then we try with a relaxation of order \(\mathbf{k }=5\). An optimal solution of the Moment relaxation \((P_{5})\) is the following:

(47)

In this case \(C_{\mathbf{M }}=W_{\mathbf{M }}^{T}A_{\mathbf{M }}W_{\mathbf{M }}\), therefore \(\mathbf{M }\) is flat and in particular the operators commute by Proposition 5.19. After the simultaneous diagonalization of the truncated GNS operators we get that the candidates to minimizers are \((0,4)\notin S\) and \((3,4)\notin S\). Hence we try with a relaxation of order \(\mathbf{k }=6\). An optimal solution of the Moment relaxation \((P_{6})\) reads as:

(48)

and

is a generalized Hankel matrix. However we get the same candidates to minimizers as in the previous relaxation which do not belong to S. Finally we increase to \(\mathbf{k }=7\), and we get after rounding, the following optimal solution of \((P_{7})\):

It holds that \(\widetilde{\mathbf{M }}=\mathbf{M }\), therefore in particular \(\widetilde{\mathbf{M }}\) is a generalized Hankel matrix and the truncated multiplication operators commute. The matrices of the truncated GNS multiplication operators with respect to the orthonormal basis \(v:=\{{\overline{1}}^{\mathbf{M }} \}\) are:

$$\begin{aligned} M(M_{\mathbf{M },X_{1}},v) = \left( \begin{array}{l} 2.3295 \end{array} \right) and M(M_{\mathbf{M },X_{2}},v) = \left( \begin{array}{l} 3.1785 \end{array} \right) \end{aligned}$$

Since \(\left( 2.3295, 3.1785 \right) \in S\) then it is also a minimizer and we proved optimality \(P^{*}=P^{*}_{7}=-5.5080\).

Example 8.3

Let us consider the following polynomial optimization problem taken from [16, example 5]:

$$\begin{aligned} \begin{aligned}&\text {minimize}&f(x)=-(x_{1}-1)^2-(x_{1}-x_{2})^2-(x_{2}-3)^2 \\&\text {subject to}&1-(x_{1}-1)^2\ge 0\\&&1-(x_{1}-x_{2})^2\ge 0\\&&1-(x_{2}-3)^2\ge 0 \\ \end{aligned} \end{aligned}$$

For \(k=2\) and \(k=3\) in the algorithm, the modified moment matrix of the optimal solution of the Moment relaxation is generalized Hankel and we get as a potential minimizers, after the truncated GNS construction, \(\left( 1.56,2.18\right) \in S\) in both relaxations, however \(f\notin {\mathbb {R}}[X_{1},X_{2}]_{1}\) so we can not conclude \(\left( 1.56,2.18\right) \) is a global minimum. When we increase to \(k=4\), and compute an optimal solution of the Moment relaxation \((P_{4})\). We get:

and we can verify \(\widetilde{\mathbf{M }}=\mathbf{M }\). Hence in this case \(\mathbf{M }\) is flat, then it is clear that \(\widetilde{\mathbf{M }}\) is a generalized Hankel matrix implying that the truncated GNS multiplication operators of \(\mathbf{M }\) commute. We proceed to do the truncated GNS construction and we get the following orthonormal basis of \(W_{\mathbf{M }}\):

$$\begin{aligned} W_{\mathbf{M }}=\left\langle {\overline{1}}^{\mathbf{M }},\overline{-2.08816+2.0234X_{1}}^{\mathbf{M }}, \overline{-6.0047-0.9291X_{1}+3.4669X_{2}}^{\mathbf{M }} \right\rangle \end{aligned}$$

Denote \(v:=\{ {\overline{1}}^{\mathbf{M }},\overline{-2.08816+2.0234X_{1}}^{\mathbf{M }}, \overline{-6.0047-0.9291X_{1}+3.4669X_{2}}^{\mathbf{M }}\}\) such a basis. Then the transformation matrices of the truncated GNS multiplication operators with respect to this basis are:

$$\begin{aligned}&A_{1}:=M(M_{\mathbf{M },X_{1}},v)=\left( \begin{array}{ccc} 1.4241 &{}\quad 0.4942 &{}\quad 0.0000 \\ 0.4942 &{}\quad 1.5759 &{}\quad 0.0000 \\ 0.0000 &{}\quad 0.0000 &{}\quad 2.0000 \\ \end{array} \right) \\&A_{2}:=M(M_{\mathbf{M },X_{2}},v)=\left( \begin{array}{ccc} 2.1137 &{}\quad 0.1324 &{}\quad 0.2884 \\ 0.1324 &{}\quad 2.1543 &{}\quad 0.3361 \\ 0.2884 &{}\quad 0.3361 &{}\quad 2.7320 \\ \end{array} \right) \end{aligned}$$

Again we follow the same idea as in [20, algorithm 4.1 Step 1] to apply simultaneous diagonalization to the matrices \(A_{1}\) and \(A_{2}\). For this purpose we find the orthogonal matrix P that diagonalize a matrix of the following form:

$$\begin{aligned} A=r_{1}A_{1}+r_{2}A_{2}\text { where }r_{1}^{2}+r_{2}^{2}=1 \end{aligned}$$

For

$$\begin{aligned} P=\left( \begin{array}{rrr} 0.7589 &{}\quad 0.5572 &{}\quad 0.3371 \\ -0.6512 &{}\quad 0.6493 &{}\quad 0.3929 \\ 0.0000 &{}\quad -0.5177 &{}\quad 0.8556 \end{array} \right) \end{aligned}$$

we get the following diagonal matrices:

$$\begin{aligned} P^{T}A_{1}P=\left( \begin{array}{rrr} 1.0000 &{}\quad 0.0000 &{}\quad -0.0000 \\ 0.0000 &{}\quad 2.0000 &{}\quad 0.0000 \\ -0.0000 &{}\quad 0.0000 &{}\quad 2.0000 \end{array} \right) , P^{T}A_{2}P=\left( \begin{array}{rrr} 2.0000 &{}\quad -0.0000 &{}\quad 0.0000 \\ -0.0000 &{}\quad 2.0000 &{}\quad -0.0000 \\ 0.0000 &{}\quad -0.0000 &{}\quad 3.0000 \end{array} \right) \end{aligned}$$

and with the operation:

$$\begin{aligned} P^{T}\left( \begin{array}{c} 1 \\ 0 \\ 0 \\ \end{array} \right) =\left( \begin{array}{c} 0.7589\\ 0.5572 \\ 0.3371 \\ \end{array} \right) \end{aligned}$$

we get the square roots of the weights of the quadrature formula. Then we have the following decomposition:

$$\begin{aligned} \mathbf{M }=\widetilde{\mathbf{M }}=0.5759V_{2}(1,2)V_{2}^{T}(1,2) +0.3105V_{2}(2,2)V_{2}^{T}(2,2)+0.1137V_{2}(2,3)V_{2}^{T}(2,3) \end{aligned}$$

In this case the points \(\left( 1,2\right) \),\(\left( 2,2\right) \), and \(\left( 2,3 \right) \) lie on S, as we already know since it holds the condition of the Theorem 1.6 in [8], and therefore they are global minimizers of (P), and the minimum is \(P^{*}=P^{*}_{4}=-2\).