/lambda

Lambda calculus (maybe simply typed)

Primary LanguageHaskellGNU Affero General Public License v3.0AGPL-3.0

Lambda

Lambda calculus (maybe simply typed)

Alpha-conversion

\x.f(x) = \y.f(y)

Rename variables. Can be used to de-brujin encode.

Beta-conversion

(\x.f(x))(T) = f(T)

This is the reduction that is computational in nature.

Eta-conversion

\x.F(x) = F

Remove redundant lambdas.

Grammar

https://opendsa-server.cs.vt.edu/ODSA/Books/PL/html/Syntax.html Formally, the lambda caluclus can be described by the following BNF grammar:

expr = var
     | lambda var . expr
     | (expr expr)

De Brujin Indices

Start enumerating bindings at the outermost scope.

When new variables are bound in the inner scopes then the largest binding in scope gets incremented.

This produces the variable names at each level.