3.5 The cycle decomposition
Let \(X\) be a finite set. Let \(\sigma \) be a permutation of \(X\). Then:
(a) There is a list
of nonempty lists of elements of \(X\) such that:
each element of \(X\) appears exactly once in the composite list
\begin{align*} & (a_{1,1},a_{1,2},\ldots ,a_{1,n_{1}},\\ & \ \ \ a_{2,1},a_{2,2},\ldots ,a_{2,n_{2}},\\ & \ \ \ \ldots ,\\ & \ \ \ a_{k,1},a_{k,2},\ldots ,a_{k,n_{k}}), \end{align*}and
we have
\[ \sigma =\operatorname *{cyc}\nolimits _{a_{1,1},a_{1,2},\ldots ,a_{1,n_{1}}}\circ \operatorname *{cyc}\nolimits _{a_{2,1},a_{2,2},\ldots ,a_{2,n_{2}}}\circ \cdots \circ \operatorname *{cyc}\nolimits _{a_{k,1},a_{k,2},\ldots ,a_{k,n_{k}}}. \]
Such a list is called a disjoint cycle decomposition (or short DCD) of \(\sigma \). Its entries (which themselves are lists of elements of \(X\)) are called the cycles of \(\sigma \).
(b) Any two DCDs of \(\sigma \) can be obtained from each other by (repeatedly) swapping the cycles with each other, and rotating each cycle (i.e., replacing \(\left( a_{i,1},a_{i,2},\ldots ,a_{i,n_{i}}\right) \) by \(\left( a_{i,2},a_{i,3},\ldots ,a_{i,n_{i}},a_{i,1}\right) \)).
(c) Now assume that \(X\) is a set of integers (or, more generally, any totally ordered finite set). Then, there is a unique DCD
of \(\sigma \) that satisfies the additional requirements that
we have \(a_{i,1}\leq a_{i,p}\) for each \(i\in \left[ k\right] \) and each \(p\in \left[ n_{i}\right] \) (that is, each cycle in this DCD is written with its smallest entry first), and
we have \(a_{1,1}{\gt}a_{2,1}{\gt}\cdots {\gt}a_{k,1}\) (that is, the cycles appear in this DCD in the order of decreasing first entries).
(a) Let \(\mathcal{D}\) be the cycle digraph of \(\sigma \). This cycle digraph \(\mathcal{D}\) has the following two properties:
Outbound uniqueness: For each node \(i\), there is exactly one arc outgoing from \(i\). (Indeed, this is the arc from \(i\) to \(\sigma \left( i\right) \).)
Inbound uniqueness: For each node \(i\), there is exactly one arc incoming into \(i\). (Indeed, this is the arc from \(\sigma ^{-1}\left( i\right) \) to \(i\), since \(\sigma \) is a permutation and therefore invertible.)
Using these two properties, we will now show that the cycle digraph \(\mathcal{D}\) consists of several node-disjoint cycles.
Indeed, if two cycles \(C\) and \(D\) of \(\mathcal{D}\) have a node in common, then they are identical (because the outbound uniqueness property prevents these cycles from ever separating after meeting at the common node). In other words, any two cycles \(C\) and \(D\) of \(\mathcal{D}\) are either identical or node-disjoint.
Now, let \(i\) be any node of \(\mathcal{D}\). Then, if we start at \(i\) and follow the outgoing arcs, then we obtain an infinite walk
along our digraph \(\mathcal{D}\). Since \(X\) is finite, the Pigeonhole Principle guarantees that this walk will eventually revisit a node it has already been to; i.e., there exist two integers \(u,v\in \mathbb {N}\) with \(u{\lt}v\) and \(\sigma ^{u}\left( i\right) =\sigma ^{v}\left( i\right) \). Let us pick two such integers \(u,v\) with the smallest possible \(v\). Thus,
(since otherwise, \(v\) would not be smallest possible). Now, \(\sigma \) is a permutation and thus has an inverse \(\sigma ^{-1}\). Applying the map \(\sigma ^{-1}\) to both sides of the equality \(\sigma ^{u}\left( i\right) =\sigma ^{v}\left( i\right) \), we obtain \(\sigma ^{u-1}\left( i\right) =\sigma ^{v-1}\left( i\right) \). However, if we had \(u\geq 1\), then (12) would entail \(\sigma ^{u-1}\left( i\right) \neq \sigma ^{v-1}\left( i\right) \), which would contradict \(\sigma ^{u-1}\left( i\right) =\sigma ^{v-1}\left( i\right) \). Thus, we cannot have \(u\geq 1\). Hence, \(u{\lt}1\), so that \(u=0\). Therefore, \(\sigma ^{u}\left( i\right) =\sigma ^{0}\left( i\right) \), so that \(\sigma ^{0}\left( i\right) =\sigma ^{u}\left( i\right) =\sigma ^{v}\left( i\right) \). This shows that our walk is circular: it comes back to its starting node \(\sigma ^{0}\left( i\right) =i\) after \(v\) steps. We have thus found a cycle in our digraph \(\mathcal{D}\):
This shows that the node \(i\) lies on a cycle \(C_{i}\) of \(\mathcal{D}\).
We thus have shown that each node \(i\) of \(\mathcal{D}\) lies on a cycle \(C_{i}\). Any arc of our digraph \(\mathcal{D}\) must belong to one of these chosen cycles.
Combining these facts, we conclude that \(\mathcal{D}\) consists of several node-disjoint cycles. Let us label these cycles as
(making sure to label each cycle only once). Then, each element of \(X\) appears exactly once in the composite list
and we have
(since \(\sigma \) moves any node \(i\in X\) one step forward along its chosen cycle). This proves Theorem 3.123 (a).
(b) See [ Goodma15 , Theorem 1.5.3 ] or [ Bourba74 , Chapter I, § 5.7, Proposition 7 ] . Let
be a DCD of \(\sigma \). Then, for each \(i\in X\), the cycle of this DCD that contains \(i\) is uniquely determined by \(\sigma \) and \(i\) up to cyclic rotation (indeed, it is a rotated version of the list \(\left( i,\sigma \left( i\right) ,\sigma ^{2}\left( i\right) ,\ldots ,\sigma ^{r-1}\left( i\right) \right) \), where \(r\) is the smallest positive integer satisfying \(\sigma ^{r}\left( i\right) =i\)). Therefore, all cycles of this DCD are uniquely determined by \(\sigma \) up to cyclic rotation and up to the relative order in which these cycles appear in the DCD. This is the claim of Theorem 3.123 (b).
(c) In order to obtain a DCD of \(\sigma \) that satisfies these two requirements, it suffices to
start with an arbitrary DCD of \(\sigma \),
then rotate each cycle of this DCD so that it begins with its smallest entry, and
then repeatedly swap these cycles so they appear in the order of decreasing first entries.
It is clear that the result of this procedure is uniquely determined (a consequence of Theorem 3.123 (b)). Thus, Theorem 3.123 (c) is proven.
Let \(X\) be a finite set. Let \(\sigma \) be a permutation of \(X\).
(a) The cycles of \(\sigma \) are defined to be the cycles in the DCD of \(\sigma \) (as defined in Theorem 3.123 (a)). (This includes \(1\)-cycles, if there are any in the DCD of \(\sigma \).)
We shall equate a cycle of \(\sigma \) with any of its cyclic rotations; thus, for example, \(\left( 3,1,4\right) \) and \(\left( 1,4,3\right) \) shall be regarded as being the same cycle (but \(\left( 3,1,4\right) \) and \(\left( 3,4,1\right) \) shall not).
(b) The cycle lengths partition of \(\sigma \) shall denote the partition of \(\left\vert X\right\vert \) obtained by writing down the lengths of the cycles of \(\sigma \) in weakly decreasing order.
3.5.1 Properties of the cycle decomposition
The cycles of \(\sigma \) are pairwise disjoint, i.e., their supports are pairwise disjoint.
This is the cycle factors pairwise disjointness lemma from Mathlib.
The product of the cycles of \(\sigma \) (in any order, since they commute) equals \(\sigma \).
The cycles are pairwise disjoint, hence pairwise commuting. Their product equals \(\sigma \) by the cycle factorization theorem from Mathlib.
If \(x\) is not a fixed point of \(\sigma \) (i.e., \(\sigma (x) \neq x\)), then the cycle of \(\sigma \) containing \(x\) is among the cycles of \(\sigma \).
This is the characterization of cycle factor membership from Mathlib.
Two permutations \(\sigma , \tau \) of a finite set \(X\) have the same cycle type (i.e., the same multiset of cycle lengths) if and only if they are conjugate, i.e., there exists a permutation \(g\) of \(X\) such that \(\tau = g \sigma g^{-1}\).
This is the conjugacy-iff-same-cycle-type characterization from Mathlib.
The cycle lengths of \(\sigma \) is the multiset of lengths of the nontrivial cycles (length \(\geq 2\)) in the cycle decomposition of \(\sigma \).
The sum of the cycle lengths (of nontrivial cycles) equals the number of non-fixed-point elements of \(\sigma \).
Follows from the cycle type summation lemma in Mathlib.
Every element of the cycle lengths multiset is at least \(2\).
Follows from the fact that each cycle type entry is at least \(2\), which is proved in Mathlib.
The parts of the cycle lengths partition sum to \(|X|\).
This is the defining property of a partition of \(|X|\).
3.5.2 Auxiliary lemmas on cycles
Let \(l\) be a list with no duplicate entries, and let \(k \in \mathbb {N}\). Then the cycle permutation of \(l\) equals the cycle permutation of the \(k\)-fold rotation of \(l\).
This is the rotation invariance of cycle permutations from Mathlib.
Let \(l_1, l_2\) be lists such that \(l_1\) is a cyclic rotation of \(l_2\), and \(l_1\) has no duplicate entries. Then \(l_1\) and \(l_2\) give rise to the same cycle permutation.
Follows from Lemma 3.133.
Let \(X\) be a finite set. Let \(i,j\in X\). Let \(\sigma \) be a permutation of \(X\). Then, we have the following chain of equivalences:
The forward direction uses that for finite types, \(\mathbb {Z}\)-powers can be replaced by \(\mathbb {N}\)-powers (reducing \(k\) modulo the order of \(\sigma \)). The backward direction is immediate.
The symmetric version (the third equivalence) follows by applying the first equivalence to \(\sigma ^{-1}\).
Let \(X\) be a finite set, \(\sigma \) a permutation of \(X\), and \(i, j \in X\) with \(i\) not a fixed point of \(\sigma \). Then \(i\) and \(j\) belong to the support of a common cycle of \(\sigma \) if and only if \(i\) and \(j\) belong to the same cycle of \(\sigma \).
For the forward direction, if \(i\) and \(j\) are both in the support of a cycle \(c\), then \(i\) and \(j\) are in the same cycle of \(c\), and since \(c\) is the cycle of \(\sigma \) containing \(i\), this transfers to \(i\) and \(j\) being in the same cycle of \(\sigma \). For the backward direction, the cycle of \(\sigma \) containing \(i\) is among the cycles of \(\sigma \), and both \(i\) and \(j\) belong to its support.
3.5.3 Sign from cycle decomposition
The total number of cycles of a permutation \(\sigma \) of a finite set \(X\) (including \(1\)-cycles / fixed points) equals the number of nontrivial cycles (those of length \(\geq 2\)) plus the number of fixed points of \(\sigma \), i.e., the number of elements \(x \in X\) with \(\sigma (x) = x\).
Immediate from the definitions.
Let \(\sigma \in S_n\) be a \(k\)-cycle (i.e., \(\sigma \) is a cycle and moves exactly \(k\) elements). Then \((-1)^{\sigma } = (-1)^{k-1}\).
This follows from the sign-of-a-cycle lemma in Mathlib, which gives \((-1)^{\sigma } = -(-1)^{k}\) for a \(k\)-cycle \(\sigma \). Since \(-(-1)^k = (-1)^{k-1}\) for \(k \geq 1\), the result follows.
Let \(n\in \mathbb {N}\). Let \(\sigma \in S_{n}\). Let \(k\in \mathbb {N}\) be such that \(\sigma \) has exactly \(k\) cycles (including the \(1\)-cycles). Then, \(\left( -1\right) ^{\sigma }=\left( -1\right) ^{n-k}\).
Let
be the \(k\) cycles of \(\sigma \). Thus,
so that, by Proposition 3.110 (e) and (c),
Since each element of \(\left[ n\right] \) appears exactly once in the DCD, we have \(n_{1}+n_{2}+\cdots +n_{k}=n\). Hence,
Thus, \(\left( -1\right) ^{\sigma }=\left( -1\right) ^{n-k}\). This proves Proposition 3.139.
Let \(\sigma \in S_n\). Let \(m_1, m_2, \ldots , m_j\) be the lengths of the nontrivial cycles (of length \(\geq 2\)) of \(\sigma \). Then \((-1)^{\sigma } = (-1)^{(m_1 - 1) + (m_2 - 1) + \cdots + (m_j - 1)}\).
This follows from the sign-from-cycle-type formula in Mathlib by observing that \((m_1 + \cdots + m_j) + j\) and \((m_1 + \cdots + m_j) - j\) have the same parity (they differ by \(2j\)).
3.5.4 Canonical DCD construction helpers
Let \(c\) be a cycle permutation (i.e., \(c\) is a cycle in the sense of Definition 3.124). The minimum element of \(c\) is the smallest element in the support of \(c\).
Let \(c\) be a cycle permutation. The canonical list representation of \(c\) is the list \((a, c(a), c^2(a), \ldots )\) where \(a\) is the minimum element of \(c\) (Definition 3.141).
The first element of the canonical list is minimal among all elements of the list.
The first element is the minimum element of \(c\), and every element in the canonical list belongs to the support of \(c\), so the minimum is \(\leq \) every element.
The cycle permutation determined by the canonical list equals \(c\).
The canonical list is the orbit of the minimum element under \(c\). The cycle permutation of this list recovers \(c\) because the minimum element is moved by \(c\).
The minimum element of a cycle \(c\) belongs to the support of \(c\).
By definition, the minimum element of \(c\) is the minimum of the support, which is an element of the support.
The canonical list representation of a cycle has no duplicate entries.
Follows from the no-duplicates property of permutation cycle lists in Mathlib.
An element \(x\) is in the canonical list of \(c\) if and only if \(x\) is in the support of \(c\).
The canonical list enumerates the orbit of the minimum element under \(c\), which is exactly the support of \(c\) (since \(c\) is a cycle).
If two cycles \(c\) and \(d\) are disjoint (as permutations), then their canonical lists are disjoint (as lists).
By Lemma 3.147, membership in the canonical list is equivalent to membership in the support. Since \(c\) and \(d\) are disjoint, their supports are disjoint.
Given a list of lists (each representing a cycle), the corresponding permutation is obtained by composing the cycle permutations \(\operatorname {cyc}_{a_1, a_2, \ldots , a_m}\) for each list \((a_1, a_2, \ldots , a_m)\) in the input.
- AlgebraicCombinatorics.CycleDecomposition.dcdListToPerm cycleReps = (List.map List.formPerm cycleReps).prod
The product of the cycle permutations of the canonical list representations of \(\sigma \)’s cycles equals \(\sigma \).
Each canonical list determines a cycle permutation that recovers the original cycle (by Lemma 3.144), and the product of all cycles equals \(\sigma \) (by the cycle factorization theorem from Mathlib).
The flattened list of all canonical cycle lists has no duplicate entries.
An element \(y\) appears in the flattened list of canonical cycle lists if and only if \(y\) is not a fixed point of \(\sigma \).
By Lemma 3.147, each canonical list covers exactly the support of its cycle, and the union of all cycle supports equals \(\sigma \)’s support.