Table of Contents
Fetching ...

Hennessy-Milner Logic in CSLib, the Lean Computer Science Library

Fabrizio Montesi, Marco Peressotti, Alexandre Rademaker

TL;DR

The paper formalises Hennessy-Milner Logic (HML) for labelled transition systems (LTS) within the Lean-based CSLib, providing a universe-polymorphic syntax, satisfaction, and denotational semantics, along with a complete metatheory. It proves the Hennessy-Milner theorem that, for image-finite LTSs, theory equivalence coincides with strong bisimilarity, and establishes the correctness of the denotational semantics and bisimulation invariance. The development is integrated with CSLib's LTS API and bisimilarity infrastructure, enabling direct application to CCS and automata defined in CSLib. All code is publicly available, verified with Lean 4.28.0-rc1, and designed for reuse across CSLib projects.

Abstract

We present a library-level formalisation of Hennessy-Milner Logic (HML) - a foundational logic for labelled transition systems (LTSs) - for the Lean Computer Science Library (CSLib). Our development includes the syntax, satisfaction relation, and denotational semantics of HML, as well as a complete metatheory including the Hennessy-Milner theorem - bisimilarity coincides with theory equivalence for image-finite LTSs. Our development emphasises generality and reusability: it is parametric over arbitrary LTSs, definitions integrate with CSLib's infrastructure (such as the formalisation of bisimilarity), and proofs leverage Lean's automation (notably the grind tactic). All code is publicly available in CSLib and can be readily applied to systems that use its LTS API.

Hennessy-Milner Logic in CSLib, the Lean Computer Science Library

TL;DR

The paper formalises Hennessy-Milner Logic (HML) for labelled transition systems (LTS) within the Lean-based CSLib, providing a universe-polymorphic syntax, satisfaction, and denotational semantics, along with a complete metatheory. It proves the Hennessy-Milner theorem that, for image-finite LTSs, theory equivalence coincides with strong bisimilarity, and establishes the correctness of the denotational semantics and bisimulation invariance. The development is integrated with CSLib's LTS API and bisimilarity infrastructure, enabling direct application to CCS and automata defined in CSLib. All code is publicly available, verified with Lean 4.28.0-rc1, and designed for reuse across CSLib projects.

Abstract

We present a library-level formalisation of Hennessy-Milner Logic (HML) - a foundational logic for labelled transition systems (LTSs) - for the Lean Computer Science Library (CSLib). Our development includes the syntax, satisfaction relation, and denotational semantics of HML, as well as a complete metatheory including the Hennessy-Milner theorem - bisimilarity coincides with theory equivalence for image-finite LTSs. Our development emphasises generality and reusability: it is parametric over arbitrary LTSs, definitions integrate with CSLib's infrastructure (such as the formalisation of bisimilarity), and proofs leverage Lean's automation (notably the grind tactic). All code is publicly available in CSLib and can be readily applied to systems that use its LTS API.
Paper Structure (13 sections, 5 theorems, 3 equations)

This paper contains 13 sections, 5 theorems, 3 equations.

Key Result

theorem thmcountertheorem

$s \models \varphi$ if and only if $s \in \llbracket \varphi \rrbracket$.

Theorems & Definitions (10)

  • definition thmcounterdefinition: Labelled Transition System
  • definition thmcounterdefinition
  • definition thmcounterdefinition: Image-Finiteness
  • definition thmcounterdefinition: Bisimulation and Bisimilarity
  • definition thmcounterdefinition: Theory and Theory Equivalence
  • theorem thmcountertheorem: Semantic Equivalence
  • theorem thmcountertheorem: Bisimulation Invariance
  • corollary thmcountercorollary: Bisimulation implies Theory Equivalence
  • lemma thmcounterlemma
  • theorem thmcountertheorem: Hennessy--Milner