The k-pebble game between two structures #
DescriptiveComplexity.Invariant.Pebble refines a relation between k-tuples
of one structure, which is all the Abiteboul–Vianu development needs: it
asks which tuples a definition can tell apart. Separating a Boolean query
needs the same game played across two structures, and that is what this file
builds – the same chain, the same coinduction, the same stabilization, with
the two sides now living in different types.
The pieces mirror their one-structure originals one for one:
DescriptiveComplexity.EquivK₂ is the limit of
DescriptiveComplexity.pebbleStage₂, greatest by
DescriptiveComplexity.le_equivK₂, a fixed point on finite types
(DescriptiveComplexity.equivK₂_iff, whence the game moves
DescriptiveComplexity.EquivK₂.update), and unchanged by expanding both sides
with relations it already refines (DescriptiveComplexity.equivK₂_inf_eq) –
the lemma that carries invariance through the stages of an induction.
Instantiated at agreement on the atomic type
(DescriptiveComplexity.atomicAgreeOn₂) and at bare sets, it collapses:
DescriptiveComplexity.equivK₂_bare – over the empty vocabulary, k-tuples
of two sets with k elements each are equivalent as soon as they have the
same equality pattern, whatever the two sizes. That is the sentence-level
counterpart of DescriptiveComplexity.equivK_bare, and the reason a
k-variable induction cannot count.
The chain #
A relation between k-tuples of two types: the positions of the
two-structure k-pebble game.
Equations
- DescriptiveComplexity.PebbleRel₂ M N k = ((Fin k → M) → (Fin k → N) → Prop)
Instances For
Dependency graph
Pointwise implication of two-structure relations.
Instances For
Dependency graph
The back-and-forth condition of the two-structure k-pebble game: the
pebble the spoiler moves, on either structure, can be answered on the other.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
One round of refinement.
Equations
- DescriptiveComplexity.pebbleRefine₂ E₀ E a b = (E₀ a b ∧ DescriptiveComplexity.PebbleBackForth₂ E a b)
Instances For
Dependency graph
Dependency graph
Dependency graph
The descending refinement chain.
Equations
- DescriptiveComplexity.pebbleStage₂ E₀ 0 = fun (x : Fin k → M) (x_1 : Fin k → N) => True
- DescriptiveComplexity.pebbleStage₂ E₀ n.succ = DescriptiveComplexity.pebbleRefine₂ E₀ (DescriptiveComplexity.pebbleStage₂ E₀ n)
Instances For
Dependency graph
k-pebble equivalence between two structures: the limit of the
refinement chain.
Equations
- DescriptiveComplexity.EquivK₂ E₀ a b = ∀ (n : ℕ), DescriptiveComplexity.pebbleStage₂ E₀ n a b
Instances For
Dependency graph
Dependency graph
Dependency graph
The limit is below the initial relation.
Dependency graph
Coinduction: a relation below its own refinement is below the limit – how a pair is ever proved equivalent.
Dependency graph
Stabilization #
Dependency graph
On finite structures the limit is a fixed point of the refinement.
Dependency graph
The interface characterization: consumers use this, never the stages.
Dependency graph
The game move, from the left.
Dependency graph
The game move, from the right.
Dependency graph
Monotonicity and expansion #
Dependency graph
Dependency graph
The expansion lemma: refining the initial relation by anything the limit already refines does not change the limit – so expanding both structures by relations the equivalence cannot see leaves it alone.
Dependency graph
Agreement on the atomic type, across two structures #
Agreement on the atomic type between tuples of two structures: the same
equalities between coordinates, and the same base relations of the family S
at every selection of coordinates.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
The bare case #
Two bare sets with k elements each are indistinguishable by k
pebbles: over the empty vocabulary, tuples with the same equality pattern
are ≡ᵏ-equivalent across the two sets, however far apart their sizes. The
strategy is the one of DescriptiveComplexity.exists_update_pattern, played
on both sides at once.