# λCalculus in ५ minutes

`https://www.maqbool.net`
`Mohd Maqbool Alam`

# Alonzo Church (1903-1995)

`Image credit : Wikipedia `
`Image credit : Wikipedia `

## Alan Turing (1912 - 1954)

`Image credit : Wikipedia `

## Main idea

• In 1936, two papers came up with definitions of algorithms.
• Alonzo Church used λ-calculus to define algorithms.
• Alan Turing used Turing machines to define algorithms.
• It turns out that both definitions are equivalent!

## Syntax

1. A variable is a lambda expression (we will use single, lower-case letters for variables).
2. If M and N are lambda expressions, then so are each of the following:
1. (M)
2. λid.M //abstraction
3. MN //application
`credit : http://pages.cs.wisc.edu/~horwitz/`

# Context-free grammar

 exp → ID | ( exp ) | λ ID . exp // abstraction | exp exp // application

### AST of (λx.x+1)3

abstract-syntax tree

`credit : http://pages.cs.wisc.edu/~horwitz/`

true = λ ab.a

true = λ ab.b

and = λ pq. pqp

and = λ pq. ppq

# λf. (λx. f (x x))(λx. f (x x))

## Resources

• http://www.doc.ic.ac.uk/~mrc/
• https://brilliant.org/wiki/lambda-calculus/
• http://pages.cs.wisc.edu/~horwitz/CS704-NOTES/1.LAMBDA-CALCULUS.html

## Elixir Delhi Community

• meetup.com/Elixirlang-Delhi-NCR/

• t.me/elixirdelhi

`Image credit : https://elixirforum.com/u/romariolopezc/`