The first-order fragment of type-driven composition #
The first-order constants over a signature are its constant and relation symbols, the
determiners every, some and no, negation, conjunction and disjunction. Every logical form
over them reads back to a first-order formula whose realization is the logical form's
denotation. The readback evaluates the logical form in a syntactic model built from mathlib's
terms and bounded formulas, and a logical relation with the standard model proves it sound, so
first-order consequence between readbacks is entailment between trees, as
Semantics/Dynamic/DRS/Reduction.lean shows for DRT.
Main definitions #
FirstOrderConstant,FirstOrderConstant.interp: the first-order constants and their denotations in a composition model at a world;Model.lexiconinterprets the words of a fragment through them.Ty.SyntacticDomain: the syntactic model, by type and number of bound variables.Term.readback,Term.toFormula: the readback of a logical form.Ty.Realizes: the logical relation between the syntactic and the standard model.Tree.HoldsAt: truth of a tree under a lexicon and an assignment.
Main results #
Term.realizes_readback: a logical form's readback realizes its denotation whenever the readbacks of its constants realize theirs.Term.realizeAt_toFormula: a first-order logical form denotes the realization of its readback.Tree.holdsAt_iff_realizeAt,Tree.holdsAt_of_models,Tree.models_imp_iff_entails,Tree.holdsAt_compactness: a tree holds where its readback is realized, entailment between trees is first-order consequence, and families of trees satisfy compactness.
Implementation notes #
The syntactic model is indexed by the number of bound variables in scope, and gives truth values
and functions at every larger number, so a determiner binds the next de Bruijn variable of
BoundedFormula without computing a fresh name. Formulas are never carried to more bound
variables, since BoundedFormula.castLE keeps the index an inner quantifier binds. Most is not
first-order definable, as Barwise and Cooper showed, so it is not a first-order constant.
References #
First-order constants #
The first-order constants over a signature L are its constant symbols at type e, its
unary and binary relation symbols at e ⇒ t and e ⇒ e ⇒ t, the determiners every, some
and no, negation, and conjunction and disjunction.
- name {L : FirstOrder.Language} (c : L.Constants) : FirstOrderConstant L Montague.Ty.e
- rel₁ {L : FirstOrder.Language} (R : L.Relations 1) : FirstOrderConstant L (Montague.Ty.e ⇒ Montague.Ty.t)
- rel₂ {L : FirstOrder.Language} (R : L.Relations 2) : FirstOrderConstant L (Montague.Ty.e ⇒ Montague.Ty.e ⇒ Montague.Ty.t)
- every {L : FirstOrder.Language} : FirstOrderConstant L Montague.Ty.det
- some {L : FirstOrder.Language} : FirstOrderConstant L Montague.Ty.det
- no {L : FirstOrder.Language} : FirstOrderConstant L Montague.Ty.det
- neg {L : FirstOrder.Language} : FirstOrderConstant L (Montague.Ty.t ⇒ Montague.Ty.t)
- conj {L : FirstOrder.Language} : FirstOrderConstant L (Montague.Ty.t ⇒ Montague.Ty.t ⇒ Montague.Ty.t)
- disj {L : FirstOrder.Language} : FirstOrderConstant L (Montague.Ty.t ⇒ Montague.Ty.t ⇒ Montague.Ty.t)
Instances For
At a world of a composition model a symbol denotes what the structure there gives it, the
determiners denote those of Quantification, and conjunction and disjunction take the second
conjunct first, as a right-branching coordination [t₁ [and t₂]] composes.
Equations
- HeimKratzer.FirstOrderConstant.interp m w (HeimKratzer.FirstOrderConstant.name c) = m.const c w
- HeimKratzer.FirstOrderConstant.interp m w (HeimKratzer.FirstOrderConstant.rel₁ R) = m.pred₁ R w
- HeimKratzer.FirstOrderConstant.interp m w (HeimKratzer.FirstOrderConstant.rel₂ R) = m.pred₂ R w
- HeimKratzer.FirstOrderConstant.interp m w HeimKratzer.FirstOrderConstant.every = Quantifier.GQ.every
- HeimKratzer.FirstOrderConstant.interp m w HeimKratzer.FirstOrderConstant.some = Quantifier.GQ.some
- HeimKratzer.FirstOrderConstant.interp m w HeimKratzer.FirstOrderConstant.no = Quantifier.GQ.no
- HeimKratzer.FirstOrderConstant.interp m w HeimKratzer.FirstOrderConstant.neg = Not
- HeimKratzer.FirstOrderConstant.interp m w HeimKratzer.FirstOrderConstant.conj = fun (q p : Montague.Ty.Domain m.E m.W Montague.Ty.t) => p ∧ q
- HeimKratzer.FirstOrderConstant.interp m w HeimKratzer.FirstOrderConstant.disj = fun (q p : Montague.Ty.Domain m.E m.W Montague.Ty.t) => p ∨ q
Instances For
The lexicon a composition model induces at a world from a translation of words into first-order constants.
Equations
- m.lexicon words w x = Option.map (fun (c : (ty : Montague.Ty) × HeimKratzer.FirstOrderConstant L ty) => ⟨c.fst, HeimKratzer.FirstOrderConstant.interp m w c.snd⟩) (words x)
Instances For
The syntactic model #
The syntactic model takes the function and relation symbols of the signature in one universe, so that terms and bounded formulas share it.
In the syntactic model of the types over the free variables α, with n bound variables in
scope, an entity is a term, and a truth value and a function are given at every larger number of
bound variables, as a bounded formula and as a function on the values there.
Equations
- Montague.Ty.SyntacticDomain L α Montague.Ty.e x✝ = L.Term (α ⊕ Fin x✝)
- Montague.Ty.SyntacticDomain L α Montague.Ty.t x✝ = ((k : ℕ) → x✝ ≤ k → L.BoundedFormula α k)
- Montague.Ty.SyntacticDomain L α (σ ⇒ τ) x✝ = ((k : ℕ) → x✝ ≤ k → Montague.Ty.SyntacticDomain L α σ k → Montague.Ty.SyntacticDomain L α τ k)
- Montague.Ty.SyntacticDomain L α σ.intens x✝ = Montague.Ty.SyntacticDomain L α σ x✝
- Montague.Ty.SyntacticDomain L α x✝¹ x✝ = PUnit.{max (?u.10 + 1) (?u.9 + 1)}
Instances For
A predicate of the syntactic model applied to the next bound variable, with j + 1 bound
variables in scope, as a determiner applies its restrictor and scope to the variable it binds.
Equations
- P.applyNext h = P (j + 1) ⋯ (FirstOrder.Language.var (Sum.inr (Fin.last j))) (j + 1) ⋯
Instances For
The logical relation between the syntactic model and the standard one over a structure,
under a valuation v of the free variables and xs of the n bound ones. A term realizes the
entity it denotes, a formula realizes a truth value with xs extended to any larger number of
bound variables, a function realizes a function that sends realized arguments to realized values
with xs so extended, and an intension is realized at every world.
Equations
- One or more equations did not get rendered due to their size.
- Montague.Ty.Realizes S v Montague.Ty.e x✝² x✝¹ x✝ a = (FirstOrder.Language.Term.realize (Sum.elim v x✝¹) x✝ = a)
- Montague.Ty.Realizes S v Montague.Ty.t x✝² x✝¹ x✝ p = ∀ (k : ℕ) (hk : x✝² ≤ k) (ys : Fin k → M), ys ∘ Fin.castLE hk = x✝¹ → ((x✝ k hk).Realize v ys ↔ p)
- Montague.Ty.Realizes S v σ.intens x✝² x✝¹ x✝ a = ∀ (w : W), Montague.Ty.Realizes S v σ x✝² x✝¹ x✝ (a w)
- Montague.Ty.Realizes S v x✝⁴ x✝³ x✝² x✝¹ x✝ = True
Instances For
In the syntactic model a mode applies at the current number of bound variables, the intensional modes to the argument itself, and predicate modification and event identification conjoin pointwise.
Equations
- One or more equations did not get rendered due to their size.
- HeimKratzer.Mode.functionalLeft.readback f x✝ = f n ⋯ x✝
- HeimKratzer.Mode.functionalRight.readback x✝ f = f n ⋯ x✝
- HeimKratzer.Mode.intensionalLeft.readback f x✝ = f n ⋯ x✝
- HeimKratzer.Mode.intensionalRight.readback x✝ f = f n ⋯ x✝
- HeimKratzer.Mode.predicateModification.readback p q = fun (k : ℕ) (hk : n ≤ k) (x : Montague.Ty.SyntacticDomain L α Montague.Ty.e k) (j : ℕ) (hj : k ≤ j) => p k hk x j hj ⊓ q k hk x j hj
Instances For
In the syntactic model a symbol is an atom, a determiner binds the next bound variable where its scope is complete, and negation and the connectives are the formula connectives.
Equations
- One or more equations did not get rendered due to their size.
- HeimKratzer.FirstOrderConstant.readback x✝ (HeimKratzer.FirstOrderConstant.name c) = c.term
- HeimKratzer.FirstOrderConstant.readback x✝ HeimKratzer.FirstOrderConstant.neg = fun (x : ℕ) (x_1 : x✝ ≤ x) (φ : Montague.Ty.SyntacticDomain L α Montague.Ty.t x) (j : ℕ) (hj : x ≤ j) => (φ j hj).not
Instances For
The readback of a term in the syntactic model, given readbacks of its constants, with n
bound variables in scope and a valuation ρ of its variables in terms. An abstraction reads back
to a function at every larger number of bound variables, under ρ carried there and updated at
its variable.
Equations
- One or more equations did not get rendered due to their size.
- HeimKratzer.Term.readback R n ρ (HeimKratzer.Term.const c) = R n c
- HeimKratzer.Term.readback R n ρ (HeimKratzer.Term.var i) = ρ i
Instances For
The first-order formula a logical form over the first-order constants reads back to, whose free variables are the logical form's variables.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Soundness of the readback #
A composition mode preserves the logical relation.
When the readbacks of the constants realize their denotations, the readback of a term under a valuation of its variables realizes the term's denotation under the assignment that valuation realizes. This is the fundamental lemma of the logical relation.
The readbacks of the first-order constants realize their denotations in a composition model at a world.
A first-order logical form denotes, at a world of a composition model and under an assignment, the realization of its readback there.
Trees #
A tree holds under a lexicon and an assignment when it composes to a true truth value.
Equations
- HeimKratzer.Tree.HoldsAt lex g t = ∃ (p : Id (Montague.Ty.Domain E W Montague.Ty.t)), HeimKratzer.Tree.interp lex g t = some ⟨Montague.Ty.t, p⟩ ∧ p
Instances For
A tree that translates to a logical form of type t holds where the logical form is
true.
A tree that translates to a logical form of type t holds where the readback of the
logical form is realized.
First-order consequence between the readbacks of two trees yields entailment between the trees in every composition model, at every world and under every assignment.
Consequence and compactness #
For universe-0 languages, composition models and mathlib's bundled models coincide: entailment
between trees over composition models with nonempty domains is first-order consequence over the
empty theory, and compactness transfers to families of trees. Mathlib's ModelType has nonempty
carriers, hence the restriction to nonempty domains, which is standard in the study of
generalized quantifiers.
A first-order structure as a one-world composition model.
Equations
- HeimKratzer.Model.ofStructure M S = { E := M, W := Unit, interp := fun (x : Unit) => S }
Instances For
Over composition models with nonempty domains, entailment between two trees is mathlib's
⊨ᵇ between their readbacks over the empty theory.
A family of trees whose readbacks are closed is jointly true in a composition model with a
nonempty domain iff every finite subfamily is. The nontrivial direction is mathlib's compactness
theorem Theory.isSatisfiable_iff_isFinitelySatisfiable.