AFTD Auto-Formalizing Theoretical Domains

matrix_has_psd_factorization

def

For types m and n, a real matrix M : Matrix m n ℝ has a positive semidefinite (PSD) factorization of size r (for a natural number r) if there exist families of r × r positive semidefinite matrices A : m → Matrix (Fin r) (Fin r) ℝ and B : n → Matrix (Fin r) (Fin r) ℝ such that each A i and B j is positive semidefinite and M i j = Matrix.trace (A i * B j) for all i and j.

Statement

def matrix_has_psd_factorization {m n : Type*} (M : Matrix m n ℝ) (r : ℕ) : Prop
Defined in
scout/2610-04498-rank-sensitive-vertex-bounds-for-semidefinite-lifts.md:351
Verified
22 Oct 2026
Axioms
none listed
Used by 14

Read back from the Lean

A matrix M : Matrix m n ℝ has a PSD (positive semidefinite) factorization of size r : ℕ if there exist families of r × r real matrices A : m → Matrix (Fin r) (Fin r) ℝ and B : n → Matrix (Fin r) (Fin r) ℝ such that: 1. for every i : m, A i is positive semidefinite; 2. for every j : n, B j is positive semidefinite; and 3. for all i : m and j : n, the entry M i j equals the trace of the product matrix A i * B j.

Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.

Lean source view module on GitHub

/-- A real matrix has a positive semidefinite factorization of size r if its entries can be written as traces of products of r × r positive semidefinite matrices. -/
def matrix_has_psd_factorization {m n : Type*} (M : Matrix m n ℝ) (r : ℕ) : Prop := ∃ (A : m → Matrix (Fin r) (Fin r) ℝ) (B : n → Matrix (Fin r) (Fin r) ℝ),
    (∀ i, (A i).PosSemidef) ∧ (∀ j, (B j).PosSemidef) ∧ ∀ i j, M i j = Matrix.trace (A i * B j)
See it in the graphDiscuss this resultChallenge it