# Lambda Calculus

## Create a lambda expression

Operator: lambda varlist expression
Jacal has the ability to work with lambda expressions, via the command `lambda`. Furthermore, Jacal always converts user definitions of functions by any method into lambda expressions and converts the dummy variables of the function definition into symbols such as 1, 2, .... Jacal can manipulate lambda expressions by manipulating their function parts, as in `e14' below. Jacal can also invert a function using the command `finv`.

```e12 : lambda([x],x^2);

2
e12: lambda([@1], @1 )

e13 : lambda([x,y,z],x*y*z);

e13: lambda([@1, @2, @3], @1 @2 @3)

e14 : e12+e13;

2
e14: lambda([@1, @2, @3], @1  + @1 @2 @3)
```

## Compute inverse function

Command: finv function
`function^^-1`

The command `finv` takes as input a function of one variable and returns the inverse of that function. The function may be defined in any of the ways permitted in Jacal, i.e. by an explicit algebraic definition, by an explicit lambda expression or by an implicit lamba expression. If f is the function, then typing `f^^-1` has the same effect as typing `finv(f)`.

```e0 : w(t):=t+1;

w(t): lambda([@1], 1 + @1)

e0 : finv(w);

e0: lambda([@1], -1 + @1)
```