Source: https://www.rocq.inria.fr/secret/Anne.Canteaut/COURS_C/cours.pdf