Calling enum_monomial with the following parameters: degree:2 type environment : x0:ty0^1, x2:ty2^1, x1:ty2^{-1}*ty0^1 (ctenv is empty) typ:ty0 \* 2 returns the following monomials: x0^2, x0, x1^2 However, x1^2 have the type ty2^{-2}*ty0^2, which has an incorrect type.