Mathematical logic and foundations Model theory: types, categoricity, stability Theorem
Fagin's theorem
Statement
Let be a finite relational signature. Let be a class of finite -structures that is closed under isomorphism. Then the following are equivalent.
- The class is in NP: some nondeterministic Turing machine decides, in time polynomial in the size of a finite -structure , whether .
- There is an existential second-order sentence such that a finite -structure belongs to if and only if it satisfies this sentence.
Here are relation variables, and is a first-order sentence in the signature .
Remarks
From 2 to 1: a machine guesses the relations on the finite universe, which takes polynomially many bits. It then checks the first-order sentence , which takes polynomial time for a fixed . From 1 to 2: the sentence guesses a linear order of the universe and relations that encode an accepting computation of the machine. The computation of length is coded with tuples of length , and checks that each step follows the transition rules.
Example: the class of finite graphs that admit a proper colouring with three colours is in NP. It is defined by the sentence . Here says that each vertex lies in , or , and that no edge joins two vertices in the same set.
Going deeper
For a student
Fagin's theorem started descriptive complexity, which characterises complexity classes by logics without any reference to machines. It shows that NP is closed under complement if and only if existential second-order logic has the same power as universal second-order logic on finite structures. Other results of this kind characterise P on ordered finite structures by first-order logic with a least fixed point operator. The theorem belongs to finite model theory, where classical tools such as compactness are not available.
Reading path
To understand this page from the ground up, read these 5 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Second-order logic concept
- Sentence concept
- Structure concept
- Turing machine concept
- Fagin's theorem statement
Further reading
About this page
| Tag | BG8Q0BYSQ3 |
|---|---|
| URI | m2://BG8Q0BYSQ3 |
| Kind | statement, theorem |
| Writing | W0 stub |
| MSC | 03C13, 68Q19, 68Q15 |
| Status | This copy of the site has no build data. Run m2 status BG8Q0BYSQ3. |
| About | Finite model theory |
| Uses | Structure, Second-order logic, Sentence, Turing machine |
| Same as | |
| Changed | 2 November 2026 |
Markdown ยท JSON ยท Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.
What links here
No page links to this page yet.