Abstract
We introduce a compressed de Bruijn representation of lambda terms and define its bijections to standard representations. Our compressed terms facilitate derivation of size-proportionate ranking and unranking algorithms of lambda terms and their inferred simple types. We specify our algorithms as a literate Prolog program.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
References
Barendregt, H.P.: The Lambda Calculus Its Syntax and Semantics, vol. 103, Revised edn. Elsevier, North Holland (1984)
Bruijn, N.G.D.: Lambda calculus notation with nameless dummies, a tool for automatic formula manipulation, with application to the Church-Rosser Theorem. Indag. Mathematicae 34, 381–392 (1972)
McBride, C.: I am not a number, I am a classy hack (2010). Blog entry: http://mazzo.li/epilogue/index.html
Stanley, R.P.: Enumerative Combinatorics. Wadsworth Publishing Co., Belmont (1986)
Kreher, D.L., Stinson, D.: Combinatorial Algorithms: Generation, Enumeration, and Search. The CRC Press Series on Discrete Mathematics and its Applications. CRC Press INC, US (1999)
Gödel, K.: Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I. Monatshefte für Mathematik und Physik 38, 173–198 (1931)
Grygiel, K., Lescanne, P.: Counting and generating lambda terms. J. Funct. Program. 23(5), 594–628 (2013)
Sloane, N.J.A.: The on-line encyclopedia of integer sequences (2014). Published electronically at https://oeis.org/
Cegielski, P., Richard, D.: On arithmetical first-order theories allowing encoding and decoding of lists. Theor. Comput. Sci. 222(1–2), 55–75 (1999)
Tarau, P.: An embedded declarative data transformation language. In: Proceedings of 11th International ACM SIGPLAN Symposium PPDP 2009, Coimbra, Portugal, September 2009, pp. 171–182. ACM (2009)
Lehmer, D.H.: The machine tools of combinatorics. In: Edwin, F., Beckenbach, R.E. (eds.) Krieger Applied combinatorial mathematics, pp. 5–30. Wiley, New York (1964)
Knuth, D.E.: The Art of Computer Programming, Volume 4, Fascicle 3: Generating All Combinations and Partitions. Addison-Wesley Professional, Boston (2005)
Tarau, P.: Compact serialization of prolog terms (with Catalan skeletons, Cantor tupling and Gödel numberings). Theory Prac. Logic Program. 13(4–5), 847–861 (2013)
David, R., Raffalli, C., Theyssier, G., Grygiel, K., Kozik, J., Zaionc, M.: Some properties of random lambda terms. Logic. Methods Comput. Sci. 9(1) (2009). http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.244.5073&rep=rep1&type=pdf
David, R., Grygiel, K., Kozik, J., Raffalli, C., Theyssier, G., Zaionc, M.: Asymptotically almost all \(\lambda \)-terms are strongly normalizing (2010). Preprint: arXiv: math.LO/0903.5505v3
Barendregt, H.P.: Lambda calculi with types. In: Abramsky, S., Gabbay, D., Maibaum, T. (eds.) Handbook of Logic in Computer Science, vol. 2. Oxford University Press, New York (1991)
Acknowledgement
We thank the anonymous referees of Calculemus’15 for their constructive criticisms and valuable suggestions that have helped improving the paper. This research was supported by NSF research grant 1423324.
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2015 Springer International Publishing Switzerland
About this paper
Cite this paper
Tarau, P. (2015). Ranking/Unranking of Lambda Terms with Compressed de Bruijn Indices. In: Kerber, M., Carette, J., Kaliszyk, C., Rabe, F., Sorge, V. (eds) Intelligent Computer Mathematics. CICM 2015. Lecture Notes in Computer Science(), vol 9150. Springer, Cham. https://doi.org/10.1007/978-3-319-20615-8_8
Download citation
DOI: https://doi.org/10.1007/978-3-319-20615-8_8
Published:
Publisher Name: Springer, Cham
Print ISBN: 978-3-319-20614-1
Online ISBN: 978-3-319-20615-8
eBook Packages: Computer ScienceComputer Science (R0)