> < ^ Date: Mon, 26 Apr 1993 14:01:30 +0200
> < ^ From: Martin Schoenert <martin.schoenert@math.rwth-aachen.de >
< ^ Subject: Re: Subgroup(Parent(g),elts)
David Sibley writes in his e-mail message of 1993/04/25:

I just discovered an oddity in GAP and am trying to figure out why it is
the way it is: Subgroup(g,elts) works only when g is a parent group.

As far as I can see, this means that when I write programs, where I
don't know whether g is going to be a parent group or not, I should
actually use Subgroup(Parent(g),elts) instead of the above. But why
does Subgroup not automatically use the parent of g, if that's what it
needs, rather than making me explicitly say to use it? Or am I going
to get into trouble using Subgroup(Parent(g),elts)?

Each group is either a parent or a subgroup of a parent. The idea is
that the parent may hold information that is needed for the subgroups.
For example for finitely presented groups the parent holds the
presentation. Thus subgroups must be subgroups of a parent, they cannot
be subgroups of other subgroups (because those subgroups would not hold
the information needed).

Put another way, a parent is a structure in which computations are
performed, and GAP allows only few operations between subgroups of
different parents (basically only the set theoretic functions
'Intersection' etc.).

That 'Subgroup' requires a parent as first argument is a reminder to this
fact. It is true, 'Subgroup' could automatically take the parent of the
first argument, but we found the current behaviour usefull. It helped us
catch a few bugs, where we though a certain group was a parent, when in
fact it was not.

'Subgroup( Parent(g), elts )' should not cause any problems. In fact,
such a construct appears fairly often in the library.


-- .- .-. - .. -.  .-.. --- ...- . ...  .- -. -. .. -.- .-
Martin Sch"onert,   Martin.Schoenert@Math.RWTH-Aachen.DE,  +49 241 804551
Lehrstuhl D f"ur Mathematik, Templergraben 64, RWTH, D 51 Aachen, Germany

> < [top]