Exercise 3.2 resolved