Coordinates of matrix multiplication #
- The coordinates
matMulLeft n i jandmatMulRight n j kare distinct and cover all inputs (sum_input); the outputsmatMulOutput n i kcover all outputs (sum_output). matMul_outputandmatMul_matMulInput: the map multiplies matrices.- Fixing a factor. With the second factor fixed to
B₀, the product changes byshiftLeft B₀ d, whose outputC i kis∑ j, d (A i j) B₀ j k(matMul_sub_left); symmetrically with the first factor fixed (matMul_sub_right). The free coordinates areleftCoords nandrightCoords n. - The quadratic form. For a matrix
Λ,bilinForm Λis the matrix of the quadratic formz ↦ ∑ i k, Λ i k C i k(quadForm_bilinForm). Its symmetrizationH = M + MᵀpairsA i jwithB j kthroughΛ i k(mulVec_add_transpose_left,mulVec_add_transpose_right).
Distinct coordinates #
Every output coordinate holds an entry of the product.
A sum over the input coordinates is a sum over the entries of the two factors.
A sum over the output coordinates is a sum over the entries of the product.
The product #
Fixing one factor #
The coordinates of the first factor.
Equations
- Algebraic.Cutwidth.MultiOutput.MatMul.Internal.leftCoords n = Finset.image (fun (p : Fin n × Fin n) => Algebraic.Cutwidth.MultiOutput.matMulLeft n p.1 p.2) Finset.univ
Instances For
The coordinates of the second factor.
Equations
- Algebraic.Cutwidth.MultiOutput.MatMul.Internal.rightCoords n = Finset.image (fun (p : Fin n × Fin n) => Algebraic.Cutwidth.MultiOutput.matMulRight n p.1 p.2) Finset.univ
Instances For
The change of the product when the input changes by d and the second factor is B₀.
Equations
- Algebraic.Cutwidth.MultiOutput.MatMul.Internal.shiftLeft B₀ d o = ∑ j : Fin n, d (Algebraic.Cutwidth.MultiOutput.matMulLeft n (finProdFinEquiv.symm o).1 j) * B₀ j (finProdFinEquiv.symm o).2
Instances For
The change of the product when the input changes by d and the first factor is A₀.
Equations
- Algebraic.Cutwidth.MultiOutput.MatMul.Internal.shiftRight A₀ d o = ∑ j : Fin n, A₀ (finProdFinEquiv.symm o).1 j * d (Algebraic.Cutwidth.MultiOutput.matMulRight n j (finProdFinEquiv.symm o).2)
Instances For
With the second factor fixed to B₀, the product changes by shiftLeft B₀.
With the first factor fixed to A₀, the product changes by shiftRight A₀.
The quadratic form #
The matrix of the quadratic form z ↦ ∑ i k, Λ i k C i k: it pairs the entry A i j with
the entry B j k through Λ i k, and has no other nonzero entries.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The symmetrized form at A i j.
The symmetrized form at B j k.