Exercise 3.2
Give a full (i.e. not-shortened) derivation in λ2 to show that the following term is legal; use the flag format. (cf. Example 3.1.1 (3).)
$$M ≡λα,β,γ : ∗. λf : α →β. λg : β →γ. λx : α. g(f x)$$
It is worth reviewing the summary of λ2 derivation rules in Figure 3.1.
The following is the derivation in flag format.
By showing there is a context $Γ$ such that $M$ has a type, are have shown $M$ is legal. The context here happens to be empty.