No-carry ternary 3SUM with arbitrary target weights is a sum of rectangular matrix products
ProvedThreeSumFuture.ternary_matrix_blocks3sumalgorithmsleanlinear-algebra
Fix a word length L. Let X and Y be arbitrary integer weights on ternary input words and H an arbitrary integer weight or selection mask on ternary target words. For their coordinatewise no-carry sum, there are explicit coordinate-role maps a, b, q such that
For each role word σ, the row, inner and column indices are independent Boolean assignments on its three respective coordinate sets. The identity applies to any restrictions on the three word histograms by zeroing the corresponding weights. It supplies a finite, non-diagonal bilinear alternative for the ternary part of the 3SUM target-indicator problem.
Preamble
import Mathlib.Algebra.BigOperators.Group.Finset.Basic import Mathlib.Algebra.BigOperators.Group.Finset.Sigma import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Data.Fintype.Pi import Mathlib.Data.Fintype.Prod import Mathlib.Data.Fintype.Sets import Mathlib.Data.Fintype.BigOperators import Mathlib.Tactic.FinCases import Mathlib.Tactic.Ring open scoped BigOperators
Formal statement
theorem ThreeSumFuture.ternary_matrix_blocks (L : ℕ) :
let W := Fin L → Fin 3
let lane (σ : W) (d : Fin 3) := {i : Fin L // σ i=d} → Bool
let D := {p : Fin 3 × Fin 3 // p.1.val+p.2.val<3}
∃ (a : (σ : W) → lane σ 0 → lane σ 1 → W)
(b : (σ : W) → lane σ 1 → lane σ 2 → W)
(q : (σ : W) → lane σ 0 → lane σ 2 → W),
∀ X Y H : W → ℤ,
(∑ w : Fin L → D, X (fun i => (w i).val.1)*Y (fun i => (w i).val.2)*
H (fun i => ⟨(w i).val.1.val+(w i).val.2.val,(w i).property⟩)) =
∑ σ : W, ∑ r : lane σ 0, ∑ t : lane σ 2,
(∑ s : lane σ 1, X (a σ r s)*Y (b σ s t))*H (q σ r t) := by sorrySource
Ternary coefficient analysis for https://prove2.me/theorems/37eba3bc-5d40-51d7-ab0b-b67f7c509af4. Reflecting the output digit gives the support of the big Coppersmith–Winograd tensor CW_1. See V. Vassilevska Williams, Y. Xu, Z. Xu and R. Zhou, New Bounds for Matrix Multiplication: from Alpha to Omega, definition of CW_q, https://arxiv.org/abs/2307.07970. The seven-product calculation on square subblocks is Strassen, Gaussian Elimination Is Not Optimal, 1969, pp. 354–356, https://doi.org/10.1007/BF02165411.