Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium Sets
New issue 3231 by [email protected]: Intersections of TransformationSets
with monotonic expressions
http://code.google.com/p/sympy/issues/detail?id=3231
Being able to intersect two sets is a fundamental and well used operation
with the sets module.
Transformation sets look like the following
ts = TransformationSet(Lambda(x, x**2), S.Naturals)
We don't yet have a good way to intersect transformation sets with other
sets
ts.intersect(Interval(0, 10))
Because in general the Lambda could be quite ill behaved.
However if the expression is relatively simple it may be that we can find
solutions. For example it is obvious that in the above case the expression
ts.intersect(Interval(0, 10)) == FiniteSet(1, 4, 9)
We know this because, over the range of the Naturals the expression is
monotonic. This allows us to iterate over the Naturals until we are outside
the bounds of the base intersected set and then stop.
It would be nice to implement an _intersect method for TransformationSets
that returned something non-trivial for some simple cases.
--
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.