NP and PTIME on bit strings: the descriptive-complexity library against Fagin and Immerman–Vardi
No public endorsements yet.
Loading review…
Sign in with ORCIDAbstract
The classes NP and PTIME of the descriptive-complexity library, which are defined by logics on finite structures, are the textbook classes on bit strings. Over a vocabulary with finitely many relation symbols, a decision problem is in NP exactly when the language of the binary encodings of its yes-instances has polynomially bounded certificates checked in polynomial time by a Mathlib Turing machine (FinTM2); it is in PTIME exactly when such a machine decides that language in polynomial time. The encodings and the machine classes are those of Szymon Toruńczyk's lax-988886 (Fagin's theorem) and lax-751879 (the Immerman–Vardi theorem), required here, and each machine statement is one application of a registered capture theorem.
The content of this submission is the logical side, which assumes neither theorem: the library's second-order definition of NP agrees with the existential second-order logic of lax-988886, and the library's definition of PTIME with the FO(LFP) of lax-751879. The second agreement carries the proofs. Going to the archive's syntax turns one simultaneous least fixed point into nested ones, by Bekić's principle. Coming back turns nested, negated, and parameterized fixed points into one inflationary induction, by a construction that iterates a program in a relation it reads, its rounds being the tuples of the universe, each round starting from empty relations and opening once the previous round has converged.
Concepts
- thm✓
LogicalBridge - thm✓
MachineBridge
- thm✓
Lax535992.HornSatPTIMEComplete - thm✓
Lax751879.FixedPointEvaluation - thm✓
Lax751879.ImmermanVardi - thm✓
Lax904597.CookLevin - thm✓
Lax988886.Fagin - def✓
Lax751879.FixedPointSemantics - def✓
Lax751879.LeastFixedPoints - def✓
Lax751879.StructureEncoding - def✓
Lax904597.Machines - def✓
Lax988886.ExistentialSecondOrder
- def
Lax485149.ClassL - def
Lax485149.ClassNL - def
Lax485149.Complement - def
Lax485149.DeterministicTransitiveClosure - def
Lax485149.KromFragment - def
Lax485149.Problems - def
Lax485149.SecondOrderAtoms - def
Lax485149.TransitiveClosure - def
Lax535992.CircuitValue - def
Lax535992.ClassPTIME - def
Lax535992.DeterministicMachines - def
Lax535992.Game - def
Lax535992.HornFragment - def
Lax535992.HornSat - def
Lax535992.InflationaryFixedPoint - def
Lax535992.LeastFixedPoint - def
Lax751879.FixedPointSyntax - def
Lax751879.OrderedStructures - def
Lax751879.PolynomialTime - def
Lax904597.Classes - def
Lax904597.Interpretations - def
Lax904597.Problems - def
Lax904597.Relativized - def
Lax904597.Sat - def
Lax904597.SecondOrder - def
Lax988886.FiniteStructures - def
Lax988886.NondeterministicPolynomialTime
Concept map
Proofs
Proof networkview on GitHub
Proof list
Lean sources for these proofs: proofs/ on GitHub
Proof code is not displayed; the archive records each proof's checked relationship between claims.
Related submissions
Submission map
Cite this
This is only the formalizers. The authors of the formalized results may be different (see References).
@misc{lax-832283,
author = {Pierre Senellart and Claude (Anthropic)},
title = {NP and PTIME on bit strings: the descriptive-complexity library against Fagin and Immerman–Vardi},
year = {2026},
howpublished = {Lax Archive, lax-832283},
url = {https://laxarchive.org/lax-832283/},
note = {draft},
}
References
- Pierre Senellart and Anton Gnatenko. Descriptive Complexity in Lean: Completeness by First-Order Reductions. 2026. arXiv:2609.18261
- Ronald Fagin. Generalized first-order spectra and polynomial-time recognizable sets. In Complexity of Computation 7:43–73, 1974.
- Moshe Y. Vardi. The Complexity of Relational Query Languages (Extended Abstract). In Proceedings of the 14th Annual ACM Symposium on Theory of Computing, May 5-7, 1982, San Francisco, California, USA 137–146, 1982. doi:10.1145/800070.802186
- Neil Immerman. Relational Queries Computable in Polynomial Time. Inf. Control. 68(1-3):86–104, 1986. doi:10.1016/S0019-9958(86)80029-8
- Hans Bekić. Definable Operations in General Algebras, and the Theory of Automata and Flowcharts. In Programming Languages and Their Definition – Hans Bekić (1936-1982) 177:30–55, 1984. doi:10.1007/BFb0048939
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments