Question: 2. Given the following lambda expressions and corresponding interpretations: The interpretation of furis natural number 0 (zero). The interpretation of four.f .. :))). with n

 2. Given the following lambda expressions and corresponding interpretations: The interpretation

2. Given the following lambda expressions and corresponding interpretations: The interpretation of furis natural number 0 (zero). The interpretation of four.f .. :))). with n applications of f on I, is the natural number n > The interpretation of An.Af...(f ((n f) 1)) is a successor function stoc for natural numbers, where n is the formal parameter corresponding to the number whose successor is computed The interpretation of Am.An.m succ)n) is the addition function add for two natural numbers, where m and are the formal parameters corresponding to the numbers whose sum is computed. The interpretation of Am.An.(m (add n)) zero) is the multiplication function mul for two natural numbers, where mand n are the formal parameters corresponding to the numbers whose product is computed. The interpretation of .Ays is propositional constant true. The interpretation of Az.Ay.y is propositional constant false. . The interpretation of la..th.((ha) b) is a pair of entities a and b on which some function h can be applied. We will refer to this function as Pair. The first or second element of the pair ((Pair 21) 2) can be obtained by applying on it the functions Ag. A.Ab.a) (referred to as fst) and Ag.(g 10.1.b) (referred to as sec), respectively. That is. (fst (Pair 21) 22)) = 21 and (sec (Pair 21) 22)) = 2. . The interpretation of a pair (Pair m) n) where m and n are natural numbers is a signed num- ber whose valuation is difference between m and n (i.e., m - n). For instance, ((Pair Af..) f. .(f 1)) represents a signed number -1. Identify the mathematical/logical interpretation for the following expressions. Justify your answer. (In all these problems, apply the functions on some actual arguments and examine the results, does the result correspond to some interpretation that you already know about-basic arithmetic or logical operations. We have done similar problems, when we identified the interpretation of functions repre senting addition and multiplication of naturals, and negation, conjunction and disjuction of proposi- tions.). (a) Ar.(( false) true), where is the formal parameter corresponding to propositional con- stants. (b) An.((n Ap.(p false) true)) false), where n is the formal parameter corresponding to natural numbers. (c) Am.An.(m (mul n)) (suce zero)), where m and n are formal parameters corresponding to natural numbers. (d) Ap.((Pair (sec p)) (fstp)), where p is the formal parameter correspond to some signed number (e) Ap-App (Pair ((add (fst P) (sec P2))) ((add (sec P.)) (fst P2))), where P and P2 are formal paratemeters corresponding to some signed numbers. 2. Given the following lambda expressions and corresponding interpretations: The interpretation of furis natural number 0 (zero). The interpretation of four.f .. :))). with n applications of f on I, is the natural number n > The interpretation of An.Af...(f ((n f) 1)) is a successor function stoc for natural numbers, where n is the formal parameter corresponding to the number whose successor is computed The interpretation of Am.An.m succ)n) is the addition function add for two natural numbers, where m and are the formal parameters corresponding to the numbers whose sum is computed. The interpretation of Am.An.(m (add n)) zero) is the multiplication function mul for two natural numbers, where mand n are the formal parameters corresponding to the numbers whose product is computed. The interpretation of .Ays is propositional constant true. The interpretation of Az.Ay.y is propositional constant false. . The interpretation of la..th.((ha) b) is a pair of entities a and b on which some function h can be applied. We will refer to this function as Pair. The first or second element of the pair ((Pair 21) 2) can be obtained by applying on it the functions Ag. A.Ab.a) (referred to as fst) and Ag.(g 10.1.b) (referred to as sec), respectively. That is. (fst (Pair 21) 22)) = 21 and (sec (Pair 21) 22)) = 2. . The interpretation of a pair (Pair m) n) where m and n are natural numbers is a signed num- ber whose valuation is difference between m and n (i.e., m - n). For instance, ((Pair Af..) f. .(f 1)) represents a signed number -1. Identify the mathematical/logical interpretation for the following expressions. Justify your answer. (In all these problems, apply the functions on some actual arguments and examine the results, does the result correspond to some interpretation that you already know about-basic arithmetic or logical operations. We have done similar problems, when we identified the interpretation of functions repre senting addition and multiplication of naturals, and negation, conjunction and disjuction of proposi- tions.). (a) Ar.(( false) true), where is the formal parameter corresponding to propositional con- stants. (b) An.((n Ap.(p false) true)) false), where n is the formal parameter corresponding to natural numbers. (c) Am.An.(m (mul n)) (suce zero)), where m and n are formal parameters corresponding to natural numbers. (d) Ap.((Pair (sec p)) (fstp)), where p is the formal parameter correspond to some signed number (e) Ap-App (Pair ((add (fst P) (sec P2))) ((add (sec P.)) (fst P2))), where P and P2 are formal paratemeters corresponding to some signed numbers

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!