OAI/Computability/SpaceSimulation/StackMachine.lean
23 declarations, 0 contain sorry, 0 declared as axioms
A finite-control intermediate machine with a fixed number of stacks. Stack alphabet binary, top at the start of the lists. We bound lengths per stack; the fixed number of stacks makes this sufficient.
- inductive
OAI.Fifths.StOpline 10 - def
OAI.Fifths.StOp.applyline 16Source documentation
Popping empty is allowed and does nothing.
def apply : StOp → List Bool → List Bool | keep, l => l | push b, l => b :: l | pop, l => l.tail end StOp
Mentions: OAI.Fifths.StOp
- structure
OAI.Fifths.Storeline 22 - structure
OAI.Fifths.StChangeline 26 - structure
OAI.Fifths.SActionline 30 - def
OAI.Fifths.StChange.noneline 35 - def
OAI.Fifths.SAction.withStateline 41 - def
OAI.Fifths.SAction.noneline 42 - def
OAI.Fifths.Store.initline 48 - def
OAI.Fifths.Store.seeline 51 - def
OAI.Fifths.Store.performline 54 - theorem
OAI.Fifths.Store.stationaryline 57 - def
OAI.Fifths.Store.okline 60 - theorem
OAI.Fifths.Store.ok.monoline 62 - structure
OAI.Fifths.SMline 67Source documentation
Usage as bounded computations will have X,J,K and Y finite.
structure SM (X J K Y : Type) where …
- abbrev
OAI.Fifths.SM.Cfgline 77 - def
OAI.Fifths.SM.stepline 79 - abbrev
OAI.Fifths.SM.Runline 85Source documentation
Auxiliary runs at any program counter.
abbrev Run (i : Inputs X J) (B : ℕ) : M.Cfg → M.Cfg → Y → Prop := …
Mentions: OAI.Fifths.Inputs
- def
OAI.Fifths.SM.Execline 88 - theorem
OAI.Fifths.SM.Exec.startOkline 93 - theorem
OAI.Fifths.SM.Exec.endOkline 97 - theorem
OAI.Fifths.SM.Exec.monoline 101 - theorem
OAI.Fifths.SM.Exec.uniqueline 105