On Tue, 18 Dec 2012 09:16:05 +0100
Burcin Erocal <bur...@erocal.org> wrote:

> This was indeed intentional at the time. When writing the "new
> symbolics" code based on pynac, William and I thought that this
> behavior was the one that led to least confusion.
> 
> Working with expression trees that involve relational objects can be
> confusing:
> 
> > f = x < y;
> x<y
> > -5*f;
> -5*(x<y)
> > sin(-5*f) + x^2;
> x^2+sin(-5*(x<y))
> 
> If arithmetic with relational objects is left unevaluated as above, we
> have no well established interface to work with these expressions. So
> we chose the simple solution...
> 
> 
> This decision led to a lot more confusion than expected and there was
> an agreement to change it quite a while ago:
> 
> http://trac.sagemath.org/sage_trac/ticket/7660
> 
> It should just be a matter of removing the block starting with
> 
> if is_a_relational(left._gobj):
> 
> in the _mul_, _add_, etc. methods of
> sage.symbolic.expression.Expression. Patches are welcome.

I posted a prototype patch on the ticket. Please try it out and comment
on the ticket.

http://trac.sagemath.org/sage_trac/ticket/7660#comment:12


Cheers,
Burcin

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To post to this group, send email to sage-devel@googlegroups.com.
To unsubscribe from this group, send email to 
sage-devel+unsubscr...@googlegroups.com.
Visit this group at http://groups.google.com/group/sage-devel?hl=en.


Reply via email to