AFTD Auto-Formalizing Theoretical Domains

traceBinomialGap

def

For d by d complex matrices A and B and a natural number k, the trace binomial gap Delta_k(A, B) is the difference between the binomial trace sum sum_{j=0}^k binom(k, j) Re tr(A^j B^(k-j)) and Re tr((A + B)^k).

Statement

def traceBinomialGap {d : ℕ} (k : ℕ) (A B : Matrix (Fin d) (Fin d) ℂ) : ℝ
Defined in
arXiv:2411.33774
Verified
26 Nov 2026
Axioms
none listed
Used by 1
  • trace_binomial_gap_of_commuteFor any natural number k and any two commuting complex d by d matrices A and B, the trace binomial gap Delta_k(A, B) is zero.

Read back from the Lean

Given a dimension d : ℕ (implicit), a natural number k, and two d × d complex matrices A and B, traceBinomialGap k A B is defined as the real number: $$\left( \sum_{j=0}^{k} \binom{k}{j} \operatorname{Re}\left(\operatorname{tr}(A^j B^{k - j})\right) \right) - \operatorname{Re}\left(\operatorname{tr}\left((A + B)^k\right)\right)$$

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

/-- The noncommutative trace binomial gap Delta_k(A, B) = sum_{j=0}^k binom(k,j) Re tr(A^j B^(k-j)) - Re tr((A+B)^k). -/
def traceBinomialGap {d : ℕ} (k : ℕ) (A B : Matrix (Fin d) (Fin d) ℂ) : ℝ :=
  (∑ j ∈ Finset.range (k + 1), (k.choose j : ℝ) * (Matrix.trace (A ^ j * B ^ (k - j))).re) -
    (Matrix.trace ((A + B) ^ k)).re
See it in the graphDiscuss this resultChallenge it