Answered step by step
Verified Expert Solution
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
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
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