Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

If you want to compute with polynomials, you should rather use polynomial variables:

sage: s = polygen(QQ,'s')
sage: z = polygen(QQ,'z')
sage:  g1=1+s^2 ; g2=g1(s=1/(z-1) ) ; g2
(z^2 - 2*z + 2)/(z^2 - 2*z + 1)

This means using polygen instead of var. You also have to choose a coefficient field.