Moe seriously : the introduction of (some form) of three-valued 
(interpretation of) logic in Sage has been discussed *ad nauseam* on this 
list since the idea was introduced nine years ago.

As seen by a relatively newbie, a general consensus seems to be that this 
would entail a (very long) review of ALL logic in Sage. No one seems to 
have 1) proposed a realistic working plan for this (short of "Let's rewrite 
Sage" (and, traditionally, "Let's rewrite Sage in Lisp" on Apr 1st...;-)) 
AND 2) convinced enough other Sage developers that his/her plan *was* 
workable.

You might get (some parts of) the discussion(s) by searching for "ternary", 
"three-valued", "Lucaziewicz", "unknown" or "trool" in the Google interface 
(looking for "troll" would point you to *other* unending discussions ;-).

For now, and for the foreseeable future, "True" as an answer to 
"bool(<something>)" means "<something> can be proved true by what is known 
by Sage", and "False" means "<something> can not (yet) be proved true by 
what is known by Sage", which is indeed very different of "<something> can 
be proved false by what is known by Sage".

If you have workable ideas...

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