Exercise 2.3 resolved