Documentation

CslibFrontier.Logics.FirstOrder.ZeroOneLaw

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 #

References #

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.