请输入您要查询的字词:

 

单词 LambdaCalculus
释义

lambda calculus


Lambda calculusMathworldPlanetmath (often referred to as λ-calculus) was invented in the 1930s by Alonzo Church, as a form of mathematical logic dealing primarly with functions and the application of functions to their arguments.In pure lambda calculus, there are no constants. Instead, there are only lambda abstractions (which are simply specifications of functions), variables, and applications of functions to functions. For instance, Church integers are used as a substitute for actual constants representing integers.

A lambda abstraction is typically specified using a lambda expression, which might look like the following.

λx.fx

The above specifies a function of one argument, that can be reduced by applying the function f to its argument (function application is left-associative by default, and parentheses can be used to specify associativity).

The λ-calculus is equivalentMathworldPlanetmathPlanetmathPlanetmathPlanetmath to combinatory logicMathworldPlanetmath (though much more concise). Most functional programming languagesPlanetmathPlanetmath are also equivalent to λ-calculus, to a degree (any imperative features in such languages are, of course, not equivalent).

Examples

We can specify the Church integer 3 in λ-calculus as

3=λfx.f(f(fx))

Suppose we have a function inc, which when given a string representing an integer, returns a new string representing the number following that integer.Then

3inc"0"="3"

AdditionPlanetmathPlanetmath of Church integers in λ-calculus is

add=λxy.(λfz.xf(yfz))
add 2 3=λfz . 2f(3fz)
=λfz . 2f(f(f(fz)))
=λfz.f(f(f(f(fz))))
=5

Multiplication is

mul=λxy.(λfz.x(λw.yfw)z)
mul 2 3=λfz . 2(λw . 3fw)z
=λfz . 2(λw.f(f(fw)))z
=λfz.f(f(f(f(f(fz)))))
=6.

Russell’s Paradox in λ-calculus

The λ-calculus readily admits Russell’s ParadoxMathworldPlanetmath.Let us define a function r that takes a function x as an argument, and is reduced to the application of the logical function not to the application of x to itself.

r=λx.not(xx)

Now what happens when we apply r to itself?

rr=not(rr)
=not(not(rr))

Since we have not(rr)=(rr), we have a paradox.

Titlelambda calculus
Canonical nameLambdaCalculus
Date of creation2013-03-22 12:32:39
Last modified on2013-03-22 12:32:39
Ownerratboy (4018)
Last modified byratboy (4018)
Numerical id9
Authorratboy (4018)
Entry typeDefinition
Classificationmsc 03B40
Related topicCombinatoryLogic
Related topicChurchInteger
Related topicRussellsParadox
Definespure lambda calculus
Defineslambda abstraction
Defineslambda expression
随便看

 

数学辞典收录了18232条数学词条,基本涵盖了常用数学知识及数学英语单词词组的翻译及用法,是数学学习的有利工具。

 

Copyright © 2000-2023 Newdu.com.com All Rights Reserved
更新时间:2025/5/5 4:48:49