Quantifier rank of first-order formulas #
[UPSTREAM] candidate. mathlib's ModelTheory has formula complexity classes
(IsQF, IsPrenex, IsUniversal) but no quantifier-rank function. qr φ is the
maximal nesting depth of quantifiers in φ ([Lib04] Definition 3.8; [Hod93]
§3.3), the measure indexing Ehrenfeucht–Fraïssé games and ≡ₙ n-equivalence. It is bounded by
the number of quantifiers, and the gap can be exponential.
mathlib has the ∞-rank apparatus (ElementarilyEquivalent, the unbounded
back-and-forth IsExtensionPair); qr is the bottom of the missing finite-rank
layer.
Main definitions #
FirstOrder.Language.BoundedFormula.qr: quantifier rank (max quantifier nesting).
References #
The quantifier rank of a formula is the maximal nesting depth of its quantifiers. Atomic
formulas have rank 0, an implication has the larger rank of its two sides, and all adds one.
Equations
Instances For
Quantifier rank is invariant under relabelling free variables along a bijection
(relabelEquiv acts structurally, only on the terms inside atomic formulas).
An atomic formula has quantifier rank 0.
A quantifier-free formula has quantifier rank 0.