Documentation

CslibFrontier.Logics.FirstOrder.FiniteVariable.Hintikka

Pebble games and finite-variable logic #

For a language with finitely many relation symbols, the k-variable rank-n type of a position (S, a) is finite combinatorial data (Cslib.Logic.FO.PebbleType): the atomic facts about the placed pebbles and, if n > 0, for each pebble index i the set of rank-(n - 1) types reached by moving pebble i. Two positions have the same type exactly when Duplicator wins the n-round k-pebble game between them (pebbleType_eq_iff), and every type is defined by a k-variable Hintikka formula of quantifier rank at most n whose free variables are placed (realize_pebbleHintikka, quantifierRank_pebbleHintikka_le, freeVars_pebbleHintikka_subset). Together with the easy direction PebbleWins.realize_iff, this gives the pebble-game characterization of FO^k: Duplicator wins the n-round k-pebble game from (S, a, b) exactly when a and b satisfy the same k-variable formulas of quantifier rank at most n with free variables in S (pebbleWins_iff_forall_realize_iff). On finite structures the infinite game corresponds to all k-variable formulas (pebbleWinsForever_iff_forall_realize_iff).

The construction follows CslibFrontier.Logics.FirstOrder.EhrenfeuchtFraisse.Hintikka and reuses its atomic formulas Cslib.Logic.FO.AtomicIndex. The difference is that a position of the pebble game has a fixed number of pebbles and a set of placed ones, while a position of the Ehrenfeucht–Fraïssé game grows by one element per round, so the types and Hintikka formulas are indexed differently. Every atomic index is a k-variable atomic formula (AtomicIndex.toFiniteVariable), and partialIsoOn_iff_holds is the placed-pebble form of partialIso_iff_holds.

The hypothesis [Finite (Σ l, L.Relations l)] is used only by the Hintikka direction; the structures are arbitrary, except that the infinite game needs finite structures. As explained at PebbleWins, positions are total assignments, so for k > 0 these statements say nothing about empty structures. DuplicatorWins.pebbleWins, which passes from the Ehrenfeucht–Fraïssé game to the pebble game, is a direct game argument and holds in every language.

Main definitions #

Main results #

References #

Atomic types of placed pebbles #

The k-variable atomic formula with index i.

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

The pebbles in S define a partial isomorphism exactly when both assignments satisfy the same atomic formulas whose variables lie in S.

theorem Cslib.Logic.FO.partialIsoOn_univ_iff {L : FirstOrder.Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k : ℕ} {a : Fin k → M} {b : Fin k → N} :

With all pebbles placed, a partial isomorphism on the placed pebbles is a partial isomorphism in the sense of the Ehrenfeucht–Fraïssé game.

def Cslib.Logic.FO.pebbleAtoms {L : FirstOrder.Language} {M : Type w} [L.Structure M] {k : ℕ} (S : Set (Fin k)) (a : Fin k → M) :

The atomic facts about the pebbles in S that hold of a: the atomic formulas whose variables lie in S and that a satisfies.

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

Two positions have the same atomic facts about the pebbles in S exactly when those pebbles define a partial isomorphism.

Types of positions #

The k-variable 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 i, the set of rank-n types reached by moving pebble i. The body is exposed: statements about types use its shape.

Instances For

    For finitely many relation symbols, there are finitely many k-variable rank-n types.

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

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

    theorem Cslib.Logic.FO.pebbleType_zero {L : FirstOrder.Language} {M : Type w} [L.Structure M] {k : ℕ} (S : Set (Fin k)) (a : Fin k → M) :
    theorem Cslib.Logic.FO.pebbleType_succ {L : FirstOrder.Language} {M : Type w} [L.Structure M] {k n : ℕ} (S : Set (Fin k)) (a : Fin k → M) :
    pebbleType (n + 1) S a = (pebbleAtoms S a, fun (j : Fin k) => Set.range fun (c : M) => pebbleType n (insert j S) (Function.update a j c))
    theorem Cslib.Logic.FO.PebbleType.succ_ext_iff {L : FirstOrder.Language} {k n : ℕ} {T T' : PebbleType L k (n + 1)} :
    T = T' ↔ T.1 = T'.1 ∧ ∀ (j : Fin k), T.2 j = T'.2 j

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

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

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

    Hintikka formulas #

    noncomputable def Cslib.Logic.FO.pebbleAtomicDiagram {L : FirstOrder.Language} {k : ℕ} [Finite ((l : ℕ) × L.Relations l)] (S : Set (Fin k)) (T : Set (AtomicIndex L k)) :

    The conjunction of the atomic facts in T about the pebbles in S and the negations of those not in T. Atomic facts in T that mention unplaced pebbles make the formula false.

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

    The k-variable Hintikka formula of a rank-n type of positions with placed pebbles S: a k-variable formula of quantifier rank at most n with free variables in S, satisfied exactly by the positions of that type. For n + 1 it states the atomic diagram and, for each pebble j, that every type in T.2 j is reached by moving pebble j and that every move of pebble j reaches one of them.

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

    The pebble-game characterization of FO^k #

    theorem Cslib.Logic.FO.pebbleWins_of_forall_realize_iff {L : FirstOrder.Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k : ℕ} [Finite ((l : ℕ) × L.Relations l)] {n : ℕ} {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} (h : ∀ (φ : FiniteVariable.Formula L k), FiniteVariable.GenFormula.quantifierRank φ ≤ n → ↑(FiniteVariable.GenFormula.freeVars φ) ⊆ S → (FiniteVariable.GenFormula.Realize φ a ↔ FiniteVariable.GenFormula.Realize φ b)) :
    PebbleWins L n S a b

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

    The pebble-game characterization of FO^k ([Imm99], Theorem 6.10; [Lib04], Theorem 11.5 and Corollary 11.9 with the remark before Proposition 11.8). For a language with finitely many relation symbols, Duplicator wins the n-round k-pebble game from (S, a, b) exactly when a and b satisfy the same k-variable formulas of quantifier rank at most n with free variables in S.

    The infinite pebble game and FO^k ([Lib04], Theorem 11.5(b), Proposition 11.8 and Corollary 11.9). For a language with finitely many relation symbols and finite structures, Duplicator wins the infinite k-pebble game from (S, a, b) exactly when a and b satisfy the same k-variable formulas with free variables in S.

    From the Ehrenfeucht–Fraïssé game to the pebble game #

    theorem Cslib.Logic.FO.PartialIso.partialIsoOn_comp {L : FirstOrder.Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k m : ℕ} {a : Fin m → M} {b : Fin m → N} (h : PartialIso L a b) (σ : Fin k → Fin m) (S : Set (Fin k)) :
    PartialIsoOn L S (a ∘ σ) (b ∘ σ)

    A partial isomorphism between m-tuples, read through a reindexing σ : Fin k → Fin m of the pebbles, is a partial isomorphism on every set of placed pebbles.

    theorem Cslib.Logic.FO.DuplicatorWins.pebbleWins_comp {L : FirstOrder.Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k n m : ℕ} {a : Fin m → M} {b : Fin m → N} :
    DuplicatorWins L n a b → ∀ (σ : Fin k → Fin m) (S : Set (Fin k)), PebbleWins L n S (a ∘ σ) (b ∘ σ)

    A winning position (a, b) of the n-round Ehrenfeucht–Fraïssé game, read through any reindexing σ : Fin k → Fin m, wins the n-round k-pebble game from (S, a ∘ σ, b ∘ σ). When pebble i moves, σ is extended by sending i to the element added in the Ehrenfeucht–Fraïssé game.

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

    A winning position of the n-round Ehrenfeucht–Fraïssé game from (a, b) wins the n-round k-pebble game from (S, a, b) for every set S of placed pebbles, in every language.