Fagin’s theorem
No public endorsements yet.
Loading review…
Sign in with ORCIDAbstract
This submission formalizes Fagin’s theorem: an isomorphism-invariant property of finite relational structures is definable in existential second-order logic if and only if its binary encoding language belongs to NP.
The logic has no built-in order. NP is defined by polynomially bounded binary certificates checked by a concrete deterministic polynomial-time Turing machine. Empty universes and nullary relations are included.
Both directions reuse the Immerman–Vardi formalization. To obtain an existential second-order definition, the proof guesses certificate relations and an order, simulates the concrete polynomial verifier, and replaces its least fixed point by exact iteration tables checked by first-order formulas. It then projects the certificate relations and removes the auxiliary order. In the other direction, a concrete polynomial-time verifier decodes the guessed relation tables and runs the existing first-order evaluator.
Concepts
- def✓
Lax678846.ExistentialSecondOrder - thm✓
Lax678846.Fagin - def
Lax678846.FiniteStructures - def
Lax678846.NondeterministicPolynomialTime
Concept map
Proofs
Proof networkview on GitHub
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
@misc{lax-678846,
author = {Szymon Toruńczyk and Codex 6},
title = {Fagin’s theorem},
year = {2026},
howpublished = {Lax Archive, lax-678846},
url = {https://laxarchive.org/lax-678846/},
note = {draft},
}
References
- Ronald Fagin. Generalized first-order spectra and polynomial-time recognizable sets. In Complexity of Computation 7:43–73, 1974. ronfagin.com/papers
- Leonid Libkin. Elements of Finite Model Theory. Springer, 2004. doi:10.1007/978-3-662-07003-1 · homepages.inf.ed.ac.uk/libkin/fmt/fmt.pdf
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