Documentation

Cslib.Logics.Modal.Basic

Modal Logic #

Modal logic is a logic for reasoning about relational structures, studying statements about necessity (□φ) and possibility ◇φ.

References #

structure Cslib.Logic.Modal.Model (World : Type u_1) (Atom : Type u_2) :
Type (max u_1 u_2)

A model consists of a relation between worlds r and a valuation v.

  • r : WorldWorldProp

    World accessibility relation.

  • v : WorldAtomProp

    Valuation of atoms at a world.

Instances For
    inductive Cslib.Logic.Modal.Proposition (Atom : Type u) :

    Propositions.

    Instances For
      theorem Cslib.Logic.Modal.Proposition.and_def {Atom : Type u_1} (φ₁ φ₂ : Proposition Atom) :
      φ₁.and φ₂ = HasAnd.and φ₁ φ₂
      def Cslib.Logic.Modal.Proposition.or {Atom : Type u_1} (φ₁ φ₂ : Proposition Atom) :

      Disjunction.

      Equations
      Instances For
        theorem Cslib.Logic.Modal.Proposition.or_def {Atom : Type u_1} (φ₁ φ₂ : Proposition Atom) :
        φ₁.or φ₂ = HasOr.or φ₁ φ₂
        def Cslib.Logic.Modal.Proposition.imp {Atom : Type u_1} (φ₁ φ₂ : Proposition Atom) :

        Implication.

        Equations
        Instances For
          theorem Cslib.Logic.Modal.Proposition.imp_def {Atom : Type u_1} (φ₁ φ₂ : Proposition Atom) :
          φ₁.imp φ₂ = HasImp.imp φ₁ φ₂
          def Cslib.Logic.Modal.Proposition.iff {Atom : Type u_1} (φ₁ φ₂ : Proposition Atom) :

          Bi-implication.

          Equations
          Instances For
            theorem Cslib.Logic.Modal.Proposition.iff_def {Atom : Type u_1} (φ₁ φ₂ : Proposition Atom) :
            φ₁.iff φ₂ = HasIff.iff φ₁ φ₂
            def Cslib.Logic.Modal.Satisfies {World : Type u_1} {Atom : Type u_2} (m : Model World Atom) (w : World) :
            Proposition AtomProp

            Satisfaction relation. Satisfies m w φ means that, in the model m, the world w satisfies the proposition φ.

            Equations
            Instances For
              structure Cslib.Logic.Modal.Judgement (World : Type u_1) (Atom : Type u_2) :
              Type (max u_1 u_2)

              Judgement, representing the conclusions one reaches in modal logic.

              • m : Model World Atom

                Model.

              • w : World

                The world satisfying the proposition φ.

              • φ : Proposition Atom

                The proposition satisfied by the world w.

              Instances For

                Constructs a judgement.

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Cslib.Logic.Modal.Satisfies.Bundled {World : Type u_1} {Atom : Type u_2} (j : Judgement World Atom) :

                  Satisfaction for judgements. This just refers to the unbundled Satisfies.

                  Equations
                  Instances For
                    theorem Cslib.Logic.Modal.derivation_def {World : Type u_1} {Atom : Type u_2} {m : Model World Atom} {w : World} {φ : Proposition Atom} :
                    Satisfies m w φ = { m := m, w := w, φ := φ }
                    theorem Cslib.Logic.Modal.Satisfies.not_iff_not {World✝ : Type u_1} {Atom✝ : Type u_2} {m : Model World✝ Atom✝} {w : World✝} {φ : Proposition Atom✝} :
                    { m := m, w := w, φ := HasNot.not φ } ¬{ m := m, w := w, φ := φ }

                    A world satisfies a proposition iff it does not satisfy the negation of the proposition.

                    theorem Cslib.Logic.Modal.Satisfies.and_iff_and {World : Type u_1} {Atom : Type u_2} {w : World} {φ₁ φ₂ : Proposition Atom} {m : Model World Atom} :
                    { m := m, w := w, φ := HasAnd.and φ₁ φ₂ } { m := m, w := w, φ := φ₁ } { m := m, w := w, φ := φ₂ }
                    theorem Cslib.Logic.Modal.Satisfies.diamond_iff_exists {World : Type u_1} {Atom : Type u_2} {w : World} {φ : Proposition Atom} {m : Model World Atom} :
                    { m := m, w := w, φ := HasDiamond.diamond φ } ∃ (w' : World), m.r w w' { m := m, w := w', φ := φ }
                    theorem Cslib.Logic.Modal.Satisfies.or_iff_or {World : Type u_1} {Atom : Type u_2} {w : World} {φ₁ φ₂ : Proposition Atom} {m : Model World Atom} :
                    { m := m, w := w, φ := HasOr.or φ₁ φ₂ } { m := m, w := w, φ := φ₁ } { m := m, w := w, φ := φ₂ }

                    Characterisation of the connective.

                    Disjunction is defined in terms of the more primitive connectives given in Proposition. This result proves that the definition is correct.

                    theorem Cslib.Logic.Modal.Satisfies.imp_iff_imp {World : Type u_1} {Atom : Type u_2} {w : World} {φ₁ φ₂ : Proposition Atom} {m : Model World Atom} :
                    { m := m, w := w, φ := HasImp.imp φ₁ φ₂ } { m := m, w := w, φ := φ₁ }{ m := m, w := w, φ := φ₂ }

                    Characterisation of the connective.

                    Implication is defined in terms of the more primitive connectives given in Proposition. This result proves that the definition is correct.

                    theorem Cslib.Logic.Modal.Satisfies.iff_iff_iff {World : Type u_1} {Atom : Type u_2} {w : World} {φ₁ φ₂ : Proposition Atom} {m : Model World Atom} :
                    { m := m, w := w, φ := HasIff.iff φ₁ φ₂ } ({ m := m, w := w, φ := φ₁ } { m := m, w := w, φ := φ₂ })

                    Characterisation of the connective.

                    Bi-implication is defined in terms of the more primitive connectives given in Proposition. This result proves that the definition is correct.

                    theorem Cslib.Logic.Modal.Satisfies.box_iff_forall {World : Type u_1} {Atom : Type u_2} {w : World} {φ : Proposition Atom} {m : Model World Atom} :
                    { m := m, w := w, φ := HasBox.box φ } ∀ (w' : World), m.r w w'{ m := m, w := w', φ := φ }

                    Characterisation of the modality.

                    Necessity is defined in terms of the more primitive connectives given in Proposition. This result proves that the definition is correct.

                    @[reducible, inline]
                    abbrev Cslib.Logic.Modal.theory {World : Type u_1} {Atom : Type u_2} (m : Model World Atom) (w : World) :

                    The theory of a world in a model is the set of all propositions that it satisfies.

                    Equations
                    Instances For
                      @[reducible, inline]
                      abbrev Cslib.Logic.Modal.TheoryEq {World : Type u_1} {Atom : Type u_2} (m : Model World Atom) (w₁ w₂ : World) :

                      Two worlds are theory-equivalent under a model if they have the same theory.

                      Equations
                      Instances For
                        theorem Cslib.Logic.Modal.TheoryEq.ext_iff {World✝ : Type u_1} {Atom✝ : Type u_2} {m : Model World✝ Atom✝} {w₁ w₂ : World✝} :
                        TheoryEq m w₁ w₂ ∀ (φ : Proposition Atom✝), φ theory m w₁ φ theory m w₂
                        theorem Cslib.Logic.Modal.satisfies_theory {World✝ : Type u_1} {Atom✝ : Type u_2} {m : Model World✝ Atom✝} {w : World✝} {φ : Proposition Atom✝} (h : Satisfies m w φ) :
                        φ theory m w

                        Any proposition satisfied by a world is in the theory of that world.

                        theorem Cslib.Logic.Modal.not_theoryEq_satisfies {World✝ : Type u_1} {Atom✝ : Type u_2} {m : Model World✝ Atom✝} {w₁ w₂ : World✝} (h : ¬TheoryEq m w₁ w₂) :
                        ∃ (φ : Proposition Atom✝), { m := m, w := w₁, φ := φ } ¬{ m := m, w := w₂, φ := φ }

                        If two worlds are not theory equivalent, there exists a distinguishing proposition.

                        theorem Cslib.Logic.Modal.theoryEq_satisfies {World : Type u_1} {Atom : Type u_2} {w₁ w₂ : World} {φ : Proposition Atom} {m : Model World Atom} (h : TheoryEq m w₁ w₂) (hs : Satisfies m w₁ φ) :
                        { m := m, w := w₂, φ := φ }

                        If two worlds are theory equivalent and the former satisfies a proposition, the latter does as well.

                        theorem Cslib.Logic.Modal.Satisfies.k {World✝ : Type u_1} {Atom✝ : Type u_2} {m : Model World✝ Atom✝} {w : World✝} {φ₁ φ₂ : Proposition Atom✝} :
                        { m := m, w := w, φ := HasImp.imp (HasBox.box (HasImp.imp φ₁ φ₂)) (HasImp.imp (HasBox.box φ₁) (HasBox.box φ₂)) }

                        The K axiom, valid for all models.

                        theorem Cslib.Logic.Modal.Satisfies.dual {World✝ : Type u_1} {Atom✝ : Type u_2} {m : Model World✝ Atom✝} {w : World✝} {φ : Proposition Atom✝} :
                        { m := m, w := w, φ := HasIff.iff (HasDiamond.diamond φ) (HasNot.not (HasBox.box (HasNot.not φ))) }

                        The dual axiom, valid for all models.

                        theorem Cslib.Logic.Modal.Satisfies.t {World : Type u_1} {Atom : Type u_2} {m : Model World Atom} [instRefl : Std.Refl m.r] {w : World} (φ : Proposition Atom) :
                        { m := m, w := w, φ := HasImp.imp φ (HasDiamond.diamond φ) }

                        The T axiom, valid for all reflexive models.

                        theorem Cslib.Logic.Modal.Satisfies.t_refl {World : Type u_1} {Atom : Type u_2} {r : WorldWorldProp} [Nonempty Atom] (h : ∀ {v : WorldAtomProp} {w : World} {φ : Proposition Atom}, { m := { r := r, v := v }, w := w, φ := HasImp.imp φ (HasDiamond.diamond φ) }) :

                        Any model that admits the axiom T is reflexive.

                        theorem Cslib.Logic.Modal.Satisfies.t_box_diamond {World✝ : Type u_1} {Atom✝ : Type u_2} {m : Model World✝ Atom✝} {w : World✝} {φ : Proposition Atom✝} [Std.Refl m.r] :
                        { m := m, w := w, φ := HasImp.imp (HasBox.box φ) φ } { m := m, w := w, φ := HasImp.imp φ (HasDiamond.diamond φ) }

                        In any reflexive model, □φ → φ is equivalent to φ → ◇φ.

                        theorem Cslib.Logic.Modal.Satisfies.b {World : Type u_1} {Atom : Type u_2} {m : Model World Atom} [Std.Symm m.r] {w : World} (φ : Proposition Atom) :
                        { m := m, w := w, φ := HasImp.imp φ (HasBox.box (HasDiamond.diamond φ)) }

                        The B axiom, valid for all symmetric models.

                        theorem Cslib.Logic.Modal.Satisfies.b_symm {World : Type u_1} {Atom : Type u_2} {r : WorldWorldProp} [Nonempty Atom] (h : ∀ {v : WorldAtomProp} {w : World} {φ : Proposition Atom}, { m := { r := r, v := v }, w := w, φ := HasImp.imp φ (HasBox.box (HasDiamond.diamond φ)) }) :

                        Any model that admits the axiom B is symmetric.

                        theorem Cslib.Logic.Modal.Satisfies.four {World : Type u_1} {Atom : Type u_2} {m : Model World Atom} [IsTrans World m.r] {w : World} (φ : Proposition Atom) :

                        The 4 axiom, valid for all transitive models.

                        theorem Cslib.Logic.Modal.Satisfies.four_trans {World : Type u_1} {Atom : Type u_2} {r : WorldWorldProp} [Nonempty Atom] (h : ∀ {v : WorldAtomProp} {w : World} {φ : Proposition Atom}, { m := { r := r, v := v }, w := w, φ := HasImp.imp (HasDiamond.diamond (HasDiamond.diamond φ)) (HasDiamond.diamond φ) }) :
                        IsTrans World r

                        Any model that admits 4 is transitive.

                        theorem Cslib.Logic.Modal.Satisfies.five {World : Type u_1} {Atom : Type u_2} {m : Model World Atom} [Relation.RightEuclidean m.r] {w : World} (φ : Proposition Atom) :
                        { m := m, w := w, φ := HasImp.imp (HasDiamond.diamond φ) (HasBox.box (HasDiamond.diamond φ)) }

                        The 5 axiom, valid for all Euclidean models.

                        theorem Cslib.Logic.Modal.Satisfies.five_rightEuclidean {World : Type u_1} {Atom : Type u_2} {r : WorldWorldProp} [Nonempty Atom] (h : ∀ {v : WorldAtomProp} {w : World} {φ : Proposition Atom}, { m := { r := r, v := v }, w := w, φ := HasImp.imp (HasDiamond.diamond φ) (HasBox.box (HasDiamond.diamond φ)) }) :

                        Any model that admits 5 is Euclidean.

                        theorem Cslib.Logic.Modal.Satisfies.d {World : Type u_1} {Atom : Type u_2} {m : Model World Atom} [Relation.Serial m.r] {w : World} (φ : Proposition Atom) :
                        { m := m, w := w, φ := HasImp.imp (HasBox.box φ) (HasDiamond.diamond φ) }

                        The D axiom, valid for all serial models.

                        theorem Cslib.Logic.Modal.Satisfies.d_serial {World : Type u_1} {Atom : Type u_2} {r : WorldWorldProp} [Nonempty Atom] (h : ∀ {v : WorldAtomProp} {w : World} {φ : Proposition Atom}, { m := { r := r, v := v }, w := w, φ := HasImp.imp (HasBox.box φ) (HasDiamond.diamond φ) }) :

                        Any model that admits D is serial.

                        def Cslib.Logic.Modal.Proposition.valid {World : Type u_1} {Atom : Type u_2} (S : Set (Model World Atom)) (φ : Proposition Atom) :

                        A proposition is valid in a class of models S (modelled as a set) if it is satisfied under all models in S for all worlds.

                        Equations
                        Instances For
                          def Cslib.Logic.Modal.logic {World : Type u_1} {Atom : Type u_2} (S : Set (Model World Atom)) :

                          The modal logic of a class of models S is the set of all propositions valid in S.

                          Equations
                          Instances For