Documentation

Cslib.Foundations.Logic.Operators

Logical operators #

This module contains typeclasses and associated notation for common logical operators: propositional connectives (like and ), modalities (like , plain and indexed), linear connectives (like ), etc.

Propositional connectives #

class Cslib.Logic.HasAnd (α : Type u_1) :
Type u_1

The type α has an and connective ().

  • and (a b : α) : α

    a ∧ b is the conjunction of a and b.

Instances

    a ∧ b is the conjunction of a and b.

    Equations
    Instances For
      class Cslib.Logic.HasOr (α : Type u_1) :
      Type u_1

      The type α has an or connective ().

      • or (a b : α) : α

        a ∨ b is the disjunction of a and b.

      Instances

        a ∨ b is the disjunction of a and b.

        Equations
        Instances For
          class Cslib.Logic.HasImp (α : Type u_1) :
          Type u_1

          The type α has an implication connective ().

          • imp (a b : α) : α

            a → b denotes a implies b.

          Instances

            a → b denotes a implies b.

            Equations
            Instances For
              class Cslib.Logic.HasIff (α : Type u_1) :
              Type u_1

              The type α has a bi-implication connective ().

              • iff (a b : α) : α

                a ↔ b denotes a implies b and vice-versa.

              Instances

                a ↔ b denotes a implies b and vice-versa.

                Equations
                Instances For
                  class Cslib.Logic.HasNot (α : Type u_1) :
                  Type u_1

                  The type α has a negation connective (¬).

                  • not (a : α) : α

                    ¬a is the negation of a.

                  Instances

                    ¬a is the negation of a.

                    Equations
                    Instances For

                      Basic modalities #

                      class Cslib.Logic.HasBox (α : Type u_1) :
                      Type u_1

                      The type α has a box modality ().

                      • box (a : α) : α

                        a is valid in all immediately reachable states.

                      Instances

                        a is valid in all immediately reachable states.

                        Equations
                        Instances For
                          class Cslib.Logic.HasDiamond (α : Type u_1) :
                          Type u_1

                          The type α has a diamond modality ().

                          • diamond (a : α) : α

                            a is valid in a reachable state.

                          Instances

                            a is valid in a reachable state.

                            Equations
                            Instances For

                              Dynamic modalities #

                              Here we need to use the prefix d to distinguish our notation from the normal [·] and ⟨·⟩. A refactoring that makes this unnecessary would be welcome.

                              class Cslib.Logic.HasDynamicBox (α : Type u_1) (β : Type u_2) :
                              Type (max u_1 u_2)

                              The type α has a dynamic box modality with action type β (d[a]φ).

                              • dynBox (a : β) (b : α) : α

                                b is necessarily valid after a.

                              Instances

                                b is necessarily valid after a.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  class Cslib.Logic.HasDynamicDiamond (α : Type u_1) (β : Type u_2) :
                                  Type (max u_1 u_2)

                                  The type α has a dynamic diamond modality with action type β (d⟨a⟩φ).

                                  • dynDiamond (a : β) (b : α) : α

                                    b is possibly valid after a.

                                  Instances

                                    b is possibly valid after a.

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

                                      Linear connectives #

                                      class Cslib.Logic.HasTensor (α : Type u_1) :
                                      Type u_1

                                      The type α has a tensor connective (⊗).

                                      • tensor (a b : α) : α

                                        a ⊗ b is the multiplicative conjunction of a and b.

                                      Instances

                                        a ⊗ b is the multiplicative conjunction of a and b.

                                        Equations
                                        Instances For