Lax979537.PolynomialTime
Polynomial-time queries on ordered structures
concepts/Lax979537/PolynomialTime.lean · lax-979537
No public endorsements yet.
Loading review…
Sign in with ORCIDConcept map
Definition
A query is polynomial-time decidable when a finite deterministic Turing machine decides the language of encodings of its satisfying pointed structures within a polynomial in the input bit length. Malformed encodings are rejected. The machine and polynomial are fixed for the query.
The machine model and step count are mathlib's bundled finite multi-stack Turing machines (), with identity encoding on input bit strings and a single output bit. This is the same underlying complexity notion used in Lax51, specialized directly to bit-string decision problems. There is no abstract computation oracle or machine-simulation hypothesis.
Lean source view on GitHub
| 1 | import Lax979537.StructureEncoding |
| 2 | import Mathlib.Computability.TuringMachine.Computable |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Polynomial-time queries on ordered structures |
| 7 | type: definition |
| 8 | --- |
| 9 | A query is polynomial-time decidable when a finite deterministic Turing |
| 10 | machine decides the language of encodings of its satisfying pointed |
| 11 | structures within a polynomial in the input bit length. Malformed encodings |
| 12 | are rejected. The machine and polynomial are fixed for the query. |
| 13 | |
| 14 | The machine model and step count are mathlib's bundled finite multi-stack |
| 15 | Turing machines (`TM2ComputableInPolyTime`), with identity encoding on input |
| 16 | bit strings and a single output bit. This is the same underlying complexity |
| 17 | notion used in Lax51, specialized directly to bit-string decision problems. |
| 18 | There is no abstract computation oracle or machine-simulation hypothesis. |
| 19 | -/ |
| 20 | |
| 21 | namespace Lax979537.PolynomialTime |
| 22 | |
| 23 | open Lax979537.OrderedStructures Lax979537.StructureEncoding |
| 24 | |
| 25 | def language {σ : Vocabulary} {k : Nat} (Q : Query σ k) (w : List Bool) : Prop := |
| 26 | ∃ A : PointedStructure σ k, encode A = w ∧ Q A |
| 27 | |
| 28 | def InP {σ : Vocabulary} {k : Nat} (Q : Query σ k) : Prop := |
| 29 | ∃ f : List Bool → Bool, |
| 30 | Nonempty (Turing.TM2ComputableInPolyTime id (fun b => [b]) f) ∧ |
| 31 | ∀ w, f w = true ↔ language Q w |
| 32 | |
| 33 | end Lax979537.PolynomialTime |
| 34 |
Builds on
From Mathlib
Community review
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above; your ORCID profile must share a public name.
0 comments