indexSum : Either (Fin m) (Fin n) -> Fin (m + n)
Converts `Fin`s that are used as indexes of parts to an index of a sum.
For example, if you have a `Vect` that is a concatenation of two `Vect`s and
you have an index either in the first or the second of the original `Vect`s,
using this function you can get an index in the concatenated one.
Totality: total
Visibility: public exportsplitSum : Fin (m + n) -> Either (Fin m) (Fin n)
Extracts an index of the first or the second part from the index of a sum.
For example, if you have a `Vect` that is a concatenation of the `Vect`s and
you have an index of this `Vect`, you have get an index of either left or right
original `Vect` using this function.
Totality: total
Visibility: public exportindexProd : Fin m -> Fin n -> Fin (m * n)
Calculates the index of a square matrix of size `a * b` by indices of each side.
Totality: total
Visibility: public exportsplitProd : Fin (m * n) -> (Fin m, Fin n)
Splits the index of a square matrix of size `a * b` to indices of each side.
Totality: total
Visibility: public exportindexSumPreservesLast : (m : Nat) -> (n : Nat) -> indexSum (Right last) ~~~ last
- Totality: total
Visibility: export indexProdPreservesLast : (m : Nat) -> (n : Nat) -> indexProd last last = last
- Totality: total
Visibility: export splitSumOfWeakenN : (k : Fin m) -> splitSum (weakenN n k) = Left k
- Totality: total
Visibility: export splitSumOfShift : (k : Fin n) -> splitSum (shift m k) = Right k
- Totality: total
Visibility: export splitOfIndexSumInverse : (e : Either (Fin m) (Fin n)) -> splitSum (indexSum e) = e
- Totality: total
Visibility: export indexOfSplitSumInverse : (f : Fin (m + n)) -> indexSum (splitSum f) = f
- Totality: total
Visibility: export splitOfIndexProdInverse : (k : Fin m) -> (l : Fin n) -> splitProd (indexProd k l) = (k, l)
- Totality: total
Visibility: export indexOfSplitProdInverse : (f : Fin (m * n)) -> uncurry indexProd (splitProd f) = f
- Totality: total
Visibility: export