Question: Lambda calculus problem in Programming Language principles and practices 3rd I'm newcomer in lambda calcus. I don't know how to apply Church numbers in the

 Lambda calculus problem in Programming Language principles and practices 3rd I'm

Lambda calculus problem in Programming Language principles and practices 3rd

I'm newcomer in lambda calcus.

I don't know how to apply Church numbers in the successor function.

For example, we need to substitue n with zero(lambda f. lambda x. x) but i don't know how to do next...

Also is it typo that (successor zero) 5 one? what it means?

tl i ll ht true. write car as ( Q.Ay) and cdr as (az. z usual formulas (car (cons a b)) = a and ( (b) s a b))- b are Scheme structor cons cari U ess the integers as lam 3.40 It is a surprising fact bda[2009 Indeed,the list consr ul Ullman provide and Ha The al. [199 ideas pr Ger Rabhi [1 and App Del referenc Inte 3.41 (From Abelson and Sussman (1996]) It is also possible to express the abstractions: These are called Church numbers, after Alonzo Church. (a) Given the following definition of the successor function: of Back significa Steele [1 Common successor n.lf. r.f ((n) x)) show that (successor zero) 5 one and (successor one) 5 two. (b) Generalize (a) to any Church number. (e) Define addition and multiplication for Church numbers. (d) Write out an implementation of your lambda expressions in (C) as pr The [1958], B Jones [19 in Sectior culus and language, and write an output procedure that shows they are correct. 342 Use the lambda expression H (aF.u. Gf ( n 0) 1 (* n (F (-n 1) fact function is a fixed noint of It (E n0) 1 (* n (F (-n I))) and the p interpreter tl i ll ht true. write car as ( Q.Ay) and cdr as (az. z usual formulas (car (cons a b)) = a and ( (b) s a b))- b are Scheme structor cons cari U ess the integers as lam 3.40 It is a surprising fact bda[2009 Indeed,the list consr ul Ullman provide and Ha The al. [199 ideas pr Ger Rabhi [1 and App Del referenc Inte 3.41 (From Abelson and Sussman (1996]) It is also possible to express the abstractions: These are called Church numbers, after Alonzo Church. (a) Given the following definition of the successor function: of Back significa Steele [1 Common successor n.lf. r.f ((n) x)) show that (successor zero) 5 one and (successor one) 5 two. (b) Generalize (a) to any Church number. (e) Define addition and multiplication for Church numbers. (d) Write out an implementation of your lambda expressions in (C) as pr The [1958], B Jones [19 in Sectior culus and language, and write an output procedure that shows they are correct. 342 Use the lambda expression H (aF.u. Gf ( n 0) 1 (* n (F (-n 1) fact function is a fixed noint of It (E n0) 1 (* n (F (-n I))) and the p interpreter

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!