Documentation

LeanPool.MatrixMultiplicationAllFields.LinearAlgebra.MatrixMultiplication.AuxiliarySeparation.Tensor.DirectSum

Binary sums of finite coefficient tensors #

The coordinate types of the summands may differ. The identities below give the explicit changes of coordinates needed for the tensor semiring, together with the block-diagonal restriction maps.

theorem MatrixMultiplicationAllFields.MatrixMultiplication.AuxiliarySeparation.sumTensor_restrict {K : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} {U : Type u_5} {V : Type u_6} {W : Type u_7} [CommSemiring K] {X' : Type u_11} {Y' : Type u_12} {Z' : Type u_13} {U' : Type u_14} {V' : Type u_15} {W' : Type u_16} [Fintype X] [Fintype Y] [Fintype Z] [Fintype U] [Fintype V] [Fintype W] (f : X' → X → K) (g : Y' → Y → K) (h : Z' → Z → K) (f' : U' → U → K) (g' : V' → V → K) (h' : W' → W → K) (T : Foundation.Tensor K X Y Z) (S : Foundation.Tensor K U V W) :

Independent restrictions of both summands give a restriction of the sum.

theorem MatrixMultiplicationAllFields.MatrixMultiplication.AuxiliarySeparation.sumTensor_comm {K : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} {U : Type u_5} {V : Type u_6} {W : Type u_7} [CommSemiring K] (T : Foundation.Tensor K X Y Z) (S : Foundation.Tensor K U V W) :

Exchanging the two blocks is a coordinate permutation.

theorem MatrixMultiplicationAllFields.MatrixMultiplication.AuxiliarySeparation.sumTensor_assoc {K : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} {U : Type u_5} {V : Type u_6} {W : Type u_7} {A : Type u_8} {B : Type u_9} {C : Type u_10} [CommSemiring K] (T : Foundation.Tensor K X Y Z) (S : Foundation.Tensor K U V W) (R : Foundation.Tensor K A B C) :

Reassociating the three blocks is a coordinate permutation.

theorem MatrixMultiplicationAllFields.MatrixMultiplication.AuxiliarySeparation.sumTensor_empty_right {K : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} {U : Type u_5} {V : Type u_6} {W : Type u_7} [CommSemiring K] [IsEmpty U] [IsEmpty V] [IsEmpty W] (T : Foundation.Tensor K X Y Z) (S : Foundation.Tensor K U V W) :

An empty right summand disappears under its canonical coordinates.

theorem MatrixMultiplicationAllFields.MatrixMultiplication.AuxiliarySeparation.sumTensor_empty_left {K : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} {U : Type u_5} {V : Type u_6} {W : Type u_7} [CommSemiring K] [IsEmpty X] [IsEmpty Y] [IsEmpty Z] (T : Foundation.Tensor K X Y Z) (S : Foundation.Tensor K U V W) :

An empty left summand disappears under its canonical coordinates.

theorem MatrixMultiplicationAllFields.MatrixMultiplication.AuxiliarySeparation.sumTensor_product {K : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} {U : Type u_5} {V : Type u_6} {W : Type u_7} {A : Type u_8} {B : Type u_9} {C : Type u_10} [CommSemiring K] (T : Foundation.Tensor K X Y Z) (S : Foundation.Tensor K U V W) (R : Foundation.Tensor K A B C) :

Tensor product distributes over the first binary sum by coordinate permutation.

theorem MatrixMultiplicationAllFields.MatrixMultiplication.AuxiliarySeparation.product_sumTensor {K : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} {U : Type u_5} {V : Type u_6} {W : Type u_7} {A : Type u_8} {B : Type u_9} {C : Type u_10} [CommSemiring K] (T : Foundation.Tensor K X Y Z) (S : Foundation.Tensor K U V W) (R : Foundation.Tensor K A B C) :

Tensor product distributes over the second binary sum by coordinate permutation.

theorem MatrixMultiplicationAllFields.MatrixMultiplication.AuxiliarySeparation.tensorProduct_comm {K : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} {U : Type u_5} {V : Type u_6} {W : Type u_7} [CommSemiring K] (T : Foundation.Tensor K X Y Z) (S : Foundation.Tensor K U V W) :

Exchanging product factors is a coordinate permutation.

theorem MatrixMultiplicationAllFields.MatrixMultiplication.AuxiliarySeparation.tensorProduct_assoc {K : Type u_1} {X : Type u_2} {Y : Type u_3} {Z : Type u_4} {U : Type u_5} {V : Type u_6} {W : Type u_7} {A : Type u_8} {B : Type u_9} {C : Type u_10} [CommSemiring K] (T : Foundation.Tensor K X Y Z) (S : Foundation.Tensor K U V W) (R : Foundation.Tensor K A B C) :

Reassociating product factors is a coordinate permutation.

Scalar multiplication by one is the right unit for tensor product.

Scalar multiplication by one is the left unit for tensor product.