Documentation

MathematicalLogic.FirstOrder.Semantics

Semantics of first-order logic #

This file defines the semantics of first-order logic (structures, models, satisfiability, etc.).

First-order structures.

Instances
    def FirstOrder.Language.interp {L : Language} {n : } (M : Type u) [L.HasStructure M] :
    L.Term nVec M nM

    A term is interpreted by a structures and an assignment of type Vec M n.

    Equations
    Instances For
      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        @[simp]
        theorem FirstOrder.Language.interp_var {L : Language} {M : Type u} [L.HasStructure M] {n : } {ρ : Vec M n} {i : Fin n} :
        #i⟧ₜ M, ρ = ρ i
        @[simp]
        theorem FirstOrder.Language.interp_func {L : Language} {M : Type u} [L.HasStructure M] {m n : } {ρ : Vec M n} {f : L.Func m} {v : Vec (L.Term n) m} :
        f ⬝ᶠ v⟧ₜ M, ρ = HasStructure.interpFunc f fun (i : Fin m) => v i⟧ₜ M, ρ
        theorem FirstOrder.Language.interp_subst {L : Language} {M : Type u} [L.HasStructure M] {m n : } {t : L.Term n} {σ : L.Subst n m} {ρ : Vec M m} :
        t[σ]ₜ⟧ₜ M, ρ = t⟧ₜ M, fun (x : Fin n) => σ x⟧ₜ M, ρ
        theorem FirstOrder.Language.interp_shift_succ {L : Language} {M : Type u} [L.HasStructure M] {n : } {t : L.Term n} {k : } {u : M} {ρ : Vec M (n + k)} :
        theorem FirstOrder.Language.interp_shift {L : Language} {M : Type u} [L.HasStructure M] {n : } {t : L.Term n} {ρ : Vec M n} {u : M} :
        def FirstOrder.Language.satisfy {L : Language} (M : Type u) [L.HasStructure M] {n : } :
        L.Formula nVec M nProp

        A formula is satisfied by a structure and an assignment if it is interpreted as true.

        Equations
        Instances For
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            @[simp]
            theorem FirstOrder.Language.satisfy_rel {L : Language} {M : Type u} [L.HasStructure M] {m n : } {ρ : Vec M n} {r : L.Rel m} {v : Vec (L.Term n) m} :
            M ⊨[ρ] r ⬝ʳ v HasStructure.interpRel r fun (i : Fin m) => v i⟧ₜ M, ρ
            @[simp]
            theorem FirstOrder.Language.satisfy_eq {L : Language} {M : Type u} [L.HasStructure M] {n : } {t₁ t₂ : L.Term n} {ρ : Vec M n} :
            M ⊨[ρ] t₁ t₂ t₁⟧ₜ M, ρ = t₂⟧ₜ M, ρ
            @[simp]
            theorem FirstOrder.Language.satisfy_false {L : Language} {M : Type u} [L.HasStructure M] {n : } {ρ : Vec M n} :
            @[simp]
            theorem FirstOrder.Language.satisfy_imp {L : Language} {M : Type u} [L.HasStructure M] {n : } {p q : L.Formula n} {ρ : Vec M n} :
            M ⊨[ρ] p q M ⊨[ρ] pM ⊨[ρ] q
            @[simp]
            theorem FirstOrder.Language.satisfy_true {L : Language} {M : Type u} [L.HasStructure M] {n : } {ρ : Vec M n} :
            @[simp]
            theorem FirstOrder.Language.satisfy_neg {L : Language} {M : Type u} [L.HasStructure M] {n : } {p : L.Formula n} {ρ : Vec M n} :
            M ⊨[ρ] ~ p ¬M ⊨[ρ] p
            @[simp]
            theorem FirstOrder.Language.satisfy_and {L : Language} {M : Type u} [L.HasStructure M] {n : } {p q : L.Formula n} {ρ : Vec M n} :
            M ⊨[ρ] p q M ⊨[ρ] p M ⊨[ρ] q
            @[simp]
            theorem FirstOrder.Language.satisfy_or {L : Language} {M : Type u} [L.HasStructure M] {n : } {p q : L.Formula n} {ρ : Vec M n} :
            M ⊨[ρ] p q M ⊨[ρ] p M ⊨[ρ] q
            @[simp]
            theorem FirstOrder.Language.satisfy_iff {L : Language} {M : Type u} [L.HasStructure M] {n : } {p q : L.Formula n} {ρ : Vec M n} :
            M ⊨[ρ] p q (M ⊨[ρ] p M ⊨[ρ] q)
            @[simp]
            theorem FirstOrder.Language.satisfy_all {L : Language} {M : Type u} [L.HasStructure M] {n : } {ρ : Vec M n} {p : L.Formula (n + 1)} :
            M ⊨[ρ] ∀' p ∀ (u : M), M ⊨[u ∷ᵥ ρ] p
            @[simp]
            theorem FirstOrder.Language.satisfy_ex {L : Language} {M : Type u} [L.HasStructure M] {n : } {ρ : Vec M n} {p : L.Formula (n + 1)} :
            M ⊨[ρ] ∃' p ∃ (u : M), M ⊨[u ∷ᵥ ρ] p
            @[simp]
            theorem FirstOrder.Language.satisfy_vecAnd {L : Language} {M : Type u} [L.HasStructure M] {m n : } {ρ : Vec M n} {v : Vec (L.Formula n) m} :
            M ⊨[ρ] (i : Fin m), v i ∀ (i : Fin m), M ⊨[ρ] v i
            @[simp]
            theorem FirstOrder.Language.satisfy_vecOr {L : Language} {M : Type u} [L.HasStructure M] {m n : } {ρ : Vec M n} {v : Vec (L.Formula n) m} :
            M ⊨[ρ] (i : Fin m), v i ∃ (i : Fin m), M ⊨[ρ] v i
            @[simp]
            theorem FirstOrder.Language.satisfy_allN {L : Language} {M : Type u} [L.HasStructure M] {m n : } {ρ : Vec M n} {p : L.Formula (n + m)} :
            M ⊨[ρ] ∀^[m] p ∀ (v : Vec M m), M ⊨[v ++ᵥ ρ] p
            @[simp]
            theorem FirstOrder.Language.satisfy_exN {L : Language} {M : Type u} [L.HasStructure M] {m n : } {ρ : Vec M n} {p : L.Formula (n + m)} :
            M ⊨[ρ] ∃^[m] p ∃ (v : Vec M m), M ⊨[v ++ᵥ ρ] p
            theorem FirstOrder.Language.satisfy_subst {L : Language} {M : Type u} [L.HasStructure M] {m n : } {p : L.Formula n} {σ : L.Subst n m} {ρ : Vec M m} :
            M ⊨[ρ] p[σ]ₚ M ⊨[fun (x : Fin n) => σ x⟧ₜ M, ρ] p
            theorem FirstOrder.Language.satisfy_subst_single {L : Language} {M : Type u} [L.HasStructure M] {n : } {t : L.Term n} {ρ : Vec M n} {p : L.Formula (n + 1)} :
            theorem FirstOrder.Language.satisfy_subst_assign {L : Language} {M : Type u} [L.HasStructure M] {n : } {p : L.Formula (n + 1)} {t : L.Term (n + 1)} {ρ : Vec M (n + 1)} :
            theorem FirstOrder.Language.satisfy_shift_succ {L : Language} {M : Type u} [L.HasStructure M] {n : } {p : L.Formula n} {k : } {u : M} {ρ : Vec M (n + k)} :
            theorem FirstOrder.Language.satisfy_shift {L : Language} {M : Type u} [L.HasStructure M] {n : } {p : L.Formula n} {ρ : Vec M n} {u : M} :
            M ⊨[u ∷ᵥ ρ] ↑ₚp M ⊨[ρ] p
            @[reducible, inline]
            Equations
            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem FirstOrder.Language.satisfy_alls {L : Language} {M : Type u} [L.HasStructure M] {n : } {p : L.Formula n} :
                M ⊨ₛ ∀* p ∀ (ρ : Vec M n), M ⊨[ρ] p

                Bundled version of HasStructure.

                Instances For
                  @[reducible, inline]
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def FirstOrder.Language.Entails {L : Language} {n : } (Γ : L.FormulaSet n) (p : L.Formula n) :

                    Γ ⊨ p (Γ entails p) if any structure that satisfies Γ must also satisfy p.

                    Equations
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For

                          Γ is satisfiable if there is a structure and an assignment that satisfy all formulas in Γ. The assignment is not needed for Theory (see Theory.satisfiable_iff).

                          Equations
                          Instances For

                            A structure M is a model of theory T if it satisfies all the axioms of T.

                            Instances
                              structure FirstOrder.Language.Theory.Model {L : Language} (T : L.Theory) extends L.Structure :
                              Type (u_1 + 1)

                              Bundled version of IsModel.

                              Instances For
                                @[reducible, inline]
                                Equations
                                Instances For
                                  theorem FirstOrder.Language.Theory.entails_iff {L : Language} {T : L.Theory} {p : L.Sentence} :
                                  T p ∀ (M : T.Model), M.Dom ⊨ₛ p
                                  Equations
                                  • =
                                  Instances For

                                    The theory of a structure M includes all the sentences satisfied by M as its axioms.

                                    Equations
                                    Instances For
                                      @[simp]
                                      theorem FirstOrder.Language.mem_theory {L : Language} {M : Type u} [L.HasStructure M] {p : L.Sentence} :
                                      p L.theory M M ⊨ₛ p
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        theorem FirstOrder.Language.Structure.interp_ulift {L : Language} {n : } {t : L.Term n} {M : L.Structure} {ρ : Vec M.Dom n} :
                                        theorem FirstOrder.Language.Entails.down {L : Language} {n : } {p : L.Formula n} {Γ : L.FormulaSet n} :
                                        Γ pΓ p

                                        Two structures are elementary equivalent if they satisfy the same sentences.

                                        Equations
                                        Instances For
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Instances For
                                            structure FirstOrder.Language.Structure.Embedding {L : Language} (M : L.Structure) (N : L.Structure) extends M.Dom N.Dom :
                                            Type (max u_1 u_2)
                                            Instances For
                                              Equations
                                              • One or more equations did not get rendered due to their size.
                                              Instances For
                                                Equations
                                                Instances For
                                                  def FirstOrder.Language.Structure.Embedding.trans {L : Language} {M : L.Structure} {N : L.Structure} {R : L.Structure} (e₁ : M ↪ᴹ N) (e₂ : N ↪ᴹ R) :
                                                  M ↪ᴹ R
                                                  Equations
                                                  Instances For
                                                    theorem FirstOrder.Language.Structure.Embedding.on_term {L : Language} {n : } {M : L.Structure} {N : L.Structure} (e : M ↪ᴹ N) (t : L.Term n) (ρ : Vec M.Dom n) :
                                                    Equations
                                                    Instances For
                                                      theorem FirstOrder.Language.Structure.Embedding.is_elementary_iff {L : Language} {M : L.Structure} {N : L.Structure} (e : M ↪ᴹ N) :
                                                      e.IsElementary ∀ {n : } (p : L.Formula (n + 1)) (ρ : Vec M.Dom n), N.Dom ⊨[e.toEmbedding ρ] ∃' p∃ (u : M.Dom), N.Dom ⊨[e.toEmbedding u ∷ᵥ e.toEmbedding ρ] p

                                                      Tarski–Vaught test.

                                                      structure FirstOrder.Language.Structure.Isomorphism {L : Language} (M : L.Structure) (N : L.Structure) extends M.Dom N.Dom :
                                                      Type (max u_1 u_2)
                                                      Instances For
                                                        Equations
                                                        • One or more equations did not get rendered due to their size.
                                                        Instances For
                                                          Equations
                                                          Instances For
                                                            Equations
                                                            • i.symm = { toEquiv := i.symm, on_func := , on_rel := }
                                                            Instances For
                                                              def FirstOrder.Language.Structure.Isomorphism.trans {L : Language} {M : L.Structure} {N : L.Structure} {R : L.Structure} (i₁ : M ≃ᴹ N) (i₂ : N ≃ᴹ R) :
                                                              M ≃ᴹ R
                                                              Equations
                                                              Instances For
                                                                Equations
                                                                Instances For
                                                                  theorem FirstOrder.Language.Structure.Isomorphism.on_term {L : Language} {n : } {M : L.Structure} {N : L.Structure} (i : M ≃ᴹ N) (t : L.Term n) (ρ : Vec M.Dom n) :
                                                                  theorem FirstOrder.Language.Structure.Isomorphism.on_formula {L : Language} {n : } {M : L.Structure} {N : L.Structure} (i : M ≃ᴹ N) (p : L.Formula n) (ρ : Vec M.Dom n) :
                                                                  M.Dom ⊨[ρ] p N.Dom ⊨[i.toEquiv ρ] p