Question: 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. (Hint: the final result of typechecking each expression can be checked with the provided "readTypecheck" function in LambdaTypecheck.hs.)

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)

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!