Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If I correctly understand the Macaulay2 command you provide, you can mimick the same behavior in SageMath as follows:

sage: T = TermOrder("wdeglex", (1,2))
sage: R = PolynomialRing(QQ, 'x,y', order=T)
sage: R
Multivariate Polynomial Ring in x, y over Rational Field
sage: x,y = R.gens()
sage: (x*y).degree()
3

You can find more informations on term orders in the documentation [1]. Several weighted term orders are available.

[1] http://doc.sagemath.org/html/en/reference/polynomial_rings/sage/rings/polynomial/term_order.html