record Permutation : Nat -> Type A permutation in `n` elements.
Permutations are internally stored as a list of elements to swap in
right-to-left order. This allows for easy composition and inversion of
permutation values.
Totality: total
Visibility: export
Constructor: MkPerm : List (Fin n, Fin n) -> Permutation n
Projection: .swaps : Permutation n -> List (Fin n, Fin n)
Hints:
Mult (Permutation n) (Permutation n) (Permutation n) MultGroup (Permutation n) MultMonoid (Permutation n) Show (Permutation n)
swap : Fin n -> Fin n -> Permutation n Construct a permutation that swaps two elements.
Totality: total
Visibility: exportswaps : List (Fin n, Fin n) -> Permutation n Construct a permutation that makes the listed swaps in right-to-left order.
Totality: total
Visibility: exportappendSwap : Fin n -> Fin n -> Permutation n -> Permutation n Add a swap to the end of a permutation.
`appendSwap sw p = swap sw *. p`
Totality: total
Visibility: exportprependSwap : Fin n -> Fin n -> Permutation n -> Permutation n Add a swap to the beginning of a permutation.
`prependSwap sw p = p *. swap sw`
Totality: total
Visibility: exportswapElems : Fin n -> Fin n -> Vect n a -> Vect n a Swap two elements of a `Vect`.
Totality: total
Visibility: exportpermuteVect : Permutation n -> Vect n a -> Vect n a Permute the elements of a `Vect`.
Totality: total
Visibility: exportswapValues : Fin n -> Fin n -> Nat -> Nat Construct a function that swaps two values.
Totality: total
Visibility: exportpermuteValues : Permutation n -> Nat -> Nat Construct a function that permutes values.
Totality: total
Visibility: export