This is exercise 13 from the exercises at the end of the precourse