0
$\begingroup$

For this term: $\lambda x.(f (g x))$, what are the free and bound variables?

I'm confused as to how to expand this so it will be easier to see. If I expand this will it be $\lambda x. \lambda f. \lambda g$?

$\endgroup$

migrated from cstheory.stackexchange.com Apr 6 '13 at 23:48

This question came from our site for theoretical computer scientists and researchers in related fields.

  • $\begingroup$ What do you mean by expanding? The second lambda term in your question has nothing to do with the first. What is your definition of free variables, and your definition of bound variables? $\endgroup$ – Gilles Apr 6 '13 at 23:51
1
$\begingroup$

The free variables in the term you give are $f$ and $g$, $x$ is bound by the $\lambda$-binder.

I am also confused what you mean by "expanding"? But I guess you want to abstract away those free variables. If that is true, then you will get $\lambda x . \lambda f . \lambda g . f\ (g\ x)$ (or with the parameters permuted in another way.)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.