skip to main content
10.1145/3561320.3561329acmotherconferencesArticle/Chapter ViewAbstractPublication PagessblpConference Proceedingsconference-collections
research-article

A Sound Deep Embedding of Arbitrary Normal Modal Logics in Coq

Published: 06 October 2022 Publication History

Abstract

This work describes an encoding of modal logics using the Coq proof assistant. Our formalization differs from previous attempts by providing a uniform representation of several systems for modal logic using Coq’s rich type structure. We illustrate the usefulness of our library in a formalization of Löb’s theorem which closely follows a classical proof of this result.

References

[1]
Andrew W. Appel, Paul-André Melliès, Christopher D. Richards, and Jérôme Vouillon. 2007. A Very Modal Model of a Modern, Major, General Type System. In Proceedings of the 34th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (Nice, France) (POPL ’07). Association for Computing Machinery, New York, NY, USA, 109–122. https://doi.org/10.1145/1190216.1190235
[2]
Bruno Bentzen. 2021. A Henkin-Style Completeness Proof for the Modal Logic S5. In Logic and Argumentation: Fourth International Conference, CLAR 2021, Hangzhou, China, October 20?22, Pietro Baroni, Christoph Benzmüller, and Yì N. Wáng (Eds.). Springer, 459–467.
[3]
Christoph Benzmüller and Bruno Woltzenlogel Paleo. 2015. Interacting with Modal Logics in the Coq Proof Assistant. In Computer Science – Theory and Applications, Lev D. Beklemishev and Daniil V. Musatov (Eds.). Springer International Publishing, Cham, 398–411.
[4]
Yves Bertot and Pierre Castran. 2010. Interactive Theorem Proving and Program Development: Coq’Art The Calculus of Inductive Constructions(1st ed.). Springer Publishing Company, Incorporated.
[5]
P. Blackburn, M. de Rijke, and Y. Venema. 2001. Modal Logic. Cambridge University Press, New York, NY, USA.
[6]
Patrick Blackburn, Maarten de Rijke, and Yde Venema. 2001. Modal Logic. Cambridge University Press, Cambridge, Inglaterra. https://doi.org/10.1017/CBO9781107050884
[7]
George S. Boolos. 1994. The Logic of Provability. Cambridge University Press. https://doi.org/10.1017/CBO9780511625183
[8]
Brian F Chellas. 1980. Modal logic: an introduction. Cambridge University Press.
[9]
Adam Chlipala. 2013. Certified Programming with Dependent Types: A Pragmatic Introduction to the Coq Proof Assistant. The MIT Press.
[10]
Paulien de Wind. 2001. Modal logic in coq. Master’s thesis. Vrije Universiteit.
[11]
The Coq development team. 2019. The Coq proof assistant reference manual. LogiCal Project. http://coq.inria.frVersion 8.9.0.
[12]
Robert Dockins, Andrew W. Appel, and Aquinas Hobor. 2008. Multimodal Separation Logic for Reasoning About Operational Semantics. Electron. Notes Theor. Comput. Sci. 218 (oct 2008), 5–20. https://doi.org/10.1016/j.entcs.2008.10.002
[13]
Christian Doczkal and Gert Smolka. 2011. Constructive Formalization of Classical Modal Logic. Technical Report. Universidade de Saarland, Alemanha.
[14]
Tobias Gleißner, Alexander Steen, and Christoph Benzmüller. 2017. Theorem provers for every normal modal logic. In LPAR-21. 21st International Conference on Logic for Programming, Artificial Intelligence and Reasoning. EasyChair, 14–30.
[15]
K. Gödel. 1933. Eine Interpretation des intuitionistischen Aussagenkalkuls. Ergebnisse eines Mathematischen Kolloquiums 4 (1933), 34–40.
[16]
R. Goldblatt. 1993. Mathematics of Modality. CSLI Publications, Stanford, California.
[17]
Georges Gonthier. 2008. The Four Colour Theorem: Engineering of a Formal Proof. Springer-Verlag, Berlin, Heidelberg, 333. https://doi.org/10.1007/978-3-540-87827-8_28
[18]
Georges Gonthier, Andrea Asperti, Jeremy Avigad, Yves Bertot, Cyril Cohen, François Garillot, Stéphane Le Roux, Assia Mahboubi, Russell O’Connor, Sidi Ould Biha, Ioana Pasca, Laurence Rideau, Alexey Solovyev, Enrico Tassi, and Laurent Théry. 2013. A Machine-Checked Proof of the Odd Order Theorem. In Proceedings of the 4th International Conference on Interactive Theorem Proving (Rennes, France) (ITP’13). Springer-Verlag, Berlin, Heidelberg, 163–179. https://doi.org/10.1007/978-3-642-39634-2_14
[19]
G. A. Kavvos. 2016. The Many Worlds of Modal λ-calculi: I. Curry-Howard for Necessity, Possibility and Time. CoRR abs/1605.08106(2016). arXiv:1605.08106http://arxiv.org/abs/1605.08106
[20]
Gerwin Klein, June Andronick, Kevin Elphinstone, Gernot Heiser, David Cock, Philip Derrin, Dhammika Elkaduwe, Kai Engelhardt, Rafal Kolanski, Michael Norrish, Thomas Sewell, Harvey Tuch, and Simon Winwood. 2010. SeL4: Formal Verification of an Operating-System Kernel. Commun. ACM 53, 6 (jun 2010), 107–115. https://doi.org/10.1145/1743546.1743574
[21]
Xavier Leroy. 2009. Formal verification of a realistic compiler. Commun. ACM 52, 7 (2009), 107–115. http://xavierleroy.org/publi/compcert-CACM.pdf
[22]
C. I. Lewis. 1918. A Survey of Symbolic Logic. University of California Press, Berkeley and Los Angeles.
[23]
C. I. Lewis and C. H. Langford. 1932. Symbolic Logic. The Century Company. 2nd ed. 1959, Dover Publications, Inc.
[24]
Marco Maggesi and Cosimo Perini Brogi. 2021. A formal proof of modal completeness for provability logic. CoRR abs/2102.05945(2021). arXiv:2102.05945https://arxiv.org/abs/2102.05945
[25]
The mathlib Community. 2020. The Lean Mathematical Library. In Proceedings of the 9th ACM SIGPLAN International Conference on Certified Programs and Proofs (New Orleans, LA, USA) (CPP 2020). Association for Computing Machinery, New York, NY, USA, 367–381. https://doi.org/10.1145/3372885.3373824
[26]
R. Montague. 1970. Universal grammar. Theoria 36(1970), 373–398. Issue 3.
[27]
Angel Mora, Emilio Muñoz-Velasco, and Joanna Golińska-Pilarek. 2011. Implementing a relational theorem prover for modal logic. International Journal of Computer Mathematics 88, 9(2011), 1869–1884.
[28]
T. Murphy, K. Crary, R. Harper, and F. Pfenning. 2004. A symmetric modal lambda calculus for distributed computing. In Proceedings of the 19th Annual IEEE Symposium on Logic in Computer Science, 2004.286–295. https://doi.org/10.1109/LICS.2004.1319623
[29]
Tobias Nipkow and Gerwin Klein. 2014. Concrete Semantics: With Isabelle/HOL. Springer Publishing Company, Incorporated.
[30]
Tobias Nipkow, Lawrence C. Paulson, and Markus Wenzel. 2019. A Proof Assistant for Higher-Order Logic. Springer-Verlag. https://isabelle.in.tum.de/documentation.htmlIsabelle2019.
[31]
Christine Paulin-Mohring. 2015. Introduction to the Calculus of Inductive Constructions. In All about Proofs, Proofs for All, Bruno Woltzenlogel Paleo and David Delahaye (Eds.). Studies in Logic (Mathematical logic and foundations), Vol. 55. College Publications. https://hal.inria.fr/hal-01094195
[32]
Vaughan R. Pratt. 1976. SEMANTICAL CONSIDERATIONS ON FLOYD-HOARE LOGIC. In 17th Annual Symposium on Foundations of Computer Science (sfcs 1976). 109–121. https://doi.org/10.1109/SFCS.1976.27
[33]
Vaughan R. Pratt. 1980. Application of Modal Logic to Programming. Studia Logica 39, 2-3 (1980), 257–274. https://doi.org/10.1007/BF00370324
[34]
D. Scott. 1970. Advice on modal logic. In Philosophical Problems in Logic, K. Lambert (Ed.). Reidel, Dordrecht, 143–173.

Cited By

View all

Index Terms

  1. A Sound Deep Embedding of Arbitrary Normal Modal Logics in Coq

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Other conferences
      SBLP '22: Proceedings of the XXVI Brazilian Symposium on Programming Languages
      October 2022
      75 pages
      ISBN:9781450397445
      DOI:10.1145/3561320
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 06 October 2022

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. Coq proof assistant
      2. Modal logic
      3. soundness

      Qualifiers

      • Research-article
      • Research
      • Refereed limited

      Funding Sources

      • FAPEMIG - Fundação de Amparo a Pesquisa de Minas Gerais
      • FAPESC - Fundação de Amparo a Pesquisa de Santa Catarina

      Conference

      SBLP 2022
      SBLP 2022: XXVI Brazilian Symposium on Programming Languages
      October 6 - 7, 2022
      Virtual Event, Brazil

      Acceptance Rates

      Overall Acceptance Rate 22 of 50 submissions, 44%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)4
      • Downloads (Last 6 weeks)1
      Reflects downloads up to 13 Feb 2025

      Other Metrics

      Citations

      Cited By

      View all

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      HTML Format

      View this article in HTML Format.

      HTML Format

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media