> < ^ Date: Thu, 26 Aug 1999 21:11:47 +0200
> ^ From: Sergio Polini <s.polini@mclink.it >
^ Subject: Relations: how to...?

Hi! I'm Sergio. Goog GAP to all of you :-)
I'm in trouble, of course. I can't build any relations.
I suppose that I cannot write something like:

gap> GeneralMappingByRelation(A, B, a <= b);

However, I can't understand GeneralMappingByElements(S, R, elems).
No example :-(
"elems" should be a collection of tuples; how can I build one?
How could I build a Tuple?
For example:

gap> A := [1,2,3];;
gap> T := UnorderedTuples(A, 2);
[ [ 1, 1 ], [ 1, 2 ], [ 1, 3 ], [ 2, 2 ], [ 2, 3 ], [ 3, 3 ] ]  
gap> IsCollection(T);
true
gap> IsTuple(T[1]);
false

What?!? UnorderedTuples "returns the set of all unordered tuples of
length k of the set set." T is a collecton, but it is not a collection
of tuples. Is it? Moreover, IsTuple is not documented: there is just a
dangling reference (``badlink:ref:istuple'' in CHAP029.htm,
``see~"IsTuple"'' in mapping.tex. BTW: I'm using gap4r1 fix1).

Another try:

gap> A := [1, 2, 3];;
gap> GeneralMappingByElements(Integers, Integers, UnorderedTuples(A,
2));
Error <elms> must be a collection of tuples or empty .....

Could anybody please help me?

Thanks

----------------------------------------------------------------------
Sergio Polini                   "The box said 'Requires Windows 95, NT
e-mail : s.polini@mclink.it         or better.' So I installed Linux."
PGP key: http://members.tripod.it/spolini/pgpkey.html

> < [top]