Source: https://harribey.u-bordeaux.fr/cours/rarete.pdf