Theorem: map_equiv_removeNone
File: Mathlib/GroupTheory/Perm/Option.lean

tactic: ext1 x
state_before: α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
⊢ (removeNone σ).optionCongr = swap none (σ none) * σ
state_after: case H
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x : Option α
⊢ (removeNone σ).optionCongr x = (swap none (σ none) * σ) x

tactic: simpa using this
state_before: case H
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x : Option α
this : Option.map (⇑(removeNone σ)) x = (swap none (σ none)) (σ x)
⊢ (removeNone σ).optionCongr x = (swap none (σ none) * σ) x
state_after: no goals

tactic: cases' x with x
state_before: α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x : Option α
⊢ Option.map (⇑(removeNone σ)) x = (swap none (σ none)) (σ x)
state_after: case none
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
⊢ Option.map (⇑(removeNone σ)) none = (swap none (σ none)) (σ none)

case some
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x : α
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) (σ (some x))

tactic: simp
state_before: case none
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
⊢ Option.map (⇑(removeNone σ)) none = (swap none (σ none)) (σ none)
state_after: no goals

tactic: cases h : σ (some _)
state_before: case some
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x : α
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) (σ (some x))
state_after: case some.none
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x : α
h : σ (some x) = none
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) none

case some.some
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x val✝ : α
h : σ (some x) = some val✝
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) (some val✝)

tactic: simp [removeNone_none _ h]
state_before: case some.none
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x : α
h : σ (some x) = none
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) none
state_after: no goals

tactic: have hn : σ (some x) ≠ none := by simp [h]
state_before: case some.some
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x val✝ : α
h : σ (some x) = some val✝
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) (some val✝)
state_after: case some.some
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x val✝ : α
h : σ (some x) = some val✝
hn : σ (some x) ≠ none
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) (some val✝)

tactic: have hσn : σ (some x) ≠ σ none := σ.injective.ne (by simp)
state_before: case some.some
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x val✝ : α
h : σ (some x) = some val✝
hn : σ (some x) ≠ none
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) (some val✝)
state_after: case some.some
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x val✝ : α
h : σ (some x) = some val✝
hn : σ (some x) ≠ none
hσn : σ (some x) ≠ σ none
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) (some val✝)

tactic: simp [removeNone_some _ ⟨_, h⟩, ← h, swap_apply_of_ne_of_ne hn hσn]
state_before: case some.some
α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x val✝ : α
h : σ (some x) = some val✝
hn : σ (some x) ≠ none
hσn : σ (some x) ≠ σ none
⊢ Option.map (⇑(removeNone σ)) (some x) = (swap none (σ none)) (some val✝)
state_after: no goals

tactic: simp [h]
state_before: α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x val✝ : α
h : σ (some x) = some val✝
⊢ σ (some x) ≠ none
state_after: no goals

tactic: simp
state_before: α : Type u_1
inst✝ : DecidableEq α
σ : Perm (Option α)
x val✝ : α
h : σ (some x) = some val✝
hn : σ (some x) ≠ none
⊢ some x ≠ none
state_after: no goals