Question: Exercise 4 . This is a classic exercise but very important. We will demonstrate how to encode certain notions in Simply Typed Lambda Calculus. Fix
Exercise This is a classic exercise but very important. We will demonstrate how to
encode certain notions in Simply Typed Lambda Calculus. Fix a type a and let be nat
The idea here is to encode each natural number into a term
whose type is nat. For example, the natural number is represented by ;
the natural number by ; and the natural number by
i For each xinV, consider the following recursive definition:
for each ninN. To start, show that for each ninN.
ii For each ninN, we will write to denote the previously typed term
Show that is legal for each ninN.
iii Consider the following previously typed term suc
Show that sum is legal and that suc for each ninN.
iv Consider the following previously typed term:
sum
Show that sum is legal and that for each ninN.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
