AFTD Auto-Formalizing Theoretical Domains

matrix3_unit_check

def

A computable Bool-valued checker that tests a list L of triads over ZMod 2 against all 81 pairs of 3x3 matrix units: it returns true exactly when, for every i j k l : Fin 3, the evaluation of L at the unit pair (single i j 1, single k l 1) equals the product of those units.

Statement

def matrix3_unit_check (L : List (Matrix3Triad (ZMod 2))) : Bool
Source
step towards matrix3_tensor_rank_zmod2_le_22
Verified
22 Oct 2026
Axioms
none listed
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_decompositionGiven a commutative semiring R, a list L of Matrix3Triad R, and 3x3 matrices A and B over R, eval_matrix3_decomposition L A B is the sum…
Used by 3
  • matrix3_unit_check_eq_true_iffThe computable checker matrix3_unit_check is true exactly when the list agrees with matrix multiplication on every pair of 3x3 matrix units.
  • matrix3_tensor_rank_le_zmod2_iff_unit_checkFor every natural number r, 3x3 matrix multiplication over ZMod 2 has a valid decomposition with at most r triads if and only if there is…
  • matrix3_unit_check_witnessesThe checker matrix3_unit_check returns true on the classical 23-triad decomposition of 3x3 matrix multiplication over ZMod 2 (so the…

Lean source view module on GitHub

/-- Computable mirror of is_valid_matrix3_decomposition over ZMod 2: checks the list against the 81 matrix-unit pairs, i.e. 729 kernel-decidable identities. -/
def matrix3_unit_check (L : List (Matrix3Triad (ZMod 2))) : Bool := (List.finRange 3).all fun i =>
  (List.finRange 3).all fun j =>
  (List.finRange 3).all fun k =>
  (List.finRange 3).all fun l =>
    decide (eval_matrix3_decomposition L (Matrix.single i j (1 : ZMod 2)) (Matrix.single k l (1 : ZMod 2))
      = Matrix.single i j (1 : ZMod 2) * Matrix.single k l (1 : ZMod 2))
See it in the graphDiscuss this resultChallenge it