Result-type changing `Fin` arithmetics
import public Data.Fin(+) : Fin m -> Fin (S n) -> Fin (m + n)Addition of `Fin`s as bounded naturals.
The resulting type has the smallest possible bound
as illustrated by the relations with the `last` function.
(*) : Fin (S m) -> Fin (S n) -> Fin (S (m * n))Multiplication of `Fin`s as bounded naturals.
The resulting type has the smallest possible bound
as illustated by the relations with the `last` function.
finToNatPlusHomo : (x : Fin m) -> (y : Fin (S n)) -> finToNat (x + y) = finToNat x + finToNat yfinToNatMultHomo : (x : Fin (S m)) -> (y : Fin (S n)) -> finToNat (x * y) = finToNat x * finToNat yplusPreservesLast : (m : Nat) -> (n : Nat) -> last + last = lastmultPreservesLast : (m : Nat) -> (n : Nat) -> last * last = lastplusSuccRightSucc : (left : Fin m) -> (right : Fin (S n)) -> FS (left + right) ~~~ (left + FS right)shiftAsPlus : (k : Fin (S m)) -> shift n k ~~~ (last + k)weakenNAsPlusFZ : (k : Fin n) -> weakenN m k = k + the (Fin (S m)) FZweakenNPlusHomo : (k : Fin p) -> weakenN n (weakenN m k) ~~~ weakenN (m + n) kweakenNOfPlus : (k : Fin m) -> (l : Fin (S n)) -> weakenN w (k + l) ~~~ (weakenN w k + l)plusZeroLeftNeutral : (k : Fin (S n)) -> (FZ + k) ~~~ kcongPlusLeft : (c : Fin (S p)) -> k ~~~ l -> (k + c) ~~~ (l + c)plusZeroRightNeutral : (k : Fin m) -> (k + FZ) ~~~ kcongPlusRight : (c : Fin m) -> k ~~~ l -> (c + k) ~~~ (c + l)plusCommutative : (left : Fin (S m)) -> (right : Fin (S n)) -> (left + right) ~~~ (right + left)plusAssociative : (left : Fin m) -> (centre : Fin (S n)) -> (right : Fin (S p)) -> (left + (centre + right)) ~~~ ((left + centre) + right)