probably this is the same: (rhs - lhs).full_simplify() returns zero for wrong stuff.
On Thu, Aug 01, 2013 at 12:11:06PM +0100, John Cremona wrote: > On 1 August 2013 11:10, chris wuthrich <[email protected]> wrote: > > > > > >> No - because sqrt is multivalued, the answer can be, and in this case is, > >> multivalued: sometimes true and sometimes false. This isn't desperately > >> helpful, or course, and can be cast in other ways in terms of the defect > >> > > If a boolean is "sometimes true and sometimes false" it is false and that is > > what I want sage to give back. Sage does not have "multi-valued booleans" I > > believe. > > I mostly agree, but in the following: > > sage: var('a b') > (a, b) > sage: bool(a==a) > True > sage: bool(a==a+1) > False > sage: bool(a==a*a) > False # bad? it is True for a=0,1 > sage: bool(b*a==a*b) > True > sage: bool((a+b)^2==a^2+2*a*b+b^2) > True > sage: bool(sqrt(a)^2==a) > True #bad? is is False for all a<0 > > I don't like seeing True unless the expression is a tautology, i.e. an > identity, and I don't like seeing False unless it is always false (the > negation of a tautology. This is a different questions from the one > about branches of sqrt. > > I try to avoid using symbolic expressions at all costs because of > things like this. After setting x = a==a+1 os that x has type > sage.symbolic.expression.Expression we have bool(x) is False, but I > don't know how bool(x) is evaluated. The documentation says that > bool(x) returns False because x is not always True, but > bool(x.negation()) is True even though x.negation() is 'a != a^2' > which is *not* always True. So that is surely a bug, anyway. > > John > > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "sage-support" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/sage-support. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/groups/opt_out. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.
