Permutation cube identity criterion (source code)

= Permutation cube identity criterion
{title2=$f^2=f^{-1}\iff f^3=\operatorname{id}$}

For a <bijection> $f$, composing $f^2=f^{-1}$ with $f$ gives $f^3=\operatorname{id}$, and composing the latter with $f^{-1}$ gives the converse. Every orbit therefore has size one or three: the <permutation> consists of fixed points and disjoint three-cycles. This applies to an infinite underlying <set> as well as a finite one, since each individual orbit has at most three elements.