Zero–one law (logic)
In mathematical logic, zero-one law is a property of a logic saying that any property is either almost surely true or almost surely false.[1] Zero-one law holds for first-order logic (without function symbols[2]), first-order logic extended with fixed point operators and first-order with infinite disjunctions and conjunctions. It does not hold for monadic second order logic.
As pointed out by Yuri Gurevich,[2] zero-one law was proven for first-order logic by Yu. V. Glebskii, D. I. Kogan, M. I. Liogon'kii & V. A. Talanov [3] and independently by Ronald Fagin.[4]
Principle
In this article, to keep it simple, we talk about graphs instead of considering arbitrary structures. Given a sentence in some logic, we define to be the proportion of graphs that satisfy among the graphs with exactly vertices. We say that a logic has the zero-one law if converges to 1 or 0, for any sentence of that logic. We set to be that limit to which converges when grows to infinity.
Examples
We give the examples given in [1] p. 236.
Even
Any logic in which "being of size even" is expressible by a formula does not have the zero-one law. Indeed, if is even and if is odd. And the sequence does not converge.
Isolated vertex
Consider the first-order formula that says that there is an isolated vertex: . We have
Indeed, first is the total number of graphs with exactly vertices. Second, there are choices for the isolated vertex, and ways to put edges on the remaining vertices. Thus, is an upper bound on the number of graphs with vertices having an isolated vertex. Thus, .
First-order logic
In this section, we consider first-order logic without function symbols. Note that with function symbols, zero-one law may fail. For instance, the formula where is a constant symbol (i.e. a function symbol of arity 0) would be true half of the times.[2]
Statement
Theorem—First-order logic has the zero-one law: for all first-order formulas , either or .
First-order logic has the zero-one law. The main ingredients of the proof presented in [1] (their proof is about first-order logic with infinite conjunctions and disjunctions but the idea is similar) are the following.
First we introduce so-called extension axioms. The extension axiom says that for any two disjoint subsets and of respective cardinality and , there is a point connected to any points in , but no points in . We show that .
Second, via pebble games, they prove that if two finite graphs satisfy all the extension axioms with , then they satisfy the same first-order formulas with at most variables.
Decidability

Theorem—It is decidable to know whether or for a given first-order formula .
We can define the theory of all extension axioms. This theory is -categorial, meaning that it has only one countable model up to isomorphism. It turns out that model is the Rado graph. Thus, by Lowenheim-Skolem theorem, we can prove that is complete, meaning that for any sentence , either or is entailed by . As is recursive (we have an algorithm that tells whether a formula is an extension axiom or not), we can decide whether or is entailed by , which is equivalent to deciding whether or . Moreover this problem has been shown to be PSPACE-complete.[5]
Other logics
The following logics have the zero-one law:
- First-order logic (as seen above)
- First-order logic with infinite conjunctions and disjunctions (see Theorem 12.2 in [1])
- First-order logic with least fixed-point operators, first-order logic with inflationary fixed-point operators, with partial fixed-point operators (see Corollary 12.3 in [1])
- (see Theorem 12.12 in [1])
- (see Theorem 12.15 in [1])
- First-order logic on grids[6]
The following logics do not have the zero-one law:
- First-order logic with least fixed-point operators with a predicate < interpreted as a total order on the domain (see second paragraph after Corollary 12.3 in [1])
- even if the FO part does not use equality (see Theorem 12.16 in [1])
- MSO (see Exercice 12.6 in [1])
- First-order logic with unary function symbols does not have the zero-one law, but has the convergence law, meaning that for all formulas , the quantity converges.[7]
References
- 1 2 3 4 5 6 7 8 9 10 Libkin, Leonid (2004). Elements of Finite Model Theory. doi:10.1007/978-3-662-07003-1. ISBN 978-3-642-05948-3.
- 1 2 3 Gurevich, Yuri (June 1993), "Zero-one laws", Current Trends in Theoretical Computer Science, World Scientific Series in Computer Science, vol. 40, World Scientific, pp. 293–309, doi:10.1142/9789812794499_0022, ISBN 978-981-02-1462-3, retrieved 2026-06-07
- ↑ Glebskii, Yu. V.; Kogan, D. I.; Liogon'kii, M. I.; Talanov, V. A. (1969-03-01). "Range and degree of realizability of formulas in the restricted predicate calculus". Cybernetics. 5 (2): 142–154. doi:10.1007/BF01071084. ISSN 1573-8337.
- ↑ Fagin, Ronald (1976). "Probabilities on Finite Models". The Journal of Symbolic Logic. 41 (1): 50–58. doi:10.2307/2272945. ISSN 0022-4812. JSTOR 2272945.
- ↑ Grandjean, Etienne (1983). "Complexity of the first-order theory of almost all finite structures". Information and Control. 57 (2–3): 180–204. doi:10.1016/S0019-9958(83)80043-6.
- ↑ Coupier, David; Desolneux, Agnès; Ycart, Bernard (2004). "A Zero-One Law for First-Order Logic on Random Images". In Drmota, Michael; Flajolet, Philippe; Gardy, Danièle; Gittenberger, Bernhard (eds.). Mathematics and Computer Science III. Basel: Birkhäuser. pp. 495–505. doi:10.1007/978-3-0348-7915-6_48. ISBN 978-3-0348-7915-6.
- ↑ Lynch, James F. (1985). "Probabilities of First-Order Sentences about Unary Functions". Transactions of the American Mathematical Society. 287 (2): 543–568. doi:10.2307/1999661. ISSN 0002-9947. JSTOR 1999661.