Documentation

Mathlib.ModelTheory.Semantics

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 #

Main Results #

Implementation Notes #

References #

For the Flypitch project:

A term t with variables indexed by α can be evaluated by giving a value to each variable.

Equations
Instances For
    @[simp]
    theorem FirstOrder.Language.Term.realize_liftAt {L : FirstOrder.Language} {M : Type w} [FirstOrder.Language.Structure L M] {α : Type u'} {n : } {n' : } {m : } {t : FirstOrder.Language.Term L (α Fin n)} {v : α Fin (n + n')M} :
    def FirstOrder.Language.BoundedFormula.Realize {L : FirstOrder.Language} {M : Type w} [FirstOrder.Language.Structure L M] {α : Type u'} {l : } (_f : FirstOrder.Language.BoundedFormula L α l) (_v : αM) (_xs : Fin lM) :

    A bounded formula can be evaluated as true or false by giving values to each free variable.

    Equations
    Instances For
      theorem FirstOrder.Language.BoundedFormula.realize_mapTermRel_id {L : FirstOrder.Language} {L' : FirstOrder.Language} {M : Type w} [FirstOrder.Language.Structure L M] {α : Type u'} {β : Type v'} [FirstOrder.Language.Structure L' M] {ft : (n : ) → FirstOrder.Language.Term L (α Fin n)FirstOrder.Language.Term L' (β Fin n)} {fr : (n : ) → L.Relations nL'.Relations n} {n : } {φ : FirstOrder.Language.BoundedFormula L α n} {v : αM} {v' : βM} {xs : Fin nM} (h1 : ∀ (n : ) (t : FirstOrder.Language.Term L (α Fin n)) (xs : Fin nM), FirstOrder.Language.Term.realize (Sum.elim v' xs) (ft n t) = FirstOrder.Language.Term.realize (Sum.elim v xs) t) (h2 : ∀ (n : ) (R : L.Relations n) (x : Fin nM), FirstOrder.Language.Structure.RelMap (fr n R) x = FirstOrder.Language.Structure.RelMap R x) :
      theorem FirstOrder.Language.BoundedFormula.realize_mapTermRel_add_castLe {L : FirstOrder.Language} {L' : FirstOrder.Language} {M : Type w} [FirstOrder.Language.Structure L M] {α : Type u'} {β : Type v'} [FirstOrder.Language.Structure L' M] {k : } {ft : (n : ) → FirstOrder.Language.Term L (α Fin n)FirstOrder.Language.Term L' (β Fin (k + n))} {fr : (n : ) → L.Relations nL'.Relations n} {n : } {φ : FirstOrder.Language.BoundedFormula L α n} (v : {n : } → (Fin (k + n)M)αM) {v' : βM} (xs : Fin (k + n)M) (h1 : ∀ (n : ) (t : FirstOrder.Language.Term L (α Fin n)) (xs' : Fin (k + n)M), FirstOrder.Language.Term.realize (Sum.elim v' xs') (ft n t) = FirstOrder.Language.Term.realize (Sum.elim (v xs') (xs' Fin.natAdd k)) t) (h2 : ∀ (n : ) (R : L.Relations n) (x : Fin nM), FirstOrder.Language.Structure.RelMap (fr n R) x = FirstOrder.Language.Structure.RelMap R x) (hv : ∀ (n : ) (xs : Fin (k + n)M) (x : M), v (Fin.snoc xs x) = v xs) :
      theorem FirstOrder.Language.BoundedFormula.realize_liftAt {L : FirstOrder.Language} {M : Type w} [FirstOrder.Language.Structure L M] {α : Type u'} {n : } {n' : } {m : } {φ : FirstOrder.Language.BoundedFormula L α n} {v : αM} {xs : Fin (n + n')M} (hmn : m + n' n + 1) :

      A formula can be evaluated as true or false by giving values to each free variable.

      Equations
      Instances For

        A sentence can be evaluated as true or false in a structure.

        Equations
        Instances For

          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

            The complete theory of a structure M is the set of all sentences M satisfies.

            Equations
            Instances For

              Two structures are elementarily equivalent when they satisfy the same sentences.

              Equations
              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.

                  • realize_of_mem : φT, M φ
                  Instances

                    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.
                    Instances For
                      @[simp]
                      theorem FirstOrder.Language.Formula.realize_iAlls {L : FirstOrder.Language} {M : Type w} [FirstOrder.Language.Structure L M] {α : Type u'} {β : Type v'} {γ : Type u_3} [Finite γ] {f : αβ γ} {φ : FirstOrder.Language.Formula L α} {v : βM} :
                      @[simp]
                      theorem FirstOrder.Language.BoundedFormula.realize_iAlls {L : FirstOrder.Language} {M : Type w} [FirstOrder.Language.Structure L M] {α : Type u'} {β : Type v'} {γ : Type u_3} [Finite γ] {f : αβ γ} {φ : FirstOrder.Language.Formula L α} {v : βM} {v' : Fin 0M} :
                      @[simp]
                      theorem FirstOrder.Language.Formula.realize_iExs {L : FirstOrder.Language} {M : Type w} [FirstOrder.Language.Structure L M] {α : Type u'} {β : Type v'} {γ : Type u_3} [Finite γ] {f : αβ γ} {φ : FirstOrder.Language.Formula L α} {v : βM} :
                      @[simp]
                      theorem FirstOrder.Language.BoundedFormula.realize_iExs {L : FirstOrder.Language} {M : Type w} [FirstOrder.Language.Structure L M] {α : Type u'} {β : Type v'} {γ : Type u_3} [Finite γ] {f : αβ γ} {φ : FirstOrder.Language.Formula L α} {v : βM} {v' : Fin 0M} :