Ask Your Question

Revision history [back]

Remove the verbose=False option and you will see the problem ! f is redefined when you call SF.inject_shorthands().

Remove the verbose=False option and you will see the problem ! f is redefined when you call SF.inject_shorthands().

Note that, while f and g are not of the same type, they have the same parent:

sage: parent(f)
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field
sage: parent(g)
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field

And, if you redefine f after it has been overwritten by SF.inject_shorthands(), you get:

sage: f == g
True

sage: f == g True

Remove the verbose=False option and you will see the problem ! problem: f is redefined when you call SF.inject_shorthands(). !

Note that, while f and g are not of the same type, they have the same parent:

sage: parent(f)
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field
sage: parent(g)
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field

And, if you redefine f after it has been overwritten by SF.inject_shorthands(), you get:

sage: f == g
True

sage: f == g True

Remove the verbose=False option and you will see the problem: f is redefined when you call SF.inject_shorthands() !

Note that, while f and g are not of the same type, they have the same parent:

sage: parent(f)
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field
sage: parent(g)
Multivariate Polynomial Ring in x0, x1, x2 over Rational Field

And, if you redefine f after it has been overwritten by SF.inject_shorthands(), you get:

sage: f == g
True

sage: f == g True