Documentation

Cslib.Logics.HML.Basic

Hennessy-Milner Logic (HML) #

Hennessy-Milner Logic (HML) is a logic for reasoning about the behaviour of nondeterministic and concurrent systems.

Implementation notes #

There are two main versions of HML. The original [Hennessy1985], which includes a negation connective, and a variation without negation, for example as in [Aceto1999]. We follow the latter, which is used in many recent papers. Negation is recovered as usual, by having a false atomic proposition and a function that, given any proposition, returns its negated form (see Proposition.neg).

Main definitions #

Main statements #

References #

inductive Cslib.Logic.HML.Proposition (Label : Type u) :

Propositions.

Instances For
    inductive Cslib.Logic.HML.Satisfies {State : Type u_1} {Label : Type u_2} (lts : LTS State Label) :
    StateProposition LabelProp

    Satisfaction relation. Satisfies lts s a means that, in the LTS lts, the state s satisfies the proposition a.

    Instances For
      def Cslib.Logic.HML.Proposition.denotation {Label : Type u_1} {State : Type u_2} (a : Proposition Label) (lts : LTS State Label) :
      Set State

      Denotation of a proposition.

      Equations
      Instances For
        @[reducible, inline]
        abbrev Cslib.Logic.HML.theory {State : Type u_1} {Label : Type u_2} (lts : LTS State Label) (s : State) :

        The theory of a state is the set of all propositions that it satifies.

        Equations
        Instances For
          @[reducible, inline]
          abbrev Cslib.Logic.HML.TheoryEq {State : Type u_1} {Label : Type u_2} (lts : LTS State Label) (s1 s2 : State) :

          Two states are theory-equivalent (for a specific LTS) if they have the same theory.

          Equations
          Instances For
            theorem Cslib.Logic.HML.satisfies_mem_denotation {State : Type u_1} {Label : Type u_2} {s : State} {a : Proposition Label} {lts : LTS State Label} :
            Satisfies lts s a s a.denotation lts

            Characterisation theorem for the denotational semantics.

            @[simp]
            theorem Cslib.Logic.HML.neg_satisfies {State : Type u_1} {Label : Type u_2} {s : State} {a : Proposition Label} {lts : LTS State Label} :
            ¬Satisfies lts s a.neg Satisfies lts s a

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

            theorem Cslib.Logic.HML.neg_denotation {State : Type u_1} {Label : Type u_2} {s : State} {lts : LTS State Label} (a : Proposition Label) :
            sa.neg.denotation lts s a.denotation lts

            A state is in the denotation of a proposition iff it is not in the denotation of the negation of the proposition.

            theorem Cslib.Logic.HML.satisfies_finiteAnd {State : Type u_1} {Label : Type u_2} {lts : LTS State Label} {s : State} {as : List (Proposition Label)} :
            Satisfies lts s (Proposition.finiteAnd as) aas, Satisfies lts s a

            A state satisfies a finite conjunction iff it satisfies all conjuncts.

            theorem Cslib.Logic.HML.satisfies_finiteOr {State : Type u_1} {Label : Type u_2} {lts : LTS State Label} {s : State} {as : List (Proposition Label)} :
            Satisfies lts s (Proposition.finiteOr as) aas, Satisfies lts s a

            A state satisfies a finite disjunction iff it satisfies some disjunct.

            theorem Cslib.Logic.HML.satisfies_theory {State✝ : Type u_1} {Label✝ : Type u_2} {lts : LTS State✝ Label✝} {s : State✝} {a : Proposition Label✝} (h : Satisfies lts s a) :
            a theory lts s
            theorem Cslib.Logic.HML.theoryEq_denotation_eq {State : Type u_1} {Label : Type u_2} {s1 s2 : State} {lts : LTS State Label} :
            TheoryEq lts s1 s2 ∀ (a : Proposition Label), s1 a.denotation lts s2 a.denotation lts

            Two states are theory-equivalent iff they are denotationally equivalent.

            theorem Cslib.Logic.HML.not_theoryEq_satisfies {State✝ : Type u_1} {Label✝ : Type u_2} {lts : LTS State✝ Label✝} {s1 s2 : State✝} (h : ¬TheoryEq lts s1 s2) :
            ∃ (a : Proposition Label✝), Satisfies lts s1 a ¬Satisfies lts s2 a

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

            theorem Cslib.Logic.HML.theoryEq_satisfies {State : Type u_1} {Label : Type u_2} {s1 s2 : State} {a : Proposition Label} {lts : LTS State Label} (h : TheoryEq lts s1 s2) (hs : Satisfies lts s1 a) :
            Satisfies lts s2 a

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

            noncomputable def Cslib.Logic.HML.propositions {State : Type u_1} {Label : Type u_2} {s : State} {μ : Label} {lts : LTS State Label} (stateMap : (lts.image s μ)Proposition Label) [finImage : Fintype (lts.image s μ)] :

            The list of propositions over finite μ-derivatives.

            Equations
            Instances For
              theorem Cslib.Logic.HML.propositions_complete {State : Type u_1} {Label : Type u_2} {s : State} {μ : Label} {lts : LTS State Label} (stateMap : (lts.image s μ)Proposition Label) [finImage : Fintype (lts.image s μ)] (s' : (lts.image s μ)) :
              stateMap s' propositions stateMap
              theorem Cslib.Logic.HML.propositions_satisfies_conjunction {State : Type u_1} {Label : Type u_2} {s : State} {μ : Label} {lts : LTS State Label} (stateMap : (lts.image s μ)Proposition Label) [finImage : Fintype (lts.image s μ)] {s1 s1' : State} (htr : lts.Tr s1 μ s1') (hdist_spec : ∀ (s2' : (lts.image s μ)), Satisfies lts s1' (stateMap s2')) :
              theorem Cslib.Logic.HML.theoryEq_isBisimulation {State : Type u_1} {Label : Type u_2} (lts : LTS State Label) [image_finite : ∀ (s : State) (μ : Label), Finite (lts.image s μ)] :

              Theory equivalence is a bisimulation.

              theorem Cslib.Logic.HML.bisimulation_satisfies {State : Type u_1} {Label : Type u_2} {r : StateStateProp} {s1 s2 : State} {lts : LTS State Label} {hrb : lts.IsBisimulation r} (hr : r s1 s2) (a : Proposition Label) (hs : Satisfies lts s1 a) :
              Satisfies lts s2 a

              If two states are in a bisimulation and the former satisfies a proposition, the latter does as well.

              theorem Cslib.Logic.HML.bisimulation_TheoryEq {State : Type u_1} {Label : Type u_2} {r : StateStateProp} {s1 s2 : State} {lts : LTS State Label} {hrb : lts.IsBisimulation r} (hr : r s1 s2) :
              TheoryEq lts s1 s2
              theorem Cslib.Logic.HML.theoryEq_eq_bisimilarity {State : Type u_1} {Label : Type u_2} (lts : LTS State Label) [image_finite : ∀ (s : State) (μ : Label), Finite (lts.image s μ)] :

              Theory equivalence and bisimilarity coincide for image-finite LTSs.