Substitution2.init() Substitution2.substExpression Substitution2.answer

Trace the substitution algorithm to perform the following substitution and write down your final answer below, using ^ to denote λ. For each α-conversion that the algorithm requires when computing say, subst(e, p, λx.B), you must choose for the new variable the letter that comes first alphabetically (i.e., "a", then "b", etc.) among those that occur neither in e nor B.

           substExpression

$('#answerTextarea').val()
return Substitution2.validateAnswer(guess);

For each step in the algorithm, make sure to pick the only case that applies based on the type of the outermost expression which you are substituting into.

Make sure to perform an α-conversion only when the algorithm requires it, that is, in case 2c.

For each α-conversion, if any, you must choose the correct variable name (reread the instructions above) to get credit for your answer: there is only one correct answer for each substitution.

The correct answer is: answer