Theorem: List.zipWith_append
File: Mathlib/Data/List/Zip.lean

tactic: induction' l with hd tl hl generalizing l'
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.233932
ε : Type ?u.233935
f✝ : α → β → γ
l✝ : List α
l'✝ : List β
n : ℕ
f : α → β → γ
l la : List α
l' lb : List β
h : length l = length l'
⊢ zipWith f (l ++ la) (l' ++ lb) = zipWith f l l' ++ zipWith f la lb

tactic: have : l' = [] := eq_nil_of_length_eq_zero (by simpa using h.symm)
state_before: case nil
α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.233932
ε : Type ?u.233935
f✝ : α → β → γ
l✝ : List α
l'✝¹ : List β
n : ℕ
f : α → β → γ
l la : List α
l'✝ lb : List β
h✝ : length l = length l'✝
l' : List β
h : length [] = length l'
⊢ zipWith f ([] ++ la) (l' ++ lb) = zipWith f [] l' ++ zipWith f la lb

tactic: simp [this]
state_before: case nil
α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.233932
ε : Type ?u.233935
f✝ : α → β → γ
l✝ : List α
l'✝¹ : List β
n : ℕ
f : α → β → γ
l la : List α
l'✝ lb : List β
h✝ : length l = length l'✝
l' : List β
h : length [] = length l'
this : l' = []
⊢ zipWith f ([] ++ la) (l' ++ lb) = zipWith f [] l' ++ zipWith f la lb

tactic: simpa using h.symm
state_before: α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.233932
ε : Type ?u.233935
f✝ : α → β → γ
l✝ : List α
l'✝¹ : List β
n : ℕ
f : α → β → γ
l la : List α
l'✝ lb : List β
h✝ : length l = length l'✝
l' : List β
h : length [] = length l'
⊢ length l' = 0

tactic: cases l'
state_before: case cons
α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.233932
ε : Type ?u.233935
f✝ : α → β → γ
l✝ : List α
l'✝¹ : List β
n : ℕ
f : α → β → γ
l la : List α
l'✝ lb : List β
h✝ : length l = length l'✝
hd : α
tl : List α
hl : ∀ (l' : List β), length tl = length l' → zipWith f (tl ++ la) (l' ++ lb) = zipWith f tl l' ++ zipWith f la lb
l' : List β
h : length (hd :: tl) = length l'
⊢ zipWith f (hd :: tl ++ la) (l' ++ lb) = zipWith f (hd :: tl) l' ++ zipWith f la lb

tactic: simp at h
state_before: case cons.nil
α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.233932
ε : Type ?u.233935
f✝ : α → β → γ
l✝ : List α
l'✝ : List β
n : ℕ
f : α → β → γ
l la : List α
l' lb : List β
h✝ : length l = length l'
hd : α
tl : List α
hl : ∀ (l' : List β), length tl = length l' → zipWith f (tl ++ la) (l' ++ lb) = zipWith f tl l' ++ zipWith f la lb
h : length (hd :: tl) = length []
⊢ zipWith f (hd :: tl ++ la) ([] ++ lb) = zipWith f (hd :: tl) [] ++ zipWith f la lb

tactic: simp only [add_left_inj, length] at h
state_before: case cons.cons
α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.233932
ε : Type ?u.233935
f✝ : α → β → γ
l✝ : List α
l'✝ : List β
n : ℕ
f : α → β → γ
l la : List α
l' lb : List β
h✝ : length l = length l'
hd : α
tl : List α
hl : ∀ (l' : List β), length tl = length l' → zipWith f (tl ++ la) (l' ++ lb) = zipWith f tl l' ++ zipWith f la lb
head✝ : β
tail✝ : List β
h : length (hd :: tl) = length (head✝ :: tail✝)
⊢ zipWith f (hd :: tl ++ la) (head✝ :: tail✝ ++ lb) = zipWith f (hd :: tl) (head✝ :: tail✝) ++ zipWith f la lb

tactic: simp [hl _ h]
state_before: case cons.cons
α : Type u
β : Type u_1
γ : Type u_2
δ : Type ?u.233932
ε : Type ?u.233935
f✝ : α → β → γ
l✝ : List α
l'✝ : List β
n : ℕ
f : α → β → γ
l la : List α
l' lb : List β
h✝ : length l = length l'
hd : α
tl : List α
hl : ∀ (l' : List β), length tl = length l' → zipWith f (tl ++ la) (l' ++ lb) = zipWith f tl l' ++ zipWith f la lb
head✝ : β
tail✝ : List β
h : length tl = length tail✝
⊢ zipWith f (hd :: tl ++ la) (head✝ :: tail✝ ++ lb) = zipWith f (hd :: tl) (head✝ :: tail✝) ++ zipWith f la lb