Theorem: List.mem_of_mem_of_mem_sym
File: Mathlib/Data/List/Sym.lean

tactic: cases Sym.eq_nil_of_card_zero z
state_before: α : Type u_1
xs✝¹ ys : List α
n✝ n : ℕ
xs✝ : List α
a : α
xs : List α
z : Sym α 0
ha : a ∈ z
hz : z ∈ List.sym 0 xs
⊢ a ∈ xs
state_after: case refl
α : Type u_1
xs✝¹ ys : List α
n✝ n : ℕ
xs✝ : List α
a : α
xs : List α
ha : a ∈ Sym.nil
hz : Sym.nil ∈ List.sym 0 xs
⊢ a ∈ xs

tactic: simp at ha
state_before: case refl
α : Type u_1
xs✝¹ ys : List α
n✝ n : ℕ
xs✝ : List α
a : α
xs : List α
ha : a ∈ Sym.nil
hz : Sym.nil ∈ List.sym 0 xs
⊢ a ∈ xs
state_after: no goals

tactic: simp [List.sym] at hz
state_before: α : Type u_1
xs✝ ys : List α
n✝¹ n✝ : ℕ
xs : List α
a : α
n : ℕ
z : Sym α (n + 1)
ha : a ∈ z
hz : z ∈ List.sym (n + 1) []
⊢ a ∈ []
state_after: no goals

tactic: rw [List.sym, mem_append, mem_map] at hz
state_before: α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α (n + 1)
ha : a ∈ z
hz : z ∈ List.sym (n + 1) (x :: xs)
⊢ a ∈ x :: xs
state_after: α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α (n + 1)
ha : a ∈ z
hz : (∃ a ∈ List.sym n (x :: xs), x ::ₛ a = z) ∨ z ∈ List.sym (n + 1) xs
⊢ a ∈ x :: xs

tactic: obtain ⟨z, hz, rfl⟩ | hz := hz
state_before: α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α (n + 1)
ha : a ∈ z
hz : (∃ a ∈ List.sym n (x :: xs), x ::ₛ a = z) ∨ z ∈ List.sym (n + 1) xs
⊢ a ∈ x :: xs
state_after: case inl.intro.intro
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α n
hz : z ∈ List.sym n (x :: xs)
ha : a ∈ x ::ₛ z
⊢ a ∈ x :: xs

case inr
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α (n + 1)
ha : a ∈ z
hz : z ∈ List.sym (n + 1) xs
⊢ a ∈ x :: xs

tactic: rw [Sym.mem_cons] at ha
state_before: case inl.intro.intro
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α n
hz : z ∈ List.sym n (x :: xs)
ha : a ∈ x ::ₛ z
⊢ a ∈ x :: xs
state_after: case inl.intro.intro
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α n
hz : z ∈ List.sym n (x :: xs)
ha : a = x ∨ a ∈ z
⊢ a ∈ x :: xs

tactic: obtain rfl | ha := ha
state_before: case inl.intro.intro
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α n
hz : z ∈ List.sym n (x :: xs)
ha : a = x ∨ a ∈ z
⊢ a ∈ x :: xs
state_after: case inl.intro.intro.inl
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
xs : List α
z : Sym α n
hz : z ∈ List.sym n (a :: xs)
⊢ a ∈ a :: xs

case inl.intro.intro.inr
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α n
hz : z ∈ List.sym n (x :: xs)
ha : a ∈ z
⊢ a ∈ x :: xs

tactic: simp
state_before: case inl.intro.intro.inl
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
xs : List α
z : Sym α n
hz : z ∈ List.sym n (a :: xs)
⊢ a ∈ a :: xs
state_after: no goals

tactic: exact mem_of_mem_of_mem_sym ha hz
state_before: case inl.intro.intro.inr
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α n
hz : z ∈ List.sym n (x :: xs)
ha : a ∈ z
⊢ a ∈ x :: xs
state_after: no goals

tactic: rw [mem_cons]
state_before: case inr
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α (n + 1)
ha : a ∈ z
hz : z ∈ List.sym (n + 1) xs
⊢ a ∈ x :: xs
state_after: case inr
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α (n + 1)
ha : a ∈ z
hz : z ∈ List.sym (n + 1) xs
⊢ a = x ∨ a ∈ xs

tactic: right
state_before: case inr
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α (n + 1)
ha : a ∈ z
hz : z ∈ List.sym (n + 1) xs
⊢ a = x ∨ a ∈ xs
state_after: case inr.h
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α (n + 1)
ha : a ∈ z
hz : z ∈ List.sym (n + 1) xs
⊢ a ∈ xs

tactic: exact mem_of_mem_of_mem_sym ha hz
state_before: case inr.h
α : Type u_1
xs✝¹ ys : List α
n✝¹ n✝ : ℕ
xs✝ : List α
a : α
n : ℕ
x : α
xs : List α
z : Sym α (n + 1)
ha : a ∈ z
hz : z ∈ List.sym (n + 1) xs
⊢ a ∈ xs
state_after: no goals