OAI/Computability/WLIdentification/StackMachines.lean
35 declarations, 0 contain sorry, 0 declared as axioms
- inductive
OAI.WLIdentification.StackModel.Instructionline 12 - structure
OAI.WLIdentification.StackModel.Programline 19 - structure
OAI.WLIdentification.StackModel.Configline 24 - def
OAI.WLIdentification.StackModel.initialline 31 - def
OAI.WLIdentification.StackModel.stepline 34 - def
OAI.WLIdentification.StackModel.runline 46 - abbrev
OAI.WLIdentification.StackModel.Alphabetline 49 - inductive
OAI.WLIdentification.StackModel.Phaseline 51 - def
OAI.WLIdentification.StackModel.emptyDataline 62 - def
OAI.WLIdentification.StackModel.inputDataline 64 - def
OAI.WLIdentification.StackModel.symbolline 67 - def
OAI.WLIdentification.StackModel.decodeSymbolline 73 - theorem
OAI.WLIdentification.StackModel.symbol_emptyline 78 - theorem
OAI.WLIdentification.StackModel.symbol_inputline 81 - theorem
OAI.WLIdentification.StackModel.decode_symbolline 94 - def
OAI.WLIdentification.StackModel.stateline 105 - theorem
OAI.WLIdentification.StackModel.state_ne_oneline 109 - theorem
OAI.WLIdentification.StackModel.state_ne_twoline 112 - def
OAI.WLIdentification.StackModel.dispatchline 115 - abbrev
OAI.WLIdentification.StackModel.compileline 143Source documentation
A concrete finite local table, using only the three frozen I/O codes and finitely many fixed extra symbols and states.
noncomputable abbrev compile (P : Program K Λ R) (input : K) : Machine where …
Mentions: OAI.WLIdentification.StackModel.Program, OAI.WLIdentification.Machine
- theorem
OAI.WLIdentification.StackModel.transition_stateline 151 - def
OAI.WLIdentification.StackModel.columnline 156 - def
OAI.WLIdentification.StackModel.tapeline 158 - theorem
OAI.WLIdentification.StackModel.tape_markerline 162 - theorem
OAI.WLIdentification.StackModel.tape_natline 165 - def
OAI.WLIdentification.StackModel.configline 169 - theorem
OAI.WLIdentification.StackModel.step_configline 179Source documentation
Literal one-transition equation for every interpreter phase.
theorem step_config (p : Phase K Λ R) (z : ℤ) (S : K → Word) : WLIdentification.step (compile P input) (config P input p z S) = let t := dispatch P input p (tape input S z) …Mentions: OAI.WLIdentification.StackModel.Phase, OAI.WLIdentification.Word, OAI.WLIdentification.step, OAI.WLIdentification.StackModel.compile, OAI.WLIdentification.StackModel.config, OAI.WLIdentification.StackModel.dispatch, OAI.WLIdentification.StackModel.tape
- theorem
OAI.WLIdentification.StackModel.step_readonlyline 191 - theorem
OAI.WLIdentification.StackModel.step_back_natline 201 - theorem
OAI.WLIdentification.StackModel.step_back_markerline 208 - theorem
OAI.WLIdentification.StackModel.back_to_markerline 215 - theorem
OAI.WLIdentification.StackModel.back_to_readyline 226 - theorem
OAI.WLIdentification.StackModel.scan_pushline 233Source documentation
No random access is used: a full rightward scan costs one transition per cell.
theorem scan_push (k : K) (label : Λ) (s : R) (b : Bool) (S : K → Word) (n : ℕ) (hn : n ≤ (S k).length) : (WLIdentification.step (compile P input))^[n] (config P input (.push k label s b) 0 S) = config P input (.push k label s b) n S := by …Mentions: OAI.WLIdentification.Word, OAI.WLIdentification.step, OAI.WLIdentification.StackModel.compile, OAI.WLIdentification.StackModel.config
- theorem
OAI.WLIdentification.StackModel.scan_popline 247 - theorem
OAI.WLIdentification.StackModel.tape_pushline 262Source documentation
Erasing the end of a stack, like pushing, only edits one physical cell.
theorem tape_push (S : K → Word) (k : K) (b : Bool) : tape input (Function.update S k (S k ++ [b])) = Function.update (tape input S) ((S k).length : ℤ) (symbol input (some (Function.update (column S (S k).length) k (some b)))) := by …Mentions: OAI.WLIdentification.Word, OAI.WLIdentification.StackModel.tape, OAI.WLIdentification.StackModel.symbol, OAI.WLIdentification.StackModel.column