This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

PermutationCyclesQ

PermutationCyclesQ[expr]
returns True if expr is a permutation in disjoint cyclic form, and False otherwise.
  • The disjoint cyclic form of a permutation is an expression with head Cycles containing a list of cycles, each one being a list of positive integers. The integer points in a permutation must all be different.
A valid permutation in cyclic form:
A symbolic permutation object:
An invalid permutation:
A valid permutation in cyclic form:
In[1]:=
Click for copyable input
Out[1]=
 
A symbolic permutation object:
In[1]:=
Click for copyable input
Out[1]=
 
An invalid permutation:
In[1]:=
Click for copyable input
Out[1]=
Test permutations of any support:
The identity permutation:
A possible Mathematica implementation of PermutationCyclesQ:
New in 8