MindFormal v1.0.0One Mind

MindFormal.Tools.A595Paper.Scans

Counted literal tape scans. Scan hypotheses describe the symbols in the traversed segment and the fixed transition table on those symbols; they do not supply a successful native command history.

theorem MindFormal.A595Paper.MachineRun.append {Q : Type u_1} {A : Type u_2} {δ : Transition Q A} {a b c : Configuration Q A} {m n : ℕ} (h : MachineRun δ a m b) (k : MachineRun δ b n c) :
MachineRun δ a (m + n) c
theorem MindFormal.A595Paper.MachineRun.single {Q : Type u_1} {A : Type u_2} {δ : 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)) :
MachineRun δ c 1 (c.step q s right)
theorem MindFormal.A595Paper.configuration_ext {Q : Type u_1} {A : Type u_2} {c d : Configuration Q A} (ht : c.tape = d.tape) (hq : c.control = d.control) :
c = d
theorem MindFormal.A595Paper.step_same_data {Q : Type u_1} {A : Type u_2} (f : ℤ → A) (h : ℤ) (p q : Q) (right : Bool) :
{ tape := { cells := f, head := h }, control := p }.step q (f h) right = { tape := { cells := f, head := h + direction right }, control := q }
theorem MindFormal.A595Paper.scan_segment {Q : Type u_1} {A : Type u_2} (δ : Transition Q A) (f : ℤ → A) (h : ℤ) (q : Q) (right : Bool) (n : ℕ) (hs : ∀ k < n, δ q (f (h + ↑k * direction right)) = some (q, f (h + ↑k * direction right), right)) :
MachineRun δ { tape := { cells := f, head := h }, control := q } n { tape := { cells := f, head := h + ↑n * direction right }, control := q }

Exactly n single-square transitions, with no address jump and no change to the data. The endpoint is the first square not traversed.

theorem MindFormal.A595Paper.scan_right {Q : Type u_1} {A : Type u_2} (δ : Transition Q A) (f : ℤ → A) (h : ℤ) (q : Q) (n : ℕ) (hs : ∀ k < n, δ q (f (h + ↑k)) = some (q, f (h + ↑k), true)) :
MachineRun δ { tape := { cells := f, head := h }, control := q } n { tape := { cells := f, head := h + ↑n }, control := q }
theorem MindFormal.A595Paper.scan_left {Q : Type u_1} {A : Type u_2} (δ : Transition Q A) (f : ℤ → A) (h : ℤ) (q : Q) (n : ℕ) (hs : ∀ k < n, δ q (f (h - ↑k)) = some (q, f (h - ↑k), false)) :
MachineRun δ { tape := { cells := f, head := h }, control := q } n { tape := { cells := f, head := h - ↑n }, control := q }
theorem MindFormal.A595Paper.seek_right_to {Q : Type u_1} {A : Type u_2} (δ : Transition Q A) (f : ℤ → A) (mark : A → Bool) (q next : Q) (h target : ℤ) (hle : h ≤ target) (hu : ∀ (z : ℤ), mark (f z) = true ↔ z = target) (ht : ∀ (c : A), δ q c = if mark c = true then some (next, c, true) else some (q, c, true)) :
MachineRun δ { tape := { cells := f, head := h }, control := q } ((target - h).toNat + 1) { tape := { cells := f, head := target + 1 }, control := next }

Search right for a unique mark and enter the next control on the square following it. Every intervening square is read by a transition.

theorem MindFormal.A595Paper.seek_left_to {Q : Type u_1} {A : Type u_2} (δ : Transition Q A) (f : ℤ → A) (mark : A → Bool) (q next : Q) (h target : ℤ) (hle : target ≤ h) (hu : ∀ (z : ℤ), mark (f z) = true ↔ z = target) (ht : ∀ (c : A), δ q c = if mark c = true then some (next, c, true) else some (q, c, false)) :
MachineRun δ { tape := { cells := f, head := h }, control := q } ((h - target).toNat + 1) { tape := { cells := f, head := target + 1 }, control := next }

Search left for a unique mark, then step right into its field.