Imports
/- Copyright (c) 2026 Terence Rokop. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Terence Rokop -/ module public import Geb.Prototypes.Computability.BitTree.Elias.MachineModel public import Geb.Prototypes.Computability.TreeScanner.Steps
set_option doc.verso true

Reading the input and emitting the final verdict

At normalized scanner boundaries the next input symbol is either the next bit or the right end marker. The end marker causes one output bit and halting.

Main statements

  • inputSymbol_at identifies the next input bit.

  • step_end and outputSymbol_end specify the final transition.

Tags

Elias delta code, Turing machine, input, halting

@[expose] public sectionnamespace Geb.BitTree.Elias.Machineopen Turing MultiTapeTM

Initialization installs the four origin markers and leaves one pending root.

theorem configs_start (input : List (Fin 3)) : machine.configs (machine.initCfg input) 1 = modelCfg input 1 (.tree, 1) [] [] := input:List (Fin 3)configs (initCfg input) 1 = modelCfg input 1 (Scanner.Mode.tree, 1) [] [] input:List (Fin 3)step (configs (initCfg input) 0) = modelCfg input 1 (Scanner.Mode.tree, 1) [] [] input:List (Fin 3){ state := (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).q', inputPos := moveInputPos (configs (initCfg input) 0).inputPos (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).1 with | none => (configs (initCfg input) 0).workTapes i | some s => Function.update ((configs (initCfg input) 0).workTapes i) ((configs (initCfg input) 0).workTapePos i) s, workTapePos := fun i (configs (initCfg input) 0).workTapePos i + ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).2 } = modelCfg input 1 (Scanner.Mode.tree, 1) [] [] input:List (Fin 3){ state := (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).q', inputPos := moveInputPos (configs (initCfg input) 0).inputPos (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).1 with | none => (configs (initCfg input) 0).workTapes i | some s => Function.update ((configs (initCfg input) 0).workTapes i) ((configs (initCfg input) 0).workTapePos i) s, workTapePos := fun i (configs (initCfg input) 0).workTapePos i + ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).2 }.inputPos = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).inputPosinput:List (Fin 3){ state := (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).q', inputPos := moveInputPos (configs (initCfg input) 0).inputPos (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).1 with | none => (configs (initCfg input) 0).workTapes i | some s => Function.update ((configs (initCfg input) 0).workTapes i) ((configs (initCfg input) 0).workTapePos i) s, workTapePos := fun i (configs (initCfg input) 0).workTapePos i + ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).2 }.workTapes = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapesinput:List (Fin 3){ state := (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).q', inputPos := moveInputPos (configs (initCfg input) 0).inputPos (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).1 with | none => (configs (initCfg input) 0).workTapes i | some s => Function.update ((configs (initCfg input) 0).workTapes i) ((configs (initCfg input) 0).workTapePos i) s, workTapePos := fun i (configs (initCfg input) 0).workTapePos i + ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).2 }.workTapePos = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapePos input:List (Fin 3){ state := (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).q', inputPos := moveInputPos (configs (initCfg input) 0).inputPos (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).1 with | none => (configs (initCfg input) 0).workTapes i | some s => Function.update ((configs (initCfg input) 0).workTapes i) ((configs (initCfg input) 0).workTapePos i) s, workTapePos := fun i (configs (initCfg input) 0).workTapePos i + ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).2 }.inputPos = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).inputPos input:List (Fin 3)moveInputPos 1 0 = 1 All goals completed! 🐙 input:List (Fin 3){ state := (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).q', inputPos := moveInputPos (configs (initCfg input) 0).inputPos (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).1 with | none => (configs (initCfg input) 0).workTapes i | some s => Function.update ((configs (initCfg input) 0).workTapes i) ((configs (initCfg input) 0).workTapePos i) s, workTapePos := fun i (configs (initCfg input) 0).workTapePos i + ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).2 }.workTapes = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapes input:List (Fin 3)i:Fin 4z:{ state := (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).q', inputPos := moveInputPos (configs (initCfg input) 0).inputPos (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).1 with | none => (configs (initCfg input) 0).workTapes i | some s => Function.update ((configs (initCfg input) 0).workTapes i) ((configs (initCfg input) 0).workTapePos i) s, workTapePos := fun i (configs (initCfg input) 0).workTapePos i + ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).2 }.workTapes i z = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapes i z input:List (Fin 3)i:Fin 4z:Function.update (fun x none) 0 (some 2) z = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapes i z input:List (Fin 3)i:Fin 4z:hz:z = 0Function.update (fun x none) 0 (some 2) z = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapes i zinput:List (Fin 3)i:Fin 4z:hz:¬z = 0Function.update (fun x none) 0 (some 2) z = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapes i z input:List (Fin 3)i:Fin 4z:hz:z = 0Function.update (fun x none) 0 (some 2) z = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapes i z input:List (Fin 3)i:Fin 4Function.update (fun x none) 0 (some 2) 0 = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapes i 0 All goals completed! 🐙 input:List (Fin 3)i:Fin 4z:hz:¬z = 0Function.update (fun x none) 0 (some 2) z = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapes i z All goals completed! 🐙 input:List (Fin 3){ state := (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).q', inputPos := moveInputPos (configs (initCfg input) 0).inputPos (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).1 with | none => (configs (initCfg input) 0).workTapes i | some s => Function.update ((configs (initCfg input) 0).workTapes i) ((configs (initCfg input) 0).workTapePos i) s, workTapePos := fun i (configs (initCfg input) 0).workTapePos i + ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).2 }.workTapePos = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapePos input:List (Fin 3)i:Fin 4{ state := (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).q', inputPos := moveInputPos (configs (initCfg input) 0).inputPos (machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).1 with | none => (configs (initCfg input) 0).workTapes i | some s => Function.update ((configs (initCfg input) 0).workTapes i) ((configs (initCfg input) 0).workTapePos i) s, workTapePos := fun i (configs (initCfg input) 0).workTapePos i + ((machine.tr stInit (configs (initCfg input) 0).inputSymbol (configs (initCfg input) 0).workTapeSymbols).workActions i).2 }.workTapePos i = (modelCfg input 1 (Scanner.Mode.tree, 1) [] []).workTapePos i All goals completed! 🐙

Initialization does not emit output.

theorem outputString_start (input : List (Fin 3)) : machine.outputString (machine.initCfg input) 1 = [] := rfl

Initialization visits only the origin and its immediate right neighbor.

theorem headBound_start (input : List (Fin 3)) (width : ) (hw : 1 width) : t 1, HeadBound width (machine.configs (machine.initCfg input) t) := input:List (Fin 3)width:hw:1 width t 1, HeadBound width (configs (initCfg input) t) input:List (Fin 3)width:hw:1 widtht:ht:t 1HeadBound width (configs (initCfg input) t) cases t with input:List (Fin 3)width:hw:1 widthht:0 1HeadBound width (configs (initCfg input) 0) input:List (Fin 3)width:hw:1 widthht:0 1i:Fin 40 (configs (initCfg input) 0).workTapePos i (configs (initCfg input) 0).workTapePos i width input:List (Fin 3)width:hw:1 widthht:0 1i:Fin 40 0 0 width All goals completed! 🐙 input:List (Fin 3)width:hw:1 widtht:ht:t + 1 1HeadBound width (configs (initCfg input) (t + 1)) input:List (Fin 3)width:hw:1 widtht:ht:t + 1 1he:t = 0HeadBound width (configs (initCfg input) (t + 1)) input:List (Fin 3)width:hw:1 widthht:0 + 1 1HeadBound width (configs (initCfg input) (0 + 1)) input:List (Fin 3)width:hw:1 widthht:0 + 1 1HeadBound width (modelCfg input 1 (Scanner.Mode.tree, 1) [] []) All goals completed! 🐙

The input symbol at an interior position is the corresponding encoded boolean.

theorem inputSymbol_at (w : List Bool) (t : ) (ht : t < w.length) (cfg : Cfg 4 (Fin 3) Control (w.map boolEmb)) (hp : cfg.inputPos.val = t + 1) : cfg.inputSymbol = some (boolEmb w[t]) := w:List Boolt:ht:t < w.lengthcfg:Cfg 4 (Fin 3) Control (List.map (⇑boolEmb) w)hp:cfg.inputPos = t + 1cfg.inputSymbol = some (boolEmb w[t]) All goals completed! 🐙

The right end marker is read as a blank input symbol.

theorem inputSymbol_end {input : List (Fin 3)} (cfg : Cfg 4 (Fin 3) Control input) (hp : cfg.inputPos.val = input.length + 1) : cfg.inputSymbol = none := input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhp:cfg.inputPos = input.length + 1cfg.inputSymbol = none input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhp:cfg.inputPos = input.length + 1(if h₁ : cfg.inputPos = 0 then none else if h₂ : cfg.inputPos = input.length + 1 then none else some input[cfg.inputPos - 1]) = none input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhp:cfg.inputPos = input.length + 1h✝:cfg.inputPos = 0none = noneinput:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhp:cfg.inputPos = input.length + 1h✝:¬cfg.inputPos = 0none = none input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhp:cfg.inputPos = input.length + 1h✝:cfg.inputPos = 0none = noneinput:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhp:cfg.inputPos = input.length + 1h✝:¬cfg.inputPos = 0none = none All goals completed! 🐙

Reading the end marker in a normalized mode halts without changing any tape or head.

theorem step_end {input : List (Fin 3)} (cfg : Cfg 4 (Fin 3) Control input) (m : Scanner.Mode) (hq : cfg.state = some (modeState m)) (hi : cfg.inputSymbol = none) : machine.step cfg = { cfg with state := none } := input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = nonestep cfg = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos } input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none{ state := (finish (modeState m == stDone)).q', inputPos := moveInputPos cfg.inputPos (finish (modeState m == stDone)).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((finish (modeState m == stDone)).workActions i).1 with | none => cfg.workTapes i | some s => Function.update (cfg.workTapes i) (cfg.workTapePos i) s, workTapePos := fun i cfg.workTapePos i + ((finish (modeState m == stDone)).workActions i).2 } = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos } input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none{ state := (finish (modeState m == stDone)).q', inputPos := moveInputPos cfg.inputPos (finish (modeState m == stDone)).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((finish (modeState m == stDone)).workActions i).1 with | none => cfg.workTapes i | some s => Function.update (cfg.workTapes i) (cfg.workTapePos i) s, workTapePos := fun i cfg.workTapePos i + ((finish (modeState m == stDone)).workActions i).2 }.state = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos }.stateinput:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none{ state := (finish (modeState m == stDone)).q', inputPos := moveInputPos cfg.inputPos (finish (modeState m == stDone)).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((finish (modeState m == stDone)).workActions i).1 with | none => cfg.workTapes i | some s => Function.update (cfg.workTapes i) (cfg.workTapePos i) s, workTapePos := fun i cfg.workTapePos i + ((finish (modeState m == stDone)).workActions i).2 }.inputPos = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos }.inputPosinput:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none{ state := (finish (modeState m == stDone)).q', inputPos := moveInputPos cfg.inputPos (finish (modeState m == stDone)).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((finish (modeState m == stDone)).workActions i).1 with | none => cfg.workTapes i | some s => Function.update (cfg.workTapes i) (cfg.workTapePos i) s, workTapePos := fun i cfg.workTapePos i + ((finish (modeState m == stDone)).workActions i).2 }.workTapes = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos }.workTapesinput:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none{ state := (finish (modeState m == stDone)).q', inputPos := moveInputPos cfg.inputPos (finish (modeState m == stDone)).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((finish (modeState m == stDone)).workActions i).1 with | none => cfg.workTapes i | some s => Function.update (cfg.workTapes i) (cfg.workTapePos i) s, workTapePos := fun i cfg.workTapePos i + ((finish (modeState m == stDone)).workActions i).2 }.workTapePos = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos }.workTapePos input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none{ state := (finish (modeState m == stDone)).q', inputPos := moveInputPos cfg.inputPos (finish (modeState m == stDone)).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((finish (modeState m == stDone)).workActions i).1 with | none => cfg.workTapes i | some s => Function.update (cfg.workTapes i) (cfg.workTapePos i) s, workTapePos := fun i cfg.workTapePos i + ((finish (modeState m == stDone)).workActions i).2 }.state = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos }.stateinput:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none{ state := (finish (modeState m == stDone)).q', inputPos := moveInputPos cfg.inputPos (finish (modeState m == stDone)).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((finish (modeState m == stDone)).workActions i).1 with | none => cfg.workTapes i | some s => Function.update (cfg.workTapes i) (cfg.workTapePos i) s, workTapePos := fun i cfg.workTapePos i + ((finish (modeState m == stDone)).workActions i).2 }.inputPos = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos }.inputPosinput:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none{ state := (finish (modeState m == stDone)).q', inputPos := moveInputPos cfg.inputPos (finish (modeState m == stDone)).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((finish (modeState m == stDone)).workActions i).1 with | none => cfg.workTapes i | some s => Function.update (cfg.workTapes i) (cfg.workTapePos i) s, workTapePos := fun i cfg.workTapePos i + ((finish (modeState m == stDone)).workActions i).2 }.workTapes = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos }.workTapesinput:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none{ state := (finish (modeState m == stDone)).q', inputPos := moveInputPos cfg.inputPos (finish (modeState m == stDone)).inputMove, workTapes := fun i match (motive := Option (Option (Fin 3)) Option (Fin 3)) ((finish (modeState m == stDone)).workActions i).1 with | none => cfg.workTapes i | some s => Function.update (cfg.workTapes i) (cfg.workTapePos i) s, workTapePos := fun i cfg.workTapePos i + ((finish (modeState m == stDone)).workActions i).2 }.workTapePos = { state := none, inputPos := cfg.inputPos, workTapes := cfg.workTapes, workTapePos := cfg.workTapePos }.workTapePos All goals completed! 🐙

The final output bit says exactly whether the scanner completed its root.

theorem outputSymbol_end {input : List (Fin 3)} (cfg : Cfg 4 (Fin 3) Control input) (m : Scanner.Mode) (hq : cfg.state = some (modeState m)) (hi : cfg.inputSymbol = none) : machine.outputSymbol cfg = some (boolEmb (decide (m = .done))) := input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = noneoutputSymbol cfg = some (boolEmb (decide (m = Scanner.Mode.done))) input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none(match cfg.state with | none => none | some q => (machine.tr q cfg.inputSymbol cfg.workTapeSymbols).outS) = some (boolEmb (decide (m = Scanner.Mode.done))) input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none(match some (modeState m) with | none => none | some q => (machine.tr q cfg.inputSymbol cfg.workTapeSymbols).outS) = some (boolEmb (decide (m = Scanner.Mode.done))) input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none(machine.tr (modeState m) cfg.inputSymbol cfg.workTapeSymbols).outS = some (boolEmb (decide (m = Scanner.Mode.done))) input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputm:Scanner.Modehq:cfg.state = some (modeState m)hi:cfg.inputSymbol = none(finish (modeState m == stDone)).outS = some (boolEmb (decide (m = Scanner.Mode.done))) input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = nonehq:cfg.state = some (modeState Scanner.Mode.tree)(finish (modeState Scanner.Mode.tree == stDone)).outS = some (boolEmb (decide (Scanner.Mode.tree = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = nonecount✝:hq:cfg.state = some (modeState (Scanner.Mode.zeros count✝))(finish (modeState (Scanner.Mode.zeros count✝) == stDone)).outS = some (boolEmb (decide (Scanner.Mode.zeros count✝ = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = noneremaining✝:value✝:hq:cfg.state = some (modeState (Scanner.Mode.size remaining✝ value✝))(finish (modeState (Scanner.Mode.size remaining✝ value✝) == stDone)).outS = some (boolEmb (decide (Scanner.Mode.size remaining✝ value✝ = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = noneremaining✝:value✝:hq:cfg.state = some (modeState (Scanner.Mode.length remaining✝ value✝))(finish (modeState (Scanner.Mode.length remaining✝ value✝) == stDone)).outS = some (boolEmb (decide (Scanner.Mode.length remaining✝ value✝ = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = noneremaining✝:hq:cfg.state = some (modeState (Scanner.Mode.payload remaining✝))(finish (modeState (Scanner.Mode.payload remaining✝) == stDone)).outS = some (boolEmb (decide (Scanner.Mode.payload remaining✝ = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = nonehq:cfg.state = some (modeState Scanner.Mode.done)(finish (modeState Scanner.Mode.done == stDone)).outS = some (boolEmb (decide (Scanner.Mode.done = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = nonehq:cfg.state = some (modeState Scanner.Mode.dead)(finish (modeState Scanner.Mode.dead == stDone)).outS = some (boolEmb (decide (Scanner.Mode.dead = Scanner.Mode.done))) input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = nonehq:cfg.state = some (modeState Scanner.Mode.tree)(finish (modeState Scanner.Mode.tree == stDone)).outS = some (boolEmb (decide (Scanner.Mode.tree = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = nonecount✝:hq:cfg.state = some (modeState (Scanner.Mode.zeros count✝))(finish (modeState (Scanner.Mode.zeros count✝) == stDone)).outS = some (boolEmb (decide (Scanner.Mode.zeros count✝ = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = noneremaining✝:value✝:hq:cfg.state = some (modeState (Scanner.Mode.size remaining✝ value✝))(finish (modeState (Scanner.Mode.size remaining✝ value✝) == stDone)).outS = some (boolEmb (decide (Scanner.Mode.size remaining✝ value✝ = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = noneremaining✝:value✝:hq:cfg.state = some (modeState (Scanner.Mode.length remaining✝ value✝))(finish (modeState (Scanner.Mode.length remaining✝ value✝) == stDone)).outS = some (boolEmb (decide (Scanner.Mode.length remaining✝ value✝ = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = noneremaining✝:hq:cfg.state = some (modeState (Scanner.Mode.payload remaining✝))(finish (modeState (Scanner.Mode.payload remaining✝) == stDone)).outS = some (boolEmb (decide (Scanner.Mode.payload remaining✝ = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = nonehq:cfg.state = some (modeState Scanner.Mode.done)(finish (modeState Scanner.Mode.done == stDone)).outS = some (boolEmb (decide (Scanner.Mode.done = Scanner.Mode.done)))input:List (Fin 3)cfg:Cfg 4 (Fin 3) Control inputhi:cfg.inputSymbol = nonehq:cfg.state = some (modeState Scanner.Mode.dead)(finish (modeState Scanner.Mode.dead == stDone)).outS = some (boolEmb (decide (Scanner.Mode.dead = Scanner.Mode.done))) All goals completed! 🐙
end Geb.BitTree.Elias.Machine