Theorem (Matrix.IsHermitian.posSemidef_iff_trace_mul_nonneg).Self-duality of the positive semidefinite cone. A Hermitian matrix is positive semidefinite exactly when its trace pairing with every positive semidefinite matrix is nonnegative: \mathbf{0} \preceq \mathbf{A} iff 0 \le \operatorname{tr}(\mathbf{A}\mathbf{B}) for all \mathbf{0} \preceq \mathbf{B}. [HornJohnson2013, Theorem 7.5.4].
Headline (provisional)
Lean statement and details
Matrix.IsHermitian.posSemidef_iff_trace_mul_nonneg.{u_1, u_2} {๐ : Type u_1} [RCLike ๐]
{n : Type u_2} [Fintype n] {A : Matrix n n ๐} (hA : A.IsHermitian) :
A.PosSemidef โ โ (B : Matrix n n ๐), B.PosSemidef โ 0 โค (A * B).trace
Theorem (Matrix.PosSemidef.trace_mul_eq_zero_iff).Vanishing trace pairing of positive semidefinite matrices. For positive semidefinite \mathbf{A} and \mathbf{B}, \operatorname{tr}(\mathbf{A}\mathbf{B}) = 0 exactly when \mathbf{A}\mathbf{B} = \mathbf{0}. [HornJohnson2013, Theorem 7.5.4].
Lean statement and details
Matrix.PosSemidef.trace_mul_eq_zero_iff.{u_1, u_2} {๐ : Type u_1} [RCLike ๐] {n : Type u_2}
[Fintype n] {A B : Matrix n n ๐} (hA : A.PosSemidef) (hB : B.PosSemidef) :
(A * B).trace = 0 โ A * B = 0
Theorem (Matrix.PosSemidef.trace_mul_le_trace_mul).Monotonicity of the trace pairing in the Loewner order. The trace pairing with a positive semidefinite matrix is monotone in the Loewner order: for \mathbf{0} \preceq \mathbf{A} and \mathbf{B} \preceq \mathbf{C}, \operatorname{tr}(\mathbf{A}\mathbf{B}) \le \operatorname{tr}(\mathbf{A}\mathbf{C}). [HornJohnson2013, Theorem 7.5.4].
Lean statement and details
Matrix.PosSemidef.trace_mul_le_trace_mul.{u_1, u_2} {๐ : Type u_1} [RCLike ๐] {n : Type u_2}
[Fintype n] {A B C : Matrix n n ๐} (hA : A.PosSemidef) (hBC : B โค C) :
(A * B).trace โค (A * C).trace
Theorem (Matrix.PosSemidef.trace_mul_nonneg).Nonnegative trace pairing of positive semidefinite matrices. The trace of a product of two positive semidefinite matrices is nonnegative: 0 \le \operatorname{tr}(\mathbf{A}\mathbf{B}), in the order of \Bbbk (so the trace is real). [HornJohnson2013, Theorem 7.5.4].
Lean statement and details
Matrix.PosSemidef.trace_mul_nonneg.{u_1, u_2} {๐ : Type u_1} [RCLike ๐] {n : Type u_2} [Fintype n]
{A B : Matrix n n ๐} (hA : A.PosSemidef) (hB : B.PosSemidef) : 0 โค (A * B).trace