This function computes the minimum of the degrees of monomials appearing in p. It gives infinity if p is zero.
i1 : R= ZZ[x,y] o1 = R o1 : PolynomialRing
i2 : valuation(x^2+y) o2 = 1
i3 : valuation(0_R) o3 = infinity o3 : InfiniteNumber