Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ggwpez/lambda-counter
Counts the number of closed lambda terms with a given length.
https://github.com/ggwpez/lambda-counter
lambda-calculus oeis
Last synced: 9 days ago
JSON representation
Counts the number of closed lambda terms with a given length.
- Host: GitHub
- URL: https://github.com/ggwpez/lambda-counter
- Owner: ggwpez
- License: gpl-3.0
- Created: 2016-07-20T12:57:33.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2021-12-29T13:25:39.000Z (about 3 years ago)
- Last Synced: 2024-11-09T13:12:12.403Z (2 months ago)
- Topics: lambda-calculus, oeis
- Language: C++
- Homepage:
- Size: 1.37 MB
- Stars: 3
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Abstract
The three types of terms of the [Lambda-Calculus](https://en.wikipedia.org/wiki/Lambda_calculus) can be categorised by various constraints.
One such constraints is the the length of their standart representation.
This program counts the number of closed Lambda terms with a given length.
This implementation is currently by far the best.
ref OEIS [A260661](https://oeis.org/A260661).## Try it out
### Docker
```sh
docker run --rm -it ggwpez/lambda_counter 100
```### Compiling on GNU/Linux
You will need GNU GMP, its the big numbers libary used.
Download it from [here](https://gmplib.org/#DOWNLOAD) or install the package *libgmp-dev*.
```sh
git clone https://github.com/ggwpez/Lambda-Counter && cd Lambda-Counter && make
```
## Usage
It takes two arguments; the *start* and the *end*. It caluculates the values in range [*start*, *end*] .
The *start* can be omitted in which case it is defaulted to *0*.
Example:
```sh
./lambda_counter 10 100
```
Can be cancelled with `Ctrl+C`.
[100.txt](100.txt) contains the output for [0, 100].## License
Licensed under GPLv3, see [LICENSE](LICENSE) file.
Copyright 2016-2021 Oliver Tale-Yazdi .