29.3 Constructing Domains

For several operational structures (see Operational Structure of Domains), GAP provides functions to construct domains with this structure. For example, Group returns groups, VectorSpace returns vector spaces etc.

  • Struct( arg1, arg2, ... ) F

    The syntax of these functions may vary, dependent on the structure in question. Usually a domain is constructed as the closure of some elements under the given operations, that is, the domain is given by its generators. For example, a group can be constructed from a list of generating permutations or matrices or whatever is admissible as group elements, and a vector space over a given field F can be constructed from F and a list of appropriate vectors.

    The idea of generation and generators in GAP is that the domain returned by a function such as Group, Algebra, or FreeLeftModule contains the given generators. This implies that the generators of a group must know how they are multiplied and inverted, the generators of a module must know how they are added and how scalar multiplication works, and so on. Thus one cannot use for example permutations as generators of a vector space.

    The function Struct first checks whether the arguments admit the construction of a domain with the desired structure. This is done by calling the operation

  • IsGeneratorsOfStruct( [info, ]gens ) O

    where arglist is the list of given generators and info an argument of Struct, for example the field of scalars in the case that a vector space shall be constructed. If the check failed then Struct returns fail, otherwise it returns the result of StructByGenerators (see below). (So if one wants to omit the check then one should call StructByGenerators directly.)

  • GeneratorsOfStruct( D ) A

    For a domain D with operational structure corresponding to Struct, the attribute GeneratorsOfStruct returns a list of corresponding generators of D. If these generators were not yet stored in D then D must know some generators if GeneratorsOfStruct shall have a chance to compute the desired result; for example, monoid generators of a group can be computed from known group generators (and vice versa). Note that several notions of generation may be meaningful for a given domain, so it makes no sense to ask for ``the generators of a domain''. Further note that the generators may depend on other information about D. For example the generators of a vector space depend on the underlying field of scalars; the vector space generators of a vector space over the field with four elements need not generate the same vector space when this is viewed as a space over the field with two elements.

  • StructByGenerators( [info, ]gens ) O

    Domain construction from generators gens is implemented by operations StructByGenerators, which are called by the simple functions Struct; methods can be installed only for the operations. Note that additional information info may be necessary to construct the domain; for example, a vector space needs the underlying field of scalars in addition to the list of vector space generators. The GeneratorsOfStruct value of the returned domain need not be equal to gens. But if a domain D is printed as Struct([a, b, ...]) and if there is an attribute GeneratorsOfStruct then the list GeneratorsOfStruct( D ) is guaranteed to be equal to [ a, b, ... ].

  • StructWithGenerators( [info, ]gens ) O

    The only difference between StructByGenerators and StructWithGenerators is that the latter guarantees that the GeneratorsOfStruct value of the result is equal to the given generators gens.

  • ClosureStruct( D, obj ) O

    For constructing a domain as the closure of a given domain with an element or another domain, one can use the operation ClosureStruct. It returns the smallest domain with operational structure corresponding to Struct that contains D as a subset and obj as an element.

    [Top] [Previous] [Up] [Next] [Index]

    GAP 4 manual
    February 2000