Physlib.Relativity.Tensors.Reindexing
Reindexing of tensor components
In this file we give results related to the reindexing of tensors. If a tensor has indices specified by a list of colors `c : Fin n → C`, then reindexing the tensor corresponds to a bijection `σ : Fin m → Fin n` such that `c ∘ σ = c1` for some other list of colors `c1 : Fin m → C`. A reindexing might take a tensor ψⁱⱼ to a tensor ψʲᵢ by reordering the indices, or it might take a tensor ψⁱⱼᵏ to a tensor ψⁱᵏ.
We are interested in the interaction of reindexing with the following operations on tensors: - `Fin.append` corresponds to the product of tensors. - `Fin.succAbove` corresponds to the evaluation of a tensor at a given index. - `Fin.succSuccAbove` corresponds to the contraction of a tensor at two given indices.
Properties of the underlying function
Constructors
36 declarations
is a reindexing from to
Given two sequences of tensor index types (or "colors") and , a map satisfies the `IsReindexing` property if is a bijection and it preserves the index types such that for all . This implies that the composition is equal to .
A reindexing map is injective
Let and be sequences of tensor index types (or "colors"). If a map is a reindexing from to (meaning is a bijection such that ), then is injective.
A tensor reindexing map is surjective
Let and be sequences of tensor index types (or "colors"). If the map is a reindexing from to , then is surjective.
The identity map is a reindexing iff
Let and be two sequences of tensor index types (or colors) mapping to . The identity map is a reindexing from to if and only if for all .
The identity map is a reindexing from to if it is a reindexing from to
Let and be two sequences of index colors from to . If the identity map is a valid reindexing from to , then is also a valid reindexing from to .
Inverse of a reindexing map
Given a map that is a reindexing from index colors to (which implies that is a bijection and ), this function represents the inverse map .
Equivalence induced by reindexing
Given a reindexing map between index colorings and (which implies is a bijection and ), the definition provides an equivalence (bijection) between the index sets . In this equivalence, the forward mapping is the inverse function , and the inverse mapping is the original map .
for a reindexing map
Let and be mappings from tensor indices to a set of colors . Suppose is a reindexing from to , which implies that is a bijection satisfying . If is the inverse of , then for any index , it holds that .
for a reindexing map
Let and be sequences of tensor index colors. If is a reindexing from to and is its inverse map, then for every index , it holds that .
Reindexing map preserves index colors ()
Let and be mappings from tensor indices to a set of colors . If is a reindexing from to , then for every index , the color is equal to the color , or equivalently, .
Inverse of a reindexing map preserves index colors ()
Let and be mappings from tensor indices to a set of colors . If is a reindexing from to (which implies that is a bijection such that ), then for every index , the color is equal to , where denotes the inverse of the reindexing map.
The inverse mapping of the equivalence induced by reindexing preserves colors:
Let and let and be sequences of tensor index colors. If is a reindexing from to (meaning is a bijection such that ), then for any index , the color is equal to , where corresponds to the inverse mapping of the equivalence induced by the reindexing.
The inverse of a reindexing from to is a reindexing from to
Let and let and be sequences of tensor index colors. If a map is a reindexing from to (meaning is a bijection and ), then its inverse map is a reindexing from to .
If is a reindexing from to , then is a reindexing from to
Let be a natural number and be two sequences of tensor index colors. If the identity map is a valid reindexing from to , then is also a valid reindexing from to . (A map is a reindexing if it is a bijection and ).
Composition of Reindexings is a Reindexing
Let and be natural numbers, and let , , and be sequences of tensor index types (colors). If is a reindexing from to and is a reindexing from to , then the composition is a reindexing from to . A map is defined as a reindexing if it is a bijection that preserves index types such that the composition of the color map and the reindexing map matches the target color map ().
Appending index colors to the right preserves the reindexing property of the left sequence
Let , , and be sequences of tensor index colors. If is a reindexing from to (meaning is a bijection such that ), then the map , defined by the concatenation of (mapping into the first slots) and the identity map (mapping into the last slots), is a reindexing from the concatenated color sequence to .
If is a reindexing from to , then is a reindexing from to
Let and be two sequences of tensor index types (or "colors"), and let be a reindexing from to . For any additional sequence of index types , the map defined by: is a reindexing from the concatenated sequence to the concatenated sequence .
The identity map is a reindexing from to
For any natural number , let be a sequence of tensor index types and be an empty sequence. Then the identity map is a reindexing from to the concatenated sequence .
The block-swapping map is a reindexing from to
For any natural numbers and sequences of tensor index types and , let be the block-swapping map defined by for and for . Then is a reindexing from the concatenated sequence to the sequence .
Right-associativity of index concatenation is a reindexing
For any natural numbers and sequences of tensor index types , , and , the canonical bijection is a reindexing from the concatenated sequence to the sequence .
The identity map is a reindexing for the left associativity of index concatenation.
For any three sequences of tensor index colors , , and , the identity map (realized as the canonical type cast ) is a valid reindexing from the left-associated concatenation to the right-associated concatenation .
The identity map is a reindexing between skipping index and
Let and be natural numbers. Let and be sequences of index colors. For any index , the identity map is a reindexing from the color sequence to the color sequence . Here, denotes the concatenation of sequences (the `Fin.append` operation), and the map is the increasing embedding that skips the index . The index is represented by `Fin.natAdd n i`.
Skipping an index in the first factor of a concatenation is a reindexing
For any natural numbers and , given color sequences and , and an index , the identity map (via a type cast) is a reindexing from the sequence to the sequence .
Identity reindexing for `Fin.append` and `succSuccAbove` on the right component
For any natural numbers and , given a sequence of colors and a sequence of colors , and two indices , the identity map is a reindexing from the color sequence to the color sequence . This states that removing the -th and -th entries from the right component before appending is equivalent to removing the -th and -th entries from the concatenated sequence .
implies a reindexing between and
Let and be two sequences of tensor index types (colors). Let be a reindexing from to , which is a bijection satisfying . If for some index , we have , then there exists a reindexing between the sequences and given by the map . In this context, is the map from to that skips , and is the map from to that skips .
Reindexing of Reduced Sequences for
Let and be sequences of tensor index colors. Let be a reindexing of by , defined as a bijection such that . Given an index such that , removing the -th entry of and the -th entry of yields a new reindexing from the reduced sequence to the reduced sequence via the map .
Reindexing is preserved under removing an index via `succAbove`
Let and be sequences of tensor index types (colors). Suppose is a reindexing, defined as a bijection such that . For any index , removing the -th entry from and the corresponding -th entry from yields a new reindexing between the reduced sequences and . The resulting reindexing map is defined by: where is the map that skips the -th index, and and are the predecessor operations on finite sets that shift indices to account for the removed entry.
Reindexing is preserved under removing two indices via `succSuccAbove`
Let and be sequences of tensor index colors. Suppose is a reindexing of by , which means is a bijection such that . For any two distinct indices , removing the -th and -th entries from and the corresponding -th and -th entries from results in a new reindexing between the reduced sequences. Specifically, the map induced by after skipping and (formally defined as `funPredPredAbove`) is a reindexing from the color sequence to , where is the order-preserving embedding that skips indices and .
Commutativity of Double Index Removal for Tensor Colors
For any natural number and color sequence , let be distinct indices and be distinct indices. Define the shifted indices: - and , which are the indices in corresponding to after and are inserted. - and , which are the indices in corresponding to after and are removed. Then, the identity map is a reindexing between the color list obtained by first removing and then , and the color list obtained by first removing and then . That is: This theorem shows that removing two pairs of indices from a color list in different orders (adjusting the indices accordingly) results in the same sequence of colors.
Commutativity of Evaluation () and Contraction () Reindexing
Let and be a sequence of tensor index colors. Let be an index and be two distinct indices (). We define the shifted indices and in , and the shifted index in . The theorem states that the identity map is a reindexing from the color list obtained by removing the pair of entries at and and then removing the entry at , to the color list obtained by first removing the entry at and then removing the pair of entries at and . That is: This result demonstrates that the operations of evaluation (removing one index) and contraction (removing two indices) commute when the indices are properly shifted.
and commute in tensor reindexing
For any natural number and any map representing tensor index types, let and be indices. We define the following shifted indices: - (the position of in after skipping and ) - - - Then the identity map is a valid reindexing between the resulting color maps, which implies the following equality: This demonstrates that the operations of omitting two indices (via ) and omitting one index (via ) commute when the indices are appropriately adjusted.
Commutativity of sequential index removals in color lists
Let be a natural number and be a sequence of colors representing the types of tensor indices. For any indices and , let and . Then the identity map is a reindexing from the color sequence to the color sequence , which implies that removing the two entries from in either order results in the same sequence of colors: Here, denotes the map that embeds into by skipping the index , and is its partial inverse. This result confirms that the commutation of two index evaluations (removing two indices from a tensor) preserves the underlying color list.
is a reindexing from the concatenation of the first and the last entries of to
Let be a sequence of colors (index types) for a tensor. Let denote the sequence of the first entries of , and let denote the last entry of . Then the identity map is a reindexing from the sequence formed by appending to to the original sequence . This expresses that splitting a sequence into its first entries and its last entry and then concatenating them recovers the original sequence.
is a reindexing of
Given a sequence of tensor index colors , let denote the first color and denote the sequence of the remaining colors, defined by (or ). Then the identity map is a reindexing from the concatenation of and to the original sequence . In other words, appending the first entry of a color list to the list of its remaining entries recovers the original list via a canonical reindexing.
is a Reindexing
Let and be natural numbers and let be an equality. For any sequence of tensor index types , the canonical bijection is a reindexing from to the sequence .
Contraction with a metric at index is a reindexing to the -dualized color list
Let be a sequence of tensor index colors and be a specific index. Let be the sequence of colors obtained by appending two copies of the dual color to the end of . Let be the order-preserving embedding that skips the indices and (the first index of the appended pair). The theorem states that the inverse of the cyclic permutation is a reindexing from the contracted color sequence to the sequence where the color at index has been replaced by its dual .
