While this submission is a draft, it cannot be used by other submissions.

Acceptance by Turing machines in bounded space

Lax134656.SpaceBoundedMachines · concepts/Lax134656/SpaceBoundedMachines.lean · lax-134656

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural 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
    5 concepts; 15 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Mathlib.ModelTheory.Semantics
    2import Mathlib.Logic.Relation
    3import Lax904597.Problems
    4import Lax485149.Problems
    5import Lax904597.Machines
    6import Lax535992.DeterministicMachines
    7
    8/-!
    9---
    10title: Acceptance by Turing machines in bounded space
    11type: definition
    12---
    13An instance is a machine instance of the NP core: a finite structure
    14describing a Turing machine with its input and a linear order of positions.
    15The machine accepts in bounded space when some run from an initial
    16configuration reaches an accepting state, whatever its length: the tape is
    17the set of positions, so the space is bounded by the instance, while the
    18number of steps is not. An instance is a yes-instance of machine acceptance
    19in bounded space when it is well formed and accepts in this sense, and of
    20its deterministic variant when the machine is moreover deterministic; each
    21problem is the decision problem of the structures isomorphic to such an
    22instance.
    23-/
    24
    25namespace Lax134656.SpaceBoundedMachines
    26
    27open FirstOrder FirstOrder.Language
    28open Lax904597.Problems Lax904597.Machines Lax485149.Problems Lax535992.DeterministicMachines
    29
    30namespace TMData
    31
    32variable {A : Type} (M : TMData A)
    33
    34/-- **Acceptance in bounded space**: some run from an initial configuration
    35reaches an accepting state, with *no bound on its length*. The space is
    36bounded by construction, the tape being indexed by the positions; a run may
    37visit exponentially many configurations, so acceptance is reachability in the
    38configuration graph. -/
    39def AcceptsSpace : Prop :=
    40 ∃ c₀ c : Config A, M.IsInit c₀ ∧ Relation.ReflTransGen M.Step c₀ c ∧ M.Acc c.state
    41
    42end TMData
    43
    44/-- The instance is a well-formed machine accepting in bounded space. -/
    45def 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
    49space. -/
    50def 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. -/
    54def NTMAcceptSpace : DecisionProblem turing :=
    55 DecisionProblem.ofPred fun A _ => NTMAcceptsSpace A
    56
    57/-- Deterministic machine acceptance in bounded space. -/
    58def DTMAcceptSpace : DecisionProblem turing :=
    59 DecisionProblem.ofPred fun A _ => DTMAcceptsSpace A
    60
    61end Lax134656.SpaceBoundedMachines
    62

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…