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
      def Cslib.Logic.Modal.Proposition.or {Atom : Type u_1} (φ₁ φ₂ : Proposition Atom) :

      Disjunction.

      Equations
      Instances For
        def Cslib.Logic.Modal.Proposition.impl {Atom : Type u_1} (φ₁ φ₂ : Proposition Atom) :

        Implication.

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

          Bi-implication.

          Equations
          Instances For

            Necessity.

            Equations
            Instances For
              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} :
                      theorem Cslib.Logic.Modal.neg_satisfies {World✝ : Type u_1} {Atom✝ : Type u_2} {m : Model World✝ Atom✝} {w : World✝} {φ : Proposition Atom✝} :

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

                      theorem Cslib.Logic.Modal.Satisfies.or_iff_or {World : Type u_1} {Atom : Type u_2} {w : World} {φ₁ φ₂ : Proposition Atom} {m : Model World Atom} :

                      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.impl_iff_impl {World : Type u_1} {Atom : Type u_2} {w : World} {φ₁ φ₂ : Proposition Atom} {m : Model World Atom} :
                      InferenceSystem.derivation InferenceSystem.Default { m := m, w := w, φ := φ₁.impl φ₂ } InferenceSystem.derivation InferenceSystem.Default { m := m, w := w, φ := φ₁ }InferenceSystem.derivation InferenceSystem.Default { 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.box_iff_forall {World : Type u_1} {Atom : Type u_2} {w : World} {φ : Proposition Atom} {m : Model World Atom} :
                      InferenceSystem.derivation InferenceSystem.Default { m := m, w := w, φ := φ.box } ∀ (w' : World), m.r w w'InferenceSystem.derivation InferenceSystem.Default { 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 satifies.

                      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✝), InferenceSystem.derivation InferenceSystem.Default { m := m, w := w₁, φ := φ } ¬InferenceSystem.derivation InferenceSystem.Default { 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₁ φ) :

                          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✝} :
                          InferenceSystem.derivation InferenceSystem.Default { m := m, w := w, φ := (φ₁.impl φ₂).box.impl (φ₁.box.impl φ₂.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✝} :

                          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) :

                          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}, InferenceSystem.derivation InferenceSystem.Default { m := { r := r, v := v }, w := w, φ := φ.impl φ.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] :

                          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) :

                          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}, InferenceSystem.derivation InferenceSystem.Default { m := { r := r, v := v }, w := w, φ := φ.impl φ.diamond.box }) :

                          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}, InferenceSystem.derivation InferenceSystem.Default { m := { r := r, v := v }, w := w, φ := φ.diamond.diamond.impl φ.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) :

                          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}, InferenceSystem.derivation InferenceSystem.Default { m := { r := r, v := v }, w := w, φ := φ.diamond.impl φ.diamond.box }) :

                          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) :

                          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}, InferenceSystem.derivation InferenceSystem.Default { m := { r := r, v := v }, w := w, φ := φ.box.impl φ.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