Skip to main content

The Coq Library as a Theory Graph

  • Conference paper
  • First Online:
Intelligent Computer Mathematics (CICM 2019)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 11617))

Included in the following conference series:

Abstract

Representing proof assistant libraries in a way that allows further processing in other systems is becoming increasingly important. It is a critical missing link for integrating proof assistants both with each other or with peripheral tools such as IDEs or proof checkers. Such representations cannot be generated from library source files because they lack semantic enrichment (inferred types, etc.) and only the original proof assistant is able to process them. But even when using the proof assistant’s internal data structures, the complexities of logic, implementation, and library still make this very difficult.

We describe one such representation, namely for the library of Coq, using OMDoc theory graphs as the target format. Coq is arguably the most formidable of all proof assistant libraries to tackle, and our work makes a significant step forward.

On the theoretical side, our main contribution is a translation of the Coq module system into theory graphs. This greatly reduces the complexity of the library as the more arcane module system features are eliminated while preserving most of the structure. On the practical side, our main contribution is an implementation of this translation. It takes the entire Coq library, which is split over hundreds of decentralized repositories, and produces easily-reusable OMDoc files as output.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Available online at https://kwarc.info/people/dmueller/pubs/CoqImport.pdf.

  2. 2.

    Available online at https://kwarc.info/people/dmueller/pubs/CoqImport.pdf.

  3. 3.

    Available online at https://kwarc.info/people/dmueller/pubs/CoqImport.pdf.

References

  1. Asperti, A., Padovani, L., Sacerdoti Coen, C., Guidi, F., Schena, I.: Mathematical knowledge management in HELM. Ann. Math. Artif. Intell. 38(1–3), 27–46 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  2. Asperti, A., Ricciotti, W., Sacerdoti Coen, C., Tassi, E.: The matita interactive theorem prover. In: Bjørner, N., Sofronie-Stokkermans, V. (eds.) CADE 2011. LNCS (LNAI), vol. 6803, pp. 64–69. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-22438-6_7

    Chapter  Google Scholar 

  3. Assaf, A.: A framework for defining computational higher-order logics. Ph.D. thesis, École Polytechnique (2015)

    Google Scholar 

  4. Boespflug, M., Burel, G.: CoqInE: translating the calculus of inductive constructions into the lambda pi-calculus modulo. In: Pichardie, D., Weber, T. (eds.) Proof Exchange for Theorem Proving (2012)

    Google Scholar 

  5. Boespflug, M., Carbonneaux, Q., Hermant, O.: The \(\lambda \Pi \)-calculus modulo as a universal proof language. In: Pichardie, D., Weber, T. (eds.) Proceedings of PxTP2012: Proof Exchange for Theorem Proving, pp. 28–43 (2012)

    Google Scholar 

  6. Codescu, M., Horozal, F., Kohlhase, M., Mossakowski, T., Rabe, F.: A proof theoretic interpretation of model theoretic hiding. In: Mossakowski, T., Kreowski, H.-J. (eds.) WADT 2010. LNCS, vol. 7137, pp. 118–138. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-28412-0_9

    Chapter  MATH  Google Scholar 

  7. Czajka, L., Kaliszyk, C.: Hammer for Coq: automation for dependent type theory. J. Autom. Reason. 61(1–4), 423–453 (2018)

    Article  MathSciNet  MATH  Google Scholar 

  8. Codescu, M., Mossakowski, T., Rabe, F.: Selecting colimits for parameterisation and networks of specifications. In: Roggenbach, M., James, P. (eds.) Workshop on Algebraic Development Techniques (2016)

    Google Scholar 

  9. Coq Development Team: The Coq proof assistant: reference manual. Technical report, INRIA (2015)

    Google Scholar 

  10. Garillot, F., Gonthier, G., Mahboubi, A., Rideau, L.: Packaging mathematical structures. In: Berghofer, S., Nipkow, T., Urban, C., Wenzel, M. (eds.) TPHOLs 2009. LNCS, vol. 5674, pp. 327–342. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-03359-9_23

    Chapter  Google Scholar 

  11. Harper, R., Honsell, F., Plotkin, G.: A framework for defining logics. J. Assoc. Comput. Mach. 40(1), 143–184 (1993)

    Article  MathSciNet  MATH  Google Scholar 

  12. Iancu, M., Kohlhase, M., Rabe, F., Urban, J.: The Mizar mathematical library in OMDoc: translation and applications. J. Autom. Reason. 50(2), 191–202 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  13. Kohlhase, M., Müller, D., Owre, S., Rabe, F.: Making PVS accessible to generic services by interpretation in a universal format. In: Ayala-Rincón, M., Muñoz, C.A. (eds.) ITP 2017. LNCS, vol. 10499, pp. 319–335. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-66107-0_21

    Chapter  Google Scholar 

  14. Kaliszyk, C., Rabe, F.: Towards knowledge management for HOL light. In: Watt, S.M., Davenport, J.H., Sexton, A.P., Sojka, P., Urban, J. (eds.) CICM 2014. LNCS (LNAI), vol. 8543, pp. 357–372. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-08434-3_26

    Chapter  Google Scholar 

  15. Kohlhase, M., Rabe, F.: QED reloaded: towards a pluralistic formal library of mathematical knowledge. J. Formaliz. Reason. 9(1), 201–234 (2016)

    MathSciNet  Google Scholar 

  16. Keller, C., Werner, B.: Importing HOL light into Coq. In: Kaufmann, M., Paulson, L.C. (eds.) ITP 2010. LNCS, vol. 6172, pp. 307–322. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14052-5_22

    Chapter  Google Scholar 

  17. Mossakowski, T., Autexier, S., Hutter, D.: Development graphs - proof management for structured specifications. J. Log. Algebr. Program. 67(1–2), 114–145 (2006)

    Article  MathSciNet  MATH  Google Scholar 

  18. European Commission Expert Group on FAIR Data: Turning fair into reality (2018). https://doi.org/10.2777/1524

  19. Obua, S., Skalberg, S.: Importing HOL into Isabelle/HOL. In: Furbach, U., Shankar, N. (eds.) IJCAR 2006. LNCS (LNAI), vol. 4130, pp. 298–302. Springer, Heidelberg (2006). https://doi.org/10.1007/11814771_27

    Chapter  Google Scholar 

  20. Rabe, F.: How to identify, translate, and combine logics? J. Logic Comput. 27(6), 1753–1798 (2017)

    Article  MathSciNet  MATH  Google Scholar 

  21. Rabe, F.: A modular type reconstruction algorithm. ACM Trans. Comput. Logic 19(4), 1–43 (2018)

    Article  MathSciNet  MATH  Google Scholar 

  22. Rabe, F., Kohlhase, M.: A scalable module system. Inf. Comput. 230(1), 1–54 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  23. Sacerdoti Coen, S.: A plugin to export Coq libraries to XML. In: 12th International Conference on Intelligent Computer Mathematics, CICM 2019. Lecture Notes in Artificial Intelligence (2019)

    Google Scholar 

Download references

Acknowledgments

The authors were supported by DFG grant RA-18723-1 OAF and EU grant Horizon 2020 ERI 676541 OpenDreamKit. Tom Wiesing helped with scripting for automatically creating the necessary mathhub.info repositories and pushing to them.

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Dennis Müller , Florian Rabe or Claudio Sacerdoti Coen .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Müller, D., Rabe, F., Sacerdoti Coen, C. (2019). The Coq Library as a Theory Graph. In: Kaliszyk, C., Brady, E., Kohlhase, A., Sacerdoti Coen, C. (eds) Intelligent Computer Mathematics. CICM 2019. Lecture Notes in Computer Science(), vol 11617. Springer, Cham. https://doi.org/10.1007/978-3-030-23250-4_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-23250-4_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-23249-8

  • Online ISBN: 978-3-030-23250-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics