Intro
calchylus is a computer installable Hy module that is used to evaluate, and furthermore through this documentation, shine light to the basics of Lambda calculus (also written as λ-calculus).
Lambda calculus is a formal system in mathematical logic for expressing computation that is based on function abstraction and application using variable binding and substitution.
The target audience is those who:
are interested in the theory and the history of the programming languages
may have or are interested to gain some experience in Python and/or Lisp
who wants to narrow the gap between mathematical notation and programming languages, especially by means of logic
Andrew Bayer writes in his blog post about formal proofs and deduction:
Traditional logic, and to some extent also type theory, hides computation behind equality.
Lambda calculus, on the other hand, reveals how the computation in logic is done by manipulation of the Lambda terms. Manipulation rules are simple and were originally made with a paper and a pen, but now we rather use computers for the task. Lambda calculus also addresses the problem, what can be proved and solved and what cannot be computed in a finite time. Formally these are called the decidability and the halting problem.
Beside evaluating Lambda expressions, calchylus module can serve as a starting point for a mini programming language. Via custom macros representing well known Lambda forms, calchylus provides all necessary elements for boolean, positive integer, and list data types as well as conditionals, loops, variable setters, imperative do structure, logical connectives, and arithmetic operators. You can build upon that, for example real numbers, even negative complex numbers if that makes any sense. Your imagination is really the only limit.
Finally, when investigating the open source calchylus implementation that is hosted on GitHub , one can expect to get a good understanding of the higher order functions and the combinatory logic, not the least of the fixed point combinator or shortly, ϒ combinator.
Quick start
For people willing to get hands quickly on coding:
Install
$ pip install calchylus
Open Hy
$ hy
Import
(require [calchylus.lambdas [*]])
Initialize
(with-alpha-conversion-and-macros L ,)
Lambda dance
(L x y , (x (x (x (x (x y))))) a b) ; output: (a (a (a (a (a b)))))
(FIBONACCI SEVEN x y) ; output: (x (x (x (x (x (x (x (x (x (x (x (x (x y)))))))))))))
Documentation
For full documentation, see: calchylus.readthedocs.io
Metadata
Release files for calchylus 0.1.25
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| calchylus-0.1.25.tar.gz | 12.4 kB | Without provenance | Details |
Release files / calchylus-0.1.25.tar.gz
| Download URL | calchylus-0.1.25.tar.gz |
|---|---|
| Size | 12.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c610adc33bb9b1ca1558fabe3a268e0523bd1d38787b1d3f2682502e9a4ce12f
|
|
BLAKE2b-256 checksum How to use checksums |
361d0d8bc7a2c5a12fd061578bf11d21421beaff91c5f59a34140a7db88d01f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/2.7
|
Security for calchylus 0.1.25
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.