I'm running into an issue enforcing a particular constraint on the variables of a SemidefiniteOptimization problem (I'm using Mathematica 12.3).
Specifically, it seems that if a matrix $A$ and a vector $u$ are variables, one cannot directly enforce the constraint $A \geq u u^T$:
A = {{a[1, 1], a[1, 2]}, {a[1, 2], a[2, 2]}};
U = {{u[1]}, {u[2]}};
SemidefiniteOptimization[a[1, 1] + 2 a[1, 2] + a[2, 2],
{VectorGreaterEqual[{A, U.Transpose[U]}, {"SemidefiniteCone", 2}],
u[1] - u[2] == 1}, {a[1, 1], a[1, 2], a[2, 2], u[1], u[2]}]
results in an error "SemidefiniteOptimization::ctuc: The curvature (convexity or concavity) of the term {u[1]^2,u[1] u[2]} in the constraint ... could not be determined."
This particular issue can be remedied by an equivalent formulation, notably
$$ A \geq u u^T \quad \text{if and only if} \quad \begin{pmatrix} A & u \\ u^T & 1 \end{pmatrix} \geq 0. \qquad (*) $$ For example,
soln = SemidefiniteOptimization[a[1, 1] + 2 a[1, 2] + a[2, 2],
{VectorGreaterEqual[{ArrayFlatten[{{A, U}, {Transpose[U],1}}], 0}, {"SemidefiniteCone", 3}],
u[1] - u[2] == 1}, {a[1, 1], a[1, 2], a[2, 2], u[1], u[2]}];
(* succeeds *)
Eigenvalues[A - U . Transpose[U] /. soln]
(* {20.2665, -4.84524*10^-10}, i.e., A >= U U^T upto numerical errors *)
In my application, the constraint I want to impose is actually $A \leq uu^T$. Trying the direct method results in a similar error message about being unable to determine the nature of the constraint.
Can anyone provide guidance on how to coax Mathematica's SemidefiniteOptimization routine to be able to enforce this constraint more directly? Any insights from the community here would be much appreciated.