Skip to main content

Ranking/Unranking of Lambda Terms with Compressed de Bruijn Indices

  • Conference paper
  • First Online:
Intelligent Computer Mathematics (CICM 2015)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 9150))

Included in the following conference series:

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Barendregt, H.P.: The Lambda Calculus Its Syntax and Semantics, vol. 103, Revised edn. Elsevier, North Holland (1984)

    MATH  Google Scholar 

  2. 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)

    Article  MathSciNet  MATH  Google Scholar 

  3. McBride, C.: I am not a number, I am a classy hack (2010). Blog entry: http://mazzo.li/epilogue/index.html

  4. Stanley, R.P.: Enumerative Combinatorics. Wadsworth Publishing Co., Belmont (1986)

    Book  MATH  Google Scholar 

  5. 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)

    MATH  Google Scholar 

  6. 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)

    Article  MathSciNet  MATH  Google Scholar 

  7. Grygiel, K., Lescanne, P.: Counting and generating lambda terms. J. Funct. Program. 23(5), 594–628 (2013)

    Article  MathSciNet  MATH  Google Scholar 

  8. Sloane, N.J.A.: The on-line encyclopedia of integer sequences (2014). Published electronically at https://oeis.org/

  9. Cegielski, P., Richard, D.: On arithmetical first-order theories allowing encoding and decoding of lists. Theor. Comput. Sci. 222(1–2), 55–75 (1999)

    Article  MathSciNet  MATH  Google Scholar 

  10. 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)

    Google Scholar 

  11. 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)

    Google Scholar 

  12. Knuth, D.E.: The Art of Computer Programming, Volume 4, Fascicle 3: Generating All Combinations and Partitions. Addison-Wesley Professional, Boston (2005)

    MATH  Google Scholar 

  13. 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)

    Article  MathSciNet  MATH  Google Scholar 

  14. 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

  15. 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

  16. 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)

    Google Scholar 

Download references

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

Authors

Corresponding author

Correspondence to Paul Tarau .

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics