Infinitary first-order formulas #
This file defines the syntax of L_{∞ω}: first-order formulas with conjunctions and
disjunctions indexed by a fixed branching carrier ι, one per formula. L_{ω₁ω} is the
definitional specialization ι := ℕ.
Design #
The infinitary constructors iSup/iInf branch over the single type parameter ι rather than
quantifying over a fresh index type at every node. Consequently
BoundedFormulaInf L ι α n : Type (max u v u' uι) lives in the max of its parameters'
universes, with no + 1 bump; in particular BoundedFormulaω L α n := BoundedFormulaInf L ℕ α n
has exactly the universe Type (max u v u') of the finitary BoundedFormula.
Terms are Mathlib's Term, and bound variables are the slots Fin n, as for the finitary
BoundedFormula. A quantifier binds the last slot. The derived binary connectives follow
Mathlib's finitary conventions: φ ⊓ ψ is (φ.imp ψ.not).not, φ ⊔ ψ is φ.not.imp ψ, and
φ.iff ψ is φ.imp ψ ⊓ ψ.imp φ.
Infinitary formulas are not modelled by extending Mathlib's finitary BoundedFormula, whose
iInf/iSup range over finite index types. The two syntaxes are related only by the embedding
BoundedFormula.toInf. Structural recursion and induction use the recursor
BoundedFormulaInf.rec, with one case per constructor.
Main definitions #
FirstOrder.Language.BoundedFormulaInf: infinitary formulas with carrierι, free variables inα, andnbound-variable slots.FirstOrder.Language.BoundedFormulaω: theι := ℕspecialization, an abbreviation, so allBoundedFormulaInfAPI applies definitionally;FormulaInf,SentenceInf,FormulaωandSentenceω.- The derived connectives
not,⊤,⊥,⊓,⊔,iffandex, the quantifier closuresallsandexs, and the existential quantificationexsLast kof the lastkslots. FirstOrder.Language.BoundedFormulaInf.IsAtomic: equations and relational atoms.FirstOrder.Language.BoundedFormula.toInf: the carrier-generic embedding of finitary formulas, with itsι := ℕcaseBoundedFormula.toOmega.
References #
- Ported from
cameronfreer/infinitary-logicat commit9f82bd572af2d79a043c6bc3f1b745f14e0bcaa4, whose infinitary syntax isMathlib/ModelTheory/Infinitary/Syntax.leaninleanprover-community/mathlib4#42758(Apache 2.0) at commit2264c2c872bb642ab519aa2288d53110f07af37d. - Divergences from these sources: the binary connectives
⊓,⊔andiffand the predicateIsAtomicare added; the definition bodies are not exposed, except those of the match patternsnotandex, and are used through the defining equationsbot_def,top_def,inf_def,sup_def,iff_def,alls_zero,alls_succ,exs_zero,exs_succ,exsLast_zero,exsLast_succand thetoInf_*equations.
An infinitary bounded formula of L_{∞ω}, with infinitary conjunctions and disjunctions
branching over the fixed carrier ι, free variables indexed by α, and n additional bound
variables available.
- falsum
{L : Language}
{ι : Type uι}
{α : Type u'}
{n : ℕ}
: L.BoundedFormulaInf ι α n
The false formula.
- equal
{L : Language}
{ι : Type uι}
{α : Type u'}
{n : ℕ}
(t₁ t₂ : L.Term (α ⊕ Fin n))
: L.BoundedFormulaInf ι α n
Equality of two terms.
- rel
{L : Language}
{ι : Type uι}
{α : Type u'}
{n l : ℕ}
(R : L.Relations l)
(ts : Fin l → L.Term (α ⊕ Fin n))
: L.BoundedFormulaInf ι α n
A relation symbol applied to terms.
- imp
{L : Language}
{ι : Type uι}
{α : Type u'}
{n : ℕ}
(φ ψ : L.BoundedFormulaInf ι α n)
: L.BoundedFormulaInf ι α n
Implication.
- all
{L : Language}
{ι : Type uι}
{α : Type u'}
{n : ℕ}
(φ : L.BoundedFormulaInf ι α (n + 1))
: L.BoundedFormulaInf ι α n
Universal quantification over the last bound variable.
- iSup
{L : Language}
{ι : Type uι}
{α : Type u'}
{n : ℕ}
(φs : ι → L.BoundedFormulaInf ι α n)
: L.BoundedFormulaInf ι α n
Infinitary disjunction over the carrier.
- iInf
{L : Language}
{ι : Type uι}
{α : Type u'}
{n : ℕ}
(φs : ι → L.BoundedFormulaInf ι α n)
: L.BoundedFormulaInf ι α n
Infinitary conjunction over the carrier.
Instances For
A bounded formula of L_{ω₁ω}: the definitional ι := ℕ specialization of
BoundedFormulaInf. Its universe is exactly that of the finitary BoundedFormula.
Instances For
An L_{∞ω} sentence: a formula with no free variables at all.
Instances For
An L_{ω₁ω} formula.
It is routed through BoundedFormulaω rather than stated as FormulaInf ℕ α, although the two
are the same type: dot-notation resolution unfolds an abbreviation chain one step at a time,
trying each head constant's namespace, so declarations in a BoundedFormulaω namespace stay
reachable as φ.op on an L_{ω₁ω} formula.
Instances For
An L_{ω₁ω} sentence, routed through Formulaω for the reason given there.
Instances For
The negation of an infinitary formula.
Instances For
The true formula.
Instances For
The conjunction of two infinitary formulas, (φ.imp ψ.not).not, as for finitary formulas.
The disjunction of two infinitary formulas, φ.not.imp ψ, as for finitary formulas.
The biconditional of two infinitary formulas.
Instances For
Existential quantification over the last bound variable.
Instances For
Places universal quantifiers on all bound-variable slots of an infinitary bounded formula,
as BoundedFormula.alls does for finitary formulas.
Instances For
Places existential quantifiers on all bound-variable slots of an infinitary bounded formula,
as BoundedFormula.exs does for finitary formulas.
Instances For
Existential quantification over the last k bound-variable slots, keeping the first n.
Instances For
Defining equations #
With no bound-variable slots, alls leaves a formula unchanged.
With no bound-variable slots, exs leaves a formula unchanged.
Quantifying no slots leaves a formula unchanged.
An infinitary formula is atomic when it is an equation between terms or a relation symbol
applied to terms, as for Mathlib's finitary BoundedFormula.IsAtomic.
- equal
{L : Language}
{ι : Type uι}
{α : Type u'}
{n : ℕ}
(t₁ t₂ : L.Term (α ⊕ Fin n))
: (BoundedFormulaInf.equal t₁ t₂).IsAtomic
An equation between terms is atomic.
- rel
{L : Language}
{ι : Type uι}
{α : Type u'}
{n l : ℕ}
(R : L.Relations l)
(ts : Fin l → L.Term (α ⊕ Fin n))
: (BoundedFormulaInf.rel R ts).IsAtomic
A relation symbol applied to terms is atomic.
Instances For
The embedding of finitary bounded formulas into the infinitary syntax. Finitary formulas have no infinitary nodes, so the target carrier is arbitrary: one embedding serves every carrier and universe.
Instances For
The embedding sends the finitary false formula to the false formula.
The embedding of finitary bounded formulas into L_{ω₁ω}.