https://github.com/neysofu/lambda-squared
A binary λ-calculus (BLC) interpreter written only in Python lambdas.
https://github.com/neysofu/lambda-squared
academic-project interpreter lambda-calculus
Last synced: about 1 month ago
JSON representation
A binary λ-calculus (BLC) interpreter written only in Python lambdas.
- Host: GitHub
- URL: https://github.com/neysofu/lambda-squared
- Owner: neysofu
- License: mit
- Created: 2017-02-03T23:41:58.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-04-20T13:57:50.000Z (over 6 years ago)
- Last Synced: 2024-10-12T14:03:03.524Z (12 months ago)
- Topics: academic-project, interpreter, lambda-calculus
- Language: Python
- Homepage:
- Size: 20.5 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# λ²
λ² is a λ-calculus implementation written only in Python lambdas.- No recursion.
- No Python built-ins (integers, strings, conditionals... nothing!).
- No external dependencies. (Duh.)### What is this?
From [the Wikipedia entry](https://en.wikipedia.org/wiki/Lambda_calculus) on λ-calculus:
> Lambda calculus (also written as λ-calculus) is a formal system in mathematical logic for expressing computation based on function abstraction and application using variable binding and substitution. It is a universal model of computation that can be used to simulate any single-taped Turing machine and was first introduced by mathematician Alonzo Church in the 1930s as part of his research of the foundations of mathematics.
Binary λ-calculus is just a convenient encoding for already valid λ-calculus programs. `00` is abstraction and `01` is application. Instead of variables, binary λ-calculus uses [De Bruijn indexes](https://en.wikipedia.org/wiki/De_Bruijn_index).
### Why?
Why not?