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 : Language} {α : Type u'} {n : ℕ} (t₁ t₂ : L.Term (α ⊕ Fin n)) : (t₁.bdEqual t₂).IsAtomic
- rel {L : 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 : Language} {α : Type u'} {n : ℕ} : BoundedFormula.falsum.IsQF
- of_isAtomic {L : Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α n} (h : φ.IsAtomic) : φ.IsQF
- imp {L : Language} {α : Type u'} {n : ℕ} {φ₁ φ₂ : L.BoundedFormula α n} (h₁ : φ₁.IsQF) (h₂ : φ₂.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 : Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α n} (h : φ.IsQF) : φ.IsPrenex
- all {L : Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α (n + 1)} (h : φ.IsPrenex) : φ.all.IsPrenex
- ex {L : Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α (n + 1)} (h : φ.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
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
Instances For
For any bounded formula φ
, φ.toPrenex
is a semantically-equivalent formula in prenex normal
form.
Equations
Instances For
A universal formula is a formula defined by applying only universal quantifiers to a quantifier-free formula.
- of_isQF {L : Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α n} (h : φ.IsQF) : φ.IsUniversal
- all {L : Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α (n + 1)} (h : φ.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 : Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α n} (h : φ.IsQF) : φ.IsExistential
- ex {L : Language} {α : Type u'} {n : ℕ} {φ : L.BoundedFormula α (n + 1)} (h : φ.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 → BoundedFormula.IsUniversal φ