# Checking if a symbolic matrix is positive semi-definite

As far as I can tell, there is no way to tell the builtin PositiveSemidefiniteQ about assumptions on symbols.

For example, the matrix

{{1,0,0,Sqrt[1-p]}, {0,0,0,0}, {0,0,p,0}, {Sqrt[1-p],0,0,1-p}}


has eigenvalues {0,0,2-p,p} and is therefore positive semi-definite whenever 0<=p<=2, but PositiveSemidefiniteQ always returns False.

Is checking the non-negativity of the eigenvalues with \$Assumptions a good way to test for this? Or would it be better to do something like row-reduction? There are a bunch of algorithms answering this related question, but I don't know which ones translate best to symbolics.

Edits:

1. The scope section of the documentation for PositiveSemidefiniteQ says "The test returns False unless it is true for all possible complex values of symbolic parameters")
2. For clarification, I mean my questions exactly as stated above. To paraphrase, what is the best way to check for the positive semi-definite condition of a symbolic matrix allowing for symbol assumptions? This question is given in the context that, in the numeric case, checking eigenvalue signs is not the best way.
• "I am therefore interested in an implementation that allows for assumptions." <-- I would recommend rewriting your question, including this bit of information I found, and asking specifically about such an implementation. I deleted my answer to give room for new ones. For reference, my answer pointed at the documentation of PositiveDefiniteMatrixQ, Examples -> Scope. Apr 15, 2015 at 19:57

One way is shown below. Alternatives include using Simplify with Assumptions, again on testing that the eigenvalues are nonnegative.
Resolve[