case cons
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝¹ (Cont.cons₁ a✝ v (Cont.then k k')) v = Cfg.then (stepNormal a✝¹ (Cont.cons₁ a✝ v k) v) k'

case comp
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.comp a✝¹ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.comp a✝¹ k) v) k'

case case
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ Nat.rec (Cfg.then (stepNormal a✝¹ k (List.tail v)) k') (fun y x => Cfg.then (stepNormal a✝ k (y :: List.tail v)) k')
      (List.headI v) =
    Cfg.then (Nat.rec (stepNormal a✝¹ k (List.tail v)) (fun y x => stepNormal a✝ k (y :: List.tail v)) (List.headI v))
      k'

case fix
k' : Cont
a✝ : Code
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.fix a✝ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.fix a✝ k) v) k'
c : Code
k k' : Cont
v : List ℕ
⊢ stepNormal c (Cont.then k k') v = Cfg.then (stepNormal c k v) k'
induction c generalizing k v <;> simp only [Cont.then, stepNormal, *] <;>
  try { simp only [Cfg.then]; done }
case comp
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.comp a✝¹ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.comp a✝¹ k) v) k'

case case
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ Nat.rec (Cfg.then (stepNormal a✝¹ k (List.tail v)) k') (fun y x => Cfg.then (stepNormal a✝ k (y :: List.tail v)) k')
      (List.headI v) =
    Cfg.then (Nat.rec (stepNormal a✝¹ k (List.tail v)) (fun y x => stepNormal a✝ k (y :: List.tail v)) (List.headI v))
      k'

case fix
k' : Cont
a✝ : Code
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.fix a✝ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.fix a✝ k) v) k'
case cons
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝¹ (Cont.cons₁ a✝ v (Cont.then k k')) v = Cfg.then (stepNormal a✝¹ (Cont.cons₁ a✝ v k) v) k'

case comp
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.comp a✝¹ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.comp a✝¹ k) v) k'

case case
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ Nat.rec (Cfg.then (stepNormal a✝¹ k (List.tail v)) k') (fun y x => Cfg.then (stepNormal a✝ k (y :: List.tail v)) k')
      (List.headI v) =
    Cfg.then (Nat.rec (stepNormal a✝¹ k (List.tail v)) (fun y x => stepNormal a✝ k (y :: List.tail v)) (List.headI v))
      k'

case fix
k' : Cont
a✝ : Code
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.fix a✝ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.fix a✝ k) v) k'
case cons c c' ih _ => rw [← ih, Cont.then]
case case
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ Nat.rec (Cfg.then (stepNormal a✝¹ k (List.tail v)) k') (fun y x => Cfg.then (stepNormal a✝ k (y :: List.tail v)) k')
      (List.headI v) =
    Cfg.then (Nat.rec (stepNormal a✝¹ k (List.tail v)) (fun y x => stepNormal a✝ k (y :: List.tail v)) (List.headI v))
      k'

case fix
k' : Cont
a✝ : Code
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.fix a✝ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.fix a✝ k) v) k'
case comp
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.comp a✝¹ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.comp a✝¹ k) v) k'

case case
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ Nat.rec (Cfg.then (stepNormal a✝¹ k (List.tail v)) k') (fun y x => Cfg.then (stepNormal a✝ k (y :: List.tail v)) k')
      (List.headI v) =
    Cfg.then (Nat.rec (stepNormal a✝¹ k (List.tail v)) (fun y x => stepNormal a✝ k (y :: List.tail v)) (List.headI v))
      k'

case fix
k' : Cont
a✝ : Code
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.fix a✝ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.fix a✝ k) v) k'
case comp c c' _ ih' => rw [← ih', Cont.then]
no goals
case fix
k' : Cont
a✝ : Code
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ stepNormal a✝ (Cont.fix a✝ (Cont.then k k')) v = Cfg.then (stepNormal a✝ (Cont.fix a✝ k) v) k'
case fix c ih => rw [← ih, Cont.then]
no goals
k' : Cont
c c' : Code
ih : ∀ (k : Cont) (v : List ℕ), stepNormal c (Cont.then k k') v = Cfg.then (stepNormal c k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal c' (Cont.then k k') v = Cfg.then (stepNormal c' k v) k'
k : Cont
v : List ℕ
⊢ stepNormal c (Cont.cons₁ c' v (Cont.then k k')) v = Cfg.then (stepNormal c (Cont.cons₁ c' v k) v) k'
rw [← ih, Cont.then]
no goals
k' : Cont
c c' : Code
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal c (Cont.then k k') v = Cfg.then (stepNormal c k v) k'
ih' : ∀ (k : Cont) (v : List ℕ), stepNormal c' (Cont.then k k') v = Cfg.then (stepNormal c' k v) k'
k : Cont
v : List ℕ
⊢ stepNormal c' (Cont.comp c (Cont.then k k')) v = Cfg.then (stepNormal c' (Cont.comp c k) v) k'
rw [← ih', Cont.then]
no goals
case case
k' : Cont
a✝¹ a✝ : Code
a_ih✝¹ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝¹ (Cont.then k k') v = Cfg.then (stepNormal a✝¹ k v) k'
a_ih✝ : ∀ (k : Cont) (v : List ℕ), stepNormal a✝ (Cont.then k k') v = Cfg.then (stepNormal a✝ k v) k'
k : Cont
v : List ℕ
⊢ Nat.rec (Cfg.then (stepNormal a✝¹ k (List.tail v)) k') (fun y x => Cfg.then (stepNormal a✝ k (y :: List.tail v)) k')
      (List.headI v) =
    Cfg.then (Nat.rec (stepNormal a✝¹ k (List.tail v)) (fun y x => stepNormal a✝ k (y :: List.tail v)) (List.headI v))
      k'
cases v.headI <;> simp only [Nat.rec]
no goals
k' : Cont
c : Code
ih : ∀ (k : Cont) (v : List ℕ), stepNormal c (Cont.then k k') v = Cfg.then (stepNormal c k v) k'
k : Cont
v : List ℕ
⊢ stepNormal c (Cont.fix c (Cont.then k k')) v = Cfg.then (stepNormal c (Cont.fix c k) v) k'
rw [← ih, Cont.then]