Theorem: Equiv.Perm.subgroup_eq_top_of_swap_mem
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

tactic: haveI : Fact (Fintype.card α).Prime := ⟨h0⟩
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
H : Subgroup (Perm α)
d : DecidablePred fun x => x ∈ H
τ : Perm α
h0 : Nat.Prime (Fintype.card α)
h1 : Fintype.card α ∣ Fintype.card { x // x ∈ H }
h2 : τ ∈ H
h3 : IsSwap τ
⊢ H = ⊤

tactic: obtain ⟨σ, hσ⟩ := exists_prime_orderOf_dvd_card (Fintype.card α) h1
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
H : Subgroup (Perm α)
d : DecidablePred fun x => x ∈ H
τ : Perm α
h0 : Nat.Prime (Fintype.card α)
h1 : Fintype.card α ∣ Fintype.card { x // x ∈ H }
h2 : τ ∈ H
h3 : IsSwap τ
this : Fact (Nat.Prime (Fintype.card α))
⊢ H = ⊤

tactic: have hσ1 : orderOf (σ : Perm α) = Fintype.card α := (orderOf_subgroup σ).trans hσ
state_before: case intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
H : Subgroup (Perm α)
d : DecidablePred fun x => x ∈ H
τ : Perm α
h0 : Nat.Prime (Fintype.card α)
h1 : Fintype.card α ∣ Fintype.card { x // x ∈ H }
h2 : τ ∈ H
h3 : IsSwap τ
this : Fact (Nat.Prime (Fintype.card α))
σ : { x // x ∈ H }
hσ : orderOf σ = Fintype.card α
⊢ H = ⊤

tactic: have hσ2 : IsCycle ↑σ := isCycle_of_prime_order'' h0 hσ1
state_before: case intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
H : Subgroup (Perm α)
d : DecidablePred fun x => x ∈ H
τ : Perm α
h0 : Nat.Prime (Fintype.card α)
h1 : Fintype.card α ∣ Fintype.card { x // x ∈ H }
h2 : τ ∈ H
h3 : IsSwap τ
this : Fact (Nat.Prime (Fintype.card α))
σ : { x // x ∈ H }
hσ : orderOf σ = Fintype.card α
hσ1 : orderOf ↑σ = Fintype.card α
⊢ H = ⊤

tactic: have hσ3 : (σ : Perm α).support = ⊤ :=
  Finset.eq_univ_of_card (σ : Perm α).support (hσ2.orderOf.symm.trans hσ1)
state_before: case intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
H : Subgroup (Perm α)
d : DecidablePred fun x => x ∈ H
τ : Perm α
h0 : Nat.Prime (Fintype.card α)
h1 : Fintype.card α ∣ Fintype.card { x // x ∈ H }
h2 : τ ∈ H
h3 : IsSwap τ
this : Fact (Nat.Prime (Fintype.card α))
σ : { x // x ∈ H }
hσ : orderOf σ = Fintype.card α
hσ1 : orderOf ↑σ = Fintype.card α
hσ2 : IsCycle ↑σ
⊢ H = ⊤

tactic: have hσ4 : Subgroup.closure {↑σ, τ} = ⊤ := closure_prime_cycle_swap h0 hσ2 hσ3 h3
state_before: case intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
H : Subgroup (Perm α)
d : DecidablePred fun x => x ∈ H
τ : Perm α
h0 : Nat.Prime (Fintype.card α)
h1 : Fintype.card α ∣ Fintype.card { x // x ∈ H }
h2 : τ ∈ H
h3 : IsSwap τ
this : Fact (Nat.Prime (Fintype.card α))
σ : { x // x ∈ H }
hσ : orderOf σ = Fintype.card α
hσ1 : orderOf ↑σ = Fintype.card α
hσ2 : IsCycle ↑σ
hσ3 : support ↑σ = ⊤
⊢ H = ⊤

tactic: rw [eq_top_iff, ← hσ4, Subgroup.closure_le, Set.insert_subset, Set.singleton_subset_iff]
state_before: case intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
H : Subgroup (Perm α)
d : DecidablePred fun x => x ∈ H
τ : Perm α
h0 : Nat.Prime (Fintype.card α)
h1 : Fintype.card α ∣ Fintype.card { x // x ∈ H }
h2 : τ ∈ H
h3 : IsSwap τ
this : Fact (Nat.Prime (Fintype.card α))
σ : { x // x ∈ H }
hσ : orderOf σ = Fintype.card α
hσ1 : orderOf ↑σ = Fintype.card α
hσ2 : IsCycle ↑σ
hσ3 : support ↑σ = ⊤
hσ4 : Subgroup.closure {↑σ, τ} = ⊤
⊢ H = ⊤

tactic: exact ⟨Subtype.mem σ, h2⟩
state_before: case intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
H : Subgroup (Perm α)
d : DecidablePred fun x => x ∈ H
τ : Perm α
h0 : Nat.Prime (Fintype.card α)
h1 : Fintype.card α ∣ Fintype.card { x // x ∈ H }
h2 : τ ∈ H
h3 : IsSwap τ
this : Fact (Nat.Prime (Fintype.card α))
σ : { x // x ∈ H }
hσ : orderOf σ = Fintype.card α
hσ1 : orderOf ↑σ = Fintype.card α
hσ2 : IsCycle ↑σ
hσ3 : support ↑σ = ⊤
hσ4 : Subgroup.closure {↑σ, τ} = ⊤
⊢ ↑σ ∈ ↑H ∧ τ ∈ ↑H