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 [HM85], which includes a negation connective, and a variation without negation, for example as in [AI99]. We follow the former and focus on a minimal set of connectives, recovering the others as derived constructs.
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 #
Propositions.
- true
{Label : Type u}
: Proposition Label
Truth.
- and
{Label : Type u}
(φ₁ φ₂ : Proposition Label)
: Proposition Label
Conjunction.
- not
{Label : Type u}
(φ : Proposition Label)
: Proposition Label
Negation.
- diamond
{Label : Type u}
(μ : Label)
(φ : Proposition Label)
: Proposition Label
Possibility (dynamic diamond modality).
Instances For
Equations
Equations
Equations
Equations
Falsity, derived from negation and truth.
Instances For
Equations
Disjunction, derived from negation and conjunction.
Equations
- φ₁.or φ₂ = Cslib.Logic.HasNot.not (Cslib.Logic.HasAnd.and (Cslib.Logic.HasNot.not φ₁) (Cslib.Logic.HasNot.not φ₂))
Instances For
Equations
Implication.
Equations
- φ₁.imp φ₂ = Cslib.Logic.HasOr.or (Cslib.Logic.HasNot.not φ₁) φ₂
Instances For
Equations
Bi-implication.
Equations
- φ₁.iff φ₂ = Cslib.Logic.HasAnd.and (Cslib.Logic.HasImp.imp φ₁ φ₂) (Cslib.Logic.HasImp.imp φ₂ φ₁)
Instances For
Equations
Necessity (dynamic box modality), derived from dynamic diamond and negation.
Equations
Instances For
Equations
Finite conjunction of propositions.
Equations
- Cslib.Logic.HML.Proposition.finiteAnd φs = List.foldr (fun (x1 x2 : Cslib.Logic.HML.Proposition Label) => Cslib.Logic.HasAnd.and x1 x2) ⊤ φs
Instances For
Finite disjunction of propositions.
Equations
- Cslib.Logic.HML.Proposition.finiteOr φs = List.foldr (fun (x1 x2 : Cslib.Logic.HML.Proposition Label) => Cslib.Logic.HasOr.or x1 x2) ⊥ φs
Instances For
Satisfaction relation. Satisfies lts s φ means that, in the LTS lts, the state s satisfies
the proposition φ.
Equations
- Cslib.Logic.HML.Satisfies lts s Cslib.Logic.HML.Proposition.true = True
- Cslib.Logic.HML.Satisfies lts s (φ₁.and φ₂) = (Cslib.Logic.HML.Satisfies lts s φ₁ ∧ Cslib.Logic.HML.Satisfies lts s φ₂)
- Cslib.Logic.HML.Satisfies lts s φ.not = ¬Cslib.Logic.HML.Satisfies lts s φ
- Cslib.Logic.HML.Satisfies lts s (Cslib.Logic.HML.Proposition.diamond μ φ) = ∃ (s' : State), lts.Tr s μ s' ∧ Cslib.Logic.HML.Satisfies lts s' φ
Instances For
Judgement, representing the conclusions one reaches in HML.
- lts : LTS State Label
LTS.
- state : State
The state satisfying the proposition
φ. - φ : Proposition Label
The proposition satisfied by the state
s.
Instances For
Constructs a judgement.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Satisfaction for judgements. This just refers to the unbundled Satisfies.
Equations
Instances For
Equations
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.
Characterisation of the ↔ connective.
Bi-implication is defined in terms of the more primitive connectives given in Proposition.
This result proves that the definition is correct.
A state satisfies a finite conjunction iff it satisfies all conjuncts.
A state satisfies a finite disjunction iff it satisfies some disjunct.
Denotation of a proposition.
Equations
- Cslib.Logic.HML.Proposition.denotation lts Cslib.Logic.HML.Proposition.true = Set.univ
- Cslib.Logic.HML.Proposition.denotation lts (φ₁.and φ₂) = Cslib.Logic.HML.Proposition.denotation lts φ₁ ∩ Cslib.Logic.HML.Proposition.denotation lts φ₂
- Cslib.Logic.HML.Proposition.denotation lts φ.not = (Cslib.Logic.HML.Proposition.denotation lts φ)ᶜ
- Cslib.Logic.HML.Proposition.denotation lts (Cslib.Logic.HML.Proposition.diamond μ φ) = {s : State | ∃ (s' : State), lts.Tr s μ s' ∧ s' ∈ Cslib.Logic.HML.Proposition.denotation lts φ}
Instances For
The theory of a state is the set of all propositions that it satisfies.
Equations
- Cslib.Logic.HML.theory lts s = {φ : Cslib.Logic.HML.Proposition Label | ⇓{ lts := lts, state := s, φ := φ }}
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 is in the denotation of a proposition iff it is not in the denotation of the negation of the proposition.
Two states are theory-equivalent iff they are denotationally equivalent.
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, one satisfies a proposition iff the other does.