PhyslibSearch

Physlib.Relativity.Tensors.Basic

89 declarations

abbrev

Type of Tensors

#Tensor

The type of tensors associated with a list of indices of a given color sequence \( c : \{0, \ldots, n-1\} \to C \), where \( n \) is a natural number and \( C \) is the set of colors.

abbrev

Tensor Component Indices

#ComponentIdx

Given a natural number nn and a sequence of index types c:{0,,n1}Cc : \{0, \dots, n-1\} \to C (for example, representing contravariant and covariant indices), this defines the type of component indices for a tensor with the index structure cc. Mathematically, it is defined as the Cartesian product j=0n1{0,,dj1}\prod_{j=0}^{n-1} \{0, \dots, d_j - 1\}, where djd_j is the dimension of the representation space associated with the index type cjc_j. For instance, an element of this type could be a multi-index like (0,2)(0, 2), corresponding to the indices of a tensor component such as T20T^0_2.

theorem

i=j    bi=bji = j \implies b_i = b_j for a multi-index bb

#congr_right

Let nn be a natural number and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a sequence representing the index structure (colors) of a tensor. Let bb be a multi-index (component index) for this structure, where each component bkb_k corresponds to the index at position kk. For any two indices i,j{0,,n1}i, j \in \{0, \dots, n-1\}, if i=ji = j, then the ii-th component bib_i is equal to the jj-th component bjb_j.

definition

Cast of a component index bb from structure cc to cmcm

#cast

Given two natural numbers n,mn, m and two sequences of index types (colors) c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and cm:{0,,m1}Ccm: \{0, \dots, m-1\} \to C, suppose the ranks are equal (n=mn = m) and the color maps are equivalent (c=cmcastc = cm \circ \text{cast}). This function transforms a component index bb associated with the structure cc into the corresponding component index associated with the structure cmcm. Specifically, for an input multi-index b=(b0,b1,,bn1)b = (b_0, b_1, \dots, b_{n-1}), where each bib_i is an index for the representation space of color c(i)c(i), the function returns the same multi-index viewed as an element of the component index type for cmcm.

abbrev

Pure Tensor

#Pure

The type of pure tensors associated to a list of indices \( c : \{0, \dots, n-1\} \to C \) over a tensor species \( S \). A pure tensor is a tensor which can be written in the form \( v_1 \otimes v_2 \otimes \dots \otimes v_n \), and is formally defined as the dependent product of the vector spaces associated with the colors \( c(i) \).

theorem

i=ji = j implies congruence of pure tensor components p(i)p(i) and p(j)p(j)

#congr_right

Given a tensor species SS over a field kk and a sequence of colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, let pp be a pure tensor of type Pure Sc\text{Pure } S c. For any indices i,j{0,,n1}i, j \in \{0, \dots, n-1\}, if i=ji = j, then the jj-th component p(j)p(j) is equal to the ii-th component p(i)p(i) after transport via the canonical isomorphism induced by the equality of the indices.

theorem

i=j    τc(i),c(pi)=τc(j),c(pj)i=j \implies \tau_{c(i), c'}(p_i) = \tau_{c(j), c'}(p_j) for pure tensors

#congr_mid

Let SS be a tensor species and pp be a pure tensor with color mapping c:{0,,n1}Cc: \{0, \dots, n-1\} \to C. Suppose i,j{0,,n1}i, j \in \{0, \dots, n-1\} are indices and cCc' \in C is a color such that i=ji = j, c(i)=cc(i) = c', and c(j)=cc(j) = c'. Let VaV_a denote the vector space associated with color aCa \in C, and let τa,b:VaVb\tau_{a, b}: V_a \to V_b denote the canonical isomorphism induced by the equality of colors a=ba = b. Then the ii-th component of the pure tensor pp mapped to VcV_{c'} is equal to the jj-th component of pp mapped to VcV_{c'}, i.e., \[ \tau_{c(i), c'}(p(i)) = \tau_{c(j), c'}(p(j)) \]

theorem

τc(i),c(pi)=τc1(j),c(pj)    τc(i),c1(j)(pi)=pj\tau_{c(i), c'}(p_i) = \tau_{c_1(j), c'}(p'_j) \iff \tau_{c(i), c_1(j)}(p_i) = p'_j for pure tensors

#map_mid_move_left

Let SS be a tensor species, and let pp and pp' be pure tensors with index colorings c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,n11}Cc_1: \{0, \dots, n_1-1\} \to C, respectively. Suppose there exist indices ii and jj and a color cCc' \in C such that the colors match, i.e., c(i)=cc(i) = c' and c1(j)=cc_1(j) = c'. Let τa,b:VaVb\tau_{a,b}: V_a \to V_b denote the canonical isomorphism between the vector spaces associated with colors aa and bb (where VaV_a is defined by the functor S.FDS.FD). Then, the ii-th component of pp mapped to VcV_{c'} is equal to the jj-th component of pp' mapped to VcV_{c'} if and only if the ii-th component of pp mapped directly to Vc1(j)V_{c_1(j)} is equal to the jj-th component of pp'. That is, \[ \tau_{c(i), c'}(p_i) = \tau_{c_1(j), c'}(p'_j) \iff \tau_{c(i), c_1(j)}(p_i) = p'_j \]

theorem

S.FD(g)(S.FD(f)(p(i)))=S.FD(fg)(p(i))S.FD(g)(S.FD(f)(p(i))) = S.FD(f \gg g)(p(i))

#map_map_apply

Let SS be a tensor species over a field kk and a set of colors CC. Let pp be a pure tensor of type c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, such that its ii-th component p(i)p(i) belongs to the vector space Vc(i)V_{c(i)} associated with the color c(i)c(i). Given morphisms f:c(i)c1f: c(i) \to c_1 and g:c1c2g: c_1 \to c_2 in the discrete category of colors, let S.FD(f):Vc(i)Vc1S.FD(f): V_{c(i)} \to V_{c_1} and S.FD(g):Vc1Vc2S.FD(g): V_{c_1} \to V_{c_2} be the linear maps induced by the functor S.FDS.FD. Then, the application of these maps sequentially to the component p(i)p(i) satisfies the composition rule: S.FD(g)(S.FD(f)(p(i)))=S.FD(fg)(p(i))S.FD(g)(S.FD(f)(p(i))) = S.FD(f \gg g)(p(i)) where fgf \gg g is the composition of the morphisms in the category of colors.

definition

Tensor product of a pure tensor ppip \mapsto \bigotimes p_i

#toTensor

Given a tensor species SS over a field kk, let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a sequence of colors where each color corresponds to a specific vector space. For a pure tensor pp (formally an element of the dependent product i=0n1Vc(i)\prod_{i=0}^{n-1} V_{c(i)}), this function returns the corresponding element in the tensor product space S.Tensor ci=0n1Vc(i)S.\text{Tensor } c \cong \bigotimes_{i=0}^{n-1} V_{c(i)}. Specifically, it maps the family of vectors pp to the tensor product i{0,,n1}p(i)\bigotimes_{i \in \{0, \dots, n-1\}} p(i).

theorem

`toTensor p` is the canonical tensor product pi\bigotimes p_i

#toTensor_apply

Let SS be a tensor species over a field kk and CC be a set of colors. For a sequence of nn colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, let pp be a pure tensor, which is formally an element of the dependent product i=0n1Vc(i)\prod_{i=0}^{n-1} V_{c(i)} where each Vc(i)V_{c(i)} is the vector space associated with the color c(i)c(i). The result of the mapping `toTensor` applied to pp is equal to the canonical tensor product of the family of vectors p(i)p(i) over the field kk, denoted as i=0n1p(i)\bigotimes_{i=0}^{n-1} p(i).

definition

Updating the ii-th component of a pure tensor pp

#update

Given a tensor species SS and a sequence of nn colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, let Vc(j)V_{c(j)} denote the vector space associated with the color c(j)c(j). A pure tensor pp is an element of the dependent product j=0n1Vc(j)\prod_{j=0}^{n-1} V_{c(j)}, which can be identified with the simple tensor v0v1vn1v_0 \otimes v_1 \otimes \dots \otimes v_{n-1} where vjVc(j)v_j \in V_{c(j)}. For a given index i{0,,n1}i \in \{0, \dots, n-1\} and an element xVc(i)x \in V_{c(i)}, the update function returns a new pure tensor pp' such that the ii-th component is replaced by xx. Specifically, p(i)=xp'(i) = x and p(j)=p(j)p'(j) = p(j) for all jij \neq i, corresponding to the tensor v0vi1xvi+1vn1v_0 \otimes \dots \otimes v_{i-1} \otimes x \otimes v_{i+1} \otimes \dots \otimes v_{n-1}.

theorem

(update p,i,x)i=x(\text{update } p, i, x)_i = x

#update_same

Let SS be a tensor species and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a sequence of colors, where each c(j)c(j) corresponds to a vector space Vc(j)V_{c(j)}. Let pp be a pure tensor, which is an element of the dependent product j=0n1Vc(j)\prod_{j=0}^{n-1} V_{c(j)}. For any index i{0,,n1}i \in \{0, \dots, n-1\} and any vector xVc(i)x \in V_{c(i)}, the ii-th component of the pure tensor pp updated at index ii with xx is equal to xx: (update p,i,x)i=x (\text{update } p, i, x)_i = x

theorem

Updating a Pure Tensor at an Index Distinct from ii Preserves the ii-th Component

#update_succAbove_apply

Let SS be a tensor species and c:{0,,n}Cc: \{0, \dots, n\} \to C be a sequence of colors, where each c(m)c(m) corresponds to a vector space Vc(m)V_{c(m)}. Let pp be a pure tensor, which is an element of the dependent product m=0nVc(m)\prod_{m=0}^{n} V_{c(m)}. For any index i{0,,n}i \in \{0, \dots, n\} and j{0,,n1}j \in \{0, \dots, n-1\}, let xx be a vector in Vc(i.succAbove j)V_{c(i.\text{succAbove } j)}. Then updating the (i.succAbove j)(i.\text{succAbove } j)-th component of pp with xx does not change the value of the pure tensor at index ii: (update p,i.succAbove j,x)i=pi (\text{update } p, i.\text{succAbove } j, x)_i = p_i where i.succAbove ji.\text{succAbove } j denotes the jj-th index in {0,,n}\{0, \dots, n\} excluding ii.

theorem

Additivity of the Tensor Product with Respect to Individual Components

#toTensor_update_add

Let SS be a tensor species over a field kk and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a sequence of colors, where each c(j)c(j) corresponds to a vector space Vc(j)V_{c(j)}. Let pp be a pure tensor (an element of the dependent product j=0n1Vc(j)\prod_{j=0}^{n-1} V_{c(j)}), ii be an index in {0,,n1}\{0, \dots, n-1\}, and x,yx, y be vectors in Vc(i)V_{c(i)}. Then the tensor product operation toTensor\text{toTensor} is additive in the ii-th component, such that: toTensor(update p,i,x+y)=toTensor(update p,i,x)+toTensor(update p,i,y) \text{toTensor}(\text{update } p, i, x + y) = \text{toTensor}(\text{update } p, i, x) + \text{toTensor}(\text{update } p, i, y) In terms of simple tensors, this states that: p(0)(x+y)p(n1)=(p(0)xp(n1))+(p(0)yp(n1)) p(0) \otimes \dots \otimes (x + y) \otimes \dots \otimes p(n-1) = (p(0) \otimes \dots \otimes x \otimes \dots \otimes p(n-1)) + (p(0) \otimes \dots \otimes y \otimes \dots \otimes p(n-1)) where the ii-th entry is the only one being modified.

theorem

Scalar Multiplicativity of the Tensor Product with Respect to Individual Components

#toTensor_update_smul

Let SS be a tensor species over a field kk and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a sequence of colors, where each c(j)c(j) corresponds to a vector space Vc(j)V_{c(j)}. Let pp be a pure tensor (an element of the dependent product j=0n1Vc(j)\prod_{j=0}^{n-1} V_{c(j)}), ii be an index in {0,,n1}\{0, \dots, n-1\}, rr be a scalar in kk, and yy be a vector in Vc(i)V_{c(i)}. Then the tensor product operation toTensor\text{toTensor} is homogeneous with respect to scalar multiplication in the ii-th component, such that: toTensor(update p,i,ry)=rtoTensor(update p,i,y) \text{toTensor}(\text{update } p, i, r \cdot y) = r \cdot \text{toTensor}(\text{update } p, i, y) In terms of simple tensors, this states that: p(0)(ry)p(n1)=r(p(0)yp(n1)) p(0) \otimes \dots \otimes (r \cdot y) \otimes \dots \otimes p(n-1) = r \cdot (p(0) \otimes \dots \otimes y \otimes \dots \otimes p(n-1)) where the ii-th entry is the only one being modified.

definition

Drop the ii-th component of a pure tensor

#drop

Let SS be a tensor species over a field kk. Given a sequence of colors c:{0,,n}Cc : \{0, \dots, n\} \to C and a pure tensor pp of type cc (which can be represented as v0v1vnv_0 \otimes v_1 \otimes \dots \otimes v_n), the function drop pi\text{drop } p \, i returns a new pure tensor of rank nn by removing the ii-th component. Formally, for an index i{0,,n}i \in \{0, \dots, n\}, the resulting pure tensor has the type csuccAboveic \circ \text{succAbove}_i, where succAbovei:{0,,n1}{0,,n}\text{succAbove}_i : \{0, \dots, n-1\} \to \{0, \dots, n\} is the order-preserving map that skips ii. The jj-th component of the resulting tensor is given by p(succAbovei(j))p(\text{succAbove}_i(j)). For example, if n=2n = 2 and p=v0v1v2p = v_0 \otimes v_1 \otimes v_2, then drop p1=v0v2\text{drop } p \, 1 = v_0 \otimes v_2.

theorem

(update p(succAboveik)x).drop i=(drop pi).update kx(\text{update } p \, (\text{succAbove}_i \, k) \, x).\text{drop } i = (\text{drop } p \, i).\text{update } k \, x

#update_succAbove_drop

Let SS be a tensor species over a field kk. Let pp be a pure tensor of rank n+1n+1 associated with a sequence of colors c:{0,,n}Cc: \{0, \dots, n\} \to C. Let drop(p,i)\text{drop}(p, i) denote the pure tensor of rank nn obtained by removing the ii-th component of pp at index i{0,,n}i \in \{0, \dots, n\}. Let succAbovei:{0,,n1}{0,,n}\text{succAbove}_i : \{0, \dots, n-1\} \to \{0, \dots, n\} be the order-preserving map that skips ii. For any index k{0,,n1}k \in \{0, \dots, n-1\} and any vector xVc(succAbovei(k))x \in V_{c(\text{succAbove}_i(k))}, the result of updating the component of pp at index succAbovei(k)\text{succAbove}_i(k) and then dropping the ii-th component is the same as dropping the ii-th component of pp first and then updating the kk-th component of the resulting rank-nn tensor: (update(p,succAbovei(k),x)).drop(i)=(drop(p,i)).update(k,x)(\text{update}(p, \text{succAbove}_i(k), x)).\text{drop}(i) = (\text{drop}(p, i)).\text{update}(k, x)

theorem

(update pix).drop i=p.drop i(\text{update } p \, i \, x).\text{drop } i = p.\text{drop } i

#update_drop_self

Let pp be a pure tensor of rank n+1n+1 associated with a sequence of colors c:{0,,n}Cc: \{0, \dots, n\} \to C, which can be viewed as an element of the dependent product j=0nVc(j)\prod_{j=0}^{n} V_{c(j)}. Let update(p,i,x)\text{update}(p, i, x) denote the pure tensor obtained by replacing the ii-th component of pp with a vector xVc(i)x \in V_{c(i)}. Let drop(p,i)\text{drop}(p, i) denote the rank-nn pure tensor obtained by removing the ii-th component of pp. For any index i{0,,n}i \in \{0, \dots, n\} and any vector xVc(i)x \in V_{c(i)}, the result of updating the ii-th component and then dropping it is identical to dropping the original ii-th component: (update(p,i,x)).drop(i)=drop(p,i)(\text{update}(p, i, x)).\text{drop}(i) = \text{drop}(p, i)

theorem

μ(t.toTensort1.toTensor)=tprod(t,t1)\mu(t.\text{toTensor} \otimes t_1.\text{toTensor}) = \text{tprod}(t, t_1)

#μ_toTensor_tmul_toTensor

Let SS be a tensor species over a field kk. Given two pure tensors tt and t1t_1 of ranks n1n_1 and n2n_2 respectively, let t.toTensor=i=0n11tit.\text{toTensor} = \bigotimes_{i=0}^{n_1-1} t_i and t1.toTensor=j=0n21(t1)jt_1.\text{toTensor} = \bigotimes_{j=0}^{n_2-1} (t_1)_j be the corresponding tensors. The lax monoidal morphism μ\mu of the tensor species functor maps the tensor product of these two tensors to the tensor product of the concatenated vector family: μ(t.toTensort1.toTensor)=kFin n1Fin n2vk\mu(t.\text{toTensor} \otimes t_1.\text{toTensor}) = \bigotimes_{k \in \text{Fin } n_1 \sqcup \text{Fin } n_2} v_k where the family of vectors vv is defined by vinl(i)=tiv_{\text{inl}(i)} = t_i for i{0,,n11}i \in \{0, \dots, n_1-1\} and vinr(j)=(t1)jv_{\text{inr}(j)} = (t_1)_j for j{0,,n21}j \in \{0, \dots, n_2-1\}.

definition

Component of a pure tensor pp at multi-index bb is i(pi)bi\prod_i (p_i)_{b_i}

#component

Given a pure tensor pp of rank nn with index structure c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and a multi-index b=(b0,,bn1)b = (b_0, \dots, b_{n-1}), the function returns the scalar component of pp at index bb. This is defined as the product of the coordinates of each constituent vector pip_i relative to the basis Bc(i)\mathcal{B}_{c(i)} associated with the index color c(i)c(i): component(p,b)=i=0n1(pi)bi\text{component}(p, b) = \prod_{i=0}^{n-1} (p_i)_{b_i} where (pi)bi(p_i)_{b_i} denotes the bib_i-th coordinate of the ii-th vector pip_i of the pure tensor with respect to the basis provided by the tensor species SS.

theorem

component(p,b)=i(pi)bi\text{component}(p, b) = \prod_{i} (p_i)_{b_i} for pure tensors

#component_eq

Let SS be a tensor species over a field kk. For a pure tensor pp of rank nn (which can be viewed as a sequence of vectors p0,p1,,pn1p_0, p_1, \dots, p_{n-1}) with index structure c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, and a multi-index b=(b0,b1,,bn1)b = (b_0, b_1, \dots, b_{n-1}), the component of pp at index bb is equal to the product of the coordinates of each constituent vector pip_i with respect to the basis Bc(i)\mathcal{B}_{c(i)} at index bib_i: component(p,b)=i=0n1(pi)bi\text{component}(p, b) = \prod_{i=0}^{n-1} (p_i)_{b_i} where (pi)bi(p_i)_{b_i} is the coordinate of the ii-th vector pip_i corresponding to the basis element indexed by bib_i.

theorem

component(p,b)=(pi)bicomponent(drop pi,bi)\text{component}(p, b) = (p_i)_{b_i} \cdot \text{component}(\text{drop } p \, i, b_{-i})

#component_eq_drop

Let SS be a tensor species over a field kk. For a pure tensor pp of rank n+1n+1 with index structure c:{0,,n}Cc: \{0, \dots, n\} \to C, a multi-index bb, and any specific index i{0,,n}i \in \{0, \dots, n\}, the component of pp at bb satisfies the recursive relation: component(p,b)=(pi)bicomponent(drop pi,bsuccAbovei)\text{component}(p, b) = (p_i)_{b_i} \cdot \text{component}(\text{drop } p \, i, b \circ \text{succAbove}_i) where (pi)bi(p_i)_{b_i} is the bib_i-th coordinate of the ii-th constituent vector pip_i of the pure tensor with respect to the basis Bc(i)\mathcal{B}_{c(i)}, and drop pi\text{drop } p \, i is the pure tensor of rank nn obtained by removing the ii-th vector from the product. The term bsuccAboveib \circ \text{succAbove}_i represents the multi-index bb with its ii-th entry removed.

theorem

component(update(p,i,x+y),b)=component(update(p,i,x),b)+component(update(p,i,y),b)\text{component}(\text{update}(p, i, x + y), b) = \text{component}(\text{update}(p, i, x), b) + \text{component}(\text{update}(p, i, y), b)

#component_update_add

Let SS be a tensor species over a field kk. Let pp be a pure tensor of rank nn with index structure c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, which can be viewed as a product of vectors v0v1vn1v_0 \otimes v_1 \otimes \dots \otimes v_{n-1}. For any index i{0,,n1}i \in \{0, \dots, n-1\}, vectors xx and yy in the vector space Vc(i)V_{c(i)} associated with color c(i)c(i), and multi-index bb, the component of the updated pure tensor satisfies: component(update(p,i,x+y),b)=component(update(p,i,x),b)+component(update(p,i,y),b)\text{component}(\text{update}(p, i, x + y), b) = \text{component}(\text{update}(p, i, x), b) + \text{component}(\text{update}(p, i, y), b) where update(p,i,v)\text{update}(p, i, v) denotes the pure tensor pp with its ii-th constituent vector replaced by vv, and component(p,b)\text{component}(p, b) is the scalar component of the pure tensor at multi-index bb.

theorem

component(update(p,i,xy),b)=xcomponent(update(p,i,y),b)\text{component}(\text{update}(p, i, x \cdot y), b) = x \cdot \text{component}(\text{update}(p, i, y), b)

#component_update_smul

Let SS be a tensor species over a field kk. Let pp be a pure tensor of rank nn with index structure c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, which can be viewed as a product of vectors v0v1vn1v_0 \otimes v_1 \otimes \dots \otimes v_{n-1}. For any index i{0,,n1}i \in \{0, \dots, n-1\}, scalar xkx \in k, vector yy in the vector space Vc(i)V_{c(i)} associated with color c(i)c(i), and multi-index bb, the component of the updated pure tensor satisfies: component(update(p,i,xy),b)=xcomponent(update(p,i,y),b)\text{component}(\text{update}(p, i, x \cdot y), b) = x \cdot \text{component}(\text{update}(p, i, y), b) where update(p,i,v)\text{update}(p, i, v) denotes the pure tensor pp with its ii-th constituent vector replaced by vv, and component(p,b)\text{component}(p, b) is the scalar component of the pure tensor at multi-index bb.

definition

Multilinear map of pure tensor components

#componentMap

Given a sequence of index types c:{0,,n1}Cc : \{0, \dots, n-1\} \to C, let Vc(i)V_{c(i)} denote the vector space associated with the index color c(i)c(i) in a tensor species SS. The function `componentMap` is a kk-multilinear map from the Cartesian product of these vector spaces i=0n1Vc(i)\prod_{i=0}^{n-1} V_{c(i)} to the space of scalar-valued functions on the set of multi-indices ComponentIdx(c)\text{ComponentIdx}(c). For any tuple of vectors p=(v0,v1,,vn1)p = (v_0, v_1, \dots, v_{n-1}), the map returns the function that assigns to each multi-index b=(b0,b1,,bn1)b = (b_0, b_1, \dots, b_{n-1}) the product of the coordinates of each vector: (v0,,vn1)(bi=0n1(vi)bi) (v_0, \dots, v_{n-1}) \mapsto \left( b \mapsto \prod_{i=0}^{n-1} (v_i)_{b_i} \right) where (vi)bi(v_i)_{b_i} is the bib_i-th coordinate of the vector viv_i with respect to the basis associated with the index type c(i)c(i).

theorem

componentMap(c,p)=component(p)\text{componentMap}(c, p) = \text{component}(p)

#componentMap_apply

Let SS be a tensor species over a field kk. For a rank nn index structure c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and a pure tensor pp with that index structure, the evaluation of the multilinear map componentMap(c)\text{componentMap}(c) at pp is equal to the scalar component function of pp. That is, componentMap(c)(p)=component(p) \text{componentMap}(c)(p) = \text{component}(p) where component(p)\text{component}(p) is the function mapping a multi-index bb to the scalar i=0n1(pi)bi\prod_{i=0}^{n-1} (p_i)_{b_i}, with (pi)bi(p_i)_{b_i} being the coordinate of the ii-th vector of the pure tensor relative to the basis associated with color c(i)c(i).

definition

Pure tensor basis vector ebe_b

#basisVector

Given a tensor species SS and a sequence of index types c=(c0,c1,,cn1)c = (c_0, c_1, \dots, c_{n-1}), let ej(ci)e_{j}^{(c_i)} denote the basis vector indexed by jj in the vector space associated with the index type cic_i. For a multi-index b=(b0,b1,,bn1)ComponentIdx(c)b = (b_0, b_1, \dots, b_{n-1}) \in \text{ComponentIdx}(c), the basis vector is the pure tensor defined by the tensor product of the basis vectors corresponding to each index: eb0(c0)eb1(c1)ebn1(cn1) e_{b_0}^{(c_0)} \otimes e_{b_1}^{(c_1)} \otimes \dots \otimes e_{b_{n-1}}^{(c_{n-1})} Formally, this is constructed as the dependent function that maps each i{0,,n1}i \in \{0, \dots, n-1\} to the bib_i-th basis vector of the space S(ci)S(c_i).

theorem

Component of basis vector eb1e_{b_1} at b2b_2 is δb1,b2\delta_{b_1, b_2}

#component_basisVector

Let SS be a tensor species over a field kk. For a rank nn tensor space with index structure c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, let eb1e_{b_1} be the basis vector corresponding to the multi-index b1=(b1,0,,b1,n1)b_1 = (b_{1,0}, \dots, b_{1,n-1}). The component of eb1e_{b_1} evaluated at a multi-index b2=(b2,0,,b2,n1)b_2 = (b_{2,0}, \dots, b_{2,n-1}) is 11 if b1=b2b_1 = b_2 and 00 otherwise. That is, component(eb1,b2)=δb1,b2 \text{component}(e_{b_1}, b_2) = \delta_{b_1, b_2} where δb1,b2\delta_{b_1, b_2} is the Kronecker delta, which is 11 if b1=b2b_1 = b_2 and 00 if b1b2b_1 \neq b_2.

theorem

Induction on Pure Tensors for Tensor Spaces

#induction_on_pure

Let SS be a tensor species over a field kk. For a sequence of colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, let S.Tensor cS.\text{Tensor } c be the corresponding tensor product space i=0n1Vc(i)\bigotimes_{i=0}^{n-1} V_{c(i)}. Let PP be a property (predicate) defined on S.Tensor cS.\text{Tensor } c. If the following conditions hold: 1. PP holds for every pure tensor pp (i.e., PP holds for all elements of the form v0v1vn1v_0 \otimes v_1 \otimes \dots \otimes v_{n-1}); 2. PP is closed under scalar multiplication: for any rkr \in k and tensor tt, P(t)    P(rt)P(t) \implies P(r \cdot t); 3. PP is closed under addition: for any tensors t1t_1 and t2t_2, P(t1)P(t2)    P(t1+t2)P(t_1) \land P(t_2) \implies P(t_1 + t_2); then P(t)P(t) holds for all tensors tS.Tensor ct \in S.\text{Tensor } c.

definition

Linear map from a tensor to its components T{Tb}T \mapsto \{T_b\}

#componentMap

Let SS be a tensor species over a field kk. For a sequence of index colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, let S.Tensor cS.\text{Tensor } c denote the tensor product space i=0n1Vc(i)\bigotimes_{i=0}^{n-1} V_{c(i)}, where Vc(i)V_{c(i)} is the vector space associated with the color c(i)c(i). The function `componentMap` is the kk-linear map from the tensor space to the space of scalar-valued functions on multi-indices: componentMap:S.Tensor c(ComponentIdx(c)k) \text{componentMap} : S.\text{Tensor } c \to (\text{ComponentIdx}(c) \to k) This map assigns to each tensor TT a function that, for any multi-index b=(b0,,bn1)b = (b_0, \dots, b_{n-1}), returns the component TbT_b of the tensor with respect to the coordinate basis. For a pure tensor p=v0v1vn1p = v_0 \otimes v_1 \otimes \dots \otimes v_{n-1}, the resulting function maps the multi-index bb to the product of the vector components: componentMap(v0vn1)(b)=i=0n1(vi)bi \text{componentMap}(v_0 \otimes \dots \otimes v_{n-1})(b) = \prod_{i=0}^{n-1} (v_i)_{b_i}

theorem

componentMap(p.toTensor)=Pure.componentMap(p)\text{componentMap}(p.\text{toTensor}) = \text{Pure.componentMap}(p)

#componentMap_pure

Let SS be a tensor species over a field kk. For a sequence of index colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and a pure tensor pp (a collection of vectors v0,,vn1v_0, \dots, v_{n-1}), the linear map componentMap\text{componentMap} applied to the tensor product p.toTensor=i=0n1vip.\text{toTensor} = \bigotimes_{i=0}^{n-1} v_i is equal to the multilinear map Pure.componentMap\text{Pure.componentMap} applied to pp. That is, componentMap(c)(p.toTensor)=Pure.componentMap(c)(p) \text{componentMap}(c)(p.\text{toTensor}) = \text{Pure.componentMap}(c)(p) where both sides represent the function that assigns to each multi-index b=(b0,,bn1)b = (b_0, \dots, b_{n-1}) the product of the vector components i=0n1(vi)bi\prod_{i=0}^{n-1} (v_i)_{b_i}.

definition

Tensor from components fbfbebf \mapsto \sum_b f_b e_b

#ofComponents

Given a tensor species SS over a field kk and a sequence of index colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, this kk-linear map constructs a tensor from its scalar components. For a function f:ComponentIdx(c)kf: \text{ComponentIdx}(c) \to k that assigns a scalar to each multi-index b=(b0,,bn1)b = (b_0, \dots, b_{n-1}), the resulting tensor is defined as the sum over all multi-indices of the components weighted by the corresponding basis tensors: bComponentIdx(c)f(b)eb \sum_{b \in \text{ComponentIdx}(c)} f(b) \cdot e_b where eb=eb0(c0)eb1(c1)ebn1(cn1)e_b = e_{b_0}^{(c_0)} \otimes e_{b_1}^{(c_1)} \otimes \dots \otimes e_{b_{n-1}}^{(c_{n-1})} is the basis tensor associated with the multi-index bb, formed by the tensor product of the basis vectors of the underlying vector spaces.

theorem

componentMap(ofComponents(f))=f\text{componentMap}(\text{ofComponents}(f)) = f

#componentMap_ofComponents

Let SS be a tensor species over a field kk. For a rank nn index structure c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and a function f:ComponentIdx(c)kf: \text{ComponentIdx}(c) \to k that assigns a scalar to each multi-index b=(b0,,bn1)b = (b_0, \dots, b_{n-1}), applying the map componentMap\text{componentMap} to a tensor constructed from components ff via ofComponents\text{ofComponents} recovers the original function ff: componentMap(c)(ofComponents(c,f))=f \text{componentMap}(c)(\text{ofComponents}(c, f)) = f where ofComponents(c,f)\text{ofComponents}(c, f) is the tensor bComponentIdx(c)f(b)eb\sum_{b \in \text{ComponentIdx}(c)} f(b) e_b formed using the basis tensors ebe_b, and componentMap(c)\text{componentMap}(c) is the linear map that extracts the scalar components of a tensor relative to that basis.

theorem

ofComponents(componentMap(t))=t\text{ofComponents}(\text{componentMap}(t)) = t

#ofComponents_componentMap

Let SS be a tensor species over a field kk. For a sequence of index colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and any tensor tS.Tensor ct \in S.\text{Tensor } c, applying the map ofComponents\text{ofComponents} to the components of tt (obtained via the map componentMap\text{componentMap}) recovers the original tensor tt. That is, ofComponentsc(componentMapc(t))=t \text{ofComponents}_c(\text{componentMap}_c(t)) = t where componentMapc(t)\text{componentMap}_c(t) is the function assigning to each multi-index bb the scalar component tbt_b, and ofComponentsc(f)\text{ofComponents}_c(f) is the tensor bf(b)eb\sum_b f(b) e_b constructed from components ff.

definition

Basis of the tensor space S.Tensor cS.\text{Tensor } c

#basis

Let SS be a tensor species over a field kk. For a sequence of index colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, let S.Tensor cS.\text{Tensor } c be the associated tensor space. The `basis` is the canonical basis for this space, indexed by the set of multi-indices bComponentIdx(c)b \in \text{ComponentIdx}(c). For each multi-index b=(b0,,bn1)b = (b_0, \dots, b_{n-1}), the basis element ebe_b is the tensor product of the basis vectors of the constituent vector spaces: eb=eb0(c0)eb1(c1)ebn1(cn1) e_b = e_{b_0}^{(c_0)} \otimes e_{b_1}^{(c_1)} \otimes \dots \otimes e_{b_{n-1}}^{(c_{n-1})} where ebi(ci)e_{b_i}^{(c_i)} is the bib_i-th basis vector of the vector space associated with color cic_i. This basis identifies the tensor space with the space of its scalar components.

theorem

The Tensor Basis Element ebe_b equals the Tensor Product of Basis Vectors iebi(ci)\bigotimes_i e_{b_i}^{(c_i)}

#basis_apply

Let SS be a tensor species over a field kk and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a sequence of index colors. For any multi-index b=(b0,,bn1)b = (b_0, \dots, b_{n-1}) in the component index set ComponentIdx(c)\text{ComponentIdx}(c), the canonical basis element ebe_b of the tensor space S.Tensor cS.\text{Tensor } c is equal to the tensor product of the individual basis vectors of the constituent spaces: eb=eb0(c0)eb1(c1)ebn1(cn1) e_b = e_{b_0}^{(c_0)} \otimes e_{b_1}^{(c_1)} \otimes \dots \otimes e_{b_{n-1}}^{(c_{n-1})} where ebi(ci)e_{b_i}^{(c_i)} is the bib_i-th basis vector of the vector space associated with color cic_i.

theorem

(basis c).repr(p.toTensor)=p.component(\text{basis } c).\text{repr}(p.\text{toTensor}) = p.\text{component}

#basis_repr_pure

Let SS be a tensor species over a field kk and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a sequence of index colors. For any pure tensor pp (which represents a collection of vectors v0,,vn1v_0, \dots, v_{n-1}), let p.toTensor=v0vn1p.\text{toTensor} = v_0 \otimes \dots \otimes v_{n-1} be the corresponding element in the tensor space S.Tensor cS.\text{Tensor } c. The coordinate representation of p.toTensorp.\text{toTensor} with respect to the canonical basis `basis c` is equal to the component function p.componentp.\text{component}. Specifically, for any multi-index b=(b0,,bn1)b = (b_0, \dots, b_{n-1}), the bb-th coordinate is given by the product of the components of the constituent vectors: ((basis c).repr(p.toTensor))(b)=i=0n1(vi)bi ((\text{basis } c).\text{repr}(p.\text{toTensor}))(b) = \prod_{i=0}^{n-1} (v_i)_{b_i} where (vi)bi(v_i)_{b_i} is the bib_i-th coordinate of the vector viv_i relative to the basis associated with the color c(i)c(i).

theorem

Basis Induction for Tensors

#induction_on_basis

Let SS be a tensor species over a field kk. For a sequence of index colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, let V=S.Tensor cV = S.\text{Tensor } c be the corresponding tensor space. Let {eb}bComponentIdx(c)\{e_b\}_{b \in \text{ComponentIdx}(c)} denote the canonical basis of VV, where bb represents a multi-index. If a property PP on the space of tensors VV satisfies the following conditions: 1. PP holds for every basis element ebe_b, 2. P(0)P(0) holds, 3. P(rt)P(r \cdot t) holds whenever P(t)P(t) holds for any scalar rkr \in k and tensor tVt \in V, 4. P(t1+t2)P(t_1 + t_2) holds whenever P(t1)P(t_1) and P(t2)P(t_2) hold for any tensors t1,t2Vt_1, t_2 \in V, then P(t)P(t) holds for every tensor tVt \in V.

theorem

dim(S.Tensor c)=irepDim(ci)\dim(S.\text{Tensor } c) = \prod_i \text{repDim}(c_i)

#finrank_tensor_eq

Let SS be a tensor species over a field kk that satisfies the strong rank condition. For a sequence of colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C representing the index structure of a tensor, the dimension of the tensor space S.Tensor cS.\text{Tensor } c over kk is equal to the product of the dimensions of the representation spaces associated with each color in the sequence: dimk(S.Tensor c)=i=0n1repDim(ci)\dim_k(S.\text{Tensor } c) = \prod_{i=0}^{n-1} \text{repDim}(c_i) where repDim(ci)\text{repDim}(c_i) denotes the dimension of the vector space associated with the color cic_i.

instance

The space of tensors S.Tensor(c)S.\text{Tensor}(c) is finite-dimensional

#instFiniteDimensional

Let kk be a field and SS be a tensor species. For any sequence of index colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, the associated tensor space S.Tensor(c)S.\text{Tensor}(c) is a finite-dimensional vector space over kk.

instance

The space of tensors S.Tensor(c)S.\text{Tensor}(c) is a topological space

#instTopologicalSpace

Let kk be a field that is either the real numbers R\mathbb{R} or the complex numbers C\mathbb{C} (more generally, an `RCLike` field). For a tensor species SS over kk and a color sequence c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, the space of tensors S.Tensor(c)S.\text{Tensor}(c) is equipped with the standard topology induced by its structure as a finite-dimensional vector space over kk.

instance

S.Tensor(c)S.\text{Tensor}(c) is a Topological Additive Group

#instIsTopologicalAddGroup

Let kk be a field that is either the real numbers R\mathbb{R} or the complex numbers C\mathbb{C} (an `RCLike` field). Given a tensor species SS over kk associated with a group GG and a color sequence c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, the space of tensors S.Tensor(c)S.\text{Tensor}(c) forms a topological additive group. This means that the addition operation (x,y)x+y(x, y) \mapsto x + y and the negation operation xxx \mapsto -x are continuous with respect to the topology on S.Tensor(c)S.\text{Tensor}(c).

instance

GG-action on pure tensors

#actionP

Given a tensor species SS over a field kk and a group GG, this definition establishes the group action of GG on the type of pure tensors `Pure S c` associated with a sequence of indices (colors) c:{0,,n1}Cc: \{0, \dots, n-1\} \to C. For a group element gGg \in G and a pure tensor pp, which is an element of the product space i=0n1Vc(i)\prod_{i=0}^{n-1} V_{c(i)}, the action is defined component-wise by (gp)i=ρc(i)(g)(pi)(g \cdot p)_i = \rho_{c(i)}(g)(p_i), where ρc(i)\rho_{c(i)} is the representation of GG on the vector space Vc(i)V_{c(i)} corresponding to the color c(i)c(i).

instance

GG-action on pure tensors

#instSMul

Given a tensor species SS over a field kk and a group GG, this instance defines the scalar multiplication (group action) of GG on the space of pure tensors Pure(S,c)\text{Pure}(S, c) associated with a sequence of indices c:{0,,n1}Cc: \{0, \dots, n-1\} \to C. For an element gGg \in G and a pure tensor pp, which is an element of the product space i=0n1Vc(i)\prod_{i=0}^{n-1} V_{c(i)}, the action is defined component-wise by (gp)i=ρc(i)(g)(pi)(g \cdot p)_i = \rho_{c(i)}(g)(p_i), where ρc(i)\rho_{c(i)} is the representation of GG on the vector space Vc(i)V_{c(i)} corresponding to the color c(i)c(i).

theorem

The group action of GG on pure tensors is component-wise.

#actionP_eq

Let SS be a tensor species over a group GG and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a sequence of colors. For any group element gGg \in G and any pure tensor pi=0n1Vc(i)p \in \prod_{i=0}^{n-1} V_{c(i)}, the action gpg \cdot p is defined component-wise as (gp)i=ρc(i)(g)(pi)(g \cdot p)_i = \rho_{c(i)}(g)(p_i), where ρc(i)(g)\rho_{c(i)}(g) is the representation of gg on the vector space Vc(i)V_{c(i)} associated with the color c(i)c(i).

theorem

The GG-action on pure tensors commutes with dropping a component

#drop_actionP

Let SS be a tensor species over a group GG and c:{0,,n}Cc: \{0, \dots, n\} \to C be a sequence of colors. Let pp be a pure tensor of type cc, and let gGg \in G be a group element. For any index i{0,,n}i \in \{0, \dots, n\}, let drop pi\text{drop } p \, i denote the pure tensor of rank nn obtained by removing the ii-th component of pp. Then the group action of GG on the pure tensor commutes with the operation of dropping the ii-th component: (gp).drop i=g(p.drop i)(g \cdot p).\text{drop } i = g \cdot (p.\text{drop } i) where the action on the left-hand side is on tensors of rank n+1n+1 and the action on the right-hand side is on tensors of rank nn.

instance

Group action of GG on the tensor space S.Tensor(c)S.\text{Tensor}(c)

#actionT

Let GG be a group and SS be a tensor species. For a given color sequence c:{0,,n1}Cc: \{0, \ldots, n-1\} \to C, let S.Tensor(c)S.\text{Tensor}(c) be the corresponding type of tensors. This definition establishes a group action of GG on S.Tensor(c)S.\text{Tensor}(c), where the action gtg \cdot t of an element gGg \in G on a tensor tt is given by the representation ρ(g)\rho(g) associated with the tensor species SS and the color configuration cc.

theorem

The group action on tensors is gt=ρ(g)tg \cdot t = \rho(g) t

#actionT_eq

Let GG be a group, SS be a tensor species, and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a color sequence. For any group element gGg \in G and any tensor tS.Tensor(c)t \in S.\text{Tensor}(c), the group action gtg \cdot t is equal to the application of the representation ρ(g)\rho(g) associated with the tensor species SS and the color configuration cc to the tensor tt. That is, gt=ρ(g)tg \cdot t = \rho(g) t where ρ\rho is the representation map corresponding to the tensor space defined by SS and cc.

theorem

Group action on pure tensors: gtoTensor(p)=toTensor(gp)g \cdot \text{toTensor}(p) = \text{toTensor}(g \cdot p)

#actionT_pure

Let GG be a group, SS be a tensor species, and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a sequence of colors. For any group element gGg \in G and any pure tensor pp (representing a collection of vectors pip_i in the corresponding vector spaces), let toTensor(p)\text{toTensor}(p) denote the tensor product pi\bigotimes p_i. The action of gg on the resulting tensor is equal to the tensor product of the components after the group action has been applied to each component individually. That is, gtoTensor(p)=toTensor(gp)g \cdot \text{toTensor}(p) = \text{toTensor}(g \cdot p) where gpg \cdot p is the component-wise action of GG on the vectors making up the pure tensor.

theorem

Group action on tensors is additive: g(t1+t2)=gt1+gt2g \cdot (t_1 + t_2) = g \cdot t_1 + g \cdot t_2

#actionT_add

Let GG be a group, SS be a tensor species, and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a color sequence. For any group element gGg \in G and any two tensors t1,t2S.Tensor(c)t_1, t_2 \in S.\text{Tensor}(c), the group action gtg \cdot t distributes over tensor addition. That is, g(t1+t2)=gt1+gt2g \cdot (t_1 + t_2) = g \cdot t_1 + g \cdot t_2 where S.Tensor(c)S.\text{Tensor}(c) denotes the space of tensors of species SS with color configuration cc.

theorem

The group action on tensors commutes with scalar multiplication: g(rt)=r(gt)g \cdot (r \cdot t) = r \cdot (g \cdot t)

#actionT_smul

Let GG be a group, kk be a field, SS be a tensor species, and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a color sequence. For any group element gGg \in G, any scalar rkr \in k, and any tensor tS.Tensor(c)t \in S.\text{Tensor}(c), the group action of gg on the scalar multiple rtr \cdot t is equal to the scalar multiple of the group action of gg on tt. That is, g(rt)=r(gt)g \cdot (r \cdot t) = r \cdot (g \cdot t) where S.Tensor(c)S.\text{Tensor}(c) denotes the space of tensors of species SS with color configuration cc.

theorem

The group action on tensors satisfies g0=0g \cdot 0 = 0

#actionT_zero

Let GG be a group and SS be a tensor species with a color sequence c:{0,,n1}Cc: \{0, \ldots, n-1\} \to C. For any element gGg \in G, the group action of gg on the zero tensor 0S.Tensor(c)0 \in S.\text{Tensor}(c) results in the zero tensor, i.e., g0=0g \cdot 0 = 0.

theorem

The group action on tensors satisfies g(t)=(gt)g \cdot (-t) = -(g \cdot t)

#actionT_neg

Let GG be a group and SS be a tensor species with a color sequence c:{0,,n1}Cc: \{0, \dots, n-1\} \to C. For any group element gGg \in G and any tensor tS.Tensor(c)t \in S.\text{Tensor}(c), the group action of gg on the additive inverse of tt is equal to the additive inverse of the group action of gg on tt. That is, g(t)=(gt)g \cdot (-t) = -(g \cdot t)

definition

Permutation condition for indices

#PermCond

Given two lists of indices c:{0,,n1}Cc : \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1 : \{0, \dots, m-1\} \to C, a map σ:{0,,m1}{0,,n1}\sigma : \{0, \dots, m-1\} \to \{0, \dots, n-1\} satisfies the permutation condition if σ\sigma is a bijection and forms a commutative triangle with cc and c1c_1, meaning that c(σ(i))=c1(i)c(\sigma(i)) = c_1(i) for all ii.

theorem

The permutation condition for the identity map is equivalent to c=c1c = c_1

#on_id

Let nn be a natural number and let c,c1:{0,,n1}Cc, c_1 : \{0, \dots, n-1\} \to C be two sequences of indices. The identity map id:{0,,n1}{0,,n1}\text{id} : \{0, \dots, n-1\} \to \{0, \dots, n-1\} satisfies the permutation condition for (c,c1)(c, c_1) if and only if c(i)=c1(i)c(i) = c_1(i) for all i{0,,n1}i \in \{0, \dots, n-1\}. Here, a map σ\sigma satisfies the permutation condition for (c,c1)(c, c_1) if σ\sigma is a bijection and c(σ(i))=c1(i)c(\sigma(i)) = c_1(i) for all ii.

theorem

Symmetry of the permutation condition for the identity map

#on_id_symm

Let nn be a natural number and let c,c1:{0,,n1}Cc, c_1 : \{0, \dots, n-1\} \to C be two sequences of indices. If the identity map id:{0,,n1}{0,,n1}\text{id} : \{0, \dots, n-1\} \to \{0, \dots, n-1\} satisfies the permutation condition for (c1,c)(c_1, c), then it also satisfies the permutation condition for (c,c1)(c, c_1). Here, the permutation condition for (c,c1,σ)(c, c_1, \sigma) means that σ\sigma is a bijection and c(σ(i))=c1(i)c(\sigma(i)) = c_1(i) for all i{0,,n1}i \in \{0, \dots, n-1\}.

definition

Inverse of a permutation σ\sigma satisfying the permutation condition

#inv

Given two index labeling maps c:{0,,n1}Cc : \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1 : \{0, \dots, m-1\} \to C, let σ:{0,,m1}{0,,n1}\sigma : \{0, \dots, m-1\} \to \{0, \dots, n-1\} be a map that satisfies the permutation condition (meaning σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1). The function returns the inverse map σ1:{0,,n1}{0,,m1}\sigma^{-1} : \{0, \dots, n-1\} \to \{0, \dots, m-1\}.

definition

Equivalence {0,,n1}{0,,m1}\{0, \dots, n-1\} \simeq \{0, \dots, m-1\} induced by σ\sigma satisfying the permutation condition

#toEquiv

Given two sequences of indices c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C, and a map σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} that satisfies the permutation condition (meaning σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1), this definition constructs an equivalence between the sets {0,,n1}\{0, \dots, n-1\} and {0,,m1}\{0, \dots, m-1\}. Specifically, the forward mapping of the equivalence is the inverse σ1\sigma^{-1} and the inverse mapping is σ\sigma.

theorem

σ1(σ(x))=x\sigma^{-1}(\sigma(x)) = x for maps satisfying the permutation condition

#apply_inv_apply

Let nn and mm be natural numbers, and let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C be sequences of index colors. Suppose a map σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} satisfies the permutation condition hh, which implies that σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1. Then for any index x{0,,m1}x \in \{0, \dots, m-1\}, applying the inverse map σ1\sigma^{-1} (denoted as h.inv σh.\text{inv } \sigma) to the image of xx under σ\sigma results in xx, i.e., σ1(σ(x))=x\sigma^{-1}(\sigma(x)) = x.

theorem

σ(σ1(x))=x\sigma(\sigma^{-1}(x)) = x for maps satisfying the permutation condition

#inv_apply_apply

Let nn and mm be natural numbers, and let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C be sequences of index colors. Suppose a map σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} satisfies the permutation condition hh, which implies that σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1. Then for any index x{0,,n1}x \in \{0, \dots, n-1\}, applying σ\sigma to the image of xx under the inverse map σ1\sigma^{-1} (denoted as h.inv σh.\text{inv } \sigma) results in xx, i.e., σ(σ1(x))=x\sigma(\sigma^{-1}(x)) = x.

theorem

c1(x)=c(σ(x))c_1(x) = c(\sigma(x)) for maps satisfying the permutation condition

#preserve_color

Let c:{0,,n1}Cc : \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1 : \{0, \dots, m-1\} \to C be sequences of index colors. If a map σ:{0,,m1}{0,,n1}\sigma : \{0, \dots, m-1\} \to \{0, \dots, n-1\} satisfies the permutation condition for cc and c1c_1, then for any index x{0,,m1}x \in \{0, \dots, m-1\}, the color assigned by c1c_1 at xx is the same as the color assigned by cc at σ(x)\sigma(x), specifically c1(x)=(cσ)(x)c_1(x) = (c \circ \sigma)(x).

theorem

c1(σ1(x))=c(x)c_1(\sigma^{-1}(x)) = c(x) for maps satisfying the permutation condition

#inv_perserve_color

Let c:{0,,n1}Cc : \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1 : \{0, \dots, m-1\} \to C be sequences of index colors. Suppose a map σ:{0,,m1}{0,,n1}\sigma : \{0, \dots, m-1\} \to \{0, \dots, n-1\} satisfies the permutation condition, meaning σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1. Then for any index x{0,,n1}x \in \{0, \dots, n-1\}, the color assigned by c1c_1 to the image of xx under the inverse map σ1\sigma^{-1} is equal to the color assigned by cc to xx, specifically c1(σ1(x))=c(x)c_1(\sigma^{-1}(x)) = c(x).

theorem

The inverse map σ1\sigma^{-1} satisfies the permutation condition relative to c1c_1 and cc

#symm

Let nn and mm be natural numbers, and let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C be sequences of index colors. If a map σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} satisfies the permutation condition hh (meaning σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1), then its inverse map σ1:{0,,n1}{0,,m1}\sigma^{-1}: \{0, \dots, n-1\} \to \{0, \dots, m-1\} (denoted as h.inv σh.\text{inv } \sigma) satisfies the permutation condition relative to c1c_1 and cc (meaning c1σ1=cc_1 \circ \sigma^{-1} = c).

definition

Morphism in OverColor\text{OverColor} induced by σ\sigma satisfying the permutation condition

#toHom

Let CC be a collection of colors representing index types. Given two color sequences c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C, and a map σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} that satisfies the permutation condition (meaning σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1), this definition lifts σ\sigma to a morphism from the object represented by cc to the object represented by c1c_1 in the category OverColor(C)\text{OverColor}(C).

theorem

Morphisms in OverColor\text{OverColor} satisfy the permutation condition

#ofHom

Let CC be a collection of colors (index types). Suppose c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C are two sequences of colors representing the indices of tensors. For any morphism σ\sigma from cc to c1c_1 in the category OverColor(C)\text{OverColor}(C), the inverse of the underlying bijection associated with σ\sigma, denoted (toEquiv σ)1:{0,,m1}{0,,n1}(\text{toEquiv } \sigma)^{-1}: \{0, \dots, m-1\} \to \{0, \dots, n-1\}, satisfies the permutation condition between cc and c1c_1. That is, (toEquiv σ)1(\text{toEquiv } \sigma)^{-1} is a bijection such that c(toEquiv σ)1=c1c \circ (\text{toEquiv } \sigma)^{-1} = c_1.

theorem

Composition of maps satisfying the permutation condition satisfies the permutation condition

#comp

Let CC be a set of colors (indices). For any natural numbers n,n1,n2n, n_1, n_2 and index colorings c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, c1:{0,,n11}Cc_1: \{0, \dots, n_1-1\} \to C, and c2:{0,,n21}Cc_2: \{0, \dots, n_2-1\} \to C, let σ:{0,,n11}{0,,n1}\sigma: \{0, \dots, n_1-1\} \to \{0, \dots, n-1\} and σ2:{0,,n21}{0,,n11}\sigma_2: \{0, \dots, n_2-1\} \to \{0, \dots, n_1-1\} be maps. If σ\sigma satisfies the permutation condition for cc and c1c_1 (meaning σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1) and σ2\sigma_2 satisfies the permutation condition for c1c_1 and c2c_2 (meaning σ2\sigma_2 is a bijection and c1σ2=c2c_1 \circ \sigma_2 = c_2), then the composition σσ2\sigma \circ \sigma_2 satisfies the permutation condition for cc and c2c_2.

theorem

The casting map Fin n1Fin n\text{Fin } n_1 \to \text{Fin } n satisfies the permutation condition `PermCond`.

#fin_cast_permCond

Let nn and n1n_1 be natural numbers such that n1=nn_1 = n, and let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a map assigning colors to indices. The canonical casting map σ:{0,,n11}{0,,n1}\sigma: \{0, \dots, n_1-1\} \to \{0, \dots, n-1\} (defined by the equality n1=nn_1 = n) satisfies the permutation condition for the pair of color maps cc and cσc \circ \sigma.

definition

Permutation of a pure tensor by σ\sigma

#permP

Let SS be a tensor species. For a color sequence c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, a pure tensor pPure(S,c)p \in \text{Pure}(S, c) can be represented as an element of the product i=0n1Vc(i)\prod_{i=0}^{n-1} V_{c(i)}, often written as v0v1vn1v_0 \otimes v_1 \otimes \dots \otimes v_{n-1} where viVc(i)v_i \in V_{c(i)}. Given a map σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} and a target color sequence c1c_1 such that σ\sigma is a bijection satisfying the permutation condition c(σ(i))=c1(i)c(\sigma(i)) = c_1(i), the function `permP` maps pp to a new pure tensor in Pure(S,c1)\text{Pure}(S, c_1) by reordering its components according to σ\sigma. In terms of the tensor product, this is defined as: permP(σ,h,v0v1vn1)=vσ(0)vσ(1)vσ(m1)\text{permP}(\sigma, h, v_0 \otimes v_1 \otimes \dots \otimes v_{n-1}) = v_{\sigma(0)} \otimes v_{\sigma(1)} \otimes \dots \otimes v_{\sigma(m-1)}

theorem

permP(σ,eb)=ebσ\text{permP}(\sigma, e_b) = e_{b \circ \sigma} for pure tensor basis vectors

#permP_basisVector

Let SS be a tensor species. Let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C be sequences of index colors, and let σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} be a map satisfying the permutation condition c1=cσc_1 = c \circ \sigma. For any multi-index b=(b0,,bn1)b = (b_0, \dots, b_{n-1}) identifying a basis vector ebe_b in the space of pure tensors Pure(S,c)\text{Pure}(S, c), the action of the permutation operator permP\text{permP} by σ\sigma results in the basis vector ebσe_{b \circ \sigma} in the target space Pure(S,c1)\text{Pure}(S, c_1). That is, permP(σ,h,eb)=ebσ\text{permP}(\sigma, h, e_b) = e_{b \circ \sigma} where the components of the new multi-index are given by (bσ)i=bσ(i)(b \circ \sigma)_i = b_{\sigma(i)} for i{0,,m1}i \in \{0, \dots, m-1\}.

definition

Permutation of a tensor by σ\sigma

#permT

Let SS be a tensor species over a field kk. Given two color sequences c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C, let σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} be a map satisfying the permutation condition cσ=c1c \circ \sigma = c_1 (which implies σ\sigma is a bijection). The kk-linear map `permT` transforms a tensor tt in the tensor space Tensor(S,c)\text{Tensor}(S, c) to a tensor in Tensor(S,c1)\text{Tensor}(S, c_1) by reordering its indices according to σ\sigma. For a pure tensor v0v1vn1v_0 \otimes v_1 \otimes \dots \otimes v_{n-1}, this action is given by: permT(σ,h,v0v1vn1)=vσ(0)vσ(1)vσ(m1)\text{permT}(\sigma, h, v_0 \otimes v_1 \otimes \dots \otimes v_{n-1}) = v_{\sigma(0)} \otimes v_{\sigma(1)} \otimes \dots \otimes v_{\sigma(m-1)}

theorem

permT\text{permT} of a pure tensor is the tensor of its permuted components

#permT_pure

Let SS be a tensor species. Let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C be color sequences, and let σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} be a map satisfying the permutation condition cσ=c1c \circ \sigma = c_1. For any pure tensor pPure(S,c)p \in \text{Pure}(S, c), the action of the permutation map permT\text{permT} on the tensor product representation toTensor(p)\text{toTensor}(p) is equal to the tensor product of the permuted pure tensor permP(σ,h,p)\text{permP}(\sigma, h, p). That is, permT(σ,h,toTensor(p))=toTensor(permP(σ,h,p))\text{permT}(\sigma, h, \text{toTensor}(p)) = \text{toTensor}(\text{permP}(\sigma, h, p)) If pp is represented by the sequence of vectors v0,v1,,vn1v_0, v_1, \dots, v_{n-1}, this states: permT(σ,h,v0v1vn1)=vσ(0)vσ(1)vσ(m1)\text{permT}(\sigma, h, v_0 \otimes v_1 \otimes \dots \otimes v_{n-1}) = v_{\sigma(0)} \otimes v_{\sigma(1)} \otimes \dots \otimes v_{\sigma(m-1)}

theorem

permP(id,p)=p\text{permP}(\text{id}, p) = p

#permP_id_self

Let SS be a tensor species and c:{0,,n1}Cc: \{0, \dots, n-1\} \to C be a color sequence. For any pure tensor pPure(S,c)p \in \text{Pure}(S, c), the permutation operation permP\text{permP} acting on pp with the identity map id:{0,,n1}{0,,n1}\text{id}: \{0, \dots, n-1\} \to \{0, \dots, n-1\} leaves the tensor unchanged. That is, permP(id,h,p)=p\text{permP}(\text{id}, h, p) = p, where hh is the trivial permutation condition cid=cc \circ \text{id} = c.

theorem

permT(id,t)=t\text{permT}(\text{id}, t) = t

#permT_id_self

Let SS be a tensor species over a field kk. For a sequence of colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and any tensor tt in the tensor space S.Tensor cS.\text{Tensor } c, the permutation map permT\text{permT} corresponding to the identity map id:{0,,n1}{0,,n1}\text{id}: \{0, \dots, n-1\} \to \{0, \dots, n-1\} leaves the tensor unchanged. That is, permT(id,h,t)=t\text{permT}(\text{id}, h, t) = t where hh is the trivial permutation condition cid=cc \circ \text{id} = c.

theorem

permT(σ,t)=t\text{permT}(\sigma, t) = t for σ=id\sigma = \text{id}

#permT_congr_eq_id

Let SS be a tensor species. For a sequence of colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and any tensor tt in the tensor space S.Tensor(c)S.\text{Tensor}(c), let σ:{0,,n1}{0,,n1}\sigma: \{0, \dots, n-1\} \to \{0, \dots, n-1\} be a map satisfying the permutation condition hσh_\sigma (which requires cσ=cc \circ \sigma = c). If σ\sigma is equal to the identity map id\text{id}, then the permutation operation permT\text{permT} applied to tt satisfies: permT(σ,hσ,t)=t\text{permT}(\sigma, h_\sigma, t) = t

theorem

σ=idt=t1    permT(σ,t)=t1\sigma = \text{id} \land t = t_1 \implies \text{permT}(\sigma, t) = t_1

#permT_congr_eq_id'

Let SS be a tensor species over a field kk. For a sequence of colors c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and any tensors t,t1t, t_1 in the tensor space S.Tensor(c)S.\text{Tensor}(c), let σ:{0,,n1}{0,,n1}\sigma: \{0, \dots, n-1\} \to \{0, \dots, n-1\} be a map satisfying the permutation condition hσh_\sigma (implying σ\sigma is a bijection such that cσ=cc \circ \sigma = c). If σ\sigma is the identity map and t=t1t = t_1, then the permutation of tt by σ\sigma is equal to t1t_1: permT(σ,hσ,t)=t1\text{permT}(\sigma, h_\sigma, t) = t_1

theorem

GG-equivariance of the tensor permutation map permT\text{permT}

#permT_equivariant

Let SS be a tensor species and GG be a group. Given color sequences c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C, let σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} be a map satisfying the permutation condition hh (which implies σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1). For any group element gGg \in G and any tensor tt in the tensor space S.Tensor(c)S.\text{Tensor}(c), the permutation map permT\text{permT} is equivariant with respect to the action of GG, such that: permT(σ,h,gt)=gpermT(σ,h,t)\text{permT}(\sigma, h, g \cdot t) = g \cdot \text{permT}(\sigma, h, t)

theorem

σ=σ1p=p1    permP(σ,p)=permP(σ1,p1)\sigma = \sigma_1 \land p = p_1 \implies \text{permP}(\sigma, p) = \text{permP}(\sigma_1, p_1)

#permP_congr

Let SS be a tensor species over a field kk and a set of colors CC. Let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C be index colorings. Suppose we have maps σ,σ1:{0,,m1}{0,,n1}\sigma, \sigma_1: \{0, \dots, m-1\} \to \{0, \dots, n-1\} satisfying the permutation conditions hh and h1h_1 respectively (meaning they are bijections such that cσ=c1c \circ \sigma = c_1 and cσ1=c1c \circ \sigma_1 = c_1), and pure tensors p,p1Pure(S,c)p, p_1 \in \text{Pure}(S, c). If σ=σ1\sigma = \sigma_1 and p=p1p = p_1, then the results of the permutation operation `permP` are equal: permP(σ,h,p)=permP(σ1,h1,p1)\text{permP}(\sigma, h, p) = \text{permP}(\sigma_1, h_1, p_1)

theorem

σ=σ1t=t1    permT(σ,t)=permT(σ1,t1)\sigma = \sigma_1 \land t = t_1 \implies \text{permT}(\sigma, t) = \text{permT}(\sigma_1, t_1)

#permT_congr

Let SS be a tensor species over a field kk and CC be a set of colors. Let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C be index colorings. Let σ,σ1:{0,,m1}{0,,n1}\sigma, \sigma_1: \{0, \dots, m-1\} \to \{0, \dots, n-1\} be maps satisfying the permutation conditions hh and h1h_1 respectively (where a permutation condition cσ=c1c \circ \sigma = c_1 implies σ\sigma is a bijection). For any tensors t,t1Tensor(S,c)t, t_1 \in \text{Tensor}(S, c), if σ=σ1\sigma = \sigma_1 and t=t1t = t_1, then the results of the tensor permutation operation `permT` are equal: permT(σ,h,t)=permT(σ1,h1,t1)\text{permT}(\sigma, h, t) = \text{permT}(\sigma_1, h_1, t_1)

theorem

permP(σ2,permP(σ,p))=permP(σσ2,p)\text{permP}(\sigma_2, \text{permP}(\sigma, p)) = \text{permP}(\sigma \circ \sigma_2, p)

#permP_permP

Let SS be a tensor species over a field kk and a set of colors CC. Let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, c1:{0,,m11}Cc_1: \{0, \dots, m_1-1\} \to C, and c2:{0,,m21}Cc_2: \{0, \dots, m_2-1\} \to C be index colorings. Let σ:{0,,m11}{0,,n1}\sigma: \{0, \dots, m_1-1\} \to \{0, \dots, n-1\} and σ2:{0,,m21}{0,,m11}\sigma_2: \{0, \dots, m_2-1\} \to \{0, \dots, m_1-1\} be maps satisfying the permutation conditions hh and h2h_2 respectively (meaning they are bijections such that cσ=c1c \circ \sigma = c_1 and c1σ2=c2c_1 \circ \sigma_2 = c_2). For any pure tensor pPure(S,c)p \in \text{Pure}(S, c), the successive application of the permutation operation `permP` satisfies: permP(σ2,h2,permP(σ,h,p))=permP(σσ2,PermCond.comp(h,h2),p)\text{permP}(\sigma_2, h_2, \text{permP}(\sigma, h, p)) = \text{permP}(\sigma \circ \sigma_2, \text{PermCond.comp}(h, h_2), p) where PermCond.comp(h,h2)\text{PermCond.comp}(h, h_2) is the permutation condition for the composite map σσ2\sigma \circ \sigma_2.

theorem

permT(σ2,permT(σ,t))=permT(σσ2,t)\text{permT}(\sigma_2, \text{permT}(\sigma, t)) = \text{permT}(\sigma \circ \sigma_2, t)

#permT_permT

Let SS be a tensor species over a field kk and CC be a set of colors. Let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C, c1:{0,,m11}Cc_1: \{0, \dots, m_1-1\} \to C, and c2:{0,,m21}Cc_2: \{0, \dots, m_2-1\} \to C be color sequences representing the index structures of tensor spaces. Let σ:{0,,m11}{0,,n1}\sigma: \{0, \dots, m_1-1\} \to \{0, \dots, n-1\} and σ2:{0,,m21}{0,,m11}\sigma_2: \{0, \dots, m_2-1\} \to \{0, \dots, m_1-1\} be maps satisfying the permutation conditions hh (where cσ=c1c \circ \sigma = c_1) and h2h_2 (where c1σ2=c2c_1 \circ \sigma_2 = c_2) respectively. For any tensor tS.Tensor ct \in S.\text{Tensor } c, the successive application of the tensor permutation operation permT\text{permT} follows the rule of composition: permT(σ2,h2,permT(σ,h,t))=permT(σσ2,hh2,t)\text{permT}(\sigma_2, h_2, \text{permT}(\sigma, h, t)) = \text{permT}(\sigma \circ \sigma_2, h \circ h_2, t) where hh2h \circ h_2 is the permutation condition for the composite map σσ2\sigma \circ \sigma_2 relative to the color sequences cc and c2c_2.

theorem

The bb-th component of permT(σ,t)\text{permT}(\sigma, t) equals tbσ1t_{b \circ \sigma^{-1}}

#permT_basis_repr_symm_apply

Let SS be a tensor species over a field kk. Let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C be sequences of index colors, and let σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} be a map satisfying the permutation condition hh (which implies σ\sigma is a bijection such that cσ=c1c \circ \sigma = c_1). For any tensor tS.Tensor ct \in S.\text{Tensor } c and any multi-index bComponentIdx(c1)b \in \text{ComponentIdx}(c_1), the component of the permuted tensor permT(σ,h,t)\text{permT}(\sigma, h, t) at index bb in the canonical basis is equal to the component of the original tensor tt at the transformed multi-index bσ1b \circ \sigma^{-1}, where σ1\sigma^{-1} is the inverse of σ\sigma. That is: [permT(σ,h,t)]b=tbσ1 [ \text{permT}(\sigma, h, t) ]_b = t_{b \circ \sigma^{-1}} where tat_a denotes the coefficient of tt corresponding to the multi-index aa, and the transformed index is defined by (bσ1)i=bσ1(i)(b \circ \sigma^{-1})_i = b_{\sigma^{-1}(i)} for i{0,,n1}i \in \{0, \dots, n-1\}.

theorem

permT(σ,h,t)=0    t=0\text{permT}(\sigma, h, t) = 0 \iff t = 0

#permT_eq_zero_iff

Let SS be a tensor species over a field kk. Let c:{0,,n1}Cc: \{0, \dots, n-1\} \to C and c1:{0,,m1}Cc_1: \{0, \dots, m-1\} \to C be sequences of index colors. Suppose a map σ:{0,,m1}{0,,n1}\sigma: \{0, \dots, m-1\} \to \{0, \dots, n-1\} satisfies the permutation condition hh, which implies that σ\sigma is a bijection and cσ=c1c \circ \sigma = c_1. For any tensor tS.Tensor ct \in S.\text{Tensor } c, the permuted tensor permT(σ,h,t)\text{permT}(\sigma, h, t) is zero if and only if tt is the zero tensor: permT(σ,h,t)=0    t=0 \text{permT}(\sigma, h, t) = 0 \iff t = 0

definition

Linear map from a rank-0 tensor to the field kk

#toField

For a tensor species SS over a field kk, let c:Fin 0Cc : \text{Fin } 0 \to C be a color sequence with zero indices (representing a rank-0 tensor). The map toField:S.Tensor ck\text{toField} : S.\text{Tensor } c \to k is the kk-linear isomorphism that identifies a tensor with zero indices with its corresponding scalar value in the underlying field kk.

theorem

toField(default)=1\text{toField}(\text{default}) = 1 for rank-0 tensors

#toField_default

Let SS be a tensor species over a field kk. For a color sequence c:Fin 0Cc : \text{Fin } 0 \to C of length zero, the linear isomorphism toField:S.Tensor ck\text{toField} : S.\text{Tensor } c \to k maps the tensor product of the default pure tensor (the empty product of vectors) to the multiplicative identity 11 in kk.

theorem

toField(p.toTensor)=1\text{toField}(p.\text{toTensor}) = 1 for Rank-0 Pure Tensors

#toField_pure

Let SS be a tensor species over a field kk. For a color sequence c:Fin 0Cc : \text{Fin } 0 \to C of length zero, which represents rank-0 tensors, let pp be a pure tensor of rank 0. The kk-linear isomorphism toField:S.Tensor ck\text{toField} : S.\text{Tensor } c \to k, which identifies rank-0 tensors with scalars in the field, maps the tensor representation of pp to the multiplicative identity 1k1 \in k.

theorem

toField(basis c default)=1\text{toField}(\text{basis } c \text{ default}) = 1 for rank-0 tensors

#toField_basis_default

Let SS be a tensor species over a field kk. For a color sequence c:Fin 0Cc : \text{Fin } 0 \to C of length zero, which represents the space of rank-0 tensors S.Tensor cS.\text{Tensor } c, let toField:S.Tensor ck\text{toField} : S.\text{Tensor } c \to k be the linear isomorphism that identifies a rank-0 tensor with its scalar value in kk. Let basis c\text{basis } c be the canonical basis for this space, indexed by the set of multi-indices ComponentIdx(c)\text{ComponentIdx}(c). For a rank-0 tensor, the index set is a singleton containing a unique default element. The theorem states that the scalar value of this default basis element is the multiplicative identity 11: toField(basis c default)=1 \text{toField}(\text{basis } c \text{ default}) = 1

theorem

toField(t)=(basis c).repr t\text{toField}(t) = (\text{basis } c).\text{repr } t for Rank-0 Tensors

#toField_eq_repr

Let SS be a tensor species over a field kk. For a color sequence c:Fin 0Cc : \text{Fin } 0 \to C of length zero, which represents the space of rank-0 tensors S.Tensor cS.\text{Tensor } c, let toField:S.Tensor ck\text{toField} : S.\text{Tensor } c \to k be the kk-linear isomorphism that identifies a rank-0 tensor with its scalar value in kk. Let basis c\text{basis } c be the canonical basis for this space, indexed by the set of multi-indices ComponentIdx(c)\text{ComponentIdx}(c). For a rank-0 tensor, the index set is a singleton containing a unique element (the empty multi-index). For any rank-0 tensor tt, the scalar value toField(t)\text{toField}(t) is equal to the coordinate of tt in the basis representation (basis c).repr t(\text{basis } c).\text{repr } t at that unique index.

theorem

toField(gt)=toField(t)\text{toField}(g \cdot t) = \text{toField}(t) for rank-0 tensors

#toField_equivariant

Let SS be a tensor species over a field kk and GG be a group. Let c:Fin 0Cc : \text{Fin } 0 \to C be a color sequence of length zero, representing the space of rank-0 tensors S.Tensor(c)S.\text{Tensor}(c). Let toField:S.Tensor(c)k\text{toField} : S.\text{Tensor}(c) \to k be the linear isomorphism that identifies a rank-0 tensor with its corresponding scalar value in kk. For any group element gGg \in G and any rank-0 tensor tS.Tensor(c)t \in S.\text{Tensor}(c), the scalar value is invariant under the group action: toField(gt)=toField(t)\text{toField}(g \cdot t) = \text{toField}(t)