skip to main content

An Order-Theoretic Analysis of Universe Polymorphism

Published:11 January 2023Publication History
Skip Abstract Section

Abstract

We present a novel formulation of universe polymorphism in dependent type theory in terms of monads on the category of strict partial orders, and a novel algebraic structure, displacement algebras, on top of which one can implement a generalized form of McBride’s “crude but effective stratification” scheme for lightweight universe polymorphism. We give some examples of exotic but consistent universe hierarchies, and prove that every universe hierarchy in our sense can be embedded in a displacement algebra and hence implemented via our generalization of McBride’s scheme. Many of our technical results are mechanized in Agda, and we have an OCaml library for universe levels based on displacement algebras, for use in proof assistant implementations.

References

  1. Carlo Angiuli, Evan Cavallo, Kuen-Bang Hou (Favonia), Robert Harper, and Jonathan Sterling. 2018. The RedPRL Proof Assistant (Invited Paper). In Proceedings of the 13th International Workshop on Logical Frameworks and Meta-Languages: Theory and Practice, Oxford, UK, 7th July 2018 (Electronic Proceedings in Theoretical Computer Science), Frédéric Blanqui and Giselle Reis (Eds.), Vol. 274. Open Publishing Association, 1–10. Google ScholarGoogle ScholarCross RefCross Ref
  2. Danil Annenkov, Paolo Capriotti, and Nicolai Kraus. 2017. Two-Level Type Theory and Applications. arxiv:cs.LO/1705.03307 http://arxiv.org/abs/1705.03307 Preprint. Google ScholarGoogle Scholar
  3. Steve Awodey. 2018. Natural models of homotopy type theory. Mathematical Structures in Computer Science 28, 2 (2018), 241–286. Google ScholarGoogle ScholarCross RefCross Ref
  4. Marc Bezem and Thierry Coquand. 2022. Loop-checking and the uniform word problem for join-semilattices with an inflationary endomorphism. Theoretical Computer Science 913 (2022), 1–7. issn:0304-3975 Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Marc Bezem, Thierry Coquand, Peter Dybjer, and Martín Escardó. 2022. Type Theories with Universe Level Judgments. https://types22.inria.fr/files/2022/06/TYPES_2022_paper_56.pdf Google ScholarGoogle Scholar
  6. Marc Bezem, Robert Nieuwenhuis, and Enric Rodríguez-Carbonell. 2008. The Max-Atom Problem and Its Relevance. In Logic for Programming, Artificial Intelligence, and Reasoning, Iliano Cervesato, Helmut Veith, and Andrei Voronkov (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 47–61. isbn:978-3-540-89439-1 Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Edwin C. Brady. 2013. Idris, a general-purpose dependently typed programming language: Design and implementation. Journal of Functional Programming 23 (2013), 552 – 593. Google ScholarGoogle ScholarCross RefCross Ref
  8. Thierry Coquand. 1986. An Analysis of Girard’s Paradox. In Proceedings of the First Annual IEEE Symposium on Logic in Computer Science (LICS 1986). IEEE Computer Society Press, 227–236. Google ScholarGoogle Scholar
  9. Thierry Coquand. 2013. Presheaf model of type theory. (2013). http://www.cse.chalmers.se/~coquand/presheaf.pdf Unpublished note. Google ScholarGoogle Scholar
  10. Thierry Coquand. 2019. Canonicity and normalization for dependent type theory. Theoretical Computer Science 777 (2019), 184–191. issn:0304-3975 In memory of Maurice Nivat, a founding father of Theoretical Computer Science - Part I. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Judicaël Courant. 2002. Explicit Universes for the Calculus of Constructions. In Theorem Proving in Higher Order Logics, Victor A. Carre no, César A. Mu noz, and Sofiène Tahar (Eds.). Springer Berlin Heidelberg, Berlin, Heidelberg, 115–130. isbn:978-3-540-45685-8 Google ScholarGoogle ScholarCross RefCross Ref
  12. Leonardo de Moura, Soonho Kong, Jeremy Avigad, Floris van Doorn, and Jakob von Raumer. 2015. The Lean Theorem Prover (System Description). In Automated Deduction – CADE-25, Amy P. Felty and Aart Middeldorp (Eds.). Springer International Publishing, Cham, 378–388. isbn:978-3-319-21401-6 Google ScholarGoogle Scholar
  13. Peter Dybjer. 1996. Internal type theory. In Types for Proofs and Programs (TYPES 1995) (Lecture Notes in Computer Science), Stefano Berardi and Mario Coppo (Eds.), Vol. 1158. Springer Berlin Heidelberg, Berlin, Heidelberg, 120–134. isbn:978-3-540-70722-6 Google ScholarGoogle ScholarCross RefCross Ref
  14. Gaëtan Gilbert, Jesper Cockx, Matthieu Sozeau, and Nicolas Tabareau. 2019. Definitional Proof-Irrelevance without K. Proc. ACM Program. Lang. 3, POPL, Article 3 (jan 2019), 28 pages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Daniel Gratzer, G. A. Kavvos, Andreas Nuyts, and Lars Birkedal. 2020. Multimodal Dependent Type Theory. In Proceedings of the 35th Annual ACM/IEEE Symposium on Logic in Computer Science (LICS ’20). Association for Computing Machinery, New York, NY, USA, 492–506. isbn:9781450371049 Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Trang Ha and Valentina Harizanov. 2018. Orders on magmas and computability theory. Journal of Knot Theory and Its Ramifications 27, 07 (2018), 1841001. Google ScholarGoogle ScholarCross RefCross Ref
  17. Robert Harper and Robert Pollack. 1991. Type checking with universes. Theoretical Computer Science 89, 1 (1991), 107–136. issn:0304-3975 Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Gérard Huet. 1987. Extending the calculus of constructions with Type:Type. (1987). http://pauillac.inria.fr/~huet/PUBLIC/typtyp.pdf Unpublished note. Google ScholarGoogle Scholar
  19. András Kovács. 2022. Generalized Universe Hierarchies and First-Class Universe Levels. In 30th EACSL Annual Conference on Computer Science Logic (CSL 2022) (Leibniz International Proceedings in Informatics (LIPIcs)), Florin Manea and Alex Simpson (Eds.), Vol. 216. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl, Germany, 28:1–28:17. isbn:978-3-95977-218-1 issn:1868-8969 Google ScholarGoogle ScholarCross RefCross Ref
  20. Per Martin-Löf. 1971. An intuitionistic theory of types. (1971). Unpublished preprint. Google ScholarGoogle Scholar
  21. Per Martin-Löf. 1975. An Intuitionistic Theory of Types: Predicative Part. In Logic Colloquium ’73, H.E. Rose and J.C. Shepherdson (Eds.). Studies in Logic and the Foundations of Mathematics, Vol. 80. Elsevier, 73–118. issn:0049-237X Google ScholarGoogle ScholarCross RefCross Ref
  22. Conor McBride. 2002. Crude but Effective Stratification. https://personal.cis.strath.ac.uk/conor.mcbride/Crude.pdf Slides. Google ScholarGoogle Scholar
  23. Conor McBride. 2011. Crude but Effective Stratification. https://mazzo.li/epilogue/index.html Google ScholarGoogle Scholar
  24. Clive Newstead. 2018. Algebraic models of dependent type theory. Ph.D. Dissertation. Carnegie Mellon University. https://www.math.cmu.edu/~cnewstea/thesis-clive-newstead.pdf Google ScholarGoogle Scholar
  25. Erik Palmgren. 1998. On universes in type theory. Twenty five years of constructive type theory (1998), 191–204. isbn:9780198501275 Google ScholarGoogle ScholarCross RefCross Ref
  26. RedPRL Development Team. 2022. mugen. https://github.com/RedPRL/mugen Google ScholarGoogle Scholar
  27. RedPRL Development Team. 2022. 133, 177, 96algaett. https://github.com/RedPRL/algaett Google ScholarGoogle Scholar
  28. Anton Setzer. 2000. Extending Martin-Löf type theory by one Mahlo-universe. Archive for Mathematical Logic 39, 3 (2000), 155–181. Google ScholarGoogle ScholarCross RefCross Ref
  29. Matthieu Sozeau and Nicolas Tabareau. 2014. Universe Polymorphism in Coq. In Interactive Theorem Proving, Gerwin Klein and Ruben Gamboa (Eds.). Springer International Publishing, Cham, 499–514. isbn:978-3-319-08970-6 Google ScholarGoogle ScholarCross RefCross Ref
  30. Yuta Takahashi. 2022. Higher-Order Universe Operators in Martin-Löf Type Theory with one Mahlo Universe. https://types22.inria.fr/files/2022/06/TYPES_2022_paper_63.pdf Google ScholarGoogle Scholar
  31. The 1Lab Development Team. 2022. The 1Lab. https://1lab.dev Google ScholarGoogle Scholar
  32. The Agda Development Team. 2022. The Agda Programming Language. https://wiki.portal.chalmers.se/agda/pmwiki.php Google ScholarGoogle Scholar
  33. The Coq Development Team. 2022. The Coq Proof Assistant. https://www.coq.inria.fr Google ScholarGoogle Scholar
  34. The HELM Team. 2016. Matita. http://matita.cs.unibo.it/index.shtml Google ScholarGoogle Scholar
  35. The LEGO Team. 1999. The LEGO Proof Assistant. https://www.dcs.ed.ac.uk/home/lego/ Google ScholarGoogle Scholar

Index Terms

  1. An Order-Theoretic Analysis of Universe Polymorphism

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Article Metrics

          • Downloads (Last 12 months)242
          • Downloads (Last 6 weeks)42

          Other Metrics

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader
        About Cookies On This Site

        We use cookies to ensure that we give you the best experience on our website.

        Learn more

        Got it!