[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 / qst / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Home]
In Lambda calculus, how can I make a lambda...
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

File: 1445120682610.png (78 KB, 249x250) Image search: [iqdb] [SauceNao] [Google]
78 KB, 249x250
In Lambda calculus, how can I make a lambda expression input the abstraction (the definition) of another Lambda expression?

Like, if I have a lambda expression which multiplies x by 3, I want to input "the expression of multiplying x by 3".
>>
>>7790190
I don't understand what you're asking. Can you explain in more detail?

Reading through these lecture notes might help as well.
http://arxiv.org/abs/0804.3434
>>
>>7790221
I want to input a lambda expression as a lambda expression, and not as what it outputs.

An equivalent with traditional mathematical functions would be this:
Inputting a function as it's defined using set theory, instead of just inputting its output.
For example, the function f simply inputs the result of g here: f(g(x)). What is desired is to input the definition of the function - its domain, range, and all the tuple mappings between the two.
>>
>>7790245
First of all, in set theory, functions are actually just sets of ordered pairs.

For instance you may have a function
[math]f=\{(1,a),(2,b),(3,c)\}[/math]
Then saying [math]f(1)[/math] actually means you're evaluating [math]f[/math] "at" [math]1[/math]. In other words, [math]f(1)[/math] is not a function, it's just an element of the co-domain. I.e.
[math]f(1)=a[/math]

So writing something like [math]f(g(x))[/math] is just f evaluated at "g evaluated at x". If you do this element wise then you can produce a new function that is the composition of the other two but formally this is subtly different from evaluating one function on the output of another one.

All that said, if I understand you correctly (I'm honestly not sure I do because I find your explanation kind of strange to be honest) what you want is to write something like

(\g \x. f (g x)) G
where G represents the lambda expression for the function you want to evaluate x on before feeding it into f.
>>
>>7790190

This cat is cool looking.