Physlib.SpaceAndTime.Space.Derivatives.MultiIndex
24 declarations
Decidability of for multi-indices
#instDecidableEqMultiIndexFor any dimension , it is decidable whether two multi-indices on coordinates are equal. This provides an algorithm to determine the truth value of the proposition .
Multi-index as a function
#instCoeFunForallFinNatThis definition provides a coercion that allows a multi-index of dimension to be treated as a function from the set of indices to the natural numbers . Under this coercion, for any , the expression denotes the -th component of the multi-index.
Zero multi-index on coordinates
#instZeroThe zero multi-index in the space of multi-indices on coordinates is defined as the multi-index where each component is . That is, for a multi-index viewed as a function , the zero element satisfies for all .
Addition of multi-indices on coordinates
#instAddThe addition of two multi-indices and in the space of multi-indices on coordinates is defined by the component-wise sum of their underlying functions from to . For each , the -th component of the sum is given by .
Order of a multi-index
#orderFor a multi-index on coordinates, represented as a function , its order is defined as the sum of its components:
Incrementing the -th coordinate of a multi-index
#incrementGiven a multi-index on coordinates, represented as a function , and a specific coordinate index , the increment function returns a new multi-index by increasing the value of the -th coordinate by one. This is equivalent to adding the unit multi-index (which has 1 at the -th position and 0 elsewhere) to .
if for all
#extTwo multi-indices and on coordinates are equal if all their components are equal. That is, if for all , then .
The -th component of the zero multi-index is
#zero_applyFor any index , the -th component of the zero multi-index is .
for multi-indices
#add_applyFor any multi-indices and on coordinates and any index , the -th component of the sum is equal to the sum of the -th components of and . That is, .
Let be a multi-index on coordinates, represented as a function . For any coordinate index , the -th coordinate of the multi-index obtained by incrementing at position is equal to . That is, .
Let be a multi-index on coordinates, which is defined as a function . For any two coordinate indices such that , the -th coordinate of the multi-index obtained by incrementing at position is equal to the original -th coordinate of . That is, .
for multi-indices
#order_zeroFor the zero multi-index on coordinates, its order is equal to . Here, the order of a multi-index is defined as the sum of its components.
for multi-indices
#order_addFor any two multi-indices and on coordinates, the order of their sum is equal to the sum of their individual orders, denoted as . Here, the order of a multi-index is defined as the sum of its components.
for multi-indices
#order_singleFor any coordinate index , the multi-index on coordinates that has the value at the -th position and at all other positions has an order equal to . In other words, if is the unit multi-index in the -th direction, its order is .
for a multi-index
#order_incrementFor a multi-index on coordinates and a coordinate index , the order of the multi-index obtained by incrementing at the -th coordinate is equal to . Here, the order is the sum of the components of the multi-index, and the increment operation increases the -th component of by one.
Tail of a multi-index
#tailGiven a multi-index of dimension , which can be viewed as an element of or a sequence , the tail function maps to a multi-index of dimension by dropping the -th coordinate. Specifically, the resulting multi-index is , where the -th component of the tail corresponds to the -th component of the original multi-index .
Canonical list of coordinate indices for a multi-index
#toListFor a multi-index of dimension , which can be viewed as an element , the function `toList` returns the canonical ordered list of coordinate directions. This list contains each coordinate index exactly times, sorted in non-decreasing order. Recursively, if the list is empty, and if , the list consists of copies of the index followed by the indices of the tail multi-index shifted by .
for multi-indices
#tail_zeroFor the zero multi-index on coordinates, its tail—the multi-index of dimension obtained by dropping the first coordinate—is equal to the zero multi-index on coordinates.
For any multi-index of dimension , the tail of the multi-index obtained by incrementing its -th coordinate is equal to the tail of the original multi-index . That is, if is the multi-index where the -th component is increased by and is the multi-index of dimension formed by dropping the -th coordinate, then .
For any multi-index of dimension (represented as an element ) and any coordinate index , the tail of after incrementing its -th coordinate is equal to the tail of incremented at its -th coordinate. Specifically, if denotes the operation of increasing the -th component of a multi-index by one, and denotes the operation of dropping the -th component , then:
for multi-indices
#toList_zeroFor the zero multi-index of dimension (where every component is zero), its canonical list of coordinate indices is the empty list . This is consistent with the definition that the list contains each coordinate index exactly times; since for all in the zero multi-index, the resulting list is empty.
The length of the list `toList I` equals the order
#length_toListFor a multi-index of dimension (an element of ), the length of its canonical list of coordinate indices, `toList I`, is equal to its order . The order is defined as the sum of the components of the multi-index: The list `toList I` is the sequence containing each index exactly times.
For any multi-index of dimension , the canonical sorted list of coordinate indices for the multi-index obtained by incrementing the -th coordinate of is equal to the list obtained by prepending the index to the canonical list of . Mathematically, where increases the first component by , and is the sorted list containing each index exactly times.
for multi-indices
#toList_singleFor any coordinate index , let the multi-index be the unit multi-index obtained by incrementing the -th component of the zero multi-index . The canonical list of coordinate directions for , denoted as , is the singleton list containing only the index . Mathematically, where is the multi-index with at position and elsewhere.
