You could also think of it as a comprehension.  In other words,
Isomorpic(Lambda(x, x**2), S.Naturals) is akin to {x**2 for x in
S.Naturals}, to use Python syntax.  Indeed, if the set is finite, this
will give you exactly what you want (in a Python set instead of a
SymPy set) in Python 2.7+.

So maybe this could inspire a better name. It may also make sense to
change the syntax to more closely match this.

Aaron Meurer

On Sun, Mar 18, 2012 at 1:55 PM, Joachim Durchholz <[email protected]> wrote:
> Am 18.03.2012 18:30, schrieb Sergiu Ivanov:
>
>>
>> The problem with Isomorphic is that the resulting set may not actually
>> be isomorphic to the initial set.  Consider (in the current notation):
>>
>>   Isomorphic(Lambda(x, 0), S.Naturals)
>>
>> This constructs {0} from N; definitely {0} is far from being
>> isomorphic to N (in the category of sets).
>>
>> The situation is even clearer in the case of finite sets.  For example,
>>
>>   Isomorphic(Lambda(x, x**2), FiniteSet(-1,1))
>>
>> which constructs {1} from {-1,1}.
>
>
> It's a TransformedSet, maybe?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" 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?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" 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?hl=en.

Reply via email to