theorem
MindFormal.A595Paper.CodeLayout.last_instruction
{R g L : ℕ}
(layout : CodeLayout R (g + 1) L)
(initial : Registers)
(ready : layout.OperandsReady initial)
:
∃ (n : ℕ) (bit : Bool),
n ≤ 90 * (L + 1) ^ 3 ∧ layout.memoryAt initial (g + 1) (layout.address g 2) = some bit ∧ MachineRun norTable
(norConfig (layout.data (layout.memoryAt initial g)) (some (layout.instruction g)) none none
(layout.fieldPos g 0) NorState.activateFirst)
n (norConfig (reportData (layout.data (layout.memoryAt initial (g + 1))) bit) none none none 1 NorState.halt)
theorem
MindFormal.A595Paper.CodeLayout.complete_program
{R g L : ℕ}
(layout : CodeLayout R (g + 1) L)
(initial : Registers)
(ready : layout.OperandsReady initial)
:
∃ (n : ℕ) (bit : Bool),
n ≤ 99 * (g + 1 + 2) * (L + 1) ^ 3 ∧ layout.memoryAt initial (g + 1) (layout.address g 2) = some bit ∧ MachineRun norTable (norConfig (layout.data initial) none none none 3 NorState.findInstruction) n
(norConfig (reportData (layout.data (layout.memoryAt initial (g + 1))) bit) none none none 1 NorState.halt)
Complete counted execution of a represented NOR program, including initial instruction search, every operand/destination search, instruction advance, the final output search, and canonical report formatting.