explicit form for currying


In lambda calculusMathworldPlanetmath, we may express Currying functions and their inversesPlanetmathPlanetmathPlanetmathPlanetmath explicitly using lambda expressions. Suppose that f is a function of two arguments. Then, if c2 is the currying function which maps of two arguments to higher order functions, we have, by definition,

f⁢(x,y)=((c2⁢(f))⁢(x))⁢(y).

We then have

c2⁢(f)=λv⁢(λu⁢f⁢(u,v)),

hence

c2=λw⁢(λv⁢(λu⁢w⁢(u,v))).

Likewise, from the original equation, we see that

c2-1=λw⁢(λa⁢b⁢(w⁢(x))⁢(y)).

We can write similar expressions for any number of arguments:

c3 =λw⁢(λc⁢(λb⁢(λa⁢w⁢(a,b,c))))
c4 =λw⁢(λd⁢(λc⁢(λb⁢(λa⁢w⁢(a,b,c,d)))))
c5 =λw⁢(λe⁢(λd⁢(λc⁢(λb⁢(λa⁢w⁢(a,b,c,d)))))),

etc.

Their inverses look as follows:

c3-1 =λw⁢(λa⁢b⁢c⁢((w⁢(a))⁢(b))⁢(c))
c4-1 =λw⁢(λa⁢b⁢c⁢d⁢(((w⁢(a))⁢(b))⁢(c))⁢(d))
c4-1 =λw⁢(λa⁢b⁢c⁢d⁢e⁢((((w⁢(a))⁢(b))⁢(c))⁢(d))⁢(e))
Title explicit form for currying
Canonical name ExplicitFormForCurrying
Date of creation 2013-03-22 17:03:57
Last modified on 2013-03-22 17:03:57
Owner rspuzio (6075)
Last modified by rspuzio (6075)
Numerical id 5
Author rspuzio (6075)
Entry type Derivation
Classification msc 68Q01