Lambda Calculus

samir khanal
2 min readSep 22, 2022

--

Introduction

It is also written as λ-Calculus.

It is a notation for expressing computation based on mathematical functions and programs.

λ-Calculus is a mathematical system for studying the interaction of functional abstraction and functional application.

It was introduced by Alonzo Church in the 1930s along with Church Encodings.

Because it directly supports abstraction, it is a universal model of computation that can be used to simulate any Turing machine.

λ-Calculus can encode any computations. It is a basis for functional programming languages.

A single input function can be represented in Lambda term as ‘λx’.

Syntax

A λ-calculus term is

  • a variable x€Var, where Var is a countably infinite set of variables.
  • An application, a function e0 applied to an argument e1, usually written e0 e1 or e0(e1); or
  • a lambda abstraction, an expression λx.e representing a function with input parameter x and body e. Where a mathematician would write x → x2, in the λ-calculus we write λx.x2

Representation

Any function can be represented using ‘ λ’.

For a function f(x) = t,

λx.t

where x is a variable and t is the term.

For a function f(x) = x+1,

λx.x+1

where λx is a function with input x and x+1 is the output or result or function operation term.

For two input function f(x,y) = x+y,

λx.λy.x+y

where λx.λy is a function with two inputs x &y, and the term with x+y.

Example:

Qn. (λx.x+1) 5

Here, ( λx.x+1 ) is a function defined in terms of lambda(‘ λ’) and 5 is the passed value to the function. Let us calculate the output of the function.

(λx.x+1) 5

= 5 + 1

= 6

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

samir khanal
samir khanal

Written by samir khanal

AI Enthusiasts, Software Developer

Responses (1)

Write a response