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 / domain.xml
Views: 418346
1
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
2
<!-- %% -->
3
<!-- %W domain.tex GAP documentation Thomas Breuer -->
4
<!-- %W & Frank Celler -->
5
<!-- %W & Martin Schönert -->
6
<!-- %W & Heiko Theißen -->
7
<!-- %% -->
8
<!-- %H @(#)<M>Id: domain.tex,v 4.9 2000/09/15 15:00:14 gap Exp </M> -->
9
<!-- %% -->
10
<!-- %Y Copyright 1997, Lehrstuhl D für Mathematik, RWTH Aachen, Germany -->
11
<!-- %% -->
12
<!-- %% This file contains a tutorial introduction to domains. -->
13
<!-- %% -->
14
<P/>
15
16
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
17
<Chapter Label="Domains">
18
<Heading>Domains</Heading>
19
20
<E>Domain</E> is &GAP;'s name for structured sets.
21
We already saw examples of domains in
22
Chapters&nbsp;<Ref Chap="Groups and Homomorphisms"/>
23
and&nbsp;<Ref Chap="Vector Spaces and Algebras"/>:
24
the groups <C>s8</C> and <C>a8</C> in
25
Section&nbsp;<Ref Sect="Permutation groups"/> are domains,
26
likewise the field <C>f</C> and the vector space <C>v</C> in
27
Section&nbsp;<Ref Sect="Vector Spaces"/> are domains.
28
They were constructed by functions such as
29
<Ref Func="Group" BookName="ref"/> and <Ref Func="GF" BookName="ref"/>,
30
and they could be passed as arguments to other functions such as
31
<Ref Func="DerivedSubgroup" BookName="ref"/> and
32
<Ref Func="Dimension" BookName="ref"/>.
33
34
35
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
36
<Section Label="Domains as Sets">
37
<Heading>Domains as Sets</Heading>
38
39
First of all, a domain <M>D</M> is a set.
40
If <M>D</M> is finite then a list with the elements of this set can be
41
computed with the functions <Ref Func="AsList" BookName="ref"/>
42
and <Ref Func="AsSortedList" BookName="ref"/>.
43
For infinite <M>D</M>, <Ref Func="Enumerator" BookName="ref"/>
44
and <Ref Func="EnumeratorSorted" BookName="ref"/> may work,
45
but it is also possible that one gets an error message.
46
<P/>
47
Domains can be used as arguments of set functions such as
48
<Ref Func="Intersection" BookName="ref"/>
49
and <Ref Func="Union" BookName="ref"/>.
50
&GAP; tries to return a domain in these cases,
51
moreover it tries to return a domain with as much structure as possible.
52
For example, the intersection of two groups is (either empty or) again a
53
group, and &GAP; will try to return it as a group.
54
For <Ref Func="Union" BookName="ref"/>,
55
the situation is different because the union of two groups
56
is in general not a group.
57
<P/>
58
<Example><![CDATA[
59
gap> g:= Group( (1,2), (3,4) );;
60
gap> h:= Group( (3,4), (5,6) );;
61
gap> Intersection( g, h );
62
Group([ (3,4) ])
63
]]></Example>
64
<P/>
65
Two domains are regarded as equal w.r.t. the operator <Q><C>=</C></Q>
66
if and only if they are equal <E>as sets</E>,
67
regardless of the additional structure of the domains.
68
<P/>
69
<Example><![CDATA[
70
gap> mats:= [ [ [ 0*Z(2), Z(2)^0 ], [ Z(2)^0, 0*Z(2) ] ],
71
> [ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ] ];;
72
gap> Ring( mats ) = VectorSpace( GF(2), mats );
73
true
74
]]></Example>
75
<P/>
76
Additionally, a domain is regarded as equal to the sorted list
77
of its elements.
78
<P/>
79
<Example><![CDATA[
80
gap> g:= Group( (1,2) );;
81
gap> l:= AsSortedList( g );
82
[ (), (1,2) ]
83
gap> g = l;
84
true
85
gap> IsGroup( l ); IsList( g );
86
false
87
false
88
]]></Example>
89
90
</Section>
91
92
93
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
94
<Section Label="Algebraic Structure">
95
<Heading>Algebraic Structure</Heading>
96
97
The additional structure of <M>D</M> is constituted by the facts that
98
<M>D</M> is known to be closed under certain operations such as addition or
99
multiplication, and that these operations have additional properties.
100
For example, if <M>D</M> is a group then it is closed under multiplication
101
(<M>D \times D \rightarrow D</M>, <M>(g,h) \mapsto g * h</M>),
102
under taking inverses (<M>D \rightarrow D</M>, <M>g \mapsto g^{-1}</M>)
103
and under taking the identity <M>g</M><C>^0</C> of each element <M>g</M>
104
in <M>D</M>;
105
additionally, the multiplication in <M>D</M> is associative.
106
<P/>
107
The same set of elements can carry different algebraic structures.
108
For example, a semigroup is defined as being closed under an associative
109
multiplication, so each group is also a semigroup.
110
Likewise, a monoid is defined as a semigroup <M>D</M> in which the identity
111
<M>g</M><C>^0</C> is defined for every element <M>g</M>,
112
so each group is a monoid,
113
and each monoid is a semigroup.
114
<P/>
115
Other examples of domains are vector spaces, which are defined as
116
additive groups that are closed under (left) multiplication with elements
117
in a certain domain of scalars.
118
Also conjugacy classes in a group <M>D</M> are domains,
119
they are closed under the conjugation action of <M>D</M>.
120
121
</Section>
122
123
124
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
125
<Section Label="Notions of Generation">
126
<Heading>Notions of Generation</Heading>
127
128
<Index Key="GeneratorsOfSomething"><C>GeneratorsOfSomething</C></Index>
129
We have seen that a domain is closed under certain operations.
130
Usually a domain is constructed as the closure of some elements under
131
these operations.
132
In this situation, we say that the elements <E>generate</E> the domain.
133
<P/>
134
For example, a list of matrices of the same shape over a common field
135
can be used to generate an additive group or a vector space over a
136
suitable field; if the matrices are square then we can also use the
137
matrices as generators of a semigroup, a ring, or an algebra. We
138
illustrate some of these possibilities:
139
<P/>
140
<Example><![CDATA[
141
gap> mats:= [ [ [ 0*Z(2), Z(2)^0 ],
142
> [ Z(2)^0, 0*Z(2) ] ],
143
> [ [ Z(2)^0, 0*Z(2) ],
144
> [ 0*Z(2), Z(2)^0 ] ] ];;
145
gap> Size( AdditiveMagma( mats ) );
146
4
147
gap> Size( VectorSpace( GF(8), mats ) );
148
64
149
gap> Size( Algebra( GF(2), mats ) );
150
4
151
gap> Size( Group( mats ) );
152
2
153
]]></Example>
154
Each combination of operations under which a domain could be closed
155
gives a notion of generation.
156
So each group has group generators, and since it is a monoid,
157
one can also ask for monoid generators of a group.
158
<P/>
159
Note that one cannot simply ask for <Q>the generators of a domain</Q>,
160
it is always necessary to specify what notion of generation is meant.
161
Access to the different generators is provided by functions with
162
names of the form <C>GeneratorsOfSomething</C>.
163
For example, <Ref Func="GeneratorsOfGroup" BookName="ref"/> denotes
164
group generators,
165
<Ref Func="GeneratorsOfMonoid" BookName="ref"/> denotes monoid generators,
166
and so on.
167
The result of <Ref Func="GeneratorsOfVectorSpace" BookName="ref"/> is
168
of course to be understood
169
relative to the field of scalars of the vector space in question.
170
<P/>
171
<Example><![CDATA[
172
gap> GeneratorsOfVectorSpace( GF(4)^2 );
173
[ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ] ]
174
gap> v:= AsVectorSpace( GF(2), GF(4)^2 );;
175
gap> GeneratorsOfVectorSpace( v );
176
[ [ Z(2)^0, 0*Z(2) ], [ 0*Z(2), Z(2)^0 ], [ Z(2^2), 0*Z(2) ],
177
[ 0*Z(2), Z(2^2) ] ]
178
]]></Example>
179
180
</Section>
181
182
183
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
184
<Section Label="Domain Constructors">
185
<Heading>Domain Constructors</Heading>
186
187
<Index Key="Something"><C>Something</C></Index>
188
A group can be constructed from a list of group generators <A>gens</A> by
189
<C>Group( <A>gens</A> )</C>,
190
likewise one can construct rings and algebras with the functions
191
<Ref Func="Ring" BookName="ref"/>
192
and <Ref Func="Algebra" BookName="ref"/>.
193
<P/>
194
Note that it is not always or completely checked that <A>gens</A> is in
195
fact a valid list of group generators, for example whether the
196
elements of <A>gens</A> can be multiplied or whether they are invertible.
197
This means that &GAP; trusts you, at least to some extent, that the
198
desired domain <C>Something( <A>gens</A> )</C> does exist.
199
200
</Section>
201
202
203
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
204
<Section Label="Forming Closures of Domains">
205
<Heading>Forming Closures of Domains</Heading>
206
207
<Index Key="ClosureSomething"><C>ClosureSomething</C></Index>
208
Besides constructing domains from generators, one can also form the
209
closure of a given domain with an element or another domain.
210
There are different notions of closure, one has to specify one
211
according to the desired result and the structure of the given domain.
212
The functions to compute closures have names such as
213
<C>ClosureSomething</C>.
214
For example, if <A>D</A> is a group and one wants to construct the group
215
generated by <A>D</A> and an element <A>g</A> then one can use
216
<C>ClosureGroup( <A>D</A>, <A>g</A> )</C>.
217
218
</Section>
219
220
221
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
222
<Section Label="Changing the Structure">
223
<Heading>Changing the Structure</Heading>
224
225
<Index Key="AsSomething"><C>AsSomething</C></Index>
226
The same set of elements can have different algebraic structures.
227
For example, it may happen that a monoid <M>M</M> does in fact contain
228
the inverses of all of its elements, and thus <M>M</M> is equal to the group
229
formed by the elements of <M>M</M>.
230
<P/>
231
<Example><![CDATA[
232
gap> m:= Monoid( mats );;
233
gap> m = Group( mats );
234
true
235
gap> IsGroup( m );
236
false
237
]]></Example>
238
<P/>
239
The last result in the above example may be surprising.
240
But the monoid <C>m</C> is not regarded as a group in &GAP;,
241
and moreover there is no way to turn <C>m</C> into a group.
242
Let us formulate this as a rule:
243
<P/>
244
<E>The set of operations under which the domain is closed is fixed
245
in the construction of a domain, and cannot be changed later.</E>
246
<P/>
247
(Contrary to this, a domain <E>can</E> acquire knowledge about properties
248
such as whether the multiplication is associative or commutative.)
249
<P/>
250
If one needs a domain with a different structure than the given one,
251
one can construct a new domain with the required structure.
252
The functions that do these constructions have names such as
253
<C>AsSomething</C>, they return a domain that has the same elements as the
254
argument in question but the structure <C>Something</C>.
255
In the above situation, one can use <Ref Func="AsGroup" BookName="ref"/>.
256
<P/>
257
<Example><![CDATA[
258
gap> g:= AsGroup( m );;
259
gap> m = g;
260
true
261
gap> IsGroup( g );
262
true
263
]]></Example>
264
<P/>
265
If it is impossible to construct the desired domain, the <C>AsSomething</C>
266
functions return <K>fail</K>.
267
<P/>
268
<Example><![CDATA[
269
gap> AsVectorSpace( GF(4), GF(2)^2 );
270
fail
271
]]></Example>
272
<P/>
273
The functions <Ref Func="AsList" BookName="ref"/> and
274
<Ref Func="AsSortedList" BookName="ref"/> mentioned above do not return
275
domains, but they fit into the general pattern in the sense that they
276
forget all the structure of the argument, including the fact that it is
277
a domain, and return a list with the same elements as the argument has.
278
279
</Section>
280
281
282
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
283
<Section Label="Subdomains">
284
<Heading>Subdomains</Heading>
285
286
<Index Key="Subsomething"><C>Subsomething</C></Index>
287
<Index Key="SubsomethingNC"><C>SubsomethingNC</C></Index>
288
It is possible to construct a domain as a subset of an existing domain.
289
The respective functions have names such as <C>Subsomething</C>,
290
they return domains with the structure <C>Something</C>.
291
(Note that the second <C>s</C> in <C>Subsomething</C> is not capitalized.)
292
For example, if one wants to deal with the subgroup of the domain <A>D</A>
293
that is generated by the elements in the list <A>gens</A>,
294
one can use <C>Subgroup( <A>D</A>, <A>gens</A> )</C>.
295
It is not required that <A>D</A> is itself a group,
296
only that the group generated by <A>gens</A> must be a subset of <A>D</A>.
297
<P/>
298
The superset of a domain <A>S</A> that was constructed by a
299
<C>Subsomething</C>
300
function can be accessed as <C>Parent( <A>S</A> )</C>.
301
<P/>
302
<Example><![CDATA[
303
gap> g:= SymmetricGroup( 5 );;
304
gap> gens:= [ (1,2), (1,2,3,4) ];;
305
gap> s:= Subgroup( g, gens );;
306
gap> h:= Group( gens );;
307
gap> s = h;
308
true
309
gap> Parent( s ) = g;
310
true
311
]]></Example>
312
<P/>
313
Many functions return subdomains of their arguments, for example
314
the result of <C>SylowSubgroup( <A>G</A> )</C> is a group with parent group
315
<A>G</A>.
316
<P/>
317
If you are sure that the domain <C>Something( <A>gens</A> )</C> is contained
318
in the
319
domain <A>D</A> then you can also call
320
<C>SubsomethingNC( <A>D</A>, <A>gens</A> )</C> instead
321
of <C>Subsomething( <A>D</A>, <A>gens</A> )</C>.
322
The <C>NC</C> stands for <Q>no check</Q>,
323
and the functions whose names end with
324
<C>NC</C> omit the check of containment.
325
326
</Section>
327
328
329
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
330
<Section Label="Further Information about Domains">
331
<Heading>Further Information about Domains</Heading>
332
333
More information about domains can be found in
334
Chapter&nbsp;<Ref Sect="Domains" BookName="ref"/>. Many other other chapters deal with specific
335
types of domain such as groups, vector spaces or algebras.
336
337
</Section>
338
</Chapter>
339
340
341
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
342
<!-- %% -->
343
<!-- %E -->
344
345
346