Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

For each of the following simply-typed applied lambda calculus expressions, give a typing derivation or show that the expression is ill-typed by showing that there

For each of the following simply-typed applied lambda calculus expressions, give a typing derivation or show that the expression is ill-typed by showing that there can't exist a typing derivation for it.

a) if (if true then false else true) then false else true

b) (x: num). x + x * 3

c) (a: bool). if a then 1 else a

d) ((f: num -> bool) (a: num). if f a then a + 1 else a + 2) ((x: num). false)

HINT:

image text in transcribed

Please, TYPE the answer CLEARLY with some explanation if possible.

All typing rules (so far) T-Boo1 T-Num T-Var n : num el : num Fe, : num T-Plus T-Times (e1 + e2) : num 2 T-If (if e1 then e2 else e3) : t T-Lam T-App r - (e, e2 All typing rules (so far) T-Boo1 T-Num T-Var n : num el : num Fe, : num T-Plus T-Times (e1 + e2) : num 2 T-If (if e1 then e2 else e3) : t T-Lam T-App r - (e, e2

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 And Hadoop Fundamentals Tools And Techniques For Data Driven Success

Authors: Mayank Bhushan

2nd Edition

9355516665, 978-9355516664

More Books

Students also viewed these Databases questions

Question

Group Size and Communication

Answered: 1 week ago

Question

Understanding Group Roles

Answered: 1 week ago