Theorem 3.3 (proof idea, p. 4):
ProvedContrastiveDuality.gram_cov_frobenius_eqFor every real matrix , the Gram matrix and the (uncentred) covariance matrix of the embeddings have the same squared Frobenius norm:
The paper names this identity as the fact on which the proof of Theorem 3.3 hinges: penalising all entries of the Gram matrix is the same as penalising all entries of .
import Mathlib import Definitions.Def_ContrastiveDuality_Basic open MeasureTheory ProbabilityTheory Matrix
namespace ContrastiveDuality
theorem gram_cov_frobenius_eq {M N : ℕ} (K : Matrix (Fin M) (Fin N) ℝ) :
frobSq (Kᵀ * K) = frobSq (K * Kᵀ) := by sorry
end ContrastiveDualityRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let and be arbitrary natural numbers (either may be ), and let be an arbitrary real matrix with entries , where the row index ranges over and the column index ranges over . There are no further hypotheses on .
For a real matrix of any shape , the statement uses the quantity
which is the sum of the squares of all entries, taken directly with no square root. The theorem applies this to two matrices built from :
- the Gram matrix , with entries ;
- the matrix , with entries .
The theorem asserts the unconditional equality
that is,
Both sides include the diagonal entries; nothing is removed by the extracted-diagonal operation. The statement does not involve the sample-contrastive or dimension-contrastive criteria, the row or column norms, or the uniform sphere measure from the definitions file.
In the degenerate cases or , every inner sum or outer sum is empty. Both sides then equal , and the equality holds trivially.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.