Documentation

CslibFrontier.Logics.FirstOrder.FiniteVariable.CountingHintikka

Bijective pebble games and counting logic #

On a finite structure, the k-variable counting rank-n type of a position (S, a) is finite combinatorial data (Cslib.Logic.FO.CountingType): the atomic facts about the placed pebbles and, if n > 0, for each pebble index j the multiset of rank-(n - 1) types reached by moving pebble j to each element. The counting type replaces the set of reached types in Cslib.Logic.FO.PebbleType by a multiset, which records how often each type is reached.

Two positions have the same counting type exactly when Duplicator wins the n-round bijective k-pebble game between them (countingType_eq_iff): a bijection matching the moves of pebble j type by type exists exactly when the two multisets agree (Equiv.exists_apply_eq_iff_map_univ_eq). Every counting type is defined by a counting Hintikka formula of quantifier rank at most n whose free variables are placed (realize_countingHintikka), which says how many moves of each pebble reach each type. Together with the easy direction BijPebbleWins.realize_iff, this gives the game characterization of C^k: on finite structures, Duplicator wins the n-round bijective k-pebble game from (S, a, b) exactly when a and b satisfy the same k-variable counting formulas of quantifier rank at most n with free variables in S (bijPebbleWins_iff_forall_realize_iff), and the infinite game corresponds to all counting formulas (bijPebbleWinsForever_iff_forall_realize_iff).

The hard direction needs finite structures, not only finitely many relation symbols. In the empty language with one variable, ℕ and ℝ satisfy the same counting formulas, since every formula defines the empty set or everything, so both sides count infinitely many witnesses. Yet there is no bijection ℕ ≃ ℝ, so Spoiler wins the one-round bijective game. As explained at PebbleWins, positions are total assignments, so for k > 0 these statements say nothing about empty structures.

Main definitions #

Main results #

References #

Counting types of positions #

The k-variable counting rank-n types, as combinatorial data: a rank-0 type is a set of atomic facts, and a rank-(n + 1) type is a set of atomic facts together with, for each pebble index j, the multiset of rank-n types reached by moving pebble j. The body is exposed: statements about types use its shape.

def Cslib.Logic.FO.countingType {L : FirstOrder.Language} {M : Type w} [L.Structure M] {k : ℕ} [Fintype M] (n : ℕ) :
Set (Fin k) → (Fin k → M) → CountingType L k n

The k-variable counting rank-n type of the position (S, a) in a finite structure: the atomic facts about the placed pebbles and, for n + 1, the multiset of types reached by moving each pebble to each element.

theorem Cslib.Logic.FO.countingType_zero {L : FirstOrder.Language} {M : Type w} [L.Structure M] {k : ℕ} [Fintype M] (S : Set (Fin k)) (a : Fin k → M) :
theorem Cslib.Logic.FO.countingType_succ {L : FirstOrder.Language} {M : Type w} [L.Structure M] {k : ℕ} [Fintype M] {n : ℕ} (S : Set (Fin k)) (a : Fin k → M) :
countingType (n + 1) S a = (pebbleAtoms S a, fun (j : Fin k) => Multiset.map (fun (c : M) => countingType n (insert j S) (Function.update a j c)) Finset.univ.val)
theorem Cslib.Logic.FO.CountingType.succ_ext_iff {L : FirstOrder.Language} {k n : ℕ} {T T' : CountingType L k (n + 1)} :
T = T' ↔ T.1 = T'.1 ∧ ∀ (j : Fin k), T.2 j = T'.2 j

Equality of rank-(n + 1) counting types is componentwise.

theorem Cslib.Logic.FO.countingType_eq_iff {L : FirstOrder.Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k : ℕ} [Fintype M] [Fintype N] {n : ℕ} {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} :

Two positions in finite structures have the same k-variable counting rank-n type exactly when Duplicator wins the n-round bijective k-pebble game between them.

Counting Hintikka formulas #

noncomputable def Cslib.Logic.FO.countingHintikka {L : FirstOrder.Language} {k : ℕ} [Finite ((l : ℕ) × L.Relations l)] {n : ℕ} :

The k-variable counting Hintikka formula of a rank-n counting type of positions with placed pebbles S: a counting formula of quantifier rank at most n with free variables in S, satisfied in a finite structure exactly by the positions of that type. For n + 1 it states the atomic diagram and, for each pebble j, that every type τ in the multiset T.2 j is reached by exactly as many moves of pebble j as its multiplicity, and that every move of pebble j reaches a type in T.2 j.

theorem Cslib.Logic.FO.realize_countingHintikka {L : FirstOrder.Language} {M : Type w} [L.Structure M] {k : ℕ} [Finite ((l : ℕ) × L.Relations l)] [Fintype M] {n : ℕ} (S : Set (Fin k)) (T : CountingType L k n) (a : Fin k → M) :

The game characterization of C^k #

Bijective pebble games, hard direction. For a language with finitely many relation symbols and finite structures, if a and b satisfy the same k-variable counting formulas of quantifier rank at most n with free variables in S, then Duplicator wins the n-round bijective k-pebble game from (S, a, b). Only the counting Hintikka formula of the type of (S, a) is used.

The game characterization of C^k ([Hel96]; [CFI92], Theorem 4.5; [Imm99], Section 12.4). For a language with finitely many relation symbols and finite structures, Duplicator wins the n-round bijective k-pebble game from (S, a, b) exactly when a and b satisfy the same k-variable counting formulas of quantifier rank at most n with free variables in S.

The infinite bijective game and C^k. For a language with finitely many relation symbols and finite structures, Duplicator wins the infinite bijective k-pebble game from (S, a, b) exactly when a and b satisfy the same k-variable counting formulas with free variables in S.