lcalc
Lambda calculus implementation.
Use lcalc.parse(source:str) -> Def
(or lcalc.try_parse(source) -> (Def | None)
)
to parse your expression and lcalc.evaluate(expr:Def) -> Def
to evaluate it. See lcalc/test/test_lcalc.py
for tests.
Use python3 setup.py test
to run tests.
This package uses Jet Brains' PyCharm legacy type hinting. However, PEP-484 is welcome and desired.
I'd like to thank to Acar and Ahmed of Chicago University for their lecture with clear description of how to implement β-reduction in de Brujin indicies.