Hmmm... Uting TLAs :

sage: sqrt(4-4*x).simplify()
sqrt(-4*x + 4)
sage: sqrt(4-4*x).simplify_full()
sqrt(-4*x + 4)
sage: sqrt(4-4*x).canonicalize_radical()
2*I*sqrt(x - 1)

WTF ? BTW :

sage: bool(sqrt(4-4*x)==2*sqrt(1-x))
False
sage: bool((sqrt(4-4*x)/(2*sqrt(1-x)))==1)
False
sage: bool((sqrt(4-4*x)/(2*sqrt(1-x))).canonicalize_radical()==1)
True

QED. HTH,

--
Emmanuel Charpentier

Le lundi 3 juillet 2017 12:00:03 UTC+2, LudJam a écrit :
>
> I think I discovered a case where bool() of a symbolic expression returns 
> false while it is true :
>
> bool(sqrt(-4*x+4)==sqrt(-x+1)*2)
> >>false
>
> I think the problem is that sage can't manage to simplify sqrt(-4*x+4) 
> in sqrt(-x+1)*2
>
> sqrt(-4*x+4).full_simplify()
> >>sqrt(-4*x+4)
>
> P.S. : I tried with the assumption assume(x<1) but it doesn't changed 
> anything...
>
> Le mercredi 2 avril 2008 23:42:15 UTC+2, Jason Grout a écrit :
>>
>> Timothy Clemans wrote:
>> > +1
>> > 
>> > On Wed, Apr 2, 2008 at 12:12 PM, Jason Grout
>> > <jason...@creativetrax.com> wrote:
>> >>  Currently, False is returned when bool() is called on a 
>> SymbolicEquation
>> >>   when the equation is really false *or* when it is not known whether 
>> it
>> >>  is true or false.  This, of course, makes a return value of False 
>> pretty
>> >>  meaningless.
>> >>
>> >>  Can I change this (per cwitty's suggestion) so that if it is not known
>> >>  if a SymbolicEquation is false or true, an error is thrown?
>> >>
>> >>  i.e.:
>> >>
>> >>  sage: bool(x<x+1)
>> >>  True
>> >>  sage: bool(x>x+1)
>> >>  False
>> >>  sage: var('y')
>> >>
>> >>  ***CURRENTLY***
>> >>  sage: bool(x<y)
>> >>  False
>> >>
>> >>  ***Proposed***
>> >>  sage: bool(x<y)
>> >>  Error is thrown
>>
>>
>> This is now #2781.  A preliminary patch is up there now.
>>
>> Jason
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to