Given polynomials gi and coefficients di, this method computes f = ∑i di gi2. The polynomials and coefficients can be given as lists or encapsulated in an object of type SOSPoly.
i1 : R = QQ[x,y]; |
i2 : sumSOS( {x+1,y}, {2,3} )
2 2
o2 = 2x + 3y + 4x + 2
o2 : R
|
i3 : s = sosPoly(R, {x+1,y}, {2,3} )
o3 = coeffs:
{2, 3}
gens:
{x + 1, y}
o3 : SOSPoly
|
i4 : sumSOS( s )
2 2
o4 = 2x + 3y + 4x + 2
o4 : R
|