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.MachineHeader
set_option doc.verso true

Executing raw leaf payloads

Each payload bit advances the input and decrements its remaining length. The final bit also erases both binary fields and completes the leaf. These statements include the exact machine transition count and the work-tape interval visited by every execution prefix.

Main statements

  • configs_payload executes one raw payload bit.

  • configs_payload_headBound bounds all intermediate head positions.

Tags

Elias delta code, Turing machine, payload, simulation

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

Erasing complete binary fields returns to the scalar leaf-completion boundary.

theorem configs_clear_scan (input : List (Fin 3)) (pos : Fin (input.length + 2)) (pending : ) (bs cs : List Bool) (hp : 0 < pending) : machine.configs (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = modelCfg input pos (Scanner.finish pending) [] [] machine.outputString (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = [] := input:List (Fin 3)pos:Fin (input.length + 2)pending:bs:List Boolcs:List Boolhp:0 < pendingconfigs (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = modelCfg input pos (Scanner.finish pending) [] [] machine.outputString (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:bs:List Boolcs:List Boolhp:0 < pendingh:configs (clearingCfg (scanCfg input pos stClear pending 0 bs cs) bs cs (bs.length + 1) (cs.length + 1)) (max (bs.length + 1) (cs.length + 1) + 2) = completedCfg (scanCfg input pos stClear pending 0 bs cs) machine.outputString (clearingCfg (scanCfg input pos stClear pending 0 bs cs) bs cs (bs.length + 1) (cs.length + 1)) (max (bs.length + 1) (cs.length + 1) + 2) = []configs (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = modelCfg input pos (Scanner.finish pending) [] [] machine.outputString (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:bs:List Boolcs:List Boolhp:0 < pendingh:configs (scanCfg input pos stClear pending 0 bs cs) (max (bs.length + 1) (cs.length + 1) + 2) = modelCfg input pos (Scanner.finish pending) [] [] machine.outputString (scanCfg input pos stClear pending 0 bs cs) (max (bs.length + 1) (cs.length + 1) + 2) = []configs (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = modelCfg input pos (Scanner.finish pending) [] [] machine.outputString (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = [] simpa only [show max (bs.length + 1) (cs.length + 1) + 2 = max bs.length cs.length + 3 input:List (Fin 3)pos:Fin (input.length + 2)pending:bs:List Boolcs:List Boolhp:0 < pendingconfigs (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = modelCfg input pos (Scanner.finish pending) [] [] machine.outputString (scanCfg input pos stClear pending 0 bs cs) (max bs.length cs.length + 3) = [] All goals completed! 🐙] using h

Reading one payload bit includes cleanup exactly when its remaining count is one.

theorem configs_payload (input : List (Fin 3)) (pos : Fin (input.length + 2)) (pending remaining : ) (bs cs : List Bool) (b : Bool) (hp : 0 < pending) (hr : 0 < remaining) (hc : Counter.value cs = remaining) (hin : (scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)) : machine.configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = (if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] := input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = [](configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true ((Counter.decrement cs).any id)) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = [](configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true ((Counter.decrement cs).any id)) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:remaining = 1(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = []input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true ((Counter.decrement cs).any id)) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:¬remaining = 1(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true ((Counter.decrement cs).any id)) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:remaining = 1(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true ((Counter.decrement cs).any id)) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:remaining = 1hseen:(Counter.decrement cs).any id = false(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:remaining = 1hseen:(Counter.decrement cs).any id = false(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:remaining = 1hseen:(Counter.decrement cs).any id = falsehfirst:configs (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = [](configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:remaining = 1hseen:(Counter.decrement cs).any id = falsehfirst:configs (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = []hclear:configs (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) (max bs.length (Counter.decrement cs).length + 3) = modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] machine.outputString (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) (max bs.length (Counter.decrement cs).length + 3) = [](configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:remaining = 1hseen:(Counter.decrement cs).any id = falsehfirst:configs (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = []hclear:configs (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) (max bs.length cs.length + 3) = modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] machine.outputString (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) (max bs.length cs.length + 3) = [](configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:remaining = 1hseen:(Counter.decrement cs).any id = falsehfirst:configs (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = []hclear:configs (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) (max bs.length cs.length + 3) = modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] machine.outputString (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) (max bs.length cs.length + 3) = []hall:configs (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3) + (max bs.length cs.length + 3)) = modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3) + (max bs.length cs.length + 3)) = [](configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] simpa only [he, reduceIte, show 1 + (2 * cs.length + 3) + (max bs.length cs.length + 3) = 2 * cs.length + max bs.length cs.length + 7 input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] All goals completed! 🐙] using hall input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true ((Counter.decrement cs).any id)) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:¬remaining = 1(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true ((Counter.decrement cs).any id)) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:¬remaining = 1hseen:(Counter.decrement cs).any id = true(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true true) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:¬remaining = 1hseen:(Counter.decrement cs).any id = true(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)hread:configs (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) 1 = []hdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true true) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = []he:¬remaining = 1hseen:(Counter.decrement cs).any id = truehall:configs (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = scanCfg input (moveInputPos pos 1) (afterDecrement true true) pending 0 bs (Counter.decrement cs) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (1 + (2 * cs.length + 3)) = [](configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] simpa only [he, reduceIte, afterDecrement, show 1 + (2 * cs.length + 3) = 2 * cs.length + 4 input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolhp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)(configs (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = if remaining = 1 then modelCfg input (moveInputPos pos 1) (Scanner.finish pending) [] [] else scanCfg input (moveInputPos pos 1) stPayloadBit pending 0 bs (Counter.decrement cs)) machine.outputString (scanCfg input pos stPayloadBit pending 0 bs cs) (if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) = [] All goals completed! 🐙] using hall

Every payload-bit execution prefix stays inside a bound containing the initial field blanks and the positive pending count.

theorem configs_payload_headBound (input : List (Fin 3)) (pos : Fin (input.length + 2)) (pending remaining : ) (bs cs : List Bool) (b : Bool) (width : ) (hp : 0 < pending) (hr : 0 < remaining) (hc : Counter.value cs = remaining) (hpw : pending width) (hbw : bs.length + 1 width) (hcw : cs.length + 1 width) (hin : (scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)) (t : ) (ht : t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4) : HeadBound width (machine.configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) := input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs csHeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t)input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:¬remaining = 1HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1hseen:(Counter.decrement cs).any id = falseHeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1hseen:(Counter.decrement cs).any id = falsehdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true ((Counter.decrement cs).any id)) pending 0 bs (Counter.decrement cs)HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1hseen:(Counter.decrement cs).any id = falsehdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs)HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1hseen:(Counter.decrement cs).any id = falsehdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs)hclear: r max bs.length cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) r)HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) apply headBound_succ _ ((2 * cs.length + 3) + (max bs.length cs.length + 3)) width hstart ?_ t (input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1hseen:(Counter.decrement cs).any id = falsehdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs)hclear: r max bs.length cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) r)t 2 * cs.length + 3 + (max bs.length cs.length + 3) + 1 input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1hseen:(Counter.decrement cs).any id = falsehdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs)hclear: r max bs.length cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) r)ht:t 2 * cs.length + max bs.length cs.length + 7t 2 * cs.length + 3 + (max bs.length cs.length + 3) + 1; All goals completed! 🐙) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1hseen:(Counter.decrement cs).any id = falsehdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs)hclear: r max bs.length cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) r) t 2 * cs.length + 3 + (max bs.length cs.length + 3), HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1hseen:(Counter.decrement cs).any id = falsehdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs)hclear: r max bs.length cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) r) t max bs.length cs.length + 3, HeadBound width (configs (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3)) t) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:remaining = 1hseen:(Counter.decrement cs).any id = falsehdec:configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) (2 * cs.length + 3) = scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs)hclear: r max bs.length cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) stClear pending 0 bs (Counter.decrement cs)) r) t max bs.length cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (afterDecrement true false) pending 0 bs (Counter.decrement cs)) t) All goals completed! 🐙 input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:¬remaining = 1HeadBound width (configs (scanCfg input pos stPayloadBit pending 0 bs cs) t) apply headBound_succ _ (2 * cs.length + 3) width hstart ?_ t (input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:¬remaining = 1t 2 * cs.length + 3 + 1 input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:¬remaining = 1ht:t 2 * cs.length + 4t 2 * cs.length + 3 + 1; All goals completed! 🐙) input:List (Fin 3)pos:Fin (input.length + 2)pending:remaining:bs:List Boolcs:List Boolb:Boolwidth:hp:0 < pendinghr:0 < remaininghc:Counter.value cs = remaininghpw:pending widthhbw:bs.length + 1 widthhcw:cs.length + 1 widthhin:(scanCfg input pos stPayloadBit pending 0 bs cs).inputSymbol = some (boolEmb b)t:ht:t if remaining = 1 then 2 * cs.length + max bs.length cs.length + 7 else 2 * cs.length + 4hb: (q : Control), HeadBound width (scanCfg input (moveInputPos pos 1) q pending 0 bs cs)hdecbound: r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r)hstart:HeadBound width (scanCfg input pos stPayloadBit pending 0 bs cs)hs:step (scanCfg input pos stPayloadBit pending 0 bs cs) = scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cshe:¬remaining = 1 r 2 * cs.length + 3, HeadBound width (configs (scanCfg input (moveInputPos pos 1) (stDecrement true) pending 0 bs cs) r) All goals completed! 🐙
end Geb.BitTree.Elias.Machine