File: quasiIsomorph.gi

package info (click to toggle)
gap-hap 1.66%2Bds-1
  • links: PTS
  • area: main
  • in suites: trixie
  • size: 55,348 kB
  • sloc: xml: 15,368; sh: 216; javascript: 155; makefile: 126; ansic: 57; perl: 36
file content (227 lines) | stat: -rw-r--r-- 5,864 bytes parent folder | download | duplicates (3)
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
###################################################
##	SubQuasiIsomorph
##	QuotientQuasiIsomorph
##	QuasiIsomorph
###################################################



#############################################################################
#0
#F	SubQuasiIsomorph
##	Input:	A finite cat-1-group C
##	Output: A quasi-isomorphic sub cat-1-group of C
##
InstallGlobalFunction(SubQuasiIsomorph,function(C)
local  
	s,t,G,H,Kers,Kert,Kersnt,tKers,OrdPiOne,OrdPiTwo,OrdPi,
	LS,Lx,x,sx,Ordsx,flag,
    newGens,news,newt;
	
	s:= C!.sourceMap;
    t:= C!.targetMap;
    G:=Source(s);
    Kers:=Kernel(s);
	Kert:=Kernel(t);
	Kersnt:=Intersection(Kers,Kert);
	tKers:=Image(t,Kers);
	OrdPiOne:=Order(HomotopyGroup(C,1));
	OrdPiTwo:=Order(HomotopyGroup(C,2));
	OrdPi:=OrdPiOne*OrdPiTwo;
	LS:=ConjugacyClassesSubgroups(LatticeSubgroups(G));
	if not IsMutable(LS) then
	    LS:= ShallowCopy(LS);
	fi;
	Sort(LS,function(x,y) return Size(x[1])<Size(y[1]); end);
	flag:=0;
	for Lx in LS do
	    x:=Lx[1];
		if Order(x)>= OrdPi then
	    if IsSubgroup(x,Kersnt) then
			for x in Lx do
				if  IsSubgroup(x,Image(s,x)) then
				if  IsSubgroup(x,Image(t,x)) then
					sx:=Image(s,x);
					Ordsx:=Order(sx);
					if  Ordsx = Order(Image(t,Intersection(Kers,x)))*OrdPiOne then
					if  Ordsx = Order(Intersection(sx,tKers))*OrdPiOne then
						H:=x;
						flag:=1;
						break;
					fi;
					fi;
				fi;
				fi;
			od;
		fi;
		fi;
		if flag =1 then
			break;
		fi;
	od;
	if H=G then 
		return C;
	fi;
    newGens:=GeneratorsOfGroup(H);
    news:=GroupHomomorphismByImagesNC(H,H,newGens,List(newGens,x->Image(s,x)));
    newt:=GroupHomomorphismByImagesNC(H,H,newGens,List(newGens,x->Image(t,x)));
    return Objectify(HapCatOneGroup,rec( 
				sourceMap:=news,
				targetMap:=newt));
end);
##
#################### end of SubQuasiIsomorph ################################

#############################################################################
#0
#F	QuotientQuasiIsomorph
##	Input:	A finite cat-1-group C
##	Output:	A quasi-isomorphic quotient cat-1-group of C
##
InstallGlobalFunction(QuotientQuasiIsomorph,function (C)
local 	
	s,t,G,H,Kers,Kert,Kersnt,Ims,OrdIms,Imt,OrdPiOne,OrdPiTwo,Ord,
	LN,x,n,i,
	OrderPiOneGx,OrderPiTwoGx,
	epi,newG,newGens,news,newt;

	s:=C!.sourceMap;
    t:=C!.targetMap;
    G:=Source(s);
    Kers:=Kernel(s);
	Ims:=Image(s);
	OrdIms:=Order(Ims);
	Imt:=Image(t);
	Kert:=Kernel(t);
	Kersnt:=Intersection(Kers,Kert);
	OrdPiOne:= Order(HomotopyGroup(C,1));
	OrdPiTwo:= Order(HomotopyGroup(C,2));
	Ord:=Order(G)/(OrdPiOne*OrdPiTwo);
	
    ######################################################################
	#1
	OrderPiOneGx:=function(x)
	local tsx;
		
	    tsx:=Image(t,PreImages(s,Intersection(Ims,x)));
		return (OrdIms*Order(Intersection(tsx,x)))/
				(Order(Intersection(Ims,x))*Order(tsx));
	end;
    ##	
	######################################################################
	#1
	OrderPiTwoGx:=function(x)
	local f;
		
	    f:=NaturalHomomorphismByNormalSubgroup(G,x);
	    return Order(Intersection(Image(f,PreImages(s,Intersection(Ims,x))),
				Image(f,PreImages(t,Intersection(Imt,x)))));
	end;
	##
	######################################################################
	
	LN:=NormalSubgroups(G);
	if not IsMutable(LN) then
	    LN:= ShallowCopy(LN);
	fi;
	Sort(LN,function(x,y) return Size(x)>Size(y); end);
	n:=Length(LN);
	for i in [1..n] do
		x:=LN[i];
		if Order(x) <= Ord then
		if IsSubgroup(x,Image(s,x)) then
		if IsSubgroup(x,Image(t,x)) then
		if IsSubgroup(x,CommutatorSubgroup(PreImages(s,Intersection(Ims,x)),
				PreImages(t,Intersection(Imt,x)))) then
		if Order(Kersnt) = Order(Intersection(Kersnt,x))*OrdPiTwo then
		if OrderPiTwoGx(x) = OrdPiTwo then
		if OrderPiOneGx(x) = OrdPiOne then
			H:=x;
			break;
		fi;
		fi;
		fi;
		fi;
		fi;
		fi;
		fi;
	od;
	if Order(H)=1 then
		return C;
	fi;
	
	epi:=NaturalHomomorphismByNormalSubgroup(G,H);
    newG :=Image(epi);
    newGens:=GeneratorsOfGroup(newG);
    news:=GroupHomomorphismByImagesNC(newG,newG,newGens,
		List(newGens,x->Image(epi,Image(s,PreImagesRepresentative(epi,x)))));
    newt:=GroupHomomorphismByImagesNC(newG,newG,newGens,
		List(newGens,x->Image(epi,Image(t,PreImagesRepresentative(epi,x)))));
    return Objectify(HapCatOneGroup,rec(
          sourceMap:=news,
          targetMap:=newt));
end);
##
#################### end of QuotientQuasiIsomorph ###########################

#############################################################################
#0
#F	QuasiIsomorph
##	Input:	A finite cat-1-group or a finite crossed module X
##	Output:	A quasi-isomorphism of X
##
InstallGlobalFunction(QuasiIsomorph,function (X)
local QuasiIsomorphOfCat, QuasiIsomorphOfCross;
		
	######################################################################	  
	#1
    #F	QuasiIsomorphOfCat
	##	Input:	A finite cat-1-group C
	##	Output:	A quasi-isomorphism of C
	##
	QuasiIsomorphOfCat:=function(C)
	local D;
	
		D:=QuotientQuasiIsomorph(C);
		D:=SubQuasiIsomorph(D);
		while Size(D) < Size(C)  do
			C:=D;
			D:=QuotientQuasiIsomorph(C);
			if Size(D) < Size(C) then
				D:=SubQuasiIsomorph(D);
			fi;
		od;
		return D;
	end;
	##
	############### end of QuasiIsomorphOfCat ############################

	######################################################################	
	#1
    #F	QuasiIsomorphOfCross
	##	Input:	A finite crossed module XC
	##	Output:	A quasi-isomorphism of XC
	##
	QuasiIsomorphOfCross:=function(XC)
		local C,D;
		
		C:=CatOneGroupByCrossedModule(XC);
		D:=QuasiIsomorphOfCat(C);
		return CrossedModuleByCatOneGroup(D);
	end;
	##
	############### end of QuasiIsomorphOfCross ##########################
	
	if IsHapCatOneGroup(X) then
		return QuasiIsomorphOfCat(X);
	fi;
	if  IsHapCrossedModule(X) then
		return QuasiIsomorphOfCross(X);
	fi;
end);
##	
#################### end of QuasiIsomorph ###################################