This method creates the kernel and image model of the Gram matrices of a polynomial f.
A Gram matrix representation of f is a symmetric matrix Q such that f = mon’ Q mon, where mon is a vector of monomials. The set of all Gram matrices Q is an affine subspace. This subspace can be described in image form as Q = C - ∑i yi Ai, or in kernel form as A q = b where q is the vectorization of Q.
For parametric SOS problems the image form is Q = C - ∑i yi Ai - ∑j pj Bj, where pj are the parameters, and the kernel form is A q + B p = b.