ConditionSet no. Sets are not the same thing as booleans. A set is a
collection of objects. A boolean should be replaceable with true or
false. ConditionSet(x, x > 1, {1, 2, 3}) is the same thing as {2, 3},
which does not make sense as true or false. Sets can be constructed
from booleans and visa versa, but it's cleanest to keep them as
separate types.

AppliedPredicate yes (and it appears that it does), since something
like Q.positive(x) is indeed a boolean that can be used in boolean
contexts.

Aaron Meurer

On Mon, Oct 16, 2017 at 9:23 PM, Chris Smith <smi...@gmail.com> wrote:
> Can someone comment on whether it makes sense to think of ConditionSet and
> AppliedPredicate as being instances of Boolean? Or does it make more sense
> to think, for example, of ConditionSet as a function that returns a Boolean
> result? In the work that I am doing on Piecewise, Relational and
> BooleanFunction, it has struck me as odd to have to deal with these in some
> of the same ways that I would have to deal with And, Or and Not. What
> features do we gain that are useful by subclassing from Boolean?
>
> Thanks for any insights,
> /c
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+unsubscr...@googlegroups.com.
> To post to this group, send email to sympy@googlegroups.com.
> Visit this group at https://groups.google.com/group/sympy.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/sympy/3542cabe-a6b4-4ad2-908d-bd294c468192%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To post to this group, send email to sympy@googlegroups.com.
Visit this group at https://groups.google.com/group/sympy.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/CAKgW%3D6LpgOFxFM0bboD3ADhXc74XAY0WFF6PL9TJkQPcGTbmNQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to