Theorem: List.sizeOf_dedupKeys
File: Mathlib/Data/List/Sigma.lean

tactic: simp only [SizeOf.sizeOf, _sizeOf_1]
state_before: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
xs : List (Sigma β)
⊢ sizeOf xs.dedupKeys ≤ sizeOf xs
state_after: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
xs : List (Sigma β)
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs

tactic: induction' xs with x xs
state_before: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
xs : List (Sigma β)
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
state_after: case nil
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) [].dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) []

case cons
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : Sigma β
xs : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (x :: xs).dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (x :: xs)

tactic: simp [dedupKeys]
state_before: case nil
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) [].dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) []
state_after: no goals

tactic: simp only [dedupKeys_cons, kinsert_def, Nat.add_le_add_iff_left, Sigma.eta]
state_before: case cons
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : Sigma β
xs : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (x :: xs).dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (x :: xs)
state_after: case cons
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : Sigma β
xs : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x.fst xs.dedupKeys) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs

tactic: trans
state_before: case cons
α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : Sigma β
xs : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x.fst xs.dedupKeys) ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
state_after: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : Sigma β
xs : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x.fst xs.dedupKeys) ≤ ?m.126584

α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : Sigma β
xs : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
⊢ ?m.126584 ≤ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs

α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : Sigma β
xs : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
⊢ ℕ

tactic: apply sizeOf_kerase
state_before: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : Sigma β
xs : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
⊢ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) (kerase x.fst xs.dedupKeys) ≤ ?m.126584
state_after: no goals

tactic: assumption
state_before: α : Type u
β : α → Type v
l l₁ l₂ : List (Sigma β)
inst✝² inst✝¹ : DecidableEq α
inst✝ : SizeOf (Sigma β)
x : Sigma β
xs : List (Sigma β)
tail_ih✝ :
  rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs.dedupKeys ≤
    rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
⊢ sizeOf xs.dedupKeys ≤ rec 1 (fun head tail tail_ih => 1 + sizeOf head + tail_ih) xs
state_after: no goals