Theorem: Lean.Data.AC.Context.evalList_sort_congr
File: src/lean/Init/Data/AC.lean

tactic: induction c generalizing a b with
| nil => simp [sort.loop, h₂]
| cons c _  ih =>
  simp [sort.loop]; apply ih; simp [evalList_insert ctx h, evalList]
  cases a with
  | nil => apply absurd h₃; simp
  | cons a as =>
    cases b with
    | nil => apply absurd h₄; simp
    | cons b bs => simp [evalList, h₂]
  all_goals apply insert_nonEmpty
state_before: α : Sort u_1
a b c : List Nat
ctx : Context α
h : IsCommutative ctx.op
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ evalList α ctx (sort.loop a c) = evalList α ctx (sort.loop b c)

tactic: simp [sort.loop, h₂]
state_before: case nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ evalList α ctx (sort.loop a []) = evalList α ctx (sort.loop b [])

tactic: simp [sort.loop]
state_before: case cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ evalList α ctx (sort.loop a (c :: tail✝)) = evalList α ctx (sort.loop b (c :: tail✝))

tactic: apply ih
state_before: case cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ evalList α ctx (sort.loop (insert c a) tail✝) = evalList α ctx (sort.loop (insert c b) tail✝)

tactic: simp [evalList_insert ctx h, evalList]
state_before: case cons.h₂
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ evalList α ctx (insert c a) = evalList α ctx (insert c b)

case cons.h₃
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ insert c a ≠ []

case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ insert c b ≠ []

tactic: cases a with
| nil => apply absurd h₃; simp
| cons a as =>
  cases b with
  | nil => apply absurd h₄; simp
  | cons b bs => simp [evalList, h₂]
state_before: case cons.h₂
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ evalList α ctx (c :: a) = evalList α ctx (c :: b)

case cons.h₃
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ insert c a ≠ []

case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ insert c b ≠ []

tactic: all_goals apply insert_nonEmpty
state_before: case cons.h₃
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ insert c a ≠ []

case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ insert c b ≠ []

tactic: apply absurd h₃
state_before: case cons.h₂.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
b : List Nat
h₄ : b ≠ []
h₂ : evalList α ctx [] = evalList α ctx b
h₃ : [] ≠ []
⊢ evalList α ctx [c] = evalList α ctx (c :: b)

tactic: simp
state_before: case cons.h₂.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
b : List Nat
h₄ : b ≠ []
h₂ : evalList α ctx [] = evalList α ctx b
h₃ : [] ≠ []
⊢ ¬[] ≠ []

tactic: cases b with
| nil => apply absurd h₄; simp
| cons b bs => simp [evalList, h₂]
state_before: case cons.h₂.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
b : List Nat
h₄ : b ≠ []
a : Nat
as : List Nat
h₂ : evalList α ctx (a :: as) = evalList α ctx b
h₃ : a :: as ≠ []
⊢ evalList α ctx (c :: a :: as) = evalList α ctx (c :: b)

tactic: apply absurd h₄
state_before: case cons.h₂.cons.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a : Nat
as : List Nat
h₃ : a :: as ≠ []
h₄ : [] ≠ []
h₂ : evalList α ctx (a :: as) = evalList α ctx []
⊢ evalList α ctx (c :: a :: as) = evalList α ctx [c]

tactic: simp
state_before: case cons.h₂.cons.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a : Nat
as : List Nat
h₃ : a :: as ≠ []
h₄ : [] ≠ []
h₂ : evalList α ctx (a :: as) = evalList α ctx []
⊢ ¬[] ≠ []

tactic: simp [evalList, h₂]
state_before: case cons.h₂.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a : Nat
as : List Nat
h₃ : a :: as ≠ []
b : Nat
bs : List Nat
h₄ : b :: bs ≠ []
h₂ : evalList α ctx (a :: as) = evalList α ctx (b :: bs)
⊢ evalList α ctx (c :: a :: as) = evalList α ctx (c :: b :: bs)

tactic: apply insert_nonEmpty
state_before: case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
c : Nat
tail✝ : List Nat
ih :
  ∀ {a b : List Nat},
    evalList α ctx a = evalList α ctx b →
      a ≠ [] → b ≠ [] → evalList α ctx (sort.loop a tail✝) = evalList α ctx (sort.loop b tail✝)
a b : List Nat
h₂ : evalList α ctx a = evalList α ctx b
h₃ : a ≠ []
h₄ : b ≠ []
⊢ insert c b ≠ []