Ehrenfeucht–Fraïssé games and finite-rank elementary equivalence #
[UPSTREAM] candidate. Two structures are n-equivalent when they satisfy the same sentences of
quantifier rank ≤ n, and elementarily equivalent when they are n-equivalent for every n.
Duplicator wins the k-round Ehrenfeucht–Fraïssé game from a pair of tuples when she can answer
every move for k rounds, back and forth, keeping the tuples alike. Such tuples satisfy the
same formulas of quantifier rank ≤ k, and over a finite relational signature the converse
holds, witnessed by Hintikka formulas. This is the rank-bounded counterpart of mathlib's
IsExtensionPair.
Main definitions #
FirstOrder.Language.ElementarilyEquivalentUpTo:n-equivalence of structures.FirstOrder.Language.FODefinable: definability of a class of structures within a class.FirstOrder.Language.DuplicatorWins: duplicator wins thek-round game from a pair of tuples.FirstOrder.Language.hintikka: the rank-kHintikka formula of a tuple.
Main results #
FirstOrder.Language.not_foDefinable_of_elementarilyEquivalentUpTo: the Ehrenfeucht–Fraïssé method for undefinability.FirstOrder.Language.DuplicatorWins.realize_iff: a winning position agrees on formulas of quantifier rank≤ k.FirstOrder.Language.duplicatorWins_iff_realize_iff,FirstOrder.Language.elementarilyEquivalentUpTo_iff_duplicatorWins: the converse over a finite relational signature.FirstOrder.Language.foDefinable_iff_exists_elementarilyEquivalentUpTo: over a finite relational signature, a class is definable withinKiff it is closed undern-equivalence withinKfor somen.
Implementation notes #
Tuples are the bound variables of L.BoundedFormula Empty n, so the Fin.snoc in realize_all
is a round of the game and sentences are the case n = 0. As in Hodges's back-and-forth systems,
the atomic condition holds at every rank; Libkin states it at rank 0 only, which agrees on
nonempty structures (duplicatorWins_succ_iff) but makes soundness fail on empty ones.
References #
n-equivalence and definability #
Two structures are elementarily equivalent up to n, or n-equivalent, when they satisfy the
same sentences of quantifier rank ≤ n.
Equations
- L.ElementarilyEquivalentUpTo n M N = ∀ (φ : L.Sentence), FirstOrder.Language.BoundedFormula.qr φ ≤ n → (M ⊨ φ ↔ N ⊨ φ)
Instances For
Two structures are elementarily equivalent up to n, or n-equivalent, when they satisfy the
same sentences of quantifier rank ≤ n.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A class P of structures is first-order definable within K when some sentence holds of
exactly the members of P among the structures in K.
Equations
- L.FODefinable K P = ∃ (φ : L.Sentence), ∀ M ∈ K, M ∈ P ↔ ↑M ⊨ φ
Instances For
ElementarilyEquivalent is n-equivalence at every rank.
The Ehrenfeucht–Fraïssé method. If for every rank n some structure in K with
property P is n-equivalent to one in K without it, then P is not definable within K,
since a defining sentence would be fooled at its own quantifier rank.
The Ehrenfeucht–Fraïssé game #
Duplicator wins the k-round Ehrenfeucht–Fraïssé game from an n-tuple v of M and an
n-tuple w of N when the tuples satisfy the same atomic formulas and, with k + 1 rounds
left, every element of either structure (forth, back) has an answer in the other extending
them to a position she wins with k rounds left.
Equations
- One or more equations did not get rendered due to their size.
- L.DuplicatorWins 0 x✝¹ x✝ = ∀ (φ : L.BoundedFormula Empty x✝²), φ.IsAtomic → (φ.Realize default x✝¹ ↔ φ.Realize default x✝)
Instances For
Tuples from which duplicator wins k rounds satisfy the same formulas of quantifier rank
≤ k. Atomic formulas agree by the atomic condition, and quantified ones by the back and
forth moves.
On the empty tuples, the rank-k relation gives k-equivalence.
An isomorphism is a winning strategy at every rank, answering a by f a and b by
f.symm b.
On a nonempty structure the atomic condition at rank k + 1 follows from forth, so the
relation is [Lib04]'s ≃ₖ₊₁ (p. 36) and [Hod93] Lemma 3.3.1.
Hintikka formulas and completeness #
The atomic formula with the given index.
Equations
Instances For
In a relational language every atomic formula on bound variables is an atom.
The atomic type of a tuple is the conjunction of the atoms it satisfies and the negations of the others.
Equations
- L.atomicType v = FirstOrder.Language.BoundedFormula.iInf fun (i : L.AtomIndex n) => if (L.atom i).Realize default v then L.atom i else (L.atom i).not
Instances For
hintikkaSet k n is the finite set of game-normal formulas of rank k in n variables. At
rank 0 they are the atomic types. At rank k + 1 each joins an atomic type to a set X of
rank-k formulas in n + 1 variables, saying that each member of X is realized by some
extension and every extension realizes some member of X.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The rank-k Hintikka formula of v is the game-normal formula of rank k it satisfies.
Equations
- One or more equations did not get rendered due to their size.
- L.hintikka 0 x✝ = L.atomicType x✝
Instances For
A tuple satisfies exactly one game-normal formula of each rank ([Hod93]
Theorem 3.3.2 (a)), so any member of hintikkaSet k n it satisfies is its Hintikka formula.
The Hintikka formula of v holds of w iff duplicator wins k rounds from the tuples
([Hod93] Theorem 3.3.2 (b)).
Over a finite relational signature, duplicator wins k rounds from two tuples iff they
satisfy the same formulas of quantifier rank ≤ k ([Lib04] Theorem 3.18).
Over a finite relational signature, a class is first-order definable within K iff, for some
k, it is closed under k-equivalence within K ([Lib04] Corollary 3.17). The defining
sentence is the disjunction of the rank-k Hintikka sentences of its members.