The 0-1 law for first-order logic on finite graphs #
Theorem (Glebskiĭ–Kogan–Liogon'kiĭ–Talanov 1969; Fagin 1976). For every first-order
sentence φ in the language of graphs, the probability that the uniform random labelled graph
G(n, 1/2) on n vertices satisfies φ tends to 0 or to 1 as n → ∞
[GKLT69] [Fag76] [Libkin2004, Chapter 12].
The proof is Fagin's. Every extension axiom holds almost surely
(Cslib.Logic.FO.graph.tendsto_randomGraphProb_extensionAxiom), hence so does every finite subset
of the theory T of the random graph. By compactness T is satisfiable; it has no finite models
and is ℵ₀-categorical, so by the Łoś–Vaught test it is complete. If T ⊨ φ then a finite
subset of T entails φ, so φ holds almost surely; otherwise T ⊨ ¬φ and φ fails almost
surely. In particular, the sentences holding almost surely are exactly the consequences of T.
The 0-1 law shows that a graph property is not first-order definable when its probability does not
converge to 0 or 1: for example, having an even number of vertices (probability alternating
between 1 and 0) or an even number of edges (probability exactly 1/2 for n ≥ 2).
Main results #
Cslib.Logic.FO.graph.randomGraphProb_satisfies_eq: satisfaction probability inG(n, 1/2)matches sentence probability on graph structures.Cslib.Logic.FO.graph.tendsto_randomGraphProb_finset: every finite subset of the theory of the random graph holds almost surely.Cslib.Logic.FO.graph.isSatisfiable_randomGraphTheory: the theory of the random graph is satisfiable.Cslib.Logic.FO.graph.isComplete_randomGraphTheory: it is complete.Cslib.Logic.FO.graph.zero_one_law: the 0-1 law.Cslib.Logic.FO.graph.tendsto_randomGraphProb_one_iff,Cslib.Logic.FO.graph.tendsto_randomGraphProb_zero_iff: the limit is1exactly whenT ⊨ φ, and0exactly whenT ⊨ ¬φ.Cslib.Logic.FO.graph.not_exists_sentence_of_not_tendsto: a property whose probability tends neither to0nor to1agrees with no sentence on all large graphs.Cslib.Logic.FO.graph.not_exists_sentence_even_card,Cslib.Logic.FO.graph.not_definable_even_card: an even number of vertices is not first-order definable on graphs.Cslib.Logic.FO.graph.not_exists_sentence_evenEdges: neither is an even number of edges.
References #
- [Y. V. Glebskiĭ, D. I. Kogan, M. I. Liogon'kiĭ and V. A. Talanov, Range and degree of realizability of formulas in the restricted predicate calculus] [GKLT69]
- R. Fagin, Probabilities on finite models
- L. Libkin, Elements of Finite Model Theory, Chapter 12.
The sequence of uniform random graph distributions mapped to first-order graph structures.
The probability that G(n, 1/2) satisfies a first-order sentence φ equals the sentence
probability under the pushforward distribution on graph structures.
The probability that G(n, 1/2) satisfies a property of its structure equals the structure
probability under the pushforward distribution on graph structures.
Every sentence of the theory of the random graph holds in G(n, 1/2) with probability tending
to 1.
Every sentence of the theory of the random graph holds in randomGraphStructure with
probability tending to 1.
Every finite subset of the theory of the random graph holds in G(n, 1/2) with probability
tending to 1.
The theory of the random graph is satisfiable. By compactness it suffices that each finite
subset has a model, and a finite subset holds in G(n, 1/2) with positive probability for large
n.
The theory of the random graph is complete, by the Łoś–Vaught test: it is satisfiable, has
no finite models and is ℵ₀-categorical in a countable language [Fag76]
[Libkin2004, Chapter 12].
A consequence of the theory of the random graph holds in G(n, 1/2) with probability tending
to 1.
A sentence refuted by the theory of the random graph holds in G(n, 1/2) with probability
tending to 0.
The 0-1 law for first-order logic on graphs (Glebskiĭ–Kogan–Liogon'kiĭ–Talanov; Fagin).
For every first-order sentence φ in the language of graphs, the probability that the uniform
random labelled graph G(n, 1/2) satisfies φ tends to 0 or to 1
[GKLT69] [Fag76] [Libkin2004, Chapter 12].
A sentence holds almost surely exactly when it is a consequence of the theory of the random graph [Fag76].
A sentence fails almost surely exactly when the theory of the random graph refutes it.
Properties that are not first-order definable #
If the probability of a graph property P tends neither to 0 nor to 1, then no
first-order sentence agrees with P on all graphs with sufficiently many vertices.
Parity of the number of vertices is not first-order definable on graphs: no sentence holds in exactly the graphs with an even number of vertices, even among graphs with sufficiently many vertices [Libkin2004, Chapter 12].
The class of finite structures in the language of graphs with an even number of elements is
not first-order definable (Cslib.Logic.FO.Definable).
Parity of the number of edges is not first-order definable on graphs: no sentence holds in
exactly the graphs with an even number of edges, even among graphs with sufficiently many
vertices. The probability of an even number of edges is exactly 1/2 for n ≥ 2.