Theorem: List.sizeOf_dropSlice_lt
File: Mathlib/Data/List/Basic.lean

tactic: cases hi
state_before: case nil
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
i j : ℕ
hj : 0 < j
hi : i < [].length
⊢ sizeOf (dropSlice i j []) < sizeOf []
state_after: no goals

tactic: cases i <;> simp only [List.dropSlice]
state_before: case cons
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
i j : ℕ
hj : 0 < j
hi : i < (x :: xs).length
⊢ sizeOf (dropSlice i j (x :: xs)) < sizeOf (x :: xs)
state_after: case cons.zero
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
j : ℕ
hj : 0 < j
hi : 0 < (x :: xs).length
⊢ sizeOf (drop j (x :: xs)) < sizeOf (x :: xs)

case cons.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
j : ℕ
hj : 0 < j
n✝ : ℕ
hi : n✝ + 1 < (x :: xs).length
⊢ sizeOf (x :: dropSlice n✝ j xs) < sizeOf (x :: xs)

tactic: cases j with
| zero => contradiction
| succ n =>
  dsimp only [drop]; apply lt_of_le_of_lt (drop_sizeOf_le xs n)
  simp only [cons.sizeOf_spec]; omega
state_before: case cons.zero
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
j : ℕ
hj : 0 < j
hi : 0 < (x :: xs).length
⊢ sizeOf (drop j (x :: xs)) < sizeOf (x :: xs)
state_after: no goals

tactic: contradiction
state_before: case cons.zero.zero
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
hi : 0 < (x :: xs).length
hj : 0 < 0
⊢ sizeOf (drop 0 (x :: xs)) < sizeOf (x :: xs)
state_after: no goals

tactic: dsimp only [drop]
state_before: case cons.zero.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
hi : 0 < (x :: xs).length
n : ℕ
hj : 0 < n + 1
⊢ sizeOf (drop (n + 1) (x :: xs)) < sizeOf (x :: xs)
state_after: case cons.zero.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
hi : 0 < (x :: xs).length
n : ℕ
hj : 0 < n + 1
⊢ sizeOf (drop n xs) < sizeOf (x :: xs)

tactic: apply lt_of_le_of_lt (drop_sizeOf_le xs n)
state_before: case cons.zero.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
hi : 0 < (x :: xs).length
n : ℕ
hj : 0 < n + 1
⊢ sizeOf (drop n xs) < sizeOf (x :: xs)
state_after: case cons.zero.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
hi : 0 < (x :: xs).length
n : ℕ
hj : 0 < n + 1
⊢ sizeOf xs < sizeOf (x :: xs)

tactic: simp only [cons.sizeOf_spec]
state_before: case cons.zero.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
hi : 0 < (x :: xs).length
n : ℕ
hj : 0 < n + 1
⊢ sizeOf xs < sizeOf (x :: xs)
state_after: case cons.zero.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
hi : 0 < (x :: xs).length
n : ℕ
hj : 0 < n + 1
⊢ sizeOf xs < 1 + sizeOf x + sizeOf xs

tactic: omega
state_before: case cons.zero.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
hi : 0 < (x :: xs).length
n : ℕ
hj : 0 < n + 1
⊢ sizeOf xs < 1 + sizeOf x + sizeOf xs
state_after: no goals

tactic: simp only [cons.sizeOf_spec, Nat.add_lt_add_iff_left]
state_before: case cons.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
j : ℕ
hj : 0 < j
n✝ : ℕ
hi : n✝ + 1 < (x :: xs).length
⊢ sizeOf (x :: dropSlice n✝ j xs) < sizeOf (x :: xs)
state_after: case cons.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
j : ℕ
hj : 0 < j
n✝ : ℕ
hi : n✝ + 1 < (x :: xs).length
⊢ sizeOf (dropSlice n✝ j xs) < sizeOf xs

tactic: apply xs_ih _ j hj
state_before: case cons.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
j : ℕ
hj : 0 < j
n✝ : ℕ
hi : n✝ + 1 < (x :: xs).length
⊢ sizeOf (dropSlice n✝ j xs) < sizeOf xs
state_after: case cons.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
j : ℕ
hj : 0 < j
n✝ : ℕ
hi : n✝ + 1 < (x :: xs).length
⊢ n✝ < xs.length

tactic: apply lt_of_succ_lt_succ hi
state_before: case cons.succ
ι : Type u_1
α : Type u
β : Type v
γ : Type w
l₁ l₂ : List α
inst✝ : SizeOf α
x : α
xs : List α
xs_ih : ∀ (i j : ℕ), 0 < j → i < xs.length → sizeOf (dropSlice i j xs) < sizeOf xs
j : ℕ
hj : 0 < j
n✝ : ℕ
hi : n✝ + 1 < (x :: xs).length
⊢ n✝ < xs.length
state_after: no goals