Normalizing an index list. #
The normalization of an index list, is the corresponding index list
where all id
are set to 0, 1, 2, ...
determined by
the order of indices without duals, followed by the order of indices with duals.
TODO: Replace with Mathlib lemma.
TODO: Replace with Mathlib lemma.
idList #
The list of elements of Fin l.length
i
is in idListFin
if
l.idMap i
appears for the first time in the i
th spot.
For example, for the list ['ᵘ¹', 'ᵘ²', 'ᵤ₁']
the idListFin
is [0, 1]
.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The list of ids keeping only the first appearance of each id.
Instances For
GetDualCast #
Two IndexList
s are related by GetDualCast
if they are the same length,
and have the same dual structure.
For example, ['ᵘ¹', 'ᵘ²', 'ᵤ₁']
and ['ᵤ₄', 'ᵘ⁵', 'ᵤ₄']
are related by GetDualCast
,
but ['ᵘ¹', 'ᵘ²', 'ᵤ₁']
and ['ᵘ¹', 'ᵘ²', 'ᵤ₃']
are not.
Equations
Instances For
Normalized index list #
Given an index list l
, the corresponding index list where id's are set to
sequentially lowest values.
E.g. on ['ᵘ¹', 'ᵘ³', 'ᵤ₁']
this gives ['ᵘ⁰', 'ᵘ¹', 'ᵤ₀']
.
Equations
- l.normalize = { val := List.ofFn fun (i : Fin l.length) => (l.colorMap i, List.indexOf (l.idMap i) l.idList) }
Instances For
Equality of normalized forms #
Reindexing #
Two ColorIndexList
are said to be reindexes of one another if they:
- have the same length.
- every corresponding index has the same color, and duals which correspond.
Note: This does not allow for reordering of indices.