Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Cryptography Known message passing Encryption prevents an ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started