# Power Sequences

The `PowerSequence` constructor returns a structure comprising the enumerated sequences 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 sequences are printing, testing element membership, and coercion into the power sequence (see the examples below).

## `PowerSequence(R): Str -> PowSeqEnum`

The structure comprising all enumerated sequences of elements of structure $R$. If $R$ itself is a sequence (or set) then the power structure of its universe is returned.

## `S in P: SeqEnum, PowSeqEnum -> BoolElt`

Returns `true` if enumerated sequence $S$ is in the power sequence $P$, that is, if all elements of the sequence $S$ are contained in or coercible into $R$, where $P$ is the power sequence of $R$; `false` otherwise.

## `P ! S: PowSeqEnum, SeqEnum -> SeqEnum`

Return a sequence with universe $R$ consisting of the entries of the enumerated sequence $S$, where $P$ is the power sequence of $R$. An error results if not all elements of $S$ can be coerced into $R$.

## `Example: Power Sequence (ex-e8f60b)`

```magma
> S := [ 1 .. 10 ];
> P := PowerSequence(S);
> P;
Set of sequences over [ 1 .. 10 ]
> F := [ 6/3, 12/4 ];
> F in P;
true
> G := P ! F;
> Parent(F);
Set of sequences over Rational Field
> Parent(G);
Set of sequences over [ 1 .. 10 ]

```
