next | previous | forward | backward | up | top | index | toc | Macaulay2 web site
SumsOfSquares :: sosInIdeal

sosInIdeal -- sum of squares polynomial in ideal

Synopsis

Description

This methods finds sums-of-squares polynomials in ideals. It accepts two types of inputs that are useful for different purposes. The first invocation is to give a one row matrix with polynomial entries and a degree bound. The method then tries to find a sum of squares in the generated ideal. More precisely, given equations h1(x),...,hm(x), the method looks for polynomial multipliers hi(x) such that i li(x) hi(x) is a sum of squares.

i1 : R = QQ[x,y,z];
i2 : h = matrix {{x^2-4*x+2*y^2, 2*z^2-y^2+2}};

             1       2
o2 : Matrix R  <--- R
i3 : (sol,mult) = sosInIdeal (h, 2);
i4 : sosPoly sol

      11    1      2    11    2
o4 = (--)(- -x + 1)  + (--)(z)
       2    2            2

o4 : SOSPoly
i5 : h * mult == sosPoly sol

o5 = true

The second invocation is on a quotient ring, also with a degree bound. This tries to decompose the zero of the quotient ring as a sum of squares.

i6 : S = R/ideal h;
i7 : sol = sosInIdeal (S, 2);
i8 : sosPoly sol

      145    1      2    145    2
o8 = (---)(- -x + 1)  + (---)(z)
       2     2            2

o8 : SOSPoly
i9 : sosPoly sol

      145    1      2    145    2
o9 = (---)(- -x + 1)  + (---)(z)
       2     2            2

o9 : SOSPoly

Caveat

This implementation only works with the solvers "CSDP" and "MOSEK".

Ways to use sosInIdeal :