sympy/sympy — pull request #1155 by mrocklin (2012-03-21 16:14:54+00:00)
Title: New sets. TransformationSet, Naturals, Integers

Added Naturals, Integers, and TransformationSet to the sets family

Created a new sets module (which currently holds only these three classes). I'm unsure about this decision. There were three choices
1) Leave everything in core
2) Move everything to new sets module
3) Split sets into core-sets and fancy-sets

TransformationSet requires some non-core functionality so (1) was out. Core functions need simple sets (Interval, FiniteSet) so (2) was out (I tried this). That leave us with a split. I'm open to other suggestions

TransformationSet is a combination of a Lambda and a Set. Currently it only supports contains (using solve). Example:
```
>>> squares = TransformationSet(Lambda(x, x**2), S.Naturals)
>>> L = Lambda((r, th), (r*cos(th), r*sin(th))
>>> halfcircle = TransformationSet(L, Interval(0, 1)*Interval(0, pi))
```

I'm also happy to find a better name for TransformationSet

http://code.google.com/p/sympy/issues/detail?id=2430