Question: Using the pure X-calculus, we can encode a pair of X-terms as where a term PAIR takes three X-terms a, b, p and applies

Using the pure X-calculus, we can encode a pair of X-terms as

Using the pure X-calculus, we can encode a pair of X-terms as where a term PAIR takes three X-terms a, b, p and applies p to a and b. That is, we can define PAIR as (Xa b p. p a b). a) (1 pt) Based on this definition, we can encode function RIGHT as RIGHT = Ap. (p (At f. f)). Show that under such encoding, RIGHT (PAIR zy) evaluates to y. b) (1 pt) Try to define a function LEFT in A-calculus so that given a pair it returns the first term in the pair.For example, LEFT (PAIR ay) should evaluate to z under your encoding. c) (1pt) Try to define a function REPLACE in X-calculus so that given a pair, it "replaces" the second component with the first component in a pair. For example, REPLACE (PAIR z y) should evaluate to (PAIR z z) (or some equivalent term under a/B-reduction). I

Step by Step Solution

3.44 Rating (147 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Cryptography Known message passing Encryption prevents an ... View full answer

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 Accounting Questions!