AFTD Auto-Formalizing Theoretical Domains

qutrit_convolution_choi_trace

theoremverified

For every complex 3×3 matrix σ, the trace of qutrit_convolution_choi σ equals the trace of σ; in particular the Choi matrix of a density matrix has trace 1.

Statement

theorem qutrit_convolution_choi_trace (σ : Matrix (Fin 3) (Fin 3) ℂ) :
    (qutrit_convolution_choi σ).trace = σ.trace
Source
Sanity lemma for the definition qutrit_convolution_choi, serving OP-2299.
Verified
26 Nov 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 1
  • qutrit_convolution_choiTakes a complex 3×3 matrix σ : Matrix (Fin 3) (Fin 3) ℂ (no hypothesis on σ) and returns the complex matrix indexed by Fin 3 × Fin 3 (type…

The proof, explained

The proof proceeds by direct expansion. Unfolding the definition of matrix trace and the Choi matrix of the qutrit convolution channel expands the trace into the sum of nine diagonal entries σ(p₂ - p₁, p₂ - p₁) / 3 for (p₁, p₂) ∈ Fin 3 × Fin 3. Evaluating the index differences modulo 3 shows that each of the three diagonal entries σ 0 0, σ 1 1, and σ 2 2 appears exactly three times, scaled by 1/3. Summing these terms yields σ 0 0 + σ 1 1 + σ 2 2 = trace(σ).

  1. The trace of the Choi matrix expands to the sum of nine diagonal terms of the form σ(p₂ - p₁, p₂ - p₁) / 3 for p₁, p₂ ∈ Fin 3, while the right-hand side is σ 0 0 + σ 1 1 + σ 2 2.

    Unfolding the definitions of trace, matrix diagonal, and the qutrit convolution Choi matrix, the sum over the product type Fin 3 × Fin 3 is decomposed into an iterated sum and expanded into nine explicit terms using `Fintype.sum_prod_type` and `Fin.sum_univ_three`. For each diagonal entry, the condition p₁ + p₂ = p₁ + p₂ is trivially true, simplifying the if-then-else conditions to the non-zero branch σ(p₂ - p₁, p₂ - p₁) / 3.

    lines 3–5

    uses Matrix.trace, Matrix.diag, qutrit_convolution_choi, Matrix.of_apply, Fintype.sum_prod_type, Fin.sum_univ_three

      simp only [Matrix.trace, Matrix.diag, qutrit_convolution_choi, Matrix.of_apply,
        Fintype.sum_prod_type, Fin.sum_univ_three]
      simp
  2. The negative indices -1 and -2 in Fin 3 evaluate to 2 and 1, respectively, rewriting the diagonal sum in terms of the standard matrix entries σ 0 0, σ 1 1, and σ 2 2.

    In Fin 3 (the integers modulo 3), negation satisfies -1 = 2 and -2 = 1 definitionally by reflexivity. Rewriting with these equalities replaces σ (-1) (-1) with σ 2 2 and σ (-2) (-2) with σ 1 1 throughout the summation.

    lines 6–8

      have h1 : (-1 : Fin 3) = 2 := rfl
      have h2 : (-2 : Fin 3) = 1 := rfl
      rw [h1, h2]
  3. The trace of the Choi matrix equals the trace of σ. automation

    Both sides are identical by commutative ring arithmetic on ℂ: on the left-hand side, each diagonal entry σ 0 0, σ 1 1, and σ 2 2 appears three times with coefficient 1/3, which sums to σ 0 0 + σ 1 1 + σ 2 2 = trace(σ).

    line 9

      ring
Matrix.trace
The trace of a square matrix is the sum of its diagonal entries.
Matrix.diag
The diagonal of a matrix, mapping index i to the entry A i i.
qutrit_convolution_choi
The Choi matrix of the qutrit convolution channel applied to σ, with entries ((p₁, p₂), (q₁, q₂)) equal to σ (p₂ - p₁) (q₂ - q₁) / 3 when p₁ + p₂ = q₁ + q₂, and 0 otherwise.
Matrix.of_apply
Evaluating a matrix constructed by `Matrix.of f` at indices i and j yields f i j.
Fintype.sum_prod_type
A sum over a product type α₁ × α₂ equals the iterated sum ∑ x, ∑ y, f (x, y).
Fin.sum_univ_three
The sum of a function over Fin 3 equals f 0 + f 1 + f 2.

Written by a model (gemini-3.8-flash) from the Lean proof and the goal states Lean reported at each step. Lean verified the proof; this explanation is a reading aid and is not itself machine-checked.

Lean source view module on GitHub

theorem qutrit_convolution_choi_trace (σ : Matrix (Fin 3) (Fin 3) ℂ) :    (qutrit_convolution_choi σ).trace = σ.trace := by  simp only [Matrix.trace, Matrix.diag, qutrit_convolution_choi, Matrix.of_apply,    Fintype.sum_prod_type, Fin.sum_univ_three]  simp  have h1 : (-1 : Fin 3) = 2 := rfl  have h2 : (-2 : Fin 3) = 1 := rfl  rw [h1, h2]  ring
See it in the graphDiscuss this resultChallenge it