For many domains D, there are functions that construct certain subsets S
of D as domains with parent (see Parents) already set to D.
For example, if G is a group that contains the elements in the list gens
then Subgroup( G, gens ) returns a group S that is generated by the
elements in gens and with Parent( S ) = G.
Substruct( D, gens ) F
More general, if D is a domain whose algebraic structure is given by the
function Struct (for example Group, Algebra, Field)
then the function Substruct (for example Subgroup, Subalgebra,
Subfield) returns domains with structure Struct and parent set to
the first argument.
SubstructNC( D, gens ) F
Each function Substruct checks that the Struct generated by
gens is in fact a subset of D.
If one wants to omit this check then one can call SubstructNC instead;
the suffix NC stands for ``no check''.
AsSubstruct( D, S ) F
first constructs Asstruct( [info, ]S ),
where info depends on D and S,
and then sets the parent (see Parents) of this new domain to D.
IsSubstruct( D, S ) F
There is no real need for functions that check whether a domain S is a
Substruct of a domain D,
since this is equivalent to the checks whether S is a Struct and S
is a subset of D.
Note that in many cases, only the subset relation is what one really wants
to check, and that appropriate methods for the operation IsSubset
(see IsSubset) are available for many special situations,
such as the test whether a group is contained in another group,
where only generators need to be checked.
If a function IsSubstruct is available in GAP then it is implemented
as first a call to IsStruct for the second argument and then a call to
IsSubset for the two arguments.
[Top] [Previous] [Up] [Next] [Index]
GAP 4 manual