Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need to use Coq functional programming language to solve below question: (k) Prove that for any n, plus n one = succ n. (3 points)
Need to use Coq functional programming language to solve below question:
(k) Prove that for any n, plus n one = succ n. (3 points)
(l) Prove that for any n and m, mult n (succ m) = plus (mult n m) n. (3 points)
Problem 3 (37 points). Alonzo Church has proposed an encoding for natural numbers in pure \-calculus, as follows: A natural number n can be encoded as a higher order function that receives a function f and an argument x, and applies f to x, n number of times, denoted by fx. For example, 04 If.lx.x 14 If..x.fx 24 f. dr.f (f) 34 f.dr.ff (fr)) n A X.X.r.f"c. Extending pure l-calculus with polymorphic data types, gives a polymorphic type equivalent for natural numbers according to this encoding: Nat 4 VX(X + X) + X X, where X is a type variable. Problem 3 (37 points). Alonzo Church has proposed an encoding for natural numbers in pure \-calculus, as follows: A natural number n can be encoded as a higher order function that receives a function f and an argument x, and applies f to x, n number of times, denoted by fx. For example, 04 If.lx.x 14 If..x.fx 24 f. dr.f (f) 34 f.dr.ff (fr)) n A X.X.r.f"c. Extending pure l-calculus with polymorphic data types, gives a polymorphic type equivalent for natural numbers according to this encoding: Nat 4 VX(X + X) + X X, where X is a type variableStep by Step Solution
There are 3 Steps involved in it
Step: 1
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