Documentation

CslibFrontier.Algorithms.MatrixMultiplication.Strassen.Coefficients

Morton coefficient blocks for the existing cyclic integer ring #

This is a mathematical readback specification, not an algorithm input. It relates actual contiguous coefficient quarters to the existing quotient-ring matrices. The coefficient ring and native signed encoding are unchanged. The quadrant argument adapts the matrix layout part of pinned Spec/Sec3/Theorem17/Strassen.lean at revision 16a5ce41304fcdaea4e0be7c132e1c361dc26da5, using functions instead of list padding.

noncomputable def Cslib.Algorithms.MatrixMultiplication.Strassen.coefficients {p : ℕ} (hp : p ≠ 0) (M : ℕ → ℕ → CyclicIntRing p) (i : ℕ) :

Flatten a cyclic-ring matrix into contiguous coefficient blocks in Morton order.

Ring addition becomes pointwise signed coefficient addition.

Ring subtraction becomes pointwise signed coefficient subtraction.

def Cslib.Algorithms.MatrixMultiplication.Strassen.submatrix {R : Type u_1} (k t : ℕ) (M : ℕ → ℕ → R) :
ℕ → ℕ → R

Four ring-matrix quadrants in the same order as their contiguous native arrays.

theorem Cslib.Algorithms.MatrixMultiplication.Strassen.quarter_coefficients {p : ℕ} (hp : p ≠ 0) (k : ℕ) (M : ℕ → ℕ → CyclicIntRing p) {t i : ℕ} (ht : t < 4) (hi : i < 4 ^ k * p) :
quarter (4 ^ k * p) t (coefficients hp M) i = coefficients hp (submatrix k t M) i

The native quarter pointer selects exactly the corresponding ring-matrix quadrant.

theorem Cslib.Algorithms.MatrixMultiplication.Strassen.coefficients_of_lt {p i : ℕ} (hp : p ≠ 0) (M : ℕ → ℕ → CyclicIntRing p) (hi : i < p) :
coefficients hp M i = (CyclicIntRing.coeff hp i) (M 0 0)

A side-one matrix is one actual cyclic coefficient block.

theorem Cslib.Algorithms.MatrixMultiplication.Strassen.coefficients_at {p r : ℕ} (hp : p ≠ 0) (M : ℕ → ℕ → CyclicIntRing p) (a b : ℕ) (hr : r < p) :
coefficients hp M (Nat.Morton.index a b * p + r) = (CyclicIntRing.coeff hp r) (M a b)

An actual Morton coefficient address reads exactly the requested ring entry and degree.