Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
| Download
GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it
Project: cocalc-sagemath-dev-slelievre
Views: 4183461[1X7 [33X[0;0YDomains[133X[101X23[33X[0;0Y[13XDomain[113X is [5XGAP[105X's name for structured sets. We already saw examples of domains4in Chapters [14X5[114X and [14X6[114X: the groups [10Xs8[110X and [10Xa8[110X in Section [14X5.1[114X are domains,5likewise the field [10Xf[110X and the vector space [10Xv[110X in Section [14X6.1[114X are domains. They6were constructed by functions such as [2XGroup[102X ([14XReference: Groups[114X) and [2XGF[102X7([14XReference: GF for field size[114X), and they could be passed as arguments to8other functions such as [2XDerivedSubgroup[102X ([14XReference: DerivedSubgroup[114X) and9[2XDimension[102X ([14XReference: Dimension[114X).[133X101112[1X7.1 [33X[0;0YDomains as Sets[133X[101X1314[33X[0;0YFirst of all, a domain [22XD[122X is a set. If [22XD[122X is finite then a list with the15elements of this set can be computed with the functions [2XAsList[102X ([14XReference:16AsList[114X) and [2XAsSortedList[102X ([14XReference: AsSortedList[114X). For infinite [22XD[122X,17[2XEnumerator[102X ([14XReference: Enumerator[114X) and [2XEnumeratorSorted[102X ([14XReference:18EnumeratorSorted[114X) may work, but it is also possible that one gets an error19message.[133X2021[33X[0;0YDomains can be used as arguments of set functions such as [2XIntersection[102X22([14XReference: Intersection[114X) and [2XUnion[102X ([14XReference: Union[114X). [5XGAP[105X tries to return23a domain in these cases, moreover it tries to return a domain with as much24structure as possible. For example, the intersection of two groups is25(either empty or) again a group, and [5XGAP[105X will try to return it as a group.26For [2XUnion[102X ([14XReference: Union[114X), the situation is different because the union27of two groups is in general not a group.[133X2829[4X[32X Example [32X[104X30[4X[25Xgap>[125X [27Xg:= Group( (1,2), (3,4) );;[127X[104X31[4X[25Xgap>[125X [27Xh:= Group( (3,4), (5,6) );;[127X[104X32[4X[25Xgap>[125X [27XIntersection( g, h );[127X[104X33[4X[28XGroup([ (3,4) ])[128X[104X34[4X[32X[104X3536[33X[0;0YTwo domains are regarded as equal w.r.t. the operator [21X[10X=[110X[121X if and only if they37are equal [13Xas sets[113X, regardless of the additional structure of the domains.[133X3839[4X[32X Example [32X[104X40[4X[25Xgap>[125X [27Xmats:= [ [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ],[127X[104X41[4X[25X>[125X [27X [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ] ];;[127X[104X42[4X[25Xgap>[125X [27XRing( mats ) = VectorSpace( GF(2), mats );[127X[104X43[4X[28Xtrue[128X[104X44[4X[32X[104X4546[33X[0;0YAdditionally, a domain is regarded as equal to the sorted list of its47elements.[133X4849[4X[32X Example [32X[104X50[4X[25Xgap>[125X [27Xg:= Group( (1,2) );;[127X[104X51[4X[25Xgap>[125X [27Xl:= AsSortedList( g );[127X[104X52[4X[28X[ (), (1,2) ][128X[104X53[4X[25Xgap>[125X [27Xg = l;[127X[104X54[4X[28Xtrue[128X[104X55[4X[25Xgap>[125X [27XIsGroup( l ); IsList( g );[127X[104X56[4X[28Xfalse[128X[104X57[4X[28Xfalse[128X[104X58[4X[32X[104X596061[1X7.2 [33X[0;0YAlgebraic Structure[133X[101X6263[33X[0;0YThe additional structure of [22XD[122X is constituted by the facts that [22XD[122X is known to64be closed under certain operations such as addition or multiplication, and65that these operations have additional properties. For example, if [22XD[122X is a66group then it is closed under multiplication ([22XD × D → D[122X, [22X(g,h) ↦ g * h[122X),67under taking inverses ([22XD → D[122X, [22Xg ↦ g^-1[122X) and under taking the identity [22Xg[122X[10X^0[110X of68each element [22Xg[122X in [22XD[122X; additionally, the multiplication in [22XD[122X is associative.[133X6970[33X[0;0YThe same set of elements can carry different algebraic structures. For71example, a semigroup is defined as being closed under an associative72multiplication, so each group is also a semigroup. Likewise, a monoid is73defined as a semigroup [22XD[122X in which the identity [22Xg[122X[10X^0[110X is defined for every74element [22Xg[122X, so each group is a monoid, and each monoid is a semigroup.[133X7576[33X[0;0YOther examples of domains are vector spaces, which are defined as additive77groups that are closed under (left) multiplication with elements in a78certain domain of scalars. Also conjugacy classes in a group [22XD[122X are domains,79they are closed under the conjugation action of [22XD[122X.[133X808182[1X7.3 [33X[0;0YNotions of Generation[133X[101X8384[33X[0;0YWe have seen that a domain is closed under certain operations. Usually a85domain is constructed as the closure of some elements under these86operations. In this situation, we say that the elements [13Xgenerate[113X the domain.[133X8788[33X[0;0YFor example, a list of matrices of the same shape over a common field can be89used to generate an additive group or a vector space over a suitable field;90if the matrices are square then we can also use the matrices as generators91of a semigroup, a ring, or an algebra. We illustrate some of these92possibilities:[133X9394[4X[32X Example [32X[104X95[4X[25Xgap>[125X [27Xmats:= [ [ [ 0*Z(2), Z(2)^0 ],[127X[104X96[4X[25X>[125X [27X [ Z(2)^0, 0*Z(2) ] ], [127X[104X97[4X[25X>[125X [27X [ [ Z(2)^0, 0*Z(2) ],[127X[104X98[4X[25X>[125X [27X [ 0*Z(2), Z(2)^0 ] ] ];;[127X[104X99[4X[25Xgap>[125X [27XSize( AdditiveMagma( mats ) );[127X[104X100[4X[28X4[128X[104X101[4X[25Xgap>[125X [27XSize( VectorSpace( GF(8), mats ) );[127X[104X102[4X[28X64[128X[104X103[4X[25Xgap>[125X [27XSize( Algebra( GF(2), mats ) ); [127X[104X104[4X[28X4[128X[104X105[4X[25Xgap>[125X [27XSize( Group( mats ) ); [127X[104X106[4X[28X2[128X[104X107[4X[32X[104X108109[33X[0;0YEach combination of operations under which a domain could be closed gives a110notion of generation. So each group has group generators, and since it is a111monoid, one can also ask for monoid generators of a group.[133X112113[33X[0;0YNote that one cannot simply ask for [21Xthe generators of a domain[121X, it is always114necessary to specify what notion of generation is meant. Access to the115different generators is provided by functions with names of the form116[10XGeneratorsOfSomething[110X. For example, [2XGeneratorsOfGroup[102X ([14XReference:117GeneratorsOfGroup[114X) denotes group generators, [2XGeneratorsOfMonoid[102X ([14XReference:118GeneratorsOfMonoid[114X) denotes monoid generators, and so on. The result of119[2XGeneratorsOfVectorSpace[102X ([14XReference: GeneratorsOfVectorSpace[114X) is of course to120be understood relative to the field of scalars of the vector space in121question.[133X122123[4X[32X Example [32X[104X124[4X[25Xgap>[125X [27XGeneratorsOfVectorSpace( GF(4)^2 );[127X[104X125[4X[28X[ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ][128X[104X126[4X[25Xgap>[125X [27Xv:= AsVectorSpace( GF(2), GF(4)^2 );;[127X[104X127[4X[25Xgap>[125X [27XGeneratorsOfVectorSpace( v );[127X[104X128[4X[28X[ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ], [ Z(2^2), 0*Z(2) ], [128X[104X129[4X[28X [ 0*Z(2), Z(2^2) ] ][128X[104X130[4X[32X[104X131132133[1X7.4 [33X[0;0YDomain Constructors[133X[101X134135[33X[0;0YA group can be constructed from a list of group generators [3Xgens[103X by [10XGroup(136[3Xgens[103X[10X )[110X, likewise one can construct rings and algebras with the functions137[2XRing[102X ([14XReference: Ring[114X) and [2XAlgebra[102X ([14XReference: Algebra[114X).[133X138139[33X[0;0YNote that it is not always or completely checked that [3Xgens[103X is in fact a140valid list of group generators, for example whether the elements of [3Xgens[103X can141be multiplied or whether they are invertible. This means that [5XGAP[105X trusts142you, at least to some extent, that the desired domain [10XSomething( [3Xgens[103X[10X )[110X does143exist.[133X144145146[1X7.5 [33X[0;0YForming Closures of Domains[133X[101X147148[33X[0;0YBesides constructing domains from generators, one can also form the closure149of a given domain with an element or another domain. There are different150notions of closure, one has to specify one according to the desired result151and the structure of the given domain. The functions to compute closures152have names such as [10XClosureSomething[110X. For example, if [3XD[103X is a group and one153wants to construct the group generated by [3XD[103X and an element [3Xg[103X then one can154use [10XClosureGroup( [3XD[103X[10X, [3Xg[103X[10X )[110X.[133X155156157[1X7.6 [33X[0;0YChanging the Structure[133X[101X158159[33X[0;0YThe same set of elements can have different algebraic structures. For160example, it may happen that a monoid [22XM[122X does in fact contain the inverses of161all of its elements, and thus [22XM[122X is equal to the group formed by the elements162of [22XM[122X.[133X163164[4X[32X Example [32X[104X165[4X[25Xgap>[125X [27Xm:= Monoid( mats );;[127X[104X166[4X[25Xgap>[125X [27Xm = Group( mats );[127X[104X167[4X[28Xtrue[128X[104X168[4X[25Xgap>[125X [27XIsGroup( m );[127X[104X169[4X[28Xfalse[128X[104X170[4X[32X[104X171172[33X[0;0YThe last result in the above example may be surprising. But the monoid [10Xm[110X is173not regarded as a group in [5XGAP[105X, and moreover there is no way to turn [10Xm[110X into174a group. Let us formulate this as a rule:[133X175176[33X[0;0Y[13XThe set of operations under which the domain is closed is fixed in the177construction of a domain, and cannot be changed later.[113X[133X178179[33X[0;0Y(Contrary to this, a domain [13Xcan[113X acquire knowledge about properties such as180whether the multiplication is associative or commutative.)[133X181182[33X[0;0YIf one needs a domain with a different structure than the given one, one can183construct a new domain with the required structure. The functions that do184these constructions have names such as [10XAsSomething[110X, they return a domain185that has the same elements as the argument in question but the structure186[10XSomething[110X. In the above situation, one can use [2XAsGroup[102X ([14XReference: AsGroup[114X).[133X187188[4X[32X Example [32X[104X189[4X[25Xgap>[125X [27Xg:= AsGroup( m );;[127X[104X190[4X[25Xgap>[125X [27Xm = g;[127X[104X191[4X[28Xtrue[128X[104X192[4X[25Xgap>[125X [27XIsGroup( g );[127X[104X193[4X[28Xtrue[128X[104X194[4X[32X[104X195196[33X[0;0YIf it is impossible to construct the desired domain, the [10XAsSomething[110X197functions return [9Xfail[109X.[133X198199[4X[32X Example [32X[104X200[4X[25Xgap>[125X [27XAsVectorSpace( GF(4), GF(2)^2 );[127X[104X201[4X[28Xfail[128X[104X202[4X[32X[104X203204[33X[0;0YThe functions [2XAsList[102X ([14XReference: AsList[114X) and [2XAsSortedList[102X ([14XReference:205AsSortedList[114X) mentioned above do not return domains, but they fit into the206general pattern in the sense that they forget all the structure of the207argument, including the fact that it is a domain, and return a list with the208same elements as the argument has.[133X209210211[1X7.7 [33X[0;0YSubdomains[133X[101X212213[33X[0;0YIt is possible to construct a domain as a subset of an existing domain. The214respective functions have names such as [10XSubsomething[110X, they return domains215with the structure [10XSomething[110X. (Note that the second [10Xs[110X in [10XSubsomething[110X is not216capitalized.) For example, if one wants to deal with the subgroup of the217domain [3XD[103X that is generated by the elements in the list [3Xgens[103X, one can use218[10XSubgroup( [3XD[103X[10X, [3Xgens[103X[10X )[110X. It is not required that [3XD[103X is itself a group, only that219the group generated by [3Xgens[103X must be a subset of [3XD[103X.[133X220221[33X[0;0YThe superset of a domain [3XS[103X that was constructed by a [10XSubsomething[110X function222can be accessed as [10XParent( [3XS[103X[10X )[110X.[133X223224[4X[32X Example [32X[104X225[4X[25Xgap>[125X [27Xg:= SymmetricGroup( 5 );;[127X[104X226[4X[25Xgap>[125X [27Xgens:= [ (1,2), (1,2,3,4) ];;[127X[104X227[4X[25Xgap>[125X [27Xs:= Subgroup( g, gens );;[127X[104X228[4X[25Xgap>[125X [27Xh:= Group( gens );;[127X[104X229[4X[25Xgap>[125X [27Xs = h;[127X[104X230[4X[28Xtrue[128X[104X231[4X[25Xgap>[125X [27XParent( s ) = g;[127X[104X232[4X[28Xtrue[128X[104X233[4X[32X[104X234235[33X[0;0YMany functions return subdomains of their arguments, for example the result236of [10XSylowSubgroup( [3XG[103X[10X )[110X is a group with parent group [3XG[103X.[133X237238[33X[0;0YIf you are sure that the domain [10XSomething( [3Xgens[103X[10X )[110X is contained in the domain239[3XD[103X then you can also call [10XSubsomethingNC( [3XD[103X[10X, [3Xgens[103X[10X )[110X instead of [10XSubsomething(240[3XD[103X[10X, [3Xgens[103X[10X )[110X. The [10XNC[110X stands for [21Xno check[121X, and the functions whose names end241with [10XNC[110X omit the check of containment.[133X242243244[1X7.8 [33X[0;0YFurther Information about Domains[133X[101X245246[33X[0;0YMore information about domains can be found in Chapter [14X'Reference: Domains'[114X.247Many other other chapters deal with specific types of domain such as groups,248vector spaces or algebras.[133X249250251252