  We study the ideal generated by polynomials vanishing on a semialgebraic set
and propose an algorithm to calculate the generators, which is based on some
techniques of the cylindrical algebraic decomposition. By applying these,
polynomial optimization problems with polynomial equality constraints can be
modified equivalently so that the associated semidefinite programming
relaxation problems have no duality gap. Elementary proofs for some criteria on
reality of ideals are also given.
