Power Sets

The PowerSet constructor returns a structure comprising the subsets of a given structure R; it is mainly useful as a parent for other set and sequence constructors. The only operations that are allowed on power sets are printing, testing element membership, and coercion into the power set (see the examples below).

Contents

PowerSet(R) : Str -> PowSetEnum
The structure comprising all enumerated subsets of structure R.
PowerIndexedSet(R) : Str -> PowSetIndx
The structure comprising all indexed subsets of structure R.
PowerMultiset(R) : Str -> PowSetMulti
The structure consisting of all submultisets of the structure R.
PowerFormalSet(R) : Str -> PowSetIndx
The structure comprising all formal subsets of structure R.
S in P : SetEnum, PowSetEnum -> BoolElt
Returns true if enumerated set S is in the power set P, that is, if all elements of the set S are contained in or coercible into R, where P is the power set of R; false otherwise.
S in P : SetIndx, PowSetIndx -> BoolElt
Returns true if indexed set S is in the power set P, that is, if all elements of the set S are contained in or coercible into R, where P is the power set of R; false otherwise.
S in P : SetMulti, PowSetMulti -> BoolElt
Returns true if multiset S is in the power set P, that is, if all elements of the set S are contained in or coercible into R, where P is the power set of R; false otherwise.
P ! S : PowSetEnum, SetEnum -> SetEnum
Return a set with universe R consisting of the elements of the set S, where P is the power set of R. An error results if not all elements of S can be coerced into R.
P ! S : PowSetIndx, SetIndx -> SetIndx
Return an indexed set with universe R consisting of the elements of the set S, where P is the power indexed set of R. An error results if not all elements of S can be coerced into R.
P ! S : PowSetMulti, SetMulti -> SetMulti
Return a multiset with universe R consisting of the elements of the set S, where P is the power multiset of R. An error results if not all elements of S can be coerced into R.

Example Set_PowerSet (H10E6)

> S := { 1 .. 10 };
> P := PowerSet(S);
> P;
Set of subsets of { 1 .. 10 }
> F := { 6/3, 12/4 };
> F in P;
true
> G := P ! F;
> Parent(F);
Set of subsets of Rational Field
> Parent(G);
Set of subsets of { 1 .. 10 }

The Cartesian Product Constructors

Using car< > and CartesianProduct( ), it is possible to create the Cartesian product of sets (or, in fact, of any combination of structures), but the result will be of type `Cartesian product' rather than set, and the elements are tuples --- we refer the reader to Chapter TUPLES AND CARTESIAN PRODUCTS for details.

V2.28, 13 July 2023