CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

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

Path: gap4r8 / doc / tut / chap7.txt
Views: 418346
1
2
7 Domains
3
4
Domain is GAP's name for structured sets. We already saw examples of domains
5
in Chapters 5 and 6: the groups s8 and a8 in Section 5.1 are domains,
6
likewise the field f and the vector space v in Section 6.1 are domains. They
7
were constructed by functions such as Group (Reference: Groups) and GF
8
(Reference: GF for field size), and they could be passed as arguments to
9
other functions such as DerivedSubgroup (Reference: DerivedSubgroup) and
10
Dimension (Reference: Dimension).
11
12
13
7.1 Domains as Sets
14
15
First of all, a domain D is a set. If D is finite then a list with the
16
elements of this set can be computed with the functions AsList (Reference:
17
AsList) and AsSortedList (Reference: AsSortedList). For infinite D,
18
Enumerator (Reference: Enumerator) and EnumeratorSorted (Reference:
19
EnumeratorSorted) may work, but it is also possible that one gets an error
20
message.
21
22
Domains can be used as arguments of set functions such as Intersection
23
(Reference: Intersection) and Union (Reference: Union). GAP tries to return
24
a domain in these cases, moreover it tries to return a domain with as much
25
structure as possible. For example, the intersection of two groups is
26
(either empty or) again a group, and GAP will try to return it as a group.
27
For Union (Reference: Union), the situation is different because the union
28
of two groups is in general not a group.
29
30
 Example 
31
gap> g:= Group( (1,2), (3,4) );;
32
gap> h:= Group( (3,4), (5,6) );;
33
gap> Intersection( g, h );
34
Group([ (3,4) ])
35

36
37
Two domains are regarded as equal w.r.t. the operator = if and only if they
38
are equal as sets, regardless of the additional structure of the domains.
39
40
 Example 
41
gap> mats:= [ [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ],
42
>  [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ] ];;
43
gap> Ring( mats ) = VectorSpace( GF(2), mats );
44
true
45

46
47
Additionally, a domain is regarded as equal to the sorted list of its
48
elements.
49
50
 Example 
51
gap> g:= Group( (1,2) );;
52
gap> l:= AsSortedList( g );
53
[ (), (1,2) ]
54
gap> g = l;
55
true
56
gap> IsGroup( l ); IsList( g );
57
false
58
false
59

60
61
62
7.2 Algebraic Structure
63
64
The additional structure of D is constituted by the facts that D is known to
65
be closed under certain operations such as addition or multiplication, and
66
that these operations have additional properties. For example, if D is a
67
group then it is closed under multiplication (D × D → D, (g,h) ↦ g * h),
68
under taking inverses (D → D, g ↦ g^-1) and under taking the identity g^0 of
69
each element g in D; additionally, the multiplication in D is associative.
70
71
The same set of elements can carry different algebraic structures. For
72
example, a semigroup is defined as being closed under an associative
73
multiplication, so each group is also a semigroup. Likewise, a monoid is
74
defined as a semigroup D in which the identity g^0 is defined for every
75
element g, so each group is a monoid, and each monoid is a semigroup.
76
77
Other examples of domains are vector spaces, which are defined as additive
78
groups that are closed under (left) multiplication with elements in a
79
certain domain of scalars. Also conjugacy classes in a group D are domains,
80
they are closed under the conjugation action of D.
81
82
83
7.3 Notions of Generation
84
85
We have seen that a domain is closed under certain operations. Usually a
86
domain is constructed as the closure of some elements under these
87
operations. In this situation, we say that the elements generate the domain.
88
89
For example, a list of matrices of the same shape over a common field can be
90
used to generate an additive group or a vector space over a suitable field;
91
if the matrices are square then we can also use the matrices as generators
92
of a semigroup, a ring, or an algebra. We illustrate some of these
93
possibilities:
94
95
 Example 
96
gap> mats:= [ [ [ 0*Z(2), Z(2)^0 ],
97
>  [ Z(2)^0, 0*Z(2) ] ], 
98
>  [ [ Z(2)^0, 0*Z(2) ],
99
>  [ 0*Z(2), Z(2)^0 ] ] ];;
100
gap> Size( AdditiveMagma( mats ) );
101
4
102
gap> Size( VectorSpace( GF(8), mats ) );
103
64
104
gap> Size( Algebra( GF(2), mats ) ); 
105
4
106
gap> Size( Group( mats ) ); 
107
2
108

109
110
Each combination of operations under which a domain could be closed gives a
111
notion of generation. So each group has group generators, and since it is a
112
monoid, one can also ask for monoid generators of a group.
113
114
Note that one cannot simply ask for the generators of a domain, it is always
115
necessary to specify what notion of generation is meant. Access to the
116
different generators is provided by functions with names of the form
117
GeneratorsOfSomething. For example, GeneratorsOfGroup (Reference:
118
GeneratorsOfGroup) denotes group generators, GeneratorsOfMonoid (Reference:
119
GeneratorsOfMonoid) denotes monoid generators, and so on. The result of
120
GeneratorsOfVectorSpace (Reference: GeneratorsOfVectorSpace) is of course to
121
be understood relative to the field of scalars of the vector space in
122
question.
123
124
 Example 
125
gap> GeneratorsOfVectorSpace( GF(4)^2 );
126
[ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ]
127
gap> v:= AsVectorSpace( GF(2), GF(4)^2 );;
128
gap> GeneratorsOfVectorSpace( v );
129
[ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ], [ Z(2^2), 0*Z(2) ], 
130
 [ 0*Z(2), Z(2^2) ] ]
131

132
133
134
7.4 Domain Constructors
135
136
A group can be constructed from a list of group generators gens by Group(
137
gens ), likewise one can construct rings and algebras with the functions
138
Ring (Reference: Ring) and Algebra (Reference: Algebra).
139
140
Note that it is not always or completely checked that gens is in fact a
141
valid list of group generators, for example whether the elements of gens can
142
be multiplied or whether they are invertible. This means that GAP trusts
143
you, at least to some extent, that the desired domain Something( gens ) does
144
exist.
145
146
147
7.5 Forming Closures of Domains
148
149
Besides constructing domains from generators, one can also form the closure
150
of a given domain with an element or another domain. There are different
151
notions of closure, one has to specify one according to the desired result
152
and the structure of the given domain. The functions to compute closures
153
have names such as ClosureSomething. For example, if D is a group and one
154
wants to construct the group generated by D and an element g then one can
155
use ClosureGroup( D, g ).
156
157
158
7.6 Changing the Structure
159
160
The same set of elements can have different algebraic structures. For
161
example, it may happen that a monoid M does in fact contain the inverses of
162
all of its elements, and thus M is equal to the group formed by the elements
163
of M.
164
165
 Example 
166
gap> m:= Monoid( mats );;
167
gap> m = Group( mats );
168
true
169
gap> IsGroup( m );
170
false
171

172
173
The last result in the above example may be surprising. But the monoid m is
174
not regarded as a group in GAP, and moreover there is no way to turn m into
175
a group. Let us formulate this as a rule:
176
177
The set of operations under which the domain is closed is fixed in the
178
construction of a domain, and cannot be changed later.
179
180
(Contrary to this, a domain can acquire knowledge about properties such as
181
whether the multiplication is associative or commutative.)
182
183
If one needs a domain with a different structure than the given one, one can
184
construct a new domain with the required structure. The functions that do
185
these constructions have names such as AsSomething, they return a domain
186
that has the same elements as the argument in question but the structure
187
Something. In the above situation, one can use AsGroup (Reference: AsGroup).
188
189
 Example 
190
gap> g:= AsGroup( m );;
191
gap> m = g;
192
true
193
gap> IsGroup( g );
194
true
195

196
197
If it is impossible to construct the desired domain, the AsSomething
198
functions return fail.
199
200
 Example 
201
gap> AsVectorSpace( GF(4), GF(2)^2 );
202
fail
203

204
205
The functions AsList (Reference: AsList) and AsSortedList (Reference:
206
AsSortedList) mentioned above do not return domains, but they fit into the
207
general pattern in the sense that they forget all the structure of the
208
argument, including the fact that it is a domain, and return a list with the
209
same elements as the argument has.
210
211
212
7.7 Subdomains
213
214
It is possible to construct a domain as a subset of an existing domain. The
215
respective functions have names such as Subsomething, they return domains
216
with the structure Something. (Note that the second s in Subsomething is not
217
capitalized.) For example, if one wants to deal with the subgroup of the
218
domain D that is generated by the elements in the list gens, one can use
219
Subgroup( D, gens ). It is not required that D is itself a group, only that
220
the group generated by gens must be a subset of D.
221
222
The superset of a domain S that was constructed by a Subsomething function
223
can be accessed as Parent( S ).
224
225
 Example 
226
gap> g:= SymmetricGroup( 5 );;
227
gap> gens:= [ (1,2), (1,2,3,4) ];;
228
gap> s:= Subgroup( g, gens );;
229
gap> h:= Group( gens );;
230
gap> s = h;
231
true
232
gap> Parent( s ) = g;
233
true
234

235
236
Many functions return subdomains of their arguments, for example the result
237
of SylowSubgroup( G ) is a group with parent group G.
238
239
If you are sure that the domain Something( gens ) is contained in the domain
240
D then you can also call SubsomethingNC( D, gens ) instead of Subsomething(
241
D, gens ). The NC stands for no check, and the functions whose names end
242
with NC omit the check of containment.
243
244
245
7.8 Further Information about Domains
246
247
More information about domains can be found in Chapter 'Reference: Domains'.
248
Many other other chapters deal with specific types of domain such as groups,
249
vector spaces or algebras.
250
251
252