Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help with the following lambda encoding questions: General untyped lambda calculus rules found here: https://cs.gmu.edu/~marks/463/h/rules.html not-a . (a false) true (15%) Using Encodings Given

Please help with the following lambda encoding questions:

General untyped lambda calculus rules found here: https://cs.gmu.edu/~marks/463/h/rules.html

image text in transcribed

not-a . (a false) true (15%) Using Encodings Given the definitions above, reduce these given expressions to get back to an encoded true or false value try to not expand the definitions until they need to be used as functions, e.g. don't immediately expand true just because it's in the expression, but only when it's used as a function. Also indicate whether the given expression would typecheck in a normal boolean expressions language. Since we are encoding boolean logic but not type checking it, it's possible we use the encodings a bit carelessly! You can answer "does typecheck" or "wouldn't typecheck" for this portion of your answers you may skip listing the applied rules; just do a single step of evaluation at a time. Please underline what is being simplified to get the next line: o for E-App-Abs, underline the lambda's parameter, the lambda's body, and the supplied value-argument. o for rules like E-If-True, underline the whole if-term and double-underline the true and then-branch pieces. Just try to make it clear what's being substituted, it doesn't have to be exactly this. ( (and tru)e true) (or (not false)) false) (((and true) not) true ) not-a . (a false) true (15%) Using Encodings Given the definitions above, reduce these given expressions to get back to an encoded true or false value try to not expand the definitions until they need to be used as functions, e.g. don't immediately expand true just because it's in the expression, but only when it's used as a function. Also indicate whether the given expression would typecheck in a normal boolean expressions language. Since we are encoding boolean logic but not type checking it, it's possible we use the encodings a bit carelessly! You can answer "does typecheck" or "wouldn't typecheck" for this portion of your answers you may skip listing the applied rules; just do a single step of evaluation at a time. Please underline what is being simplified to get the next line: o for E-App-Abs, underline the lambda's parameter, the lambda's body, and the supplied value-argument. o for rules like E-If-True, underline the whole if-term and double-underline the true and then-branch pieces. Just try to make it clear what's being substituted, it doesn't have to be exactly this. ( (and tru)e true) (or (not false)) false) (((and true) not) true )

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Big Data Fundamentals Concepts, Drivers & Techniques

Authors: Thomas Erl, Wajid Khattak, Paul Buhler

1st Edition

0134291204, 9780134291208

More Books

Students also viewed these Databases questions

Question

How would a TM strategy help this company?

Answered: 1 week ago

Question

5. How do instructional objectives help learning to occur?

Answered: 1 week ago

Question

4. Help trainees set challenging mastery or learning goals.

Answered: 1 week ago