Source: https://perso.utinam.cnrs.fr/~viennot/doc/APLF.pdf