Disjoint cycle decomposition (source code)

= Disjoint cycle decomposition
{title2=$\sigma=\gamma_1\cdots\gamma_r$}

A <disjoint cycle decomposition> writes a <permutation> as a product of <disjoint permutation cycles>. Repeatedly apply the <permutation> to a point until it returns to that point; these successive points form one <cycle>. Repeat on points not yet used. Finiteness and injectivity ensure that each process returns to its starting point. This partitions the underlying finite set into <cycles>. The decomposition is unique up to reordering the <cycles>, cyclically rotating the entries within each <cycle>, and optionally omitting fixed-point one-cycles. Include the one-cycles when specifying <cycle type>.