2008/9/2 Jason Merrill <[EMAIL PROTECTED]>:
>
> Be careful with bool. It will return False for equations that may be
> true. Simple example:
>
> sage: bool(x == 0)
> False
>
> I believe in some cases it will return False for equations that are
> actually True if sage doesn't know how to make the
Be careful with bool. It will return False for equations that may be
true. Simple example:
sage: bool(x == 0)
False
I believe in some cases it will return False for equations that are
actually True if sage doesn't know how to make the necessary
simplifications. But if it returns True, you can
On Sep 2, 8:19 am, "John Cremona" <[EMAIL PROTECTED]> wrote:
> Putting == between two symbol expressions creates a symbolic equation,
> not a test for equality. There is there fore a difference between
> these:
>
> sage: 3 == 3
> True
> sage: x == x
> x == x
In the same category as the latter:
Putting == between two symbol expressions creates a symbolic equation,
not a test for equality. There is there fore a difference between
these:
sage: 3 == 3
True
sage: x == x
x == x
This behaviour of == is (I think) unique to the symbolic ring in Sage.
You can test for equality like this:
sag