Documentation

Linglib.Core.Logic.FirstOrder.Binders

Computable named-variable binders for first-order formulas #

Mathlib quantification on BoundedFormula is de Bruijn; formalizations whose formulas carry named free variables (trace indices in Semantics/Composition/Reduction.lean, QBSML variables in Core/Logic/Modal/QBSML/Properties.lean) need to close a single named variable. Formula.all₁ / Formula.ex₁ do so computably (unlike mathlib's Formula.iAlls / iExs), with realization phrased via Function.update. Upstream candidates.

Main declarations #

def FirstOrder.Language.Formula.all₁ {L : Language} {α : Type u_1} [DecidableEq α] (n : α) (φ : L.Formula α) :
L.Formula α

Universally close the named free variable n. Computable, unlike mathlib's Formula.iAlls.

Equations
Instances For
    def FirstOrder.Language.Formula.ex₁ {L : Language} {α : Type u_1} [DecidableEq α] (n : α) (φ : L.Formula α) :
    L.Formula α

    Existentially close the named free variable n. Computable, unlike mathlib's Formula.iExs.

    Equations
    Instances For
      theorem FirstOrder.Language.Formula.realize_all₁ {L : Language} {α : Type u_1} [DecidableEq α] {M : Type u_2} [L.Structure M] {n : α} {φ : L.Formula α} {v : αM} :
      (all₁ n φ).Realize v ∀ (x : M), φ.Realize (Function.update v n x)
      theorem FirstOrder.Language.Formula.realize_ex₁ {L : Language} {α : Type u_1} [DecidableEq α] {M : Type u_2} [L.Structure M] {n : α} {φ : L.Formula α} {v : αM} :
      (ex₁ n φ).Realize v ∃ (x : M), φ.Realize (Function.update v n x)
      def FirstOrder.Language.Formula.toSentence {L : Language} {α : Type u_1} [DecidableEq α] (φ : L.Formula α) (h : BoundedFormula.freeVarFinset φ = ) :
      L.Sentence

      A formula with no occurring free variables, as a sentence.

      Equations
      • φ.toSentence h = FirstOrder.Language.BoundedFormula.restrictFreeVar φ fun (x : (FirstOrder.Language.BoundedFormula.freeVarFinset φ)) => absurd
      Instances For
        theorem FirstOrder.Language.Formula.realize_toSentence {L : Language} {α : Type u_1} [DecidableEq α] {M : Type u_2} [L.Structure M] (φ : L.Formula α) (h : BoundedFormula.freeVarFinset φ = ) (v : αM) :
        M φ.toSentence h φ.Realize v