A represented program carries addresses and their finite bounds only. Its result and execution are proved rather than supplied.
- registers : ℕ
Instances For
Equations
- P.address g = ![(P.instruction g).1, (P.instruction g).2.1, (P.instruction g).2.2]
Instances For
Equations
Instances For
theorem
MindFormal.A695LogicPaper.GenericPaper.Program.memoryAt
(P : Program)
(mem : BooleanArithmetic.Memory)
(k : ℕ)
(hk : k ≤ P.code.length)
:
The interpreter's register recurrence is the actual sequential NOR execution, with every initially represented register populated.
theorem
MindFormal.A695LogicPaper.GenericPaper.Program.operands_ready
(P : Program)
(mem : BooleanArithmetic.Memory)
:
P.description.layout.OperandsReady fun (r : ℕ) => some (mem r)
theorem
MindFormal.A695LogicPaper.GenericPaper.Program.complete_layout
{R G L : ℕ}
(layout : A595Paper.CodeLayout R G L)
(initial : A595Paper.Registers)
(ready : layout.OperandsReady initial)
(hG : 0 < G)
:
∃ (n : ℕ) (bit : Bool),
n ≤ 99 * (G + 2) * (L + 1) ^ 3 ∧ layout.memoryAt initial G (layout.address (G - 1) 2) = some bit ∧ A595Paper.MachineRun A595Paper.norTable
(A595Paper.norConfig (layout.data initial) none none none 3 A595Paper.NorState.findInstruction) n
(A595Paper.norConfig (A595Paper.reportData (layout.data (layout.memoryAt initial G)) bit) none none none 1
A595Paper.NorState.halt)
theorem
MindFormal.A695LogicPaper.GenericPaper.Program.complete
(P : Program)
(mem : BooleanArithmetic.Memory)
(hcode : 0 < P.code.length)
:
∃ (n : ℕ) (bit : Bool),
n ≤ 99 * (P.code.length + 2) * (P.description.span + 1) ^ 3 ∧ BooleanArithmetic.run P.code mem (P.address (P.code.length - 1) 2) = bit ∧ A595Paper.MachineRun A595Paper.norTable
(A595Paper.norConfig (P.description.data fun (r : ℕ) => some (mem r)) none none none 3
A595Paper.NorState.findInstruction)
n
(A595Paper.norConfig
(A595Paper.reportData (P.description.data fun (r : ℕ) => some (BooleanArithmetic.run P.code mem r)) bit) none
none none 1 A595Paper.NorState.halt)
Literal native-control execution for any nonempty finite NOR program. This includes the operand/destination scans and canonical output report.