MindFormal v1.0.0One Mind

MindFormal.Tools.A595Paper.ControlCompiler

Exact five/six-command compilation, including cleanup of the old annotation. The transition table is fixed for all input tapes.

theorem MindFormal.A595Paper.pending_run {Q : Type u_1} {A : Type u_2} [DecidableEq Q] [DecidableEq A] (δ : Transition Q A) (c : Configuration Q A) (q : Q) (s : A) (right : Bool) :
LocalRun (localTable δ) (pendingTape c s q s right) 4 (c.step q s right).pack
theorem MindFormal.A595Paper.compile_transition {Q : Type u_1} {A : Type u_2} [DecidableEq Q] [DecidableEq A] (δ : Transition Q A) (c : Configuration Q A) (q : Q) (s : A) (right : Bool) (hδ : δ c.control (c.tape.cells c.tape.head) = some (q, s, right)) :
∃ (n : ℕ), (n = 5 ∨ n = 6) ∧ LocalRun (localTable δ) c.pack n (c.step q s right).pack
inductive MindFormal.A595Paper.MachineRun {Q : Type u_1} {A : Type u_2} (δ : Transition Q A) :
Configuration Q A → ℕ → Configuration Q A → Prop
Instances For
    theorem MindFormal.A595Paper.compile_run {Q : Type u_1} {A : Type u_2} [DecidableEq Q] [DecidableEq A] (δ : Transition Q A) {c d : Configuration Q A} {n : ℕ} (h : MachineRun δ c n d) :
    ∃ (j : ℕ), 5 * n ≤ j ∧ j ≤ 6 * n ∧ LocalRun (localTable δ) c.pack j d.pack
    theorem MindFormal.A595Paper.compile_halt {Q : Type u_1} {A : Type u_2} [DecidableEq Q] [DecidableEq A] (δ : Transition Q A) (c : Configuration Q A) (hh : δ c.control (c.tape.cells c.tape.head) = none) :
    theorem MindFormal.A595Paper.compile_complete {Q : Type u_1} {A : Type u_2} [DecidableEq Q] [DecidableEq A] (δ : Transition Q A) {c d : Configuration Q A} {n : ℕ} (h : MachineRun δ c n d) (hh : δ d.control (d.tape.cells d.tape.head) = none) :
    ∃ (j : ℕ), j + 1 ≤ 6 * n + 2 ∧ LocalRun (localTable δ) c.pack j (doneTape d)

    Completion is charged as a separate primitive. Prepared initialization is charged by the caller, giving the printed 6 * transitions + 2 cap.