k-variable equivalence over a structure #
The instantiation of the abstract pebble refinement
(DescriptiveComplexity.Invariant.Pebble) at a structure: the initial
relation is agreement on the atomic type
(DescriptiveComplexity.atomicAgreeOn – same equalities between coordinates,
same base relations at every selection of coordinates), and
DescriptiveComplexity.EquivK (atomicAgreeOn S A k) is k-variable
equivalence ≡ᵏ of k-tuples over the structure A.
Agreement is relative to a family S of relation symbols: over an infinite
vocabulary, full atomic agreement is not captured by any formula, and every
consumer of the invariant layer – a DescriptiveComplexity.StepDef, whose
formulas mention finitely many symbols
(DescriptiveComplexity.StepDef.exists_usesRels) – needs the refinement
relative to the finite family it actually reads, which is what makes the
refinement itself definable. The full-agreement instance is
DescriptiveComplexity.atomicAgree (S = Set.univ).
The theorem of this file is the k-variable invariance lemma
(DescriptiveComplexity.realize_equivK): a first-order formula over a
relational vocabulary, whose relation symbols lie in S
(DescriptiveComplexity.RelsIn), cannot separate ≡ᵏ-equivalent tuples,
when its free variables read the tuples through an arbitrary selection of
coordinates, its bound variables are placed injectively outside that
selection, and the positions not in use leave room for its quantifier depth
(DescriptiveComplexity.qdepth). The proof is the textbook pebble argument
(Ebbinghaus–Flum 1995, ch. 3): each quantifier spends
one fresh pebble, placed by the game move
DescriptiveComplexity.EquivK.update; atomic formulas are decided by the
initial agreement. No syntactic k-variable fragment is ever defined – the
budget hypothesis of the lemma is «this formula has at most k variables»,
in the only form the invariance argument needs.
A second consequence of the game formulation is inheritance by pair
substructures (DescriptiveComplexity.equivK_atomicAgreeOn_of_pairSub, the
structure instance of DescriptiveComplexity.equivK_of_pairSub): rearranging,
selecting and repeating coordinates preserves ≡ᵏ – the well-definedness of
every coordinate manipulation on ≡ᵏ-classes.
The vocabulary is required to be relational, as everywhere in the invariant
layer: atomic agreement at selections of coordinates is only the atomic type
when terms are variables. (Everything a StepDef runs on in the
Abiteboul–Vianu development is relational or expanded from relational.)
Agreement on the atomic type #
Agreement on the atomic type over the relation symbols of the family S:
two k-tuples agree on all equalities between their coordinates and on all
base relations of S at every selection of coordinates. This is the initial
relation of the k-pebble refinement over a structure, relative to the
finitely many symbols a definition mentions.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Dependency graph
Agreement on the full atomic type: the special case S = Set.univ of
DescriptiveComplexity.atomicAgreeOn.
Equations
Instances For
Dependency graph
Agreement on the atomic type is an equivalence.
Dependency graph
≡ᵏ over a structure is an equivalence.
Dependency graph
Agreement on the atomic type passes to pair substructures: selecting, permuting and repeating coordinate pairs preserves it.
Dependency graph
≡ᵏ is inherited by pair substructures over a structure: the
instance of DescriptiveComplexity.equivK_of_pairSub at atomic agreement.
This is the well-definedness of every coordinate manipulation on
≡ᵏ-classes – substitution and rearrangement relations included.
Dependency graph
Quantifier depth and the relation symbols of a formula #
The quantifier depth of a bounded formula: the number of pebbles the invariance argument spends on it.
Equations
- DescriptiveComplexity.qdepth FirstOrder.Language.BoundedFormula.falsum = 0
- DescriptiveComplexity.qdepth (FirstOrder.Language.BoundedFormula.equal t₁ t₂) = 0
- DescriptiveComplexity.qdepth (FirstOrder.Language.BoundedFormula.rel R ts) = 0
- DescriptiveComplexity.qdepth (f₁.imp f₂) = max (DescriptiveComplexity.qdepth f₁) (DescriptiveComplexity.qdepth f₂)
- DescriptiveComplexity.qdepth f.all = DescriptiveComplexity.qdepth f + 1
Instances For
Dependency graph
The relation symbols of a bounded formula all lie in the family S.
Equations
- DescriptiveComplexity.RelsIn S FirstOrder.Language.BoundedFormula.falsum = True
- DescriptiveComplexity.RelsIn S (FirstOrder.Language.BoundedFormula.equal t₁ t₂) = True
- DescriptiveComplexity.RelsIn S (FirstOrder.Language.BoundedFormula.rel R ts) = (⟨l, R⟩ ∈ S)
- DescriptiveComplexity.RelsIn S (f₁.imp f₂) = (DescriptiveComplexity.RelsIn S f₁ ∧ DescriptiveComplexity.RelsIn S f₂)
- DescriptiveComplexity.RelsIn S f.all = DescriptiveComplexity.RelsIn S f
Instances For
Dependency graph
Containment of relation symbols is monotone in the family.
Dependency graph
The set of relation symbols occurring in a bounded formula.
Equations
- DescriptiveComplexity.relsOf FirstOrder.Language.BoundedFormula.falsum = ∅
- DescriptiveComplexity.relsOf (FirstOrder.Language.BoundedFormula.equal t₁ t₂) = ∅
- DescriptiveComplexity.relsOf (FirstOrder.Language.BoundedFormula.rel R ts) = {⟨l, R⟩}
- DescriptiveComplexity.relsOf (f₁.imp f₂) = DescriptiveComplexity.relsOf f₁ ∪ DescriptiveComplexity.relsOf f₂
- DescriptiveComplexity.relsOf f.all = DescriptiveComplexity.relsOf f
Instances For
Dependency graph
A formula mentions finitely many relation symbols.
Dependency graph
A formula's relation symbols lie in the set of its relation symbols.
Dependency graph
Terms of a relational vocabulary are variables #
In a relational vocabulary, every term is a variable.
Dependency graph
Placing a fresh pebble #
Dependency graph
Dependency graph
The k-variable invariance lemma #
The k-variable invariance lemma. A first-order formula over a
relational vocabulary, with relation symbols in the family S, cannot
separate tuples ≡ᵏ-equivalent relative to S: its free variables read the
tuples through an arbitrary selection g of coordinates, its bound variables
through an injective selection h disjoint from g, and the coordinates not
in use leave room for its quantifier depth. Each quantifier spends one fresh
pebble, placed by the game move (DescriptiveComplexity.EquivK.update);
atomic formulas are decided by the initial agreement
(DescriptiveComplexity.atomicAgreeOn).
Dependency graph
The k-variable invariance lemma, for formulas: a formula over a
relational vocabulary, with relation symbols in S and room for its
quantifier depth beyond the selection of coordinates its free variables read,
cannot separate ≡ᵏ-equivalent tuples.