Source: http://www.gm.univ-montp2.fr/IMG/pdf/TP2-magma.pdf