Question: Problem 4 [12pt] Consider the simply typed -calculus and its typing rules defined in Note 3. Suppose we want to add a new operationwhich performs
![Problem 4 [12pt] Consider the simply typed -calculus and its typing](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3c8fe44674_73366f3c8fdd973c.jpg)
Problem 4 [12pt] Consider the simply typed -calculus and its typing rules defined in Note 3. Suppose we want to add a new operationwhich performs the equality test on two natural numbers. We can define the syntax of this new language as follows: terms where the dots represents the terms defined in Note 3. The syntax of types remains unchanged. a) (5pt) Follow the notations in Note 3, write down a typing rule (call it T-Eq) for the new term e e, so that the equality test takes two natural numbers and returns a Boolean value. b) (7pt) What is the type of the term ((Ar:int. ( 12))) 3)? Justify your answer by writing down the proof tree for this term. Problem 4 [12pt] Consider the simply typed -calculus and its typing rules defined in Note 3. Suppose we want to add a new operationwhich performs the equality test on two natural numbers. We can define the syntax of this new language as follows: terms where the dots represents the terms defined in Note 3. The syntax of types remains unchanged. a) (5pt) Follow the notations in Note 3, write down a typing rule (call it T-Eq) for the new term e e, so that the equality test takes two natural numbers and returns a Boolean value. b) (7pt) What is the type of the term ((Ar:int. ( 12))) 3)? Justify your answer by writing down the proof tree for this term
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
