Gröbner bases for mesh relations and applications to compositions of irreducible morphisms — arXiv2