File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

full_name: Equiv.Perm.cycleType
code: /-- The cycle type of a permutation -/
def cycleType (σ : Perm α) : Multiset ℕ 
goal: Multiset ℕ

full_name: Equiv.Perm.cycleType_def
code: theorem cycleType_def (σ : Perm α) :
    σ.cycleType = σ.cycleFactorsFinset.1.map (Finset.card ∘ support) 
goal: σ.cycleType = Multiset.map (Finset.card ∘ Equiv.Perm.support) σ.cycleFactorsFinset.val

full_name: Equiv.Perm.cycleType_eq'
code: theorem cycleType_eq' {σ : Perm α} (s : Finset (Perm α)) (h1 : ∀ f : Perm α, f ∈ s → f.IsCycle)
    (h2 : (s : Set (Perm α)).Pairwise Disjoint)
    (h0 : s.noncommProd id (h2.imp fun _ _ => Disjoint.commute) = σ) :
    σ.cycleType = s.1.map (Finset.card ∘ support) 
goal: σ.cycleType = Multiset.map (Finset.card ∘ Equiv.Perm.support) s.val

full_name: Equiv.Perm.cycleType_eq
code: theorem cycleType_eq {σ : Perm α} (l : List (Perm α)) (h0 : l.prod = σ)
    (h1 : ∀ σ : Perm α, σ ∈ l → σ.IsCycle) (h2 : l.Pairwise Disjoint) :
    σ.cycleType = l.map (Finset.card ∘ support) 
goal: σ.cycleType = ↑(List.map (Finset.card ∘ Equiv.Perm.support) l)

full_name: Equiv.Perm.cycleType_eq_zero
code: @[simp] -- Porting note: new attr
theorem cycleType_eq_zero {σ : Perm α} : σ.cycleType = 0 ↔ σ = 1 
goal: σ.cycleType = 0 ↔ σ = 1

full_name: Equiv.Perm.cycleType_one
code: @[simp] -- Porting note: new attr
theorem cycleType_one : (1 : Perm α).cycleType = 0 
goal: Equiv.Perm.cycleType 1 = 0

full_name: Equiv.Perm.card_cycleType_eq_zero
code: theorem card_cycleType_eq_zero {σ : Perm α} : Multiset.card σ.cycleType = 0 ↔ σ = 1 
goal: Multiset.card σ.cycleType = 0 ↔ σ = 1

full_name: Equiv.Perm.card_cycleType_pos
code: theorem card_cycleType_pos {σ : Perm α} : 0 < Multiset.card σ.cycleType ↔ σ ≠ 1 
goal: 0 < Multiset.card σ.cycleType ↔ σ ≠ 1

full_name: Equiv.Perm.two_le_of_mem_cycleType
code: theorem two_le_of_mem_cycleType {σ : Perm α} {n : ℕ} (h : n ∈ σ.cycleType) : 2 ≤ n 
goal: 2 ≤ n

full_name: Equiv.Perm.one_lt_of_mem_cycleType
code: theorem one_lt_of_mem_cycleType {σ : Perm α} {n : ℕ} (h : n ∈ σ.cycleType) : 1 < n 
goal: 1 < n

full_name: Equiv.Perm.IsCycle.cycleType
code: theorem IsCycle.cycleType {σ : Perm α} (hσ : IsCycle σ) : σ.cycleType = [σ.support.card] 
goal: σ.cycleType = ↑[σ.support.card]

full_name: Equiv.Perm.card_cycleType_eq_one
code: theorem card_cycleType_eq_one {σ : Perm α} : Multiset.card σ.cycleType = 1 ↔ σ.IsCycle 
goal: Multiset.card σ.cycleType = 1 ↔ σ.IsCycle

full_name: Equiv.Perm.Disjoint.cycleType
code: theorem Disjoint.cycleType {σ τ : Perm α} (h : Disjoint σ τ) :
    (σ * τ).cycleType = σ.cycleType + τ.cycleType 
goal: (σ * τ).cycleType = σ.cycleType + τ.cycleType

full_name: Equiv.Perm.cycleType_inv
code: @[simp] -- Porting note: new attr
theorem cycleType_inv (σ : Perm α) : σ⁻¹.cycleType = σ.cycleType 
goal: σ⁻¹.cycleType = σ.cycleType

full_name: Equiv.Perm.cycleType_conj
code: @[simp] -- Porting note: new attr
theorem cycleType_conj {σ τ : Perm α} : (τ * σ * τ⁻¹).cycleType = σ.cycleType 
goal: (τ * σ * τ⁻¹).cycleType = σ.cycleType

full_name: Equiv.Perm.sum_cycleType
code: theorem sum_cycleType (σ : Perm α) : σ.cycleType.sum = σ.support.card 
goal: σ.cycleType.sum = σ.support.card

full_name: Equiv.Perm.sign_of_cycleType'
code: theorem sign_of_cycleType' (σ : Perm α) :
    sign σ = (σ.cycleType.map fun n => -(-1 : ℤˣ) ^ n).prod 
goal: Equiv.Perm.sign σ = (Multiset.map (fun n => -(-1) ^ n) σ.cycleType).prod

full_name: Equiv.Perm.sign_of_cycleType
code: theorem sign_of_cycleType (f : Perm α) :
    sign f = (-1 : ℤˣ) ^ (f.cycleType.sum + Multiset.card f.cycleType) 
goal: Equiv.Perm.sign f = (-1) ^ (f.cycleType.sum + Multiset.card f.cycleType)

full_name: Equiv.Perm.lcm_cycleType
code: @[simp] -- Porting note: new attr
theorem lcm_cycleType (σ : Perm α) : σ.cycleType.lcm = orderOf σ 
goal: σ.cycleType.lcm = orderOf σ

full_name: Equiv.Perm.dvd_of_mem_cycleType
code: theorem dvd_of_mem_cycleType {σ : Perm α} {n : ℕ} (h : n ∈ σ.cycleType) : n ∣ orderOf σ 
goal: n ∣ orderOf σ

full_name: Equiv.Perm.orderOf_cycleOf_dvd_orderOf
code: theorem orderOf_cycleOf_dvd_orderOf (f : Perm α) (x : α) : orderOf (cycleOf f x) ∣ orderOf f 
goal: orderOf (f.cycleOf x) ∣ orderOf f

full_name: Equiv.Perm.two_dvd_card_support
code: theorem two_dvd_card_support {σ : Perm α} (hσ : σ ^ 2 = 1) : 2 ∣ σ.support.card 
goal: 2 ∣ σ.support.card

full_name: Equiv.Perm.cycleType_prime_order
code: theorem cycleType_prime_order {σ : Perm α} (hσ : (orderOf σ).Prime) :
    ∃ n : ℕ, σ.cycleType = Multiset.replicate (n + 1) (orderOf σ) 
goal: ∃ n, σ.cycleType = Multiset.replicate (n + 1) (orderOf σ)

full_name: Equiv.Perm.isCycle_of_prime_order
code: theorem isCycle_of_prime_order {σ : Perm α} (h1 : (orderOf σ).Prime)
    (h2 : σ.support.card < 2 * orderOf σ) : σ.IsCycle 
goal: σ.IsCycle

full_name: Equiv.Perm.cycleType_le_of_mem_cycleFactorsFinset
code: theorem cycleType_le_of_mem_cycleFactorsFinset {f g : Perm α} (hf : f ∈ g.cycleFactorsFinset) :
    f.cycleType ≤ g.cycleType 
goal: f.cycleType ≤ g.cycleType

full_name: Equiv.Perm.cycleType_mul_inv_mem_cycleFactorsFinset_eq_sub
code: theorem cycleType_mul_inv_mem_cycleFactorsFinset_eq_sub
    {f g : Perm α} (hf : f ∈ g.cycleFactorsFinset) :
    (g * f⁻¹).cycleType = g.cycleType - f.cycleType 
goal: (g * f⁻¹).cycleType = g.cycleType - f.cycleType

full_name: Equiv.Perm.isConj_of_cycleType_eq
code: theorem isConj_of_cycleType_eq {σ τ : Perm α} (h : cycleType σ = cycleType τ) : IsConj σ τ 
goal: IsConj σ τ

full_name: Equiv.Perm.isConj_iff_cycleType_eq
code: theorem isConj_iff_cycleType_eq {σ τ : Perm α} : IsConj σ τ ↔ σ.cycleType = τ.cycleType 
goal: IsConj σ τ ↔ σ.cycleType = τ.cycleType

full_name: Equiv.Perm.cycleType_extendDomain
code: @[simp]
theorem cycleType_extendDomain {β : Type*} [Fintype β] [DecidableEq β] {p : β → Prop}
    [DecidablePred p] (f : α ≃ Subtype p) {g : Perm α} :
    cycleType (g.extendDomain f) = cycleType g 
goal: (g.extendDomain f).cycleType = g.cycleType

full_name: Equiv.Perm.cycleType_ofSubtype
code: theorem cycleType_ofSubtype {p : α → Prop} [DecidablePred p] {g : Perm (Subtype p)} :
    cycleType (ofSubtype g) = cycleType g 
goal: (Equiv.Perm.ofSubtype g).cycleType = g.cycleType

full_name: Equiv.Perm.mem_cycleType_iff
code: theorem mem_cycleType_iff {n : ℕ} {σ : Perm α} :
    n ∈ cycleType σ ↔ ∃ c τ, σ = c * τ ∧ Disjoint c τ ∧ IsCycle c ∧ c.support.card = n 
goal: n ∈ σ.cycleType ↔ ∃ c τ, σ = c * τ ∧ c.Disjoint τ ∧ c.IsCycle ∧ c.support.card = n

full_name: Equiv.Perm.le_card_support_of_mem_cycleType
code: theorem le_card_support_of_mem_cycleType {n : ℕ} {σ : Perm α} (h : n ∈ cycleType σ) :
    n ≤ σ.support.card 
goal: n ≤ σ.support.card

full_name: Equiv.Perm.cycleType_of_card_le_mem_cycleType_add_two
code: theorem cycleType_of_card_le_mem_cycleType_add_two {n : ℕ} {g : Perm α}
    (hn2 : Fintype.card α < n + 2) (hng : n ∈ g.cycleType) : g.cycleType = {n} 
goal: g.cycleType = {n}

full_name: Equiv.Perm.card_compl_support_modEq
code: theorem card_compl_support_modEq [DecidableEq α] {p n : ℕ} [hp : Fact p.Prime] {σ : Perm α}
    (hσ : σ ^ p ^ n = 1) : σ.supportᶜ.card ≡ Fintype.card α [MOD p] 
goal: σ.supportᶜ.card ≡ Fintype.card α [MOD p]

full_name: Equiv.Perm.card_fixedPoints_modEq
code: /-- The number of fixed points of a `p ^ n`-th root of the identity function over a finite set
and the set's cardinality have the same residue modulo `p`, where `p` is a prime. -/
theorem card_fixedPoints_modEq [DecidableEq α] {f : Function.End α} {p n : ℕ}
    [hp : Fact p.Prime] (hf : f ^ p ^ n = 1) :
    Fintype.card α ≡ Fintype.card f.fixedPoints [MOD p] 
goal: Fintype.card α ≡ Fintype.card ↑(Function.fixedPoints f) [MOD p]

full_name: Equiv.Perm.exists_fixed_point_of_prime
code: theorem exists_fixed_point_of_prime {p n : ℕ} [hp : Fact p.Prime] (hα : ¬p ∣ Fintype.card α)
    {σ : Perm α} (hσ : σ ^ p ^ n = 1) : ∃ a : α, σ a = a 
goal: ∃ a, σ a = a

full_name: Equiv.Perm.exists_fixed_point_of_prime'
code: theorem exists_fixed_point_of_prime' {p n : ℕ} [hp : Fact p.Prime] (hα : p ∣ Fintype.card α)
    {σ : Perm α} (hσ : σ ^ p ^ n = 1) {a : α} (ha : σ a = a) : ∃ b : α, σ b = b ∧ b ≠ a 
goal: ∃ b, σ b = b ∧ b ≠ a

full_name: Equiv.Perm.isCycle_of_prime_order'
code: theorem isCycle_of_prime_order' {σ : Perm α} (h1 : (orderOf σ).Prime)
    (h2 : Fintype.card α < 2 * orderOf σ) : σ.IsCycle 
goal: σ.IsCycle

full_name: Equiv.Perm.isCycle_of_prime_order''
code: theorem isCycle_of_prime_order'' {σ : Perm α} (h1 : (Fintype.card α).Prime)
    (h2 : orderOf σ = Fintype.card α) : σ.IsCycle 
goal: σ.IsCycle

full_name: Equiv.Perm.vectorsProdEqOne
code: /-- The type of vectors with terms from `G`, length `n`, and product equal to `1:G`. -/
def vectorsProdEqOne : Set (Vector G n) 
goal: Set (Mathlib.Vector G n)

full_name: Equiv.Perm.VectorsProdEqOne.mem_iff
code: theorem mem_iff {n : ℕ} (v : Vector G n) : v ∈ vectorsProdEqOne G n ↔ v.toList.prod = 1 
goal: v ∈ Equiv.Perm.vectorsProdEqOne G n ↔ v.toList.prod = 1

full_name: Equiv.Perm.VectorsProdEqOne.zero_eq
code: theorem zero_eq : vectorsProdEqOne G 0 = {Vector.nil} 
goal: Equiv.Perm.vectorsProdEqOne G 0 = {Mathlib.Vector.nil}

full_name: Equiv.Perm.VectorsProdEqOne.one_eq
code: theorem one_eq : vectorsProdEqOne G 1 = {Vector.nil.cons 1} 
goal: Equiv.Perm.vectorsProdEqOne G 1 = {1 ::ᵥ Mathlib.Vector.nil}

full_name: Equiv.Perm.VectorsProdEqOne.zeroUnique
code: instance zeroUnique : Unique (vectorsProdEqOne G 0) 
goal: Unique ↑(Equiv.Perm.vectorsProdEqOne G 0)

full_name: Equiv.Perm.VectorsProdEqOne.oneUnique
code: instance oneUnique : Unique (vectorsProdEqOne G 1) 
goal: Unique ↑(Equiv.Perm.vectorsProdEqOne G 1)

full_name: Equiv.Perm.VectorsProdEqOne.vectorEquiv_apply_coe
code: /-- Given a vector `v` of length `n`, make a vector of length `n + 1` whose product is `1`,
by appending the inverse of the product of `v`. -/
@[simps]
def vectorEquiv : Vector G n ≃ vectorsProdEqOne G (n + 1) 
goal: ↑((Equiv.Perm.VectorsProdEqOne.vectorEquiv G n) v) = v.toList.prod⁻¹ ::ᵥ v

full_name: Equiv.Perm.VectorsProdEqOne.vectorEquiv
code: /-- Given a vector `v` of length `n`, make a vector of length `n + 1` whose product is `1`,
by appending the inverse of the product of `v`. -/
@[simps]
def vectorEquiv : Vector G n ≃ vectorsProdEqOne G (n + 1) 
goal: Mathlib.Vector G n ≃ ↑(Equiv.Perm.vectorsProdEqOne G (n + 1))

full_name: Equiv.Perm.VectorsProdEqOne.vectorEquiv_symm_apply
code: /-- Given a vector `v` of length `n`, make a vector of length `n + 1` whose product is `1`,
by appending the inverse of the product of `v`. -/
@[simps]
def vectorEquiv : Vector G n ≃ vectorsProdEqOne G (n + 1) 
goal: (Equiv.Perm.VectorsProdEqOne.vectorEquiv G n).symm v = (↑v).tail

full_name: Equiv.Perm.VectorsProdEqOne.equivVector
code: /-- Given a vector `v` of length `n` whose product is 1, make a vector of length `n - 1`,
by deleting the last entry of `v`. -/
def equivVector : ∀ n, vectorsProdEqOne G n ≃ Vector G (n - 1)
  
goal: ↑(Equiv.Perm.vectorsProdEqOne G n) ≃ Mathlib.Vector G (n - 1)

full_name: Equiv.Perm.VectorsProdEqOne.instFintypeElemVectorVectorsProdEqOne
code: instance [Fintype G] : Fintype (vectorsProdEqOne G n) 
goal: Fintype ↑(Equiv.Perm.vectorsProdEqOne G n)

full_name: Equiv.Perm.VectorsProdEqOne.card
code: theorem card [Fintype G] : Fintype.card (vectorsProdEqOne G n) = Fintype.card G ^ (n - 1) 
goal: Fintype.card ↑(Equiv.Perm.vectorsProdEqOne G n) = Fintype.card G ^ (n - 1)

full_name: Equiv.Perm.VectorsProdEqOne.rotate
code: /-- Rotate a vector whose product is 1. -/
def rotate : vectorsProdEqOne G n 
goal: ↑(Equiv.Perm.vectorsProdEqOne G n)

full_name: Equiv.Perm.VectorsProdEqOne.rotate_zero
code: theorem rotate_zero : rotate v 0 = v 
goal: Equiv.Perm.VectorsProdEqOne.rotate v 0 = v

full_name: Equiv.Perm.VectorsProdEqOne.rotate_rotate
code: theorem rotate_rotate : rotate (rotate v j) k = rotate v (j + k) 
goal: Equiv.Perm.VectorsProdEqOne.rotate (Equiv.Perm.VectorsProdEqOne.rotate v j) k =
  Equiv.Perm.VectorsProdEqOne.rotate v (j + k)

full_name: Equiv.Perm.VectorsProdEqOne.rotate_length
code: theorem rotate_length : rotate v n = v 
goal: Equiv.Perm.VectorsProdEqOne.rotate v n = v

full_name: exists_prime_orderOf_dvd_card
code: /-- For every prime `p` dividing the order of a finite group `G` there exists an element of order
`p` in `G`. This is known as Cauchy's theorem. -/
theorem _root_.exists_prime_orderOf_dvd_card {G : Type*} [Group G] [Fintype G] (p : ℕ)
    [hp : Fact p.Prime] (hdvd : p ∣ Fintype.card G) : ∃ x : G, orderOf x = p 
goal: ∃ x, orderOf x = p

full_name: exists_prime_addOrderOf_dvd_card
code: /-- For every prime `p` dividing the order of a finite additive group `G` there exists an element of
order `p` in `G`. This is the additive version of Cauchy's theorem. -/
theorem _root_.exists_prime_addOrderOf_dvd_card {G : Type*} [AddGroup G] [Fintype G] (p : ℕ)
    [hp : Fact p.Prime] (hdvd : p ∣ Fintype.card G) : ∃ x : G, addOrderOf x = p 
goal: ∃ x, addOrderOf x = p

full_name: exists_prime_orderOf_dvd_card'
code: /-- For every prime `p` dividing the order of a finite group `G` there exists an element of order
`p` in `G`. This is known as Cauchy's theorem. -/
@[to_additive]
theorem _root_.exists_prime_orderOf_dvd_card' {G : Type*} [Group G] [Finite G] (p : ℕ)
    [hp : Fact p.Prime] (hdvd : p ∣ Nat.card G) : ∃ x : G, orderOf x = p 
goal: ∃ x, orderOf x = p

full_name: exists_prime_addOrderOf_dvd_card'
code: /-- For every prime `p` dividing the order of a finite group `G` there exists an element of order
`p` in `G`. This is known as Cauchy's theorem. -/
@[to_additive]
theorem _root_.exists_prime_orderOf_dvd_card' {G : Type*} [Group G] [Finite G] (p : ℕ)
    [hp : Fact p.Prime] (hdvd : p ∣ Nat.card G) : ∃ x : G, orderOf x = p 
goal: ∃ x, addOrderOf x = p

full_name: Equiv.Perm.subgroup_eq_top_of_swap_mem
code: theorem subgroup_eq_top_of_swap_mem [DecidableEq α] {H : Subgroup (Perm α)}
    [d : DecidablePred (· ∈ H)] {τ : Perm α} (h0 : (Fintype.card α).Prime)
    (h1 : Fintype.card α ∣ Fintype.card H) (h2 : τ ∈ H) (h3 : IsSwap τ) : H = ⊤ 
goal: H = ⊤

full_name: Equiv.Perm.partition
code: /-- The partition corresponding to a permutation -/
def partition (σ : Perm α) : (Fintype.card α).Partition 
goal: (Fintype.card α).Partition

full_name: Equiv.Perm.parts_partition
code: theorem parts_partition {σ : Perm α} :
    σ.partition.parts = σ.cycleType + Multiset.replicate (Fintype.card α - σ.support.card) 1 
goal: σ.partition.parts = σ.cycleType + Multiset.replicate (Fintype.card α - σ.support.card) 1

full_name: Equiv.Perm.filter_parts_partition_eq_cycleType
code: theorem filter_parts_partition_eq_cycleType {σ : Perm α} :
    ((partition σ).parts.filter fun n => 2 ≤ n) = σ.cycleType 
goal: Multiset.filter (fun n => 2 ≤ n) σ.partition.parts = σ.cycleType

full_name: Equiv.Perm.partition_eq_of_isConj
code: theorem partition_eq_of_isConj {σ τ : Perm α} : IsConj σ τ ↔ σ.partition = τ.partition 
goal: IsConj σ τ ↔ σ.partition = τ.partition

full_name: Equiv.Perm.IsThreeCycle
code: /-- A three-cycle is a cycle of length 3. -/
def IsThreeCycle [DecidableEq α] (σ : Perm α) : Prop 
goal: Prop

full_name: Equiv.Perm.IsThreeCycle.cycleType
code: theorem cycleType (h : IsThreeCycle σ) : σ.cycleType = {3} 
goal: σ.cycleType = {3}

full_name: Equiv.Perm.IsThreeCycle.card_support
code: theorem card_support (h : IsThreeCycle σ) : σ.support.card = 3 
goal: σ.support.card = 3

full_name: card_support_eq_three_iff
code: theorem _root_.card_support_eq_three_iff : σ.support.card = 3 ↔ σ.IsThreeCycle 
goal: σ.support.card = 3 ↔ σ.IsThreeCycle

full_name: Equiv.Perm.IsThreeCycle.isCycle
code: theorem isCycle (h : IsThreeCycle σ) : IsCycle σ 
goal: σ.IsCycle

full_name: Equiv.Perm.IsThreeCycle.sign
code: theorem sign (h : IsThreeCycle σ) : sign σ = 1 
goal: Equiv.Perm.sign σ = 1

full_name: Equiv.Perm.IsThreeCycle.inv
code: theorem inv {f : Perm α} (h : IsThreeCycle f) : IsThreeCycle f⁻¹ 
goal: f⁻¹.IsThreeCycle

full_name: Equiv.Perm.IsThreeCycle.inv_iff
code: @[simp]
theorem inv_iff {f : Perm α} : IsThreeCycle f⁻¹ ↔ IsThreeCycle f 
goal: f⁻¹.IsThreeCycle ↔ f.IsThreeCycle

full_name: Equiv.Perm.IsThreeCycle.orderOf
code: theorem orderOf {g : Perm α} (ht : IsThreeCycle g) : orderOf g = 3 
goal: orderOf g = 3

full_name: Equiv.Perm.IsThreeCycle.isThreeCycle_sq
code: theorem isThreeCycle_sq {g : Perm α} (ht : IsThreeCycle g) : IsThreeCycle (g * g) 
goal: (g * g).IsThreeCycle

full_name: Equiv.Perm.isThreeCycle_swap_mul_swap_same
code: theorem isThreeCycle_swap_mul_swap_same {a b c : α} (ab : a ≠ b) (ac : a ≠ c) (bc : b ≠ c) :
    IsThreeCycle (swap a b * swap a c) 
goal: (Equiv.swap a b * Equiv.swap a c).IsThreeCycle

full_name: Equiv.Perm.swap_mul_swap_same_mem_closure_three_cycles
code: theorem swap_mul_swap_same_mem_closure_three_cycles {a b c : α} (ab : a ≠ b) (ac : a ≠ c) :
    swap a b * swap a c ∈ closure { σ : Perm α | IsThreeCycle σ } 
goal: Equiv.swap a b * Equiv.swap a c ∈ Subgroup.closure {σ | σ.IsThreeCycle}

full_name: Equiv.Perm.IsSwap.mul_mem_closure_three_cycles
code: theorem IsSwap.mul_mem_closure_three_cycles {σ τ : Perm α} (hσ : IsSwap σ) (hτ : IsSwap τ) :
    σ * τ ∈ closure { σ : Perm α | IsThreeCycle σ } 
goal: σ * τ ∈ Subgroup.closure {σ | σ.IsThreeCycle}