Documentation

CslibFrontier.Logics.FirstOrder.FiniteVariable.WeisfeilerLeman

The Cai–Fürer–Immerman equivalence: k-WL and C^{k+1} #

On finite simple graphs, k-dimensional Weisfeiler–Leman (SimpleGraph.wlColoring, SimpleGraph.wlHistogram) characterizes equivalence in the (k + 1)-variable counting logic C^{k+1} (Cslib.Logic.FO.FiniteVariable.CountingFormula Language.graph (k + 1)) via Hella's bijective (k + 1)-pebble game ([CFI92], Section 5, Theorem 5.2).

Main results #

References #

When all pebbles are placed, a partial isomorphism on simple graphs is equality of SimpleGraph.tupleAtom.

theorem Cslib.Logic.FO.partialIsoOn_graph_range_castSucc_iff_tupleAtom {V : Type u_1} {W : Type u_2} {G : SimpleGraph V} {H : SimpleGraph W} {k : ℕ} {u : Fin k → V} {w : Fin k → W} {v₀ : V} {w₀ : W} :

On Set.range Fin.castSucc, a partial isomorphism between Fin.snoc u v₀ and Fin.snoc w w₀ is equality of SimpleGraph.tupleAtom on u and w.

Tuple and pebble index combinatorics #

Bijective (k + 1)-pebble game and k-WL #

theorem Cslib.Logic.FO.bijPebbleWins_graph_univ_snoc_iff {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] {G : SimpleGraph V} {H : SimpleGraph W} {k : ℕ} (n : ℕ) (u : Fin k → V) (w : Fin k → W) (v : V) (z : W) :

With all k + 1 pebbles placed on Fin.snoc u v and Fin.snoc w z, Duplicator wins the n-round bijective game iff u and w have the same round-n k-WL color and (u, v) and (w, z) have the same round-n step profile.

theorem Cslib.Logic.FO.bijPebbleWins_graph_range_castSucc_iff {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] {G : SimpleGraph V} {H : SimpleGraph W} {k : ℕ} (n : ℕ) (u : Fin k → V) (w : Fin k → W) (v₀ : V) (w₀ : W) :

Bijective (k + 1)-pebble game and k-WL tuple colors. With the first k pebbles placed on u : Fin k → V and w : Fin k → W, Duplicator wins the n-round bijective (k + 1)-pebble game on simple graphs if and only if u and w receive the same k-WL color in round n.

theorem Cslib.Logic.FO.bijPebbleWinsForever_graph_range_castSucc_iff {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] {G : SimpleGraph V} {H : SimpleGraph W} {k : ℕ} {u : Fin k → V} {w : Fin k → W} {v₀ : V} {w₀ : W} :

Duplicator wins the infinite bijective (k + 1)-pebble game from (Set.range Fin.castSucc, Fin.snoc u v₀, Fin.snoc w w₀) if and only if u and w receive the same k-WL color in every round.

Prefix placement and k-WL histograms #

theorem Cslib.Logic.FO.bijPebbleWins_graph_empty_of_wlHistogram_eq {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] {G : SimpleGraph V} {H : SimpleGraph W} {k n : ℕ} (h : G.wlHistogram k n = H.wlHistogram k n) (a : Fin (k + 1) → V) (b : Fin (k + 1) → W) :

If G and H have the same round-n k-WL histogram, then Duplicator wins the n-round bijective (k + 1)-pebble game from ∅.

theorem Cslib.Logic.FO.wlHistogram_eq_of_bijPebbleWins_graph_empty {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] {G : SimpleGraph V} {H : SimpleGraph W} {k n : ℕ} {a : Fin (k + 1) → V} {b : Fin (k + 1) → W} (h : BijPebbleWins FirstOrder.Language.graph (n + k) ∅ a b) :

If Duplicator wins n + k rounds of the bijective (k + 1)-pebble game from ∅, then G and H have the same round-n k-WL histogram.

theorem Cslib.Logic.FO.bijPebbleWinsForever_graph_empty_iff_wlHistogram_eq {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] {G : SimpleGraph V} {H : SimpleGraph W} {k : ℕ} {a : Fin (k + 1) → V} {b : Fin (k + 1) → W} :

With no pebbles placed, Duplicator wins the infinite bijective (k + 1)-pebble game on simple graphs if and only if their k-WL histograms agree in every round.

The Cai–Fürer–Immerman theorem (k-WL and C^{k+1}) #

Cai–Fürer–Immerman theorem, bounded-rank tuple form ([CFI92], Section 5, Theorem 5.2). Two k-tuples u of G and w of H satisfy the same C^{k+1} formulas of quantifier rank at most n in the first k variables Set.range Fin.castSucc if and only if u and w receive the same k-WL color in round n.

Cai–Fürer–Immerman theorem, tuple form ([CFI92], Section 5, Theorem 5.2). Two k-tuples u of G and w of H satisfy the same C^{k+1} formulas in the first k variables if and only if they receive the same k-WL color in every round.

Cai–Fürer–Immerman theorem, stabilized tuple form. Two k-tuples u of G and w of H satisfy the same C^{k+1} formulas in the first k variables if and only if they receive the same k-WL color in round |V| ^ k + |W| ^ k.

Any two finite simple graphs of equal vertex count agree on all C^{k+1} sentences of quantifier rank at most 1, because every singleton placement on loopless graphs is a partial isomorphism.

If G and H have the same round-n k-WL histogram, then they agree on every C^{k+1} sentence of quantifier rank at most n under any assignments.

If two nonempty finite simple graphs agree on all C^{k+1} sentences of quantifier rank at most n + k, then their round-n k-WL histograms agree.

Cai–Fürer–Immerman theorem, sentence form ([CFI92], Section 5, Theorem 5.2). Two nonempty finite simple graphs satisfy the same C^{k+1} sentences if and only if their k-WL histograms agree in every round. Nonemptiness is needed because GenFormula.Realize takes a total assignment Fin (k + 1) → V, which does not exist when V or W is empty.

Cai–Fürer–Immerman theorem, stabilized sentence form. Two nonempty finite simple graphs satisfy the same C^{k+1} sentences if and only if their k-WL histograms agree in round |V| ^ k + |W| ^ k.

Compatibility of 1-WL with SimpleGraph.refinementColoring #

theorem Cslib.Logic.FO.wlColoring_one_succ_eq_iff {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] {G : SimpleGraph V} [G.LocallyFinite] {H : SimpleGraph W} [H.LocallyFinite] {n : ℕ} {v : V} {w : W} :
G.wlColoring (n + 1) ![v] = H.wlColoring (n + 1) ![w] ↔ G.refinementColoring (fun (x : V) => ()) (n + 1) v = H.refinementColoring (fun (x : W) => ()) (n + 1) w ∧ G.colorHistogram (fun (x : V) => ()) n = H.colorHistogram (fun (x : W) => ()) n

At dimension k = 1, round n + 1 of 1-WL agrees on ![v] and ![w] if and only if v and w have the same round-(n + 1) vertex refinement color and G and H have the same round-n vertex color histogram.

theorem Cslib.Logic.FO.forall_wlColoring_one_eq_iff {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] {G : SimpleGraph V} [G.LocallyFinite] {H : SimpleGraph W} [H.LocallyFinite] {v : V} {w : W} :
(∀ (n : ℕ), G.wlColoring n ![v] = H.wlColoring n ![w]) ↔ (∀ (n : ℕ), G.refinementColoring (fun (x : V) => ()) n v = H.refinementColoring (fun (x : W) => ()) n w) ∧ ∀ (n : ℕ), G.colorHistogram (fun (x : V) => ()) n = H.colorHistogram (fun (x : W) => ()) n

At dimension k = 1, ![v] and ![w] receive the same 1-WL color in every round if and only if v and w receive the same vertex refinement color in every round and G and H have the same vertex color histogram in every round.

theorem Cslib.Logic.FO.forall_wlHistogram_one_eq_iff {V : Type u_1} {W : Type u_2} [Fintype V] [Fintype W] {G : SimpleGraph V} [G.LocallyFinite] {H : SimpleGraph W} [H.LocallyFinite] :
(∀ (n : ℕ), G.wlHistogram 1 n = H.wlHistogram 1 n) ↔ ∀ (n : ℕ), G.colorHistogram (fun (x : V) => ()) n = H.colorHistogram (fun (x : W) => ()) n

At dimension k = 1, G and H have the same 1-WL histogram in every round if and only if they have the same vertex refinement histogram in every round.