Permutations of Fin n #
Permutations of Fin (n + 1) are equivalent to fixing a single
Fin (n + 1) and permuting the remaining with a Perm (Fin n).
The fixed Fin (n + 1) is swapped with 0.
Instances For
The set of all permutations of Fin (n + 1) can be constructed by augmenting the set of
permutations of Fin n by each element of Fin (n + 1) in turn.
cycleRange section #
Define the permutations Fin.cycleRange i, the cycle (0 1 2 ... i).
Fin.cycleRange i is the cycle (0 1 2 ... i) leaving (i+1 ... (n-1)) unchanged.
Instances For
The permutation cycleIcc #
In this section, we define the permutation cycleIcc i j, which is the cycle (i i+1 .... j)
leaving (0 ... i-1) and (j+1 ... n-1) unchanged when i ≤ j and returning the dummy value id
when i > j. In other words, it rotates elements in [i, j] one step to the right.
cycleIcc i j is the cycle (i i+1 ... j) leaving (0 ... i-1) and (j+1 ... n-1)
unchanged when i < j and returning the dummy value id when i > j.
In other words, it rotates elements in [i, j] one step to the right.