Source: https://perso.math.univ-toulouse.fr/tlabopin/files/2014/01/TP2.pdf