ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
-- Turing.ToPartrec.stepRet_eval
theorem stepRet_eval {k v} : eval step (stepRet k v) = Cfg.halt <$> k.eval v 
Arguments: {k : Turing.ToPartrec.Cont} {v : List ℕ}
Goal: Turing.eval Turing.ToPartrec.step (Turing.ToPartrec.stepRet k v) = Turing.ToPartrec.Cfg.halt <$> k.eval v
-- Turing.PartrecToTM2.tr_move
theorem tr_move (p k₁ k₂ q) : tr (Λ'.move p k₁ k₂ q) =
    pop' k₁ (branch (fun s => s.elim true p) (goto fun _ => q)
      (push' k₂ <| goto fun _ => Λ'.move p k₁ k₂ q)) 
Arguments: (p : Turing.PartrecToTM2.Γ' → Bool) (k₁ k₂ : Turing.PartrecToTM2.K') (q : Turing.PartrecToTM2.Λ')
Goal: Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.move p k₁ k₂ q) =
  Turing.PartrecToTM2.pop' k₁
    (Turing.TM2.Stmt.branch (fun s => s.elim true p) (Turing.TM2.Stmt.goto fun x => q)
      (Turing.PartrecToTM2.push' k₂ (Turing.TM2.Stmt.goto fun x => Turing.PartrecToTM2.Λ'.move p k₁ k₂ q)))
-- Turing.PartrecToTM2.tr_push
theorem tr_push (k f q) : tr (Λ'.push k f q) = branch (fun s => (f s).isSome)
    ((push k fun s => (f s).iget) <| goto fun _ => q) (goto fun _ => q) 
Arguments: (k : Turing.PartrecToTM2.K') (f : Option Turing.PartrecToTM2.Γ' → Option Turing.PartrecToTM2.Γ') (q : Turing.PartrecToTM2.Λ')
Goal: Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.push k f q) =
  Turing.TM2.Stmt.branch (fun s => (f s).isSome)
    (Turing.TM2.Stmt.push k (fun s => (f s).iget) (Turing.TM2.Stmt.goto fun x => q)) (Turing.TM2.Stmt.goto fun x => q)
-- Turing.PartrecToTM2.tr_read
theorem tr_read (q) : tr (Λ'.read q) = goto q 
Arguments: (q : Option Turing.PartrecToTM2.Γ' → Turing.PartrecToTM2.Λ')
Goal: Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.read q) = Turing.TM2.Stmt.goto q
-- Turing.PartrecToTM2.tr_clear
theorem tr_clear (p k q) : tr (Λ'.clear p k q) = pop' k (branch
    (fun s => s.elim true p) (goto fun _ => q) (goto fun _ => Λ'.clear p k q)) 
Arguments: (p : Turing.PartrecToTM2.Γ' → Bool) (k : Turing.PartrecToTM2.K') (q : Turing.PartrecToTM2.Λ')
Goal: Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.clear p k q) =
  Turing.PartrecToTM2.pop' k
    (Turing.TM2.Stmt.branch (fun s => s.elim true p) (Turing.TM2.Stmt.goto fun x => q)
      (Turing.TM2.Stmt.goto fun x => Turing.PartrecToTM2.Λ'.clear p k q))
-- Turing.PartrecToTM2.tr_copy
theorem tr_copy (q) : tr (Λ'.copy q) = pop' rev (branch Option.isSome
    (push' main <| push' stack <| goto fun _ => Λ'.copy q) (goto fun _ => q)) 
Arguments: (q : Turing.PartrecToTM2.Λ')
Goal: Turing.PartrecToTM2.tr q.copy =
  Turing.PartrecToTM2.pop' Turing.PartrecToTM2.K'.rev
    (Turing.TM2.Stmt.branch Option.isSome
      (Turing.PartrecToTM2.push' Turing.PartrecToTM2.K'.main
        (Turing.PartrecToTM2.push' Turing.PartrecToTM2.K'.stack (Turing.TM2.Stmt.goto fun x => q.copy)))
      (Turing.TM2.Stmt.goto fun x => q))
-- Turing.PartrecToTM2.tr_succ
theorem tr_succ (q) : tr (Λ'.succ q) = pop' main (branch (fun s => s = some Γ'.bit1)
    ((push rev fun _ => Γ'.bit0) <| goto fun _ => Λ'.succ q) <|
      branch (fun s => s = some Γ'.cons)
        ((push main fun _ => Γ'.cons) <| (push main fun _ => Γ'.bit1) <| goto fun _ => unrev q)
        ((push main fun _ => Γ'.bit1) <| goto fun _ => unrev q)) 
Arguments: (q : Turing.PartrecToTM2.Λ')
Goal: Turing.PartrecToTM2.tr q.succ =
  Turing.PartrecToTM2.pop' Turing.PartrecToTM2.K'.main
    (Turing.TM2.Stmt.branch (fun s => decide (s = some Turing.PartrecToTM2.Γ'.bit1))
      (Turing.TM2.Stmt.push Turing.PartrecToTM2.K'.rev (fun x => Turing.PartrecToTM2.Γ'.bit0)
        (Turing.TM2.Stmt.goto fun x => q.succ))
      (Turing.TM2.Stmt.branch (fun s => decide (s = some Turing.PartrecToTM2.Γ'.cons))
        (Turing.TM2.Stmt.push Turing.PartrecToTM2.K'.main (fun x => Turing.PartrecToTM2.Γ'.cons)
          (Turing.TM2.Stmt.push Turing.PartrecToTM2.K'.main (fun x => Turing.PartrecToTM2.Γ'.bit1)
            (Turing.TM2.Stmt.goto fun x => Turing.PartrecToTM2.unrev q)))
        (Turing.TM2.Stmt.push Turing.PartrecToTM2.K'.main (fun x => Turing.PartrecToTM2.Γ'.bit1)
          (Turing.TM2.Stmt.goto fun x => Turing.PartrecToTM2.unrev q))))
-- Turing.PartrecToTM2.tr_pred
theorem tr_pred (q₁ q₂) : tr (Λ'.pred q₁ q₂) = pop' main (branch (fun s => s = some Γ'.bit0)
    ((push rev fun _ => Γ'.bit1) <| goto fun _ => Λ'.pred q₁ q₂) <|
    branch (fun s => natEnd s.iget) (goto fun _ => q₁)
      (peek' main <|
        branch (fun s => natEnd s.iget) (goto fun _ => unrev q₂)
          ((push rev fun _ => Γ'.bit0) <| goto fun _ => unrev q₂))) 
Arguments: (q₁ q₂ : Turing.PartrecToTM2.Λ')
Goal: Turing.PartrecToTM2.tr (q₁.pred q₂) =
  Turing.PartrecToTM2.pop' Turing.PartrecToTM2.K'.main
    (Turing.TM2.Stmt.branch (fun s => decide (s = some Turing.PartrecToTM2.Γ'.bit0))
      (Turing.TM2.Stmt.push Turing.PartrecToTM2.K'.rev (fun x => Turing.PartrecToTM2.Γ'.bit1)
        (Turing.TM2.Stmt.goto fun x => q₁.pred q₂))
      (Turing.TM2.Stmt.branch (fun s => Turing.PartrecToTM2.natEnd s.iget) (Turing.TM2.Stmt.goto fun x => q₁)
        (Turing.PartrecToTM2.peek' Turing.PartrecToTM2.K'.main
          (Turing.TM2.Stmt.branch (fun s => Turing.PartrecToTM2.natEnd s.iget)
            (Turing.TM2.Stmt.goto fun x => Turing.PartrecToTM2.unrev q₂)
            (Turing.TM2.Stmt.push Turing.PartrecToTM2.K'.rev (fun x => Turing.PartrecToTM2.Γ'.bit0)
              (Turing.TM2.Stmt.goto fun x => Turing.PartrecToTM2.unrev q₂))))))
-- Turing.PartrecToTM2.tr_ret_cons₁
theorem tr_ret_cons₁ (fs k) : tr (Λ'.ret (Cont'.cons₁ fs k)) = goto fun _ =>
    move₂ (fun _ => false) main aux <|
      move₂ (fun s => s = Γ'.consₗ) stack main <|
        move₂ (fun _ => false) aux stack <| trNormal fs (Cont'.cons₂ k) 
Arguments: (fs : Turing.ToPartrec.Code) (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.ret (Turing.PartrecToTM2.Cont'.cons₁ fs k)) =
  Turing.TM2.Stmt.goto fun x =>
    Turing.PartrecToTM2.move₂ (fun x => false) Turing.PartrecToTM2.K'.main Turing.PartrecToTM2.K'.aux
      (Turing.PartrecToTM2.move₂ (fun s => decide (s = Turing.PartrecToTM2.Γ'.consₗ)) Turing.PartrecToTM2.K'.stack
        Turing.PartrecToTM2.K'.main
        (Turing.PartrecToTM2.move₂ (fun x => false) Turing.PartrecToTM2.K'.aux Turing.PartrecToTM2.K'.stack
          (Turing.PartrecToTM2.trNormal fs k.cons₂)))
-- Turing.PartrecToTM2.tr_ret_cons₂
theorem tr_ret_cons₂ (k) : tr (Λ'.ret (Cont'.cons₂ k)) =
    goto fun _ => head stack <| Λ'.ret k 
Arguments: (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.ret k.cons₂) =
  Turing.TM2.Stmt.goto fun x => Turing.PartrecToTM2.head Turing.PartrecToTM2.K'.stack (Turing.PartrecToTM2.Λ'.ret k)
-- Turing.PartrecToTM2.tr_ret_comp
theorem tr_ret_comp (f k) : tr (Λ'.ret (Cont'.comp f k)) = goto fun _ => trNormal f k 
Arguments: (f : Turing.ToPartrec.Code) (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.ret (Turing.PartrecToTM2.Cont'.comp f k)) =
  Turing.TM2.Stmt.goto fun x => Turing.PartrecToTM2.trNormal f k
-- Turing.PartrecToTM2.tr_ret_fix
theorem tr_ret_fix (f k) : tr (Λ'.ret (Cont'.fix f k)) = pop' main (goto fun s =>
    cond (natEnd s.iget) (Λ'.ret k) <| Λ'.clear natEnd main <| trNormal f (Cont'.fix f k)) 
Arguments: (f : Turing.ToPartrec.Code) (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.ret (Turing.PartrecToTM2.Cont'.fix f k)) =
  Turing.PartrecToTM2.pop' Turing.PartrecToTM2.K'.main
    (Turing.TM2.Stmt.goto fun s =>
      bif Turing.PartrecToTM2.natEnd s.iget then Turing.PartrecToTM2.Λ'.ret k
      else
        Turing.PartrecToTM2.Λ'.clear Turing.PartrecToTM2.natEnd Turing.PartrecToTM2.K'.main
          (Turing.PartrecToTM2.trNormal f (Turing.PartrecToTM2.Cont'.fix f k)))
-- Turing.PartrecToTM2.tr_ret_halt
theorem tr_ret_halt : tr (Λ'.ret Cont'.halt) = (load fun _ => none) halt 
Goal: Turing.PartrecToTM2.tr (Turing.PartrecToTM2.Λ'.ret Turing.PartrecToTM2.Cont'.halt) =
  Turing.TM2.Stmt.load (fun x => none) Turing.TM2.Stmt.halt
-- Turing.PartrecToTM2.trNat_zero
@[simp]
theorem trNat_zero : trNat 0 = [] 
Goal: Turing.PartrecToTM2.trNat 0 = []
-- Turing.PartrecToTM2.trNat_default
theorem trNat_default : trNat default = [] 
Goal: Turing.PartrecToTM2.trNat default = []
-- Turing.PartrecToTM2.K'.elim_main
theorem K'.elim_main (a b c d) : K'.elim a b c d K'.main = a 
Arguments: (a b c d : List Turing.PartrecToTM2.Γ')
Goal: Turing.PartrecToTM2.K'.elim a b c d Turing.PartrecToTM2.K'.main = a
-- Turing.PartrecToTM2.K'.elim_rev
theorem K'.elim_rev (a b c d) : K'.elim a b c d K'.rev = b 
Arguments: (a b c d : List Turing.PartrecToTM2.Γ')
Goal: Turing.PartrecToTM2.K'.elim a b c d Turing.PartrecToTM2.K'.rev = b
-- Turing.PartrecToTM2.K'.elim_aux
theorem K'.elim_aux (a b c d) : K'.elim a b c d K'.aux = c 
Arguments: (a b c d : List Turing.PartrecToTM2.Γ')
Goal: Turing.PartrecToTM2.K'.elim a b c d Turing.PartrecToTM2.K'.aux = c
-- Turing.PartrecToTM2.K'.elim_stack
theorem K'.elim_stack (a b c d) : K'.elim a b c d K'.stack = d 
Arguments: (a b c d : List Turing.PartrecToTM2.Γ')
Goal: Turing.PartrecToTM2.K'.elim a b c d Turing.PartrecToTM2.K'.stack = d
-- Turing.PartrecToTM2.K'.elim_update_main
@[simp]
theorem K'.elim_update_main {a b c d a'} : update (K'.elim a b c d) main a' = K'.elim a' b c d 
Arguments: {a b c d a' : List Turing.PartrecToTM2.Γ'}
Goal: Function.update (Turing.PartrecToTM2.K'.elim a b c d) Turing.PartrecToTM2.K'.main a' =
  Turing.PartrecToTM2.K'.elim a' b c d
-- Turing.PartrecToTM2.K'.elim_update_rev
@[simp]
theorem K'.elim_update_rev {a b c d b'} : update (K'.elim a b c d) rev b' = K'.elim a b' c d 
Arguments: {a b c d b' : List Turing.PartrecToTM2.Γ'}
Goal: Function.update (Turing.PartrecToTM2.K'.elim a b c d) Turing.PartrecToTM2.K'.rev b' =
  Turing.PartrecToTM2.K'.elim a b' c d
-- Turing.PartrecToTM2.K'.elim_update_aux
@[simp]
theorem K'.elim_update_aux {a b c d c'} : update (K'.elim a b c d) aux c' = K'.elim a b c' d 
Arguments: {a b c d c' : List Turing.PartrecToTM2.Γ'}
Goal: Function.update (Turing.PartrecToTM2.K'.elim a b c d) Turing.PartrecToTM2.K'.aux c' =
  Turing.PartrecToTM2.K'.elim a b c' d
-- Turing.PartrecToTM2.K'.elim_update_stack
@[simp]
theorem K'.elim_update_stack {a b c d d'} :
    update (K'.elim a b c d) stack d' = K'.elim a b c d' 
Arguments: {a b c d d' : List Turing.PartrecToTM2.Γ'}
Goal: Function.update (Turing.PartrecToTM2.K'.elim a b c d) Turing.PartrecToTM2.K'.stack d' =
  Turing.PartrecToTM2.K'.elim a b c d'
-- Turing.PartrecToTM2.splitAtPred_eq
theorem splitAtPred_eq {α} (p : α → Bool) :
    ∀ L l₁ o l₂,
      (∀ x ∈ l₁, p x = false) →
        Option.elim' (L = l₁ ∧ l₂ = []) (fun a => p a = true ∧ L = l₁ ++ a::l₂) o →
          splitAtPred p L = (l₁, o, l₂)
  
Arguments: {α : Type u_1} (p : α → Bool) (L l₁ : List α) (o : Option α) (l₂ : List α)
Goal: (∀ x ∈ l₁, p x = false) →
  Option.elim' (L = l₁ ∧ l₂ = []) (fun a => p a = true ∧ L = l₁ ++ a :: l₂) o →
    Turing.PartrecToTM2.splitAtPred p L = (l₁, o, l₂)
-- Turing.PartrecToTM2.splitAtPred_false
theorem splitAtPred_false {α} (L : List α) : splitAtPred (fun _ => false) L = (L, none, []) 
Arguments: {α : Type u_1} (L : List α)
Goal: Turing.PartrecToTM2.splitAtPred (fun x => false) L = (L, none, [])
-- Turing.PartrecToTM2.move_ok
theorem move_ok {p k₁ k₂ q s L₁ o L₂} {S : K' → List Γ'} (h₁ : k₁ ≠ k₂)
    (e : splitAtPred p (S k₁) = (L₁, o, L₂)) :
    Reaches₁ (TM2.step tr) ⟨some (Λ'.move p k₁ k₂ q), s, S⟩
      ⟨some q, o, update (update S k₁ L₂) k₂ (L₁.reverseAux (S k₂))⟩ 
Arguments: {p : Turing.PartrecToTM2.Γ' → Bool} {k₁ k₂ : Turing.PartrecToTM2.K'} {q : Turing.PartrecToTM2.Λ'} {s : Option Turing.PartrecToTM2.Γ'} {L₁ : List Turing.PartrecToTM2.Γ'} {o : Option Turing.PartrecToTM2.Γ'} {L₂ : List Turing.PartrecToTM2.Γ'} {S : Turing.PartrecToTM2.K' → List Turing.PartrecToTM2.Γ'} (h₁ : k₁ ≠ k₂) (e : Turing.PartrecToTM2.splitAtPred p (S k₁) = (L₁, o, L₂))
Goal: Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
  { l := some (Turing.PartrecToTM2.Λ'.move p k₁ k₂ q), var := s, stk := S }
  { l := some q, var := o, stk := Function.update (Function.update S k₁ L₂) k₂ (L₁.reverseAux (S k₂)) }
-- Turing.PartrecToTM2.unrev_ok
theorem unrev_ok {q s} {S : K' → List Γ'} :
    Reaches₁ (TM2.step tr) ⟨some (unrev q), s, S⟩
      ⟨some q, none, update (update S rev []) main (List.reverseAux (S rev) (S main))⟩ 
Arguments: {q : Turing.PartrecToTM2.Λ'} {s : Option Turing.PartrecToTM2.Γ'} {S : Turing.PartrecToTM2.K' → List Turing.PartrecToTM2.Γ'}
Goal: Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr) { l := some (Turing.PartrecToTM2.unrev q), var := s, stk := S }
  { l := some q, var := none,
    stk :=
      Function.update (Function.update S Turing.PartrecToTM2.K'.rev []) Turing.PartrecToTM2.K'.main
        ((S Turing.PartrecToTM2.K'.rev).reverseAux (S Turing.PartrecToTM2.K'.main)) }
-- Turing.PartrecToTM2.move₂_ok
theorem move₂_ok {p k₁ k₂ q s L₁ o L₂} {S : K' → List Γ'} (h₁ : k₁ ≠ rev ∧ k₂ ≠ rev ∧ k₁ ≠ k₂)
    (h₂ : S rev = []) (e : splitAtPred p (S k₁) = (L₁, o, L₂)) :
    Reaches₁ (TM2.step tr) ⟨some (move₂ p k₁ k₂ q), s, S⟩
      ⟨some q, none, update (update S k₁ (o.elim id List.cons L₂)) k₂ (L₁ ++ S k₂)⟩ 
Arguments: {p : Turing.PartrecToTM2.Γ' → Bool} {k₁ k₂ : Turing.PartrecToTM2.K'} {q : Turing.PartrecToTM2.Λ'} {s : Option Turing.PartrecToTM2.Γ'} {L₁ : List Turing.PartrecToTM2.Γ'} {o : Option Turing.PartrecToTM2.Γ'} {L₂ : List Turing.PartrecToTM2.Γ'} {S : Turing.PartrecToTM2.K' → List Turing.PartrecToTM2.Γ'} (h₁ : k₁ ≠ Turing.PartrecToTM2.K'.rev ∧ k₂ ≠ Turing.PartrecToTM2.K'.rev ∧ k₁ ≠ k₂) (h₂ : S Turing.PartrecToTM2.K'.rev = []) (e : Turing.PartrecToTM2.splitAtPred p (S k₁) = (L₁, o, L₂))
Goal: Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
  { l := some (Turing.PartrecToTM2.move₂ p k₁ k₂ q), var := s, stk := S }
  { l := some q, var := none, stk := Function.update (Function.update S k₁ (o.elim id List.cons L₂)) k₂ (L₁ ++ S k₂) }
-- Turing.PartrecToTM2.clear_ok
theorem clear_ok {p k q s L₁ o L₂} {S : K' → List Γ'} (e : splitAtPred p (S k) = (L₁, o, L₂)) :
    Reaches₁ (TM2.step tr) ⟨some (Λ'.clear p k q), s, S⟩ ⟨some q, o, update S k L₂⟩ 
Arguments: {p : Turing.PartrecToTM2.Γ' → Bool} {k : Turing.PartrecToTM2.K'} {q : Turing.PartrecToTM2.Λ'} {s : Option Turing.PartrecToTM2.Γ'} {L₁ : List Turing.PartrecToTM2.Γ'} {o : Option Turing.PartrecToTM2.Γ'} {L₂ : List Turing.PartrecToTM2.Γ'} {S : Turing.PartrecToTM2.K' → List Turing.PartrecToTM2.Γ'} (e : Turing.PartrecToTM2.splitAtPred p (S k) = (L₁, o, L₂))
Goal: Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
  { l := some (Turing.PartrecToTM2.Λ'.clear p k q), var := s, stk := S }
  { l := some q, var := o, stk := Function.update S k L₂ }
-- Turing.PartrecToTM2.copy_ok
theorem copy_ok (q s a b c d) :
    Reaches₁ (TM2.step tr) ⟨some (Λ'.copy q), s, K'.elim a b c d⟩
      ⟨some q, none, K'.elim (List.reverseAux b a) [] c (List.reverseAux b d)⟩ 
Arguments: (q : Turing.PartrecToTM2.Λ') (s : Option Turing.PartrecToTM2.Γ') (a b c d : List Turing.PartrecToTM2.Γ')
Goal: Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
  { l := some q.copy, var := s, stk := Turing.PartrecToTM2.K'.elim a b c d }
  { l := some q, var := none, stk := Turing.PartrecToTM2.K'.elim (b.reverseAux a) [] c (b.reverseAux d) }
-- Turing.PartrecToTM2.trPosNum_natEnd
theorem trPosNum_natEnd : ∀ (n), ∀ x ∈ trPosNum n, natEnd x = false
  
Arguments: (n : PosNum) (x : Turing.PartrecToTM2.Γ')
Goal: x ∈ Turing.PartrecToTM2.trPosNum n → Turing.PartrecToTM2.natEnd x = false
-- Turing.PartrecToTM2.trNum_natEnd
theorem trNum_natEnd : ∀ (n), ∀ x ∈ trNum n, natEnd x = false
  
Arguments: (n : Num) (x : Turing.PartrecToTM2.Γ')
Goal: x ∈ Turing.PartrecToTM2.trNum n → Turing.PartrecToTM2.natEnd x = false
-- Turing.PartrecToTM2.trNat_natEnd
theorem trNat_natEnd (n) : ∀ x ∈ trNat n, natEnd x = false 
Arguments: (n : ℕ) (x : Turing.PartrecToTM2.Γ')
Goal: x ∈ Turing.PartrecToTM2.trNat n → Turing.PartrecToTM2.natEnd x = false
-- Turing.PartrecToTM2.trList_ne_consₗ
theorem trList_ne_consₗ : ∀ (l), ∀ x ∈ trList l, x ≠ Γ'.consₗ
  
Arguments: (l : List ℕ) (x : Turing.PartrecToTM2.Γ')
Goal: x ∈ Turing.PartrecToTM2.trList l → x ≠ Turing.PartrecToTM2.Γ'.consₗ
-- Turing.PartrecToTM2.head_main_ok
theorem head_main_ok {q s L} {c d : List Γ'} :
    Reaches₁ (TM2.step tr) ⟨some (head main q), s, K'.elim (trList L) [] c d⟩
      ⟨some q, none, K'.elim (trList [L.headI]) [] c d⟩ 
Arguments: {q : Turing.PartrecToTM2.Λ'} {s : Option Turing.PartrecToTM2.Γ'} {L : List ℕ} {c d : List Turing.PartrecToTM2.Γ'}
Goal: Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
  { l := some (Turing.PartrecToTM2.head Turing.PartrecToTM2.K'.main q), var := s,
    stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList L) [] c d }
  { l := some q, var := none, stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList [L.headI]) [] c d }
-- Turing.PartrecToTM2.head_stack_ok
theorem head_stack_ok {q s L₁ L₂ L₃} :
    Reaches₁ (TM2.step tr)
      ⟨some (head stack q), s, K'.elim (trList L₁) [] [] (trList L₂ ++ Γ'.consₗ :: L₃)⟩
      ⟨some q, none, K'.elim (trList (L₂.headI :: L₁)) [] [] L₃⟩ 
Arguments: {q : Turing.PartrecToTM2.Λ'} {s : Option Turing.PartrecToTM2.Γ'} {L₁ L₂ : List ℕ} {L₃ : List Turing.PartrecToTM2.Γ'}
Goal: Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
  { l := some (Turing.PartrecToTM2.head Turing.PartrecToTM2.K'.stack q), var := s,
    stk :=
      Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList L₁) [] []
        (Turing.PartrecToTM2.trList L₂ ++ Turing.PartrecToTM2.Γ'.consₗ :: L₃) }
  { l := some q, var := none,
    stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList (L₂.headI :: L₁)) [] [] L₃ }
-- Turing.PartrecToTM2.succ_ok
theorem succ_ok {q s n} {c d : List Γ'} :
    Reaches₁ (TM2.step tr) ⟨some (Λ'.succ q), s, K'.elim (trList [n]) [] c d⟩
      ⟨some q, none, K'.elim (trList [n.succ]) [] c d⟩ 
Arguments: {q : Turing.PartrecToTM2.Λ'} {s : Option Turing.PartrecToTM2.Γ'} {n : ℕ} {c d : List Turing.PartrecToTM2.Γ'}
Goal: Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
  { l := some q.succ, var := s, stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList [n]) [] c d }
  { l := some q, var := none, stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList [n.succ]) [] c d }
-- Turing.PartrecToTM2.pred_ok
theorem pred_ok (q₁ q₂ s v) (c d : List Γ') : ∃ s',
    Reaches₁ (TM2.step tr) ⟨some (Λ'.pred q₁ q₂), s, K'.elim (trList v) [] c d⟩
      (v.headI.rec ⟨some q₁, s', K'.elim (trList v.tail) [] c d⟩ fun n _ =>
        ⟨some q₂, s', K'.elim (trList (n::v.tail)) [] c d⟩) 
Arguments: (q₁ q₂ : Turing.PartrecToTM2.Λ') (s : Option Turing.PartrecToTM2.Γ') (v : List ℕ) (c d : List Turing.PartrecToTM2.Γ')
Goal: ∃ s',
  Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
    { l := some (q₁.pred q₂), var := s, stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList v) [] c d }
    (Nat.rec { l := some q₁, var := s', stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList v.tail) [] c d }
      (fun n x =>
        { l := some q₂, var := s',
          stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList (n :: v.tail)) [] c d })
      v.headI)
-- Turing.PartrecToTM2.trNormal_respects
theorem trNormal_respects (c k v s) :
    ∃ b₂,
      TrCfg (stepNormal c k v) b₂ ∧
        Reaches₁ (TM2.step tr)
          ⟨some (trNormal c (trCont k)), s, K'.elim (trList v) [] [] (trContStack k)⟩ b₂ 
Arguments: (c : Turing.ToPartrec.Code) (k : Turing.ToPartrec.Cont) (v : List ℕ) (s : Option Turing.PartrecToTM2.Γ')
Goal: ∃ b₂,
  Turing.PartrecToTM2.TrCfg (Turing.ToPartrec.stepNormal c k v) b₂ ∧
    Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
      { l := some (Turing.PartrecToTM2.trNormal c (Turing.PartrecToTM2.trCont k)), var := s,
        stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList v) [] [] (Turing.PartrecToTM2.trContStack k) }
      b₂
-- Turing.PartrecToTM2.tr_ret_respects
theorem tr_ret_respects (k v s) : ∃ b₂,
    TrCfg (stepRet k v) b₂ ∧
      Reaches₁ (TM2.step tr)
        ⟨some (Λ'.ret (trCont k)), s, K'.elim (trList v) [] [] (trContStack k)⟩ b₂ 
Arguments: (k : Turing.ToPartrec.Cont) (v : List ℕ) (s : Option Turing.PartrecToTM2.Γ')
Goal: ∃ b₂,
  Turing.PartrecToTM2.TrCfg (Turing.ToPartrec.stepRet k v) b₂ ∧
    Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr)
      { l := some (Turing.PartrecToTM2.Λ'.ret (Turing.PartrecToTM2.trCont k)), var := s,
        stk := Turing.PartrecToTM2.K'.elim (Turing.PartrecToTM2.trList v) [] [] (Turing.PartrecToTM2.trContStack k) }
      b₂
-- Turing.PartrecToTM2.tr_respects
theorem tr_respects : Respects step (TM2.step tr) TrCfg
  
Goal: Turing.Respects Turing.ToPartrec.step (Turing.TM2.step Turing.PartrecToTM2.tr) Turing.PartrecToTM2.TrCfg
-- Turing.PartrecToTM2.tr_init
theorem tr_init (c v) :
    ∃ b, TrCfg (stepNormal c Cont.halt v) b ∧ Reaches₁ (TM2.step tr) (init c v) b 
Arguments: (c : Turing.ToPartrec.Code) (v : List ℕ)
Goal: ∃ b,
  Turing.PartrecToTM2.TrCfg (Turing.ToPartrec.stepNormal c Turing.ToPartrec.Cont.halt v) b ∧
    Turing.Reaches₁ (Turing.TM2.step Turing.PartrecToTM2.tr) (Turing.PartrecToTM2.init c v) b
-- Turing.PartrecToTM2.tr_eval
theorem tr_eval (c v) : eval (TM2.step tr) (init c v) = halt <$> Code.eval c v 
Arguments: (c : Turing.ToPartrec.Code) (v : List ℕ)
Goal: Turing.eval (Turing.TM2.step Turing.PartrecToTM2.tr) (Turing.PartrecToTM2.init c v) =
  Turing.PartrecToTM2.halt <$> c.eval v
-- Turing.PartrecToTM2.trStmts₁_trans
theorem trStmts₁_trans {q q'} : q' ∈ trStmts₁ q → trStmts₁ q' ⊆ trStmts₁ q 
Arguments: {q q' : Turing.PartrecToTM2.Λ'}
Goal: q' ∈ Turing.PartrecToTM2.trStmts₁ q → Turing.PartrecToTM2.trStmts₁ q' ⊆ Turing.PartrecToTM2.trStmts₁ q
-- Turing.PartrecToTM2.trStmts₁_self
theorem trStmts₁_self (q) : q ∈ trStmts₁ q 
Arguments: (q : Turing.PartrecToTM2.Λ')
Goal: q ∈ Turing.PartrecToTM2.trStmts₁ q
-- Turing.PartrecToTM2.codeSupp'_self
@[simp]
theorem codeSupp'_self (c k) : trStmts₁ (trNormal c k) ⊆ codeSupp' c k 
Arguments: (c : Turing.ToPartrec.Code) (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal c k) ⊆ Turing.PartrecToTM2.codeSupp' c k
-- Turing.PartrecToTM2.codeSupp_self
@[simp]
theorem codeSupp_self (c k) : trStmts₁ (trNormal c k) ⊆ codeSupp c k 
Arguments: (c : Turing.ToPartrec.Code) (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal c k) ⊆ Turing.PartrecToTM2.codeSupp c k
-- Turing.PartrecToTM2.codeSupp_zero
@[simp]
theorem codeSupp_zero (k) : codeSupp Code.zero' k = trStmts₁ (trNormal Code.zero' k) ∪ contSupp k 
Arguments: (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.codeSupp Turing.ToPartrec.Code.zero' k =
  Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal Turing.ToPartrec.Code.zero' k) ∪
    Turing.PartrecToTM2.contSupp k
-- Turing.PartrecToTM2.codeSupp_succ
@[simp]
theorem codeSupp_succ (k) : codeSupp Code.succ k = trStmts₁ (trNormal Code.succ k) ∪ contSupp k 
Arguments: (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.codeSupp Turing.ToPartrec.Code.succ k =
  Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal Turing.ToPartrec.Code.succ k) ∪
    Turing.PartrecToTM2.contSupp k
-- Turing.PartrecToTM2.codeSupp_tail
@[simp]
theorem codeSupp_tail (k) : codeSupp Code.tail k = trStmts₁ (trNormal Code.tail k) ∪ contSupp k 
Arguments: (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.codeSupp Turing.ToPartrec.Code.tail k =
  Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal Turing.ToPartrec.Code.tail k) ∪
    Turing.PartrecToTM2.contSupp k
-- Turing.PartrecToTM2.codeSupp_cons
@[simp]
theorem codeSupp_cons (f fs k) :
    codeSupp (Code.cons f fs) k =
      trStmts₁ (trNormal (Code.cons f fs) k) ∪ codeSupp f (Cont'.cons₁ fs k) 
Arguments: (f fs : Turing.ToPartrec.Code) (k : Turing.PartrecToTM2.Cont')
Goal: Turing.PartrecToTM2.codeSupp (f.cons fs) k =
  Turing.PartrecToTM2.trStmts₁ (Turing.PartrecToTM2.trNormal (f.cons fs) k) ∪
    Turing.PartrecToTM2.codeSupp f (Turing.PartrecToTM2.Cont'.cons₁ fs k)