| 1 | initial version |
This looks like a bug, or at least odd behavior.
sage: B = FunctionField(QQ,'z')
sage: B.inject_variables()
Defining z
sage: g = z
sage: g.subs(z=z^3)
z
sage: g(z) = z
sage: g.subs(z=z^3)
z |--> z^3
sage: g = z
sage: g.subs(z=z^3)
z^3
Indeed, this also works:
sage: B = FunctionField(QQ,'z')
sage: B.inject_variables()
Defining z
sage: h(z) = z
sage: g = z
sage: g.subs(z=z^3)
z^3
I don't know why defining a symbolic function "activates" subs like this.
| 2 | No.2 Revision |
This looks like a bug, or at least odd behavior.Edit: this is not an answer to the question, but together with the comments below, it may be useful, so I will leave it here.
sage: B = FunctionField(QQ,'z')
sage: B.inject_variables()
Defining z
sage: g = z
sage: g.subs(z=z^3)
z
sage: g(z) = z
sage: g.subs(z=z^3)
z |--> z^3
sage: g = z
sage: g.subs(z=z^3)
z^3
Indeed, this This also works:"works":
sage: B = FunctionField(QQ,'z')
sage: B.inject_variables()
Defining z
sage: h(z) = z
sage: g = z
sage: g.subs(z=z^3)
z^3
I don't know why defining a symbolic function "activates" subs like this.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.