Theorem: List.mem_sections
File: Mathlib/Data/List/Sections.lean

tactic: refine ⟨fun h => ?_, fun h => ?_⟩
state_before: α : Type u_1
β : Type u_2
L : List (List α)
f : List α
⊢ f ∈ L.sections ↔ Forall₂ (fun x x_1 => x ∈ x_1) f L
state_after: case refine_1
α : Type u_1
β : Type u_2
L : List (List α)
f : List α
h : f ∈ L.sections
⊢ Forall₂ (fun x x_1 => x ∈ x_1) f L

case refine_2
α : Type u_1
β : Type u_2
L : List (List α)
f : List α
h : Forall₂ (fun x x_1 => x ∈ x_1) f L
⊢ f ∈ L.sections

tactic: induction L generalizing f
state_before: case refine_1
α : Type u_1
β : Type u_2
L : List (List α)
f : List α
h : f ∈ L.sections
⊢ Forall₂ (fun x x_1 => x ∈ x_1) f L
state_after: case refine_1.nil
α : Type u_1
β : Type u_2
f : List α
h : f ∈ [].sections
⊢ Forall₂ (fun x x_1 => x ∈ x_1) f []

case refine_1.cons
α : Type u_1
β : Type u_2
head✝ : List α
tail✝ : List (List α)
tail_ih✝ : ∀ {f : List α}, f ∈ tail✝.sections → Forall₂ (fun x x_1 => x ∈ x_1) f tail✝
f : List α
h : f ∈ (head✝ :: tail✝).sections
⊢ Forall₂ (fun x x_1 => x ∈ x_1) f (head✝ :: tail✝)

tactic: simp only [sections, bind_eq_bind, mem_bind, mem_map] at h
state_before: case refine_1.cons
α : Type u_1
β : Type u_2
head✝ : List α
tail✝ : List (List α)
tail_ih✝ : ∀ {f : List α}, f ∈ tail✝.sections → Forall₂ (fun x x_1 => x ∈ x_1) f tail✝
f : List α
h : f ∈ (head✝ :: tail✝).sections
⊢ Forall₂ (fun x x_1 => x ∈ x_1) f (head✝ :: tail✝)
state_after: case refine_1.cons
α : Type u_1
β : Type u_2
head✝ : List α
tail✝ : List (List α)
tail_ih✝ : ∀ {f : List α}, f ∈ tail✝.sections → Forall₂ (fun x x_1 => x ∈ x_1) f tail✝
f : List α
h : ∃ a, a ∈ tail✝.sections ∧ ∃ a_1, a_1 ∈ head✝ ∧ a_1 :: a = f
⊢ Forall₂ (fun x x_1 => x ∈ x_1) f (head✝ :: tail✝)

tactic: rcases h with ⟨_, _, _, _, rfl⟩
state_before: case refine_1.cons
α : Type u_1
β : Type u_2
head✝ : List α
tail✝ : List (List α)
tail_ih✝ : ∀ {f : List α}, f ∈ tail✝.sections → Forall₂ (fun x x_1 => x ∈ x_1) f tail✝
f : List α
h : ∃ a, a ∈ tail✝.sections ∧ ∃ a_1, a_1 ∈ head✝ ∧ a_1 :: a = f
⊢ Forall₂ (fun x x_1 => x ∈ x_1) f (head✝ :: tail✝)
state_after: case refine_1.cons.intro.intro.intro.intro
α : Type u_1
β : Type u_2
head✝ : List α
tail✝ : List (List α)
tail_ih✝ : ∀ {f : List α}, f ∈ tail✝.sections → Forall₂ (fun x x_1 => x ∈ x_1) f tail✝
w✝¹ : List α
left✝¹ : w✝¹ ∈ tail✝.sections
w✝ : α
left✝ : w✝ ∈ head✝
⊢ Forall₂ (fun x x_1 => x ∈ x_1) (w✝ :: w✝¹) (head✝ :: tail✝)

tactic: simp only [*, forall₂_cons, true_and_iff]
state_before: case refine_1.cons.intro.intro.intro.intro
α : Type u_1
β : Type u_2
head✝ : List α
tail✝ : List (List α)
tail_ih✝ : ∀ {f : List α}, f ∈ tail✝.sections → Forall₂ (fun x x_1 => x ∈ x_1) f tail✝
w✝¹ : List α
left✝¹ : w✝¹ ∈ tail✝.sections
w✝ : α
left✝ : w✝ ∈ head✝
⊢ Forall₂ (fun x x_1 => x ∈ x_1) (w✝ :: w✝¹) (head✝ :: tail✝)
state_after: no goals

tactic: cases mem_singleton.1 h
state_before: case refine_1.nil
α : Type u_1
β : Type u_2
f : List α
h : f ∈ [].sections
⊢ Forall₂ (fun x x_1 => x ∈ x_1) f []
state_after: case refine_1.nil.refl
α : Type u_1
β : Type u_2
h : [] ∈ [].sections
⊢ Forall₂ (fun x x_1 => x ∈ x_1) [] []

tactic: exact Forall₂.nil
state_before: case refine_1.nil.refl
α : Type u_1
β : Type u_2
h : [] ∈ [].sections
⊢ Forall₂ (fun x x_1 => x ∈ x_1) [] []
state_after: no goals

tactic: induction' h with a l f L al fL fs
state_before: case refine_2
α : Type u_1
β : Type u_2
L : List (List α)
f : List α
h : Forall₂ (fun x x_1 => x ∈ x_1) f L
⊢ f ∈ L.sections
state_after: case refine_2.nil
α : Type u_1
β : Type u_2
L : List (List α)
f : List α
⊢ [] ∈ [].sections

case refine_2.cons
α : Type u_1
β : Type u_2
L✝ : List (List α)
f✝ : List α
a : α
l f : List α
L : List (List α)
al : a ∈ l
fL : Forall₂ (fun x x_1 => x ∈ x_1) f L
fs : f ∈ L.sections
⊢ a :: f ∈ (l :: L).sections

tactic: simp only [sections, bind_eq_bind, mem_bind, mem_map]
state_before: case refine_2.cons
α : Type u_1
β : Type u_2
L✝ : List (List α)
f✝ : List α
a : α
l f : List α
L : List (List α)
al : a ∈ l
fL : Forall₂ (fun x x_1 => x ∈ x_1) f L
fs : f ∈ L.sections
⊢ a :: f ∈ (l :: L).sections
state_after: case refine_2.cons
α : Type u_1
β : Type u_2
L✝ : List (List α)
f✝ : List α
a : α
l f : List α
L : List (List α)
al : a ∈ l
fL : Forall₂ (fun x x_1 => x ∈ x_1) f L
fs : f ∈ L.sections
⊢ ∃ a_1, a_1 ∈ L.sections ∧ ∃ a_2, a_2 ∈ l ∧ a_2 :: a_1 = a :: f

tactic: exact ⟨f, fs, a, al, rfl⟩
state_before: case refine_2.cons
α : Type u_1
β : Type u_2
L✝ : List (List α)
f✝ : List α
a : α
l f : List α
L : List (List α)
al : a ∈ l
fL : Forall₂ (fun x x_1 => x ∈ x_1) f L
fs : f ∈ L.sections
⊢ ∃ a_1, a_1 ∈ L.sections ∧ ∃ a_2, a_2 ∈ l ∧ a_2 :: a_1 = a :: f
state_after: no goals

tactic: simp only [sections, mem_singleton]
state_before: case refine_2.nil
α : Type u_1
β : Type u_2
L : List (List α)
f : List α
⊢ [] ∈ [].sections
state_after: no goals