Retrieve#

The function described here restores an element of a coproduct to its original state.

Retrieve(x): CopElt -> Elt#

Given an element \(x\) of some coproduct \(C\), return the element as an element of the structure that formed its parent before it was mapped into \(C\).

Example: cop (ex-13536c)#

We illustrate basic uses of the coproduct constructors and functions.

> C := cop<IntegerRing(), Strings()>;
> x := C ! 5;
> y := C ! "abc";
> x;
5
> y;
abc
> Parent(x);
Coproduct<Integer Ring, String structure>
> x eq 5;
true
> x eq y;
false
> Retrieve(x);
5
> Parent(Retrieve(x));
Integer Ring

Run in calculator