[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
Explain Lambda calculus to someone with no compsci background
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /sci/ - Science & Math

Thread replies: 12
Thread images: 1
File: lambda.png (46 KB, 652x483) Image search: [Google]
lambda.png
46 KB, 652x483
Explain Lambda calculus to someone with no compsci background and math only up through simple calculus. I can rephrase stuff in Lambda terms, but still don't "get" its significance.
>>
>>7997190
So you have functions
Which can take other functions as parameters
Like a set theory without urelements
And do ahit with them using really cool notation.
>>
>>7997190
Imagine all you can do is substitute arbitrary terms for variables. Now imagine all terms you have are variables, variable bindings and function application. This is turing-complete.
>>
meme calculus
>>
It's like lego
>>
>>7997211
I guess the question is, what is the advantage of a Lambda-style notation system as opposed to some system that ISN'T based on Lambda expressions? In other words, what does Lambda calculus allow us to DO which could not otherwise be done?
>>
>>7997292
Most used languages are Turing complete, so
>could not otherwise
is ill-guided.

Could you be more precise?
Of course, you can now use anonymous functions in C# and so lambdas just look like notation.

They are then mostly a concise ingredient to pull a Turing complete language out of the head, and since they are so simply the language can be actually given clear semantics, you have a feeling for what constructions are possible and how they must look like.
Some of the languages can also be strongly typed, and then the lambdas become proof witnesses.
>>
>>7997190
all it is is specifying what argument goes in what slot in the function, and in what order. say you have a function f that takes two arguments. you give it x and get f(x), then you give it y and get f(x)(y). now imagine you wanted a function that did the same thing, but it takes the arguments in a different order. in order to do that, first go back to the original function f and make it explicit how it takes its arguments. what you really have is
λaλb[f(a)(b)]
all that means is that you're going to take an argument of a certain type and put it in the spot with the lambda-bound variable. first you take x, then you take y. so what will happen is the following
λaλb[f(a)(b)](x)
this is an equivalent statement to
λb[f(x)(b)]
then if you give that expression y as an argument you'll have
λb[f(x)(b)](y)
which is equivalent to
f(x)(y)
if you want to change the order that the function takes its arguments, you just switch the scope of the lambdas so the one binding the first variable is on the outside, as in the following
λbλa[f(a)(b)]
>>
>>7997396
also using the dot sucks because you can't see what the scope of the different lambdas is; that's why I'm using brackets in this. the dot is fine for the most simple cases, but it gets ugly pretty fast.
>>
>>7997396
>if you want to change the order that the function takes its arguments, you just switch the scope of the lambdas so the one binding the first variable is on the outside, as in the following
>λbλa[f(a)(b)]
I do not follow the reverse stuff. can you detail it like you did before ?
>>
>>7997408
I don't think the convention to have the matrix be everthing after the dot was ever restricting me. As soon you have something you want to put on the left but not in scope, bracket the whole lambda term
>>
>>7998618
sure. really if the function is λbλa[f(a)(b)] then you actually have two levels of lambdas, so it's maybe more explicit to say it's this
λb[λa[f(a)(b)]]
that means when you give it an argument like y, it's going to slot it in where b is
λb[λa[f(a)(b)]](y)
the argument is interpreted in the function in place of the lambda-bound variable b, so it's equivalent to
λa[f(a)(y)]
then you can give it x as an argument, and you would have x interpreted where a is.
λa[f(a)(b)](x)
=f(x)(y)
you end up with the exact same statement as before, when you also ended up with f(x)(y), but you gave it the arguments in a different order. first y, then x this time, whereas before it was x first, then y.
Thread replies: 12
Thread images: 1

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.