Basics on First-Order Semantics #
This file defines the interpretations of first-order terms, formulas, sentences, and theories in a style inspired by the Flypitch project.
Main Definitions #
FirstOrder.Language.Term.realizeis defined so thatt.realize vis the termtevaluated at variablesv.FirstOrder.Language.BoundedFormula.Realizeis defined so thatφ.Realize v xsis the bounded formulaφevaluated at tuples of variablesvandxs.FirstOrder.Language.Formula.Realizeis defined so thatφ.Realize vis the formulaφevaluated at variablesv.FirstOrder.Language.Sentence.Realizeis defined so thatφ.Realize Mis the sentenceφevaluated in the structureM. Also denotedM ⊨ φ.FirstOrder.Language.Theory.Modelis defined so thatT.Model Mis true if and only if every sentence ofTis realized inM. Also denotedT ⊨ φ.
Main Results #
- Several results in this file show that syntactic constructions such as
relabel,castLE,liftAt,subst, and the actions of language maps commute with realization of terms, formulas, sentences, and theories.
Implementation Notes #
- Formulas use a modified version of de Bruijn variables. Specifically, a
L.BoundedFormula α nis a formula with some variables indexed by a typeα, which cannot be quantified over, and some indexed byFin n, which can. For anyφ : L.BoundedFormula α (n + 1), we define the formula∀' φ : L.BoundedFormula α nby universally quantifying over the variable indexed byn : Fin (n + 1).
References #
For the Flypitch project:
- [J. Han, F. van Doorn, A formal proof of the independence of the continuum hypothesis] [flypitch_cpp]
- [J. Han, F. van Doorn, A formalization of forcing and the unprovability of the continuum hypothesis][flypitch_itp]
A term t with variables indexed by α can be evaluated by giving a value to each variable.
Equations
- FirstOrder.Language.Term.realize v (FirstOrder.Language.var k) = v k
- FirstOrder.Language.Term.realize v (FirstOrder.Language.func f ts) = FirstOrder.Language.Structure.funMap f fun (i : Fin l) => FirstOrder.Language.Term.realize v (ts i)
Instances For
A special case of realize_restrictVar, included because we can add the simp attribute
to it
A special case of realize_restrictVarLeft, included because we can add the simp attribute
to it
A bounded formula can be evaluated as true or false by giving values to each free variable.
Equations
- FirstOrder.Language.BoundedFormula.falsum.Realize x✝¹ x✝ = False
- (FirstOrder.Language.BoundedFormula.equal t₁ t₂).Realize x✝¹ x✝ = (FirstOrder.Language.Term.realize (Sum.elim x✝¹ x✝) t₁ = FirstOrder.Language.Term.realize (Sum.elim x✝¹ x✝) t₂)
- (FirstOrder.Language.BoundedFormula.rel R ts).Realize x✝¹ x✝ = FirstOrder.Language.Structure.RelMap R fun (i : Fin l) => FirstOrder.Language.Term.realize (Sum.elim x✝¹ x✝) (ts i)
- (f₁.imp f₂).Realize x✝¹ x✝ = (f₁.Realize x✝¹ x✝ → f₂.Realize x✝¹ x✝)
- f.all.Realize x✝¹ x✝ = ∀ (x : M), f.Realize x✝¹ (Fin.snoc x✝ x)
Instances For
List.foldr on BoundedFormula.imp gives a big "And" of input conditions.
A special case of realize_restrictFreeVar, included because we can add the simp attribute
to it
Alias of FirstOrder.Language.Formula.realize_relabel_sumInr.
A sentence can be evaluated as true or false in a structure.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Two structures are elementarily equivalent when they satisfy the same sentences.
Equations
- L.ElementarilyEquivalent M N = (L.completeTheory M = L.completeTheory N)
Instances For
Two structures are elementarily equivalent when they satisfy the same sentences.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A model of a theory is a structure in which every sentence is realized as true.
Equations
- One or more equations did not get rendered due to their size.