Question: Problem 4 [10pt] Using the pure -calculus, we can encode a pair of -terms as where a term PAIR takes three -terms a, b, p
![Problem 4 [10pt] Using the pure -calculus, we can encode a](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f33000d4b81_56866f33000374df.jpg)
Problem 4 [10pt] Using the pure -calculus, we can encode a pair of -terms as where a term PAIR takes three -terms a, b, p and applies p to a and b. That is, we can define PAIR as (Aabppab). (p (At f . t)). Show that under a) Based on this definition, we can encode function LEFT as LEFT A Ap b) Try to define a function RIGHT in -calculus so that given a pair, it returns the second term in the pair. c) Try to define a function FLIP in -calculus so that given a pair, it returns a new pair where the elements such encoding, LEFT (PAIR x y) evaluates to x. For example, RIGHT (PAIR x y) should evaluate to y under your encoding. are flipped. For example, FLIP (PAIR y) should evaluate to (PAIRy r) (or some equivalent term under a18-reduction)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
