Some thougts on cartesian products

Kay Schluehr kay.schluehr at
Tue Jan 24 02:15:29 EST 2006

Christoph Zwerschke wrote:

> Now as I'm thinking about it, wouldn't it be nice to have the cartesian
> products on Python sets? Maybe also a method that returns the power set
> of a set (the set of all subsets), or the set of all subsets with a
> given length.

For defining powersets it might suffice to include sets as exponents.
If A is a set then
Set([0,1])**A is the set of maps from A into {0,1}. The kernels of
those maps ( preimages of 0 in A ) is a subset classifier of A.


More information about the Python-list mailing list