The universal and existential quantifier classes (issue #15, Unit 0) #
The ∀₁/∃₁ classes of Harrison-Trainor–Kretschmer §2 (their hierarchy for counting quantifier
alternations in infinitary formulas), realized as a signed quantifier traversal on the existing
syntax:
- atomic formulas lie in both classes (they have no quantifier);
- an antecedent flips the class —
¬φis universal exactly whenφis existential; - countable conjunctions and disjunctions preserve the class and are not counted as
quantifiers (the source's clause 3, which is what distinguishes
∀n/∃nfromΠn/Σn); ∀is universal only: in this syntaxex φ = (φ.not.all).not, so an existential quantifier is analloccurring negatively.
One Bool-parameterised recursion carries both classes, so their mutual dependence through negation
is definitional rather than a second induction — the same design as Lomega1omega/Polarity.lean,
and, as there, no negation-normal form is constructed anywhere.
This module is deliberately neutral: it depends only on the syntax layer and is intended to be reused by any preservation theorem (issue #15's interpolation and relative preservation, and issue #16's end extensions), not to live inside the interpolation development.
The signed quantifier class. universalSigned true φ says φ is universal (∀₁) and
universalSigned false φ says φ is existential (∃₁). An antecedent flips the sign, the
countable connectives preserve it, and all is admissible only at the universal sign.
Equations
- FirstOrder.Language.BoundedFormulaω.universalSigned x✝ FirstOrder.Language.BoundedFormulaω.falsum = True
- FirstOrder.Language.BoundedFormulaω.universalSigned x✝ (FirstOrder.Language.BoundedFormulaω.equal t₁ t₂) = True
- FirstOrder.Language.BoundedFormulaω.universalSigned x✝ (FirstOrder.Language.BoundedFormulaω.rel R ts) = True
- FirstOrder.Language.BoundedFormulaω.universalSigned x✝ (φ.imp ψ) = (FirstOrder.Language.BoundedFormulaω.universalSigned (!x✝) φ ∧ FirstOrder.Language.BoundedFormulaω.universalSigned x✝ ψ)
- FirstOrder.Language.BoundedFormulaω.universalSigned x✝ φ.all = (x✝ = true ∧ FirstOrder.Language.BoundedFormulaω.universalSigned x✝ φ)
- FirstOrder.Language.BoundedFormulaω.universalSigned x✝ (FirstOrder.Language.BoundedFormulaω.iSup φs) = ∀ (i : ℕ), FirstOrder.Language.BoundedFormulaω.universalSigned x✝ (φs i)
- FirstOrder.Language.BoundedFormulaω.universalSigned x✝ (FirstOrder.Language.BoundedFormulaω.iInf φs) = ∀ (i : ℕ), FirstOrder.Language.BoundedFormulaω.universalSigned x✝ (φs i)
Instances For
φ is universal (∀₁): every quantifier occurrence is a positive ∀.
Instances For
φ is existential (∃₁): no quantifier occurrence is a positive ∀, i.e. every one is an
existential.
Instances For
Constructor equations #
The acceptance equations #
Negation exchanges the two classes.
Dually to not_isExistential_all: an existential quantifier is a negative all, so ∃x φ is
existential exactly when φ is, and never universal (unless it is vacuous, which this syntax does
not distinguish).
The derived connectives #
Stability under the variable operations #
Quantifier class is invariant under language maps. mapLanguage rewrites terms and symbol
tags only; every quantifier node is preserved, so the signed universal class is exact.