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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!