>
> Another way to think of this: subs is basically just mapping through
> some kind of homomorphism.
Yes. It is (a partially defined) homomorfism from a (categorically)
free
object to something else.

Freeness is the key here. So the following is somewhat confusing in my
current implementation.

sage: s=NumberField(x^2+1,'s').gen()
sage: (1+s).subs(s=1)
s + 1

The substitution rightfully does not happen as s is not a free
variable (there is no __call__ method).
Maybe an exception should be raised in the following case: the element
has no __call__ method but a ParentWithGens.
and some of the variables to be substituted are among the generators.
But perhaps
this makes subs too expensive for a rather small gain in usability.

Michel


--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to