Pebble games #
The k-pebble game on two L-structures M and N is played with k pairs of pebbles. In each
round Spoiler picks a pebble index i, places the M-pebble or the N-pebble of pair i on an
element of that structure (lifting it first if it was already placed), and Duplicator places the
other pebble of pair i in the other structure. Duplicator wins a play when, after every round,
the placed pairs define a partial isomorphism. Unlike the Ehrenfeucht–Fraïssé game, pebbles are
reused, and the game may continue for any number of rounds, even forever.
A position is a set S : Set (Fin k) of placed pebble indices together with assignments
a : Fin k → M and b : Fin k → N; only the values on S matter (pebbleWins_congr). Moving
pebble i to c and d gives the position (insert i S, update a i c, update b i d). These are
exactly the assignments of the k-variable formulas of
CslibFrontier.Logics.FirstOrder.FiniteVariable.Basic, whose quantifiers ex i and all i update
variable i.
PebbleWins L n S a b says that Duplicator wins the n-round game from the position, and
PebbleWinsForever L S a b that she wins the game that continues forever, witnessed by a
back-and-forth invariant. PebbleWins.realize_iff is the easy direction of the pebble-game
characterization of FO^k: a winning position satisfies the same k-variable formulas of
quantifier rank at most n whose free variables are placed. The converse needs finitely many
relation symbols and is proved in CslibFrontier.Logics.FirstOrder.FiniteVariable.Hintikka.
Main definitions #
Cslib.Logic.FO.PartialIsoOn: the pebbles inSdefine a partial isomorphism.Cslib.Logic.FO.PebbleWins: Duplicator wins then-roundk-pebble game from a position.Cslib.Logic.FO.IsPebbleBackAndForth: invariants that Duplicator can maintain forever.Cslib.Logic.FO.PebbleWinsForever: Duplicator wins the infinitek-pebble game.
Main results #
Cslib.Logic.FO.PebbleWins.mono,Cslib.Logic.FO.PebbleWins.of_subset,Cslib.Logic.FO.pebbleWins_congr,Cslib.Logic.FO.partialIsoOn_comp_equiv_iff: monotonicity in the number of rounds and in the placed pebbles, independence of unplaced pebbles, and pebble reindexing.Cslib.Logic.FO.PebbleWins.refl,Cslib.Logic.FO.PebbleWins.symm,Cslib.Logic.FO.PebbleWins.trans,FirstOrder.Language.Equiv.pebbleWins: the equivalence-relation laws and invariance under isomorphism.Cslib.Logic.FO.IsPebbleBackAndForth.pebbleWinsForever: a back-and-forth invariant wins the infinite game.Cslib.Logic.FO.PebbleWinsForever.pebbleWins,Cslib.Logic.FO.pebbleWinsForever_iff_forall_pebbleWins: the infinite game is won exactly when every finite game is, on finite structures.Cslib.Logic.FO.PebbleWins.realize_iff,Cslib.Logic.FO.PebbleWinsForever.realize_iff: the easy direction of the pebble-game characterization ofFO^k.
References #
- L. Libkin, Elements of Finite Model Theory, Section 11.2, Definition 11.4 and the remark before Proposition 11.8.
- N. Immerman, Descriptive Complexity, Definition 6.2.
Partial isomorphisms on placed pebbles #
The pebbles with indices in S define a partial isomorphism a i ↦ b i: the map is well
defined and injective, and it preserves and reflects every relation among placed pebbles.
Two placed pebbles coincide in
Mexactly when they coincide inN.- relMap_iff {l : ℕ} (R : L.Relations l) (f : Fin l → Fin k) : (∀ (t : Fin l), f t ∈ S) → (FirstOrder.Language.Structure.RelMap R (a ∘ f) ↔ FirstOrder.Language.Structure.RelMap R (b ∘ f))
Every relation holds of placed pebbles in
Mexactly when it holds of them inN.
A partial isomorphism on S depends only on the values of the pebbles in S.
With no pebbles placed, every position is a partial isomorphism, provided L has no nullary
relation symbols: these are sentences that the two structures would have to agree on.
Updating pebble i to an already-placed pebble a j₀ (j₀ ∈ S) preserves PartialIsoOn
when paired with b j₀.
Equality preservation on insert i S when updating pebble i to fresh elements c and d
outside {a j | j ∈ S ∧ j ≠ i} and {b j | j ∈ S ∧ j ≠ i}.
The game #
Duplicator wins the n-round k-pebble game from the position (S, a, b), where S is the
set of placed pebble indices and a, b give their positions in M and N: the placed pebbles
define a partial isomorphism and, if a round remains, for every pebble index i and every
placement of the M-pebble (or N-pebble) of pair i, Duplicator can place the other pebble of
pair i so that she wins the remaining rounds.
The values of a and b outside S do not matter (pebbleWins_congr). Since positions are
total assignments Fin k → M and Fin k → N, a position exists only when k = 0 or both
structures are nonempty: for k > 0 and empty M or N the statement is vacuous, and results
about games starting with no pebbles placed (S = ∅) say nothing about empty structures.
Basic properties of the game #
Lifting placed pebbles keeps the position winning.
Back-and-forth invariants and the infinite game #
A back-and-forth invariant for the k-pebble game: a set of positions, each a partial
isomorphism on its placed pebbles, such that every move of Spoiler from a position in the set has
an answer leading back into the set.
Every position of the invariant is a partial isomorphism on its placed pebbles.
- forth {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} : I S a b → ∀ (i : Fin k) (c : M), ∃ (d : N), I (insert i S) (Function.update a i c) (Function.update b i d)
Every move of Spoiler in
Mhas an answer inNstaying in the invariant. - back {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} : I S a b → ∀ (i : Fin k) (d : N), ∃ (c : M), I (insert i S) (Function.update a i c) (Function.update b i d)
Every move of Spoiler in
Nhas an answer inMstaying in the invariant.
Every position of a back-and-forth invariant is won by Duplicator in every finite game.
Duplicator wins the k-pebble game that continues forever from the position (S, a, b):
the position belongs to a back-and-forth invariant. As for PebbleWins, the statement is vacuous
for k > 0 when M or N is empty.
Unfolds PebbleWinsForever into existence of a k-pebble back-and-forth invariant.
Every position of a back-and-forth invariant is won by Duplicator in the infinite game.
Winning the infinite game implies winning every finite game.
The infinite pebble game on finite structures. On finite structures, Duplicator wins the
k-pebble game that continues forever exactly when she wins the n-round game for every n
[Lib04] (remark before Proposition 11.8). On infinite structures only the forward
implication holds in general.
Duplicator wins the infinite game between a structure and an isomorphic copy, from a position and its image.
Duplicator wins every finite game between a structure and an isomorphic copy, from a position and its image.
The easy direction of the pebble-game characterization of FO^k #
Generic quantifier-rank induction for preserving GenFormula truth across a family of
n-round game positions R n S a b. Base positions must form partial isomorphisms on S, and
stepping from n + 1 to n at i must preserve each quantifier q : Q.
Pebble games, easy direction. If Duplicator wins the n-round k-pebble game from
(S, a, b), then a and b satisfy the same k-variable formulas of quantifier rank at most n
whose free variables are placed pebbles. No finiteness assumption is needed.
Infinite pebble games, easy direction. If Duplicator wins the infinite k-pebble game
from (S, a, b), then a and b satisfy the same k-variable formulas whose free variables are
placed pebbles.