  Given a monic linear pencil L in g variables let D_L be its positivity
domain, i.e., the set of all g-tuples X of symmetric matrices of all sizes
making L(X) positive semidefinite. Because L is a monic linear pencil, D_L is
convex with interior, and conversely it is known that convex bounded
noncommutative semialgebraic sets with interior are all of the form D_L. The
main result of this paper establishes a perfect noncommutative
Nichtnegativstellensatz on a convex semialgebraic set. Namely, a noncommutative
polynomial p is positive semidefinite on D_L if and only if it has a weighted
sum of squares representation with optimal degree bounds: p = s^* s + \sum_j
f_j^* L f_j, where s, f_j are vectors of noncommutative polynomials of degree
no greater than 1/2 deg(p). This noncommutative result contrasts sharply with
the commutative setting, where there is no control on the degrees of s, f_j and
assuming only p nonnegative, as opposed to p strictly positive, yields a clean
Positivstellensatz so seldom that such cases are noteworthy.
