Comment #10 on issue 1887 by asmeurer: Separate boolean and symbolic
relationals
http://code.google.com/p/sympy/issues/detail?id=1887
Of course bool(Le) should work. That's part of what I meant when I said it
should convert to the boolean type automatically.
Consider the main uses of <. I think that most people will use it in the
symbolic sense, like solve(x**2 > x, x). We can easily convert it to the
boolean type if the user says assume(x > 0). But consider especially that
if we follow your suggestion to automatically rewrite a > b as a - b > 0
(for the boolean inequality), then it will not be so easy to convert the
boolean inequality to a symbolic inequality, because you will have lost the
information about which parts of the expression were on which side of the
inequality.
By the way, another thing that bothers me about the inequalities that we
might as well fix when we fix this is the way that Ge() is automatically
converted to Le(). This leads to things like 0 < x when the user entered x
0, which looks bad and is confusing. Of course, internally, they could
be store the same (or maybe we could just have properties of all the
comparative inequalities like .smaller_part and .large_part (except better
names than that), and just use those everywhere.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.