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.appendcorresponds to the product of tensors.Fin.succAbovecorresponds to the evaluation of a tensor at a given index.Fin.succSuccAbovecorresponds to the contraction of a tensor at two given indices.
Index maps #
The finite index maps out of which the reindexings below are built: Fin.append for products and
Fin.succAbove for a deleted slot. The lemmas on Fin.succSuccAbove, for a deleted pair, are in
Physlib.Relativity.Tensors.Contraction.SuccSuccAbove.
Given two lists of indices c : Fin n → C and c1 : Fin m → C a map
σ : Fin m → Fin n satisfies the condition IsReindexing c c1 σ if it is:
- A bijection
- Forms a commutative triangle with
candc1.
Equations
- TensorSpecies.Tensor.IsReindexing c c1 σ = (Function.Bijective σ ∧ ∀ (i : Fin m), c (σ i) = c1 i)
Instances For
Properties of the underlying function #
For a map σ satisfying IsReindexing c c1 σ, the inverse of that map.
Equations
Instances For
For a map σ : Fin m → Fin n satisfying IsReindexing c c1 σ,
that map lifted to an equivalence between
Fin n and Fin m.
Equations
- h.toEquiv = { toFun := TensorSpecies.Tensor.IsReindexing.inv σ h, invFun := σ, left_inv := ⋯, right_inv := ⋯ }
Instances For
Constructors #
The inverse of a map satisfying IsReindexing c c1 σ is a reindexing of c1 by c.
The composition of two maps satisfying IsReindexing also satisfies the IsReindexing.
Removing two entries from the right component of Fin.append c1 c commutes with the
append: removing the i-th and j-th entries of c and then appending c1 matches
removing the corresponding entries of Fin.append c1 c, via the identity permutation.
This is used for the commutation of taking a product of tensors
with contraction of indices.
Given a reindexing of c by c1 via σ for which the index i is sent to 0,
removing the i-th entry of c1 and the first entry of c yields a reindexing of
c ∘ Fin.succ by c1 ∘ i.succAbove via the map sending j to the predecessor of
σ (i.succAbove j).
Given a reindexing of c by c1 via σ for which the index i is not sent to 0,
removing the i-th entry of c1 and the (σ i)-th entry of c yields a reindexing of
c ∘ (σ i).succAbove by c1 ∘ i.succAbove via the map
(σ i).pred.predAbove ∘ σ ∘ i.succAbove.
Given a reindexing of c by c1 via σ, removing the i-th entry of c1 and the
(σ i)-th entry of c yields a reindexing of c ∘ (σ i).succAbove by c1 ∘ i.succAbove.
This unifies succAbove_of_eq_zero and succAbove_of_neq_zero via a case split on
whether σ i = 0. This is used for the commutation of permutation
of indices with evaluation of indices.
The conclusion of succAbove from an explicit survivor relabelling: if σ' fills the square
(σ i).succAbove ∘ σ' = σ ∘ i.succAbove, carrying the complement of i to the complement of
σ i, then it is a reindexing of the two shortened colour lists. The square forces σ' to be
injective, hence bijective, so no bijectivity hypothesis is needed; this is why the statement is
restricted to equal lengths.
Where succAbove builds the relabelling from σ as a dite composite, the map here is the
caller's, which is what lets it stand in the statement of a lemma the caller instantiates.
Given a reindexing of c by c1 via σ and two distinct indices i ≠ j, removing the
i-th and j-th entries of c1 and the (σ i)-th and (σ j)-th entries of c yields a
reindexing of c ∘ (σ i).succSuccAbove (σ j) by c1 ∘ i.succSuccAbove j.
This is used for the commutation of permutation of indices with
contraction of indices.
Removing two pairs of entries from c in either order gives the same colour list:
removing the i1-th and j1-th entries and then the (shifted) i2-th and j2-th entries
matches removing the i2-th and j2-th entries first and then the (shifted) i1-th and
j1-th entries, via the identity permutation.
This is used for the commutation of two contractions.
Removing one entry and then a pair of entries from c in either order gives the same
colour list: removing the k-th entry and then the (shifted) i-th and j-th entries
matches removing the i-th and j-th entries first and then the (shifted) k-th entry,
via the identity permutation.
This is used for the commutation of a contraction with an evaluation.
Removing two single entries from c in either order gives the same colour list:
removing the k1-th entry and then the (shifted) k2-th entry matches removing the
k2-th entry first and then the (shifted) k1-th entry, via the identity permutation.
This is used for the commutation of two evaluations of indices.
Splitting a list of colours c : Fin (n + 1) → C into its first n entries and its
last entry recovers c: the identity permutation matches
Fin.append (c ∘ (Fin.last n).succAbove) ![c (Fin.last n)] with c.
Splitting a list of colours c : Fin (n + 1) → C at an arbitrary slot i, rather than at the
last one as in append_succ_last: the block map that lists the i.succAbove survivors and then
i itself matches c with the survivors of i followed by the surviving entry c1 1 of a
rank-two list c1 whose second entry is slot i's colour.
Updating slot i of c to d and then back to e = c i returns c, no other slot moving:
the colour cast a round trip of two contractions at slot i generates.
Splitting a list of colours c : Fin (n + 1) → C into its first entry and its remaining
n entries recovers c: the canonical reindexing Fin (1 + n) ≃ Fin (n + 1) matches
Fin.append ![c 0] (c ∘ Fin.succAbove 0) with c.