Documentation

CslibFrontier.Logics.FirstOrder.FiniteVariable.BijectiveGame

Bijective pebble games #

Hella's bijective k-pebble game is the game for the counting logic C^k. Each round has two parts: Spoiler picks a pebble index i, Duplicator answers with a bijection f : M ≃ N, and then Spoiler places the M-pebble of pair i on any c, which puts the N-pebble of pair i on f c. Duplicator wins a play when, after every round, the placed pairs define a partial isomorphism. Because she answers with a bijection, Duplicator commits to one answer for every point Spoiler may choose and must use every element of N exactly once.

Spoiler picks the pebble before Duplicator picks the bijection. This is Hella's order ([Hel96]), and Duplicator can use the choice. If she had to commit to one bijection for every pebble, the game would be strictly harder for her and would no longer characterize C^k. On the cycle C₆ and two disjoint triangles, which agree on C², Spoiler would then win in three rounds: he puts the two pebbles on vertices at distance two in C₆, which a bijection fixed in advance sends to different triangles, and then moves one of them to their common neighbor.

Positions are as in CslibFrontier.Logics.FirstOrder.FiniteVariable.PebbleGame: a set S : Set (Fin k) of placed pebbles with total assignments a : Fin k → M, b : Fin k → N, so for k > 0 the statements say nothing about empty structures.

BijPebbleWins L n S a b says that Duplicator wins the n-round game from the position, and BijPebbleWinsForever L S a b that she wins the game that continues forever. A won bijective game is a won pebble game (BijPebbleWins.pebbleWins), and with a round left it forces a bijection M ≃ N (BijPebbleWins.nonempty_equiv). BijPebbleWins.realize_iff is the easy direction of the game characterization of C^k: a winning position satisfies the same counting formulas of quantifier rank at most n whose free variables are placed. The converse, for finite structures, is in CslibFrontier.Logics.FirstOrder.FiniteVariable.CountingHintikka.

Main definitions #

Main results #

References #

def Cslib.Logic.FO.BijPebbleWins (L : FirstOrder.Language) {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k : ℕ} :
ℕ → Set (Fin k) → (Fin k → M) → (Fin k → N) → Prop

Duplicator wins the n-round bijective k-pebble game from the position (S, a, b): the placed pebbles define a partial isomorphism and, if a round remains, for every pebble index i chosen by Spoiler there is a bijection f : M ≃ N such that, wherever Spoiler places the M-pebble of pair i, say on c, the position with the N-pebble of pair i on f c is won for the remaining rounds.

Spoiler picks the pebble index before Duplicator picks the bijection, which lets the bijection depend on the index (see the module docstring). As for PebbleWins, positions are total assignments, so the statement is vacuous for k > 0 when M or N is empty.

theorem Cslib.Logic.FO.bijPebbleWins_zero {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} :
BijPebbleWins L 0 S a b ↔ PartialIsoOn L S a b
theorem Cslib.Logic.FO.bijPebbleWins_succ {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} :
BijPebbleWins L (n + 1) S a b ↔ PartialIsoOn L S a b ∧ ∀ (i : Fin k), ∃ (f : M ≃ N), ∀ (c : M), BijPebbleWins L n (insert i S) (Function.update a i c) (Function.update b i (f c))
theorem Cslib.Logic.FO.BijPebbleWins.partialIsoOn {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} (h : BijPebbleWins L n S a b) :
PartialIsoOn L S a b
theorem Cslib.Logic.FO.BijPebbleWins.move {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} (h : BijPebbleWins L (n + 1) S a b) (i : Fin k) :
∃ (f : M ≃ N), ∀ (c : M), BijPebbleWins L n (insert i S) (Function.update a i c) (Function.update b i (f c))

Duplicator's answer to Spoiler's choice of the pebble index i.

theorem Cslib.Logic.FO.BijPebbleWins.nonempty_equiv {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} (h : BijPebbleWins L (n + 1) S a b) (i : Fin k) :

If Duplicator wins a bijective game with at least one round, with at least one pebble, the structures are in bijection.

Basic properties of the game #

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

Winning a game implies winning every shorter game.

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

Lifting placed pebbles keeps the position winning.

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

Winning depends only on the positions of the placed pebbles.

theorem Cslib.Logic.FO.bijPebbleWins_comp_equiv_iff {L : FirstOrder.Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k k' : ℕ} (σ : Fin k' ≃ Fin k) {n : ℕ} {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} :
BijPebbleWins L n (⇑σ ⁻¹' S) (a ∘ ⇑σ) (b ∘ ⇑σ) ↔ BijPebbleWins L n S a b

Reindexing pebble names along a bijection preserves winning positions of the bijective game.

theorem Cslib.Logic.FO.BijPebbleWins.refl {L : FirstOrder.Language} {M : Type w} [L.Structure M] {k : ℕ} (n : ℕ) (S : Set (Fin k)) (a : Fin k → M) :
BijPebbleWins L n S a a
theorem Cslib.Logic.FO.BijPebbleWins.symm {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} :
BijPebbleWins L n S a b → BijPebbleWins L n S b a
theorem Cslib.Logic.FO.BijPebbleWins.trans {L : FirstOrder.Language} {M : Type w} {N : Type w'} {P : Type w''} [L.Structure M] [L.Structure N] [L.Structure P] {k n : ℕ} {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} {c : Fin k → P} :
BijPebbleWins L n S a b → BijPebbleWins L n S b c → BijPebbleWins L n S a c
theorem Cslib.Logic.FO.BijPebbleWins.pebbleWins {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} :
BijPebbleWins L n S a b → PebbleWins L n S a b

The bijective game is harder for Duplicator. A winning position of the bijective game wins the ordinary pebble game with the same number of rounds: Duplicator answers a move c in M by f c and a move d in N by f.symm d.

Back-and-forth invariants and the infinite game #

structure Cslib.Logic.FO.IsBijPebbleBackAndForth (L : FirstOrder.Language) {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k : ℕ} (I : Set (Fin k) → (Fin k → M) → (Fin k → N) → Prop) :

A back-and-forth invariant for the bijective k-pebble game: a set of positions, each a partial isomorphism on its placed pebbles, such that for every pebble index some bijection keeps every move inside the set.

  • partialIsoOn {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} : I S a b → PartialIsoOn L S a b

    Every position of the invariant is a partial isomorphism on its placed pebbles.

  • move {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} : I S a b → ∀ (i : Fin k), ∃ (f : M ≃ N), ∀ (c : M), I (insert i S) (Function.update a i c) (Function.update b i (f c))

    For every pebble index, some bijection keeps every move inside the invariant.

theorem Cslib.Logic.FO.IsBijPebbleBackAndForth.bijPebbleWins {L : FirstOrder.Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k : ℕ} {I : Set (Fin k) → (Fin k → M) → (Fin k → N) → Prop} (hI : IsBijPebbleBackAndForth L I) {n : ℕ} {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} :
I S a b → BijPebbleWins L n S a b

Every position of a back-and-forth invariant is won by Duplicator in every finite game.

def Cslib.Logic.FO.BijPebbleWinsForever (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) :

Duplicator wins the bijective k-pebble game that continues forever from (S, a, b): the position belongs to a back-and-forth invariant. As for BijPebbleWins, the statement is vacuous for k > 0 when M or N is empty.

theorem Cslib.Logic.FO.bijPebbleWinsForever_iff_exists_isBijPebbleBackAndForth {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} :
BijPebbleWinsForever L S a b ↔ ∃ (I : Set (Fin k) → (Fin k → M) → (Fin k → N) → Prop), IsBijPebbleBackAndForth L I ∧ I S a b

Unfolds BijPebbleWinsForever into existence of a bijective k-pebble back-and-forth invariant.

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

Every position of a back-and-forth invariant is won by Duplicator in the infinite game.

theorem Cslib.Logic.FO.BijPebbleWinsForever.bijPebbleWins {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} (h : BijPebbleWinsForever L S a b) (n : ℕ) :
BijPebbleWins L n S a b

Winning the infinite game implies winning every finite game.

theorem Cslib.Logic.FO.BijPebbleWinsForever.pebbleWinsForever {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} (h : BijPebbleWinsForever L S a b) :

Winning the infinite bijective game implies winning the infinite pebble game.

theorem Cslib.Logic.FO.bijPebbleWinsForever_iff_forall_bijPebbleWins {L : FirstOrder.Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k : ℕ} [Finite M] {S : Set (Fin k)} {a : Fin k → M} {b : Fin k → N} :
BijPebbleWinsForever L S a b ↔ ∀ (n : ℕ), BijPebbleWins L n S a b

The infinite bijective game on finite structures. When M is finite, Duplicator wins the bijective k-pebble game that continues forever exactly when she wins the n-round game for every n. Finiteness of N is not needed: there are only finitely many bijections M ≃ N either way.

theorem FirstOrder.Language.Equiv.bijPebbleWinsForever {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k : ℕ} (e : L.Equiv M N) (S : Set (Fin k)) (a : Fin k → M) :

Duplicator wins the infinite bijective game between a structure and an isomorphic copy, from a position and its image.

theorem FirstOrder.Language.Equiv.bijPebbleWins {L : Language} {M : Type w} {N : Type w'} [L.Structure M] [L.Structure N] {k : ℕ} (e : L.Equiv M N) (n : ℕ) (S : Set (Fin k)) (a : Fin k → M) :

Duplicator wins every finite bijective game between a structure and an isomorphic copy, from a position and its image.

The easy direction of the game characterization of C^k #

Bijective pebble games, easy direction. If Duplicator wins the n-round bijective k-pebble game from (S, a, b), then a and b satisfy the same k-variable counting formulas of quantifier rank at most n whose free variables are placed pebbles. No finiteness assumption is needed: the bijection of each round carries the witnesses of a counting quantifier in M onto those in N.

Infinite bijective pebble games, easy direction. If Duplicator wins the infinite bijective k-pebble game from (S, a, b), then a and b satisfy the same k-variable counting formulas whose free variables are placed pebbles.