File: semigrp.gd

package info (click to toggle)
gap 4r4p12-2
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 29,584 kB
  • ctags: 7,113
  • sloc: ansic: 98,786; sh: 3,299; perl: 2,263; makefile: 498; asm: 63; awk: 6
file content (286 lines) | stat: -rw-r--r-- 9,896 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
#############################################################################
##
#W  semigrp.gd                  GAP library                     Thomas Breuer
##
#H  @(#)$Id: semigrp.gd,v 4.36.2.1 2007/08/28 10:56:05 gap Exp $
##
#Y  Copyright (C)  1997,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
#Y  (C) 1998 School Math and Comp. Sci., University of St.  Andrews, Scotland
#Y  Copyright (C) 2002 The GAP Group
##
##  This file contains the declaration of operations for semigroups.
##
Revision.semigrp_gd :=
    "@(#)$Id: semigrp.gd,v 4.36.2.1 2007/08/28 10:56:05 gap Exp $";


#############################################################################
##
#P  IsSemigroup( <D> )
##
##  returns `true' if the object <D> is a semigroup.
##  \index{semigroup}
##  A *semigroup* is a magma (see~"Magmas") with associative multiplication.
##
DeclareSynonymAttr( "IsSemigroup", IsMagma and IsAssociative );



#############################################################################
##
#F  Semigroup( <gen1>, <gen2> ... ) . . . . semigroup generated by collection
#F  Semigroup( <gens> ) . . . . . . . . . . semigroup generated by collection
##
##  In the first form, `Semigroup' returns the semigroup generated by the
##  arguments <gen1>, <gen2>, \dots,
##  that is, the closure of these elements under multiplication.
##  In the second form, `Semigroup' returns the semigroup generated by the
##  elements in the homogeneous list <gens>;
##  a square matrix as only argument is treated as one generator,
##  not as a list of generators.
##
##  It is *not* checked whether the underlying multiplication is associative,
##  use `Magma' (see~"Magma") and `IsAssociative' (see~"IsAssociative")
##  if you want to check whether a magma is in fact a semigroup.
##
DeclareGlobalFunction( "Semigroup" );


#############################################################################
##
#F  Subsemigroup( <S>, <gens> ) . . .  subsemigroup of <S> generated by <gens>
#F  SubsemigroupNC( <S>, <gens> ) . .  subsemigroup of <S> generated by <gens>
##
##  are just synonyms of `Submagma' and `SubmagmaNC', respectively
##  (see~"Submagma").
##
DeclareSynonym( "Subsemigroup", Submagma );

DeclareSynonym( "SubsemigroupNC", SubmagmaNC );


#############################################################################
##
#O  SemigroupByGenerators( <gens> ) . . . . . . semigroup generated by <gens>
##
##  is the underlying operation of `Semigroup' (see~"Semigroup").
##
DeclareOperation( "SemigroupByGenerators", [ IsCollection ] );


#############################################################################
##
#A  AsSemigroup( <C> )  . . . . . . . .  collection <C> regarded as semigroup
##
##  If <C> is a collection whose elements form a semigroup
##  (see~"IsSemigroup") then `AsSemigroup' returns this semigroup.
##  Otherwise `fail' is returned.
##
DeclareAttribute( "AsSemigroup", IsCollection );


#############################################################################
##
#O  AsSubsemigroup( <D>, <C> )
##
##  Let <D> be a domain and <C> a collection.
##  If <C> is a subset of <D> that forms a semigroup then `AsSubsemigroup'
##  returns this semigroup, with parent <D>.
##  Otherwise `fail' is returned.
##
DeclareOperation( "AsSubsemigroup", [ IsDomain, IsCollection ] );


#############################################################################
##
#A  GeneratorsOfSemigroup( <S> ) . . .  semigroup generators of semigroup <S>
##
##  Semigroup generators of a semigroup <D> are the same as magma generators
##  (see~"GeneratorsOfMagma").
##
DeclareSynonymAttr( "GeneratorsOfSemigroup", GeneratorsOfMagma );

#############################################################################
##
#A  CayleyGraphSemigroup( <S> ) 
#A  CayleyGraphDualSemigroup( <S> )
##
##
DeclareAttribute("CayleyGraphSemigroup",IsSemigroup);
DeclareAttribute("CayleyGraphDualSemigroup",IsSemigroup);

#############################################################################
##
#F  FreeSemigroup( [<wfilt>,]<rank> )
#F  FreeSemigroup( [<wfilt>,]<rank>, <name> )
#F  FreeSemigroup( [<wfilt>,]<name1>, <name2>, ... )
#F  FreeSemigroup( [<wfilt>,]<names> )
#F  FreeSemigroup( [<wfilt>,]infinity, <name>, <init> )
##
##  Called in the first form, `FreeSemigroup' returns a free semigroup on
##  <rank> generators.
##  Called in the second form, `FreeSemigroup' returns a free semigroup on
##  <rank> generators, printed as `<name>1', `<name>2' etc.,
##  that is, each name is the concatenation of the string <name> and an
##  integer from `1' to <range>.
##  Called in the third form, `FreeSemigroup' returns a free semigroup on
##  as many generators as arguments, printed as <name1>, <name2> etc.
##  Called in the fourth form, `FreeSemigroup' returns a free semigroup on
##  as many generators as the length of the list <names>, the $i$-th
##  generator being printed as `<names>[$i$]'.
##  Called in the fifth form, `FreeSemigroup' returns a free semigroup on
##  infinitely many generators, where the first generators are printed
##  by the names in the list <init>, and the other generators by <name>
##  and an appended number.
##
##  If the extra argument <wfilt> is given, it must be either
##  `IsSyllableWordsFamily' or `IsLetterWordsFamily' or
##  `IsWLetterWordsFamily' or `IsBLetterWordsFamily'. The filter then
##  specifies the representation used for the elements of the free group
##  (see~"Representations for Associative Words"). If no such filter is
##  given, a letter representation is used.
##
DeclareGlobalFunction( "FreeSemigroup" );

#############################################################################
##
#P  IsZeroGroup( <S> )  
##
##  is `true' if and only if the semigroup is a group with zero
##  adjoined.
##
DeclareProperty( "IsZeroGroup", IsSemigroup );

#############################################################################
##
#P  IsSimpleSemigroup( <S> )  
##
##  is `true' if and only if the semigroup has no proper ideals.
##
DeclareProperty( "IsSimpleSemigroup", IsSemigroup );


#############################################################################
##
#P  IsZeroSimpleSemigroup( <S> )  
##
##  is `true' if and only if the semigroup has no proper ideals except for 0,
##  where <S> is a semigroup with zero. 
##  If the semigroup does not find its zero, then a break-loop is entered.
##
DeclareProperty( "IsZeroSimpleSemigroup", IsSemigroup );


############################################################################
##
#A  ANonReesCongruenceOfSemigroup( <S> )
##
##  for a semigroup <S>, returns a non-Rees congruence if one exists
##  or otherwise returns `fail'.
##
DeclareAttribute("ANonReesCongruenceOfSemigroup",IsSemigroup);


############################################################################
##
#P  IsReesCongruenceSemigroup( <S> )
##
##  returns `true' if <S> is a Rees Congruence semigroup, that is,
##  if all congruences of <S> are Rees Congruences.
##
DeclareProperty( "IsReesCongruenceSemigroup", IsSemigroup );


#############################################################################
##
#O  HomomorphismFactorSemigroup( <S>, <C> )
#O  HomomorphismFactorSemigroupByClosure( <S>, <L> )
#O  FactorSemigroup( <S>, <C> )
#O  FactorSemigroupByClosure( <S>, <L> )
##
##  each find the quotient of <S> by a congruence.
##
##  In the first form <C> is a congruence and HomomorphismFactorSemigroup, 
##  returns a homomorphism $<S> \rightarrow <S>/<C>$.
##
##  In the second form, <L> is a list of pairs of elements of <S>.
##  Returns a homomorphism $<S> \rightarrow <S>/<C>$,
##  where <C> is the congruence generated by <L>.
##
##  `FactorSemigroup(<S>, <C>)' returns 
##    `Range( HomomorphismFactorSemigroup(<S>, <C>) )'.
##
##  `FactorSemigroupByClosure(<S>, <L>)' returns 
##    `Range( HomomorphismFactorSemigroupByClosure(<S>, <L>) )'.
##  
##
DeclareOperation( "HomomorphismFactorSemigroup",  
	[ IsSemigroup, IsSemigroupCongruence ] );

DeclareOperation( "HomomorphismFactorSemigroupByClosure",  
	[ IsSemigroup, IsList ] );

DeclareOperation( "FactorSemigroup",  
	[ IsSemigroup, IsSemigroupCongruence ] );

DeclareOperation( "FactorSemigroupByClosure",  
	[ IsSemigroup, IsList ] );


#############################################################################
##
#O  IsRegularSemigroupElement( <S>, <x> )
##
##  returns `true' if <x> has a general inverse in <S>---i.e. there is an 
##  element $y\in S$ such that $xyx=x$ and $yxy=y$.
##  
DeclareOperation("IsRegularSemigroupElement", [IsSemigroup, 
    IsAssociativeElement]);

#############################################################################
##
#P  IsRegularSemigroup( <S> )
##
##  returns `true' if <S> is regular---i.e. if every D class of <S> is regular.
##
DeclareProperty("IsRegularSemigroup", IsSemigroup);

#############################################################################
##
#M  IsInverseSemigroup( <S> );
##  <#GAPDoc Label="IsInverseSemigroup">
##  <ManSection>
##  <Prop Name="IsInverseSemigroup" Arg='S'/>
##
##  <Description>
##  returns <K>true</K> if <A>S</A> is an inverse semigroup---i.e. if every element of <A>S</A> has a unique (semigroup) inverse.
##  </Description>
##  </ManSection>
##  <#/GAPDoc>
##

DeclareProperty("IsInverseSemigroup", IsSemigroup);

#############################################################################
##
#O  DisplaySemigroup( <S> )
##
##  Produces a convenient display of a semigroup's DClass
##  structure.   Let <S> have degree $n$.   Then for each $r\leq n$, we
##  show all D classes of rank $n$.   
##
##  A regular D class with a single H class of size 120 appears as
##  \beginexample
##  *[H size = 120, 1 L classes, 1 R classes] 
##  \endexample
##  (the \* denoting regularity).
##
##
DeclareOperation("DisplaySemigroup", 
    [IsSemigroup]);


#############################################################################
##
#E