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 #
Proposition: the language of propositions.Satisfies lts s a: in the LTSlts, the statessatisfies the propositiona.denotation a: the denotation of a propositiona, defined as the set of states that satisfya.theory lts s: the set of all propositions satisfied by statesin the LTSlts.
Main statements #
satisfies_mem_denotation: the denotational semantics of HML is correct, in the sense that it coincides with the notion of satisfiability.not_theoryEq_satisfies: if two states have different theories, then there exists a distinguishing proposition that one state satisfies and the other does not.theoryEq_eq_bisimilarity: two states have the same theory iff they are bisimilar (seeBisimilarity).
References #
- [M. Hennessy, R. Milner, Algebraic Laws for Nondeterminism and Concurrency][Hennessy1985]
- [L. Aceto, A. Ingólfsdóttir, Testing Hennessy-Milner Logic with Recursion][Aceto1999]
Propositions.
- true {Label : Type u} : Proposition Label
- false {Label : Type u} : Proposition Label
- and {Label : Type u} (φ₁ φ₂ : Proposition Label) : Proposition Label
- or {Label : Type u} (φ₁ φ₂ : Proposition Label) : Proposition Label
- diamond {Label : Type u} (μ : Label) (φ : Proposition Label) : Proposition Label
- box {Label : Type u} (μ : Label) (φ : Proposition Label) : Proposition Label
Instances For
Negation of a proposition.
Equations
- Cslib.Logic.HML.Proposition.true.neg = Cslib.Logic.HML.Proposition.false
- Cslib.Logic.HML.Proposition.false.neg = Cslib.Logic.HML.Proposition.true
- (a_2.and b).neg = a_2.neg.or b.neg
- (a_2.or b).neg = a_2.neg.and b.neg
- (Cslib.Logic.HML.Proposition.diamond μ a_2).neg = Cslib.Logic.HML.Proposition.box μ a_2.neg
- (Cslib.Logic.HML.Proposition.box μ a_2).neg = Cslib.Logic.HML.Proposition.diamond μ a_2.neg
Instances For
Finite conjunction of propositions.
Equations
Instances For
Finite disjunction of propositions.
Equations
Instances For
Satisfaction relation. Satisfies lts s a means that, in the LTS lts, the state s satisfies
the proposition a.
- true {State : Type u_1} {Label : Type u_2} {lts : LTS State Label} {s : State} : Satisfies lts s Proposition.true
- and {State : Type u_1} {Label : Type u_2} {lts : LTS State Label} {s : State} {a b : Proposition Label} : Satisfies lts s a → Satisfies lts s b → Satisfies lts s (a.and b)
- or₁ {State : Type u_1} {Label : Type u_2} {lts : LTS State Label} {s : State} {a b : Proposition Label} : Satisfies lts s a → Satisfies lts s (a.or b)
- or₂ {State : Type u_1} {Label : Type u_2} {lts : LTS State Label} {s : State} {a b : Proposition Label} : Satisfies lts s b → Satisfies lts s (a.or b)
- diamond {State : Type u_1} {Label : Type u_2} {lts : LTS State Label} {s s' : State} {μ : Label} {a : Proposition Label} (htr : lts.Tr s μ s') (hs : Satisfies lts s' a) : Satisfies lts s (Proposition.diamond μ a)
- box {State : Type u_1} {Label : Type u_2} {lts : LTS State Label} {s : State} {μ : Label} {a : Proposition Label} (h : ∀ (s' : State), lts.Tr s μ s' → Satisfies lts s' a) : Satisfies lts s (Proposition.box μ a)
Instances For
Denotation of a proposition.
Equations
- Cslib.Logic.HML.Proposition.true.denotation lts = Set.univ
- Cslib.Logic.HML.Proposition.false.denotation lts = ∅
- (a_2.and b).denotation lts = a_2.denotation lts ∩ b.denotation lts
- (a_2.or b).denotation lts = a_2.denotation lts ∪ b.denotation lts
- (Cslib.Logic.HML.Proposition.diamond μ a_2).denotation lts = {s : State | ∃ (s' : State), lts.Tr s μ s' ∧ s' ∈ a_2.denotation lts}
- (Cslib.Logic.HML.Proposition.box μ a_2).denotation lts = {s : State | ∀ (s' : State), lts.Tr s μ s' → s' ∈ a_2.denotation lts}
Instances For
The theory of a state is the set of all propositions that it satifies.
Equations
- Cslib.Logic.HML.theory lts s = {a : Cslib.Logic.HML.Proposition Label | Cslib.Logic.HML.Satisfies lts s a}
Instances For
Two states are theory-equivalent (for a specific LTS) if they have the same theory.
Equations
- Cslib.Logic.HML.TheoryEq lts s1 s2 = (Cslib.Logic.HML.theory lts s1 = Cslib.Logic.HML.theory lts s2)
Instances For
Characterisation theorem for the denotational semantics.
A state satisfies a proposition iff it does not satisfy the negation of the proposition.
A state is in the denotation of a proposition iff it is not in the denotation of the negation of the proposition.
A state satisfies a finite conjunction iff it satisfies all conjuncts.
A state satisfies a finite disjunction iff it satisfies some disjunct.
Two states are theory-equivalent iff they are denotationally equivalent.
If two states are not theory equivalent, there exists a distinguishing proposition.
If two states are theory equivalent and the former satisfies a proposition, the latter does as well.
The list of propositions over finite μ-derivatives.
Equations
- Cslib.Logic.HML.propositions stateMap = List.map stateMap Fintype.elems.toList
Instances For
Theory equivalence is a bisimulation.
If two states are in a bisimulation and the former satisfies a proposition, the latter does as well.