Physlib.Relativity.Tensors.Contraction.Basis
14 declarations
Dropping indices and from a multi-index
#dropPairGiven a multi-index for a tensor with indices (where defines the index structure), and two specific index positions , the function `dropPair` constructs a reduced multi-index of length . This resulting multi-index belongs to the index structure , which corresponds to the original structure with the -th and -th entries removed. For each , the value of the new multi-index is , effectively extracting the components of at all positions except for and .
Fiber of the multi-index projection
#DropPairSectionGiven a multi-index for a tensor with indices (where the index structure has had two positions removed), the function `DropPairSection` defines the finite set of all multi-indices that map to under the `dropPair` operation. Mathematically, it is the fiber of the projection map: \[ \text{DropPairSection}(b) = \{ b' \in \text{ComponentIdx}(c) \mid \text{dropPair}_{i,j}(b') = b \}. \] This set consists of all multi-indices of length that match at all positions other than and .
iff and match at all non-dropped indices
#mem_iff_apply_dropPairEmb_eqLet be a natural number and define the index structure of a tensor with indices. For any two index positions , let be a multi-index for the structure , and be a reduced multi-index for the structure (where positions and are skipped). Then belongs to the fiber if and only if for all , the component of at the position is equal to the component of at position . \[ b' \in \text{DropPairSection}(b) \iff \forall m \in \{0, \dots, n-1\}, b'(\text{dropPairEmb}_{i,j}(m)) = b(m) \]
Let be a natural number and define the index structure of a tensor with indices. For any multi-index and any two index positions , let denote the reduced multi-index of length obtained by skipping the components at positions and . Then belongs to the fiber , which consists of all multi-indices that satisfy .
Multi-index construction by inserting values at and
#ofFinGiven a sequence of index types and two distinct indices , let be a multi-index (of type `ComponentIdx`) corresponding to the indices of after positions and have been removed (via `dropPairEmb`). Given a pair representing the specific coordinate values for the -th and -th indices, where and , this function constructs a full multi-index . The components of the resulting multi-index are defined as: \[ B_m = \begin{cases} x_1 & \text{if } m = i \\ x_2 & \text{if } m = j \\ b_{f(i, j, m)} & \text{otherwise} \end{cases} \] where is the preimage of under the embedding that skips and , effectively mapping the -th position in the full sequence to its corresponding position in the reduced sequence .
The -th component of the multi-index constructed by `ofFin` equals
#ofFin_apply_fstLet be a natural number and let define a sequence of index types for a tensor. For any two distinct indices , let be a multi-index of type `ComponentIdx` corresponding to the structure after indices and have been removed. Given a pair of coordinate values where and (with being the dimension of the -th representation space), the function `ofFin` constructs a full multi-index by inserting at position , at position , and the elements of at the remaining positions. This theorem states that the -th component of the resulting multi-index is equal to .
The -th component of the multi-index constructed by `ofFin` equals
#ofFin_apply_sndLet be a natural number and let define a sequence of index types for a tensor. For any two distinct indices , let be a multi-index of type `ComponentIdx` corresponding to the structure after indices and have been removed. Given a pair of coordinate values where and (with being the dimension of the -th representation space), the function `ofFin` constructs a full multi-index by inserting at position , at position , and the elements of at the remaining positions. This theorem states that the -th component of the resulting multi-index is equal to .
Let and let define the index structure of a tensor. For any two distinct indices , let be a reduced multi-index corresponding to the structure after indices and have been removed. Given a pair of coordinate values (where and are valid coordinates for the -th and -th index types, respectively), let be the full multi-index constructed by inserting at position , at position , and the components of at all other positions. This theorem states that is an element of , which is the set of all multi-indices such that dropping the -th and -th components of results in .
Equivalence between index pairs and
#ofFinEquivLet and let define the index structure of a tensor. For any two distinct indices , let be a reduced multi-index (an element of `ComponentIdx`) corresponding to the structure after the positions and have been removed. This definition provides an equivalence (bijection): \[ \{0, \dots, d_i - 1\} \times \{0, \dots, d_j - 1\} \simeq \text{DropPairSection}(b) \] where is the dimension of the representation space associated with the -th index, and is the set of all full multi-indices that reduce to when the -th and -th components are removed. The bijection is defined such that a pair is mapped to the multi-index formed by inserting at position , at position , and the components of in the remaining positions. The inverse map extracts the values at positions and from a given multi-index in the section.
The -th component of the multi-index reconstructed by `ofFinEquiv` equals
#ofFinEquiv_apply_fstLet and let define the sequence of index types for a tensor. For any two distinct indices , let be a reduced multi-index corresponding to the structure after the positions and have been removed. Given a pair of index values , where and (with being the dimension of the -th representation space), the equivalence `ofFinEquiv` constructs a full multi-index by inserting at position , at position , and the elements of at the remaining positions. This theorem states that the -th component of the resulting multi-index is equal to .
The -th component of the multi-index reconstructed by `ofFinEquiv` is
#ofFinEquiv_apply_sndLet and let define the index structure of a tensor. For any two distinct indices , let be a reduced multi-index (an element of `ComponentIdx`) corresponding to the structure after the positions and have been removed. Given a pair of index values with and (where is the dimension of the -th representation space), the equivalence `ofFinEquiv` reconstructs a full multi-index by inserting at position , at position , and the components of in the remaining positions. This theorem states that the -th component of the resulting multi-index is equal to .
of a basis vector is the basis vector of the reduced multi-index
#dropPair_basisVectorLet be a tensor species and be a sequence of index types. Let be a multi-index in , and let be the corresponding pure basis vector. For any two distinct indices , let be the pure tensor obtained by removing the -th and -th components of . Then where is the embedding (defined by `dropPairEmb`) that skips the indices and , and is the basis vector in the reduced tensor product space associated with the multi-index restricted to the remaining positions.
Component Formula for Tensor Contraction
#contrT_basis_repr_applyLet be a tensor species over a field and be a sequence of index colors. Let be a tensor of rank . Suppose are distinct indices such that the color at is the dual of the color at , i.e., . Let be the tensor of rank obtained by contracting at indices and . For any multi-index for the contracted tensor space, the -th component of the contracted tensor is given by: where: - is the component of the original tensor at the multi-index . - is the set of all multi-indices of length that reduce to when the -th and -th indices are removed. - and are the basis vectors of the representation spaces corresponding to colors and at the specific indices specified by . - is the natural pairing (contraction morphism) associated with the tensor species.
Summation Formula for the Components of Tensor Contraction
#contrT_basis_repr_apply_eq_sum_finLet be a tensor species over a field and be a sequence of index colors. Let be a tensor of rank . Suppose are distinct indices such that the color at is the dual of the color at , i.e., . Let be the tensor of rank obtained by contracting at indices and . For any multi-index of the contracted tensor space, the -th component of the contracted tensor is given by the double sum over the basis indices of the representation spaces at and : where: - and are the dimensions of the representation spaces and respectively. - is the multi-index of length formed by inserting the index at position , the index at position , and the indices of at the remaining positions. - is the component of the original tensor at multi-index . - and are the -th and -th basis vectors of the spaces and . - is the contraction morphism (pairing) defined for the tensor species.
