Theorem: Equiv.Perm.IsCycle.existsUnique_cycle_nontrivial_subtype
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: obtain ⟨⟨s, hn⟩, hs, hs'⟩ := hf.existsUnique_cycle_subtype
state_before: α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
⊢ ∃! s, (↑s).formPerm ⋯ = f
state_after: case intro.mk.intro
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ ∃! s, (↑s).formPerm ⋯ = f

tactic: refine ⟨⟨s, hn, ?_⟩, ?_, ?_⟩
state_before: case intro.mk.intro
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ ∃! s, (↑s).formPerm ⋯ = f
state_after: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ s.Nontrivial

case intro.mk.intro.refine_2
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ (fun s => (↑s).formPerm ⋯ = f) ⟨s, ⋯⟩

case intro.mk.intro.refine_3
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ ∀ (y : { s // s.Nodup ∧ s.Nontrivial }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, ⋯⟩

tactic: rw [hn.nontrivial_iff]
state_before: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ s.Nontrivial
state_after: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ ¬s.Subsingleton

tactic: subst f
state_before: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ ¬s.Subsingleton
state_after: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
s : Cycle α
hn : s.Nodup
hf : ((↑⟨s, hn⟩).formPerm ⋯).IsCycle
hs' : ∀ (y : { s // s.Nodup }), (fun s_1 => (↑s_1).formPerm ⋯ = (↑⟨s, hn⟩).formPerm ⋯) y → y = ⟨s, hn⟩
⊢ ¬s.Subsingleton

tactic: intro H
state_before: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
s : Cycle α
hn : s.Nodup
hf : ((↑⟨s, hn⟩).formPerm ⋯).IsCycle
hs' : ∀ (y : { s // s.Nodup }), (fun s_1 => (↑s_1).formPerm ⋯ = (↑⟨s, hn⟩).formPerm ⋯) y → y = ⟨s, hn⟩
⊢ ¬s.Subsingleton
state_after: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
s : Cycle α
hn : s.Nodup
hf : ((↑⟨s, hn⟩).formPerm ⋯).IsCycle
hs' : ∀ (y : { s // s.Nodup }), (fun s_1 => (↑s_1).formPerm ⋯ = (↑⟨s, hn⟩).formPerm ⋯) y → y = ⟨s, hn⟩
H : s.Subsingleton
⊢ False

tactic: refine hf.ne_one ?_
state_before: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
s : Cycle α
hn : s.Nodup
hf : ((↑⟨s, hn⟩).formPerm ⋯).IsCycle
hs' : ∀ (y : { s // s.Nodup }), (fun s_1 => (↑s_1).formPerm ⋯ = (↑⟨s, hn⟩).formPerm ⋯) y → y = ⟨s, hn⟩
H : s.Subsingleton
⊢ False
state_after: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
s : Cycle α
hn : s.Nodup
hf : ((↑⟨s, hn⟩).formPerm ⋯).IsCycle
hs' : ∀ (y : { s // s.Nodup }), (fun s_1 => (↑s_1).formPerm ⋯ = (↑⟨s, hn⟩).formPerm ⋯) y → y = ⟨s, hn⟩
H : s.Subsingleton
⊢ (↑⟨s, hn⟩).formPerm ⋯ = 1

tactic: simpa using Cycle.formPerm_subsingleton _ H
state_before: case intro.mk.intro.refine_1
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
s : Cycle α
hn : s.Nodup
hf : ((↑⟨s, hn⟩).formPerm ⋯).IsCycle
hs' : ∀ (y : { s // s.Nodup }), (fun s_1 => (↑s_1).formPerm ⋯ = (↑⟨s, hn⟩).formPerm ⋯) y → y = ⟨s, hn⟩
H : s.Subsingleton
⊢ (↑⟨s, hn⟩).formPerm ⋯ = 1
state_after: no goals

tactic: simpa using hs
state_before: case intro.mk.intro.refine_2
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ (fun s => (↑s).formPerm ⋯ = f) ⟨s, ⋯⟩
state_after: no goals

tactic: rintro ⟨t, ht, ht'⟩ ht''
state_before: case intro.mk.intro.refine_3
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
⊢ ∀ (y : { s // s.Nodup ∧ s.Nontrivial }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, ⋯⟩
state_after: case intro.mk.intro.refine_3.mk.intro
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
t : Cycle α
ht : t.Nodup
ht' : t.Nontrivial
ht'' : (↑⟨t, ⋯⟩).formPerm ⋯ = f
⊢ ⟨t, ⋯⟩ = ⟨s, ⋯⟩

tactic: simpa using hs' ⟨t, ht⟩ ht''
state_before: case intro.mk.intro.refine_3.mk.intro
α : Type u_1
inst✝¹ : Finite α
inst✝ : DecidableEq α
f : Perm α
hf : f.IsCycle
s : Cycle α
hn : s.Nodup
hs : (↑⟨s, hn⟩).formPerm ⋯ = f
hs' : ∀ (y : { s // s.Nodup }), (fun s => (↑s).formPerm ⋯ = f) y → y = ⟨s, hn⟩
t : Cycle α
ht : t.Nodup
ht' : t.Nontrivial
ht'' : (↑⟨t, ⋯⟩).formPerm ⋯ = f
⊢ ⟨t, ⋯⟩ = ⟨s, ⋯⟩
state_after: no goals