Question: Substitution ( 2 0 points ) In class we described capture - avoiding substitution e 1 { e 2 / x } in order to
Substitution pointsIn class we described captureavoiding substitution eex in order to describe reduction. We did not,however, formally define it We rectify this by giving the following inductive definition of substitution.yexe if x yy if x ye eex eex eexy eexy e if x yyeex if x y and y FV ezezyex if x y and y FV e wherez FV e FV exThe function FV takes a lambda calculus expression e and returns the set of free variables of e Thus,y FV e if and only if y is a free variable of e For example FV x z y x yz and for any expressione, e is a closed term if and only if FV ea Give an inductive definition of the function FV b Show the result of the following substitutions. z y y y z wx xyx x yz x zww wxy x yz y zxx ww x y x yw wxc Consider the following alternate and incorrect definitions for substitution for abstractions: y eexfor the other cases, the definition remains the same For each alternate definition give an examplesubstitution in which the original and alternate definitions produce different results, and give thoseresults.iy eexy e if x yyeex if x yiiy eex y e if xyyeex if x y and y FV ezezyex if x y and y FV e wherez FV ex
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
