In my semantics class, we're learning about using (abusing?) lambda calculus. So far the professor hasn't imparted any reason for using λx.x instead of using f(x).
- Why use lambdas instead of basic functions?
- Why do mathematicians notate lambdas, λx.x; wouldn't λ(x) suffice?
Thank you
An alternative notation for $\lambda$ is $\mapsto$. For instance, the following mean the same:
You could have defined it like $f(x) = x+3$, but then $f$ becomes an entity in your discourse. And having to name every function you need becomes cumbersome after a while, especially if they are of no particular interest and you just want to convey their correspondence.
To understand why you need to write $\lambda x.x+3$ instead of simply $\lambda(x+3)$, consider the following function definition (given in the three different notations we are addressing):
In all of the above definitions it is clear that $x$ is the first argument and $y$ is the second. But, if you write $\lambda(\lambda (x-y))$, then that information is lost precisely because we have not associated with each $\lambda$ its corresponding argument, i.e. $\lambda(\lambda(x-y))$ could stand for both $\lambda x.(\lambda y.x-y)$ and $\lambda y.(\lambda x.x-y)$.