On Mon, Dec 17, 2012 at 5:32 PM, Travis Scrimshaw <tsc...@ucdavis.edu>wrote:

> Hey Sebastien,
>
> But not for multiplication by a negative number :
>>
>> sage: - (x > 100)
>> -x > -100
>>
>> Do you consider this to be a bug? I would prefer the answer "-x < -100"
>> to preserve the space of solutions. Do you?
>>
>>
> The result is not what I would expect. However, I will let someone more
> versed with the symbolic ring officially call it a bug.
>
> It's also not just negation, but honest multiplication:
>
>    sage: (-1)*(x > 100)
>    -x > -100
>    sage: ZZ(-1)*(x > 100)
>    -x > -100
>    sage: SR(-1)*SR(x > 100)
>    -x > -100
>
> Best,
> Travis
>
>
> --
> 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.
>
>
>

It's hard to tell from the implementation if this behavior is intentional,
unintentional, or a bug. The implementation is just that multiplication
maps over relational operators like ==, <, <=, etc. But I think it's not
possible in the current framework to make multiplication preserve the truth
of a statement, e.g.

if y > 0 is true,
is x*(y > 0) true or false?

You can't decide unless you know more about x. If you want to make
multiplying by elements in SR preserve truth of a statement you have to
decide this.

The same question has come up on ask.sagemath:
http://ask.sagemath.org/question/1656/multiplying-an-inequality-by-1

--
Benjamin Jones

-- 
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