Status: Started
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3095 by ronan.l...@gmail.com: Set.contains should behave symbolically
http://code.google.com/p/sympy/issues/detail?id=3095

ATM, Set.contains is inconsistent in its symbolic vs concrete semantics. Things like Interval(0 ,1).contains(x) return the expected symbolic result (x ≥ 0 ∧ x ≤ 1), but FiniteSet(0).contains(x) returns False, which is inconsistent with the former result. Additionally, the docstring claims that Set.contains is equivalent to using 'in', which is nonsense since 'in' is constrained to return a builtin bool.

So, I think that the method should behave in a way that is clearly symbolic, operating only on sympy objects and returning only sympy objects (specifically Booleans, when issue 2531 is solved).

Note that this requires in particular that all args of all Sets are instances of Basic, cf. issue 2070.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-issues@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to