Physlib

QuantumInfo.Finite.CPTPMap.MatrixMap

34 declarations

abbrev

Linear map between square matrix spaces MatA(R)MatB(R)\text{Mat}_A(R) \to \text{Mat}_B(R)

#MatrixMap

Let RR be a semiring and A,BA, B be types representing the indices of square matrices. A `MatrixMap` is the type of RR-linear maps from the space of A×AA \times A square matrices to the space of B×BB \times B square matrices, denoted by MatA(R)RMatB(R)\text{Mat}_A(R) \to_R \text{Mat}_B(R).

definition

The identity matrix map id:MA(R)MA(R)\text{id}: M_A(R) \to M_A(R)

#id

The identity map id\text{id} on the space of square matrices MA(R)M_A(R), which maps every matrix XMA(R)X \in M_A(R) to itself. Formally, this is the linear map id:MA(R)MA(R)\text{id}: M_A(R) \to M_A(R) defined by id(X)=X\text{id}(X) = X for all XMatrix(A,A,R)X \in \text{Matrix}(A, A, R).

definition

Choi matrix of a linear matrix map MM

#choi_matrix

The Choi matrix of a linear map M:MatA(R)MatB(R)M: \text{Mat}_A(R) \to \text{Mat}_B(R) is a matrix in MatB×A(R)\text{Mat}_{B \times A}(R) whose entries are defined by: (J(M))(j1,i1),(j2,i2)=(M(Ei1,i2))j1,j2(\mathcal{J}(M))_{(j_1, i_1), (j_2, i_2)} = (M(E_{i_1, i_2}))_{j_1, j_2} where Ei1,i2E_{i_1, i_2} is the matrix with 11 at index (i1,i2)(i_1, i_2) and 00 elsewhere, and (M(Ei1,i2))j1,j2(M(E_{i_1, i_2}))_{j_1, j_2} denotes the entry at row j1j_1 and column j2j_2 of the matrix resulting from applying MM to Ei1,i2E_{i_1, i_2}.

definition

Linear matrix map reconstructed from a Choi matrix MM

#of_choi_matrix

Given a matrix MMat(B×A)×(B×A)(R)M \in \text{Mat}_{(B \times A) \times (B \times A)}(R), the function constructs the corresponding RR-linear map ΦM:MatA(R)MatB(R)\Phi_M: \text{Mat}_A(R) \to \text{Mat}_B(R). For an input matrix XMatA(R)X \in \text{Mat}_A(R), the output matrix ΦM(X)\Phi_M(X) has entries defined by: (ΦM(X))b1,b2=a1Aa2AXa1,a2M(b1,a1),(b2,a2)(\Phi_M(X))_{b_1, b_2} = \sum_{a_1 \in A} \sum_{a_2 \in A} X_{a_1, a_2} M_{(b_1, a_1), (b_2, a_2)} This construction serves as the inverse of the Choi matrix mapping J\mathcal{J}.

theorem

`choi_matrix` is the Left Inverse of `of_choi_matrix`

#map_choi_inv

Let RR be a semiring and let MM be a matrix in MB×A(R)M_{B \times A}(R). Then the Choi matrix of the matrix map associated with MM is equal to MM itself; that is, choi_matrix(of_choi_matrix(M))=M\text{choi\_matrix}(\text{of\_choi\_matrix}(M)) = M.

theorem

Recovery of a linear map from its Choi matrix (Φ(C(M))=M\Phi(\mathcal{C}(M)) = M)

#choi_map_inv

Let RR be a semiring and let MM be a linear map between square matrices, specifically M:MatA(R)MatB(R)M: \text{Mat}_A(R) \to \text{Mat}_B(R). Let C(M)\mathcal{C}(M) denote the Choi matrix of MM and let Φ(X)\Phi(X) denote the linear map reconstructed from a Choi-type matrix XX. Then, applying the reconstruction to the Choi matrix of MM recovers the original map: Φ(C(M))=M\Phi(\mathcal{C}(M)) = M.

theorem

The Choi matrix construction is injective

#choi_matrix_inj

Let RR be a semiring and let AA and BB be types indexing square matrices. The operation C\mathcal{C} that assigns a linear map M:MatA(R)MatB(R)M: \text{Mat}_A(R) \to \text{Mat}_B(R) to its Choi matrix C(M)MatB×A(R)\mathcal{C}(M) \in \text{Mat}_{B \times A}(R) is injective. That is, if C(M1)=C(M2)\mathcal{C}(M_1) = \mathcal{C}(M_2), then M1=M2M_1 = M_2.

definition

Linear equivalence between linear maps of matrices and Choi matrices MatrixMap(A,B,R)RMatrix(B×A,B×A,R)\text{MatrixMap}(A, B, R) \simeq_R \text{Matrix}(B \times A, B \times A, R)

#choi_equiv

Let RR be a semiring and A,BA, B be types. Let MatrixMap(A,B,R)\text{MatrixMap}(A, B, R) denote the space of RR-linear maps from A×AA \times A matrices to B×BB \times B matrices over RR. There exists a linear equivalence between MatrixMap(A,B,R)\text{MatrixMap}(A, B, R) and the space of matrices indexed by (B×A)×(B×A)(B \times A) \times (B \times A) over RR, defined by mapping a linear map MM to its Choi matrix C(M)C(M) and vice versa.

definition

Linear equivalence between matrix maps and transfer matrices L(MA(R),MB(R))MB×B,A×A(R)\mathcal{L}(M_A(R), M_B(R)) \simeq M_{B \times B, A \times A}(R)

#toMatrix

Let RR be a semiring and A,BA, B be types indexing square matrices. A `MatrixMap` is a linear map between matrix spaces, denoted as L(MA(R),MB(R))\mathcal{L}(M_A(R), M_B(R)). For finite BB, there exists a linear equivalence between these linear maps and the "transfer matrices" of size (B×B)×(A×A)(|B| \times |B|) \times (|A| \times |A|). Specifically, the map `toMatrix` sends a linear map Φ:MA(R)MB(R)\Phi: M_A(R) \to M_B(R) to its representation in the standard bases of MA(R)M_A(R) and MB(R)M_B(R). This transfer matrix is constructed such that the composition of matrix maps corresponds to the product of their respective transfer matrices.

theorem

toMatrix\text{toMatrix} is a homomorphism from map composition to matrix multiplication

#toMatrix_comp

Let RR be a semiring and A,B,CA, B, C be finite types. For any two linear maps between square matrices M1:MatA(R)MatB(R)M_1: \text{Mat}_A(R) \to \text{Mat}_B(R) and M2:MatB(R)MatC(R)M_2: \text{Mat}_B(R) \to \text{Mat}_C(R), let toMatrix(M)\text{toMatrix}(M) denote the transfer matrix associated with a map MM. Then the transfer matrix of the composition M2M1M_2 \circ M_1 is equal to the matrix product of their respective transfer matrices: toMatrix(M2M1)=toMatrix(M2)toMatrix(M1)\text{toMatrix}(M_2 \circ M_1) = \text{toMatrix}(M_2) \cdot \text{toMatrix}(M_1)

definition

Matrix map from Kraus operators MM and NN

#of_kraus

Given two families of matrices M,N:κMatB×A(R)M, N: \kappa \to \text{Mat}_{B \times A}(R), the function constructs a linear map Φ:MatA×A(R)MatB×B(R)\Phi: \text{Mat}_{A \times A}(R) \to \text{Mat}_{B \times B}(R) defined by the action: Φ(X)=kκMkXNk\Phi(X) = \sum_{k \in \kappa} M_k X N_k^* where NkN_k^* denotes the conjugate transpose (Hermitian adjoint) of the matrix NkN_k.

definition

Existence of a Kraus representation for a linear map Φ\Phi

#exists_kraus

For any linear map Φ:MatA(R)MatB(R)\Phi: \text{Mat}_A(R) \to \text{Mat}_B(R) between square matrices over a semiring RR, there exists a natural number rr and two families of B×AB \times A matrices {Mi}i=1r\{M_i\}_{i=1}^r and {Ni}i=1r\{N_i\}_{i=1}^r such that Φ\Phi can be represented in a generalized Kraus form: \[ \Phi(X) = \sum_{i=1}^r M_i X N_i^\top \] where Mi,NiMatB×A(R)M_i, N_i \in \text{Mat}_{B \times A}(R).

definition

Linear map defined by the submatrix MMf,fM \mapsto M_{f,f}

#submatrix

Given a ring RR and a function f:BAf: B \to A between index sets, the `MatrixMap.submatrix` defines a linear map from the space of A×AA \times A matrices to the space of B×BB \times B matrices over RR. For any matrix MMatA×A(R)M \in \text{Mat}_{A \times A}(R), the map sends MM to the submatrix Mf,fM_{f,f} whose (i,j)(i, j)-th entry is defined as Mf(i),f(j)M_{f(i), f(j)} for all i,jBi, j \in B.

theorem

The submatrix map of the identity index function is the identity matrix map.

#submatrix_id

Let AA be a type and RR be a semiring. Let idA:AA\text{id}_A: A \to A be the identity function on indices. The matrix map submatrix(R,idA)\text{submatrix}(R, \text{id}_A) (which maps a matrix MM to the matrix with entries Mid(i),id(j)M_{\text{id}(i), \text{id}(j)}) is equal to the identity matrix map idA,R\text{id}_{A, R} (which maps a matrix MM to itself).

theorem

Composition of submatrix\text{submatrix} operations equals submatrix\text{submatrix} of composed functions

#submatrix_comp

Let RR be a ring and A,B,CA, B, C be types. For any functions f:CBf: C \to B and g:BAg: B \to A, the composition of the matrix map submatrix operations (submatrixRf)(submatrixRg)(\text{submatrix}_R f) \circ (\text{submatrix}_R g) is equal to the submatrix operation defined by the composed function submatrixR(gf)\text{submatrix}_R (g \circ f).

definition

Kronecker product of matrix maps M1kmM2M_1 \otimes_{km} M_2

#kron

Given two linear maps between square matrices M1:MatA(R)MatB(R)M_1: \text{Mat}_A(R) \to \text{Mat}_B(R) and M2:MatC(R)MatD(R)M_2: \text{Mat}_C(R) \to \text{Mat}_D(R) over a commutative semiring RR, their Kronecker product M1kmM2M_1 \otimes_{km} M_2 is a linear map from MatA×C(R)\text{Mat}_{A \times C}(R) to MatB×D(R)\text{Mat}_{B \times D}(R). It is constructed by taking the tensor product of the linear maps M1M2M_1 \otimes M_2, reindexing the resulting basis from (B×B)×(D×D)(B \times B) \times (D \times D) to (B×D)×(B×D)(B \times D) \times (B \times D) (and similarly for the domain), and converting the result back into a linear map between matrices.

definition

Infix notation `⊗ₖₘ` for Kronecker product of matrix maps

#term_⊗ₖₘ_

An infix notation `⊗ₖₘ` is defined to represent the Kronecker product of matrix maps, specifically mapping it to the `MatrixMap.kron` operation.

theorem

Formula for Entry-wise Matrix Kronecker Product (M1kmM2)M(M_1 \otimes_{km} M_2)M

#kron_def

Let RR be a commutative semiring. For two linear maps of matrices M1:MatA×A(R)MatB×B(R)M_1: \text{Mat}_{A \times A}(R) \to \text{Mat}_{B \times B}(R) and M2:MatC×C(R)MatD×D(R)M_2: \text{Mat}_{C \times C}(R) \to \text{Mat}_{D \times D}(R), their Kronecker product M1kmM2M_1 \otimes_{km} M_2 is a linear map acting on matrices MMat(A×C)×(A×C)(R)M \in \text{Mat}_{(A \times C) \times (A \times C)}(R). The entries of the resulting matrix are given by the formula: ((M1kmM2)M)(b1,d1),(b2,d2)=a1,a2,c1,c2(M1(Ea1,a2))b1,b2(M2(Ec1,c2))d1,d2M(a1,c1),(a2,c2) ((M_1 \otimes_{km} M_2) M)_{(b_1, d_1), (b_2, d_2)} = \sum_{a_1, a_2, c_1, c_2} (M_1(E_{a_1, a_2}))_{b_1, b_2} \cdot (M_2(E_{c_1, c_2}))_{d_1, d_2} \cdot M_{(a_1, c_1), (a_2, c_2)} where Ei,jE_{i, j} denotes the standard basis matrix (a matrix with 11 at position (i,j)(i, j) and 00 elsewhere).

theorem

Left Distributivity of Kronecker Product of Matrix Maps over Addition

#add_kron

Let RR be a commutative semiring. For any linear maps between square matrices ML1,ML2MatrixMap(A,B,R)M_{L1}, M_{L2} \in \text{MatrixMap}(A, B, R) and MRMatrixMap(C,D,R)M_R \in \text{MatrixMap}(C, D, R), the Kronecker product of matrix maps km\otimes_{km} distributes over addition on the left: (ML1+ML2)kmMR=(ML1kmMR)+(ML2kmMR)(M_{L1} + M_{L2}) \otimes_{km} M_R = (M_{L1} \otimes_{km} M_R) + (M_{L2} \otimes_{km} M_R)

theorem

Distributivity of Matrix Map Kronecker Product over Addition (Right)

#kron_add

Let RR be a commutative semiring. For any linear map between matrices ML:MatA×A(R)MatB×B(R)M_L: \text{Mat}_{A \times A}(R) \to \text{Mat}_{B \times B}(R) and any linear maps MR1,MR2:MatC×C(R)MatD×D(R)M_{R1}, M_{R2}: \text{Mat}_{C \times C}(R) \to \text{Mat}_{D \times D}(R), the Kronecker product of MLM_L with the sum MR1+MR2M_{R1} + M_{R2} is equal to the sum of the Kronecker products, i.e., MLkm(MR1+MR2)=MLkmMR1+MLkmMR2M_L \otimes_{km} (M_{R1} + M_{R2}) = M_L \otimes_{km} M_{R1} + M_L \otimes_{km} M_{R2}.

theorem

(rML)kmMR=r(MLkmMR)(r \cdot M_L) \otimes_{km} M_R = r \cdot (M_L \otimes_{km} M_R)

#smul_kron

Let RR be a commutative semiring and let MLM_L and MRM_R be linear maps between spaces of square matrices (matrix maps). For any scalar rRr \in R, the Kronecker product of the scaled matrix map rMLr \cdot M_L with MRM_R is equal to the scalar rr multiplied by the Kronecker product of MLM_L and MRM_R. That is, (rML)kmMR=r(MLkmMR)(r \cdot M_L) \otimes_{km} M_R = r \cdot (M_L \otimes_{km} M_R), where km\otimes_{km} denotes the Kronecker product of matrix maps.

theorem

Kronecker Product of Matrix Maps is Homogeneous in the Right Argument

#kron_smul

Let RR be a commutative semiring and let MLM_L and MRM_R be linear maps between square matrices (specifically, MLM_L is a `MatrixMap` from AA-indexed matrices to BB-indexed matrices, and MRM_R is a `MatrixMap` from CC-indexed matrices to DD-indexed matrices). For any scalar rRr \in R, the Kronecker product of MLM_L and the scalar multiple rMRr \cdot M_R is equal to the scalar multiple of the Kronecker product of MLM_L and MRM_R. That is, MLkm(rMR)=r(MLkmMR)M_L \otimes_{km} (r \cdot M_R) = r \cdot (M_L \otimes_{km} M_R).

theorem

0kmMR=00 \otimes_{km} M_R = 0

#zero_kron

Let RR be a commutative semiring. For any linear map between square matrices MR:MatC(R)MatD(R)M_R: \text{Mat}_C(R) \to \text{Mat}_D(R), the Kronecker product of the zero matrix map 0:MatA(R)MatB(R)0: \text{Mat}_A(R) \to \text{Mat}_B(R) with MRM_R is equal to the zero map from MatA×C(R)\text{Mat}_{A \times C}(R) to MatB×D(R)\text{Mat}_{B \times D}(R). That is, 0kmMR=00 \otimes_{km} M_R = 0.

theorem

Kronecker Product of a Matrix Map with Zero is Zero

#kron_zero

Let RR be a commutative semiring. For any linear map between matrices ML:Matrix(A,A,R)Matrix(B,B,R)M_L: \text{Matrix}(A, A, R) \to \text{Matrix}(B, B, R), the Kronecker product of MLM_L with the zero map 0:Matrix(C,C,R)Matrix(D,D,R)0: \text{Matrix}(C, C, R) \to \text{Matrix}(D, D, R) is equal to the zero map from Matrix(A×C,A×C,R)\text{Matrix}(A \times C, A \times C, R) to Matrix(B×D,B×D,R)\text{Matrix}(B \times D, B \times D, R). That is, MLkm0=0M_L \otimes_{km} 0 = 0.

theorem

idAkmidB=idA×B\text{id}_A \otimes_{km} \text{id}_B = \text{id}_{A \times B}

#kron_id_id

For any types AA and BB and a commutative semiring RR, the Kronecker product of the identity matrix maps on AA and BB is equal to the identity matrix map on the product type A×BA \times B. That is, idAkmidB=idA×B\text{id}_A \otimes_{km} \text{id}_B = \text{id}_{A \times B}.

theorem

Mixed-product property of the Kronecker product of matrix maps

#kron_comp_distrib

Let RR be a commutative semiring. For any linear maps between square matrices L1:MatDl1(R)MatDl2(R)L_1: \text{Mat}_{Dl_1}(R) \to \text{Mat}_{Dl_2}(R), L2:MatDl2(R)MatDl3(R)L_2: \text{Mat}_{Dl_2}(R) \to \text{Mat}_{Dl_3}(R), R1:MatDr1(R)MatDr2(R)R_1: \text{Mat}_{Dr_1}(R) \to \text{Mat}_{Dr_2}(R), and R2:MatDr2(R)MatDr3(R)R_2: \text{Mat}_{Dr_2}(R) \to \text{Mat}_{Dr_3}(R), the Kronecker product of their compositions satisfies the distributive law: (L2L1)km(R2R1)=(L2kmR2)(L1kmR1)(L_2 \circ L_1) \otimes_{km} (R_2 \circ R_1) = (L_2 \otimes_{km} R_2) \circ (L_1 \otimes_{km} R_1) where \circ denotes linear map composition and km\otimes_{km} denotes the Kronecker product of matrix maps.

theorem

(M1kmM2)(MAkMC)=(M1MA)k(M2MC)(M_1 \otimes_{km} M_2) (M_A \otimes_k M_C) = (M_1 M_A) \otimes_k (M_2 M_C)

#kron_map_of_kron_state

Let RR be a commutative ring. For any two matrix maps M1:MatA×A(R)MatB×B(R)M_1: \text{Mat}_{A \times A}(R) \to \text{Mat}_{B \times B}(R) and M2:MatC×C(R)MatD×D(R)M_2: \text{Mat}_{C \times C}(R) \to \text{Mat}_{D \times D}(R), and for any two matrices MAMatA×A(R)M_A \in \text{Mat}_{A \times A}(R) and MCMatC×C(R)M_C \in \text{Mat}_{C \times C}(R), the Kronecker product of the maps applied to the Kronecker product of the matrices satisfies (M1kmM2)(MAkMC)=(M1MA)k(M2MC),(M_1 \otimes_{km} M_2) (M_A \otimes_k M_C) = (M_1 M_A) \otimes_k (M_2 M_C), where km\otimes_{km} denotes the Kronecker product of matrix maps and k\otimes_k denotes the Kronecker product of matrices.

theorem

Representation of the Choi matrix via the maximally entangled state: choi_matrix(M)=A(Mid)(ΨΨ)\text{choi\_matrix}(M) = |A| (M \otimes \text{id}) (|\Psi\rangle\langle\Psi|)

#choi_matrix_state_rep

Let AA and BB be finite non-empty types. Let MM be a linear map from A×AA \times A matrices to B×BB \times B matrices over the complex numbers C\mathbb{C}. The Choi matrix of MM, denoted choi_matrix(M)\text{choi\_matrix}(M), is given by: choi_matrix(M)=A((MidA)(ρΨ))\text{choi\_matrix}(M) = |A| \cdot \left( (M \otimes \text{id}_A) (\rho_{\Psi}) \right) where A|A| is the cardinality of AA, \otimes denotes the Kronecker product of matrix maps, idA\text{id}_A is the identity map on A×AA \times A matrices, and ρΨ=ΨΨ\rho_{\Psi} = |\Psi\rangle\langle\Psi| is the density matrix of the maximally entangled state Ψ|\Psi\rangle on A×AA \times A.

theorem

submatrixfkmsubmatrixg=submatrixf×g\text{submatrix}_f \otimes_{km} \text{submatrix}_g = \text{submatrix}_{f \times g}

#submatrix_kron_submatrix

Let RR be a commutative semiring. For any functions f:BAf: B \to A and g:DCg: D \to C, let submatrixf\text{submatrix}_f and submatrixg\text{submatrix}_g denote the linear maps that take a square matrix and return the submatrix indexed by ff and gg respectively. Then the Kronecker product of these matrix maps is equal to the submatrix map indexed by the product function f×gf \times g: submatrixfkmsubmatrixg=submatrixf×g\text{submatrix}_f \otimes_{km} \text{submatrix}_g = \text{submatrix}_{f \times g} where f×g:B×DA×Cf \times g: B \times D \to A \times C is defined by (b,d)(f(b),g(d))(b, d) \mapsto (f(b), g(d)).

theorem

submatrixfkmid=submatrix(f,id)\text{submatrix}_f \otimes_{km} \text{id} = \text{submatrix}_{(f, \text{id})}

#submatrix_kron_id

Let RR be a commutative semiring and f:BAf: B \to A be a function between index sets. Let submatrixf\text{submatrix}_f denote the linear map that sends a matrix MMatA(R)M \in \text{Mat}_A(R) to the submatrix Mf,fMatB(R)M_{f,f} \in \text{Mat}_B(R), and let idC\text{id}_C denote the identity linear map on square matrices over the index set CC. Then the Kronecker product of the submatrix map and the identity map is equal to the submatrix map defined by the product function f×idCf \times \text{id}_C: submatrixfkmidC=submatrix(f,idC)\text{submatrix}_f \otimes_{km} \text{id}_C = \text{submatrix}_{(f, \text{id}_C)} where f×idCf \times \text{id}_C is the map (b,c)(f(b),c)(b, c) \mapsto (f(b), c).

theorem

idkmsubmatrixf=submatrix(id,f)\text{id} \otimes_{km} \text{submatrix}_f = \text{submatrix}_{(\text{id}, f)}

#id_kron_submatrix

Let RR be a commutative semiring and f:BAf: B \to A be a function. Let idC\text{id}_C denote the identity linear map on square matrices over CC, and let submatrixf\text{submatrix}_f denote the linear map that takes a square matrix and returns the submatrix indexed by ff. Then the Kronecker product of the identity map and the submatrix map is equal to the submatrix map indexed by the product function idC×f\text{id}_C \times f: idCkmsubmatrixf=submatrix(idC,f)\text{id}_C \otimes_{km} \text{submatrix}_f = \text{submatrix}_{(\text{id}_C, f)} Where idC×f\text{id}_C \times f is the map (c,b)(c,f(b))(c, b) \mapsto (c, f(b)).

opaque

Basis for a family tensor product iιsi\bigotimes_{i \in \iota} s_i indexed by iιLi\prod_{i \in \iota} L_i

#piTensorProduct

Let RR be a ring and ι\iota be an indexing type. For each iιi \in \iota, let sis_i be an RR-module and LiL_i be a finite type. If bib_i is a basis for sis_i indexed by LiL_i for every ii, then there exists a basis for the family tensor product iιsi\bigotimes_{i \in \iota} s_i (denoted `PiTensorProduct R s`) indexed by the dependent function type iιLi\prod_{i \in \iota} L_i. This basis is constructed by taking the tensor products of the basis elements from each bib_i.

definition

Tensor product of a family of MatrixMaps iιΛi\bigotimes_{i \in \iota} \Lambda_i

#piProd

Given a family of matrix maps ΛiMatrixMap(dIi,dOi,R)\Lambda_i \in \text{MatrixMap}(dI_i, dO_i, R) for iιi \in \iota, where each Λi\Lambda_i is a linear map between square matrices, the function returns the tensor product of these maps iιΛi\bigotimes_{i \in \iota} \Lambda_i. This is a linear map from matrices indexed by iιdIi\prod_{i \in \iota} dI_i to matrices indexed by iιdOi\prod_{i \in \iota} dO_i. It is defined by taking the π\pi-tensor product of the underlying linear maps and reindexing the resulting basis to match the structure of a square matrix map over the product types.

theorem

Composition of tensor product matrix maps distributes over components: i(Λ2,iΛ1,i)=(iΛ2,i)(iΛ1,i)\bigotimes_i (\Lambda_{2,i} \circ \Lambda_{1,i}) = (\bigotimes_i \Lambda_{2,i}) \circ (\bigotimes_i \Lambda_{1,i})

#piProd_comp

Let RR be a semiring and ι\iota be an indexing type. For each iιi \in \iota, let d1(i)d_1(i), d2(i)d_2(i), and d3(i)d_3(i) be finite types with decidable equality. Suppose we have two families of linear maps between square matrices, Λ1(i):Matrix(d1(i),d1(i),R)Matrix(d2(i),d2(i),R)\Lambda_1(i): \text{Matrix}(d_1(i), d_1(i), R) \to \text{Matrix}(d_2(i), d_2(i), R) and Λ2(i):Matrix(d2(i),d2(i),R)Matrix(d3(i),d3(i),R)\Lambda_2(i): \text{Matrix}(d_2(i), d_2(i), R) \to \text{Matrix}(d_3(i), d_3(i), R), for each iιi \in \iota. Then the product map of the compositions is equal to the composition of the product maps: iι(Λ2(i)Λ1(i))=(iιΛ2(i))(iιΛ1(i))\bigotimes_{i \in \iota} (\Lambda_2(i) \circ \Lambda_1(i)) = \left( \bigotimes_{i \in \iota} \Lambda_2(i) \right) \circ \left( \bigotimes_{i \in \iota} \Lambda_1(i) \right) where \bigotimes (represented by `piProd` in the formal statement) denotes the tensor product of matrix maps.