Domains are often constructed relative to other domains. The probably most usual case is to form a subset of a domain, for example the intersection (see Intersection) of two domains, or a Sylow subgroup of a given group (see SylowSubgroup).
In such a situation, the new domain can gain knowledge by exploiting that several attributes are maintained under taking subsets. For example, the intersection of an arbitrary domain with a finite domain is clearly finite, a Sylow subgroup of an abelian group is abelian, too, and so on.
Since usually the new domain has access to the knowledge of the old domain(s) only when it is created (see Constructing Subdomains for the exception), this is the right moment to take advantage of the subset relation.
Analogous relations occur when a factor structure is created from a domain and a subset, and when a domain isomorphic to a given one is created.
UseSubsetRelation( super, sub ) O
Methods for this operation transfer possibly useful information from the domain super to its subset sub, and vice versa.
UseSubsetRelation is designed to be called automatically
whenever substructures of domains are constructed.
So the methods must be cheap, and the requirements should be as
sharp as possible!
To achieve that all applicable methods are executed, all methods for
this operation except the default method must end with TryNextMethod().
This default method deals with the information that is available by
the calls of InstallSubsetMaintenance in the GAP library.
gap> g:= Group( (1,2), (3,4), (5,6) );; h:= Group( (1,2), (3,4) );; gap> IsAbelian( g ); HasIsAbelian( h ); true false gap> UseSubsetRelation( g, h );; HasIsAbelian( h ); IsAbelian( h ); true true
UseIsomorphismRelation( old, new ) O
Methods for this operation transfer possibly useful information from the domain old to the isomorphic domain new.
UseIsomorphismRelation is designed to be called automatically
whenever isomorphic structures of domains are constructed.
So the methods must be cheap, and the requirements should be as
sharp as possible!
To achieve that all applicable methods are executed, all methods for
this operation except the default method must end with TryNextMethod().
This default method deals with the information that is available by
the calls of InstallIsomorphismMaintenance in the GAP library.
gap> g:= Group( (1,2) );; h:= Group( [ [ -1 ] ] );; gap> Size( g ); HasSize( h ); 2 false gap> UseIsomorphismRelation( g, h );; HasSize( h ); Size( h ); true 2
UseFactorRelation( numer, denom, factor ) O
Methods for this operation transfer possibly useful information from the
domain numer or its subset denom to the domain factor that
is isomorphic to the factor of numer by denom, and vice versa.
denom may be fail, for example if factor is just known to be a
factor of numer but denom is not available as a GAP object;
in this case those factor relations are used that are installed without
special requirements for denom.
UseFactorRelation is designed to be called automatically
whenever factor structures of domains are constructed.
So the methods must be cheap, and the requirements should be as
sharp as possible!
To achieve that all applicable methods are executed, all methods for
this operation except the default method must end with TryNextMethod().
This default method deals with the information that is available by
the calls of InstallFactorMaintenance in the GAP library.
gap> g:= Group( (1,2,3,4), (1,2) );; h:= Group( (1,2,3), (1,2) );; gap> IsSolvableGroup( g ); HasIsSolvableGroup( h ); true false gap> UseFactorRelation( g, Subgroup( g, [ (1,2)(3,4), (1,3)(2,4) ] ), h );; gap> HasIsSolvableGroup( h ); IsSolvableGroup( h ); true true
The following functions are used to tell GAP under what conditions
an attribute is maintained under taking subsets,
or forming factor structures or isomorphic domains.
This is used only when a new attribute is created,
see Creating Attributes and Properties in ``Programming in GAP''.
For the attributes already available, such as IsFinite and IsCommutative,
the maintenances are already notified.
InstallSubsetMaintenance( opr, super_req, sub_req ) F
opr must be a property or an attribute.
The call of InstallSubsetMaintenance has the effect that
for a domain D in the filter super_req, and a domain S in the
filter sub_req,
the call UseSubsetRelation( D, S ) (see UseSubsetRelation)
sets a known value of opr for D as value of opr also for S.
A typical example for which InstallSubsetMaintenance is applied
is given by opr = IsFinite,
super_req = IsCollection and IsFinite,
and sub_req = IsCollection.
If opr is a property and the filter super_req lies in the filter
opr then we can use also the following inverse implication.
If D is in the filter whose intersection with opr is super_req
and if S is in the filter sub_req, S is a subset of D, and
the value of opr for S is false
then the value of opr for D is also false.
InstallIsomorphismMaintenance( opr, old_req, new_req ) F
opr must be a property or an attribute.
The call of InstallIsomorphismMaintenance has the effect that
for a domain D in the filter old_req, and a domain E in the
filter new_req,
the call UseIsomorphismRelation( D, E )
(see UseIsomorphismRelation)
sets a known value of opr for D as value of opr also for E.
A typical example for which InstallIsomorphismMaintenance is
applied is given by opr = Size,
old_req = IsCollection, and new_req = IsCollection.
InstallFactorMaintenance( opr, numer_req, denom_req, factor_req ) F
opr must be a property or an attribute.
The call of InstallFactorMaintenance has the effect that
for collections N, D, F in the filters numer_req, denom_req,
and factor_req, respectively,
the call UseFactorRelation( N, D, F )
(see UseFactorRelation)
sets a known value of opr for N as value of opr also for F.
A typical example for which InstallFactorMaintenance is
applied is given by opr = IsFinite,
numer_req = IsCollection and IsFinite, denom_req = IsCollection,
and factor_req = IsCollection.
For the other direction, if numer_req involves the filter opr
then a known false value of opr for F implies a false
value for D provided that D lies in the filter obtained from
numer_req by removing opr.
Note that an implication of a factor relation holds in particular for the
case of isomorphisms.
So one need not install an isomorphism maintained method when
a factor maintained method is already installed.
For example, UseIsomorphismRelation (see UseIsomorphismRelation)
will transfer a known IsFinite value because of the installed factor
maintained method.
[Top] [Previous] [Up] [Next] [Index]
GAP 4 manual