Using the trace as the objective function is a heuristic for obtaining SOS decompositions with small number of summands. Here we repeat Example 5 from [P05] and recover the shorter solution from that paper:
i1 : R = QQ[x,y]/ideal(x^2 + y^2 - 1); |
i2 : f = 10-x^2-y; |
i3 : sosPoly solveSOS (f, 2) Executing CSDP Input file: /tmp/M2-3824400-0/4.dat-s Output file: /tmp/M2-3824400-0/5 Status: SDP solved, primal-dual feasible Start rational rounding o3 = coeffs: 83 {7, 6, --} 28 gens: 1 {y - --, x, 1} 14 o3 : SOSPoly |
i4 : sosPoly solveSOS (f, 2, TraceObj=>true) Executing CSDP Input file: /tmp/M2-3824400-0/8.dat-s Output file: /tmp/M2-3824400-0/9 Status: SDP solved, primal-dual feasible Start rational rounding o4 = coeffs: 35 {9, --} 36 gens: 1 {- --y + 1, y} 18 o4 : SOSPoly |