AFTD Auto-Formalizing Theoretical Domains

matrix3_trace_split_reconstruction

theoremverified

The cyclic trace coefficient identities reconstruct every 27-coordinate vector through the first-factor column ranges. This is the explicit right-inverse identity behind the split flattening.

Statement

theorem matrix3_trace_split_reconstruction {K : Type*} [Field K] {r : ℕ} (a b c : Fin r → Matrix (Fin 3) (Fin 3) K)
    (h : ∀ i j j' k k' i' : Fin 3,
      ∑ s, a s i j * b s j' k * c s k' i' =
        if j = j' ∧ k = k' ∧ i = i' then 1 else 0)
    (z : Fin 3 × Fin 3 × Fin 3 → K) (p : Fin 3 × Fin 3 × Fin 3) :
    (∑ s, ((a s) *ᵥ (fun j => ∑ k, ∑ i, c s k i * z (i,j,k))) p.1 *
      b s p.2.1 p.2.2) = z p
Source
Helper for OP-1 and matrix3_trace_rank_sum_ge_27 / matrix3_trace_saturation; arXiv:2610.11823v3, Sections 4.1-4.2. The coefficient identity is proved here directly, with no imported lower bound.
Verified
25 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 3
  • matrix3_trace_saturationIf a cyclic trace decomposition over a field has first-factor matrix ranks summing to 27, then a_t * b_s * c_t * a_s equals a_s for t=s…
  • matrix3_trace_gram_column_factorizationFor a cyclic trace decomposition over a field whose first-factor matrix ranks sum to 27+d, there are 3-by-d matrices L_t and M_s such that…
  • matrix3_trace_rank_sum_ge_27For a finite family of 3x3 matrices over a field satisfying the cyclic trace identities of matrix multiplication, the sum of the matrix…

The proof, explained

To prove that the tensor trace reconstruction recovers any vector $z$ at an arbitrary index $p = (i, j, k)$, the proof expands the matrix-vector multiplication into a nested quadruple summation over intermediate indices. Reordering the summations via sum commutativity pushes the sum over $s$ to the innermost position, allowing $z(i', j', k')$ to be factored out. The cyclic trace coefficient hypothesis then evaluates this inner sum to a Kronecker delta, which collapses the remaining triple sum to $z(i, j, k) = z(p)$.

  1. The point $p$ is decomposed into components $(i, j, k)$, and the matrix-vector multiplication is expanded into explicit summations.

    Decomposing $p$ into $(i, j, k)$ expresses the left-hand side coordinate-wise. The matrix-vector product $(a(s) *ᵥ v)_i = \sum_{j'} a(s)_{i, j'} v(j')$ is then expanded using the definition of $v(j') = \sum_{k'} \sum_{i'} c(s)_{k', i'} z(i', j', k')$.

    lines 10–11

      rcases p with ⟨i,j,k⟩
      change (∑ s, (∑ j', a s i j' * (∑ k', ∑ i', c s k' i' * z (i',j',k'))) * b s j k) = _
  2. Multiplications are distributed into the sums to produce a nested quadruple summation.

    Using the distributivity lemmas `Finset.sum_mul` and `Finset.mul_sum`, the factors $a(s)_{i, j'}$ and $b(s)_{j, k}$ are moved inside the inner summations, turning the expression into a single quadruple sum over $s, j', k', i'$.

    line 12

    uses Finset.sum_mul, Finset.mul_sum

      simp only [Finset.sum_mul, Finset.mul_sum]
  3. The summation over $s$ is moved to the innermost position.

    Inside a targeted rewrite on the left-hand side, the commutativity of finite sums (`Finset.sum_comm`) is applied three times: first swapping the sum over $s$ with that over $j'$, then with $k'$, and finally with $i'$. The resulting order of summation is $\sum_{j'} \sum_{k'} \sum_{i'} \sum_s$.

    lines 13–20

    uses Finset.sum_comm

      conv_lhs =>
        rw [Finset.sum_comm]
        arg 2
        ext j'
        rw [Finset.sum_comm]
        arg 2
        ext k'
        rw [Finset.sum_comm]
  4. The coordinate vector $z(i', j', k')$ is factored out, and the trace identity evaluates the sum over $s$ to an indicator function.

    Using commutativity and associativity of field multiplication, the summand is rearranged into $(a(s)_{i, j'} b(s)_{j, k} c(s)_{k', i'}) \cdot z(i', j', k')$. Factoring out $z(i', j', k')$ from the sum over $s$ via `Finset.sum_mul`, hypothesis $h$ evaluates the remaining sum $\sum_s a(s)_{i, j'} b(s)_{j, k} c(s)_{k', i'}$ to $1$ when $j' = j$, $k' = k$, and $i' = i$, and $0$ otherwise.

    lines 21–24

    uses Finset.sum_mul

      simp_rw [show ∀ s j' k' i',
          a s i j' * (c s k' i' * z (i',j',k')) * b s j k =
          (a s i j' * b s j k * c s k' i') * z (i',j',k') by intros; ring,
        ← Finset.sum_mul, h]
  5. The sum of the indicator function collapses to $z(i, j, k)$, completing the proof.

    The indicator function is nonzero only at $(i', j', k') = (i, j, k)$. Rewriting the conjunction with `ite_and` allows the simplifier to sum over the finite types and collapse the triple sum to the single non-vanishing term $z(i, j, k)$.

    line 25

    uses ite_and

      simp [ite_and]
Finset.sum_mul
Right multiplication distributes over a finite sum: $(\sum_{x \in s} f(x)) \cdot a = \sum_{x \in s} (f(x) \cdot a)$.
Finset.mul_sum
Left multiplication distributes over a finite sum: $a \cdot (\sum_{x \in s} f(x)) = \sum_{x \in s} (a \cdot f(x))$.
Finset.sum_comm
The order of two finite summations can be swapped: $\sum_{x \in s} \sum_{y \in t} f(x, y) = \sum_{y \in t} \sum_{x \in s} f(x, y)$.
ite_and
An if-then-else with a conjunction splits into nested conditionals: `if P ∧ Q then a else b` equals `if P then (if Q then a else b) else b`.

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

open Matrix Finsettheorem matrix3_trace_split_reconstruction {K : Type*} [Field K] {r : ℕ} (a b c : Fin r → Matrix (Fin 3) (Fin 3) K)    (h : ∀ i j j' k k' i' : Fin 3,      ∑ s, a s i j * b s j' k * c s k' i' =        if j = j' ∧ k = k' ∧ i = i' then 1 else 0)    (z : Fin 3 × Fin 3 × Fin 3 → K) (p : Fin 3 × Fin 3 × Fin 3) :    (∑ s, ((a s) *ᵥ (fun j => ∑ k, ∑ i, c s k i * z (i,j,k))) p.1 *      b s p.2.1 p.2.2) = z p := by  rcases p with ⟨i,j,k⟩  change (∑ s, (∑ j', a s i j' * (∑ k', ∑ i', c s k' i' * z (i',j',k'))) * b s j k) = _  simp only [Finset.sum_mul, Finset.mul_sum]  conv_lhs =>    rw [Finset.sum_comm]    arg 2    ext j'    rw [Finset.sum_comm]    arg 2    ext k'    rw [Finset.sum_comm]  simp_rw [show ∀ s j' k' i',      a s i j' * (c s k' i' * z (i',j',k')) * b s j k =      (a s i j' * b s j k * c s k' i') * z (i',j',k') by intros; ring,    ← Finset.sum_mul, h]  simp [ite_and]
See it in the graphDiscuss this resultChallenge it