HaskellWiki

Haskell | Wiki community | Recent changes
Random page | Special pages

 

Not logged in
Log in | Help

Note: new account creation has been disabled as an anti-spam measure.

Alpha conversion

Categories: Glossary

An alpha conversion (also written α conversion) is a renaming of variables.

Haskell theoretical foundations

General:
Mathematics - Category theory
Research - Curry/Howard/Lambek

Lambda calculus:
Alpha conversion - Beta reduction
Eta conversion - Lambda abstraction

Other:
Recursion - Combinatory logic
Chaitin's construction - Turing machine
Relational algebra

For example, suppose we have an expression such as

\x y -> 2*x*x + y

and we change this to

\a b -> 2*a*a + b

This is clearly the same function, even though it uses different variable names. This process of renaming variables is alpha conversion.

Note that alpha conversion is not as simple as it first seems. We must be careful to avoid name capture. For example, if we rename x to y in \x -> x + y then we end up with \y -> y + y, which is not the same function!

Some compilers include an alpha-conversion stage to rename all program variables such that variable names become unique. (This simplifies subsequent processing somewhat.)

Also see Lambda calculus and the wikipedia lambda calculus article.

Retrieved from "http://haskell.org/haskellwiki/Alpha_conversion"

This page has been accessed 2,583 times. This page was last modified 18:23, 3 February 2007. Recent content is available under a simple permissive license.