File: domain.xml

package info (click to toggle)
gap 4.15.1-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 110,212 kB
  • sloc: ansic: 97,261; xml: 48,343; cpp: 13,946; sh: 4,900; perl: 1,650; javascript: 255; makefile: 252; ruby: 9
file content (717 lines) | stat: -rw-r--r-- 30,597 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %A  domain.xml                   GAP documentation              Thomas Breuer -->
<!-- %% -->
<!-- %% -->
<!-- %Y  (C) 1998 School Math and Comp. Sci., University of St Andrews, Scotland -->
<!-- %Y  Copyright (C) 2002 The GAP Group -->
<!-- %% -->
<Chapter Label="Domains and their Elements">
<Heading>Domains and their Elements</Heading>

<#Include Label="[1]{domain}">
<P/>
An introduction to the most important facts about domains is given
in Chapter&nbsp;<Ref Chap="Domains" BookName="tut"/>.
<P/>
There are only few <E>operations</E> especially for domains
(see&nbsp;<Ref Sect="Operations for Domains"/>),
operations such as <Ref Func="Intersection" Label="for a list"/>
and <Ref Oper="Random" Label="for a list or collection"/>
are defined for the more
general situation of collections (see Chapter&nbsp;<Ref Chap="Collections"/>).

<!-- %%  The fundamental support for domains in &GAP; was designed and implemented by -->
<!-- %%  Thomas Breuer. -->

<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Operational Structure of Domains">
<Heading>Operational Structure of Domains</Heading>

Domains have an <E>operational structure</E>,
that is, a collection of operations under which the domain is closed.
For example, a group is closed under multiplication,
taking the zeroth power of elements, and taking inverses of elements.
The operational structure may be empty,
examples of domains without additional structure are
the underlying relations of general mappings
(see&nbsp;<Ref Sect="Properties and Attributes of (General) Mappings"/>).
<P/>
The operations under which a domain is closed are a subset of
the operations that the elements of a domain admit.
It is possible that the elements admit more operations.
For example, matrices can be multiplied and added.
But addition plays no role in a group of matrices,
and multiplication plays no role in a vector space of matrices.
In particular, a matrix group is not closed under addition.
<P/>
Note that the elements of a domain exist independently of this domain,
usually they existed already before the domain was created.
So it makes sense to say that a domain is <E>generated</E> by some elements
with respect to certain operations.
<P/>
Of course, different sets of operations yield different notions of
generation.
For example, the group generated by some matrices is different from
the ring generated by these matrices, and these two will in general be
different from the vector space generated by the same matrices,
over a suitable field.
<P/>
The other way round,
the same set of elements may be obtained by generation w.r.t.&nbsp;different
notions of generation.
For example, one can get the group generated by two elements <M>g</M> and <M>h</M>
also as the monoid generated by the elements <M>g</M>, <M>g^{{-1}}</M>,
<M>h</M>, <M>h^{{-1}}</M>;
if both <M>g</M> and <M>h</M> have finite order then of course the group generated
by <M>g</M> and <M>h</M> coincides with the monoid generated by <M>g</M> and <M>h</M>.
<P/>
Additionally to the operational structure,
a domain can have properties.
For example, the multiplication of a group is associative,
and the multiplication in a field is commutative.
<P/>
Note that associativity and commutativity depend on the set of
elements for which one considers the multiplication,
i.e., it depends on the domain.
For example, the multiplication in a full matrix ring over a field
is not commutative, whereas its restriction to the set of diagonal
matrices is commutative.
<P/>
One important difference between the operational structure and the
properties of a domain is that the operational structure is fixed when
the domain is constructed, whereas properties can be discovered later.
For example, take a domain whose operational structure is given by
closure under multiplication.
If it is discovered that the inverses of all its elements
also do (by chance) lie in this domain,
being closed under taking inverses is <E>not</E> added to the operational
structure.
But a domain with operational structure of multiplication,
taking the identity, and taking inverses
will be treated as a group as soon as the multiplication is found out to
be associative for this domain.
<P/>
The operational structures available in &GAP; form a hierarchy,
which is explicitly formulated in terms of domain categories,
see&nbsp;<Ref Sect="Domain Categories"/>.

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Equality and Comparison of Domains">
<Heading>Equality and Comparison of Domains</Heading>

<#Include Label="[2]{domain}">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Constructing Domains">
<Heading>Constructing Domains</Heading>

For several operational structures (see&nbsp;<Ref Sect="Operational Structure of Domains"/>),
&GAP; provides functions to construct domains with this structure
(note that such functions do not exist for all operational structures).
For example, <Ref Func="Group" Label="for several generators"/>
returns groups, <Ref Func="VectorSpace"/> returns vector spaces etc.:
<P/>
<Index Key="Struct"><A>Struct</A></Index>
<C><A>Struct</A>( <A>arg1</A>, <A>arg2</A>, ... )</C>
<P/>
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 <E>generators</E>.
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 <M>F</M> can be constructed from <M>F</M> and
a list of appropriate vectors.
<P/>
The idea of generation and generators in &GAP; is that the domain
returned by a function such as <C>Group</C>, <C>Algebra</C>, or <C>FreeLeftModule</C>
<E>contains</E> 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.
<P/>
The function <A>Struct</A> first checks whether the arguments admit
the construction of a domain with the desired structure.
This is done by calling the operation
<P/>
<C>IsGeneratorsOf<A>Struct</A>( [<A>info</A>, ]<A>gens</A> )</C>
<P/>
<Index Key="IsGeneratorsOfStruct"><C>IsGeneratorsOf<A>Struct</A></C></Index>
<P/>
where <A>arglist</A> is the list of given generators and <A>info</A> an argument
of <A>Struct</A>, for example the field of scalars in the case that a
vector space shall be constructed.
If the check failed then <A>Struct</A> returns <K>fail</K>,
otherwise it returns the result of <C><A>Struct</A>ByGenerators</C> (see below).
(So if one wants to omit the check then one should call
<C><A>Struct</A>ByGenerators</C> directly.)
<P/>
<Index Key="GeneratorsOfStruct"><C>GeneratorsOf<A>Struct</A></C></Index>
<C>GeneratorsOf<A>Struct</A>( <A>D</A>)</C>
<P/>
For a domain <A>D</A> with operational structure corresponding to <A>Struct</A>,
the attribute <C>GeneratorsOf<A>Struct</A></C> returns a list of corresponding
generators of <A>D</A>.
If these generators were not yet stored in <A>D</A> then <A>D</A> must know <E>some</E>
generators if <C>GeneratorsOf<A>Struct</A></C> 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 <Q>the generators of a domain</Q>.
Further note that the generators may depend on other information about <A>D</A>.
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.
<P/>
<Index Key="StructByGenerators"><C><A>Struct</A>ByGenerators</C></Index>
<C><A>Struct</A>ByGenerators( [<A>info</A>, ]<A>gens</A> )</C>
<P/>
Domain construction from generators <A>gens</A> is implemented by operations
<C><A>Struct</A>ByGenerators</C>,
which are called by the simple functions <A>Struct</A>;
methods can be installed only for the operations.
Note that additional information <A>info</A> 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 <C>GeneratorsOf<A>Struct</A></C> value of the returned domain need <E>not</E>
be equal to <A>gens</A>.
But if a domain <A>D</A> is printed as <C><A>Struct</A>([<A>a</A>, <A>b</A>, ...])</C> and if
there is an attribute <C>GeneratorsOf<A>Struct</A></C> then the list
<C>GeneratorsOf<A>Struct</A>( <A>D</A> )</C> is guaranteed to be equal to
<C>[ <A>a</A>, <A>b</A>, ... ]</C>.
<P/>
<Index Key="StructWithGenerators"><C><A>Struct</A>WithGenerators</C></Index>
<C><A>Struct</A>WithGenerators( [<A>info</A>, ]<A>gens</A> )</C>
<P/>
The only difference between <C><A>Struct</A>ByGenerators</C> and
<C><A>Struct</A>WithGenerators</C> is that the latter guarantees that the
<C>GeneratorsOf<A>Struct</A></C> value of the result is equal to the given
generators <A>gens</A>.
<P/>
<Index Key="ClosureStruct"><C>Closure<A>Struct</A></C></Index>
<C>Closure<A>Struct</A>( <A>D</A>, <A>obj</A> )</C>
<P/>
For constructing a domain as the closure of a given domain with an
element or another domain, one can use the operation <C>Closure<A>Struct</A></C>.
It returns the smallest domain with operational structure corresponding to
<A>Struct</A> that contains <A>D</A> as a subset and <A>obj</A> as an element.

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Changing the Structure">
<Heading>Changing the Structure</Heading>

The same set of elements can have different operational structures.
For example, it may happen that a monoid <M>M</M> does in fact contain
the inverses of all of its elements;
if <M>M</M> has not been constructed as a group (see&nbsp;<Ref Sect="Domain Categories"/>)
then it is reasonable to ask for the group that is equal to <M>M</M>.
<P/>
<Index Key="AsStruct"><C>As<A>Struct</A></C></Index>
<C>As<A>Struct</A>( [<A>info</A>, ]<A>D</A> )</C>
<P/>
If <A>D</A> is a domain that is closed under the operational structure
given by <A>Struct</A> then <C>As<A>Struct</A></C> returns a domain <A>E</A> that consists
of the same elements (that is, <C><A>D</A> = <A>E</A></C>) and that has this
operational structure (that is, <C>Is<A>Struct</A>( <A>E</A> )</C> is <K>true</K>);
if <A>D</A> is not closed under the structure given by <A>Struct</A> then
<C>As<A>Struct</A></C> returns <K>fail</K>.
<P/>
If additional information besides generators are necessary to define <A>D</A>
then the argument <A>info</A> describes the value of this information for the
desired domain.
For example, if we want to view <A>D</A> as a vector space over the field
with two elements then we may call <C>AsVectorSpace( GF(2), <A>D</A> )</C>;
this allows us to change the underlying field of scalars,
for example if <A>D</A> is a vector space over the field with four elements.
Again, if <A>D</A> is not equal to a domain with the desired structure and
additional information then <K>fail</K> is returned.
<P/>
In the case that no additional information <A>info</A> is related to the
structure given by <A>Struct</A>,
the operation <C>As<A>Struct</A></C> is in fact an attribute (see&nbsp;<Ref Sect="Attributes"/>).
<P/>
See the index of the &GAP; Reference Manual for an overview of the available
<C>As<A>Struct</A></C> functions.

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Changing the Representation">
<Heading>Changing the Representation</Heading>

Often it is useful to answer questions about a domain via computations in
a different but isomorphic domain.
In the sense that this approach keeps the structure and changes the
underlying set of elements, it can be viewed as a counterpart of keeping the
set of elements and changing its structure
(see&nbsp;<Ref Sect="Changing the Structure"/>).
<P/>
One reason for doing so can be that computations with the elements in the
given domain are not very efficient.
For example, if one is given a solvable matrix group
(see Chapter&nbsp;<Ref Chap="Matrix Groups"/>)
then one can compute an isomorphism to a
polycyclicly presented group <M>G</M>,
say (see Chapter&nbsp;<Ref Chap="Polycyclic Groups"/>);
the multiplication of two matrices &ndash;which is essentially determined by
the dimension of the matrices&ndash; is much more expensive than the
multiplication of two elements in <M>G</M>
&ndash;which is essentially determined by the composition length of <M>G</M>.
<P/>
<Index Key="IsomorphismRepStruct"><C>Isomorphism<A>Rep</A><A>Struct</A></C></Index>
<C>Isomorphism<A>Rep</A><A>Struct</A>( <A>D</A> )</C>
<P/>
If <A>D</A> is a domain that is closed under the operational structure
given by <A>Struct</A> then <C>Isomorphism<A>Rep</A><A>Struct</A></C> returns
a mapping <A>hom</A>
from <A>D</A> to a domain <M>E</M> having structure given by <A>Struct</A>,
such that <A>hom</A> respects the structure <A>Struct</A>
and <A>Rep</A> describes the representation of the elements in <M>E</M>.
If no domain <M>E</M> with the required properties exists then <K>fail</K> is
returned.
<P/>
For example, <Ref Attr="IsomorphismPermGroup"/> takes a
group as its argument and returns a group homomorphism
(see&nbsp;<Ref Chap="Group Homomorphisms"/>) onto an isomorphic permutation group
(see Chapter&nbsp;<Ref Chap="Permutation Groups"/>) provided the original
group is finite;
for infinite groups, <Ref Attr="IsomorphismPermGroup"/> returns <K>fail</K>.
Similarly, <Ref Attr="IsomorphismPcGroup"/> returns a group
homomorphism from its argument to a polycyclicly presented group
(see&nbsp;<Ref Chap="Pc Groups"/>) if the argument is polycyclic,
and <K>fail</K> otherwise.
<P/>
See the index of the &GAP; Reference Manual for an overview of the available
<C>Isomorphism<A>Rep</A><A>Struct</A></C> functions.

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Domain Categories">
<Heading>Domain Categories</Heading>

As mentioned in&nbsp;<Ref Sect="Operational Structure of Domains"/>,
the operational structure of a domain is fixed when the domain is
constructed.
For example, if <A>D</A> was constructed by
<Ref Func="Monoid" Label="for various generators"/>
then <A>D</A> is in general not regarded as a group in &GAP;,
even if <A>D</A> is in fact closed under taking inverses.
In this case, <Ref Filt="IsGroup"/> returns <K>false</K> for <A>D</A>.
The operational structure determines which operations are applicable for
a domain, so for example <Ref Oper="SylowSubgroup"/> is not defined for
<A>D</A> and therefore will signal an error.
<P/>
<Index Key="IsStruct"><C>Is<A>Struct</A></C></Index>
<C>Is<A>Struct</A>( <A>D</A> )</C>
<P/>
The functions <C>Is<A>Struct</A></C> implement the tests whether a domain
<A>D</A> has the respective operational structure (upon construction).
<C>Is<A>Struct</A></C> is a filter (see&nbsp;<Ref Chap="Types of Objects"/>)
that involves certain categories (see&nbsp;<Ref Sect="Categories"/>)
and usually also certain properties (see&nbsp;<Ref Sect="Properties"/>).
For example, <Ref Filt="IsGroup"/> is equivalent to
<C>IsMagmaWithInverses and IsAssociative</C>,
the first being a category and the second being a property.
<P/>
Implications between domain categories describe the hierarchy of
operational structures available in &GAP;.
Here are some typical examples.
<P/>
<List>
<Item>
    <Ref Filt="IsDomain"/> is implied by each domain category,
</Item>
<Item>
    <Ref Filt="IsMagma"/> is implied by each category that describes the
    closure under multiplication <C>*</C>,
</Item>
<Item>
    <Ref Filt="IsAdditiveMagma"/> is implied by each category that describes
    the closure under addition <C>+</C>,
</Item>
<Item>
    <Ref Filt="IsMagmaWithOne"/> implies <Ref Filt="IsMagma"/>;
    a <E>magma-with-one</E> is a magma such that each element
    (and thus also the magma itself) can be asked for its zeroth power,
</Item>
<Item>
    <Ref Filt="IsMagmaWithInverses"/> implies <Ref Filt="IsMagmaWithOne"/>;
    a <E>magma-with-inverses</E> is a magma such that each element
    can be asked for its inverse;
    important special cases are <E>groups</E>,
    which in addition are associative,
</Item>
<Item>
    a <E>ring</E> is a magma that is also an additive group,
</Item>
<Item>
    a <E>ring-with-one</E> is a ring that is also a magma-with-one,
</Item>
<Item>
    a <E>division ring</E> is a ring-with-one that is also closed under taking
    inverses of nonzero elements,
</Item>
<Item>
    a <E>field</E> is a commutative division ring.
</Item>
</List>
<P/>
Each operational structure <A>Struct</A> has associated with it
a domain category <C>Is<A>Struct</A></C>,
and operations <C><A>Struct</A>ByGenerators</C> for constructing a domain
from generators,
<C>GeneratorsOf<A>Struct</A></C> for storing and accessing generators
w.r.t.&nbsp;this structure,
<C>Closure<A>Struct</A></C> for forming the closure,
and <C>As<A>Struct</A></C> for getting a domain with the desired structure
from one with weaker operational structure and for testing whether a given
domain can be regarded as a domain with <A>Struct</A>.
<P/>
The functions applicable to domains with the various structures
are described in the corresponding chapters of the Reference Manual.
For example, functions for rings, fields, groups, and vector spaces
are described in Chapters&nbsp;<Ref Chap="Rings"/>,
<Ref Chap="Fields and Division Rings"/>,
<Ref Chap="Groups"/>, and <Ref Chap="Vector Spaces"/>, respectively.
More general functions for arbitrary collections can be found in
Chapter&nbsp;<Ref Chap="Collections"/>.

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Parents">
<Heading>Parents</Heading>

<#Include Label="Parent">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Constructing Subdomains">
<Heading>Constructing Subdomains</Heading>

<Index>Subdomains</Index>
For many domains <A>D</A>, there are functions that construct certain subsets <A>S</A>
of <A>D</A> as domains with parent (see&nbsp;<Ref Sect="Parents"/>) already set to <A>D</A>.
For example, if <A>G</A> is a group that contains the elements in the list <A>gens</A>
then <C>Subgroup( <A>G</A>, <A>gens</A> )</C> returns a group <A>S</A> that is generated by the
elements in <A>gens</A> and with <C>Parent( <A>S</A> ) = <A>G</A></C>.
<P/>
<Index Key="Substruct"><C>Sub<A>struct</A></C></Index>
<C>Sub<A>struct</A>( <A>D</A>, <A>gens</A> )</C>
<P/>
More general, if <A>D</A> is a domain whose algebraic structure is given by the
function <A>Struct</A> (for example <C>Group</C>, <C>Algebra</C>, <C>Field</C>)
then the function <C>Sub<A>struct</A></C> (for example <C>Subgroup</C>, <C>Subalgebra</C>,
<C>Subfield</C>) returns domains with structure <A>Struct</A> and parent set to
the first argument.
<P/>
<Index Key="SubstructNC"><C>Sub<A>struct</A>NC</C></Index>
<C>Sub<A>struct</A>NC( <A>D</A>, <A>gens</A> )</C>
<P/>
Each function <C>Sub<A>struct</A></C> checks that the <A>Struct</A> generated by
<A>gens</A> is in fact a subset of <A>D</A>.
If one wants to omit this check then one can call <C>Sub<A>struct</A>NC</C> instead;
the suffix <C>NC</C> stands for <Q>no  check</Q>.
<P/>
<Index Key="AsSubstruct"><C>AsSub<A>struct</A></C></Index>
<C>AsSub<A>struct</A>( <A>D</A>, <A>S</A> )</C>
<P/>
first constructs <C>As<A>Struct</A>( [<A>info</A>, ]<A>S</A> )</C>,
where <A>info</A> depends on <A>D</A> and <A>S</A>,
and then sets the parent (see&nbsp;<Ref Sect="Parents"/>) of this new domain to <A>D</A>.
<P/>
<Index Key="IsSubstruct"><C>IsSub<A>struct</A></C></Index>
<C>IsSub<A>struct</A>( <A>D</A>, <A>S</A> )</C>
<P/>
There is no real need for functions that check whether a domain <A>S</A> is a
<C>Sub<A>struct</A></C> of a domain <A>D</A>,
since this is equivalent to the checks whether <A>S</A> is a <A>Struct</A> and <A>S</A>
is a subset of <A>D</A>.
Note that in many cases, only the subset relation is what one really wants
to check, and that appropriate methods for the operation
<Ref Oper="IsSubset"/> are available for many special situations,
such as the test whether a group is contained in another group,
where only generators need to be checked.
<P/>
If a function <C>IsSub<A>struct</A></C> is available in &GAP; then it is implemented
as first a call to <C>Is<A>Struct</A></C> for the second argument and then a call to
<Ref Oper="IsSubset"/> for the two arguments.

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Operations for Domains">
<Heading>Operations for Domains</Heading>

For the meaning of the attributes <Ref Attr="Characteristic"/>,
<Ref Attr="One"/>, <Ref Attr="Zero"/>
in the case of a domain argument,
see&nbsp;<Ref Sect="Attributes and Properties of Elements"/>.

<#Include Label="IsGeneralizedDomain">
<#Include Label="GeneratorsOfDomain">
<#Include Label="Domain">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Attributes and Properties of Elements">
<Heading>Attributes and Properties of Elements</Heading>

The following attributes and properties for elements and domains
correspond to the operational structure.

<#Include Label="Characteristic">
<#Include Label="OneImmutable">
<#Include Label="ZeroImmutable">
<#Include Label="MultiplicativeZeroOp">
<#Include Label="IsOne">
<#Include Label="IsZero">
<#Include Label="IsIdempotent">
<#Include Label="InverseImmutable">
<#Include Label="AdditiveInverseImmutable">
<#Include Label="Order">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Comparison Operations for Elements">
<Heading>Comparison Operations for Elements</Heading>

Binary comparison operations have been introduced already in
<Ref Sect="Comparisons"/>.
The underlying operations for which methods can be installed are the
following.


<ManSection>
<Heading>\= and \&lt;</Heading>
<Oper Name="\=" Arg='left-expr, right-expr'/>
<Oper Name="\&lt;" Arg='left-expr, right-expr'/>

<Description>
<Index Subkey="operation">equality</Index>
<Index Subkey="operation">comparison</Index>
Note that the comparisons via <C>&lt;></C>, <C>&lt;=</C>, <C>></C>,
and <C>>=</C>
are delegated to the operations <Ref Oper="\="/> and <Ref Oper="\&lt;"/>.
<P/>
In general, objects in <E>different</E> families cannot be compared with
<Ref Oper="\&lt;"/>.
For the reason and for exceptions from this rule,
see&nbsp;<Ref Sect="Comparisons"/>.
</Description>
</ManSection>

<#Include Label="CanEasilyCompareElements">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Arithmetic Operations for Elements">
<Heading>Arithmetic Operations for Elements</Heading>

<E>Binary</E> arithmetic operations have been introduced already in
<Ref Sect="Arithmetic Operators"/>.
The underlying operations for which methods can be installed are the
following.

<ManSection>
<Heading>\+, \*, \/, \^, \mod</Heading>
<Oper Name="\+" Arg='left-expr, right-expr'/>
<Oper Name="\*" Arg='left-expr, right-expr'/>
<Oper Name="\/" Arg='left-expr, right-expr'/>
<Oper Name="\^" Arg='left-expr, right-expr'/>
<Oper Name="\mod" Arg='left-expr, right-expr'/>

<Description>
<Index Subkey="operation">addition</Index>
<Index Subkey="operation">multiplication</Index>
<Index Subkey="operation">division</Index>
<Index Subkey="operation">exponentiation</Index>
<Index Subkey="operation">remainder</Index>
For details about special methods for <Ref Oper="\*"/>,
<Ref Oper="\/"/>, <Ref Oper="\^"/> and <Ref Oper="\mod"/>,
consult the appropriate index entries for them.
<!-- % (no Declaration available for them?) -->
</Description>
</ManSection>


<#Include Label="LeftQuotient">
<#Include Label="Comm">
<#Include Label="LieBracket">
<#Include Label="Sqrt">

<!-- % missing facts about the others ... -->

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Relations Between Domains">
<Heading>Relations Between Domains</Heading>

Domains are often constructed relative to other domains.
The probably most usual case is to form a <E>subset</E> of a domain,
for example the intersection
(see&nbsp;<Ref Func="Intersection" Label="for a list"/>) of two domains,
or a Sylow subgroup of a given group (see&nbsp;<Ref Oper="SylowSubgroup"/>).
<P/>
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.
<P/>
Since usually the new domain has access to the knowledge of the old domain(s)
only when it is created (see&nbsp;<Ref Sect="Constructing Subdomains"/> for the exception),
this is the right moment to take advantage of the subset relation,
using <Ref Oper="UseSubsetRelation"/>.
<P/>
Analogous relations occur when a <E>factor structure</E> is created from a
domain and a subset (see <Ref Oper="UseFactorRelation"/>),
and when a domain <E>isomorphic</E> to a given one is created
(see <Ref Oper="UseIsomorphismRelation"/>).
<P/>
The functions <Ref Func="InstallSubsetMaintenance"/>,
<Ref Func="InstallIsomorphismMaintenance"/>, and
<Ref Func="InstallFactorMaintenance"/> 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 or property is created,
see&nbsp;<Ref Func="NewAttribute"/> and <Ref Func="NewProperty"/>.
For the attributes already available,
such as <Ref Prop="IsFinite"/> and <Ref Prop="IsCommutative"/>,
the maintenances are already notified.

<#Include Label="UseSubsetRelation">
<#Include Label="UseFactorRelation">
<#Include Label="UseIsomorphismRelation">

<#Include Label="InstallSubsetMaintenance">
<#Include Label="InstallFactorMaintenance">
<#Include Label="InstallIsomorphismMaintenance">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Useful Categories of Elements">
<Heading>Useful Categories of Elements</Heading>

This section and the following one are rather technical,
and may be interesting only for those &GAP; users who want to implement
new kinds of elements.
<P/>
It deals with certain categories of elements that are useful mainly for the
design of elements, from the viewpoint that one wants to form certain domains
of these elements.
For example, a domain closed under multiplication <C>*</C> (a so-called magma,
see Chapter&nbsp;<Ref Chap="Magmas"/>) makes sense only if its elements can be multiplied,
and the latter is indicated by the category
<Ref Filt="IsMultiplicativeElement"/> for each element.
Again note that the underlying idea is that a domain is regarded as
<E>generated</E> by given elements, and that these elements carry information
about the desired domain.
For general information on categories and their hierarchies,
see&nbsp;<Ref Sect="Categories"/>.
<P/>
More special categories of this kind are described in the contexts where
they arise,
they are <Ref Filt="IsRowVector"/>,
<Ref Filt="IsMatrix"/>,
<Ref Filt="IsOrdinaryMatrix"/>,
and <Ref Filt="IsLieMatrix"/>.
<P/>
<#Include Label="IsExtAElement">
<#Include Label="IsNearAdditiveElement">
<#Include Label="IsAdditiveElement">
<#Include Label="IsNearAdditiveElementWithZero">
<#Include Label="IsAdditiveElementWithZero">
<#Include Label="IsNearAdditiveElementWithInverse">
<#Include Label="IsAdditiveElementWithInverse">
<#Include Label="IsExtLElement">
<#Include Label="IsExtRElement">
<#Include Label="IsMultiplicativeElement">
<#Include Label="IsMultiplicativeElementWithOne">
<#Include Label="IsMultiplicativeElementWithZero">
<#Include Label="IsMultiplicativeElementWithInverse">
<#Include Label="IsVector">
<#Include Label="IsNearRingElement">
<#Include Label="IsRingElement">
<#Include Label="IsNearRingElementWithOne">
<#Include Label="IsRingElementWithOne">
<#Include Label="IsNearRingElementWithInverse">
<#Include Label="IsRingElementWithInverse">

</Section>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<Section Label="Useful Categories for all Elements of a Family">
<Heading>Useful Categories for all Elements of a Family</Heading>

The following categories of elements are to be understood mainly as
categories for all objects in a family,
they are usually used as third argument of <Ref Func="NewFamily"/>.
The purpose of each of the following categories is then to guarantee that
each collection of its elements automatically lies in its collections
category (see&nbsp;<Ref Func="CategoryCollections"/>).
<P/>
For example, the multiplication of permutations is associative,
and it is stored in the family of permutations that each permutation lies
in <Ref Filt="IsAssociativeElement"/>.
As a consequence, each magma consisting of permutations
(more precisely: each collection that lies in the family
<C>CollectionsFamily( PermutationsFamily )</C>,
see&nbsp;<Ref Attr="CollectionsFamily"/>)
automatically lies in <C>CategoryCollections( IsAssociativeElement )</C>.
A magma in this category is always known to be associative, via a logical
implication (see&nbsp;<Ref Sect="Logical Implications"/>).
<P/>
Similarly, if a family knows that all its elements are in the categories
<Ref Filt="IsJacobianElement"/> and <Ref Filt="IsZeroSquaredElement"/>,
then each algebra of these elements is automatically known to be a
Lie algebra (see Chapter&nbsp;<Ref Chap="Algebras"/>).

<#Include Label="IsAssociativeElement">
<#Include Label="IsAdditivelyCommutativeElement">
<#Include Label="IsCommutativeElement">
<#Include Label="IsFiniteOrderElement">
<#Include Label="IsJacobianElement">
<#Include Label="IsZeroSquaredElement">

</Section>
</Chapter>


<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<!-- %% -->
<!-- %E -->