Theorem C.4 (proof, eqs. (40)-(46)): trace forms of and
ProvedContrastiveDuality.criteria_trace_formsLet be any real matrix. Then the two criteria of Definition 3.2 have the trace forms
These are equations (44) and (46) of the proof of Theorem 3.3: both criteria share the term and differ only in the diagonal correction.
import Mathlib import Definitions.Def_ContrastiveDuality_Basic open MeasureTheory ProbabilityTheory Matrix
namespace ContrastiveDuality
theorem criteria_trace_forms {M N : ℕ} (K : Matrix (Fin M) (Fin N) ℝ) :
nonContrastiveCriterion K =
Matrix.trace (Kᵀ * K * Kᵀ * K) - Matrix.trace (K * Kᵀ * extractedDiag (K * Kᵀ)) ∧
contrastiveCriterion K =
Matrix.trace (Kᵀ * K * Kᵀ * K) - Matrix.trace (Kᵀ * K * extractedDiag (Kᵀ * K)) := by sorry
end ContrastiveDualityRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be arbitrary natural numbers, including . Let be an arbitrary real matrix, with entries for and . There are no other hypotheses.
Notation used in the statement.
- For a square real matrix , denotes the extracted diagonal. It is the square matrix of the same size whose diagonal entries are and whose off-diagonal entries are all .
- is the sum of the squares of all entries of .
- is the ordinary matrix trace, the sum of the diagonal entries.
- is the Gram matrix of the rows of .
- is the Gram matrix of the columns of .
The two criteria appearing in the statement are defined as follows.
- The non-contrastive (dimension-contrastive) criterion is the sum of the squared off-diagonal entries of :
- The contrastive (sample-contrastive) criterion is the sum of the squared off-diagonal entries of :
Assertion. The theorem claims that both of the following identities hold simultaneously:
Remarks on the precise form.
- The first trace term is literally the same in both identities. It is the trace of the matrix , including in the identity for . The statement never writes it as the trace of the matrix .
- In the identity, the subtracted term is the trace of an product.
- In the identity, the subtracted term is the trace of an product.
Degenerate cases. If or , then every matrix involved is empty or zero. Both sides of both identities are then .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.