This homework is due on Monday, 7 March. 1. (Trivial) In lecture notes 7, we claimed that the Type Safety Theorem followed from the Preservation and Progress Lemmas. Prove that this is the case. 2. (Boring, but important) In lecture notes 7, we proved the Preservation Lemma by appealing to the Substitution Lemma. Complete the proof by proving the Substitution Lemma. 3. (Trivial) Give a large-step, call-by-name operational semantics for the lambda calculus. 4. Prove that the small-step and large-step call-by-value operational semantics coincide. That is, prove: a) e => v' implies e ->* v' b) e ->* v' implies e => v' 5. Prove the Normalization Theorem for the call-by-name operational semantics. 6. (Trivial) Pierce proves normalization using the following logical predicates and lemma: E'[int] = { e | |- e : int and e ->* v } E'[t1 -> t2] = { e | |- e : t1 -> t2 and e ->* v and All e' in E'[t1]. e e' in E'[t2] } Lemma: If G |- e : t and g in G[G], then g(e) in E'[t]. Show that Pierce's definitions are equivalent to the ones used in lecture notes 8; i.e., prove that forall t, E[t] = E'[t]. Hint: There is an easy proof and a hard proof. 7. Consider extending the simply-typed lambda calculus with a fix combinator: e := ... | fix e small-step: (FixBeta) fix (\x:ta. e') -> e'[fix (\x:ta. e') / x'] e -> e' (FixArg) ----------------- fix e -> fix e' large-step: e => \x:ta. e' e'[fix (\x:ta. e') / x'] => v (FixBeta) ------------------------------------------------ fix e => v typing-rule: G |- e : t -> t (Fix) ----------------- G |- fix e : t Clearly, the extended language is no longer normalizing, as the well-typed expression D = fix (\x:int. x) diverges. Briefly explain where the proof of the Normalization breaks for this extended language.