Theorem: Equiv.Perm.ofSubtype_swap_eq
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: by_cases hz : p z
state_before: α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
⊢ ↑(↑ofSubtype (swap x y)) z = ↑(swap ↑x ↑y) z

tactic: rw [swap_apply_def, ofSubtype_apply_of_mem _ hz]
state_before: case pos
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : p z
⊢ ↑(↑ofSubtype (swap x y)) z = ↑(swap ↑x ↑y) z

tactic: split_ifs with hzx hzy
state_before: case pos
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : p z
⊢ ↑(↑(swap x y) { val := z, property := hz }) = if z = ↑x then ↑y else if z = ↑y then ↑x else z

tactic: simp_rw [hzx, Subtype.coe_eta, swap_apply_left]
state_before: case pos.inl
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : p z
hzx : z = ↑x
⊢ ↑(↑(swap x y) { val := z, property := hz }) = ↑y

tactic: simp_rw [hzy, Subtype.coe_eta, swap_apply_right]
state_before: case pos.inr.inl
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : p z
hzx : ¬z = ↑x
hzy : z = ↑y
⊢ ↑(↑(swap x y) { val := z, property := hz }) = ↑x

tactic: rw [swap_apply_of_ne_of_ne] <;>
simp [Subtype.ext_iff, *]
state_before: case pos.inr.inr
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : p z
hzx : ¬z = ↑x
hzy : ¬z = ↑y
⊢ ↑(↑(swap x y) { val := z, property := hz }) = z

tactic: rw [ofSubtype_apply_of_not_mem _ hz, swap_apply_of_ne_of_ne]
state_before: case neg
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
⊢ ↑(↑ofSubtype (swap x y)) z = ↑(swap ↑x ↑y) z

tactic: intro h
state_before: case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
⊢ z ≠ ↑x

case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
⊢ z ≠ ↑y

tactic: apply hz
state_before: case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
h : z = ↑x
⊢ False

case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
⊢ z ≠ ↑y

tactic: rw [h]
state_before: case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
h : z = ↑x
⊢ p z

case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
⊢ z ≠ ↑y

tactic: exact Subtype.prop x
state_before: case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
h : z = ↑x
⊢ p ↑x

case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
⊢ z ≠ ↑y

tactic: intro h
state_before: case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
⊢ z ≠ ↑y

tactic: apply hz
state_before: case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
h : z = ↑y
⊢ False

tactic: rw [h]
state_before: case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
h : z = ↑y
⊢ p z

tactic: exact Subtype.prop y
state_before: case neg.a
α : Type u_1
inst✝¹ : DecidableEq α
p : α → Prop
inst✝ : DecidablePred p
x y : Subtype p
z : α
hz : ¬p z
h : z = ↑y
⊢ p ↑y