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

Views: 418346
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<!-- $Id: basics.xml,v 0.998 Exp $ -->
4
<Chapter>
5
<Heading>Basics</Heading>
6
We give some examples of semigroups to be used later. We also describe some basic functions
7
that are not directly available from <Package>GAP</Package>, but are useful
8
for the purposes of this package.
9
<Section>
10
<Heading>Examples </Heading>These are some examples of semigroups that will be used through this manual
11
<Example><![CDATA[
12
gap> f := FreeMonoid("a","b");
13
<free monoid on the generators [ a, b ]>
14
gap> a := GeneratorsOfMonoid( f )[ 1 ];;
15
gap> b := GeneratorsOfMonoid( f )[ 2 ];;
16
gap> r:=[[a^3,a^2],
17
> [a^2*b,a^2],
18
> [b*a^2,a^2],
19
> [b^2,a^2],
20
> [a*b*a,a],
21
> [b*a*b,b] ];
22
[ [ a^3, a^2 ], [ a^2*b, a^2 ], [ b*a^2, a^2 ], [ b^2, a^2 ], [ a*b*a, a ],
23
[ b*a*b, b ] ]
24
gap> b21:= f/r;
25
<fp monoid on the generators [ a, b ]>
26
]]></Example>
27
28
<Example><![CDATA[
29
gap> g0:=Transformation([4,1,2,4]);;
30
gap> g1:=Transformation([1,3,4,4]);;
31
gap> g2:=Transformation([2,4,3,4]);;
32
gap> poi3:= Monoid(g0,g1,g2);
33
<monoid with 3 generators>
34
]]></Example>
35
36
</Section>
37
38
<Section>
39
<Heading>Some attributes</Heading>
40
These functions are semigroup attributes that get stored once computed.
41
<ManSection>
42
<Attr Arg="M" Name="HasCommutingIdempotents" />
43
<Description>Tests whether the idempotents of the semigroup
44
<Arg>M </Arg>commute. </Description>
45
</ManSection>
46
<ManSection>
47
<Attr Arg="S" Name="IsInverseSemigroup" />
48
<Description>Tests whether a finite semigroup
49
<Arg>S </Arg>is inverse. It is well-known that it suffices to test whether the idempotents of
50
<Arg>S </Arg>commute and
51
<Arg>S </Arg>is regular. The function
52
<Code>IsRegularSemigroup </Code>is part of
53
<Package>GAP</Package>. </Description>
54
</ManSection>
55
</Section>
56
57
<Section>
58
<Heading>Some basic functions</Heading>
59
<ManSection>
60
<Func Arg="L" Name="PartialTransformation" />
61
<Description>A partial transformation is a partial function of a set of integers of
62
the form <M>\{1,\dots, n\}</M>. It is given by means of the list of images <Arg>L</Arg>. When
63
an element has no image, we write 0.
64
Returns a full transformation on a set with one more element that acts like
65
a zero.</Description>
66
</ManSection>
67
68
<Example><![CDATA[
69
gap> PartialTransformation([2,0,4,0]);
70
Transformation( [ 2, 5, 4, 5, 5 ] )
71
]]></Example>
72
73
<ManSection>
74
<Func Arg="L" Name="ReduceNumberOfGenerators" />
75
<Description>Given a subset <Arg>L</Arg> of the generators
76
of a semigroup, returns a list of generators of the same semigroup but
77
possibly with less elements than <Arg>L</Arg>.</Description>
78
</ManSection>
79
80
81
<ManSection>
82
<Func Arg="S,L" Name="SemigroupFactorization" />
83
<Description><Arg>L</Arg> is an element (or list of elements) of the semigroup <Arg>S</Arg>.
84
Returns a minimal factorization on the generators of <Arg>S</Arg> of the
85
element(s) of <Arg>L</Arg>. Works only for transformation semigroups.</Description>
86
</ManSection>
87
<Example><![CDATA[
88
gap> el1 := Transformation( [ 2, 3, 4, 4 ] );;
89
gap> el2 := Transformation( [ 2, 4, 3, 4 ] );;
90
gap> f1 := SemigroupFactorization(poi3,el1);
91
[ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ] ]
92
gap> f1[1][1] * f1[1][2] = el1;
93
true
94
gap> SemigroupFactorization(poi3,[el1,el2]);
95
[ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ],
96
[ Transformation( [ 2, 4, 3, 4 ] ) ] ]
97
]]></Example>
98
99
100
101
<ManSection>
102
<Func Arg="mat" Name="GrahamBlocks" />
103
<Description><Arg>mat</Arg> is a matrix as displayed by
104
<C>DisplayEggBoxOfDClass(D);</C> of a regular D-class <C>D</C>.
105
This function outputs a list <C>[gmat, phi]</C> where <C>gmat</C> is
106
<Arg>mat</Arg> in Graham's blocks form and <C>phi</C> maps H-classes
107
of <C>gmat</C> to the corresponding ones of <Arg>mat</Arg>, i.e.,
108
<C>phi[i][j] = [i',j']</C> where <C>mat[i'][j'] = gmat[i][j]</C>.
109
If the argument to this function is not a matrix corresponding to
110
a regular D-class, the function may abort in error.
111
</Description>
112
</ManSection>
113
<Example><![CDATA[
114
gap> p1 := PartialTransformation([6,2,0,0,2,6,0,0,10,10,0,0]);;
115
gap> p2 := PartialTransformation([0,0,1,5,0,0,5,9,0,0,9,1]);;
116
gap> p3 := PartialTransformation([0,0,3,3,0,0,7,7,0,0,11,11]);;
117
gap> p4 := PartialTransformation([4,4,0,0,8,8,0,0,12,12,0,0]);;
118
gap> css3:=Semigroup(p1,p2,p3,p4);
119
<transformation semigroup of degree 13 with 4 generators>
120
gap> el := Elements(css3)[8];;
121
gap> D := GreensDClassOfElement(css3, el);;
122
gap> IsRegularDClass(D);
123
true
124
gap> DisplayEggBoxOfDClass(D);
125
[ [ 1, 1, 0, 0 ],
126
[ 1, 1, 0, 0 ],
127
[ 0, 0, 1, 1 ],
128
[ 0, 0, 1, 1 ] ]
129
gap> mat := [ [ 1, 0, 1, 0 ],
130
> [ 0, 1, 0, 1 ],
131
> [ 0, 1, 0, 1 ],
132
> [ 1, 0, 1, 0 ] ];;
133
gap> res := GrahamBlocks(mat);;
134
gap> PrintArray(res[1]);
135
[ [ 1, 1, 0, 0 ],
136
[ 1, 1, 0, 0 ],
137
[ 0, 0, 1, 1 ],
138
[ 0, 0, 1, 1 ] ]
139
gap> PrintArray(res[2]);
140
[ [ [ 1, 1 ], [ 1, 3 ], [ 1, 2 ], [ 1, 4 ] ],
141
[ [ 4, 1 ], [ 4, 3 ], [ 4, 2 ], [ 4, 4 ] ],
142
[ [ 2, 1 ], [ 2, 3 ], [ 2, 2 ], [ 2, 4 ] ],
143
[ [ 3, 1 ], [ 3, 3 ], [ 3, 2 ], [ 3, 4 ] ] ]
144
]]></Example>
145
<!--
146
<Example><![CDATA[
147
]]</Example>
148
-->
149
</Section>
150
151
<Section>
152
<Heading>Cayley graphs</Heading>
153
<ManSection>
154
<Func Arg="S" Name="RightCayleyGraphAsAutomaton"></Func>
155
<Description>Computes the right Cayley graph of a finite monoid or semigroup <Arg>S</Arg>. It uses the
156
<Package>GAP</Package>
157
buit-in function <Code>CayleyGraphSemigroup</Code> to compute the Cayley Graph
158
and returns it as an automaton without initial nor final states.
159
(In this automaton state <C>i</C> represents the element <C>Elements(S)[i]</C>.)
160
The <Package>Automata</Package> package is used to this effect.
161
</Description>
162
</ManSection>
163
164
<Example><![CDATA[
165
gap> rcg := RightCayleyGraphAsAutomaton(b21);
166
< deterministic automaton on 2 letters with 6 states >
167
gap> Display(rcg);
168
| 1 2 3 4 5 6
169
-----------------------
170
a | 2 4 6 4 2 4
171
b | 3 5 4 4 4 3
172
Initial state: [ ]
173
Accepting state: [ ]
174
]]></Example>
175
176
<ManSection>
177
<Func Arg="S" Name="RightCayleyGraphMonoidAsAutomaton" />
178
<Description>This function is a synonym of
179
<Ref Func="RightCayleyGraphAsAutomaton"/>.
180
</Description>
181
</ManSection>
182
183
184
185
</Section>
186
187
</Chapter>
188
189