Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article
Open access

An Order-Theoretic Analysis of Universe Polymorphism

Published: 11 January 2023 Publication History

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.
[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.
[3]
Steve Awodey. 2018. Natural models of homotopy type theory. Mathematical Structures in Computer Science 28, 2 (2018), 241–286.
[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
[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
[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
[7]
Edwin C. Brady. 2013. Idris, a general-purpose dependently typed programming language: Design and implementation. Journal of Functional Programming 23 (2013), 552 – 593.
[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.
[9]
Thierry Coquand. 2013. Presheaf model of type theory. (2013). http://www.cse.chalmers.se/~coquand/presheaf.pdf Unpublished note.
[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.
[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
[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
[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
[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.
[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
[16]
Trang Ha and Valentina Harizanov. 2018. Orders on magmas and computability theory. Journal of Knot Theory and Its Ramifications 27, 07 (2018), 1841001.
[17]
Robert Harper and Robert Pollack. 1991. Type checking with universes. Theoretical Computer Science 89, 1 (1991), 107–136. issn:0304-3975
[18]
Gérard Huet. 1987. Extending the calculus of constructions with Type:Type. (1987). http://pauillac.inria.fr/~huet/PUBLIC/typtyp.pdf Unpublished note.
[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
[20]
Per Martin-Löf. 1971. An intuitionistic theory of types. (1971). Unpublished preprint.
[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
[22]
Conor McBride. 2002. Crude but Effective Stratification. https://personal.cis.strath.ac.uk/conor.mcbride/Crude.pdf Slides.
[23]
Conor McBride. 2011. Crude but Effective Stratification. https://mazzo.li/epilogue/index.html
[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
[25]
Erik Palmgren. 1998. On universes in type theory. Twenty five years of constructive type theory (1998), 191–204. isbn:9780198501275
[26]
RedPRL Development Team. 2022. mugen. https://github.com/RedPRL/mugen
[27]
RedPRL Development Team. 2022. 133, 177, 96algaett. https://github.com/RedPRL/algaett
[28]
Anton Setzer. 2000. Extending Martin-Löf type theory by one Mahlo-universe. Archive for Mathematical Logic 39, 3 (2000), 155–181.
[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
[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
[31]
The 1Lab Development Team. 2022. The 1Lab. https://1lab.dev
[32]
The Agda Development Team. 2022. The Agda Programming Language. https://wiki.portal.chalmers.se/agda/pmwiki.php
[33]
The Coq Development Team. 2022. The Coq Proof Assistant. https://www.coq.inria.fr
[34]
The HELM Team. 2016. Matita. http://matita.cs.unibo.it/index.shtml
[35]
The LEGO Team. 1999. The LEGO Proof Assistant. https://www.dcs.ed.ac.uk/home/lego/

Index Terms

  1. An Order-Theoretic Analysis of Universe Polymorphism

        Recommendations

        Comments

        Information & Contributors

        Information

        Published In

        cover image Proceedings of the ACM on Programming Languages
        Proceedings of the ACM on Programming Languages  Volume 7, Issue POPL
        January 2023
        2196 pages
        EISSN:2475-1421
        DOI:10.1145/3554308
        • Editor:
        Issue’s Table of Contents
        This work is licensed under a Creative Commons Attribution 4.0 International License.

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        Published: 11 January 2023
        Published in PACMPL Volume 7, Issue POPL

        Permissions

        Request permissions for this article.

        Check for updates

        Badges

        Author Tags

        1. type theory
        2. universe polymorphism
        3. universes

        Qualifiers

        • Research-article

        Funding Sources

        Contributors

        Other Metrics

        Bibliometrics & Citations

        Bibliometrics

        Article Metrics

        • 0
          Total Citations
        • 879
          Total Downloads
        • Downloads (Last 12 months)590
        • Downloads (Last 6 weeks)78
        Reflects downloads up to 16 Oct 2024

        Other Metrics

        Citations

        View Options

        View options

        PDF

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader

        Get Access

        Login options

        Full Access

        Media

        Figures

        Other

        Tables

        Share

        Share

        Share this Publication link

        Share on social media