Site banner
.
Home Forums Blogs Articles Photos Videos Contact FAQ                    
.
.
Wisdom Archive
Body Mind and Soul
Faith and Belief
God and Religion
Law of Attraction
Life and Beyond
Love and Happiness
Peace of Mind
Peace on Earth
Personal Faith
Spiritual Festivals
Spiritual Growth
Spiritual Guidance
Spiritual Inspiration
Spirituality and Science
Spiritual Retreats
More Wisdom
Buddhism Archives
Hinduism Archives
Sustainability
Theology Archives
Even more Wisdom
2012 - Year 2012
Affirmations
Aura
Ayurveda
Chakras
Consciousness
Cultural Creatives
Diksha (Deeksha)
Dream Dictionary
Dream Interpretation
Dream interpreter
Dreams
Enlightenment
Essential Oils
Feng Shui
Flower Essences
Gaia Hypothesis
Indigo Children
Kalki Bhagavan
Karma
Kundalini
Kundalini Yoga
Life after death
Mayan Calendar
Meaning of Dreams
Meditation
Morphogenetic Fields
Psychic Ability
Reincarnation
Spiritual Art, Music & Dance
Spiritual Awakening
Spiritual Enlightenment
Spiritual Healing
Spirituality and Health
Spiritual Jokes
Spiritual Parenting
Vastu Shastra
Womens Spirituality
Yoga Positions
Site map 2
Site map


Dream Sharing Forum

at Global Oneness Community.

Share your dreams and let others help you with the interpretation!
Dream Sharing Forum



.

Lambda calculus - Formal definition

Lambda calculus - Formal definition: Encyclopedia II - Lambda calculus - Formal definition

Formally, we start with a countably infinite set of identifiers, say {a, b, c, ..., x, y, z, x1, x2, ...}. The set of all lambda expressions can then be described by the following context-free grammar in BNF: <expr> ::= <identifier> <expr> ::= (λ <identifier>. <expr>) <expr ...

See also:

Lambda calculus, Lambda calculus - History, Lambda calculus - Informal description, Lambda calculus - Formal definition, Lambda calculus - α-conversion, Lambda calculus - β-reduction, Lambda calculus - η-conversion, Lambda calculus - Arithmetic in lambda calculus, Lambda calculus - Logic and predicates, Lambda calculus - Recursion, Lambda calculus - Computable functions and lambda calculus, Lambda calculus - Undecidability of equivalence, Lambda calculus - Lambda calculus and programming languages

Lambda calculus, Lambda calculus - Arithmetic in lambda calculus, Lambda calculus - Computable functions and lambda calculus, Lambda calculus - Formal definition, Lambda calculus - History, Lambda calculus - Informal description, Lambda calculus - Lambda calculus and programming languages, Lambda calculus - Logic and predicates, Lambda calculus - Recursion, Lambda calculus - Undecidability of equivalence, Lambda calculus - α-conversion, Lambda calculus - β-reduction, Lambda calculus - η-conversion, SKI combinator calculus, H.P. Barendregt's Lambda cube, Jean-Yves Girard's System F, Thierry Coquand's calculus of constructions, Typed lambda calculus, Curry-Howard isomorphism, Anonymous recursion, Unlambda

Lambda calculus: Encyclopedia II - Lambda calculus - Formal definition



Lambda calculus - Formal definition

Formally, we start with a countably infinite set of identifiers, say {a, b, c, ..., x, y, z, x1, x2, ...}. The set of all lambda expressions can then be described by the following context-free grammar in BNF:

  1. <expr> ::= <identifier>
  2. <expr> ::= (λ <identifier>. <expr>)
  3. <expr> ::= (<expr> <expr>)

The first two rules generate functions, while the third describes the application of a function to an argument. Usually the parentheses for lambda abstraction (rule 2) and function application (rule 3) are omitted if there is no ambiguity under the assumptions that (1) function application is left-associative, and (2) a lambda binds to the entire expression following it. For example, the expression  ((λ x. (x x)) (λ y. y))  can be simply written as  (λ x. x x) λ y. y.

Lambda expressions such as  λ x. (x y)  do not define functions because the occurrence of the variable y is free, i.e., it is not bound by any λ in the expression. The binding of occurrences of variables is (with induction upon the structure of the lambda expression) defined by the following rules:

  1. In an expression of the form  V,  where V is a variable, this V is the single free occurrence.
  2. In an expression of the form  λ V. E,  the free occurrences are the free occurrences in E except those of V. In this case the occurrences of V in E are said to be bound by the λ before V.
  3. In an expression of the form  (E E′),  the free occurrences are the free occurrences in E and E′.

Over the set of lambda expressions an equivalence relation (here denoted as ==) is defined that captures the intuition that two expressions denote the same function. This equivalence relation is defined by the so-called alpha-conversion rule and the beta-reduction rule.

Lambda calculus - α-conversion

The alpha-conversion rule is intended to express the idea that the names of the bound variables are unimportant; for example that  λx.x  and  λy.y  are the same function. However, the rule is not as simple as it first appears. There are a number of restrictions on when one bound variable may be replaced with another.

The alpha-conversion rule states that if V and W are variables, E is a lambda expression, and

E[V := W]

means the expression E with every free occurrence of V in E replaced with W, then

λ V. E  ==  λ W. E[V := W]

if W does not appear freely in E and W is not bound by a λ in E whenever it replaces a V. This rule tells us for example that  λ x. (λ xxx  is the same as  λ y. (λ xxy.

Lambda calculus - β-reduction

The beta-reduction rule expresses the idea of function application. It states that

((λ V. E) E′)  ==  E[V := E′]

if all free occurrences in E′ remain free in E[V := E′].

The relation == is then defined as the smallest equivalence relation that satisfies these two rules.

A more operational definition of the equivalence relation can be given by applying the rules only from left to right. A lambda expression which does not allow any beta reduction, i.e., has no subexpression of the form ((λ V. E) E′), is called a normal form. Not every lambda expression is equivalent to a normal form, but if it is, then the normal form is unique up to naming of the formal arguments. Furthermore, there is an algorithm for computing normal forms: keep replacing the first (left-most) formal argument with its corresponding concrete argument, until no further reduction is possible. This algorithm halts iff the lambda expression has a normal form. The Church-Rosser theorem then states that two expressions result in the same normal form up to renaming of the formal arguments iff they are equivalent.

Lambda calculus - η-conversion

There is a third rule, eta-conversion, which may be added to these two to form a new equivalence relation. Eta-conversion expresses the idea of extensionality, which in this context is that two functions are the same iff they give the same result for all arguments. Eta-conversion converts between  λ x. f x  and  f  whenever x does not appear free in f. This can be seen to be equivalent to extensionality as follows:

If f and g are extensionally equivalent, i.e. if  f a==g a  for all lambda expressions a, then in particular by taking a to be a variable x not appearing free in f nor g we have  f x == g x  and hence  λ xf x == λ xg x,  and so by eta-conversion  f == g.  So if we take eta-conversion to be valid, we find extensionality is valid.

Conversely if extensionality is taken to be valid, then since by beta-reduction for all y we have  (λ xf xy == f y,  we have  λ xf x  ==  f;  i.e., eta-conversion is found to be valid.

Other related archives

1930s, Actor model, Alonzo Church, Anonymous recursion, BNF, Church numerals, Church-Rosser theorem, Church-Turing thesis, Curry-Howard isomorphism, Entscheidungsproblem, Funarg problem, Gödel number, Gödel numbering, Gödel's first incompleteness theorem, H.P. Barendregt, Jean-Yves Girard, Lambda cube, Lisp, Process calculi, Recursion, Russell's paradox, SKI combinator calculus, Stephen Cole Kleene, System F, Turing machine, Typed lambda calculus, Unlambda, Y combinator, algorithm, calculus of constructions, combinator, combinatory logic, computability, computable function, computer science, concurrency, constants, context-free grammar, countably infinite, currying, datatypes, equivalence relation, extensionality, factorial, formal system, function, functional programming languages, halting problem, higher-order function, if and only if, iff, induction, left associative, natural numbers, parallelism, programming languages, recursion, set, typed lambda calculi, unbounded nondeterminism, undecidability, up to



Adapted from the Wikipedia article "Formal definition", under the G.N U Free Docmentation License. Please also see http://en.wikipedia.org/wiki

More material related to Lambda Calculus can be found here:
Main Page
for
Lambda Calculus
Index of Articles
related to
Lambda Calculus


« Back








Search the Global Oneness web site
Global Oneness is a huge, really huge, web site. Almost whatever you are searching for within health, spirituality, personal development and inspirationals - you will find it here!
Google
 
 

Rate this article!

Please rate this article with 10 as very good and 1 as very poor.

.








Sneak-Peek of Global Oneness Community

Hi friend! The Global Oneness Community, the place for information and sharing about Oneness is not really launched yet (you will see there is still some clean up to do) ...but it is now open for a sneak-peek! And if you wish - please register and become one of the very first members to do so! Jonas

Forum Home, Articles, Photo Gallery, Videos, News, Sitemap
...and much more!


Dream Sharing Forum

at Global Oneness Community.

Share your dreams and let others help you with the interpretation!
Dream Sharing Forum



Forum
Articles
Images Pictures
Videos
News
Sitemap




 

 

 

 

 


 








  » Home » » Home »