Theorem: List.Sublist.trans
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: induction h₂ generalizing l₁ with
| slnil => exact h₁
| cons _ _ IH => exact (IH h₁).cons _
| @cons₂ l₂ _ a _ IH =>
  generalize e : a :: l₂ = l₂'
  match e ▸ h₁ with
  | .slnil => apply nil_sublist
  | .cons a' h₁' => cases e; apply (IH h₁').cons
  | .cons₂ a' h₁' => cases e; apply (IH h₁').cons₂
state_before: α : Type u_1
l₁ l₂ l₃ : List α
h₁ : l₁ <+ l₂
h₂ : l₂ <+ l₃
⊢ l₁ <+ l₃
state_after: no goals

tactic: exact h₁
state_before: case slnil
α : Type u_1
l₂ l₃ l₁ : List α
h₁ : l₁ <+ []
⊢ l₁ <+ []
state_after: no goals

tactic: exact (IH h₁).cons _
state_before: case cons
α : Type u_1
l₂ l₃ l₁✝ l₂✝ : List α
a✝¹ : α
a✝ : l₁✝ <+ l₂✝
IH : ∀ {l₁ : List α}, l₁ <+ l₁✝ → l₁ <+ l₂✝
l₁ : List α
h₁ : l₁ <+ l₁✝
⊢ l₁ <+ a✝¹ :: l₂✝
state_after: no goals

tactic: generalize e : a :: l₂ = l₂'
state_before: case cons₂
α : Type u_1
l₂✝¹ l₃ l₂ l₂✝ : List α
a : α
a✝ : l₂ <+ l₂✝
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝
l₁ : List α
h₁ : l₁ <+ a :: l₂
⊢ l₁ <+ a :: l₂✝
state_after: case cons₂
α : Type u_1
l₂✝¹ l₃ l₂ l₂✝ : List α
a : α
a✝ : l₂ <+ l₂✝
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝
l₁ : List α
h₁ : l₁ <+ a :: l₂
l₂' : List α
e : a :: l₂ = l₂'
⊢ l₁ <+ a :: l₂✝

tactic: match e ▸ h₁ with
| .slnil => apply nil_sublist
| .cons a' h₁' => cases e; apply (IH h₁').cons
| .cons₂ a' h₁' => cases e; apply (IH h₁').cons₂
state_before: case cons₂
α : Type u_1
l₂✝¹ l₃ l₂ l₂✝ : List α
a : α
a✝ : l₂ <+ l₂✝
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝
l₁ : List α
h₁ : l₁ <+ a :: l₂
l₂' : List α
e : a :: l₂ = l₂'
⊢ l₁ <+ a :: l₂✝
state_after: no goals

tactic: apply nil_sublist
state_before: α : Type u_1
l₂✝¹ l₃ l₂ l₂✝ : List α
a : α
a✝ : l₂ <+ l₂✝
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝
h₁ : [] <+ a :: l₂
e : a :: l₂ = []
⊢ [] <+ a :: l₂✝
state_after: no goals

tactic: cases e
state_before: α : Type u_1
l₂✝² l₃ l₂ l₂✝¹ : List α
a : α
a✝ : l₂ <+ l₂✝¹
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝¹
l₁ l₂✝ : List α
a' : α
h₁' : l₁ <+ l₂✝
h₁ : l₁ <+ a :: l₂
e : a :: l₂ = a' :: l₂✝
⊢ l₁ <+ a :: l₂✝¹
state_after: case refl
α : Type u_1
l₂✝¹ l₃ l₂ l₂✝ : List α
a : α
a✝ : l₂ <+ l₂✝
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝
l₁ : List α
h₁ : l₁ <+ a :: l₂
h₁' : l₁ <+ l₂
⊢ l₁ <+ a :: l₂✝

tactic: apply (IH h₁').cons
state_before: case refl
α : Type u_1
l₂✝¹ l₃ l₂ l₂✝ : List α
a : α
a✝ : l₂ <+ l₂✝
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝
l₁ : List α
h₁ : l₁ <+ a :: l₂
h₁' : l₁ <+ l₂
⊢ l₁ <+ a :: l₂✝
state_after: no goals

tactic: cases e
state_before: α : Type u_1
l₂✝² l₃ l₂ l₂✝¹ : List α
a : α
a✝ : l₂ <+ l₂✝¹
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝¹
l₁✝ l₂✝ : List α
a' : α
h₁' : l₁✝ <+ l₂✝
h₁ : a' :: l₁✝ <+ a :: l₂
e : a :: l₂ = a' :: l₂✝
⊢ a' :: l₁✝ <+ a :: l₂✝¹
state_after: case refl
α : Type u_1
l₂✝¹ l₃ l₂ l₂✝ : List α
a : α
a✝ : l₂ <+ l₂✝
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝
l₁✝ : List α
h₁ : a :: l₁✝ <+ a :: l₂
h₁' : l₁✝ <+ l₂
⊢ a :: l₁✝ <+ a :: l₂✝

tactic: apply (IH h₁').cons₂
state_before: case refl
α : Type u_1
l₂✝¹ l₃ l₂ l₂✝ : List α
a : α
a✝ : l₂ <+ l₂✝
IH : ∀ {l₁ : List α}, l₁ <+ l₂ → l₁ <+ l₂✝
l₁✝ : List α
h₁ : a :: l₁✝ <+ a :: l₂
h₁' : l₁✝ <+ l₂
⊢ a :: l₁✝ <+ a :: l₂✝
state_after: no goals