α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
x : Nat
xs : List Nat
⊢ evalList α ctx (sort.loop (insert x []) xs) = evalList α ctx (x :: sort.loop [] xs)
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
x : Nat
xs : List Nat
⊢ evalList α ctx (sort (x :: xs)) = evalList α ctx (x :: sort xs)
simp [sort, sort.loop]
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
x : Nat
xs ys : List Nat
⊢ evalList α ctx (sort.loop (insert x ys) xs) = evalList α ctx (x :: sort.loop ys xs)
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
x : Nat
xs : List Nat
⊢ evalList α ctx (sort.loop (insert x []) xs) = evalList α ctx (x :: sort.loop [] xs)
generalize [] = ys
no goals
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
x : Nat
xs ys : List Nat
⊢ evalList α ctx (sort.loop (insert x ys) xs) = evalList α ctx (x :: sort.loop ys xs)
induction xs generalizing x ys with
| nil => simp [sort.loop, evalList_insert ctx h]
| cons z zs ih =>
  rw [evalList_sort_loop_swap ctx h]; simp [sort.loop, ←ih]; apply evalList_sort_congr ctx h; rw [evalList_insert ctx h]
  cases h₂ : insert x ys with
  | nil => apply absurd h₂; simp [insert_nonEmpty]
  | cons u us =>
    cases h₃ : insert z ys with
    | nil => apply absurd h₃; simp [insert_nonEmpty]
    | cons v vs =>
      simp [evalList, ←h₂, ←h₃, evalList_insert ctx h]
      cases ys
      . simp [evalList, h.1, EvalInformation.evalOp]
      . simp [evalList, EvalInformation.evalOp]; rw [h.1, ctx.assoc.1, h.1 (evalList _ _ _)]
  all_goals simp [insert_nonEmpty]
no goals
case nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
x : Nat
ys : List Nat
⊢ evalList α ctx (sort.loop (insert x ys) []) = evalList α ctx (x :: sort.loop ys [])
simp [sort.loop, evalList_insert ctx h]
case cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ evalList α ctx (sort.loop (z :: insert x ys) zs) = evalList α ctx (x :: sort.loop ys (z :: zs))
case cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ evalList α ctx (sort.loop (insert x ys) (z :: zs)) = evalList α ctx (x :: sort.loop ys (z :: zs))
rw [evalList_sort_loop_swap ctx h]
case cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ evalList α ctx (sort.loop (z :: insert x ys) zs) = evalList α ctx (sort.loop (insert x (insert z ys)) zs)
case cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ evalList α ctx (sort.loop (z :: insert x ys) zs) = evalList α ctx (x :: sort.loop ys (z :: zs))
simp [sort.loop, ←ih]
case cons.h₂
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ evalList α ctx (z :: insert x ys) = evalList α ctx (insert x (insert z ys))

case cons.h₃
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ z :: insert x ys ≠ []

case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ insert x (insert z ys) ≠ []
case cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ evalList α ctx (sort.loop (z :: insert x ys) zs) = evalList α ctx (sort.loop (insert x (insert z ys)) zs)
apply evalList_sort_congr ctx h
case cons.h₂
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ evalList α ctx (z :: insert x ys) = evalList α ctx (x :: insert z ys)

case cons.h₃
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ z :: insert x ys ≠ []

case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ insert x (insert z ys) ≠ []
case cons.h₂
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ evalList α ctx (z :: insert x ys) = evalList α ctx (insert x (insert z ys))

case cons.h₃
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ z :: insert x ys ≠ []

case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ insert x (insert z ys) ≠ []
rw [evalList_insert ctx h]
case cons.h₃
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ z :: insert x ys ≠ []

case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ insert x (insert z ys) ≠ []
case cons.h₂
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ evalList α ctx (z :: insert x ys) = evalList α ctx (x :: insert z ys)

case cons.h₃
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ z :: insert x ys ≠ []

case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ insert x (insert z ys) ≠ []
cases h₂ : insert x ys with
| nil => apply absurd h₂; simp [insert_nonEmpty]
| cons u us =>
  cases h₃ : insert z ys with
  | nil => apply absurd h₃; simp [insert_nonEmpty]
  | cons v vs =>
    simp [evalList, ←h₂, ←h₃, evalList_insert ctx h]
    cases ys
    . simp [evalList, h.1, EvalInformation.evalOp]
    . simp [evalList, EvalInformation.evalOp]; rw [h.1, ctx.assoc.1, h.1 (evalList _ _ _)]
no goals
case cons.h₃
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ z :: insert x ys ≠ []

case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ insert x (insert z ys) ≠ []
all_goals simp [insert_nonEmpty]
case cons.h₂.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
h₂ : insert x ys = []
⊢ ¬insert x ys = []
case cons.h₂.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
h₂ : insert x ys = []
⊢ evalList α ctx [z] = evalList α ctx (x :: insert z ys)
apply absurd h₂
no goals
case cons.h₂.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
h₂ : insert x ys = []
⊢ ¬insert x ys = []
simp [insert_nonEmpty]
no goals
case cons.h₂.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
u : Nat
us : List Nat
h₂ : insert x ys = u :: us
⊢ evalList α ctx (z :: u :: us) = evalList α ctx (x :: insert z ys)
cases h₃ : insert z ys with
| nil => apply absurd h₃; simp [insert_nonEmpty]
| cons v vs =>
  simp [evalList, ←h₂, ←h₃, evalList_insert ctx h]
  cases ys
  . simp [evalList, h.1, EvalInformation.evalOp]
  . simp [evalList, EvalInformation.evalOp]; rw [h.1, ctx.assoc.1, h.1 (evalList _ _ _)]
case cons.h₂.cons.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
u : Nat
us : List Nat
h₂ : insert x ys = u :: us
h₃ : insert z ys = []
⊢ ¬insert z ys = []
case cons.h₂.cons.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
u : Nat
us : List Nat
h₂ : insert x ys = u :: us
h₃ : insert z ys = []
⊢ evalList α ctx (z :: u :: us) = evalList α ctx [x]
apply absurd h₃
no goals
case cons.h₂.cons.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
u : Nat
us : List Nat
h₂ : insert x ys = u :: us
h₃ : insert z ys = []
⊢ ¬insert z ys = []
simp [insert_nonEmpty]
case cons.h₂.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
u : Nat
us : List Nat
h₂ : insert x ys = u :: us
v : Nat
vs : List Nat
h₃ : insert z ys = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx (x :: ys)) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx (z :: ys))
case cons.h₂.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
u : Nat
us : List Nat
h₂ : insert x ys = u :: us
v : Nat
vs : List Nat
h₃ : insert z ys = v :: vs
⊢ evalList α ctx (z :: u :: us) = evalList α ctx (x :: v :: vs)
simp [evalList, ←h₂, ←h₃, evalList_insert ctx h]
case cons.h₂.cons.cons.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
h₂ : insert x [] = u :: us
h₃ : insert z [] = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx [x]) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx [z])

case cons.h₂.cons.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
head✝ : Nat
tail✝ : List Nat
h₂ : insert x (head✝ :: tail✝) = u :: us
h₃ : insert z (head✝ :: tail✝) = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx (x :: head✝ :: tail✝)) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx (z :: head✝ :: tail✝))
case cons.h₂.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
u : Nat
us : List Nat
h₂ : insert x ys = u :: us
v : Nat
vs : List Nat
h₃ : insert z ys = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx (x :: ys)) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx (z :: ys))
cases ys
case cons.h₂.cons.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
head✝ : Nat
tail✝ : List Nat
h₂ : insert x (head✝ :: tail✝) = u :: us
h₃ : insert z (head✝ :: tail✝) = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx (x :: head✝ :: tail✝)) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx (z :: head✝ :: tail✝))
case cons.h₂.cons.cons.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
h₂ : insert x [] = u :: us
h₃ : insert z [] = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx [x]) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx [z])

case cons.h₂.cons.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
head✝ : Nat
tail✝ : List Nat
h₂ : insert x (head✝ :: tail✝) = u :: us
h₃ : insert z (head✝ :: tail✝) = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx (x :: head✝ :: tail✝)) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx (z :: head✝ :: tail✝))
. simp [evalList, h.1, EvalInformation.evalOp]
no goals
case cons.h₂.cons.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
head✝ : Nat
tail✝ : List Nat
h₂ : insert x (head✝ :: tail✝) = u :: us
h₃ : insert z (head✝ :: tail✝) = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx (x :: head✝ :: tail✝)) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx (z :: head✝ :: tail✝))
. simp [evalList, EvalInformation.evalOp]; rw [h.1, ctx.assoc.1, h.1 (evalList _ _ _)]
no goals
case cons.h₂.cons.cons.nil
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
h₂ : insert x [] = u :: us
h₃ : insert z [] = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx [x]) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx [z])
simp [evalList, h.1, EvalInformation.evalOp]
case cons.h₂.cons.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
head✝ : Nat
tail✝ : List Nat
h₂ : insert x (head✝ :: tail✝) = u :: us
h₃ : insert z (head✝ :: tail✝) = v :: vs
⊢ op ctx (EvalInformation.evalVar ctx z) (op ctx (EvalInformation.evalVar ctx x) (evalList α ctx (head✝ :: tail✝))) =
    op ctx (EvalInformation.evalVar ctx x) (op ctx (EvalInformation.evalVar ctx z) (evalList α ctx (head✝ :: tail✝)))
case cons.h₂.cons.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
head✝ : Nat
tail✝ : List Nat
h₂ : insert x (head✝ :: tail✝) = u :: us
h₃ : insert z (head✝ :: tail✝) = v :: vs
⊢ EvalInformation.evalOp ctx (EvalInformation.evalVar ctx z) (evalList α ctx (x :: head✝ :: tail✝)) =
    EvalInformation.evalOp ctx (EvalInformation.evalVar ctx x) (evalList α ctx (z :: head✝ :: tail✝))
simp [evalList, EvalInformation.evalOp]
no goals
case cons.h₂.cons.cons.cons
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x u : Nat
us : List Nat
v : Nat
vs : List Nat
head✝ : Nat
tail✝ : List Nat
h₂ : insert x (head✝ :: tail✝) = u :: us
h₃ : insert z (head✝ :: tail✝) = v :: vs
⊢ op ctx (EvalInformation.evalVar ctx z) (op ctx (EvalInformation.evalVar ctx x) (evalList α ctx (head✝ :: tail✝))) =
    op ctx (EvalInformation.evalVar ctx x) (op ctx (EvalInformation.evalVar ctx z) (evalList α ctx (head✝ :: tail✝)))
rw [h.1, ctx.assoc.1, h.1 (evalList _ _ _)]
no goals
case cons.h₄
α : Sort u_1
ctx : Context α
h : IsCommutative ctx.op
z : Nat
zs : List Nat
ih : ∀ (x : Nat) (ys : List Nat), evalList α ctx (sort.loop (insert x ys) zs) = evalList α ctx (x :: sort.loop ys zs)
x : Nat
ys : List Nat
⊢ insert x (insert z ys) ≠ []
simp [insert_nonEmpty]