Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 4183461[1X2 [33X[0;0YBasics[133X[101X23[33X[0;0YWe give some examples of semigroups to be used later. We also describe some4basic functions that are not directly available from [5XGAP[105X, but are useful for5the purposes of this package.[133X678[1X2.1 [33X[0;0YExamples[133X[101X910[33X[0;0YThese are some examples of semigroups that will be used through this manual[133X1112[4X[32X Example [32X[104X13[4X[25Xgap>[125X [27Xf := FreeMonoid("a","b");[127X[104X14[4X[28X<free monoid on the generators [ a, b ]>[128X[104X15[4X[25Xgap>[125X [27Xa := GeneratorsOfMonoid( f )[ 1 ];;[127X[104X16[4X[25Xgap>[125X [27Xb := GeneratorsOfMonoid( f )[ 2 ];;[127X[104X17[4X[25Xgap>[125X [27Xr:=[[a^3,a^2],[127X[104X18[4X[25X>[125X [27X[a^2*b,a^2],[127X[104X19[4X[25X>[125X [27X[b*a^2,a^2],[127X[104X20[4X[25X>[125X [27X[b^2,a^2],[127X[104X21[4X[25X>[125X [27X[a*b*a,a],[127X[104X22[4X[25X>[125X [27X[b*a*b,b] ];[127X[104X23[4X[28X[ [ a^3, a^2 ], [ a^2*b, a^2 ], [ b*a^2, a^2 ], [ b^2, a^2 ], [ a*b*a, a ], [128X[104X24[4X[28X [ b*a*b, b ] ][128X[104X25[4X[25Xgap>[125X [27Xb21:= f/r;[127X[104X26[4X[28X<fp monoid on the generators [ a, b ]>[128X[104X27[4X[28X [128X[104X28[4X[32X[104X2930[4X[32X Example [32X[104X31[4X[25Xgap>[125X [27Xg0:=Transformation([4,1,2,4]);;[127X[104X32[4X[25Xgap>[125X [27Xg1:=Transformation([1,3,4,4]);;[127X[104X33[4X[25Xgap>[125X [27Xg2:=Transformation([2,4,3,4]);;[127X[104X34[4X[25Xgap>[125X [27Xpoi3:= Monoid(g0,g1,g2);[127X[104X35[4X[28X<monoid with 3 generators>[128X[104X36[4X[28X [128X[104X37[4X[32X[104X383940[1X2.2 [33X[0;0YSome attributes[133X[101X4142[33X[0;0YThese functions are semigroup attributes that get stored once computed.[133X4344[1X2.2-1 HasCommutingIdempotents[101X4546[29X[2XHasCommutingIdempotents[102X( [3XM[103X ) [32X attribute4748[33X[0;0YTests whether the idempotents of the semigroup [3XM [103Xcommute.[133X4950[1X2.2-2 IsInverseSemigroup[101X5152[29X[2XIsInverseSemigroup[102X( [3XS[103X ) [32X attribute5354[33X[0;0YTests whether a finite semigroup [3XS [103Xis inverse. It is well-known that it55suffices to test whether the idempotents of [3XS [103Xcommute and [3XS [103Xis regular. The56function [10XIsRegularSemigroup [110Xis part of [5XGAP[105X.[133X575859[1X2.3 [33X[0;0YSome basic functions[133X[101X6061[1X2.3-1 PartialTransformation[101X6263[29X[2XPartialTransformation[102X( [3XL[103X ) [32X function6465[33X[0;0YA partial transformation is a partial function of a set of integers of the66form [22X{1,dots, n}[122X. It is given by means of the list of images [3XL[103X. When an67element has no image, we write 0. Returns a full transformation on a set68with one more element that acts like a zero.[133X6970[4X[32X Example [32X[104X71[4X[25Xgap>[125X [27XPartialTransformation([2,0,4,0]);[127X[104X72[4X[28XTransformation( [ 2, 5, 4, 5, 5 ] )[128X[104X73[4X[28X [128X[104X74[4X[32X[104X7576[1X2.3-2 ReduceNumberOfGenerators[101X7778[29X[2XReduceNumberOfGenerators[102X( [3XL[103X ) [32X function7980[33X[0;0YGiven a subset [3XL[103X of the generators of a semigroup, returns a list of81generators of the same semigroup but possibly with less elements than [3XL[103X.[133X8283[1X2.3-3 SemigroupFactorization[101X8485[29X[2XSemigroupFactorization[102X( [3XS[103X, [3XL[103X ) [32X function8687[33X[0;0Y[3XL[103X is an element (or list of elements) of the semigroup [3XS[103X. Returns a minimal88factorization on the generators of [3XS[103X of the element(s) of [3XL[103X. Works only for89transformation semigroups.[133X9091[4X[32X Example [32X[104X92[4X[25Xgap>[125X [27Xel1 := Transformation( [ 2, 3, 4, 4 ] );;[127X[104X93[4X[25Xgap>[125X [27Xel2 := Transformation( [ 2, 4, 3, 4 ] );;[127X[104X94[4X[25Xgap>[125X [27Xf1 := SemigroupFactorization(poi3,el1);[127X[104X95[4X[28X[ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ] ][128X[104X96[4X[25Xgap>[125X [27Xf1[1][1] * f1[1][2] = el1;[127X[104X97[4X[28Xtrue[128X[104X98[4X[25Xgap>[125X [27XSemigroupFactorization(poi3,[el1,el2]);[127X[104X99[4X[28X[ [ Transformation( [ 1, 3, 4, 4 ] ), Transformation( [ 2, 4, 3, 4 ] ) ],[128X[104X100[4X[28X [ Transformation( [ 2, 4, 3, 4 ] ) ] ][128X[104X101[4X[32X[104X102103[1X2.3-4 GrahamBlocks[101X104105[29X[2XGrahamBlocks[102X( [3Xmat[103X ) [32X function106107[33X[0;0Y[3Xmat[103X is a matrix as displayed by [10XDisplayEggBoxOfDClass(D);[110X of a regular108D-class [10XD[110X. This function outputs a list [10X[gmat, phi][110X where [10Xgmat[110X is [3Xmat[103X in109Graham's blocks form and [10Xphi[110X maps H-classes of [10Xgmat[110X to the corresponding110ones of [3Xmat[103X, i.e., [10Xphi[i][j] = [i',j'][110X where [10Xmat[i'][j'] = gmat[i][j][110X. If111the argument to this function is not a matrix corresponding to a regular112D-class, the function may abort in error.[133X113114[4X[32X Example [32X[104X115[4X[25Xgap>[125X [27Xp1 := PartialTransformation([6,2,0,0,2,6,0,0,10,10,0,0]);;[127X[104X116[4X[25Xgap>[125X [27Xp2 := PartialTransformation([0,0,1,5,0,0,5,9,0,0,9,1]);;[127X[104X117[4X[25Xgap>[125X [27Xp3 := PartialTransformation([0,0,3,3,0,0,7,7,0,0,11,11]);;[127X[104X118[4X[25Xgap>[125X [27Xp4 := PartialTransformation([4,4,0,0,8,8,0,0,12,12,0,0]);;[127X[104X119[4X[25Xgap>[125X [27Xcss3:=Semigroup(p1,p2,p3,p4);[127X[104X120[4X[28X<transformation semigroup of degree 13 with 4 generators>[128X[104X121[4X[25Xgap>[125X [27Xel := Elements(css3)[8];;[127X[104X122[4X[25Xgap>[125X [27XD := GreensDClassOfElement(css3, el);;[127X[104X123[4X[25Xgap>[125X [27XIsRegularDClass(D);[127X[104X124[4X[28Xtrue[128X[104X125[4X[25Xgap>[125X [27XDisplayEggBoxOfDClass(D);[127X[104X126[4X[28X[ [ 1, 1, 0, 0 ],[128X[104X127[4X[28X [ 1, 1, 0, 0 ],[128X[104X128[4X[28X [ 0, 0, 1, 1 ],[128X[104X129[4X[28X [ 0, 0, 1, 1 ] ][128X[104X130[4X[25Xgap>[125X [27Xmat := [ [ 1, 0, 1, 0 ],[127X[104X131[4X[25X>[125X [27X [ 0, 1, 0, 1 ],[127X[104X132[4X[25X>[125X [27X [ 0, 1, 0, 1 ],[127X[104X133[4X[25X>[125X [27X [ 1, 0, 1, 0 ] ];;[127X[104X134[4X[25Xgap>[125X [27Xres := GrahamBlocks(mat);;[127X[104X135[4X[25Xgap>[125X [27XPrintArray(res[1]);[127X[104X136[4X[28X[ [ 1, 1, 0, 0 ],[128X[104X137[4X[28X [ 1, 1, 0, 0 ],[128X[104X138[4X[28X [ 0, 0, 1, 1 ],[128X[104X139[4X[28X [ 0, 0, 1, 1 ] ][128X[104X140[4X[25Xgap>[125X [27XPrintArray(res[2]);[127X[104X141[4X[28X[ [ [ 1, 1 ], [ 1, 3 ], [ 1, 2 ], [ 1, 4 ] ],[128X[104X142[4X[28X [ [ 4, 1 ], [ 4, 3 ], [ 4, 2 ], [ 4, 4 ] ],[128X[104X143[4X[28X [ [ 2, 1 ], [ 2, 3 ], [ 2, 2 ], [ 2, 4 ] ],[128X[104X144[4X[28X [ [ 3, 1 ], [ 3, 3 ], [ 3, 2 ], [ 3, 4 ] ] ][128X[104X145[4X[32X[104X146147148[1X2.4 [33X[0;0YCayley graphs[133X[101X149150[1X2.4-1 RightCayleyGraphAsAutomaton[101X151152[29X[2XRightCayleyGraphAsAutomaton[102X( [3XS[103X ) [32X function153154[33X[0;0YComputes the right Cayley graph of a finite monoid or semigroup [3XS[103X. It uses155the [5XGAP[105X buit-in function [10XCayleyGraphSemigroup[110X to compute the Cayley Graph156and returns it as an automaton without initial nor final states. (In this157automaton state [10Xi[110X represents the element [10XElements(S)[i][110X.) The [5XAutomata[105X158package is used to this effect.[133X159160[4X[32X Example [32X[104X161[4X[25Xgap>[125X [27Xrcg := RightCayleyGraphAsAutomaton(b21);[127X[104X162[4X[28X< deterministic automaton on 2 letters with 6 states >[128X[104X163[4X[25Xgap>[125X [27XDisplay(rcg);[127X[104X164[4X[28X | 1 2 3 4 5 6[128X[104X165[4X[28X-----------------------[128X[104X166[4X[28X a | 2 4 6 4 2 4[128X[104X167[4X[28X b | 3 5 4 4 4 3[128X[104X168[4X[28XInitial state: [ ][128X[104X169[4X[28XAccepting state: [ ][128X[104X170[4X[28X [128X[104X171[4X[32X[104X172173[1X2.4-2 RightCayleyGraphMonoidAsAutomaton[101X174175[29X[2XRightCayleyGraphMonoidAsAutomaton[102X( [3XS[103X ) [32X function176177[33X[0;0YThis function is a synonym of [2XRightCayleyGraphAsAutomaton[102X ([14X2.4-1[114X).[133X178179180181