Theorem: List.sublist_eq_map_get
File: .lake/packages/batteries/Batteries/Data/List/Pairwise.lean

tactic: exact ⟨[], by simp⟩
state_before: case slnil
α✝ : Type u_1
l' l : List α✝
⊢ ∃ is, [] = map [].get is ∧ Pairwise (fun x x_1 => x < x_1) is
state_after: no goals

tactic: simp
state_before: α✝ : Type u_1
l' l : List α✝
⊢ [] = map [].get [] ∧ Pairwise (fun x x_1 => x < x_1) []
state_after: no goals

tactic: let ⟨is, IH⟩ := IH
state_before: case cons
α✝ : Type u_1
l' l l₁✝ l₂✝ : List α✝
a✝¹ : α✝
a✝ : l₁✝ <+ l₂✝
IH : ∃ is, l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
⊢ ∃ is, l₁✝ = map (a✝¹ :: l₂✝).get is ∧ Pairwise (fun x x_1 => x < x_1) is
state_after: case cons
α✝ : Type u_1
l' l l₁✝ l₂✝ : List α✝
a✝¹ : α✝
a✝ : l₁✝ <+ l₂✝
IH✝ : ∃ is, l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
is : List (Fin l₂✝.length)
IH : l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
⊢ ∃ is, l₁✝ = map (a✝¹ :: l₂✝).get is ∧ Pairwise (fun x x_1 => x < x_1) is

tactic: simp [comp, pairwise_map]
state_before: case cons
α✝ : Type u_1
l' l l₁✝ l₂✝ : List α✝
a✝¹ : α✝
a✝ : l₁✝ <+ l₂✝
IH✝ : ∃ is, l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
is : List (Fin l₂✝.length)
IH : l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
⊢ l₁✝ = map (a✝¹ :: l₂✝).get (map (fun x => x.succ) is) ∧ Pairwise (fun x x_1 => x < x_1) (map (fun x => x.succ) is)
state_after: case cons
α✝ : Type u_1
l' l l₁✝ l₂✝ : List α✝
a✝¹ : α✝
a✝ : l₁✝ <+ l₂✝
IH✝ : ∃ is, l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
is : List (Fin l₂✝.length)
IH : l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
⊢ l₁✝ = map ((a✝¹ :: l₂✝).get ∘ fun x => x.succ) is ∧ Pairwise (fun a b => a < b) is

tactic: exact IH
state_before: case cons
α✝ : Type u_1
l' l l₁✝ l₂✝ : List α✝
a✝¹ : α✝
a✝ : l₁✝ <+ l₂✝
IH✝ : ∃ is, l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
is : List (Fin l₂✝.length)
IH : l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
⊢ l₁✝ = map ((a✝¹ :: l₂✝).get ∘ fun x => x.succ) is ∧ Pairwise (fun a b => a < b) is
state_after: no goals

tactic: rcases IH with ⟨is,IH⟩
state_before: case cons₂
α✝ : Type u_1
l' l l₁✝ l₂✝ : List α✝
a✝¹ : α✝
a✝ : l₁✝ <+ l₂✝
IH : ∃ is, l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
⊢ ∃ is, a✝¹ :: l₁✝ = map (a✝¹ :: l₂✝).get is ∧ Pairwise (fun x x_1 => x < x_1) is
state_after: case cons₂.intro
α✝ : Type u_1
l' l l₁✝ l₂✝ : List α✝
a✝¹ : α✝
a✝ : l₁✝ <+ l₂✝
is : List (Fin l₂✝.length)
IH : l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
⊢ ∃ is, a✝¹ :: l₁✝ = map (a✝¹ :: l₂✝).get is ∧ Pairwise (fun x x_1 => x < x_1) is

tactic: simp [comp_def, pairwise_map, IH, ← get_eq_getElem]
state_before: case cons₂.intro
α✝ : Type u_1
l' l l₁✝ l₂✝ : List α✝
a✝¹ : α✝
a✝ : l₁✝ <+ l₂✝
is : List (Fin l₂✝.length)
IH : l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
⊢ a✝¹ :: l₁✝ = map (a✝¹ :: l₂✝).get (⟨0, ⋯⟩ :: map (fun x => x.succ) is) ∧
    Pairwise (fun x x_1 => x < x_1) (⟨0, ⋯⟩ :: map (fun x => x.succ) is)
state_after: no goals

tactic: simp [Nat.zero_lt_succ]
state_before: α✝ : Type u_1
l' l l₁✝ l₂✝ : List α✝
a✝¹ : α✝
a✝ : l₁✝ <+ l₂✝
is : List (Fin l₂✝.length)
IH : l₁✝ = map l₂✝.get is ∧ Pairwise (fun x x_1 => x < x_1) is
⊢ 0 < (a✝¹ :: l₂✝).length
state_after: no goals