Formalizing a Many-Sorted Hybrid Polyadic Modal Logic in Lean

πŸ“… 2026-06-25
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
This work addresses the lack of a unified axiomatic framework for formalizing programming languages and security protocols. We propose in Lean an intrinsically typed, many-sorted, hybrid multimodal logic that integrates ideas from algebraic specification and dynamic logic. By leveraging an intrinsic sorting mechanism, well-sorted formulas directly correspond to well-typed terms in Lean, thereby avoiding extraneous syntactic overhead. The framework supports domain-specific languages for defining signatures, axioms, and reasoning about system behavior. We formally verify the meta-theoretic correctness of the logical system and demonstrate its expressiveness and practicality through successful applications to imperative program verification, the BAN logic for security protocols, and the S5 modal system.
πŸ“ Abstract
We present a Lean formalization of a general hybrid modal logic with many-sorted signatures and polyadic modal operators. The system borrows ideas from both algebraic specification and dynamic logics, and is designed to serve as a uniform axiomatic foundation for specifying and verifying programming languages and security protocols. We expose a DSL for users to define languages and protocols as many-sorted signatures, specify the relevant domain-specific axioms, and reason about program executions or protocol runs. We provide a machine-checked proof of its soundness theorem and showcase the framework's versatility through several applications: an imperative programming language for code verification, the BAN logic for security protocols, and the modal system S5. We have designed our formalization to be intrinsically sorted, that is, well-sorted formulas in the base language are well-typed terms in Lean. Thanks to intrinsic sorting, all domain specific applications can be easily embedded in our framework via the DSL, at no additional syntactic overhead required for the user to prove. All code presented in this paper is openly accessible in the following repository: https://github.com/alexoltean61/msphml-lean
Problem

Research questions and friction points this paper is trying to address.

hybrid modal logic
many-sorted
polyadic modal operators
formal verification
axiomatic foundation
Innovation

Methods, ideas, or system contributions that make the work stand out.

many-sorted logic
hybrid modal logic
polyadic modal operators
intrinsic typing
formal verification in Lean
πŸ”Ž Similar Papers
No similar papers found.
A
Andrei-Alexandru Oltean
Faculty of Mathematics and Computer Science, University of Bucharest, Academiei nr.14, sector 1, C.P. 010014, Bucharest, Romania
B
Bogdan Macovei
Faculty of Mathematics and Computer Science, University of Bucharest, Academiei nr.14, sector 1, C.P. 010014, Bucharest, Romania
I
Ioana Leuştean
Faculty of Mathematics and Computer Science, University of Bucharest, Academiei nr.14, sector 1, C.P. 010014, Bucharest, Romania