Quantifier Complexity #
This file defines quantifier complexity of first-order formulas, and constructs prenex normal forms.
Main Definitions #
FirstOrder.Language.BoundedFormula.IsAtomic
defines atomic formulas - those which are constructed only from terms and relations.FirstOrder.Language.BoundedFormula.IsQF
defines quantifier-free formulas - those which are constructed only from atomic formulas and boolean operations.FirstOrder.Language.BoundedFormula.IsPrenex
defines when a formula is in prenex normal form - when it consists of a series of quantifiers applied to a quantifier-free formula.FirstOrder.Language.BoundedFormula.toPrenex
constructs a prenex normal form of a given formula.
Main Results #
FirstOrder.Language.BoundedFormula.realize_toPrenex
shows that the prenex normal form of a formula has the same realization as the original formula.
An atomic formula is either equality or a relation symbol applied to terms.
Note that ⊥
and ⊤
are not considered atomic in this convention.
- equal: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} (t₁ t₂ : L.Term (α ⊕ Fin n)), (t₁.bdEqual t₂).IsAtomic
- rel: ∀ {L : FirstOrder.Language} {α : Type u'} {n l : ℕ} (R : L.Relations l) (ts : Fin l → L.Term (α ⊕ Fin n)), (R.boundedFormula ts).IsAtomic
Instances For
A quantifier-free formula is a formula defined without quantifiers. These are all equivalent to boolean combinations of atomic formulas.
- falsum: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ}, FirstOrder.Language.BoundedFormula.falsum.IsQF
- of_isAtomic: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α n}, φ.IsAtomic → φ.IsQF
- imp: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} {φ₁ φ₂ : L.BoundedFormula α n}, φ₁.IsQF → φ₂.IsQF → (φ₁.imp φ₂).IsQF
Instances For
Indicates that a bounded formula is in prenex normal form - that is, it consists of quantifiers applied to a quantifier-free formula.
- of_isQF: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α n}, φ.IsQF → φ.IsPrenex
- all: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α (n + 1)}, φ.IsPrenex → φ.all.IsPrenex
- ex: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α (n + 1)}, φ.IsPrenex → φ.ex.IsPrenex
Instances For
An auxiliary operation to FirstOrder.Language.BoundedFormula.toPrenex
.
If φ
is quantifier-free and ψ
is in prenex normal form, then φ.toPrenexImpRight ψ
is a prenex normal form for φ.imp ψ
.
Equations
- One or more equations did not get rendered due to their size.
- x.toPrenexImpRight ψ.all = ((FirstOrder.Language.BoundedFormula.liftAt 1 x✝ x).toPrenexImpRight ψ).all
- x✝.toPrenexImpRight x = x✝.imp x
Instances For
An auxiliary operation to FirstOrder.Language.BoundedFormula.toPrenex
.
If φ
and ψ
are in prenex normal form, then φ.toPrenexImp ψ
is a prenex normal form for φ.imp ψ
.
Equations
- ((φ.imp FirstOrder.Language.BoundedFormula.falsum).all.imp FirstOrder.Language.BoundedFormula.falsum).toPrenexImp x = (φ.toPrenexImp (FirstOrder.Language.BoundedFormula.liftAt 1 x✝ x)).all
- φ.all.toPrenexImp x = (φ.toPrenexImp (FirstOrder.Language.BoundedFormula.liftAt 1 x✝ x)).ex
- x✝.toPrenexImp x = x✝.toPrenexImpRight x
Instances For
For any bounded formula φ
, φ.toPrenex
is a semantically-equivalent formula in prenex normal
form.
Equations
- FirstOrder.Language.BoundedFormula.falsum.toPrenex = ⊥
- (FirstOrder.Language.BoundedFormula.equal t₁ t₂).toPrenex = t₁.bdEqual t₂
- (FirstOrder.Language.BoundedFormula.rel R ts).toPrenex = FirstOrder.Language.BoundedFormula.rel R ts
- (f₁.imp f₂).toPrenex = f₁.toPrenex.toPrenexImp f₂.toPrenex
- f.all.toPrenex = f.toPrenex.all
Instances For
A universal formula is a formula defined by applying only universal quantifiers to a quantifier-free formula.
- of_isQF: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α n}, φ.IsQF → φ.IsUniversal
- all: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α (n + 1)}, φ.IsUniversal → φ.all.IsUniversal
Instances For
An existential formula is a formula defined by applying only existential quantifiers to a quantifier-free formula.
- of_isQF: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α n}, φ.IsQF → φ.IsExistential
- ex: ∀ {L : FirstOrder.Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α (n + 1)}, φ.IsExistential → φ.ex.IsExistential
Instances For
A theory is universal when it is comprised only of universal sentences - these theories apply also to substructures.
- isUniversal_of_mem : ∀ ⦃φ : L.Sentence⦄, φ ∈ T → FirstOrder.Language.BoundedFormula.IsUniversal φ
Instances
Equations
- ⋯ = ⋯