While this submission is a draft, it cannot be used by other submissions.

Pebble games between two structures

Lax945089.PebbleGames · concepts/Lax945089/PebbleGames.lean · lax-945089

definition

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Definition

    In the kk-pebble game on two structures MM and NN, a position is a pair of kk-tuples, one in each structure. Two tuples agree on their atomic type, relative to a family SS of relation symbols, when they satisfy the same equalities between coordinates and the same relations of SS at every selection of coordinates. A relation between kk-tuples of MM and of NN has the back-and-forth property at a position when, whichever pebble the spoiler moves and wherever, on either side, the duplicator can move the same pebble on the other side so that the new position is again in the relation. The kk-pebble equivalence generated by an initial relation is the limit of the chain of refinements that keep the positions of the initial relation satisfying the back-and-forth property with respect to the previous stage: the positions from which the duplicator can play forever. Unlike the rounds of an Ehrenfeucht–Fraïssé game, the pebbles are reused, so the game bounds the number of variables and not the quantifier depth.

    For a simultaneous induction, kk is a variable budget when it covers, for each relation variable, its arity plus the quantifier depth of its step formula; and the induction uses relations of SS when the symbols of the base vocabulary in its step formulas and output sentence all lie in SS.

    Concept map
    6 concepts; 12 descendants hidden
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on A

    Lean source view on GitHub

    1import Mathlib.ModelTheory.Semantics
    2import Mathlib.Logic.Function.Basic
    3import Lax904597.SecondOrder
    4import Lax535992.InflationaryFixedPoint
    5import Lax945089.EhrenfeuchtGames
    6
    7/-!
    8---
    9title: Pebble games between two structures
    10type: definition
    11---
    12In the kk-pebble game on two structures MM and NN, a position is a pair
    13of kk-tuples, one in each structure. Two tuples agree on their atomic type,
    14relative to a family SS of relation symbols, when they satisfy the same
    15equalities between coordinates and the same relations of SS at every
    16selection of coordinates. A relation between kk-tuples of MM and of NN
    17has the back-and-forth property at a position when, whichever pebble the
    18spoiler moves and wherever, on either side, the duplicator can move the same
    19pebble on the other side so that the new position is again in the relation.
    20The kk-pebble equivalence generated by an initial relation is the limit of
    21the chain of refinements that keep the positions of the initial relation
    22satisfying the back-and-forth property with respect to the previous stage:
    23the positions from which the duplicator can play forever. Unlike the rounds
    24of an Ehrenfeucht–Fraïssé game, the pebbles are reused, so the game bounds
    25the number of variables and not the quantifier depth.
    26
    27For a simultaneous induction, kk is a variable budget when it covers, for
    28each relation variable, its arity plus the quantifier depth of its step
    29formula; and the induction uses relations of SS when the symbols of the
    30base vocabulary in its step formulas and output sentence all lie in
    31SS.
    32-/
    33
    34namespace Lax945089.PebbleGames
    35
    36open Lax904597.SecondOrder Lax535992.InflationaryFixedPoint Lax945089.EhrenfeuchtGames
    37
    38open FirstOrder
    39
    40open Language Structure
    41
    42/-- The relation symbols of a bounded formula all lie in the family `S`. -/
    43def RelsIn {L : Language.{0, 0}} (S : Set (Σ n, L.Relations n)) {α : Type*} :
    44 ∀ {n : ℕ}, L.BoundedFormula α n → Prop
    45 | _, .falsum => True
    46 | _, .equal _ _ => True
    47 | _, .rel R _ => ⟨_, R⟩ ∈ S
    48 | _, .imp f₁ f₂ => RelsIn S f₁ ∧ RelsIn S f₂
    49 | _, .all f => RelsIn S f
    50
    51/-- The agreement family of the block expansion of a structure: the given
    52family on the base symbols, everything on the block symbols. -/
    53def blockRelsExtend {L : Language.{0, 0}} (S : Set (Σ n, L.Relations n)) (B : SOBlock) :
    54 Set (Σ n, (L.sum B.lang).Relations n) :=
    55 fun x =>
    56 match x with
    57 | ⟨n, Sum.inl r⟩ => ⟨n, r⟩ ∈ S
    58 | ⟨_, Sum.inr _⟩ => True
    59
    60/-- The variable budget of a simultaneous induction: `k` covers each
    61variable's arity together with the quantifier depth of its step formula –
    62enough pebbles to hold the arguments and play out the quantifiers. -/
    63def StepDef.VarBound {L : Language.{0, 0}} (d : StepDef L) (k : ℕ) : Prop :=
    64 ∀ i, d.B.arity i + qdepth (d.step i) ≤ k
    65
    66/-- The base relation symbols of a simultaneous induction – of its step
    67formulas and its output sentence – lie in the family `S`. -/
    68def StepDef.UsesRels {L : Language.{0, 0}} (d : StepDef L) (S : Set (Σ n, L.Relations n)) : Prop :=
    69 (∀ i, RelsIn (blockRelsExtend S d.B) (d.step i)) ∧
    70 RelsIn (blockRelsExtend S d.B) d.out
    71
    72/-- A relation between `k`-tuples of two types: the positions of the
    73two-structure `k`-pebble game. -/
    74abbrev PebbleRel₂ (M N : Type) (k : ℕ) : Type :=
    75 (Fin k → M) → (Fin k → N) → Prop
    76
    77variable {M N : Type} {k : ℕ}
    78
    79/-- Pointwise implication of two-structure relations. -/
    80def PebbleRel₂.Le (E E' : PebbleRel₂ M N k) : Prop :=
    81 ∀ a b, E a b → E' a b
    82
    83/-- The back-and-forth condition of the two-structure `k`-pebble game: the
    84pebble the spoiler moves, on either structure, can be answered on the other. -/
    85def PebbleBackForth₂ (E : PebbleRel₂ M N k) : PebbleRel₂ M N k :=
    86 fun a b => ∀ i : Fin k,
    87 (∀ c : M, ∃ d : N, E (Function.update a i c) (Function.update b i d)) ∧
    88 (∀ d : N, ∃ c : M, E (Function.update a i c) (Function.update b i d))
    89
    90/-- One round of refinement. -/
    91def pebbleRefine₂ (E₀ E : PebbleRel₂ M N k) : PebbleRel₂ M N k :=
    92 fun a b => E₀ a b ∧ PebbleBackForth₂ E a b
    93
    94/-- The descending refinement chain. -/
    95def pebbleStage₂ (E₀ : PebbleRel₂ M N k) : ℕ → PebbleRel₂ M N k
    96 | 0 => fun _ _ => True
    97 | n + 1 => pebbleRefine₂ E₀ (pebbleStage₂ E₀ n)
    98
    99/-- **`k`-pebble equivalence between two structures**: the limit of the
    100refinement chain. -/
    101def EquivK₂ (E₀ : PebbleRel₂ M N k) : PebbleRel₂ M N k :=
    102 fun a b => ∀ n, pebbleStage₂ E₀ n a b
    103
    104/-- Agreement on the atomic type between tuples of two structures: the same
    105equalities between coordinates, and the same base relations of the family `S`
    106at every selection of coordinates. -/
    107def atomicAgreeOn₂ {L : Language.{0, 0}} (S : Set (Σ n, L.Relations n)) (M N : Type)
    108 [L.Structure M] [L.Structure N]
    109 (k : ℕ) : PebbleRel₂ M N k :=
    110 fun v w =>
    111 (∀ i j : Fin k, v i = v j ↔ w i = w j) ∧
    112 ∀ {l : ℕ} (R : L.Relations l), ⟨l, R⟩ ∈ S → ∀ g : Fin l → Fin k,
    113 ((RelMap R fun p => v (g p)) ↔ RelMap R fun p => w (g p))
    114
    115end Lax945089.PebbleGames
    116

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…