AFTD Auto-Formalizing Theoretical Domains

matrix3_eval_triad_zero_u

theoremverified

Evaluating any triad whose u component is zero yields the zero matrix for all input matrices A and B.

Statement

theorem matrix3_eval_triad_zero_u {R : Type*} [CommSemiring R] (v w : Matrix (Fin 3) (Fin 3) R) (A B : Matrix (Fin 3) (Fin 3) R) :
    eval_matrix3_triad ⟨0, v, w⟩ A B = 0
Source
step towards matrix3_tensor_rank_int_le_22
Verified
25 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…
Used by 1

The proof, explained

Evaluating a triad $(u, v, w)$ on matrices $A$ and $B$ computes the product of the two Frobenius inner products $\sum_{i, j} u_{i, j} A_{i, j}$ and $\sum_{i, j} v_{i, j} B_{i, j}$, then scales the matrix $w$ by this scalar. When $u = 0$, every term in the first sum vanishes, so the entire scalar multiplier is zero. Multiplying $w$ by zero yields the zero matrix, which is discharged immediately by definition unfolding and simplification.

  1. eval_matrix3_triad ⟨0, v, w⟩ A B = 0 automation

    Unfolding the definition of `eval_matrix3_triad` expands the expression to $(\sum_{i, j} 0 \cdot A_{i, j})(\sum_{i, j} v_{i, j} B_{i, j}) \cdot w$. Since every term in the first summation is zero, the sum vanishes, making the entire scalar factor zero. Multiplying the matrix $w$ by the scalar zero then yields the zero matrix. The `simp` tactic performs these rewrites automatically.

    line 4

    uses eval_matrix3_triad

      simp [eval_matrix3_triad]
eval_matrix3_triad
Evaluates a triad $(u, v, w)$ on matrices $A$ and $B$ by multiplying the scalar products $\sum_{i,j} u_{ij} A_{ij}$ and $\sum_{i,j} v_{ij} B_{ij}$ and scaling $w$ by the result.

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

/-- Evaluating any triad whose u component is zero yields the zero matrix for all input matrices A and B. -/theorem matrix3_eval_triad_zero_u {R : Type*} [CommSemiring R] (v w : Matrix (Fin 3) (Fin 3) R) (A B : Matrix (Fin 3) (Fin 3) R) :    eval_matrix3_triad ⟨0, v, w⟩ A B = 0 := by  simp [eval_matrix3_triad]
See it in the graphDiscuss this resultChallenge it