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, PrettyTCM, Null, …
Eq PermutationDefined in Agda-2.7.0.1 · Agda.Utils.PermutationShow PermutationDefined in Agda-2.7.0.1 · Agda.Utils.PermutationGeneric PermutationDefined in Agda-2.7.0.1 · Agda.Utils.PermutationNFData PermutationDefined in Agda-2.7.0.1 · Agda.Utils.PermutationPrettyTCM PermutationDefined in Agda-2.7.0.1 · Agda.TypeChecking.PrettyNull PermutationDefined in Agda-2.7.0.1 · Agda.Utils.PermutationKillRange PermutationDefined in Agda-2.7.0.1 · Agda.Syntax.PositionSized PermutationDefined in Agda-2.7.0.1 · Agda.Utils.PermutationAbstract PermutationDefined in Agda-2.7.0.1 · Agda.TypeChecking.Substitute · orphanDropArgs PermutationDefined in Agda-2.7.0.1 · Agda.TypeChecking.DropArgsApply PermutationDefined in Agda-2.7.0.1 · Agda.TypeChecking.Substitute · orphanEmbPrj PermutationDefined in Agda-2.7.0.1 · Agda.TypeChecking.Serialise.Instances.Internal · orphanDoDrop PermutationDefined in Agda-2.7.0.1 · Agda.Utils.Permutationtype Rep Permutation = D1 ('MetaDataDefined in Agda-2.7.0.1 · Agda.Utils.Permutation"Permutation"
"Agda.Utils.Permutation"
"Agda-2.7.0.1-DbbZpETDDF1KkwuzEZvfn8"
'False) (C1 ('MetaCons"Perm"
'PrefixI 'True) (S1 ('MetaSel ('Just"permRange"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Just"permPicks"
) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Int])))