consider the canonical involution on $\operatorname{GM}_n(K,\operatorname{J})$ and $\operatorname{UD}_n(K,\operatorname{J})$ we use $*$ to denote it.

A Positivstellensatz {#sec6}
--------------------

Let ${\mathbb{K}}\in\{{\mathbb{R}},{\mathbb{C}}\}$ be endowed with the complex conjugation involution ${{\overline}{\phantom{x}}}$. Our aim in this subsection is to deduce a non-dimensionfree version of Helton’s sum of hermitian squares theorem. We will describe symmetric NC polynomials $f$ all of whose evaluations in $M_n({\mathbb{K}})$ are positive semidefinite, see Theorem \[thm:positiv\].

We start with a lemma characterizing total $*$-positivity in the algebra of generic matrices $\operatorname{GM}_n({\mathbb{K}},\operatorname{J})$. The proof of the following proposition uses some elementary model theory, e.g. Tarski’s transfer principle for real closed fields. All the necessary background can be found in [@PD §1 and §2] or, alternatively, [@BCR §1].

\[lem:uf\] Let $n\in {\mathbb{N}}$. If ${\mathbb{K}}={\mathbb{R}}$, let $\operatorname{J}=$ orthogonal and if ${\mathbb{K}}={\mathbb{C}}$, let $\operatorname{J}=$ unitary. If $a=a^*\in\operatorname{GM}_n({\mathbb{K}},\operatorname{J})$ is totally $\sigma$-positive under each $*$-homomorphism from $\operatorname{GM}_n({\mathbb{K}},\operatorname{J})$ to $M_n({\mathbb{K}})$ endowed with a positive type $\operatorname{J}$ involution $\sigma$, then $a$ is totally $*$-positive $($in $\operatorname{UD}_n({\mathbb{K}},\operatorname{J}))$.

Suppose $a\in \operatorname{GM}_n({\mathbb{K}},\operatorname{J})$ is not totally $*$-positive. Then there is a $*$-ordering $\leq$ of the fixed field $Z$ of the centre of $\operatorname{UD}_n({\mathbb{K}},\operatorname{J}))$ under which $\operatorname{Trd}(x^*ax)$ is not positive semidefinite. Let $\langle \alpha_1,\ldots, \alpha_{m}\rangle$ be the diagonalisation of $\operatorname{Trd}(x^*x)$ with $\alpha_i=\alpha_i^* \in Z$. 