Solutions in F#
2. (i) Give terms tı, t2, ..., t5 such that the following derivation makes sense in the polymorphic lambda-calculus, where X is a type and I = x : X, f :(VZ.X + 2 → Z), y: X. : TFf:VZ. X + 2 + Z TEti:X + X + X TEX:X TEt2:X + X Try:X x : X, f :(VZ. X → Z → Z), y: X Ft3 : X :X, f : (VZ.X+Z+Z)- tả : X + X x :X Ft5 : (VZ. X + 2 + 2) + X + X : . (ii) Give a term to that can be given the type VZ. X + 2 + Z in the polymorphic lambda-calculus. (You do not need to give the derivation.)
(* ANSWER 2 HERE: (i) t1 = t2 = t3 = t4 = t5 = (ii) t6 = *)
Solutions in F#
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am