PhyslibSearch

Physlib.Relativity.Tensors.Product

52 declarations

definition

Equivalence for product of component indices

#prodIndexEquiv

Given natural numbers n1n_1 and n2n_2, and color sequence mappings c:{0,,n11}Cc : \{0, \ldots, n_1 - 1\} \to C and c1:{0,,n21}Cc_1 : \{0, \ldots, n_2 - 1\} \to C, this defines the equivalence between the component indices of the appended sequence, denoted as `ComponentIdx (Fin.append c c1)`, and the dependent product i{0,,n11}{0,,n21}{0,,repDim(S(cc1)(i))1}\prod_{i \in \{0, \ldots, n_1 - 1\} \sqcup \{0, \ldots, n_2 - 1\}} \{0, \ldots, \text{repDim}(S_{(c \sqcup c_1)(i)}) - 1\}, where cc1c \sqcup c_1 represents the disjoint union (sum elimination) of the sequences cc and c1c_1.

definition

Product of component indices bb and b1b_1

#prod

Given color sequences c:{0,,n11}Cc: \{0, \dots, n_1-1\} \to C and c1:{0,,n21}Cc_1: \{0, \dots, n_2-1\} \to C, and component indices bComponentIdx(c)b \in \text{ComponentIdx}(c) and b1ComponentIdx(c1)b_1 \in \text{ComponentIdx}(c_1), their product is a component index for the concatenated color sequence c+ ⁣+c1c \mathbin{+\!+} c_1. Specifically, for an index i{0,,n1+n21}i \in \{0, \dots, n_1+n_2-1\}, the value of the product index at ii is b(i)b(i) if i<n1i < n_1, and b1(in1)b_1(i - n_1) if n1i<n1+n2n_1 \leq i < n_1 + n_2.

theorem

Components of the product of component indices bb and b1b_1

#prod_apply_finSumFinEquiv

Let n1,n2Nn_1, n_2 \in \mathbb{N} and let c:Fin(n1)Cc: \text{Fin}(n_1) \to C and c1:Fin(n2)Cc_1: \text{Fin}(n_2) \to C be color sequences. For component indices bComponentIdx(c)b \in \text{ComponentIdx}(c) and b1ComponentIdx(c1)b_1 \in \text{ComponentIdx}(c_1), their product bb1b \cdot b_1 is a component index for the concatenated sequence c+ ⁣+c1c \mathbin{+\!+} c_1. Let ϕ:Fin(n1)Fin(n2)Fin(n1+n2)\phi: \text{Fin}(n_1) \oplus \text{Fin}(n_2) \xrightarrow{\simeq} \text{Fin}(n_1 + n_2) be the standard equivalence between the disjoint union and the finite set of the sum. For any iFin(n1)Fin(n2)i \in \text{Fin}(n_1) \oplus \text{Fin}(n_2), the evaluation of the product index is given by: (bb1)(ϕ(i))={b(i)if iFin(n1)b1(i)if iFin(n2) (b \cdot b_1)(\phi(i)) = \begin{cases} b(i) & \text{if } i \in \text{Fin}(n_1) \\ b_1(i) & \text{if } i \in \text{Fin}(n_2) \end{cases}

definition

Equivalence ComponentIdx(c+ ⁣+c1)ComponentIdx(c)×ComponentIdx(c1)\text{ComponentIdx}(c \mathbin{+\!+} c_1) \simeq \text{ComponentIdx}(c) \times \text{ComponentIdx}(c_1)

#prodEquiv

Let SS be a tensor species. For any two color sequences c:{0,,n11}Cc: \{0, \dots, n_1-1\} \to C and c1:{0,,n21}Cc_1: \{0, \dots, n_2-1\} \to C, let ComponentIdx(c)\text{ComponentIdx}(c) be the set of basis indices for a tensor with colors cc. This definition establishes a bijective correspondence (equivalence) between the component indices of the concatenated color sequence, ComponentIdx(c+ ⁣+c1)\text{ComponentIdx}(c \mathbin{+\!+} c_1), and the Cartesian product of the individual component index sets ComponentIdx(c)×ComponentIdx(c1)\text{ComponentIdx}(c) \times \text{ComponentIdx}(c_1). Specifically, the forward map splits a combined index into its first n1n_1 and subsequent n2n_2 components, while the inverse map concatenates a pair of indices (b,b1)(b, b_1) into a single index for the combined sequence.

definition

Equivalence between pure tensors over concatenated indices and disjoint union of indices

#prodIndexEquiv

Let SS be a tensor species, and let c:Fin(n1)Cc : \text{Fin}(n_1) \to C and c1:Fin(n2)Cc_1 : \text{Fin}(n_2) \to C be index maps. This establishes an equivalence between the pure tensors of SS indexed by the concatenation of cc and c1c_1, and the dependent product iFin(n1)Fin(n2)S.FD((cc1)(i))\prod_{i \in \text{Fin}(n_1) \sqcup \text{Fin}(n_2)} S.FD((c \sqcup c_1)(i)), where cc1c \sqcup c_1 is the induced map on the disjoint union Fin(n1)Fin(n2)\text{Fin}(n_1) \sqcup \text{Fin}(n_2) and S.FDS.FD is the functor mapping indices to their associated vector spaces.

definition

Tensor Product of Pure Tensors p1p2p_1 \otimes p_2

#prodP

Let SS be a tensor species. For any two pure tensors p1p_1 and p2p_2 with index maps c:Fin(n1)Cc: \text{Fin}(n_1) \to C and c1:Fin(n2)Cc_1: \text{Fin}(n_2) \to C respectively, their tensor product p1p2p_1 \otimes p_2 is the pure tensor in Pure(S,c append c1)\text{Pure}(S, c \text{ append } c_1) defined by the concatenation of their components. Specifically, for an index iFin(n1)i \in \text{Fin}(n_1), the component of the product is p1(i)p_1(i), and for jFin(n2)j \in \text{Fin}(n_2), the component at the corresponding shifted index is p2(j)p_2(j), subject to the appropriate canonical isomorphisms between the vector spaces.

theorem

Components of the Product of Pure Tensors p1p2p_1 \otimes p_2 via Disjoint Union of Indices

#prodP_apply_finSumFinEquiv

Let SS be a tensor species. For any two pure tensors p1Pure(S,c)p_1 \in \text{Pure}(S, c) and p2Pure(S,c1)p_2 \in \text{Pure}(S, c_1), where c:Fin(n1)Cc: \text{Fin}(n_1) \to C and c1:Fin(n2)Cc_1: \text{Fin}(n_2) \to C are index maps, let p1p2p_1 \otimes p_2 denote their tensor product. Let ϕ:Fin(n1)Fin(n2)Fin(n1+n2)\phi : \text{Fin}(n_1) \oplus \text{Fin}(n_2) \cong \text{Fin}(n_1 + n_2) be the standard equivalence between the disjoint union and the combined finite set. For any index iFin(n1)Fin(n2)i \in \text{Fin}(n_1) \oplus \text{Fin}(n_2), the component of the tensor product at ϕ(i)\phi(i) is given by: - If i=inl(j)i = \text{inl}(j) for jFin(n1)j \in \text{Fin}(n_1), then (p1p2)ϕ(i)=ψL(p1(j))(p_1 \otimes p_2)_{\phi(i)} = \psi_L(p_1(j)), - If i=inr(k)i = \text{inr}(k) for kFin(n2)k \in \text{Fin}(n_2), then (p1p2)ϕ(i)=ψR(p2(k))(p_1 \otimes p_2)_{\phi(i)} = \psi_R(p_2(k)), where ψL\psi_L and ψR\psi_R are canonical isomorphisms between the corresponding vector spaces in the tensor species (formally defined as the action of the functor S.FDS.FD on the identity morphism).

theorem

Evaluation of the Tensor Product of Pure Tensors on Left Indices

#prodP_apply_castAdd

Let SS be a tensor species. For any two pure tensors p1p_1 and p2p_2 with index maps c:Fin(n1)Cc: \text{Fin}(n_1) \to C and c1:Fin(n2)Cc_1: \text{Fin}(n_2) \to C respectively, let p1p2p_1 \otimes p_2 denote their tensor product. For any index iFin(n1)i \in \text{Fin}(n_1), the component of the tensor product at the index ii (embedded into the combined index set Fin(n1+n2)\text{Fin}(n_1 + n_2)) is given by: (p1p2)i=ψ(p1(i))(p_1 \otimes p_2)_i = \psi(p_1(i)) where ψ\psi is the canonical isomorphism between the vector spaces at the corresponding indices (formally defined as the action of the functor S.FDS.FD on the identity morphism).

theorem

Evaluation of the Tensor Product of Pure Tensors on Right Indices

#prodP_apply_natAdd

Let SS be a tensor species. For any two pure tensors p1p_1 and p2p_2 with index maps c:Fin(n1)Cc: \text{Fin}(n_1) \to C and c1:Fin(n2)Cc_1: \text{Fin}(n_2) \to C respectively, let p1p2p_1 \otimes p_2 denote their tensor product. For any index iFin(n2)i \in \text{Fin}(n_2), the component of the tensor product at the shifted index n1+in_1 + i is given by: (p1p2)n1+i=ψ(p2(i))(p_1 \otimes p_2)_{n_1 + i} = \psi(p_2(i)) where ψ\psi is the canonical isomorphism between the vector spaces at the corresponding indices (formally defined as the action of the functor S.FDS.FD on the identity morphism).

theorem

ebeb1=ebb1e_b \otimes e_{b_1} = e_{b \cdot b_1} for Pure Basis Vectors

#prodP_basisVector

Let SS be a tensor species. For color sequences c:Fin(n)Cc: \text{Fin}(n) \to C and c1:Fin(n1)Cc_1: \text{Fin}(n_1) \to C, let bComponentIdx(c)b \in \text{ComponentIdx}(c) and b1ComponentIdx(c1)b_1 \in \text{ComponentIdx}(c_1) be component indices, and let ebe_b and eb1e_{b_1} denote their corresponding pure basis vectors. The tensor product of these basis vectors is equal to the basis vector associated with the product of the component indices: ebeb1=ebb1e_b \otimes e_{b_1} = e_{b \cdot b_1} where \otimes denotes the product of pure tensors (`prodP`) and bb1b \cdot b_1 denotes the product of component indices.

theorem

(pp1)b=pb1(p1)b2(p \otimes p_1)_b = p_{b_1} \cdot (p_1)_{b_2} for Pure Tensors

#prodP_component

Let SS be a tensor species. For any two pure tensors pp and p1p_1 with color sequences c:Fin(n)Cc: \text{Fin}(n) \to C and c1:Fin(m)Cc_1: \text{Fin}(m) \to C respectively, let pp1p \otimes p_1 denote their tensor product. For any basis index bb of the concatenated color sequence c+ ⁣+c1c \mathbin{+\!+} c_1, the component of the product pp1p \otimes p_1 at index bb is equal to the product of the individual components: (pp1)b=pb1(p1)b2(p \otimes p_1)_b = p_{b_1} \cdot (p_1)_{b_2} where (b1,b2)(b_1, b_2) is the pair of indices in ComponentIdx(c)×ComponentIdx(c1)\text{ComponentIdx}(c) \times \text{ComponentIdx}(c_1) corresponding to bb under the canonical equivalence.

theorem

Equivariance of Pure Tensor Product: (gp)(gp1)=g(pp1)(g \cdot p) \otimes (g \cdot p_1) = g \cdot (p \otimes p_1)

#prodP_equivariant

Let SS be a tensor species and GG be a group acting on the tensors. For any group element gGg \in G and any two pure tensors pPure(S,c)p \in \text{Pure}(S, c) and p1Pure(S,c1)p_1 \in \text{Pure}(S, c_1), the tensor product operation is equivariant with respect to the group action: (gp)(gp1)=g(pp1)(g \cdot p) \otimes (g \cdot p_1) = g \cdot (p \otimes p_1) where \otimes denotes the tensor product of pure tensors (`prodP`) and \cdot denotes the group action.

theorem

Permutation Condition for Product with a Pure Tensor with No Indices on the Right

#prodP_zero_right_permCond

For any sequence of indices c:Fin nCc : \text{Fin } n \to C and an empty sequence of indices c1:Fin 0Cc_1 : \text{Fin } 0 \to C, the identity permutation id\text{id} satisfies the permutation condition between cc and the concatenation of cc and c1c_1.

theorem

Tensor Product of a Pure Tensor with a Right Zero-Index Pure Tensor pp0=pp \otimes p_0 = p

#prodP_zero_right

Let SS be a tensor species. For any pure tensor pPure(S,c)p \in \text{Pure}(S, c) with index map c:Fin(n)Cc: \text{Fin}(n) \to C and any pure tensor p0Pure(S,c1)p_0 \in \text{Pure}(S, c_1) with an empty index map c1:Fin(0)Cc_1: \text{Fin}(0) \to C, the tensor product pp0p \otimes p_0 is equal to the pure tensor pp re-indexed via the identity permutation onto the concatenated index sequence Fin.append(c,c1)\text{Fin.append}(c, c_1).

definition

Product Swap Map

#prodSwapMap

For natural numbers \( n_1 \) and \( n_2 \), this defines the map between \( \text{Fin}(n_1 + n_2) \) and \( \text{Fin}(n_2 + n_1) \) formed by swapping the two blocks of elements.

theorem

The swap map prodSwapMap\text{prodSwapMap} satisfies the permutation condition for concatenated indices

#prodSwapMap_permCond

For any natural numbers n1n_1 and n2n_2, and any index species mappings c:Fin n1Cc: \text{Fin } n_1 \to C and c2:Fin n2Cc_2: \text{Fin } n_2 \to C, the permutation prodSwapMap(n2,n1)\text{prodSwapMap}(n_2, n_1)—which swaps two blocks of indices of sizes n2n_2 and n1n_1—satisfies the permutation condition PermCond\text{PermCond} relative to the concatenated index mappings Fin.append(c,c2)\text{Fin.append}(c, c_2) and Fin.append(c2,c)\text{Fin.append}(c_2, c). This ensures that the species of indices are preserved when the order of the tensor components is swapped.

theorem

Swapping the order of the product of two pure tensors pp1=perm(p1p)p \otimes p_1 = \text{perm}(p_1 \otimes p)

#prodP_swap

Let SS be a tensor species. For any two pure tensors pp and p1p_1 with index mappings c:Fin nCc: \text{Fin } n \to C and c1:Fin n1Cc_1: \text{Fin } n_1 \to C respectively, the tensor product pp1p \otimes p_1 is equal to the permutation of the tensor product p1pp_1 \otimes p under the map prodSwapMap(n,n1)\text{prodSwapMap}(n, n_1), which swaps the block of nn indices with the block of n1n_1 indices. That is, pp1=permP(prodSwapMap(n,n1))(p1p)p \otimes p_1 = \text{perm}_P(\text{prodSwapMap}(n, n_1))(p_1 \otimes p) where permP\text{perm}_P denotes the permutation of the indices of a pure tensor.

definition

Induced map on left tensor indices

#prodLeftMap

Given a natural number n2n_2 and a map σ:{0,,n1}{0,,n1}\sigma : \{0, \dots, n-1\} \to \{0, \dots, n'-1\}, this defines the induced map {0,,n+n21}{0,,n+n21}\{0, \dots, n+n_2-1\} \to \{0, \dots, n'+n_2-1\} which applies σ\sigma to the first nn elements and acts as the identity on the remaining n2n_2 elements.

theorem

prodLeftMap(n2,id)=id\text{prodLeftMap}(n_2, \text{id}) = \text{id}

#prodLeftMap_id

For any natural numbers nn and n2n_2, the induced map on the combined indices {0,,n+n21}\{0, \dots, n + n_2 - 1\} that applies the identity map id\text{id} to the first nn indices and acts as the identity on the remaining n2n_2 indices is equal to the identity map on {0,,n+n21}\{0, \dots, n + n_2 - 1\}.

theorem

`prodLeftMap` preserves the permutation condition

#prodLeftMap_permCond

Let n,n,n2n, n', n_2 be natural numbers. Let c:Fin nCc : \text{Fin } n \to C, c:Fin nCc' : \text{Fin } n' \to C, and c2:Fin n2Cc_2 : \text{Fin } n_2 \to C be index type assignments. Suppose a map σ:Fin nFin n\sigma : \text{Fin } n' \to \text{Fin } n satisfies the permutation condition PermCond(c,c,σ)\text{PermCond}(c, c', \sigma). Then the induced map f:Fin (n+n2)Fin (n+n2)f : \text{Fin } (n' + n_2) \to \text{Fin } (n + n_2), which applies σ\sigma to the first nn' indices and acts as the identity on the remaining n2n_2 indices, satisfies the permutation condition with respect to the concatenated index types cc2c \oplus c_2 and cc2c' \oplus c_2.

theorem

(permP σ p)p2=permP (σid) (pp2)(\text{permP} \ \sigma \ p) \otimes p_2 = \text{permP} \ (\sigma \oplus \text{id}) \ (p \otimes p_2)

#prodP_permP_left

Let SS be a tensor species. Let pp be a pure tensor with index map c:Fin nCc: \text{Fin } n \to C and p2p_2 be a pure tensor with index map c2:Fin n2Cc_2: \text{Fin } n_2 \to C. For any map σ:Fin nFin n\sigma: \text{Fin } n' \to \text{Fin } n satisfying the permutation condition hh between cc and cc', let permP(σ,h,p)\text{permP}(\sigma, h, p) be the tensor pp with its indices permuted by σ\sigma. Then the tensor product of this permuted tensor with p2p_2 satisfies: (permP σ h p)p2=permP (f,h,pp2) (\text{permP} \ \sigma \ h \ p) \otimes p_2 = \text{permP} \ (f, h', p \otimes p_2) where f=prodLeftMap(n2,σ)f = \text{prodLeftMap}(n_2, \sigma) is the map on the combined index set Fin(n+n2)Fin(n+n2)\text{Fin}(n' + n_2) \to \text{Fin}(n + n_2) that applies σ\sigma to the first nn' indices and acts as the identity on the remaining n2n_2 indices, and hh' is the induced permutation condition for the concatenated index maps.

definition

Induced map on right indices

#prodRightMap

Given a natural number n2n_2 and a map σ:{0,,n1}{0,,n1}\sigma : \{0, \dots, n-1\} \to \{0, \dots, n'-1\}, this defines the induced map {0,,n2+n1}{0,,n2+n1}\{0, \dots, n_2+n-1\} \to \{0, \dots, n_2+n'-1\} that acts as the identity on the first n2n_2 elements and applies σ\sigma to the remaining elements.

theorem

prodRightMap(n2,id)=id\text{prodRightMap}(n_2, \text{id}) = \text{id}

#prodRightMap_id

For any natural numbers n2n_2 and nn, the induced map prodRightMap\text{prodRightMap} on the set of indices {0,,n2+n1}\{0, \dots, n_2 + n - 1\}, which is defined to act as the identity on the first n2n_2 indices and apply the identity map id\text{id} to the remaining nn indices, is equal to the identity map on the entire set {0,,n2+n1}\{0, \dots, n_2 + n - 1\}.

theorem

`prodRightMap` preserves the permutation condition of species maps

#prodRightMap_permCond

Let c:{0,,n1}Cc : \{0, \dots, n-1\} \to C and c:{0,,n1}Cc' : \{0, \dots, n'-1\} \to C be maps assigning species to tensor indices. Let σ:{0,,n1}{0,,n1}\sigma : \{0, \dots, n'-1\} \to \{0, \dots, n-1\} be a map satisfying the permutation condition PermCond(c,c,σ)\text{PermCond}(c, c', \sigma), which ensures that the species at index ii in cc' matches the species at σ(i)\sigma(i) in cc. For any natural number n2n_2 and any species map c2:{0,,n21}Cc_2 : \{0, \dots, n_2-1\} \to C, let the induced map prodRightMap(n2,σ)\text{prodRightMap}(n_2, \sigma) be the map on indices {0,,n2+n1}\{0, \dots, n_2 + n' - 1\} that acts as the identity on the first n2n_2 indices and applies σ\sigma (offset by n2n_2) to the remaining nn' indices. This theorem states that the induced map satisfies the permutation condition for the concatenated species maps (c2c)(c_2 \oplus c) and (c2c)(c_2 \oplus c').

theorem

p2(permP σ p)=permP (idσ) (p2p)p_2 \otimes (\text{perm}_P \ \sigma \ p) = \text{perm}_P \ (\text{id} \oplus \sigma) \ (p_2 \otimes p)

#prodP_permP_right

Let SS be a tensor species. Let pp be a pure tensor with index map c:Fin nCc: \text{Fin } n \to C and p2p_2 be a pure tensor with index map c2:Fin n2Cc_2: \text{Fin } n_2 \to C. For any map σ:Fin nFin n\sigma: \text{Fin } n' \to \text{Fin } n satisfying the permutation condition hh between cc and cc', let permP(σ,h,p)\text{permP}(\sigma, h, p) be the tensor pp with its indices permuted by σ\sigma. Then the tensor product of p2p_2 with this permuted tensor satisfies: p2(permP σ h p)=permP (f,h,p2p) p_2 \otimes (\text{permP} \ \sigma \ h \ p) = \text{permP} \ (f, h', p_2 \otimes p) where f=prodRightMap(n2,σ)f = \text{prodRightMap}(n_2, \sigma) is the map on the combined index set Fin(n2+n)Fin(n2+n)\text{Fin}(n_2 + n') \to \text{Fin}(n_2 + n) that acts as the identity on the first n2n_2 indices and applies σ\sigma to the remaining nn' indices, and hh' is the induced permutation condition for the concatenated index maps.

definition

Product associativity map

#prodAssocMap

The map between the finite sets of size (n1+n2)+n3(n_1 + n_2) + n_3 and n1+(n2+n3)n_1 + (n_2 + n_3) formed by casting using the associativity of addition.

theorem

The product associativity map preserves indices in the first block Fin(n1)\text{Fin}(n_1)

#prodAssocMap_castAdd_castAdd

For any natural numbers n1,n2,n3n_1, n_2, n_3 and any index iFin(n1)i \in \text{Fin}(n_1), the product associativity map prodAssocMap:Fin((n1+n2)+n3)Fin(n1+(n2+n3))\text{prodAssocMap} : \text{Fin}((n_1 + n_2) + n_3) \to \text{Fin}(n_1 + (n_2 + n_3)) maps the index ii, when embedded into the first block of the set Fin((n1+n2)+n3)\text{Fin}((n_1 + n_2) + n_3), to the corresponding index in the first block of Fin(n1+(n2+n3))\text{Fin}(n_1 + (n_2 + n_3)). Specifically, prodAssocMapn1,n2,n3(castAddn3(castAddn2(i)))=finSumFinEquiv(inl(i))\text{prodAssocMap}_{n_1, n_2, n_3}(\text{castAdd}_{n_3}(\text{castAdd}_{n_2}(i))) = \text{finSumFinEquiv}(\text{inl}(i)) where castAddm\text{castAdd}_m denotes the inclusion of Fin(n)\text{Fin}(n) into Fin(n+m)\text{Fin}(n+m) as the first nn elements, and finSumFinEquiv\text{finSumFinEquiv} is the canonical isomorphism between the disjoint union Fin(n1)Fin(n2+n3)\text{Fin}(n_1) \oplus \text{Fin}(n_2 + n_3) and the set Fin(n1+(n2+n3))\text{Fin}(n_1 + (n_2 + n_3)).

theorem

Value of `prodAssocMap` for middle indices iFin n2i \in \text{Fin } n_2

#prodAssocMap_castAdd_natAdd

For any natural numbers n1,n2,n3n_1, n_2, n_3 and any index iFin n2i \in \text{Fin } n_2, the product associativity map prodAssocMap:Fin((n1+n2)+n3)Fin(n1+(n2+n3))\text{prodAssocMap} : \text{Fin}((n_1 + n_2) + n_3) \to \text{Fin}(n_1 + (n_2 + n_3)) satisfies: prodAssocMap(Fin.castAdd n3(Fin.natAdd n1i))=finSumFinEquiv(Sum.inr (finSumFinEquiv (Sum.inl i)))\text{prodAssocMap}(\text{Fin.castAdd } n_3 (\text{Fin.natAdd } n_1 i)) = \text{finSumFinEquiv}(\text{Sum.inr }(\text{finSumFinEquiv }(\text{Sum.inl } i))) In this context, Fin n\text{Fin } n represents the set of natural numbers {0,1,,n1}\{0, 1, \dots, n-1\}. The expression Fin.castAdd n3(Fin.natAdd n1i)\text{Fin.castAdd } n_3 (\text{Fin.natAdd } n_1 i) identifies ii as an element of the "middle" block of size n2n_2 within the range (n1+n2)+n3(n_1 + n_2) + n_3, yielding the value n1+in_1 + i. The function finSumFinEquiv\text{finSumFinEquiv} is the standard equivalence between the sum of finite sets Fin aFin b\text{Fin } a \oplus \text{Fin } b and the finite set Fin(a+b)\text{Fin}(a + b). Thus, the theorem states that prodAssocMap\text{prodAssocMap} maps the index n1+in_1 + i from the first grouping to the corresponding index n1+in_1 + i in the second grouping.

theorem

`prodAssocMap` preserves right-side indices of a triple product

#prodAssocMap_natAdd

For any natural numbers n1,n2,n3n_1, n_2, n_3 and an index iFin n3i \in \text{Fin } n_3, the product associativity map f:Fin((n1+n2)+n3)Fin(n1+(n2+n3))f: \text{Fin}((n_1 + n_2) + n_3) \to \text{Fin}(n_1 + (n_2 + n_3)) maps the index ii (offset by n1+n2n_1 + n_2) to the result of nested right-injections into the sum type structure. Specifically: f(i+n1+n2)=equiv(inr(equiv(inr i)))f(i + n_1 + n_2) = \text{equiv}(\text{inr}(\text{equiv}(\text{inr } i))) where equiv\text{equiv} denotes the canonical equivalence between a sum type Fin aFin b\text{Fin } a \oplus \text{Fin } b and the finite set Fin (a+b)\text{Fin }(a + b), and inr\text{inr} is the right injection into a sum type.

theorem

prodAssocMap\text{prodAssocMap} satisfies the permutation condition for triple concatenated species maps

#prodAssocMap_permCond

For any natural numbers n1,n2,n3n_1, n_2, n_3 and maps c:Fin n1Cc: \text{Fin } n_1 \to C, c2:Fin n2Cc_2: \text{Fin } n_2 \to C, and c3:Fin n3Cc_3: \text{Fin } n_3 \to C assigning species labels to indices, the product associativity map prodAssocMap:Fin((n1+n2)+n3)Fin(n1+(n2+n3))\text{prodAssocMap} : \text{Fin}((n_1 + n_2) + n_3) \to \text{Fin}(n_1 + (n_2 + n_3)) satisfies the permutation condition relating the two ways of concatenating these maps. Specifically, the species assigned to an index iFin((n1+n2)+n3)i \in \text{Fin}((n_1 + n_2) + n_3) in the regrouped concatenation (cc2)c3(c \oplus c_2) \oplus c_3 is identical to the species assigned to its image prodAssocMap(i)\text{prodAssocMap}(i) in the concatenation c(c2c3)c \oplus (c_2 \oplus c_3).

theorem

Associativity of the Tensor Product of Pure Tensors: (pp1)p2=perm(ϕ,p(p1p2))(p \otimes p_1) \otimes p_2 = \text{perm}(\phi, p \otimes (p_1 \otimes p_2))

#prodP_assoc

Let SS be a tensor species. For any three pure tensors pp, p1p_1, and p2p_2 with index maps c:Fin nCc : \text{Fin } n \to C, c1:Fin n1Cc_1 : \text{Fin } n_1 \to C, and c2:Fin n2Cc_2 : \text{Fin } n_2 \to C respectively, the tensor product operation \otimes (denoted formally as `prodP`) is associative up to a canonical re-indexing. Specifically: (pp1)p2=permP(ϕ,p(p1p2))(p \otimes p_1) \otimes p_2 = \text{permP}(\phi, p \otimes (p_1 \otimes p_2)) where ϕ:Fin((n+n1)+n2)Fin(n+(n1+n2))\phi : \text{Fin}((n + n_1) + n_2) \to \text{Fin}(n + (n_1 + n_2)) is the `prodAssocMap`, which regroups the indices based on the associativity of natural number addition, and `permP` is the operation that permutes the indices of the pure tensor.

definition

Associativity casting map from Fin(n1+(n2+n3))\mathrm{Fin}(n_1 + (n_2 + n_3)) to Fin(n1+n2+n3)\mathrm{Fin}(n_1 + n_2 + n_3)

#prodAssocMap'

Given natural numbers n1n_1, n2n_2, and n3n_3, this function provides the map from Fin(n1+(n2+n3))\mathrm{Fin}(n_1 + (n_2 + n_3)) to Fin(n1+n2+n3)\mathrm{Fin}(n_1 + n_2 + n_3) formed by casting using the associativity of addition.

theorem

prodAssocMap\text{prodAssocMap}' preserves indices in the first summand Fin n1\text{Fin } n_1

#prodAssocMap'_castAdd

For any natural numbers n1,n2,n3n_1, n_2, n_3 and any index iFin n1i \in \text{Fin } n_1, the associativity map prodAssocMap:Fin(n1+(n2+n3))Fin((n1+n2)+n3)\text{prodAssocMap}' : \text{Fin}(n_1 + (n_2 + n_3)) \to \text{Fin}((n_1 + n_2) + n_3) maps ii (embedded as an element of the first summand of the right-associated sum) to the index corresponding to ii in the first summand of the left-associated sum. Mathematically, this is expressed as: prodAssocMap(i)=i\text{prodAssocMap}' (i) = i where the left side treats ii as an element of Fin(n1+(n2+n3))\text{Fin}(n_1 + (n_2 + n_3)) via the natural inclusion `Fin.castAdd`, and the right side represents the nested inclusion of ii into the first summand of (n1+n2)+n3(n_1 + n_2) + n_3.

theorem

The map prodAssocMap\mathrm{prodAssocMap}' preserves indices in the middle block n2n_2

#prodAssocMap'_natAdd_castAdd

For any natural numbers n1n_1, n2n_2, and n3n_3, the associativity casting map prodAssocMap:Fin(n1+(n2+n3))Fin((n1+n2)+n3)\mathrm{prodAssocMap}' : \mathrm{Fin}(n_1 + (n_2 + n_3)) \to \mathrm{Fin}((n_1 + n_2) + n_3) maps an index iFin(n2)i \in \mathrm{Fin}(n_2) located in the "middle" block (i.e., shifted by n1n_1) to the corresponding index in the reassociated sum. Specifically, it maps the index n1+in_1 + i in Fin(n1+(n2+n3))\mathrm{Fin}(n_1 + (n_2 + n_3)) to the index n1+in_1 + i in Fin((n1+n2)+n3)\mathrm{Fin}((n_1 + n_2) + n_3), which is identified as being the right-hand part of the first (n1+n2)(n_1 + n_2) indices.

theorem

The map prodAssocMap\mathrm{prodAssocMap}' preserves indices in the third block n3n_3

#prodAssocMap'_natAdd_natAdd

For any natural numbers n1n_1, n2n_2, and n3n_3, the associativity casting map prodAssocMap:Fin(n1+(n2+n3))Fin((n1+n2)+n3)\mathrm{prodAssocMap}' : \mathrm{Fin}(n_1 + (n_2 + n_3)) \to \mathrm{Fin}((n_1 + n_2) + n_3) maps an index iFin(n3)i \in \mathrm{Fin}(n_3) located in the third block (i.e., shifted by n2n_2 and then by n1n_1) to the corresponding index in the reassociated sum. Specifically, it maps the index n1+n2+in_1 + n_2 + i in Fin(n1+(n2+n3))\mathrm{Fin}(n_1 + (n_2 + n_3)) to the index n1+n2+in_1 + n_2 + i in Fin((n1+n2)+n3)\mathrm{Fin}((n_1 + n_2) + n_3), which is identified as being the right-hand summand of the final sum.

theorem

`prodAssocMap'` satisfies the permutation condition for tensor associativity

#prodAssocMap'_permCond

For any natural numbers n1,n2,n3n_1, n_2, n_3 and index color configurations c:Fin n1C,c2:Fin n2C,c3:Fin n3Cc : \text{Fin } n_1 \to C, c_2 : \text{Fin } n_2 \to C, c_3 : \text{Fin } n_3 \to C, the associativity map prodAssocMap:Fin(n1+(n2+n3))Fin((n1+n2)+n3)\text{prodAssocMap}' : \text{Fin}(n_1 + (n_2 + n_3)) \to \text{Fin}((n_1 + n_2) + n_3) satisfies the permutation condition PermCond\text{PermCond} between the concatenated colorings ((cc2)c3)((c \oplus c_2) \oplus c_3) and (c(c2c3))(c \oplus (c_2 \oplus c_3)). This indicates that the map correctly preserves the colors of the indices when reassociating the product of three tensors.

theorem

Associativity of the Pure Tensor Product: p(p1p2)=permP((pp1)p2)p \otimes (p_1 \otimes p_2) = \text{permP}((p \otimes p_1) \otimes p_2)

#prodP_assoc'

Let SS be a tensor species. For any natural numbers n,n1,n2n, n_1, n_2 and pure tensors pp, p1p_1, and p2p_2 with index color configurations c:Fin nCc: \text{Fin } n \to C, c1:Fin n1Cc_1: \text{Fin } n_1 \to C, and c2:Fin n2Cc_2: \text{Fin } n_2 \to C respectively, the product of pure tensors is associative up to a reindexing of the indices. Specifically: p(p1p2)=permPϕ((pp1)p2)p \otimes (p_1 \otimes p_2) = \text{permP}_{\phi} ((p \otimes p_1) \otimes p_2) where \otimes denotes the pure tensor product (`prodP`), ϕ:Fin(n+(n1+n2))Fin((n+n1)+n2)\phi: \text{Fin}(n + (n_1 + n_2)) \to \text{Fin}((n + n_1) + n_2) is the canonical associativity casting map (`prodAssocMap'`), and permPϕ\text{permP}_{\phi} is the operation that permutes the indices of a pure tensor according to ϕ\phi.

definition

Product Index Equivalence

#prodIndexEquiv

Given a tensor species SS and color configurations c:Fin n1Cc : \text{Fin } n_1 \to C and c1:Fin n2Cc_1 : \text{Fin } n_2 \to C, this defines the linear equivalence over a field kk between the type S.F.obj(OverColor.mk(Sum.elim(c,c1)))S.F.\text{obj}(\text{OverColor.mk}(\text{Sum.elim}(c, c_1))) and the tensor space S.Tensor(Fin.append(c,c1))S.\text{Tensor}(\text{Fin.append}(c, c_1)).

theorem

The inverse index equivalence of a pure tensor pp equals the tensor product of its constituent vectors.

#prodIndexEquiv_symm_pure

Let SS be a tensor species over a field kk. For index color configurations c:Fin n1Cc : \text{Fin } n_1 \to C and c1:Fin n2Cc_1 : \text{Fin } n_2 \to C, let pp be a pure tensor indexed by the concatenation of cc and c1c_1. The theorem states that the inverse of the product index equivalence, prodIndexEquiv1\text{prodIndexEquiv}^{-1}, applied to the tensor representation of pp, is equal to the tensor product iFin n1Fin n2vi\bigotimes_{i \in \text{Fin } n_1 \oplus \text{Fin } n_2} v_i, where {vi}\{v_i\} is the family of vectors that constitute the pure tensor pp.

definition

Tensor product of tensors

#prodT

For a tensor species SS over a ring kk, and index color configurations c:Fin n1Cc: \text{Fin } n_1 \to C and c1:Fin n2Cc_1: \text{Fin } n_2 \to C, the function prodT\text{prodT} is the kk-bilinear map that takes a tensor tS.Tensor(c)t \in S.\text{Tensor}(c) and a tensor t1S.Tensor(c1)t_1 \in S.\text{Tensor}(c_1) and produces their tensor product in the space S.Tensor(cc1)S.\text{Tensor}(c \oplus c_1), where cc1c \oplus c_1 (represented by `Fin.append c c1`) is the concatenation of the two index configurations.

theorem

(t.toTensor)(t1.toTensor)=(prodP(t,t1)).toTensor(t.\text{toTensor}) \otimes (t_1.\text{toTensor}) = (\text{prodP}(t, t_1)).\text{toTensor}

#prodT_pure

Let SS be a tensor species over a ring kk. For any two pure tensors tt and t1t_1 with index color configurations c:Fin n1Cc: \text{Fin } n_1 \to C and c1:Fin n2Cc_1: \text{Fin } n_2 \to C respectively, the tensor product of their general tensor representations is equal to the general tensor representation of their pure tensor product: prodT(t.toTensor,t1.toTensor)=(prodP(t,t1)).toTensor\text{prodT}(t.\text{toTensor}, t_1.\text{toTensor}) = (\text{prodP}(t, t_1)).\text{toTensor}.

theorem

basis(b)basis(b1)=basis(bb1)\text{basis}(b) \otimes \text{basis}(b_1) = \text{basis}(b \cdot b_1) for Tensor Products

#prodT_basis

Let SS be a tensor species over a ring kk. For any two index color configurations c:Fin n1Cc: \text{Fin } n_1 \to C and c1:Fin n2Cc_1: \text{Fin } n_2 \to C, and for component indices bComponentIdx(c)b \in \text{ComponentIdx}(c) and b1ComponentIdx(c1)b_1 \in \text{ComponentIdx}(c_1), the tensor product of the basis elements corresponding to bb and b1b_1 is equal to the tensor representation of the pure basis vector associated with the concatenated index bb1b \cdot b_1: basis(c,b)basis(c1,b1)=toTensor(Pure.basisVector(c+ ⁣+c1,bb1))\text{basis}(c, b) \otimes \text{basis}(c_1, b_1) = \text{toTensor}(\text{Pure.basisVector}(c \mathbin{+\!+} c_1, b \cdot b_1)) where \otimes denotes the tensor product of tensors (`prodT`), c+ ⁣+c1c \mathbin{+\!+} c_1 (represented by `Fin.append c c1`) is the concatenation of the color configurations, and bb1b \cdot b_1 (represented by `b.prod b1`) is the product of the component indices.

definition

Linear equivalence S.Tensor(c)S.Tensor(c1)S.Tensor(c+ ⁣+c1)S.\text{Tensor}(c) \otimes S.\text{Tensor}(c_1) \simeq S.\text{Tensor}(c \mathbin{+\!+} c_1)

#tensorEquivProd

Let SS be a tensor species over a ring kk. For index color configurations c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,n21}Cc_1: \{0, \dots, n_2-1\} \to C, let S.Tensor(c)S.\text{Tensor}(c) and S.Tensor(c1)S.\text{Tensor}(c_1) be the respective spaces of tensors. The definition tensorEquivProd\text{tensorEquivProd} is the kk-linear equivalence: \[ S.\text{Tensor}(c) \otimes_k S.\text{Tensor}(c_1) \cong S.\text{Tensor}(c \mathbin{+\!+} c_1) \] where c+ ⁣+c1c \mathbin{+\!+} c_1 (denoted by `Fin.append c c1`) is the concatenation of the color configurations. This equivalence is the linear lift of the bilinear product map prodT\text{prodT}, mapping the elementary tensor tt1t \otimes t_1 to the product tensor prodT(t,t1)\text{prodT}(t, t_1).

theorem

The basis of S.Tensor(c+ ⁣+c1)S.\text{Tensor}(c \mathbin{+\!+} c_1) is the product of the bases of S.Tensor(c)S.\text{Tensor}(c) and S.Tensor(c1)S.\text{Tensor}(c_1)

#basis_prod_eq

Let SS be a tensor species over a ring kk. For any two index color configurations c:Fin n1Cc: \text{Fin } n_1 \to C and c1:Fin n2Cc_1: \text{Fin } n_2 \to C, the basis for the tensor space of the concatenated configuration c+ ⁣+c1c \mathbin{+\!+} c_1 (denoted `Fin.append c c1`) can be expressed in terms of the bases for the individual tensor spaces S.Tensor(c)S.\text{Tensor}(c) and S.Tensor(c1)S.\text{Tensor}(c_1). Specifically, the basis basis(c+ ⁣+c1)\text{basis}(c \mathbin{+\!+} c_1) is equal to the tensor product of the bases basis(c)\text{basis}(c) and basis(c1)\text{basis}(c_1), reindexed by the canonical equivalence between product indices and concatenated indices, and mapped through the linear equivalence tensorEquivProd\text{tensorEquivProd} between S.Tensor(c)kS.Tensor(c1)S.\text{Tensor}(c) \otimes_k S.\text{Tensor}(c_1) and S.Tensor(c+ ⁣+c1)S.\text{Tensor}(c \mathbin{+\!+} c_1).

theorem

(tt1)b=tb1(t1)b2(t \otimes t_1)_b = t_{b_1} \cdot (t_1)_{b_2} for Tensors

#prodT_basis_repr_apply

Let SS be a tensor species. For any two tensors tS.Tensor(c)t \in S.\text{Tensor}(c) and t1S.Tensor(c1)t_1 \in S.\text{Tensor}(c_1) with index color configurations c:Fin nCc: \text{Fin } n \to C and c1:Fin mCc_1: \text{Fin } m \to C, let tt1t \otimes t_1 (denoted `prodT t t1`) be their tensor product in the space S.Tensor(c+ ⁣+c1)S.\text{Tensor}(c \mathbin{+\!+} c_1). For any basis index bComponentIdx(c+ ⁣+c1)b \in \text{ComponentIdx}(c \mathbin{+\!+} c_1), the component of the product tt1t \otimes t_1 at index bb is equal to the product of the components of tt and t1t_1: \[ (t \otimes t_1)_b = t_{b_1} \cdot (t_1)_{b_2} \] where (b1,b2)(b_1, b_2) is the pair of indices in ComponentIdx(c)×ComponentIdx(c1)\text{ComponentIdx}(c) \times \text{ComponentIdx}(c_1) corresponding to bb under the canonical equivalence.

theorem

Equivariance of Tensor Product: (gt)(gt1)=g(tt1)(g \cdot t) \otimes (g \cdot t_1) = g \cdot (t \otimes t_1)

#prodT_equivariant

Let SS be a tensor species and GG be a group acting on the tensors. For any group element gGg \in G and any two tensors tS.Tensor(c)t \in S.\text{Tensor}(c) and t1S.Tensor(c1)t_1 \in S.\text{Tensor}(c_1), the tensor product operation is equivariant with respect to the group action: \[ (g \cdot t) \otimes (g \cdot t_1) = g \cdot (t \otimes t_1) \] where \otimes denotes the tensor product of tensors (`prodT`) and \cdot denotes the group action.

theorem

Tensor Product with the Default Zero-Index Tensor on the Right: ttdefault=tt \otimes t_{\text{default}} = t

#prodT_default_right

Let SS be a tensor species over a ring kk. For any tensor tt with index color configuration c:Fin nCc: \text{Fin } n \to C and the default tensor tdefaultt_{\text{default}} with an empty index configuration c1:Fin 0Cc_1: \text{Fin } 0 \to C, their tensor product ttdefaultt \otimes t_{\text{default}} is equal to the tensor tt re-indexed via the identity permutation onto the concatenated index sequence Fin.append(c,c1)\text{Fin.append}(c, c_1).

theorem

Swapping the order of the product of two tensors: tt1=perm(t1t)t \otimes t_1 = \text{perm}(t_1 \otimes t)

#prodT_swap

Let SS be a tensor species. For any two tensors tS.Tensor(c)t \in S.\text{Tensor}(c) and t1S.Tensor(c1)t_1 \in S.\text{Tensor}(c_1) with index color configurations c:Fin nCc: \text{Fin } n \to C and c1:Fin n1Cc_1: \text{Fin } n_1 \to C, the tensor product prodT(t,t1)\text{prodT}(t, t_1) is equal to the tensor product prodT(t1,t)\text{prodT}(t_1, t) permuted by the map σ=prodSwapMap(n,n1)\sigma = \text{prodSwapMap}(n, n_1), which swaps the block of nn indices with the block of n1n_1 indices. That is, prodT(t,t1)=permT(σ,h)(prodT(t1,t))\text{prodT}(t, t_1) = \text{perm}_T(\sigma, h)(\text{prodT}(t_1, t)) where hh is the permutation condition prodSwapMap_permCond\text{prodSwapMap\_permCond} ensuring the species of indices are preserved.

theorem

(permT σ t)t2=permT (σid) (tt2)(\text{permT} \ \sigma \ t) \otimes t_2 = \text{permT} \ (\sigma \oplus \text{id}) \ (t \otimes t_2)

#prodT_permT_left

Let SS be a tensor species over a ring kk. Let tt be a tensor with index color configuration c:Fin nCc: \text{Fin } n \to C and t2t_2 be a tensor with index color configuration c2:Fin n2Cc_2: \text{Fin } n_2 \to C. For any map σ:Fin nFin n\sigma : \text{Fin } n' \to \text{Fin } n satisfying the permutation condition hh between cc and cc', the tensor product of the permuted tensor permT(σ,h,t)\text{permT}(\sigma, h, t) with t2t_2 satisfies: prodT(permT(σ,h,t),t2)=permT(f,h,prodT(t,t2))\text{prodT}(\text{permT}(\sigma, h, t), t_2) = \text{permT}(f, h', \text{prodT}(t, t_2)) where ff is the induced map Fin(n+n2)Fin(n+n2)\text{Fin}(n' + n_2) \to \text{Fin}(n + n_2) (represented by `prodLeftMap n2 σ`) that applies σ\sigma to the first nn' indices and acts as the identity on the remaining n2n_2 indices, and hh' is the induced permutation condition for the concatenated index configurations.

theorem

t2(permT σ t)=permT (idσ) (t2t)t_2 \otimes (\text{permT} \ \sigma \ t) = \text{permT} \ (\text{id} \oplus \sigma) \ (t_2 \otimes t)

#prodT_permT_right

Let SS be a tensor species over a ring kk. Let tt be a tensor with index color configuration c:Fin nCc: \text{Fin } n \to C and t2t_2 be a tensor with index color configuration c2:Fin n2Cc_2: \text{Fin } n_2 \to C. For any map σ:Fin nFin n\sigma : \text{Fin } n' \to \text{Fin } n satisfying the permutation condition hh between cc and cc', the tensor product of t2t_2 with the permuted tensor permT(σ,h,t)\text{permT}(\sigma, h, t) satisfies: prodT(t2,permT(σ,h,t))=permT(f,h,prodT(t2,t))\text{prodT}(t_2, \text{permT}(\sigma, h, t)) = \text{permT}(f, h', \text{prodT}(t_2, t)) where ff is the induced map Fin(n2+n)Fin(n2+n)\text{Fin}(n_2 + n') \to \text{Fin}(n_2 + n) (represented by `prodRightMap n2 σ`) that acts as the identity on the first n2n_2 indices and applies σ\sigma to the remaining nn' indices, and hh' is the induced permutation condition for the concatenated index configurations.

theorem

Associativity of the tensor product: (tt1)t2=perm(ϕ,t(t1t2))(t \otimes t_1) \otimes t_2 = \text{perm}(\phi, t \otimes (t_1 \otimes t_2))

#prodT_assoc

Let SS be a tensor species. For any three tensors t,t1,t2t, t_1, t_2 with index configurations c:Fin nCc: \text{Fin } n \to C, c1:Fin n1Cc_1: \text{Fin } n_1 \to C, and c2:Fin n2Cc_2: \text{Fin } n_2 \to C respectively, the tensor product operation (denoted formally as `prodT`) is associative up to a canonical re-indexing of indices. Specifically, prodT(prodT(t,t1),t2)=permT(ϕ,h,prodT(t,prodT(t1,t2)))\text{prodT}(\text{prodT}(t, t_1), t_2) = \text{permT}(\phi, h, \text{prodT}(t, \text{prodT}(t_1, t_2))) where ϕ:Fin((n+n1)+n2)Fin(n+(n1+n2))\phi : \text{Fin}((n + n_1) + n_2) \to \text{Fin}(n + (n_1 + n_2)) is the map `prodAssocMap` that regroups the indices according to the associativity of natural number addition, hh is the permutation condition `prodAssocMap_permCond`, and `permT` is the operation that permutes the tensor indices.

theorem

Associativity of Tensor Product: t(t1t2)=permT((tt1)t2)t \otimes (t_1 \otimes t_2) = \text{permT}((t \otimes t_1) \otimes t_2)

#prodT_assoc'

Let SS be a tensor species. For any natural numbers n,n1,n2n, n_1, n_2 and tensors t,t1,t2t, t_1, t_2 with index color configurations c:Fin nCc: \text{Fin } n \to C, c1:Fin n1Cc_1: \text{Fin } n_1 \to C, and c2:Fin n2Cc_2: \text{Fin } n_2 \to C respectively, the product of tensors is associative up to a re-indexing of the indices. Specifically: prodT(t,prodT(t1,t2))=permTϕ(prodT(prodT(t,t1),t2))\text{prodT}(t, \text{prodT}(t_1, t_2)) = \text{permT}_{\phi} (\text{prodT}(\text{prodT}(t, t_1), t_2)) where ϕ:Fin(n+(n1+n2))Fin((n+n1)+n2)\phi: \text{Fin}(n + (n_1 + n_2)) \to \text{Fin}((n + n_1) + n_2) is the canonical associativity casting map `prodAssocMap'`, and permTϕ\text{permT}_{\phi} is the operation that permutes the indices of a tensor according to ϕ\phi.