Documentation

CslibFrontier.Foundations.RelationAlgebra.Game

The representation game on atomic networks #

The game G(A) of [HH01], Definition 1, is played by ∀ and ∃ on the atomic networks of a finite relation algebra A. ∀ opens with an atom, and ∃ answers with a network having an edge labelled by it. In each later round ∀ picks an edge (m, n) of the current network N and atoms a, b with N(m, n) ≤ a;b, and ∃ answers with a network extending N that has a node p with N(m, p) = a and N(p, n) = b. ∃ wins a play when she answers in every round. Theorem 1 of the source states that A is representable if and only if ∃ has a winning strategy.

Formalization #

Main definitions #

Main results #

References #

A position of the game G(F): a finite atomic network, with its nodes numbered 0, …, size - 1.

Instances For
    @[instance_reducible]

    P ≤ Q when Q extends P: the nodes of P are nodes of Q, with the same labels.

    A move of ∀ at the position P: two nodes m, n and two atoms a, b whose product lies above the label of (m, n).

    • m : Fin P.size

      The first node of the edge picked.

    • n : Fin P.size

      The second node of the edge picked.

    • a : α

      The atom demanded on the edge from m to the witness.

    • b : α

      The atom demanded on the edge from the witness to n.

    • legal : (self.a, self.b, P.network.label self.m self.n) ∈ F.cycles

      The source's a;b ≥ N(m, n).

    The position Q is a legal response of ∃ to the move v at P: it extends P and has a node p with Q(m, p) = a and Q(p, n) = b.

    A strategy for ∃ in the game G(F): her network in the opening round, as a function of the atom picked by ∀, and her network in each later round, as a function of the current network and the move of ∀.

    • opening : α → F.Position

      The network ∃ plays in round zero when ∀ picks the atom a.

    • answer (P : F.Position) : P.Move → F.Position

      The network ∃ plays when ∀ makes the move v at the network P.

    The networks that arise in the plays of G(F) in which ∃ follows the strategy σ.

    A strategy is winning when it gives a legal response in every round of every play in which ∃ follows it: her opening network has an edge labelled by the atom ∀ picked, and each later network answers his move.

    ∃ has a winning strategy in the game G(F) of [HH01], Definition 1.

    theorem Cslib.RelationAlgebra.AtomStructure.hasWinningStrategy_iff {α : Type u} {F : AtomStructure α} :
    F.HasWinningStrategy ↔ ∃ (W : Set F.Position), (∀ (a : α), ∃ P ∈ W, ∃ (m : Fin P.size) (n : Fin P.size), P.network.label m n = a) ∧ ∀ P ∈ W, ∀ (v : P.Move), ∃ Q ∈ W, Q.Answers v

    ∃ has a winning strategy exactly when some set of networks contains, for every atom, a network with an edge so labelled, and contains a response to every move of ∀ at each of its members.

    theorem Cslib.RelationAlgebra.AtomStructure.HasWinningStrategy.of_forall_exists_comap_castSucc {α : Type u} {F : AtomStructure α} (W : (n : ℕ) → Set (AtomicNetwork F (Fin n))) (opening : ∀ (a : α), ∃ (n : ℕ), ∃ N ∈ W n, ∃ (i : Fin n) (j : Fin n), N.label i j = a) (answer : ∀ (n : ℕ), ∀ N ∈ W n, ∀ (i j : Fin n) (a b : α), (a, b, N.label i j) ∈ F.cycles → (∀ (p : Fin n), N.label i p = a → N.label p j ≠ b) → ∃ N' ∈ W (n + 1), N'.comap Fin.castSuccEmb = N ∧ N'.label i.castSucc (Fin.last n) = a ∧ N'.label (Fin.last n) j.castSucc = b) :

    The form of [HH01], Convention 1, parts (1) and (2): to win, it is enough that ∃ answers the moves that have no witness yet, each by adding a single node as the witness.

    theorem Cslib.RelationAlgebra.AtomStructure.HasWinningStrategy.of_saturated {α : Type u} {F : AtomStructure α} (h : ∀ (a : α), ∃ (D : Type w) (N : AtomicNetwork F D), N.Saturated ∧ ∃ (m : D) (n : D), N.label m n = a) :

    If every atom labels an edge of some saturated network, then ∃ has a winning strategy: she plays finite subnetworks of these networks.

    theorem Cslib.RelationAlgebra.AtomStructure.HasWinningStrategy.exists_saturated {α : Type u} {F : AtomStructure α} [Countable α] (h : F.HasWinningStrategy) (a : α) :
    ∃ (D : Type) (N : AtomicNetwork F D), N.Saturated ∧ ∃ (m : D) (n : D), N.label m n = a

    If ∃ has a winning strategy and there are countably many atoms, then every atom labels an edge of a saturated network: the limit of a play in which ∀ picks the atom and then makes every move eventually.

    An atom structure on which ∃ has a winning strategy satisfies the laws. Associativity is [HH01], Lemma 7: ∀ opens with p ≤ r;q, then demands r, q on that edge and s, t on the new edge labelled q, and the remaining edge of the resulting network is the atom required. The source assumes the other laws; they follow in the same way from at most one move.

    If ∃ has a winning strategy in the game of an atom structure with countably many atoms, then its complex algebra is representable.

    If the complex algebra of a finite atom structure has a representation, with index and base types in any universes, then ∃ has a winning strategy in its game.

    Theorem 1 of [HH01]: the complex algebra of a finite atom structure is representable if and only if ∃ has a winning strategy in its game.

    Theorem 1 of [HH01], as stated there: a finite relation algebra is representable if and only if ∃ has a winning strategy in the game on its atoms.