For details, see Adda (2016) and Section 3.2.