Positive-semidefinite function