matrix3_eval_triad_add_self_of_two_eq_zero
In characteristic 2 a triad repeated twice contributes nothing: if 2 = 0 in R then eval t A B + eval t A B = 0 for every triad t and all matrices A, B.
Statement
theorem matrix3_eval_triad_add_self_of_two_eq_zero {R : Type*} [CommRing R] (h2 : (2 : R) = 0) (t : Matrix3Triad R) (A B : Matrix (Fin 3) (Fin 3) R) : eval_matrix3_triad t A B + eval_matrix3_triad t A B = 0
- Source
- step towards matrix3_tensor_rank_zmod2_le_22
- Verified
- 23 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 2
- Matrix3TriadGiven a type R, a Matrix3Triad R is a structure consisting of three 3-by-3 matrices with entries in R, labeled u, v, and w.
- eval_matrix3_triadGiven a commutative semiring R, a triad t of type Matrix3Triad R, and 3x3 matrices A and B over R, eval_matrix3_triad t A B is the scalar…
The proof, explained
To show that evaluating a triad twice results in zero in characteristic 2, we expand the definition of triad evaluation into a scalar multiple of the matrix $t.w$ by the product of two bilinear sums. Factoring out $t.w$ from the sum of the two identical terms yields $(2c) • t.w$, where $c$ is this scalar product. Because $2 = 0$ in $R$, the scalar factor is zero, reducing the entire matrix expression to zero.
Unfolding the definition of triad evaluation expresses each term as a scalar multiple of $t.w$.
The tactic `simp only [eval_matrix3_triad]` unfolds the definition of `eval_matrix3_triad t A B`, replacing each of the two identical terms with $((s_A * s_B) • t.w)$, where $s_A = \sum_{i,j} t.u_{i,j} A_{i,j}$ and $s_B = \sum_{i,j} t.v_{i,j} B_{i,j}$. The goal is thus reduced to showing $((s_A * s_B) • t.w) + ((s_A * s_B) • t.w) = 0$.
simp only [eval_matrix3_triad]The sum of the two identical scalar multiples vanishes because $2 = 0$ in $R$.
Let $c = s_A * s_B$. Applying `add_smul` in reverse factors the sum $c • t.w + c • t.w$ into $(c + c) • t.w$. Applying `two_mul` in reverse rewrites $c + c$ as $2 * c$. Substituting the characteristic 2 hypothesis $h2$ ($2 = 0$) turns the scalar coefficient into $0 * c$. Finally, `zero_mul` simplifies $0 * c$ to $0$, and `zero_smul` evaluates $0 • t.w$ to $0$, closing the goal.
uses
add_smul,two_mul,zero_mul,zero_smulrw [← add_smul, ← two_mul, h2, zero_mul, zero_smul]
add_smul- Scalar multiplication distributes over scalar addition: $(r + s) • x = r • x + s • x$.
two_mul- Multiplying an element by $2$ equals adding it to itself: $2 * n = n + n$.
zero_mul- Multiplying by zero on the left yields zero: $0 * a = 0$.
zero_smul- Scalar multiplication by the zero scalar yields the zero element: $0 • m = 0$.
- Line 5 (`simp only [eval_matrix3_triad]`) is a formal Lean step to unfold the definition and expose the scalar multiplication structure before rewriting; on paper, this unfolding is implicit.
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
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
/-- Over a ring of characteristic 2, a triad counted twice cancels; combined with the merge identity this shows a shortest decomposition never repeats a triad. -/theorem matrix3_eval_triad_add_self_of_two_eq_zero {R : Type*} [CommRing R] (h2 : (2 : R) = 0) (t : Matrix3Triad R) (A B : Matrix (Fin 3) (Fin 3) R) : eval_matrix3_triad t A B + eval_matrix3_triad t A B = 0 := by simp only [eval_matrix3_triad] rw [← add_smul, ← two_mul, h2, zero_mul, zero_smul]