Documentation

Flypitch.FOL.Semantics

Flypitch.FOL.Semantics interprets the syntax and proof system from the preceding files in first-order structures. It defines term and formula realization, semantic consequence, and proves the soundness of the natural-deduction rules.

structure Flypitch.fol.Structure (L : Language) :
Type (u + 1)

An L-structure consists of a carrier type and interpretations of the symbols of L.

Instances For
    def Flypitch.fol.realize_term {L : Language} {M : Structure L} (v : M.carrier) {l : } :
    preterm L ldvector M.carrier lM.carrier

    Interpret a partially applied term in a structure under a valuation.

    Equations
    Instances For
      theorem Flypitch.fol.realize_term_congr {L : Language} {M : Structure L} {v v' : M.carrier} (h : ∀ (n : ), v n = v' n) {l : } (t : preterm L l) (xs : dvector M.carrier l) :
      realize_term v t xs = realize_term v' t xs

      Realization depends only on the values of the valuation on free variables of the term.

      theorem Flypitch.fol.realize_term_subst {L : Language} {M : Structure L} (v : M.carrier) {l : } (n : ) (t : preterm L l) (s : term L) (xs : dvector M.carrier l) :

      Semantic substitution for terms is computed by changing the valuation at the substituted variable.

      theorem Flypitch.fol.realize_term_subst_lift {L : Language} {M : Structure L} (v : M.carrier) (x : M.carrier) (m : ) {l : } (t : preterm L l) (xs : dvector M.carrier l) :
      realize_term (v[x // m]) (t ↑' 1 # m) xs = realize_term v t xs

      Lifting a term corresponds semantically to extending the valuation by a fresh element.

      def Flypitch.fol.realize_formula {L : Language} {M : Structure L} {l : } :
      (M.carrier)preformula L ldvector M.carrier lProp

      Interpret a preformula under a valuation and arguments for its unapplied relation slots.

      Equations
      Instances For
        theorem Flypitch.fol.realize_formula_congr {L : Language} {M : Structure L} {l : } {v v' : M.carrier} (h : ∀ (n : ), v n = v' n) (f : preformula L l) (xs : dvector M.carrier l) :

        Realization of formulas is invariant under pointwise-equal valuations.

        theorem Flypitch.fol.realize_formula_subst {L : Language} {M : Structure L} {l : } (v : M.carrier) (n : ) (f : preformula L l) (s : term L) (xs : dvector M.carrier l) :

        Formula substitution is semantically the same as updating the valuation at the substituted variable.

        theorem Flypitch.fol.realize_formula_subst0 {L : Language} {M : Structure L} {l : } (v : M.carrier) (f : preformula L l) (s : term L) (xs : dvector M.carrier l) :

        Specialization of realize_formula_subst to substitution at variable 0.

        theorem Flypitch.fol.realize_formula_subst_lift {L : Language} {M : Structure L} {l : } (v : M.carrier) (x : M.carrier) (m : ) (f : preformula L l) (xs : dvector M.carrier l) :

        Lifting a formula is semantically neutral when the valuation is extended at the lifted index.

        A closed formula is satisfied in M when every valuation realizes it.

        Equations
        Instances For

          Every formula in T is satisfied in M.

          Equations
          Instances For
            def Flypitch.fol.satisfied {L : Language} (T : Set (formula L)) (f : formula L) :

            Semantic consequence of a single formula from a set of assumptions.

            Equations
            Instances For

              Semantic consequence of every formula in T' from T.

              Equations
              Instances For
                theorem Flypitch.fol.satisfied_in_trans {L : Language} {M : Structure L} {T : Set (formula L)} {f : formula L} (hMT : all_satisfied_in M T) (hTf : T f) :

                Semantic consequence can be composed with satisfaction in a specific structure.

                theorem Flypitch.fol.all_satisfied_in_trans {L : Language} {M : Structure L} {T T' : Set (formula L)} (hMT : all_satisfied_in M T) (hTT' : all_satisfied T T') :

                Satisfaction of a theory in a structure is closed under semantic consequence.

                theorem Flypitch.fol.satisfied_of_mem {L : Language} {T : Set (formula L)} {f : formula L} (hf : f T) :
                T f

                Any member of a theory is a semantic consequence of that theory.

                theorem Flypitch.fol.all_satisfied_of_subset {L : Language} {T T' : Set (formula L)} (h : T' T) :

                Semantic consequence is monotone in the conclusion set.

                theorem Flypitch.fol.satisfied_trans {L : Language} {T₁ T₂ : Set (formula L)} {f : formula L} (h₁₂ : all_satisfied T₁ T₂) (h₂f : T₂ f) :
                T₁ f

                Semantic consequence composes transitively.

                theorem Flypitch.fol.all_satisfied_trans {L : Language} {T₁ T₂ T₃ : Set (formula L)} (h₁₂ : all_satisfied T₁ T₂) (h₂₃ : all_satisfied T₂ T₃) :
                all_satisfied T₁ T₃

                Pointwise semantic consequence composes transitively.

                theorem Flypitch.fol.satisfied_weakening {L : Language} {T T' : Set (formula L)} (h : T T') {f : formula L} (hTf : T f) :
                T' f

                Weakening assumptions preserves semantic consequence.

                theorem Flypitch.fol.formula_soundness {L : Language} {Γ : Set (formula L)} {A : formula L} (h : Γ A) :
                Γ A

                Every derivable formula is semantically valid from the same assumptions.