Ask Your Question

Revision history [back]

As you probably know, Sage is built on top of Python, but then it extends Python's syntax. If you're not sure what some non-Python thing does, use the preparse command:

sage: preparse("ratpoly.<t> = PolynomialRing(QQ)")
"ratpoly = PolynomialRing(QQ, names=('t',)); (t,) = ratpoly._first_ngens(1)"

So ratpoly.<t> = PolynomialRing(QQ) creates a polynomial ring with coefficients in the rationals (QQ). The ring itself is called ratpoly, and the generator is called t.