Chapter 2.2.4
Exercise 2.52. See the diff