Documentation

Linglib.Logic.Modal.Basic

Modal logic over accessibility relations #

This file proves the order theory of box and diamond: the Galois connection ◇[R] ⊣ □[flip R] and the normality laws it yields, antitonicity in the relation (conversational backgrounds strengthen necessity by shrinking accessibility), and the modal square of opposition. It also defines the bundled frame classes IsS5Frame, IsKD45Frame, IsK45Frame, IsKTBFrame, and the indicial operators, with Montague's S5 box/diamond as the universal-accessibility case R = ⊤.

References #

theorem ModalLogic.box_disjoint_compl {W : Type u_1} {R : WWProp} {p : WProp} [hS : IsSerial R] :
Disjoint (box R p) (box R p)

Over a serial relation, □p and □¬p are incompatible.

theorem ModalLogic.compl_box_compl {W : Type u_1} (R : WWProp) (p : WProp) :
(box R p) = diamond R p

Box–diamond duality as an equation of predicates: ¬□¬p = ◇p.

def ModalLogic.modalSquare {W : Type u_1} (R : WWProp) (p : WProp) :

The modal square of opposition over R: A = □p, E = □¬p, I = ◇p, O = ¬□p.

Equations
Instances For
    theorem ModalLogic.modalSquare_relations {W : Type u_1} (R : WWProp) [IsSerial R] (p : WProp) :

    Over a serial relation the modal square satisfies all six Aristotelian relations.

    The Galois connection and normality #

    theorem ModalLogic.diamond_box_gc {W : Type u_1} (R : WWProp) :
    GaloisConnection (diamond R) (box (flip R))

    along R is left adjoint to along the converse relation — the characteristic adjunction of relational modality.

    theorem ModalLogic.box_mono {W : Type u_1} (R : WWProp) :
    Monotone (box R)
    theorem ModalLogic.diamond_mono {W : Type u_1} (R : WWProp) :
    Monotone (diamond R)
    theorem ModalLogic.box_inf {W : Type u_1} (R : WWProp) {p q : WProp} :
    box R (pq) = box R pbox R q
    theorem ModalLogic.diamond_sup {W : Type u_1} (R : WWProp) {p q : WProp} :
    diamond R (pq) = diamond R pdiamond R q
    theorem ModalLogic.box_top {W : Type u_1} (R : WWProp) :
    box R =

    Necessitation: □⊤ = ⊤.

    theorem ModalLogic.self_imp_box_flip_diamond {W : Type u_1} (R : WWProp) (p : WProp) :
    p box (flip R) (diamond R p)

    Conversion (Prior's tense axiom A ⊃ G P A): the unit of the adjunction — over any relation, p ≤ □_{flip R} ◇_R p.

    Accessibility restriction #

    theorem ModalLogic.box_restrict {W : Type u_1} (p : WProp) :
    Antitone fun (R : WWProp) => box R p

    Restricting accessibility strengthens necessity.

    theorem ModalLogic.diamond_restrict {W : Type u_1} (p : WProp) :
    Monotone fun (R : WWProp) => diamond R p

    Restricting accessibility weakens possibility.

    Bundled frame classes #

    class ModalLogic.IsS5Frame {W : Type u_1} (R : WWProp) extends Std.Refl R, ModalLogic.IsEuclidean R :

    R is an S5 frame if it is reflexive and Euclidean.

    • refl (a : W) : R a a
    • eucl (w v u : W) : R w vR w uR v u
    Instances
      class ModalLogic.IsKD45Frame {W : Type u_1} (R : WWProp) extends ModalLogic.IsSerial R, IsTrans W R, ModalLogic.IsEuclidean R :

      R is a KD45 frame — the doxastic frame — if it is serial, transitive, and Euclidean.

      • serial : Relator.LeftTotal R
      • trans (a b c : W) : R a bR b cR a c
      • eucl (w v u : W) : R w vR w uR v u
      Instances
        class ModalLogic.IsK45Frame {W : Type u_1} (R : WWProp) extends IsTrans W R, ModalLogic.IsEuclidean R :

        R is a K45 frame if it is transitive and Euclidean.

        • trans (a b c : W) : R a bR b cR a c
        • eucl (w v u : W) : R w vR w uR v u
        Instances
          class ModalLogic.IsKTBFrame {W : Type u_1} (R : WWProp) extends Std.Refl R, Std.Symm R :

          R is a KTB frame if it is reflexive and symmetric.

          • refl (a : W) : R a a
          • symm (a b : W) : R a bR b a
          Instances

            The Gallin hierarchy #

            Operators (W → Prop) → W → Prop form a three-level hierarchy ([Gal75]): arbitrary operators, the indicial (Kripke-definable) ones — box R for some accessibility relation — and S5, the indicial case R = ⊤. Tense and other non-Kripke operators live outside IsIndicial.

            def ModalLogic.IsIndicial {W : Type u_1} (N : (WProp)WProp) :

            An operator on world-propositions is indicial (Kripke-definable) if it is box R for some accessibility relation R.

            Equations
            Instances For
              theorem ModalLogic.box_isIndicial {W : Type u_1} (R : WWProp) :

              Flat S5 operators #

              poss/nec are the flat existential/universal modals (∃ w / ∀ w) — the S5 operators □[⊤]/◇[⊤] with their vestigial evaluation world dropped.

              def ModalLogic.poss {W : Type u_1} (p : WProp) :

              Flat S5 possibility: poss p iff p holds at some world.

              Equations
              Instances For
                def ModalLogic.nec {W : Type u_1} (p : WProp) :

                Flat S5 necessity: nec p iff p holds at every world.

                Equations
                Instances For
                  theorem ModalLogic.nec_mono {W : Type u_1} :
                  Monotone nec

                  Decidability over finite worlds #

                  @[instance_reducible]
                  instance ModalLogic.instDecidableBoxOfFintypeOfDecidablePred {W : Type u_1} [Fintype W] (R : WWProp) (p : WProp) (w : W) [(v : W) → Decidable (R w v)] [DecidablePred p] :
                  Decidable (box R p w)
                  Equations
                  @[instance_reducible]
                  instance ModalLogic.instDecidableDiamondOfFintypeOfDecidablePred {W : Type u_1} [Fintype W] (R : WWProp) (p : WProp) (w : W) [(v : W) → Decidable (R w v)] [DecidablePred p] :
                  Decidable (diamond R p w)
                  Equations