Acceptance by Turing machines in bounded space
Lax134656.SpaceBoundedMachines · concepts/Lax134656/SpaceBoundedMachines.lean · lax-134656
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
An instance is a machine instance of the NP core: a finite structure describing a Turing machine with its input and a linear order of positions. The machine accepts in bounded space when some run from an initial configuration reaches an accepting state, whatever its length: the tape is the set of positions, so the space is bounded by the instance, while the number of steps is not. An instance is a yes-instance of machine acceptance in bounded space when it is well formed and accepts in this sense, and of its deterministic variant when the machine is moreover deterministic; each problem is the decision problem of the structures isomorphic to such an instance.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.ModelTheory.Semantics |
| 2 | import Mathlib.Logic.Relation |
| 3 | import Lax904597.Problems |
| 4 | import Lax485149.Problems |
| 5 | import Lax904597.Machines |
| 6 | import Lax535992.DeterministicMachines |
| 7 | |
| 8 | /-! |
| 9 | --- |
| 10 | title: Acceptance by Turing machines in bounded space |
| 11 | type: definition |
| 12 | --- |
| 13 | An instance is a machine instance of the NP core: a finite structure |
| 14 | describing a Turing machine with its input and a linear order of positions. |
| 15 | The machine accepts in bounded space when some run from an initial |
| 16 | configuration reaches an accepting state, whatever its length: the tape is |
| 17 | the set of positions, so the space is bounded by the instance, while the |
| 18 | number of steps is not. An instance is a yes-instance of machine acceptance |
| 19 | in bounded space when it is well formed and accepts in this sense, and of |
| 20 | its deterministic variant when the machine is moreover deterministic; each |
| 21 | problem is the decision problem of the structures isomorphic to such an |
| 22 | instance. |
| 23 | -/ |
| 24 | |
| 25 | namespace Lax134656.SpaceBoundedMachines |
| 26 | |
| 27 | open FirstOrder FirstOrder.Language |
| 28 | open Lax904597.Problems Lax904597.Machines Lax485149.Problems Lax535992.DeterministicMachines |
| 29 | |
| 30 | namespace TMData |
| 31 | |
| 32 | variable {A : Type} (M : TMData A) |
| 33 | |
| 34 | /-- **Acceptance in bounded space**: some run from an initial configuration |
| 35 | reaches an accepting state, with *no bound on its length*. The space is |
| 36 | bounded by construction, the tape being indexed by the positions; a run may |
| 37 | visit exponentially many configurations, so acceptance is reachability in the |
| 38 | configuration graph. -/ |
| 39 | def AcceptsSpace : Prop := |
| 40 | ∃ c₀ c : Config A, M.IsInit c₀ ∧ Relation.ReflTransGen M.Step c₀ c ∧ M.Acc c.state |
| 41 | |
| 42 | end TMData |
| 43 | |
| 44 | /-- The instance is a well-formed machine accepting in bounded space. -/ |
| 45 | def NTMAcceptsSpace (A : Type) [turing.Structure A] : Prop := |
| 46 | (tmData A).WellFormed ∧ TMData.AcceptsSpace (tmData A) |
| 47 | |
| 48 | /-- The instance is a well-formed deterministic machine accepting in bounded |
| 49 | space. -/ |
| 50 | def DTMAcceptsSpace (A : Type) [turing.Structure A] : Prop := |
| 51 | (tmData A).WellFormed ∧ TMData.Deterministic (tmData A) ∧ TMData.AcceptsSpace (tmData A) |
| 52 | |
| 53 | /-- Machine acceptance in bounded space. -/ |
| 54 | def NTMAcceptSpace : DecisionProblem turing := |
| 55 | DecisionProblem.ofPred fun A _ => NTMAcceptsSpace A |
| 56 | |
| 57 | /-- Deterministic machine acceptance in bounded space. -/ |
| 58 | def DTMAcceptSpace : DecisionProblem turing := |
| 59 | DecisionProblem.ofPred fun A _ => DTMAcceptsSpace A |
| 60 | |
| 61 | end Lax134656.SpaceBoundedMachines |
| 62 |
Used by
Lax134656.AbiteboulVianuLax134656.AbiteboulVianuOrderedLax134656.HierarchyInPSPACELax134656.InflationaryInPartialLax134656.PartialFixedPointCaptureLax134656.PartialFixedPointClosureLax134656.PSPACEClosureLax134656.PSPACEEqCoPSPACELax134656.QsatInvarianceLax134656.QsatPSPACECompleteLax134656.SpaceBoundedMachineInvarianceLax134656.SpaceMachinesPSPACECompleteLax134656.SuccinctReachInvarianceLax134656.SuccinctReachPSPACECompleteLax134656.TransitiveClosureWithoutOrder
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments