Theorem: List.dropSlice_eq_dropSliceTR
File: .lake/packages/batteries/Batteries/Data/List/Basic.lean

tactic: funext α n m l
state_before: ⊢ @dropSlice = @dropSliceTR
state_after: case h.h.h.h
α : Type u_1
n m : Nat
l : List α
⊢ dropSlice n m l = dropSliceTR n m l

tactic: simp [dropSliceTR]
state_before: case h.h.h.h
α : Type u_1
n m : Nat
l : List α
⊢ dropSlice n m l = dropSliceTR n m l
state_after: case h.h.h.h
α : Type u_1
n m : Nat
l : List α
⊢ dropSlice n m l =
    match m with
    | 0 => l
    | m.succ => dropSliceTR.go l m l n #[]

tactic: split
state_before: case h.h.h.h
α : Type u_1
n m : Nat
l : List α
⊢ dropSlice n m l =
    match m with
    | 0 => l
    | m.succ => dropSliceTR.go l m l n #[]
state_after: case h.h.h.h.h_1
α : Type u_1
n : Nat
l : List α
m✝ : Nat
⊢ dropSlice n 0 l = l

case h.h.h.h.h_2
α : Type u_1
n : Nat
l : List α
m✝¹ m✝ : Nat
⊢ dropSlice n m✝.succ l = dropSliceTR.go l m✝ l n #[]

tactic: { rw [dropSlice_zero₂] }
state_before: case h.h.h.h.h_1
α : Type u_1
n : Nat
l : List α
m✝ : Nat
⊢ dropSlice n 0 l = l

case h.h.h.h.h_2
α : Type u_1
n : Nat
l : List α
m✝¹ m✝ : Nat
⊢ dropSlice n m✝.succ l = dropSliceTR.go l m✝ l n #[]
state_after: case h.h.h.h.h_2
α : Type u_1
n : Nat
l : List α
m✝¹ m✝ : Nat
⊢ dropSlice n m✝.succ l = dropSliceTR.go l m✝ l n #[]

tactic: rename_i m
state_before: case h.h.h.h.h_2
α : Type u_1
n : Nat
l : List α
m✝¹ m✝ : Nat
⊢ dropSlice n m✝.succ l = dropSliceTR.go l m✝ l n #[]
state_after: case h.h.h.h.h_2
α : Type u_1
n : Nat
l : List α
m✝ m : Nat
⊢ dropSlice n m.succ l = dropSliceTR.go l m l n #[]

tactic: exact (go #[] _ _ rfl).symm
state_before: case h.h.h.h.h_2
α : Type u_1
n : Nat
l : List α
m✝ m : Nat
⊢ dropSlice n m.succ l = dropSliceTR.go l m l n #[]
state_after: no goals

tactic: rw [dropSlice_zero₂]
state_before: case h.h.h.h.h_1
α : Type u_1
n : Nat
l : List α
m✝ : Nat
⊢ dropSlice n 0 l = l
state_after: no goals

tactic: simp [dropSliceTR.go, dropSlice, h]
state_before: α : Type u_1
n : Nat
l : List α
m✝ m : Nat
acc : Array α
head✝ : α
xs : List α
h : l = acc.data ++ head✝ :: xs
⊢ dropSliceTR.go l m (head✝ :: xs) 0 acc = acc.data ++ dropSlice 0 (m + 1) (head✝ :: xs)
state_after: no goals

tactic: simp [dropSliceTR.go, dropSlice]
state_before: α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
⊢ l = acc.data ++ x :: xs → dropSliceTR.go l m (x :: xs) (n + 1) acc = acc.data ++ dropSlice (n + 1) (m + 1) (x :: xs)
state_after: α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
⊢ l = acc.data ++ x :: xs → dropSliceTR.go l m xs n (acc.push x) = acc.data ++ x :: dropSlice n (m + 1) xs

tactic: intro h
state_before: α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
⊢ l = acc.data ++ x :: xs → dropSliceTR.go l m xs n (acc.push x) = acc.data ++ x :: dropSlice n (m + 1) xs
state_after: α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
h : l = acc.data ++ x :: xs
⊢ dropSliceTR.go l m xs n (acc.push x) = acc.data ++ x :: dropSlice n (m + 1) xs

tactic: rw [go _ xs]
state_before: α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
h : l = acc.data ++ x :: xs
⊢ dropSliceTR.go l m xs n (acc.push x) = acc.data ++ x :: dropSlice n (m + 1) xs
state_after: α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
h : l = acc.data ++ x :: xs
⊢ (acc.push x).data ++ dropSlice n (m + 1) xs = acc.data ++ x :: dropSlice n (m + 1) xs

case a
α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
h : l = acc.data ++ x :: xs
⊢ l = (acc.push x).data ++ xs

tactic: {simp}
state_before: α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
h : l = acc.data ++ x :: xs
⊢ (acc.push x).data ++ dropSlice n (m + 1) xs = acc.data ++ x :: dropSlice n (m + 1) xs

case a
α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
h : l = acc.data ++ x :: xs
⊢ l = (acc.push x).data ++ xs
state_after: case a
α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
h : l = acc.data ++ x :: xs
⊢ l = (acc.push x).data ++ xs

tactic: simp [h]
state_before: case a
α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
h : l = acc.data ++ x :: xs
⊢ l = (acc.push x).data ++ xs
state_after: no goals

tactic: simp
state_before: α : Type u_1
n✝ : Nat
l : List α
m✝ m : Nat
acc : Array α
x : α
xs : List α
n : Nat
h : l = acc.data ++ x :: xs
⊢ (acc.push x).data ++ dropSlice n (m + 1) xs = acc.data ++ x :: dropSlice n (m + 1) xs
state_after: no goals