diff(f,g) or diff(P) or diff(P,i)
The second use, less common but sometimes useful, is to compute the difference polynomial of a Hilbert polynomial.
The arguments can also be ring elements or vectors.






The object diff is a method function.