Abstract
This paper provides an introduction to the locally nameless approach to the representation of syntax with variable binding, focusing in particular on the use of this technique in formal proofs. First, we explain the benefits of representing bound variables with de Bruijn indices while retaining names for free variables. Then, we explain how to describe and manipulate syntax in that form, and show how to define and reason about judgments on locally nameless terms.
Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.References
Altenkirch, T., McBride, C., McKinna, J.: Why Dependent Types Matter. Available from http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.106.8190 (2005). Accessed Apr 2006
Aydemir, B., Bohannon, A., Fairbairn, M., Foster, J.N., Pierce, B.C., Sewell, P., Vytiniotis, D., GeoffrG.ey Washburn, Weirich, S., Zdancewic, S.: Mechanized metatheory for the masses: the PoplMark challenge. In: TPHOLs, vol. 3603 of LNCS, pp. 50–65. Springer (2005)
Aydemir, B., Weirich, S., Zdancewic, S.: Abstracting Syntax. Technical Reports (CIS) (2009)
Aydemir, B., Charguéraud, A., Pierce, B.C., Pollack, R., Weirich, S.: Engineering formal metatheory. In: ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (2008)
Barras, B., Werner, B.: Coq in coq. Available from http://pauillac.inria.fr/~barras/coq_work-eng.html (1997). Accessed Mar 2006
Benton, N., Koutavas, V.: A Mechanized Bisimulation for the Nu-Calculus (2007)
Charguéraud, A.: Submission to the PoplMark Challenge, Part 1a. Available from http://arthur.chargueraud.org/research/2006/poplmark/ (2006). Accessed Jul 2009
Chlipala, A.: Submission to the PoplMark Challenge, Part 1a. Available from http://www.cs.berkeley.edu/~adamc/poplmark/ (2006). Accessed Jun 2006
The Coq Development Team: The Coq Proof Assistant Reference Manual, Version 8.2. Available at http://coq.inria.fr/ (2009). Accessed Jul 2009
de Bruijn, N.G.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church–Rosser theorem. Indag. Math. 34(5), 381–392 (1972)
de Vries, E., Plasmeijer, R., Abrahamson, D.M.: Uniqueness typing simplified. In: IFL, vol. 5083 of LNCS, pp. 201–218. Springer (2007)
Effinger-Dean, L., Grossman, D.: Modular Metatheory for Memory Consistency Models (2010)
Garrigue, J.: A Certified Interpreter for ML with Structural Polymorphism (2009)
Gordon, A.D.: A mechanisation of name-carrying syntax up to alpha-conversion. In: Proceedings on Higher-order Logic Theorem Proving and its Applications, vol. 780 of LNCS, pp. 414–426. Springer (1993)
Gordon, A.D., Melham, T.: Five axioms of alpha-conversion. In: TPHOLs, vol. 1125 of LNCS, pp. 173–190. Springer (1996)
Henrio, L., Kammüller, F., Lutz, B., Sudhof, H.: Locally Nameless Sigma Calculus (2010)
Huet, G.: The zipper. J. Funct. Program. 7(5), 549–554 (1997) Functional Pearl
Huet, G.: The constructive engine. In: A Perspective in Theoretical Computer Science: Commerative Volume for Gift Siromoney. World Scientific Publishing (1989) Also available as INRIA Technical Report 110
Jia, L., Vaughan, J.A., Mazurak, K., Zhao, J., Zarko, L., Schorr, J., Zdancewic, S.: Aura: a programming language for authorization and audit. In: ACM SIGPLAN International Conference on Functional Programming, pp. 27–38. ACM (2008)
Krebbers, R.: A formalization of Γ∞ in Coq. URL: http://robbertkrebbers.nl/research/gammainf/ (2010). Accessed Dec 2010
Leroy, X.: A Locally Nameless Solution to the Poplmark Challenge. Technical Report 6098, INRIA (2007)
Luo, Z., Pollack, R.: The LEGO proof development system: a user’s manual. Technical Report ECS-LFCS-92-211, University of Edinburgh (1992)
McBride, C., McKinna, J.: Functional pearl: I am not a number—I am a free variable. In: ACM SIGPLAN Workshop on Haskell, pp. 1–9. ACM (2004)
McKinna, J., Pollack, R.: Pure type systems formalized. In: Typed Lambda Calculi and Applications: International Conference on Typed Lambda Calculi and Applications, TLCA ’93, vol. 664 of LNCS, pp. 289–305. Springer (1993)
McKinna, J., Pollack, R.: Some lambda calculus and type theory formalized. J. Autom. Reasoning 23(3–4), 373–409 (1999)
Montagu, B.: Mechanizing Core F-zip using the locally nameless approach. In: 5th ACM SIGPLAN Workshop on Mechanizing Metatheory (2010)
Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL: A Proof Assistant For Higher-Order Logic, vol. 2283 of LNCS. Springer (2002)
Norrish, M., Slind, K.: HOL 4. Available from http://hol.sourceforge.net/ (2007)
Papakyriakou, M.A., Gerakios, P.E., Papaspyrou, N.S.: A Mechanized Proof of Type Safety for the Polymorphic λ-calculus with References. In: 6th Panhellenic Logic Symposium (2007)
Paulson, L.C.: Natural deduction as higher-order resolution. J. Log. Program. 3, 237–258 (1986)
Paulson, L.C.: A Preliminary User’s Manual for Isabelle. Technical Report TR-133, Computer Laboratory, University of Cambridge (1988)
Paulson, L.C.: ML for the Working Programmer. Cambridge University Press (1991)
Plotkin, G.: Call-by-name, call-by-value and the λ-calculus. Theor. Comp. Sci. 1(2), 125–159 (1975)
Pollack, R.: Reasoning About Languages with Binding: Can We Do It Yet? Slides from http://homepages.inf.ed.ac.uk/rpollack/export/bindingChallenge_slides.pdf (2006). Accessed Mar 2006
Pollack, R.: Closure under alpha-conversion. In: TYPES’93: Workshop on Types for Proofs and Programs, Nijmegen, May 1993, Selected Papers, vol. 806 of LNCS, pp. 313–332. Springer (1994)
Pollack, R.: The Theory of LEGO: A Proof Checker for the Extended Calculus of Constructions. PhD thesis, Univ. of Edinburgh (1994)
Pratikakis, P., Foster, J.S., Hicks, M., Neamtiu, I.: Formalizing soundness of contextual effects. In: Theorem Proving in Higher Order Logics, vol. 5170 of LNCS, pp. 262–277. Springer (2008)
Rendel, T., Ostermann, K., Hofer, C.: Typed self-representation. In: Proceedings of the 2009 ACM SIGPLAN conference on Programming Language Design and Implementation, pp. 293–303. ACM (2009)
Ricciotti, W.: Submission to the PoplMark Challenge, Part 1a. Available from http://ricciott.web.cs.unibo.it/ (2007). Accessed Feb 2007
Rossberg, A., Russo, C.V., Dreyer, D.: F-ing modules. In: Workshop on Types in Language Design and Implementation, pp. 89–102. ACM (2010)
Russo, C.V., Vytiniotis, D.: QML: explicit first-class polymorphism for ML. In: Proceedings of the 2009 ACM SIGPLAN workshop on ML, pp. 3–14. ACM (2009)
Shinwell, M.R., Pitts, A.M., Gabbay, M.: FreshML: programming with binders made simple. In: Proceedings of the Eighth ACM SIGPLAN International Conference on Functional Programming, ICFP, pp. 263–274. ACM (2003)
Swamy, N., Hicks, M.: Verified enforcement of stateful information release policies. SIGPLAN Not. 43(12), 21–31 (2008)
Urban, C.: Nominal techniques in Isabelle/HOL. J. Autom. Reason. 40, 327–356 (2008)
Yakobowski, B.: Graphical Types and Constraints: Second-order Polymorphism and Inference. PhD thesis, Université Paris-Diderot (2008)
Zhao, J., Zhang, Q., Zdancewic, S.: Relational parametricity for a polymorphic linear lambda calculus. In: APLAS, vol. 6461 of LNCS, pp. 344–359. Springer (2010)
Author information
Authors and Affiliations
Corresponding author
Additional information
The work described in the present paper was performed while working at INRIA Rocquencourt.
Rights and permissions
About this article
Cite this article
Charguéraud, A. The Locally Nameless Representation. J Autom Reasoning 49, 363–408 (2012). https://doi.org/10.1007/s10817-011-9225-2
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10817-011-9225-2