Editorial Notes
A corrigendum was issued for this paper on April 3, 2023. You can download the corrigendum from the supplemental material section of this citation page.
Abstract
This paper provides a new mathematical foundation for the locally nameless representation of syntax with binders, one informed by nominal techniques. It gives an equational axiomatization of two key locally nameless operations, "variable opening" and "variable closing" and shows that a lot of the locally nameless infrastructure can be defined from that in a syntax-independent way, including crucially a "shift" functor for name binding. That functor operates on a category whose objects we call locally nameless sets. Functors combining shift with sums and products have initial algebras that recover the usual locally nameless representation of syntax with binders in the finitary case. We demonstrate this by uniformly constructing such an initial locally nameless set for each instance of Plotkin's notion of binding signature. We also show by example that the shift functor is useful for locally nameless sets of a semantic rather than a syntactic character. The category of locally nameless sets is proved to be isomorphic to a known topos of finitely supported M-sets, where M is the full transformation monoid on a countably infinite set. A corollary of the proof is that several categories that have been used in the literature to model variable renaming operations on syntax with binders are all equivalent to each other and to the category of locally nameless sets.
Supplemental Material
Available for Download
Corrigendum to "Locally Nameless Sets" by Pitt, Proceedings of the ACM on Programming Languages, Volume 7, Article 17.
- Jiří Adámek. 1974. Free Algebras and Automata Realizations in the Language of Categories. Commentationes Mathematicae Universitatis Carolinae, 15, 4 (1974), 589–602. http://eudml.org/doc/16649
Google Scholar
- 2023. The Agda Wiki. https://wiki.portal.chalmers.se/agda/Main/HomePage
Google Scholar
- Brian Aydemir, Arthur Charguéraud, Benjamin C. Pierce, Randy Pollack, and Stephanie Weirich. 2008. Engineering Formal Metatheory. In Proceedings of the 35th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL ’08). Association for Computing Machinery, New York, NY, USA. 3–15. https://doi.org/10.1145/1328438.1328443
Google Scholar
Digital Library
- Henk P. Barendregt. 1984. The Lambda Calculus: Its Syntax and Semantics (revised ed.). North-Holland.
Google Scholar
- Ulrich Berger and Helmut Schwichtenberg. 1991. An Inverse of the Evaluation Functional for Typed λ -Calculus. In 6th Annual Symposium on Logic in Computer Science. IEEE Computer Society Press, 203–211. https://doi.org/10.1109/LICS.1991.151645
Google Scholar
Cross Ref
- Arthur Charguéraud. 2012. The Locally Nameless Representation. Journal of Automated Reasoning, 49, 3 (2012), 363–408. https://doi.org/10.1007/s10817-011-9225-2
Google Scholar
Cross Ref
- Jesper Cockx. 2021. 1001 Representations of Syntax with Binding. Nov., Blog post https://jesper.sikanda.be/posts/1001-syntax-representations.html
Google Scholar
- Thierry Coquand. 1992. Pattern Matching with Dependent Types. In Proceedings of the 1992 Workshop on Types for Proofs and Programs, Båstad, Sweden, Bengt Nordström, Kent Petersson, and Gordon D. Plotkin (Eds.). 66–79.
Google Scholar
- Nicolaas G. de Bruijn. 1972. Lambda Calculus Notation with Nameless Dummies, a Tool for Automatic Formula Manipulation, with Application to the Church-Rosser Theorem. Indagationes Mathematicae, 34 (1972), 381–392. https://doi.org/10.1016/1385-7258(72)90034-0
Google Scholar
Cross Ref
- Lucas Escot and Jesper Cockx. 2022. Practical Generic Programming over a Universe of Native Datatypes. Proc. ACM Program. Lang., 6, ICFP (2022), Article 113, aug, 25 pages. https://doi.org/10.1145/3547644
Google Scholar
Digital Library
- Marcelo P. Fiore, Gordon P. Plotkin, and Daniele Turi. 1999. Abstract Syntax and Variable Binding. In 14th Annual Symposium on Logic in Computer Science. IEEE Computer Society Press, 193–202. https://doi.org/10.1109/LICS.1999.782615
Google Scholar
Cross Ref
- Murdoch J. Gabbay and Martin Hofmann. 2008. Nominal Renaming Sets. In Logic for Programming, Artificial Intelligence, and Reasoning, 15th International Conference, LPAR 2008, Doha, Qatar, November 22–27, 2008. Proceedings (Lecture Notes in Artificial Intelligence, Vol. 5330). Springer, 158–173. https://doi.org/10.1007/978-3-540-89439-1_11
Google Scholar
Digital Library
- Murdoch J. Gabbay and Andrew M. Pitts. 1999. A New Approach to Abstract Syntax Involving Binders. In 14th Annual Symposium on Logic in Computer Science. IEEE Computer Society Press, 214–224. https://doi.org/10.1109/LICS.1999.782617
Google Scholar
Cross Ref
- Murdoch J. Gabbay and Andrew M. Pitts. 2002. A New Approach to Abstract Syntax with Variable Binding. Formal Aspects of Computing, 13 (2002), 341–363. https://doi.org/10.1007/s001650200016
Google Scholar
Digital Library
- Olexandr Ganyushkin and Volodymyr Mazorchuk. 2009. Classical Finite Transformation Semigroups, An Introduction (Algebra and Applications, Vol. 9). Springer, London.
Google Scholar
Cross Ref
- Martin Hofmann. 1999. Semantical Analysis of Higher-Order Abstract Syntax. In 14th Annual Symposium on Logic in Computer Science. IEEE Computer Society Press, 204–213. https://doi.org/10.1109/LICS.1999.782616
Google Scholar
Cross Ref
- Nagayoshi Iwahori and Nabuko Iwahori. 1974. On a Set of Generating Relations of the Full Transformation Semigroups. Journal of Combinatorial Theory (A), 16 (1974), 147–158. https://doi.org/10.1016/0097-3165(74)90040-5
Google Scholar
Cross Ref
- Peter T. Johnstone. 1977. Topos Theory (LMS Mathematical Monographs). Academic Press.
Google Scholar
- Peter T. Johnstone. 2002. Sketches of an Elephant, A Topos Theory Compendium, Volumes 1 and 2 (Oxford Logic Guides). Oxford University Press.
Google Scholar
- James McKinna and Randy Pollack. 1999. Some Type Theory and Lambda Calculus Formalised. Journal of Automated Reasoning, 23 (1999), 373–409. https://doi.org/10.1023/A:1006294005493
Google Scholar
Digital Library
- Bengt Nordström, Kent Petersson, and Jan M. Smith. 1990. Programming in Martin-Löf’s Type Theory. Oxford University Press.
Google Scholar
Digital Library
- Frank Pfenning and Conal Elliott. 1988. Higher-Order Abstract Syntax. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, 199–208. https://doi.org/10.1145/960116.54010
Google Scholar
Digital Library
- A. M. Pitts. 2003. Nominal Logic, A First Order Theory of Names and Binding. Information and Computation, 186 (2003), 165–193. https://doi.org/10.1016/S0890-5401(03)00138-X
Google Scholar
Digital Library
- Andrew M. Pitts. 2006. Alpha-Structural Recursion and Induction. Journal of the ACM, 53 (2006), 459–506. https://doi.org/10.1145/1147954.1147961
Google Scholar
Digital Library
- Andrew M. Pitts. 2013. Nominal Sets: Names and Symmetry in Computer Science (Cambridge Tracts in Theoretical Computer Science, Vol. 57). Cambridge University Press.
Google Scholar
Digital Library
- Andrew M. Pitts. 2015. Nominal Presentation of Cubical Sets Models of Type Theory. In 20th International Conference on Types for Proofs and Programs (TYPES 2014) (Leibniz International Proceedings in Informatics (LIPIcs), Vol. 39). Schloss Dagstuhl–Leibniz-Zentrum für Informatik, Dagstuhl, Germany. 202–220. https://doi.org/10.4230/LIPIcs.TYPES.2014.202
Google Scholar
Cross Ref
- Andrew M. Pitts. 2023. Agda code accompanying “Locally Nameless Sets”. https://doi.org/10.5281/zenodo.7310633 Browsable code: https://amp12.github.io/LocallyNamelessSets/
Google Scholar
Digital Library
- Gordon D. Plotkin. 1990. An Illative Theory of Relations. In Situation Theory and its Applications, Volume 1, R. Cooper, Mukai, and J. Perry (Eds.) (CSLI Lecture Notes, Vol. 22). Stanford University, 133–146.
Google Scholar
- Andrei Popescu. 2022. Rensets and Renaming-Based Recursion for Syntax with Bindings. In Automated Reasoning : 11th International Joint Conference, IJCAR 2022, Haifa, Israel, August 8-10, 2022, Proceedings (Lecture Notes in Computer Science, Vol. 13385). Springer International Publishing AG, 618–639. https://doi.org/10.1007/978-3-031-10769-6_36
Google Scholar
Digital Library
- Dana S. Scott. 1982. Domains for Denotational Semantics. In Automata, Languages and Programming, Proceedings 1982, Mogens Nielson and Erik M. Schmidt (Eds.) (Lecture Notes in Computer Science, Vol. 140). Springer Berlin Heidelberg, 577–610. https://doi.org/10.1007/BFb0012801
Google Scholar
Cross Ref
- Sam Staton. 2007. Name-Passing Process Calculi: Operational Models and Structural Operational Semantics. Ph. D. Dissertation. University of Cambridge. Available as University of Cambridge Computer Laboratory Technical Report Number UCAM-CL-TR-688
Google Scholar
- Jonathan Sterling. 2021. First Steps in Synthetic Tait Computability, The Objective Metatheory of Cubical Type Theory. Ph. D. Dissertation. Carnegie Mellon University. School of Computer Science. CMU-CS-21-142
Google Scholar
- Andrew Swan. 2017. Some Brouwerian Counterexamples Regarding Nominal Sets in Constructive Set Theory. ArXiv e-prints, arXiv:1702.01556 [math.LO] (2017), Feb., 9pp. https://doi.org/10.48550/arXiv.1702.01556
Google Scholar
- The Univalent Foundations Program. 2013. Homotopy Type Theory: Univalent Foundations for Mathematics. http://homotopytypetheory.org/book Institute for Advanced Study.
Google Scholar
- Christian Urban, Andrew M. Pitts, and Murdoch J. Gabbay. 2004. Nominal Unification. Theoretical Computer Science, 323 (2004), 473–497. https://doi.org/10.1016/j.tcs.2004.06.016
Google Scholar
Digital Library
- Christian Urban and Christine Tasson. 2005. Nominal Techniques in Isabelle/HOL. In 20th International Conference on Automated Deduction, CADE-20, Tallinn, Estonia, July 2005 (Lecture Notes in Computer Science, Vol. 3632). Springer-Verlag, 38–53. https://doi.org/10.1007/11532231_4
Google Scholar
Digital Library
- Andrea Vezzosi, Anders Mörtberg, and Andreas Abel. 2019. Cubical Agda: A Dependently Typed Programming Language with Univalence and Higher Inductive Types. Proc. ACM Program. Lang., 3, ICFP (2019), Article 87, July, 29 pages. issn:2475-1421 https://doi.org/10.1145/3341691
Google Scholar
Digital Library
Index Terms
Locally Nameless Sets
Recommendations
Complete iterativity for algebras with effects
CALCO'09: Proceedings of the 3rd international conference on Algebra and coalgebra in computer scienceCompletely iterative algebras (cias) are those algebras in which recursive equations have unique solutions. In this paper we study complete iterativity for algebras with computational effects (described by a monad). First, we prove that for every ...
The category of pointwise S-proximity spaces
First it is proved that the category of pointwise quasi-uniform spaces and pointwise quasi-uniformly continuous morphisms is topological. Then the concept of pointwise S-quasi-proximity on lattice-valued fuzzy set theory is introduced in such a way as ...
Revising the link between L-Chu correspondences and completely lattice L-ordered sets
Continuing our categorical study of L-fuzzy extensions of formal concept analysis, we provide a representation theorem for the category of L-Chu correspondences between L-formal contexts and prove that it is equivalent to the category of completely ...






Comments