Formalization Blueprint for “An Introduction to Algebraic Combinatorics” by Darij Grinberg

3.5 The cycle decomposition

Theorem 3.123 disjoint cycle decomposition of permutations

Let \(X\) be a finite set. Let \(\sigma \) be a permutation of \(X\). Then:

(a) There is a list

\begin{align*} & \Big(\left( a_{1,1},a_{1,2},\ldots ,a_{1,n_{1}}\right) ,\\ & \ \ \ \left( a_{2,1},a_{2,2},\ldots ,a_{2,n_{2}}\right) ,\\ & \ \ \ \ldots ,\\ & \ \ \ \left( a_{k,1},a_{k,2},\ldots ,a_{k,n_{k}}\right) \Big) \end{align*}

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

\begin{align*} & \Big(\left( a_{1,1},a_{1,2},\ldots ,a_{1,n_{1}}\right) ,\\ & \ \ \ \left( a_{2,1},a_{2,2},\ldots ,a_{2,n_{2}}\right) ,\\ & \ \ \ \ldots ,\\ & \ \ \ \left( a_{k,1},a_{k,2},\ldots ,a_{k,n_{k}}\right) \Big) \end{align*}

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).

theorem AlgebraicCombinatorics.CycleDecomposition.exists_dcd {α : Type u_1} [DecidableEq α] [Fintype α] (σ : Equiv.Perm α) :
∃ (cycs : Finset (Equiv.Perm α)), (∀ ccycs, c.IsCycle) (↑cycs).Pairwise Equiv.Perm.Disjoint ∃ (h : (↑cycs).Pairwise Commute), cycs.noncommProd id h = σ
theorem AlgebraicCombinatorics.CycleDecomposition.dcd_unique_cycleType {α : Type u_1} [DecidableEq α] [Fintype α] (σ : Equiv.Perm α) (cycs : Finset (Equiv.Perm α)) :
(∀ ccycs, c.IsCycle)(↑cycs).Pairwise Equiv.Perm.Disjoint(∃ (h : (↑cycs).Pairwise Commute), cycs.noncommProd id h = σ)Multiset.map (fun (c : Equiv.Perm α) => c.support.card) cycs.val = σ.cycleType
theorem AlgebraicCombinatorics.CycleDecomposition.canonicalDcd_exists_unique {α : Type u_1} [DecidableEq α] [Fintype α] [LinearOrder α] [Inhabited α] (σ : Equiv.Perm α) :
∃! cycleReps : List (List α), (∀ lcycleReps, l []) cycleReps.flatten.Nodup (∀ (x : α), x cycleReps.flatten) (∀ lcycleReps, xl, l.head! x) List.Pairwise (fun (l1 l2 : List α) => l1.head! > l2.head!) cycleReps dcdListToPerm cycleReps = σ
Proof

(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

\[ \sigma ^{0}\left( i\right) \rightarrow \sigma ^{1}\left( i\right) \rightarrow \sigma ^{2}\left( i\right) \rightarrow \sigma ^{3}\left( i\right) \rightarrow \cdots \]

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,

\begin{equation} \text{the }v\text{ nodes }\sigma ^{0}\left( i\right) ,\sigma ^{1}\left( i\right) ,\ldots ,\sigma ^{v-1}\left( i\right) \text{ are distinct} \label{pf.thm.perm.dcd.main.a.dist}\end{equation}
12

(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}\):

\[ \sigma ^{0}\left( i\right) \rightarrow \sigma ^{1}\left( i\right) \rightarrow \sigma ^{2}\left( i\right) \rightarrow \cdots \rightarrow \sigma ^{v}\left( i\right) =\sigma ^{0}\left( i\right) . \]

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

\begin{align*} & \left( a_{1,1}\rightarrow a_{1,2}\rightarrow \cdots \rightarrow a_{1,n_{1}}\rightarrow a_{1,1}\right) ,\\ & \left( a_{2,1}\rightarrow a_{2,2}\rightarrow \cdots \rightarrow a_{2,n_{2}}\rightarrow a_{2,1}\right) ,\\ & \ldots ,\\ & \left( a_{k,1}\rightarrow a_{k,2}\rightarrow \cdots \rightarrow a_{k,n_{k}}\rightarrow a_{k,1}\right) \end{align*}

(making sure to label each cycle only once). Then, 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}}} \]

(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

\begin{align*} & \Big(\left( a_{1,1},a_{1,2},\ldots ,a_{1,n_{1}}\right) ,\\ & \ \ \ \left( a_{2,1},a_{2,2},\ldots ,a_{2,n_{2}}\right) ,\\ & \ \ \ \ldots ,\\ & \ \ \ \left( a_{k,1},a_{k,2},\ldots ,a_{k,n_{k}}\right) \Big) \end{align*}

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.

Definition 3.124
#

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

Lemma 3.125

The cycles of \(\sigma \) are pairwise disjoint, i.e., their supports are pairwise disjoint.

Proof

This is the cycle factors pairwise disjointness lemma from Mathlib.

Lemma 3.126

The product of the cycles of \(\sigma \) (in any order, since they commute) equals \(\sigma \).

Proof

The cycles are pairwise disjoint, hence pairwise commuting. Their product equals \(\sigma \) by the cycle factorization theorem from Mathlib.

Lemma 3.127

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 \).

Proof

This is the characterization of cycle factor membership from Mathlib.

Lemma 3.128

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}\).

Proof

This is the conjugacy-iff-same-cycle-type characterization from Mathlib.

Definition 3.129
#

The cycle lengths of \(\sigma \) is the multiset of lengths of the nontrivial cycles (length \(\geq 2\)) in the cycle decomposition of \(\sigma \).

Lemma 3.130

The sum of the cycle lengths (of nontrivial cycles) equals the number of non-fixed-point elements of \(\sigma \).

Proof

Follows from the cycle type summation lemma in Mathlib.

Lemma 3.131

Every element of the cycle lengths multiset is at least \(2\).

Proof

Follows from the fact that each cycle type entry is at least \(2\), which is proved in Mathlib.

Lemma 3.132

The parts of the cycle lengths partition sum to \(|X|\).

Proof

This is the defining property of a partition of \(|X|\).

3.5.2 Auxiliary lemmas on cycles

Lemma 3.133

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\).

Proof

This is the rotation invariance of cycle permutations from Mathlib.

Lemma 3.134

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.

theorem AlgebraicCombinatorics.CycleDecomposition.cyc_eq_of_isRotated {α : Type u_1} [DecidableEq α] {l₁ l₂ : List α} (h : l₁ ~r l₂) (hl : l₁.Nodup) :
l₁.formPerm = l₂.formPerm
Proof

Follows from Lemma 3.133.

Proposition 3.135

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:

\begin{align*} \ & \left( i\text{ and }j\text{ belong to the same cycle of }\sigma \right) \\ \Longleftrightarrow \ & \left( i=\sigma ^{p}\left( j\right) \text{ for some }p\in \mathbb {N}\right) \\ \Longleftrightarrow \ & \left( j=\sigma ^{p}\left( i\right) \text{ for some }p\in \mathbb {N}\right) . \end{align*}
theorem AlgebraicCombinatorics.CycleDecomposition.sameCycle_iff_exists_pow {α : Type u_1} [Fintype α] (f : Equiv.Perm α) (i j : α) :
f.SameCycle i j ∃ (p : ), (f ^ p) i = j
Proof

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}\).

Lemma 3.136

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 \).

theorem AlgebraicCombinatorics.CycleDecomposition.mem_same_cycle_iff {α : Type u_1} [DecidableEq α] [Fintype α] (σ : Equiv.Perm α) (i j : α) (hi : i σ.support) :
(∃ ccycles σ, i c.support j c.support) σ.SameCycle i j
Proof

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

Lemma 3.137

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\).

Proof

Immediate from the definitions.

Lemma 3.138

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}\).

Proof

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.

Proposition 3.139

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}\).

Proof

Let

\begin{align*} & \left( a_{1,1},a_{1,2},\ldots ,a_{1,n_{1}}\right) ,\\ & \left( a_{2,1},a_{2,2},\ldots ,a_{2,n_{2}}\right) ,\\ & \ldots ,\\ & \left( a_{k,1},a_{k,2},\ldots ,a_{k,n_{k}}\right) \end{align*}

be the \(k\) cycles of \(\sigma \). Thus,

\begin{align*} \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}}} \end{align*}

so that, by Proposition 3.110 (e) and (c),

\begin{align*} \left( -1\right) ^{\sigma } & =\left( -1\right) ^{n_{1}-1}\cdot \left( -1\right) ^{n_{2}-1}\cdot \cdots \cdot \left( -1\right) ^{n_{k}-1}\\ & =\left( -1\right) ^{\left( n_{1}-1\right) +\left( n_{2}-1\right) +\cdots +\left( n_{k}-1\right) }. \end{align*}

Since each element of \(\left[ n\right] \) appears exactly once in the DCD, we have \(n_{1}+n_{2}+\cdots +n_{k}=n\). Hence,

\[ \left( n_{1}-1\right) +\left( n_{2}-1\right) +\cdots +\left( n_{k}-1\right) =\underbrace{\left( n_{1}+n_{2}+\cdots +n_{k}\right) }_{=n}-\, k=n-k. \]

Thus, \(\left( -1\right) ^{\sigma }=\left( -1\right) ^{n-k}\). This proves Proposition 3.139.

Lemma 3.140

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)}\).

Proof

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

Definition 3.141
#

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\).

Definition 3.142
#

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).

Lemma 3.143

The first element of the canonical list is minimal among all elements of the list.

Proof

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.

Lemma 3.144

The cycle permutation determined by the canonical list equals \(c\).

Proof

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\).

Lemma 3.145

The minimum element of a cycle \(c\) belongs to the support of \(c\).

Proof

By definition, the minimum element of \(c\) is the minimum of the support, which is an element of the support.

Lemma 3.146

The canonical list representation of a cycle has no duplicate entries.

Proof

Follows from the no-duplicates property of permutation cycle lists in Mathlib.

Lemma 3.147

An element \(x\) is in the canonical list of \(c\) if and only if \(x\) is in the support of \(c\).

Proof

The canonical list enumerates the orbit of the minimum element under \(c\), which is exactly the support of \(c\) (since \(c\) is a cycle).

Lemma 3.148

If two cycles \(c\) and \(d\) are disjoint (as permutations), then their canonical lists are disjoint (as lists).

Proof

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.

Definition 3.149
#

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.

Lemma 3.150

The product of the cycle permutations of the canonical list representations of \(\sigma \)’s cycles equals \(\sigma \).

theorem AlgebraicCombinatorics.CycleDecomposition.dcdListToPerm_cyclesList_eq {α : Type u_1} [DecidableEq α] [Fintype α] [LinearOrder α] (σ : Equiv.Perm α) (cyclesList : List (List α)) (hcl : cyclesList = List.map (fun (x : { x : Equiv.Perm α // x σ.cycleFactorsFinset.toList }) => match x with | c, hc => have hcycle := ; cycleToCanonicalList c hcycle) σ.cycleFactorsFinset.toList.attach) :
(List.map List.formPerm cyclesList).prod = σ
Proof

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).

Lemma 3.151

The flattened list of all canonical cycle lists has no duplicate entries.

theorem AlgebraicCombinatorics.CycleDecomposition.cyclesList_flatten_nodup {α : Type u_1} [DecidableEq α] [Fintype α] [LinearOrder α] (σ : Equiv.Perm α) (cyclesList : List (List α)) (hcl : cyclesList = List.map (fun (x : { x : Equiv.Perm α // x σ.cycleFactorsFinset.toList }) => match x with | c, hc => have hcycle := ; cycleToCanonicalList c hcycle) σ.cycleFactorsFinset.toList.attach) :
cyclesList.flatten.Nodup
Proof

Each individual canonical list is nodup (Lemma 3.146), and different cycles have disjoint canonical lists (Lemma 3.148).

Lemma 3.152

An element \(y\) appears in the flattened list of canonical cycle lists if and only if \(y\) is not a fixed point of \(\sigma \).

theorem AlgebraicCombinatorics.CycleDecomposition.cyclesList_flatten_eq_support {α : Type u_1} [DecidableEq α] [Fintype α] [LinearOrder α] (σ : Equiv.Perm α) (cyclesList : List (List α)) (hcl : cyclesList = List.map (fun (x : { x : Equiv.Perm α // x σ.cycleFactorsFinset.toList }) => match x with | c, hc => have hcycle := ; cycleToCanonicalList c hcycle) σ.cycleFactorsFinset.toList.attach) (y : α) :
y cyclesList.flatten y σ.support
Proof

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.