On Sep 1, 5:27 pm, Sebastian Pancratz <s...@pancratz.org> wrote:

> I don't think this change in code should be used as a band-aid to make
> things work in one of the trac tickets you mentioned earlier.

For the problem that raised all the stuff up I have an alternative
solution (with pros and cons of course)

> On to the next points...  your examples do show that lcm isn't as well
> set up as gcd with respect to the coercion system.  If you're
> implementing gcd/ lcm for field elements already, could you change
> this, too?  (I unfortunately can't claim to understand the coercion
> system well enough to "just do this quickly".)

Yes, that should be corrected, I am looking at this.

> There seems to be another problem suggested by your examples.  Of
> course, if a user does
>
>     sage: x.gcd(y)
>
> then I would think the user wants y to be interpreted as an element of
> the parent of x, if possible.  That is, the operation x.gcd(y) is
> *not* necessarily symmetric.  On the other hand, if a user types
>
>     sage: gcd(x, y)
>
> one might (mistakenly) expect it to be symmetric.  Of course, in
> principle this problems might have come up with many other operations
> which a mathematician would expect to be commutative.  Perhaps a
> solution to this way has been discussed somewhere else already?
> Otherwise, looking at the implementation of addition should give some
> guidelines.

This is considered in the sage.structure.element.pyx through
coerce_bin_op I will carefully read the module.

-- 
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel+unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to