Documentation

Mathlib.GroupTheory.Perm.Cycle.Basic

Cycles of a permutation #

This file starts the theory of cycles in permutations.

Main definitions #

In the following, f : Equiv.Perm β.

Notes #

Equiv.Perm.IsCycle and Equiv.Perm.IsCycleOn are different in three ways:

SameCycle #

def Equiv.Perm.SameCycle {α : Type u_2} (f : Equiv.Perm α) (x : α) (y : α) :

The equivalence relation indicating that two points are in the same cycle of a permutation.

Equations
Instances For
    theorem Equiv.Perm.SameCycle.refl {α : Type u_2} (f : Equiv.Perm α) (x : α) :
    theorem Equiv.Perm.SameCycle.rfl {α : Type u_2} {f : Equiv.Perm α} {x : α} :
    theorem Eq.sameCycle {α : Type u_2} {x : α} {y : α} (h : x = y) (f : Equiv.Perm α) :
    theorem Equiv.Perm.SameCycle.symm {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :
    theorem Equiv.Perm.sameCycle_comm {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :
    theorem Equiv.Perm.SameCycle.trans {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {z : α} :

    The setoid defined by the SameCycle relation.

    Equations
    Instances For
      @[simp]
      theorem Equiv.Perm.sameCycle_one {α : Type u_2} {x : α} {y : α} :
      @[simp]
      theorem Equiv.Perm.sameCycle_inv {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :
      theorem Equiv.Perm.SameCycle.inv {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_inv.

      theorem Equiv.Perm.SameCycle.of_inv {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the forward direction of Equiv.Perm.sameCycle_inv.

      @[simp]
      theorem Equiv.Perm.sameCycle_conj {α : Type u_2} {f : Equiv.Perm α} {g : Equiv.Perm α} {x : α} {y : α} :
      theorem Equiv.Perm.SameCycle.conj {α : Type u_2} {f : Equiv.Perm α} {g : Equiv.Perm α} {x : α} {y : α} :
      Equiv.Perm.SameCycle f x y → Equiv.Perm.SameCycle (g * f * g⁻¹) (g x) (g y)
      theorem Equiv.Perm.SameCycle.apply_eq_self_iff {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :
      Equiv.Perm.SameCycle f x y → (f x = x ↔ f y = y)
      theorem Equiv.Perm.SameCycle.eq_of_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} (h : Equiv.Perm.SameCycle f x y) (hx : Function.IsFixedPt (⇑f) x) :
      x = y
      theorem Equiv.Perm.SameCycle.eq_of_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} (h : Equiv.Perm.SameCycle f x y) (hy : Function.IsFixedPt (⇑f) y) :
      x = y
      @[simp]
      theorem Equiv.Perm.sameCycle_apply_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :
      @[simp]
      theorem Equiv.Perm.sameCycle_apply_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :
      @[simp]
      theorem Equiv.Perm.sameCycle_inv_apply_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :
      @[simp]
      theorem Equiv.Perm.sameCycle_inv_apply_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :
      @[simp]
      theorem Equiv.Perm.sameCycle_zpow_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℤ} :
      @[simp]
      theorem Equiv.Perm.sameCycle_zpow_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℤ} :
      @[simp]
      theorem Equiv.Perm.sameCycle_pow_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℕ} :
      @[simp]
      theorem Equiv.Perm.sameCycle_pow_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℕ} :
      theorem Equiv.Perm.SameCycle.of_apply_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the forward direction of Equiv.Perm.sameCycle_apply_left.

      theorem Equiv.Perm.SameCycle.apply_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_apply_left.

      theorem Equiv.Perm.SameCycle.apply_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_apply_right.

      theorem Equiv.Perm.SameCycle.of_apply_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the forward direction of Equiv.Perm.sameCycle_apply_right.

      theorem Equiv.Perm.SameCycle.inv_apply_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_inv_apply_left.

      theorem Equiv.Perm.SameCycle.of_inv_apply_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the forward direction of Equiv.Perm.sameCycle_inv_apply_left.

      theorem Equiv.Perm.SameCycle.inv_apply_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_inv_apply_right.

      theorem Equiv.Perm.SameCycle.of_inv_apply_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :

      Alias of the forward direction of Equiv.Perm.sameCycle_inv_apply_right.

      theorem Equiv.Perm.SameCycle.pow_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℕ} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_pow_left.

      theorem Equiv.Perm.SameCycle.of_pow_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℕ} :

      Alias of the forward direction of Equiv.Perm.sameCycle_pow_left.

      theorem Equiv.Perm.SameCycle.of_pow_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℕ} :

      Alias of the forward direction of Equiv.Perm.sameCycle_pow_right.

      theorem Equiv.Perm.SameCycle.pow_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℕ} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_pow_right.

      theorem Equiv.Perm.SameCycle.of_zpow_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℤ} :

      Alias of the forward direction of Equiv.Perm.sameCycle_zpow_left.

      theorem Equiv.Perm.SameCycle.zpow_left {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℤ} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_zpow_left.

      theorem Equiv.Perm.SameCycle.zpow_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℤ} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_zpow_right.

      theorem Equiv.Perm.SameCycle.of_zpow_right {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℤ} :

      Alias of the forward direction of Equiv.Perm.sameCycle_zpow_right.

      theorem Equiv.Perm.SameCycle.of_pow {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℕ} :
      theorem Equiv.Perm.SameCycle.of_zpow {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} {n : ℤ} :
      @[simp]
      theorem Equiv.Perm.sameCycle_subtypePerm {α : Type u_2} {f : Equiv.Perm α} {p : α → Prop} {h : ∀ (x : α), p x ↔ p (f x)} {x : { x : α // p x }} {y : { x : α // p x }} :
      theorem Equiv.Perm.SameCycle.subtypePerm {α : Type u_2} {f : Equiv.Perm α} {p : α → Prop} {h : ∀ (x : α), p x ↔ p (f x)} {x : { x : α // p x }} {y : { x : α // p x }} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_subtypePerm.

      @[simp]
      theorem Equiv.Perm.sameCycle_extendDomain {α : Type u_2} {β : Type u_3} {g : Equiv.Perm α} {x : α} {y : α} {p : β → Prop} [DecidablePred p] {f : α ≃ Subtype p} :
      theorem Equiv.Perm.SameCycle.extendDomain {α : Type u_2} {β : Type u_3} {g : Equiv.Perm α} {x : α} {y : α} {p : β → Prop} [DecidablePred p] {f : α ≃ Subtype p} :

      Alias of the reverse direction of Equiv.Perm.sameCycle_extendDomain.

      theorem Equiv.Perm.SameCycle.exists_pow_eq' {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} [Finite α] :
      Equiv.Perm.SameCycle f x y → ∃ i < orderOf f, (f ^ i) x = y
      theorem Equiv.Perm.SameCycle.exists_pow_eq'' {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} [Finite α] (h : Equiv.Perm.SameCycle f x y) :
      ∃ (i : ℕ), 0 < i ∧ i ≤ orderOf f ∧ (f ^ i) x = y

      IsCycle #

      def Equiv.Perm.IsCycle {α : Type u_2} (f : Equiv.Perm α) :

      A cycle is a non identity permutation where any two nonfixed points of the permutation are related by repeated application of the permutation.

      Equations
      Instances For
        theorem Equiv.Perm.IsCycle.ne_one {α : Type u_2} {f : Equiv.Perm α} (h : Equiv.Perm.IsCycle f) :
        f ≠ 1
        theorem Equiv.Perm.IsCycle.sameCycle {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} (hf : Equiv.Perm.IsCycle f) (hx : f x ≠ x) (hy : f y ≠ y) :
        theorem Equiv.Perm.IsCycle.exists_zpow_eq {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} :
        Equiv.Perm.IsCycle f → f x ≠ x → f y ≠ y → ∃ (i : ℤ), (f ^ i) x = y
        theorem Equiv.Perm.isCycle_iff_sameCycle {α : Type u_2} {f : Equiv.Perm α} {x : α} (hx : f x ≠ x) :
        Equiv.Perm.IsCycle f ↔ ∀ {y : α}, Equiv.Perm.SameCycle f x y ↔ f y ≠ y
        theorem Equiv.Perm.IsCycle.exists_pow_eq {α : Type u_2} {f : Equiv.Perm α} {x : α} {y : α} [Finite α] (hf : Equiv.Perm.IsCycle f) (hx : f x ≠ x) (hy : f y ≠ y) :
        ∃ (i : ℕ), (f ^ i) x = y
        theorem Equiv.Perm.isCycle_swap {α : Type u_2} {x : α} {y : α} [DecidableEq α] (hxy : x ≠ y) :
        noncomputable def Equiv.Perm.IsCycle.zpowersEquivSupport {α : Type u_2} [DecidableEq α] [Fintype α] {σ : Equiv.Perm α} (hσ : Equiv.Perm.IsCycle σ) :
        ↥(Subgroup.zpowers σ) ≃ { x : α // x ∈ Equiv.Perm.support σ }

        The subgroup generated by a cycle is in bijection with its support

        Equations
        Instances For
          @[simp]
          theorem Equiv.Perm.IsCycle.zpowersEquivSupport_apply {α : Type u_2} [DecidableEq α] [Fintype α] {σ : Equiv.Perm α} (hσ : Equiv.Perm.IsCycle σ) {n : ℕ} :
          (Equiv.Perm.IsCycle.zpowersEquivSupport hσ) { val := σ ^ n, property := ⋯ } = { val := (σ ^ n) (Classical.choose hσ), property := ⋯ }
          @[simp]
          theorem Equiv.Perm.IsCycle.zpowersEquivSupport_symm_apply {α : Type u_2} [DecidableEq α] [Fintype α] {σ : Equiv.Perm α} (hσ : Equiv.Perm.IsCycle σ) (n : ℕ) :
          (Equiv.Perm.IsCycle.zpowersEquivSupport hσ).symm { val := (σ ^ n) (Classical.choose hσ), property := ⋯ } = { val := σ ^ n, property := ⋯ }
          theorem Equiv.Perm.isCycle_swap_mul_aux₁ {α : Type u_4} [DecidableEq α] (n : ℕ) {b : α} {x : α} {f : Equiv.Perm α} :
          (Equiv.swap x (f x) * f) b ≠ b → (f ^ n) (f x) = b → ∃ (i : ℤ), ((Equiv.swap x (f x) * f) ^ i) (f x) = b
          theorem Equiv.Perm.isCycle_swap_mul_aux₂ {α : Type u_4} [DecidableEq α] (n : ℤ) {b : α} {x : α} {f : Equiv.Perm α} :
          (Equiv.swap x (f x) * f) b ≠ b → (f ^ n) (f x) = b → ∃ (i : ℤ), ((Equiv.swap x (f x) * f) ^ i) (f x) = b
          theorem Equiv.Perm.IsCycle.eq_swap_of_apply_apply_eq_self {α : Type u_4} [DecidableEq α] {f : Equiv.Perm α} (hf : Equiv.Perm.IsCycle f) {x : α} (hfx : f x ≠ x) (hffx : f (f x) = x) :
          f = Equiv.swap x (f x)
          theorem Equiv.Perm.IsCycle.swap_mul {α : Type u_4} [DecidableEq α] {f : Equiv.Perm α} (hf : Equiv.Perm.IsCycle f) {x : α} (hx : f x ≠ x) (hffx : f (f x) ≠ x) :
          theorem Equiv.Perm.IsCycle.sign {α : Type u_2} [DecidableEq α] [Fintype α] {f : Equiv.Perm α} (hf : Equiv.Perm.IsCycle f) :
          Equiv.Perm.sign f = -(-1) ^ (Equiv.Perm.support f).card
          theorem Equiv.Perm.nodup_of_pairwise_disjoint_cycles {β : Type u_3} {l : List (Equiv.Perm β)} (h1 : ∀ f ∈ l, Equiv.Perm.IsCycle f) (h2 : List.Pairwise Equiv.Perm.Disjoint l) :
          theorem Equiv.Perm.IsCycle.support_congr {α : Type u_2} {f : Equiv.Perm α} {g : Equiv.Perm α} [DecidableEq α] [Fintype α] (hf : Equiv.Perm.IsCycle f) (hg : Equiv.Perm.IsCycle g) (h : Equiv.Perm.support f ⊆ Equiv.Perm.support g) (h' : ∀ x ∈ Equiv.Perm.support f, f x = g x) :
          f = g

          Unlike support_congr, which assumes that ∀ (x ∈ g.support), f x = g x), here we have the weaker assumption that ∀ (x ∈ f.support), f x = g x.

          theorem Equiv.Perm.IsCycle.eq_on_support_inter_nonempty_congr {α : Type u_2} {f : Equiv.Perm α} {g : Equiv.Perm α} {x : α} [DecidableEq α] [Fintype α] (hf : Equiv.Perm.IsCycle f) (hg : Equiv.Perm.IsCycle g) (h : ∀ x ∈ Equiv.Perm.support f ∩ Equiv.Perm.support g, f x = g x) (hx : f x = g x) (hx' : x ∈ Equiv.Perm.support f) :
          f = g

          If two cyclic permutations agree on all terms in their intersection, and that intersection is not empty, then the two cyclic permutations must be equal.

          theorem Equiv.Perm.IsCycle.pow_eq_one_iff {β : Type u_3} [Finite β] {f : Equiv.Perm β} (hf : Equiv.Perm.IsCycle f) {n : ℕ} :
          f ^ n = 1 ↔ ∃ (x : β), f x ≠ x ∧ (f ^ n) x = x
          theorem Equiv.Perm.IsCycle.pow_eq_one_iff' {β : Type u_3} [Finite β] {f : Equiv.Perm β} (hf : Equiv.Perm.IsCycle f) {n : ℕ} {x : β} (hx : f x ≠ x) :
          f ^ n = 1 ↔ (f ^ n) x = x
          theorem Equiv.Perm.IsCycle.pow_eq_one_iff'' {β : Type u_3} [Finite β] {f : Equiv.Perm β} (hf : Equiv.Perm.IsCycle f) {n : ℕ} :
          f ^ n = 1 ↔ ∀ (x : β), f x ≠ x → (f ^ n) x = x
          theorem Equiv.Perm.IsCycle.pow_eq_pow_iff {β : Type u_3} [Finite β] {f : Equiv.Perm β} (hf : Equiv.Perm.IsCycle f) {a : ℕ} {b : ℕ} :
          f ^ a = f ^ b ↔ ∃ (x : β), f x ≠ x ∧ (f ^ a) x = (f ^ b) x
          theorem Equiv.Perm.IsCycle.isCycle_pow_pos_of_lt_prime_order {β : Type u_3} [Finite β] {f : Equiv.Perm β} (hf : Equiv.Perm.IsCycle f) (hf' : Nat.Prime (orderOf f)) (n : ℕ) (hn : 0 < n) (hn' : n < orderOf f) :
          theorem Equiv.Perm.IsCycle.isConj {α : Type u_2} [Fintype α] [DecidableEq α] {σ : Equiv.Perm α} {τ : Equiv.Perm α} (hσ : Equiv.Perm.IsCycle σ) (hτ : Equiv.Perm.IsCycle τ) (h : (Equiv.Perm.support σ).card = (Equiv.Perm.support τ).card) :
          IsConj σ τ
          theorem Equiv.Perm.IsCycle.isConj_iff {α : Type u_2} [Fintype α] [DecidableEq α] {σ : Equiv.Perm α} {τ : Equiv.Perm α} (hσ : Equiv.Perm.IsCycle σ) (hτ : Equiv.Perm.IsCycle τ) :

          IsCycleOn #

          def Equiv.Perm.IsCycleOn {α : Type u_2} (f : Equiv.Perm α) (s : Set α) :

          A permutation is a cycle on s when any two points of s are related by repeated application of the permutation. Note that this means the identity is a cycle of subsingleton sets.

          Equations
          Instances For

            Alias of the reverse direction of Equiv.Perm.isCycleOn_one.

            Alias of the forward direction of Equiv.Perm.isCycleOn_one.

            @[simp]
            theorem Equiv.Perm.isCycleOn_singleton {α : Type u_2} {f : Equiv.Perm α} {a : α} :

            Alias of the forward direction of Equiv.Perm.isCycleOn_inv.

            Alias of the reverse direction of Equiv.Perm.isCycleOn_inv.

            theorem Equiv.Perm.IsCycleOn.conj {α : Type u_2} {f : Equiv.Perm α} {g : Equiv.Perm α} {s : Set α} (h : Equiv.Perm.IsCycleOn f s) :
            Equiv.Perm.IsCycleOn (g * f * g⁻¹) (⇑g '' s)
            theorem Equiv.Perm.isCycleOn_swap {α : Type u_2} {a : α} {b : α} [DecidableEq α] (hab : a ≠ b) :
            theorem Equiv.Perm.IsCycleOn.apply_ne {α : Type u_2} {f : Equiv.Perm α} {s : Set α} {a : α} (hf : Equiv.Perm.IsCycleOn f s) (hs : Set.Nontrivial s) (ha : a ∈ s) :
            f a ≠ a
            theorem Equiv.Perm.IsCycle.isCycleOn {α : Type u_2} {f : Equiv.Perm α} (hf : Equiv.Perm.IsCycle f) :
            Equiv.Perm.IsCycleOn f {x : α | f x ≠ x}
            theorem Equiv.Perm.isCycle_iff_exists_isCycleOn {α : Type u_2} {f : Equiv.Perm α} :
            Equiv.Perm.IsCycle f ↔ ∃ (s : Set α), Set.Nontrivial s ∧ Equiv.Perm.IsCycleOn f s ∧ ∀ ⦃x : α⦄, ¬Function.IsFixedPt (⇑f) x → x ∈ s

            This lemma demonstrates the relation between Equiv.Perm.IsCycle and Equiv.Perm.IsCycleOn in non-degenerate cases.

            theorem Equiv.Perm.IsCycleOn.apply_mem_iff {α : Type u_2} {f : Equiv.Perm α} {s : Set α} {x : α} (hf : Equiv.Perm.IsCycleOn f s) :
            f x ∈ s ↔ x ∈ s

            Note that the identity satisfies IsCycleOn for any subsingleton set, but not IsCycle.

            Note that the identity is a cycle on any subsingleton set, but not a cycle.

            theorem Equiv.Perm.IsCycleOn.pow_apply_eq {α : Type u_2} {f : Equiv.Perm α} {a : α} {s : Finset α} (hf : Equiv.Perm.IsCycleOn f ↑s) (ha : a ∈ s) {n : ℕ} :
            (f ^ n) a = a ↔ s.card ∣ n
            theorem Equiv.Perm.IsCycleOn.zpow_apply_eq {α : Type u_2} {f : Equiv.Perm α} {a : α} {s : Finset α} (hf : Equiv.Perm.IsCycleOn f ↑s) (ha : a ∈ s) {n : ℤ} :
            (f ^ n) a = a ↔ ↑s.card ∣ n
            theorem Equiv.Perm.IsCycleOn.pow_apply_eq_pow_apply {α : Type u_2} {f : Equiv.Perm α} {a : α} {s : Finset α} (hf : Equiv.Perm.IsCycleOn f ↑s) (ha : a ∈ s) {m : ℕ} {n : ℕ} :
            (f ^ m) a = (f ^ n) a ↔ m ≡ n [MOD s.card]
            theorem Equiv.Perm.IsCycleOn.zpow_apply_eq_zpow_apply {α : Type u_2} {f : Equiv.Perm α} {a : α} {s : Finset α} (hf : Equiv.Perm.IsCycleOn f ↑s) (ha : a ∈ s) {m : ℤ} {n : ℤ} :
            (f ^ m) a = (f ^ n) a ↔ m ≡ n [ZMOD ↑s.card]
            theorem Equiv.Perm.IsCycleOn.pow_card_apply {α : Type u_2} {f : Equiv.Perm α} {a : α} {s : Finset α} (hf : Equiv.Perm.IsCycleOn f ↑s) (ha : a ∈ s) :
            (f ^ s.card) a = a
            theorem Equiv.Perm.IsCycleOn.exists_pow_eq {α : Type u_2} {f : Equiv.Perm α} {a : α} {b : α} {s : Finset α} (hf : Equiv.Perm.IsCycleOn f ↑s) (ha : a ∈ s) (hb : b ∈ s) :
            ∃ n < s.card, (f ^ n) a = b
            theorem Equiv.Perm.IsCycleOn.exists_pow_eq' {α : Type u_2} {f : Equiv.Perm α} {s : Set α} {a : α} {b : α} (hs : Set.Finite s) (hf : Equiv.Perm.IsCycleOn f s) (ha : a ∈ s) (hb : b ∈ s) :
            ∃ (n : ℕ), (f ^ n) a = b
            theorem Equiv.Perm.IsCycleOn.range_pow {α : Type u_2} {f : Equiv.Perm α} {s : Set α} {a : α} (hs : Set.Finite s) (h : Equiv.Perm.IsCycleOn f s) (ha : a ∈ s) :
            (Set.range fun (n : ℕ) => (f ^ n) a) = s
            theorem Equiv.Perm.IsCycleOn.range_zpow {α : Type u_2} {f : Equiv.Perm α} {s : Set α} {a : α} (h : Equiv.Perm.IsCycleOn f s) (ha : a ∈ s) :
            (Set.range fun (n : ℤ) => (f ^ n) a) = s
            theorem Equiv.Perm.IsCycleOn.of_pow {α : Type u_2} {f : Equiv.Perm α} {s : Set α} {n : ℕ} (hf : Equiv.Perm.IsCycleOn (f ^ n) s) (h : Set.BijOn (⇑f) s s) :
            theorem Equiv.Perm.IsCycleOn.of_zpow {α : Type u_2} {f : Equiv.Perm α} {s : Set α} {n : ℤ} (hf : Equiv.Perm.IsCycleOn (f ^ n) s) (h : Set.BijOn (⇑f) s s) :
            theorem Equiv.Perm.IsCycleOn.extendDomain {α : Type u_2} {β : Type u_3} {g : Equiv.Perm α} {s : Set α} {p : β → Prop} [DecidablePred p] (f : α ≃ Subtype p) (h : Equiv.Perm.IsCycleOn g s) :
            theorem List.Nodup.isCycleOn_formPerm {α : Type u_2} [DecidableEq α] {l : List α} (h : List.Nodup l) :
            theorem Finset.exists_cycleOn {α : Type u_2} [DecidableEq α] [Fintype α] (s : Finset α) :
            theorem Set.Countable.exists_cycleOn {α : Type u_2} {s : Set α} (hs : Set.Countable s) :
            ∃ (f : Equiv.Perm α), Equiv.Perm.IsCycleOn f s ∧ {x : α | f x ≠ x} ⊆ s
            theorem Set.prod_self_eq_iUnion_perm {α : Type u_2} {f : Equiv.Perm α} {s : Set α} (hf : Equiv.Perm.IsCycleOn f s) :
            s ×ˢ s = ⋃ (n : ℤ), (fun (a : α) => (a, (f ^ n) a)) '' s
            theorem Finset.product_self_eq_disjiUnion_perm_aux {α : Type u_2} {f : Equiv.Perm α} {s : Finset α} (hf : Equiv.Perm.IsCycleOn f ↑s) :
            Set.PairwiseDisjoint ↑(Finset.range s.card) fun (k : ℕ) => Finset.map { toFun := fun (i : α) => (i, (f ^ k) i), inj' := ⋯ } s
            theorem Finset.product_self_eq_disjiUnion_perm {α : Type u_2} {f : Equiv.Perm α} {s : Finset α} (hf : Equiv.Perm.IsCycleOn f ↑s) :
            s ×ˢ s = Finset.disjiUnion (Finset.range s.card) (fun (k : ℕ) => Finset.map { toFun := fun (i : α) => (i, (f ^ k) i), inj' := ⋯ } s) ⋯

            We can partition the square s ×ˢ s into shifted diagonals as such:

            01234
            40123
            34012
            23401
            12340
            

            The diagonals are given by the cycle f.

            theorem Finset.sum_smul_sum_eq_sum_perm {ι : Type u_1} {α : Type u_2} {β : Type u_3} [Semiring α] [AddCommMonoid β] [Module α β] {s : Finset ι} {σ : Equiv.Perm ι} (hσ : Equiv.Perm.IsCycleOn σ ↑s) (f : ι → α) (g : ι → β) :
            ((Finset.sum s fun (i : ι) => f i) • Finset.sum s fun (i : ι) => g i) = Finset.sum (Finset.range s.card) fun (k : ℕ) => Finset.sum s fun (i : ι) => f i • g ((σ ^ k) i)
            theorem Finset.sum_mul_sum_eq_sum_perm {ι : Type u_1} {α : Type u_2} [Semiring α] {s : Finset ι} {σ : Equiv.Perm ι} (hσ : Equiv.Perm.IsCycleOn σ ↑s) (f : ι → α) (g : ι → α) :
            ((Finset.sum s fun (i : ι) => f i) * Finset.sum s fun (i : ι) => g i) = Finset.sum (Finset.range s.card) fun (k : ℕ) => Finset.sum s fun (i : ι) => f i * g ((σ ^ k) i)