Partial permutations. Examples:
permute [1,2,0] [x0,x1,x2] = [x1,x2,x0] (proper permutation).
permute [1,0] [x0,x1,x2] = [x1,x0] (partial permuation).
permute [1,0,1,2] [x0,x1,x2] = [x1,x0,x1,x2] (not a permutation because not invertible).
Agda typing would be:
Perm : {m : Nat}(n : Nat) -> Vec (Fin n) m -> Permutation
m is the size of the permutation.
Instances14Eq, Show, Generic, NFData, Null, Sized, …
Eq PermutationDefined in Agda-2.8.0.2 · Agda.Utils.PermutationShow PermutationDefined in Agda-2.8.0.2 · Agda.Utils.PermutationGeneric PermutationDefined in Agda-2.8.0.2 · Agda.Utils.PermutationNFData PermutationDefined in Agda-2.8.0.2 · Agda.Utils.PermutationNull PermutationDefined in Agda-2.8.0.2 · Agda.Utils.PermutationSized PermutationDefined in Agda-2.8.0.2 · Agda.Utils.PermutationPrettyTCM PermutationDefined in Agda-2.8.0.2 · Agda.TypeChecking.PrettyApply PermutationDefined in Agda-2.8.0.2 · Agda.TypeChecking.Substitute · orphanKillRange PermutationDefined in Agda-2.8.0.2 · Agda.Syntax.PositionAbstract PermutationDefined in Agda-2.8.0.2 · Agda.TypeChecking.Substitute · orphanDropArgs PermutationDefined in Agda-2.8.0.2 · Agda.TypeChecking.DropArgsEmbPrj PermutationDefined in Agda-2.8.0.2 · Agda.TypeChecking.Serialise.Instances.Internal · orphanDoDrop PermutationDefined in Agda-2.8.0.2 · Agda.Utils.Permutationtype Rep Permutation = D1 ('MetaDataDefined in Agda-2.8.0.2 · Agda.Utils.Permutation"Permutation"
"Agda.Utils.Permutation"
"Agda-2.8.0.2-IWATId8XtJVEb9GRZaI6YB"
'False) (C1 ('MetaCons"Perm"
'PrefixI 'True) (S1 ('MetaSel ('Just"permRange"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just"permPicks"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int])))