From 08de11beb4ebf1ca7627c6744b9689cba064a6b4 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 21 Dec 2025 16:30:29 +0100 Subject: [PATCH 1/2] Rename local variables Action to action The GAP library defines a function `Action`. While using its name for a local variable is perfectly legal, it still makes it harder to test such code by copy&pasting it into a GAP session. So for debugging it is still helpful to avoid library names. --- lib/ArithmeticGroups/barycentric.gi | 8 ++--- lib/ArithmeticGroups/cplGTree.gi | 8 ++--- lib/ArithmeticGroups/crystGcomplex.gi | 12 +++---- .../crystGcomplex.original.tuan | 12 +++---- lib/ArithmeticGroups/freeZGRes.gi | 16 +++++----- lib/ArithmeticGroups/gchaincomplex.gi | 6 ++-- lib/ArithmeticGroups/resGTree.gi | 14 ++++---- lib/ArtinCoxeter/coxeterWythoff.gi | 6 ++-- .../tuantobedeleted/crystGcomplex.gi | 8 ++--- lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi | 16 +++++----- lib/Congruence/bianchiComplex.gi | 6 ++-- lib/FpGmodules/fpgbasics.gi | 14 ++++---- lib/FpGmodules/meataxe.gi | 6 ++-- lib/GOuterGroups/goutergroup.gi | 6 ++-- lib/GraphsOfGroups/graphOfResolutions.gi | 6 ++-- lib/Homology/persistent.gi | 6 ++-- lib/Manifolds/cubeCwComplex.gi | 2 +- lib/Manifolds/octahedronCwComplex.gi | 2 +- lib/NonabelianTensor/liftsidki.gi | 6 ++-- lib/NonabelianTensor/nil2TensorSquare.gi | 6 ++-- lib/NonabelianTensor/tensorSquare.gi | 6 ++-- lib/Perturbations/contractibleSL2Zcomplex.gi | 6 ++-- .../contractibleSL2ZcomplexALT.gi | 6 ++-- lib/Perturbations/dutour.gi | 14 ++++---- lib/Perturbations/freeRes.gi | 32 +++++++++---------- lib/Perturbations/nonFreeResSubgroup.gi | 6 ++-- lib/PolyComplexes/groupComplexes.gi | 6 ++-- lib/Polymake/cryst.gi | 8 ++--- lib/Polymake/polyFaces.gi | 18 +++++------ lib/RahmSanchez/DavisComplex.gi | 6 ++-- lib/Resolutions/coreducedRes.gi | 8 ++--- lib/Resolutions/resFiniteGroup.gi | 12 +++---- lib/Resolutions/tietzered.gi | 12 +++---- lib/TorsionSubcomplexes/barycentriccount.gi | 2 +- lib/TorsionSubcomplexes/quotientcomplex.gi | 18 +++++------ lib/TorsionSubcomplexes/subdivision.gi | 18 +++++------ 36 files changed, 172 insertions(+), 172 deletions(-) diff --git a/lib/ArithmeticGroups/barycentric.gi b/lib/ArithmeticGroups/barycentric.gi index 544b261a..f633bfc4 100644 --- a/lib/ArithmeticGroups/barycentric.gi +++ b/lib/ArithmeticGroups/barycentric.gi @@ -8,7 +8,7 @@ InstallGlobalFunction(HAP_BaryCentricSubdivisionGComplex, function(C) local Cells,coBoundaries,N,i,Dims,pos,j,x,y,w,id,t,k,ck,c,s,a,v,g,b, Elts,Rep,mult,ListUnion, Chains, IsSameOrbit, AddReturn, - Orbit, Dimension, StabRec, Action, Stabilizer, Boundary, + Orbit, Dimension, StabRec, action, Stabilizer, Boundary, NChains, BoundaryRec, FinalBoundary; @@ -224,9 +224,9 @@ local Cells,coBoundaries,N,i,Dims,pos,j,x,y,w,id,t,k,ck,c,s,a,v,g,b, return StabRec[k+1][i]; end; -# The cell structure is rigid under the action of G then Action(k,i,j) always be 1. +# The cell structure is rigid under the action of G then action(k,i,j) always be 1. - Action:=function(k,i,j) + action:=function(k,i,j) return 1; end; @@ -254,7 +254,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=C!.group, stabilizer:=Stabilizer, - action:=Action, + action:=action, properties:= [["length",Maximum(1000,N)], ["characteristic",0], diff --git a/lib/ArithmeticGroups/cplGTree.gi b/lib/ArithmeticGroups/cplGTree.gi index dda4ab4e..889acae4 100644 --- a/lib/ArithmeticGroups/cplGTree.gi +++ b/lib/ArithmeticGroups/cplGTree.gi @@ -18,7 +18,7 @@ function(m,p) local t1,t2, Elts,H,K,G,Gamma, Id,ID,Idcoset,BoundaryList, - Boundary,Dimension,Action,Stabilizer,Homotopy,StabGrps, + Boundary,Dimension,action,Stabilizer,Homotopy,StabGrps, pos,RemoveLoops,HtpyRec; Elts:=[[[1,0],[0,1]]]; @@ -121,13 +121,13 @@ local t1,t2, ################################################################### #1 - #F Action + #F action ## ## Input: a triple (n,k,l) of integers ## ## Output: 1 or -1 ## - Action:=function(n,k,l); + action:=function(n,k,l); return 1; end; ################################################################### @@ -281,7 +281,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, properties:= [["length",100], ["characteristic",0], diff --git a/lib/ArithmeticGroups/crystGcomplex.gi b/lib/ArithmeticGroups/crystGcomplex.gi index cceb2d2b..6bbd3ea6 100644 --- a/lib/ArithmeticGroups/crystGcomplex.gi +++ b/lib/ArithmeticGroups/crystGcomplex.gi @@ -12,7 +12,7 @@ InstallGlobalFunction(CrystGcomplex, function(gens,basis,check) local i,x,k,combin,n,j,r,m,vect,c, - B,G,T,S,Bt,Action,Sign,FinalBoundary,BoundaryList, + B,G,T,S,Bt,action,Sign,FinalBoundary,BoundaryList, L,kcells,cells,w,StabGrp,ActionRecord,lnth,PseudoRotSubGroup, RotSubGroupList, Dimension,SearchOrbit,pos,StabilizerOfPoint,PseudoBoundary, @@ -218,7 +218,7 @@ kcells:=tmp; end; ################################################################### -# Create a record for the Action +# Create a record for the action ActionRecord:=[]; for m in [1..lnth+1] do ActionRecord[m]:=[]; @@ -252,13 +252,13 @@ kcells:=tmp; ################################################################### #1 - #F Action + #F action ## ## Input: Degree m, position k of a generator and position g of ## an element. ## Output: 1 or -1. ## - Action:=function(m,k,g) + action:=function(m,k,g) local id,r,u,H,abk,ans,x,h,l,i; abk:=AbsInt(k); @@ -293,7 +293,7 @@ kcells:=tmp; ################################################################### #1 - #F Action + #F action ## ## Input: Degree m, position k of a generator and position g of ## an element. @@ -666,7 +666,7 @@ kcells:=tmp; elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, RotSubGroup:=RotSubGroup, Bool:=Bool, #####ADDED OCTOBER 2024 properties:= diff --git a/lib/ArithmeticGroups/crystGcomplex.original.tuan b/lib/ArithmeticGroups/crystGcomplex.original.tuan index cc7f92b2..e8bc3b1f 100644 --- a/lib/ArithmeticGroups/crystGcomplex.original.tuan +++ b/lib/ArithmeticGroups/crystGcomplex.original.tuan @@ -12,7 +12,7 @@ InstallGlobalFunction(CrystGcomplex, function(gens,basis,check) local i,x,k,combin,n,j,r,m,vect,c, - B,G,T,S,Bt,Action,Sign,FinalBoundary,BoundaryList, + B,G,T,S,Bt,action,Sign,FinalBoundary,BoundaryList, L,kcells,cells,w,StabGrp,ActionRecord,lnth,PseudoRotSubGroup, RotSubGroupList, Dimension,SearchOrbit,pos,StabilizerOfPoint,PseudoBoundary, @@ -170,7 +170,7 @@ local i,x,k,combin,n,j,r,m,vect,c, end; ################################################################### -# Create a record for the Action +# Create a record for the action ActionRecord:=[]; for m in [1..lnth+1] do ActionRecord[m]:=[]; @@ -204,13 +204,13 @@ local i,x,k,combin,n,j,r,m,vect,c, ################################################################### #1 - #F Action + #F action ## ## Input: Degree m, position k of a generator and position g of ## an element. ## Output: 1 or -1. ## - Action:=function(m,k,g) + action:=function(m,k,g) local id,r,u,H,abk,ans,x,h,l,i; abk:=AbsInt(k); @@ -245,7 +245,7 @@ local i,x,k,combin,n,j,r,m,vect,c, ################################################################### #1 - #F Action + #F action ## ## Input: Degree m, position k of a generator and position g of ## an element. @@ -617,7 +617,7 @@ local i,x,k,combin,n,j,r,m,vect,c, elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, RotSubGroup:=RotSubGroup, properties:= [["length",100], diff --git a/lib/ArithmeticGroups/freeZGRes.gi b/lib/ArithmeticGroups/freeZGRes.gi index bf0367b4..5046b4a9 100644 --- a/lib/ArithmeticGroups/freeZGRes.gi +++ b/lib/ArithmeticGroups/freeZGRes.gi @@ -19,7 +19,7 @@ local Boundary, BoundaryP, Pair2Quad, Pair2QuadRec, Quad2Pair,Quad2PairRec, HtpyGen, HtpyWord, StabGrps, StabResls, ResolutionFG, - Action, AlgRed, EltsG, G, Mult, MultRecord, + action, AlgRed, EltsG, G, Mult, MultRecord, DelGen, DelWord, DelGenRec,PseudoBoundary,FinalBoundary, FilteredLength, FilteredDimension, FilteredDimensionRecord, L,i,k,n,q,r,s,t, @@ -185,9 +185,9 @@ local ################################################################### if IsBound(P!.action) and not prime=2 then - Action:=P!.action; + action:=P!.action; else - Action:=function(k,j,g) return 1; end; + action:=function(k,j,g) return 1; end; fi; ################################################################### @@ -437,9 +437,9 @@ local h:=[]; for y in w do - x:=[Action(q,y[1],y[3])*y[1],y[2],y[3]]; + x:=[action(q,y[1],y[3])*y[1],y[2],y[3]]; z:=HtpyGen(q,s,x[1],x[2],x[3]); - z:=List(z,a->[Action(q,a[1],a[3])*a[1],a[2],a[3]]); + z:=List(z,a->[action(q,a[1],a[3])*a[1],a[2],a[3]]); Append(h,z); od; @@ -502,7 +502,7 @@ local return []; else y:=List(StabResls[q+1][pr]!.boundary(s,pt), - x->[Action(q,r,x[2])*x[1],x[2]]); + x->[action(q,r,x[2])*x[1],x[2]]); if pt>0 then DelGenRec[k+1][q+1][s+1][pr][pt]:= AlgRed(List(y,x->[pr,x[1],x[2]])); @@ -823,9 +823,9 @@ local h,x,y,v; h:=[];; for x in w do - v:=[x[1],x[2],Action(x[1],x[3],x[5])*x[3],x[4],x[5]]; + v:=[x[1],x[2],action(x[1],x[3],x[5])*x[3],x[4],x[5]]; y:=StructuralCopy(HtpyGen(v[1],v[2],v[3],v[4],v[5])); - Apply(y,a->[x[1],x[2]+1,Action(x[1],a[1],a[3])*a[1],a[2],a[3]]); + Apply(y,a->[x[1],x[2]+1,action(x[1],a[1],a[3])*a[1],a[2],a[3]]); Append(h,y); od; return h; diff --git a/lib/ArithmeticGroups/gchaincomplex.gi b/lib/ArithmeticGroups/gchaincomplex.gi index 232b4ac5..3e7e331a 100644 --- a/lib/ArithmeticGroups/gchaincomplex.gi +++ b/lib/ArithmeticGroups/gchaincomplex.gi @@ -32,7 +32,7 @@ end); ###################################################### GChainComplex:=function(K,G) local Ksimps,R, orbits, stabilizers, stabfn, Dim, lessthan, boundfn, -elts, i, k, x, m,Action ,ontuples; +elts, i, k, x, m,action ,ontuples; elts:=Elements(G); Ksimps:=[]; @@ -41,7 +41,7 @@ Ksimps[k]:=List(K!.simplicesLst[k],x->StructuralCopy(x)); od; ############################# -Action:=function(a,b,c) return 1; end; +action:=function(a,b,c) return 1; end; ############################# ############################# @@ -126,7 +126,7 @@ R:=Objectify(HapGChainComplex, elts:=Elements(G), group:=G, stabilizer:=stabfn, - action:=Action, + action:=action, properties:= [["length",Dimension(K)], ["characteristic",0]])); diff --git a/lib/ArithmeticGroups/resGTree.gi b/lib/ArithmeticGroups/resGTree.gi index 28416063..59d0c4ea 100644 --- a/lib/ArithmeticGroups/resGTree.gi +++ b/lib/ArithmeticGroups/resGTree.gi @@ -19,7 +19,7 @@ local StabRes,StabGrps,Triple2Pair,Quad2One,GrpsRes,Pair2Quad,Quad2Pair, Dimension,Hmap,Gmult,Gmultrec,Mult,AlgRed,CorrectList,Boundary, Homotopy,FinalHomotopy, - StRes,hmap,Action,PseudoBoundary,PseudoHomotopy, ZeroDimensionHmap, + StRes,hmap,action,PseudoBoundary,PseudoHomotopy, ZeroDimensionHmap, ZeroDimensionHtpy, HmapRec,p,q,r,s,HtpyRec,k,g, ZeroDimensionHmapRec, Pair2QuadRec, QuadToPairRec,DimensionRec; @@ -30,13 +30,13 @@ local ################################################################### #1 - #F Action + #F action ## ## Input: a triple of integers (p,r,q) ## Output: 1 or -1 ## - Action:=function(p,r,g) + action:=function(p,r,g) if not IsBound(R!.action) then return 1; else @@ -262,7 +262,7 @@ local else l:=[];m:=[]; d0:=StructuralCopy(List(StabRes[p+1][r]!.boundary(q,ps), - x->[Action(p,r,x[2])*x[1],x[2]])); + x->[action(p,r,x[2])*x[1],x[2]])); for w in d0 do Append(m,Mult(w[2],Hmap(p,q-1,r,w[1]))); od; @@ -400,7 +400,7 @@ local d:=[]; if q<>0 then l:=StructuralCopy(List(StabRes[p+1][r]!.boundary(q,s), - x->[Quad2Pair(p,q-1,r,Action(p,r,x[2])*x[1])[2],x[2]])); + x->[Quad2Pair(p,q-1,r,action(p,r,x[2])*x[1])[2],x[2]])); Append(d,StructuralCopy(l)); fi; if IsEvenInt(q) then @@ -520,9 +520,9 @@ local Apply(h0,w->[Quad2Pair(p,q+1,r,w[1])[2],w[2]]); Append(h,h0); else - ps:=Action(1,1,g)*s; + ps:=action(1,1,g)*s; m:=StructuralCopy(StabRes[p+1][r]!.homotopy(q,[ps,g])); - Apply(m,x->[Action(1,1,x[2])*x[1],x[2]]); + Apply(m,x->[action(1,1,x[2])*x[1],x[2]]); h0:=List(m,x->[Quad2Pair(p,q+1,r,x[1])[2],x[2]]); Append(h,h0); dh:=AlgRed(CorrectList(List(m,x-> diff --git a/lib/ArtinCoxeter/coxeterWythoff.gi b/lib/ArtinCoxeter/coxeterWythoff.gi index 97afe142..44d8c650 100644 --- a/lib/ArtinCoxeter/coxeterWythoff.gi +++ b/lib/ArtinCoxeter/coxeterWythoff.gi @@ -24,7 +24,7 @@ local EssentialSet, Vcomplement, Triv, - AhomW,WhomWP,WP,WPev,AhomWP,EltsWP,A,StabilizerSubgroup,Action, + AhomW,WhomWP,WP,WPev,AhomWP,EltsWP,A,StabilizerSubgroup,action, EvenStabGroup, m, n,k,i,c,x,U, S, SD; @@ -320,7 +320,7 @@ end; ############################################################### # This describes how the group WP acts on the orientation. -Action:=function(n,k,g); +action:=function(n,k,g); if n=0 then return 1; fi; if EltsWP[g] in WPev then return 1; @@ -338,7 +338,7 @@ return Objectify(HapNonFreeResolution, elts:=EltsWP, group:=WP, stabilizer:=StabilizerSubgroup, - action:=Action, + action:=action, properties:= [["length",n], ["characteristic",0], diff --git a/lib/ArtinCoxeter/tuantobedeleted/crystGcomplex.gi b/lib/ArtinCoxeter/tuantobedeleted/crystGcomplex.gi index bcf48aef..01b32dd6 100644 --- a/lib/ArtinCoxeter/tuantobedeleted/crystGcomplex.gi +++ b/lib/ArtinCoxeter/tuantobedeleted/crystGcomplex.gi @@ -1,7 +1,7 @@ InstallGlobalFunction(CrystGcomplex, function(gens,basis,check) local i,x,k,combin,n,j,r,m,vect,c, - B,G,T,S,Bt,Action,Sign,FinalBoundary,BoundaryList, + B,G,T,S,Bt,action,Sign,FinalBoundary,BoundaryList, L,kcells,cells,w,StabGrp,ActionRecord,lnth,PseudoRotSubGroup,RotSubGroupList, Dimension,SearchOrbit,pos,StabilizerOfPoint,PseudoBoundary,RotSubGroup, Elts,Boundary,Stabilizer,DVF,DVFRec,Homotopy,rmult,FinalHomotopy; @@ -163,7 +163,7 @@ return vv; end; ############# ####################### -Action:=function(m,k,g) +action:=function(m,k,g) local id,r,u,H,abk,ans,x,h,l,i; abk:=AbsInt(k); @@ -472,7 +472,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, RotSubGroup:=RotSubGroup, properties:= [["length",100], @@ -640,7 +640,7 @@ return Objectify(HapNonFreeResolution, #elts:=Elts, group:=Integers, #stabilizer:=Stabilizer, - #action:=Action, + #action:=action, #RotSubGroup:=RotSubGroup, properties:= [["length",1000], diff --git a/lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi b/lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi index 82245932..dbb97754 100644 --- a/lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi +++ b/lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi @@ -15,7 +15,7 @@ local StabGrps, StabResls, ResolutionFG, - Action, + action, AlgRed, EltsG, G, Mult, MultRecord, DelGen, DelWord, DelGenRec, @@ -157,9 +157,9 @@ fi; ############################################## if IsBound(P!.action) and not prime=2 then -Action:=P!.action; +action:=P!.action; else -Action:=function(k,j,g) return 1; end; +action:=function(k,j,g) return 1; end; fi; ############################################## @@ -333,9 +333,9 @@ local h,z,x,y; h:=[]; for y in w do -x:=[Action(q,y[1],y[3])*y[1],y[2],y[3]]; +x:=[action(q,y[1],y[3])*y[1],y[2],y[3]]; z:=HtpyGen(q,s,x[1],x[2],x[3]); -z:=List(z,a->[Action(q,a[1],a[3])*a[1],a[2],a[3]]); +z:=List(z,a->[action(q,a[1],a[3])*a[1],a[2],a[3]]); Append(h,z); od; @@ -383,7 +383,7 @@ fi; if k=0 then if s=0 then return []; else -y:=List(StabResls[q+1][pr]!.boundary(s,pt),x->[Action(q,r,x[2])*x[1],x[2]]); +y:=List(StabResls[q+1][pr]!.boundary(s,pt),x->[action(q,r,x[2])*x[1],x[2]]); if pt>0 then DelGenRec[k+1][q+1][s+1][pr][pt]:= AlgRed(List(y,x->[pr,x[1],x[2]])); return DelGenRec[k+1][q+1][s+1][pr][pt]; @@ -615,9 +615,9 @@ VertHtpy:=function(w) local h,x,y,v; h:=[];; for x in w do - v:=[x[1],x[2],Action(x[1],x[3],x[5])*x[3],x[4],x[5]]; + v:=[x[1],x[2],action(x[1],x[3],x[5])*x[3],x[4],x[5]]; y:=StructuralCopy(HtpyGen(v[1],v[2],v[3],v[4],v[5])); - Apply(y,a->[x[1],x[2]+1,Action(x[1],a[1],a[3])*a[1],a[2],a[3]]); + Apply(y,a->[x[1],x[2]+1,action(x[1],a[1],a[3])*a[1],a[2],a[3]]); Append(h,y); od; return h; diff --git a/lib/Congruence/bianchiComplex.gi b/lib/Congruence/bianchiComplex.gi index 1665d9ea..d61572a1 100644 --- a/lib/Congruence/bianchiComplex.gi +++ b/lib/Congruence/bianchiComplex.gi @@ -338,7 +338,7 @@ end; ####################################################### InstallGlobalFunction(BianchiGcomplex, function(d) -local R,P,OQ,Y,Dimension,Stabilizer,Action,STABS,stb,rot,rotREC,Boundary, +local R,P,OQ,Y,Dimension,Stabilizer,action,STABS,stb,rot,rotREC,Boundary, rep,ELTS,adjust,xx,I, G,K,S,T,i,V,n,B,BB,k,BoundaryRec,TMP, EquivSpheres, gens,omega,x,y,M,a; @@ -565,7 +565,7 @@ end; ####################################### -Action:=function(n,k,g) +action:=function(n,k,g) local id, r, u, ans, abk, H; if n=0 then return 1; fi; @@ -718,7 +718,7 @@ R:= Objectify(HapNonFreeResolution, elts:=ELTS, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, ring:=Y!.ring, generators:=gens, cwSpace:=Y, diff --git a/lib/FpGmodules/fpgbasics.gi b/lib/FpGmodules/fpgbasics.gi index 085c6fc8..a2367e8c 100644 --- a/lib/FpGmodules/fpgbasics.gi +++ b/lib/FpGmodules/fpgbasics.gi @@ -6,7 +6,7 @@ InstallGlobalFunction(DesuspensionFpGModule, function(arg) local - R,G,kk,KK,Mdule, Action, + R,G,kk,KK,Mdule, action, PseudoBoundaryAsVec, WordToVectorList, prime, pp, @@ -69,7 +69,7 @@ end; ##################################################################### ##################################################################### -Action:=function(g,B); +action:=function(g,B); return TransposedMat(GactMat( Position(R!.elts,g), TransposedMat(B))); @@ -116,7 +116,7 @@ return Objectify(HapFPGModule, rec( group:=G, matrix:=Mdule, - action:=Action, + action:=action, dimension:=Length(Mdule), ambientDimension:=R!.dimension(kk)*pp, characteristic:=prime @@ -307,7 +307,7 @@ end); InstallGlobalFunction(FpGModule, function(arg) local - A,G,M,one,ambdim,pp,prime,MT,GactMat,Action,Elts,g; + A,G,M,one,ambdim,pp,prime,MT,GactMat,action,Elts,g; A:=arg[1]; G:=arg[2]; @@ -347,7 +347,7 @@ end; ##################################################################### ##################################################################### -Action:=function(g,B); +action:=function(g,B); return TransposedMat(GactMat( Position(Elts,g), TransposedMat(B))); @@ -357,7 +357,7 @@ end; if Length(A)>0 then for g in G do A:=MutableCopyMat(A); -Append(A,Action(g,A)); +Append(A,action(g,A)); A:=SemiEchelonMat(A).vectors; od; fi; @@ -370,7 +370,7 @@ M:=rec( matrix:=A, dimension:=Length(A), ambientDimension:=ambdim, - action:=Action, + action:=action, characteristic:=prime ); diff --git a/lib/FpGmodules/meataxe.gi b/lib/FpGmodules/meataxe.gi index 503491b3..cb1e11e5 100644 --- a/lib/FpGmodules/meataxe.gi +++ b/lib/FpGmodules/meataxe.gi @@ -96,7 +96,7 @@ end); ##################################################################### InstallGlobalFunction(DesuspensionMtxModule, function(M) -local gensM, Mat, G, GG,hom, pp, elts, elts1,elts2,x, v, MT,Action, GactMat; +local gensM, Mat, G, GG,hom, pp, elts, elts1,elts2,x, v, MT,action, GactMat; gensM:=GeneratorsOfMtxModule(M); @@ -151,7 +151,7 @@ end; ##################################################################### ##################################################################### -Action:=function(g,B); +action:=function(g,B); return TransposedMat(GactMat( Position(elts1,g), TransposedMat(B))); @@ -163,7 +163,7 @@ return Objectify(HapFPGModule, rec (matrix:=Mat, group:=GG, - action:=Action, + action:=action, dimension:=Length(Mat), ambientDimension:=Length(gensM)*pp, characteristic:=Characteristic(M.field) diff --git a/lib/GOuterGroups/goutergroup.gi b/lib/GOuterGroups/goutergroup.gi index feee6b5e..d39cb521 100644 --- a/lib/GOuterGroups/goutergroup.gi +++ b/lib/GOuterGroups/goutergroup.gi @@ -78,7 +78,7 @@ InstallMethod( TrivialGModuleAsGOuterGroup, function( G, A ) local N, - alpha; ## Action of G on A + alpha; ## action of G on A if not (IsGroup(G) and IsGroup(A) and IsAbelian(A)) then @@ -146,7 +146,7 @@ InstallMethod( GOuterGroup, function( E, A ) local N, type, G, - alpha, ## Action of G on A + alpha, ## action of G on A nat, ## Natural homomorphism from E to G alphaRec,p,q,bool, coc; @@ -217,7 +217,7 @@ InstallMethod( GOuterGroup, function( E ) local A, N, type, G, ##E=A, G=1 - alpha, ## Action of G on G + alpha, ## action of G on G nat; ## Natural homomorphism from G to G nat := NaturalHomomorphismByNormalSubgroup(E,E); diff --git a/lib/GraphsOfGroups/graphOfResolutions.gi b/lib/GraphsOfGroups/graphOfResolutions.gi index 01de97cf..97c4902e 100644 --- a/lib/GraphsOfGroups/graphOfResolutions.gi +++ b/lib/GraphsOfGroups/graphOfResolutions.gi @@ -95,7 +95,7 @@ end); InstallGlobalFunction(TreeOfGroupsToContractibleGcomplex, function(D,G) local Vertices, VerticesNames, Edges, Dimension, -PseudoBoundary, Boundary, Elts, Action, Stabilizer, ID; +PseudoBoundary, Boundary, Elts, action, Stabilizer, ID; Vertices:=Filtered(D,x->IsGroup(x)); VerticesNames:=List(Vertices,x->Name(x)); @@ -129,7 +129,7 @@ end; ####################### ####################### -Action:=function(n,k,l); +action:=function(n,k,l); return 1; end; ####################### @@ -153,7 +153,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, properties:= [["length",10000], ["characteristic",0], diff --git a/lib/Homology/persistent.gi b/lib/Homology/persistent.gi index 5b9fcba4..cb7120d4 100644 --- a/lib/Homology/persistent.gi +++ b/lib/Homology/persistent.gi @@ -1035,7 +1035,7 @@ end); ########################################## InstallGlobalFunction(TruncatedGComplex, function(arg) -local R,a,b,Dimension, Boundary, Stabilizer, Action; +local R,a,b,Dimension, Boundary, Stabilizer, action; R:=arg[1]; a:=arg[2]; @@ -1061,7 +1061,7 @@ end; ################## ################## -Action:=function(n,k,g); +action:=function(n,k,g); return R!.action(n+a,k,g); end; ################## @@ -1079,7 +1079,7 @@ return Objectify( HapNonFreeResolution, elts:=R!.elts, group:=R!.group, stabilizer:=Stabilizer, - action:=Action, + action:=action, properties:= [["length",EvaluateProperty(R,"length")], ["reduced",true], diff --git a/lib/Manifolds/cubeCwComplex.gi b/lib/Manifolds/cubeCwComplex.gi index ec519c39..5b709bef 100644 --- a/lib/Manifolds/cubeCwComplex.gi +++ b/lib/Manifolds/cubeCwComplex.gi @@ -84,7 +84,7 @@ local A, G, L, M, N, Y, B, F, data, NF, NFF, Vertices, Edges, Faces, #the dihedral group D_8 < Sym([1..4]); ####################################### -#Action of an element g of the dihedral group of order 8 +#action of an element g of the dihedral group of order 8 #on a list x=[x1,x2,x3,x4] of length 4 act:=function(g,x); return List([1..4],i->x[i^g]); diff --git a/lib/Manifolds/octahedronCwComplex.gi b/lib/Manifolds/octahedronCwComplex.gi index 4df2ba9d..00d0726a 100644 --- a/lib/Manifolds/octahedronCwComplex.gi +++ b/lib/Manifolds/octahedronCwComplex.gi @@ -73,7 +73,7 @@ end; if Length(arg)=2 then ####################################### -#Action of an element g of the dihedral group of order 8 +#action of an element g of the dihedral group of order 8 #on a list x=[x1,x2,x3,x4] of length 4 act:=function(g,x); return List([1..3],i->x[i^g]); diff --git a/lib/NonabelianTensor/liftsidki.gi b/lib/NonabelianTensor/liftsidki.gi index aecca9e5..59d597aa 100644 --- a/lib/NonabelianTensor/liftsidki.gi +++ b/lib/NonabelianTensor/liftsidki.gi @@ -16,7 +16,7 @@ local AFhomSSF,SSF,gensSF2,SSFhomSF, TensorSquare, delta, Trans, - CrossedPairing, Action, + CrossedPairing, action, UpperBound, Todd,i,v,w,x,y,z,c; @@ -186,7 +186,7 @@ end; ##################################################################### ##################################################################### -Action:=function(x,t) +action:=function(x,t) return Image(AG1homSF,x) * t * Image(AG1homSF,x)^-1; @@ -194,7 +194,7 @@ end; ##################################################################### -return rec(homomorphism:=delta, pairing:=CrossedPairing, action:=Action); +return rec(homomorphism:=delta, pairing:=CrossedPairing, action:=action); end); ##################################################################### diff --git a/lib/NonabelianTensor/nil2TensorSquare.gi b/lib/NonabelianTensor/nil2TensorSquare.gi index da30d397..378bd764 100644 --- a/lib/NonabelianTensor/nil2TensorSquare.gi +++ b/lib/NonabelianTensor/nil2TensorSquare.gi @@ -16,7 +16,7 @@ local AFhomSSF,SSF,gensSF2,SSFhomSF, TensorSquare, delta, Trans, - CrossedPairing, Action, + CrossedPairing, action, UpperBound, Todd,i,v,w,x,y,z,t; @@ -212,7 +212,7 @@ end; ##################################################################### ##################################################################### -Action:=function(x,t) +action:=function(x,t) return Image(AG1homSF,x) * t * Image(AG1homSF,x)^-1; @@ -220,7 +220,7 @@ end; ##################################################################### -return rec(homomorphism:=delta, pairing:=CrossedPairing, action:=Action,nu:=SF); +return rec(homomorphism:=delta, pairing:=CrossedPairing, action:=action,nu:=SF); end); ##################################################################### diff --git a/lib/NonabelianTensor/tensorSquare.gi b/lib/NonabelianTensor/tensorSquare.gi index 02c22e52..c464021a 100644 --- a/lib/NonabelianTensor/tensorSquare.gi +++ b/lib/NonabelianTensor/tensorSquare.gi @@ -15,7 +15,7 @@ local AFhomSSF,SSF,gensSF2,SSFhomSF, TensorSquare, delta, Trans, - CrossedPairing, Action, + CrossedPairing, action, UpperBound, Todd,i,v,w,x,y,z; @@ -187,7 +187,7 @@ end; ##################################################################### ##################################################################### -Action:=function(x,t) +action:=function(x,t) return Image(AG1homSF,x) * t * Image(AG1homSF,x)^-1; @@ -195,7 +195,7 @@ end; ##################################################################### -return rec(homomorphism:=delta, pairing:=CrossedPairing, action:=Action,nu:=SF); +return rec(homomorphism:=delta, pairing:=CrossedPairing, action:=action,nu:=SF); end); ##################################################################### diff --git a/lib/Perturbations/contractibleSL2Zcomplex.gi b/lib/Perturbations/contractibleSL2Zcomplex.gi index 8de4cd08..2ce4807d 100644 --- a/lib/Perturbations/contractibleSL2Zcomplex.gi +++ b/lib/Perturbations/contractibleSL2Zcomplex.gi @@ -13,7 +13,7 @@ local boundaryList, Elts, Rot,Stab, - RotSubGroups,Action, ActionRecord, + RotSubGroups,action, ActionRecord, TransMat, St0,St1, x, n,k,s,BI,SGN,tmp, LstEl , bool, name, @@ -125,7 +125,7 @@ end; #################### -Action:=function(n,k,g) +action:=function(n,k,g) local id,r,u,H,abk,ans; abk:=AbsInt(k); @@ -375,7 +375,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, edge:=Edge, gens:=GeneratorsRepresentation, properties:= diff --git a/lib/Perturbations/contractibleSL2ZcomplexALT.gi b/lib/Perturbations/contractibleSL2ZcomplexALT.gi index b585871e..3341fd8c 100644 --- a/lib/Perturbations/contractibleSL2ZcomplexALT.gi +++ b/lib/Perturbations/contractibleSL2ZcomplexALT.gi @@ -13,7 +13,7 @@ local boundaryList, Elts, Rot,Stab, - RotSubGroups,Action, ActionRecord, + RotSubGroups,action, ActionRecord, TransMat, St0,St1, x, n,k,s,BI,SGN,tmp, LstEl , bool, @@ -126,7 +126,7 @@ end; #################### -Action:=function(n,k,g) +action:=function(n,k,g) local id,r,u,H,abk,ans; abk:=AbsInt(k); @@ -374,7 +374,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, edge:=Edge, gens:=GeneratorsRepresentation, properties:= diff --git a/lib/Perturbations/dutour.gi b/lib/Perturbations/dutour.gi index 590684ea..59657b2a 100644 --- a/lib/Perturbations/dutour.gi +++ b/lib/Perturbations/dutour.gi @@ -14,7 +14,7 @@ local boundaryList, Elts, Rot,Stab, - RotSubGroups,Action, ActionRecord, + RotSubGroups,action, ActionRecord, TransMat, #InfGrps, x, lstMathieu, lstAlexanderSebastianSL, lstSebastianGL, lstAlexanderSebastianAlt, @@ -149,7 +149,7 @@ end; #################### -Action:=function(n,k,g) +action:=function(n,k,g) local id,r,u,H,abk,ans; abk:=AbsInt(k); @@ -189,7 +189,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, properties:= [["length",Maximum(1000,lnth)], ["characteristic",0], @@ -313,16 +313,16 @@ end); InstallGlobalFunction(QuotientOfContractibleGcomplex, function(C,S) local - Elts,G,Stabilizer,Action,D; + Elts,G,Stabilizer,action,D; SetInfoLevel(InfoWarning,0); D:=List(Elements(S),x->x); Elts:=List(C!.elts, x->QuotientGroup(x,D)); G:=Group(Elts); -#Action:=function(a,b,c) return 1; end; +#action:=function(a,b,c) return 1; end; ##################### -Action:=function(n,k,g) +action:=function(n,k,g) local gg; gg:=Position(C!.elts,Elts[g]!.element[1]); if gg=fail then Add(C!.elts,Elts[g]!.element[1]); @@ -349,7 +349,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, properties:= [["length",EvaluateProperty(C,"length")], ["characteristic",0], diff --git a/lib/Perturbations/freeRes.gi b/lib/Perturbations/freeRes.gi index ab026ee0..3f1b0dcf 100644 --- a/lib/Perturbations/freeRes.gi +++ b/lib/Perturbations/freeRes.gi @@ -15,7 +15,7 @@ local StabGrps, StabResls, ResolutionFG, - Action, + action, AlgRed, EltsG, G, Mult, MultRecord, DelGen, DelWord, DelGenRec, @@ -180,9 +180,9 @@ fi; ############################################## if IsBound(P!.action) and not prime=2 then -Action:=P!.action; +action:=P!.action; else -Action:=function(k,j,g) return 1; end; +action:=function(k,j,g) return 1; end; fi; ############################################## @@ -357,12 +357,12 @@ local h,z,x,y; h:=[]; for y in w do -x:=[Action(q,y[1],y[3])*y[1],y[2],y[3]]; +x:=[action(q,y[1],y[3])*y[1],y[2],y[3]]; z:=HtpyGen(q,s,x[1],x[2],x[3]); -z:=List(z,a->[Action(q,a[1],a[3])*a[1],a[2],a[3]]); +z:=List(z,a->[action(q,a[1],a[3])*a[1],a[2],a[3]]); Append(h,z); od; @@ -410,7 +410,7 @@ fi; if k=0 then if s=0 then return []; else -y:=List(StabResls[q+1][pr]!.boundary(s,pt),x->[Action(q,r,x[2])*x[1],x[2]]); +y:=List(StabResls[q+1][pr]!.boundary(s,pt),x->[action(q,r,x[2])*x[1],x[2]]); if pt>0 then DelGenRec[k+1][q+1][s+1][pr][pt]:= AlgRed(List(y,x->[pr,x[1],x[2]])); return DelGenRec[k+1][q+1][s+1][pr][pt]; @@ -827,7 +827,7 @@ local ResGens, Dimension, StabilizerSubgroup, - Action, + action, StandardWord, i, n, k,x; @@ -883,7 +883,7 @@ end; ############################################################### # This describes how the group WP acts on the orientation. -Action:=function(k,j,g); +action:=function(k,j,g); if EltsWP[g] in WPev then return 1; else return -1; fi; @@ -922,7 +922,7 @@ return Objectify(HapNonFreeResolution, elts:=EltsWP, group:=WP, stabilizer:=StabilizerSubgroup, - action:=Action, + action:=action, standardWord:=StandardWord, properties:= [["type","resolution"], @@ -949,7 +949,7 @@ local BoundaryCoeff, PseudoBoundary, BoundaryRecord, - Action, StabilizerSubgroup, + action, StabilizerSubgroup, m, n, S, SD, LN; Vertices:=CoxeterDiagramVertices(D); @@ -1080,7 +1080,7 @@ end; ############################################################### # This describes how the group WP acts on the orientation. -Action:=function(n,k,g); +action:=function(n,k,g); if n=0 then return 1; fi; return Determinant( EltsG[g]); end; @@ -1096,7 +1096,7 @@ return Objectify(HapNonFreeResolution, elts:=EltsG, group:=G, stabilizer:=StabilizerSubgroup, - action:=Action, + action:=action, properties:= [["length",n], ["characteristic",0], @@ -1132,7 +1132,7 @@ end); ################################################################ ################################################################ InstallGlobalFunction(TwistedResolution, -function(R,Action) +function(R,action) local N, n,k,g,Boundary, BoundaryRec,Homotopy,HomotopyRec; N:=Length(R); @@ -1142,7 +1142,7 @@ Boundary:=function(n,k) local bnd; bnd:=StructuralCopy(R!.boundary(n,k)); -Apply(bnd,x->[Action(x[2])*x[1],x[2]]); +Apply(bnd,x->[action(x[2])*x[1],x[2]]); return bnd; end; @@ -1169,9 +1169,9 @@ end; Homotopy:=function(n,x) local htpy; -htpy:=[Action(x[2])*x[1],x[2]]; +htpy:=[action(x[2])*x[1],x[2]]; htpy:=StructuralCopy(R!.homotopy(n,htpy)); -Apply(htpy,y->[Action(y[2])*y[1],y[2]]); +Apply(htpy,y->[action(y[2])*y[1],y[2]]); return htpy; end; diff --git a/lib/Perturbations/nonFreeResSubgroup.gi b/lib/Perturbations/nonFreeResSubgroup.gi index 30836d00..bb0b53f1 100644 --- a/lib/Perturbations/nonFreeResSubgroup.gi +++ b/lib/Perturbations/nonFreeResSubgroup.gi @@ -52,7 +52,7 @@ local Dimension, Boundary, BoundaryRec, Homotopy, EltsK, G, K, TransK, sK, Gword2Kword, G2K, G2KRec, Pair2Int, Int2Pair, - Mult, MultRec, FIN, i, Stabilizer, Action, + Mult, MultRec, FIN, i, Stabilizer, action, StabRec, Conj, ConjRec, n, k, len; if Length(arg)=3 then @@ -270,7 +270,7 @@ end; ###################### ###################### -Action:=function(n,k,g) +action:=function(n,k,g) local x, c, p, gg; x:=Int2Pair(n,k); gg:=Position(EltsG,EltsK[g]); @@ -288,7 +288,7 @@ return Objectify(HapNonFreeResolution, boundary:=Boundary, homotopy:=Homotopy, stabilizer:=Stabilizer, - action:=Action, + action:=action, elts:=EltsK, group:=K, Int2Pair:=Int2Pair, diff --git a/lib/PolyComplexes/groupComplexes.gi b/lib/PolyComplexes/groupComplexes.gi index c911a892..e2551925 100644 --- a/lib/PolyComplexes/groupComplexes.gi +++ b/lib/PolyComplexes/groupComplexes.gi @@ -105,7 +105,7 @@ end); InstallGlobalFunction(GChainComplex, function(K,G) local Ksimps,R, orbits, stabilizers, stabfn, Dim, boundfn, -elts, inv, gg, i,j, k, x, y, m,Action ,ontuples, A, B; +elts, inv, gg, i,j, k, x, y, m,action ,ontuples, A, B; elts:=Elements(G); inv:=List(elts,x->Position(elts,x^-1)); @@ -116,7 +116,7 @@ Ksimps[k]:=List(K!.simplicesLst[k],x->SSortedList(x)); od; ############################# -Action:=function(a,b,c) return 1; end; +action:=function(a,b,c) return 1; end; ############################# ############################# @@ -196,7 +196,7 @@ R:=Objectify(HapGChainComplex, elts:=elts, group:=G, stabilizer:=stabfn, - action:=Action, + action:=action, properties:= [["length",1000], ["characteristic",0], diff --git a/lib/Polymake/cryst.gi b/lib/Polymake/cryst.gi index 7cefb22c..62a2547c 100644 --- a/lib/Polymake/cryst.gi +++ b/lib/Polymake/cryst.gi @@ -6,12 +6,12 @@ function(arg) local G,K,pt,AG,SAG,F,V,FL,Boundaries,ind,inv, Cells,VCells,GCells,PGCells,setV, Dimn,BNDS, Bndy, REPS, NREPS,OREPS, Elts,Canonical, -STAB, STABREC, ACTION, Action, StandardWord, StabilizerBasis, +STAB, STABREC, ACTION, action, StandardWord, StabilizerBasis, n,Y,k,x,y,i; #In constructing K we'll use right actions, and at the end of the #construction we'll convert to left actions. -#The Stabilizer and Action and StandardWord functions need care -- +#The Stabilizer and action and StandardWord functions need care -- #they will only ever be used with left actions. G:=arg[1]; @@ -197,7 +197,7 @@ end; ##################################################################### #################################################### -Action:=function(uu,V) +action:=function(uu,V) local L, M, T, d, u; u:=TransposedMat(uu); @@ -236,7 +236,7 @@ A:=VCells[n+1][kk]; cg:=Sum(A)/(Length(A)); A:=List(A,v->v-cg); bas:=SemiEchelonMat(A).vectors; -Gbas:=List(bas,V->Action(u,V+cg)-cg); +Gbas:=List(bas,V->action(u,V+cg)-cg); mat:=List(Gbas,b->SolutionMat(bas,b)); d:=Determinant(mat); if not AbsInt(d)=1 then Print("ERROR\n"); fi; diff --git a/lib/Polymake/polyFaces.gi b/lib/Polymake/polyFaces.gi index 443a4795..6e21502d 100644 --- a/lib/Polymake/polyFaces.gi +++ b/lib/Polymake/polyFaces.gi @@ -6,7 +6,7 @@ function(arg) local G,StartVector, Gev, PG, - Action, + action, VertexToVector, VVRecord, FaceToVertices, Hasse, @@ -59,13 +59,13 @@ end; if IsPermGroup(G) then ##################################################################### -Action:=function(g,V); +action:=function(g,V); return Permuted(V,g^-1); end; ##################################################################### else ##################################################################### -Action:=function(g,V) ; +action:=function(g,V) ; return g*V; end; ##################################################################### @@ -74,7 +74,7 @@ fi; #########################CREATE POINTS############################### for x in G do -Add(Points, Action(x,StartVector)); +Add(Points, action(x,StartVector)); od; Points:=SSortedList(Points); ##################################################################### @@ -82,7 +82,7 @@ Points:=SSortedList(Points); ##################################################################### VertexToVector:=function(v); -return Action(PG.generators[v+1],StartVector) - StartVector; +return action(PG.generators[v+1],StartVector) - StartVector; end; ##################################################################### @@ -124,7 +124,7 @@ bool:=true; count:=0; for g in G do count:=count+1; - T:=List(S,x->Action(g,x)); + T:=List(S,x->action(g,x)); for R in Reps do if Length(T)=Length(Intersection(T,R)) then bool:=false; break; fi; @@ -168,7 +168,7 @@ S:=Hasse[k][n]; T:=StructuralCopy(S); for x in G do if not x in StabGroup then -xT:=List(T,a->Action(x,a)); +xT:=List(T,a->action(x,a)); if Length(Intersection(xT,T))=Length(T) then StabGroup:= GeneratorsOfGroup(StabGroup); ; StabGroup:=Concatenation(StabGroup,[x]); @@ -240,7 +240,7 @@ Component:=[]; CompCpy:=[]; for g in G do -gFn:=SSortedList(List(Fn,x->Action(g,x))); +gFn:=SSortedList(List(Fn,x->action(g,x))); if Size(gFn) = Size(Set(Intersection(gFn,Fm))) then if not gFn in CompCpy then Add(Component,g); @@ -325,7 +325,7 @@ r:=id^-1*r; u:=r*EltsG[h]; bas:=StabilizerBasis(n,k); -Gbas:=List(bas,V->Action(u,V)); +Gbas:=List(bas,V->action(u,V)); mat:=List(Gbas, b->SolutionMat(bas,b)); return Determinant(mat); diff --git a/lib/RahmSanchez/DavisComplex.gi b/lib/RahmSanchez/DavisComplex.gi index 505801dc..27d739b0 100644 --- a/lib/RahmSanchez/DavisComplex.gi +++ b/lib/RahmSanchez/DavisComplex.gi @@ -691,7 +691,7 @@ local j, CoxeterGenerators, boundaryList, Elts, Rot,Stab, - RotSubGroups,Action, ActionRecord, + RotSubGroups,action, ActionRecord, TransMat, x, n,k,s,BI,SGN,tmp, LstEl; @@ -809,7 +809,7 @@ end; #################### -Action:=function(n,k,g) +action:=function(n,k,g) local id,r,u,H,abk,ans; abk:=AbsInt(k); @@ -846,7 +846,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=G, stabilizer:=Stabilizer, - action:=Action, + action:=action, properties:= [["length",Maximum(1000,lnth)], ["characteristic",0], diff --git a/lib/Resolutions/coreducedRes.gi b/lib/Resolutions/coreducedRes.gi index b55c00d7..3de21c71 100644 --- a/lib/Resolutions/coreducedRes.gi +++ b/lib/Resolutions/coreducedRes.gi @@ -13,7 +13,7 @@ local PseudoBoundaryN, PseudoBoundaryNplus2, FindFreeFace, - Action, ActionInv, Elts, + action, ActionInv, Elts, modN, modNplus1, triple, HmtpyNminus1, HmtpyN, NewHmtpyN, HmtpyNplus1, @@ -103,7 +103,7 @@ fi; ##################################################################### -Action:=function(g,l); +action:=function(g,l); return [l[1],Position(Elts,Elts[g]*Elts[l[2]])]; end; ##################################################################### @@ -170,7 +170,7 @@ for i in [1..Length(b)] do if b[i][1]<0 then w:=NegateWord(w); fi; - w:=List(w,x->Action(b[i][2],x)); + w:=List(w,x->action(b[i][2],x)); Append(newb,w); fi; od; @@ -192,7 +192,7 @@ for i in [1..Length(b)] do if b[i][1]<0 then w:=NegateWord(w); fi; - w:=List(w,x->Action(b[i][2],x)); + w:=List(w,x->action(b[i][2],x)); Append(newb,w); fi; od; diff --git a/lib/Resolutions/resFiniteGroup.gi b/lib/Resolutions/resFiniteGroup.gi index 26121235..106b8364 100644 --- a/lib/Resolutions/resFiniteGroup.gi +++ b/lib/Resolutions/resFiniteGroup.gi @@ -14,7 +14,7 @@ local Elts, ExtendedElts, N, MT, - Action, + action, ChangeSign, Abs, MaxComplex, @@ -128,7 +128,7 @@ if Order(G)<5096 then MT:=MultiplicationTable(Elts); ##################################################################### -Action:=function(g,l); +action:=function(g,l); return [l[1],MT[g][l[2]]]; end; ##################################################################### @@ -136,7 +136,7 @@ end; else ##################################################################### -Action:=function(g,l); +action:=function(g,l); return [l[1],Position(Elts,Elts[g]*Elts[l[2]])]; end; ##################################################################### @@ -192,7 +192,7 @@ CellValue:=function(i,MC,p) #MC=MaxComplex[i] local x,l,v,e,q; l:=ShallowCopy(Boundary(i,p[1])); -Apply(l,x->Action(p[2],x)); +Apply(l,x->action(p[2],x)); v:=Length(l); #l is the boundary of cell p #where p has dimension i. for e in l do @@ -269,7 +269,7 @@ if i<1 then return [[-1,1]]; else #in the function were arrived at by trial and else m:=ContractionMatrix[i][z[1]][z[2]]; b:=ShallowCopy(Boundary(i,m[1])); - Apply(b,y-> Action(m[2],y)); + Apply(b,y-> action(m[2],y)); b:=ChangeSign(-x[1],b); c:=ChangeSign(-x[1],[m]); @@ -309,7 +309,7 @@ k:=p[2]; Diff:=[p]; if i=1 then l:=[1]; else l:=ShallowCopy(PseudoBoundary[i-1][AbsInt(j)]); -Apply(l,x->Action(k,x)); #l is the boundary of p. +Apply(l,x->action(k,x)); #l is the boundary of p. l:=ChangeSign(j,l); fi; diff --git a/lib/Resolutions/tietzered.gi b/lib/Resolutions/tietzered.gi index be10c8d7..a30bdd86 100644 --- a/lib/Resolutions/tietzered.gi +++ b/lib/Resolutions/tietzered.gi @@ -15,7 +15,7 @@ local PseudoBoundaryN, PseudoBoundaryNplus2, FindFreeFace, - Action, ActionInv, Elts, + action, ActionInv, Elts, modN, modNplus1, triple, phi, nwrdd, wrdd, tmp, trp3,pos, @@ -42,7 +42,7 @@ fi; ##################################################################### -Action:=function(g,l) +action:=function(g,l) local pos, h; h:=Elts[g]*Elts[l[2]]; pos:=Position(Elts,h); @@ -70,7 +70,7 @@ end; if IsPseudoList(Elts) then if IsBound(Elts!.mult) then ##################################################################### -Action:=function(g,l) +action:=function(g,l) local pos, h; pos:=Elts!.mult(g,l[2]); return [1*l[1],pos]; @@ -153,7 +153,7 @@ for i in [1..Length(b)] do if b[i][1]<0 then w:=NegateWord(w); fi; - w:=List(w,x->Action(b[i][2],x)); + w:=List(w,x->action(b[i][2],x)); Append(newb,w); fi; od; @@ -251,9 +251,9 @@ ans:=[]; for v in V do if AbsInt(v[1])=e then if v[1]>0 then - Append(ans, List(wrdd,a->Action(v[2],a)) ); + Append(ans, List(wrdd,a->action(v[2],a)) ); else - Append(ans, List(nwrdd,a->Action(v[2],a)) ); + Append(ans, List(nwrdd,a->action(v[2],a)) ); fi; else Add(ans,v); diff --git a/lib/TorsionSubcomplexes/barycentriccount.gi b/lib/TorsionSubcomplexes/barycentriccount.gi index 3ee7c50f..27a15ef6 100644 --- a/lib/TorsionSubcomplexes/barycentriccount.gi +++ b/lib/TorsionSubcomplexes/barycentriccount.gi @@ -11,7 +11,7 @@ InstallGlobalFunction(CountingCellsOfBaryCentricSubdivision, function(C) local Cells,coBoundaries,N,i,Dims,pos,j,x,y,w,id,t,k,ck,c,s,a,v,g,b,d, Elts,Rep,mult,ListUnion, Chains, IsSameOrbit, AddReturn, - Orbit, Dimension, StabRec, Action, Stabilizer, Boundary, + Orbit, Dimension, StabRec, action, Stabilizer, Boundary, NChains, BoundaryRec, FinalBoundary, Partition; diff --git a/lib/TorsionSubcomplexes/quotientcomplex.gi b/lib/TorsionSubcomplexes/quotientcomplex.gi index 719fd0e0..8bc4bbf2 100644 --- a/lib/TorsionSubcomplexes/quotientcomplex.gi +++ b/lib/TorsionSubcomplexes/quotientcomplex.gi @@ -4,7 +4,7 @@ function(C,p) local pTorsionSubcomplex, celldata, quotient, torsionCells, i, j, k, t, l, currentCell, BoundaryImage, dim0, ReIndexCell, lnth, dims,n, Elts, Boundary, StabilizerGroups, RotSubGroups, s, - boundaryList, BI, SGN, LstEl, tmp, G, Stabilizer, Action, Dimension; + boundaryList, BI, SGN, LstEl, tmp, G, Stabilizer, action, Dimension; pTorsionSubcomplex:=GetTorsionSubcomplex(C,p); celldata:=StructuralCopy(pTorsionSubcomplex!.originalData); @@ -179,7 +179,7 @@ local pTorsionSubcomplex, celldata, quotient, torsionCells, #################### - Action:=function(n,k,g) + action:=function(n,k,g) return 1; end; @@ -194,7 +194,7 @@ return Objectify(HapNonFreeResolution, length:=lnth, boundary:=Boundary, homotopy:=fail, - action:=Action, + action:=action, dimension:=Dimension, properties:= [["length",Maximum(1000,lnth)], @@ -217,7 +217,7 @@ local vcd, stabilizerCardinalities, celldata, data, torsionPosition, torsionCells, numberOfTorsionCells, n, j, returnedData, warned, groupname, admissibilityCheck, x, i, b, tmpCell, cell, boundary, groupName, lnth, dims, Elts, Boundary, StabilizerGroups, RotSubGroups, s,k, -boundaryList, BI, SGN, LstEl, tmp, G, Stabilizer, Action, Dimension; +boundaryList, BI, SGN, LstEl, tmp, G, Stabilizer, action, Dimension; admissibilityCheck := function(celldata) ######################################################### @@ -420,7 +420,7 @@ od; #################### - Action:=function(n,k,g) + action:=function(n,k,g) return 1; end; @@ -435,7 +435,7 @@ od; length:=lnth, boundary:=Boundary, homotopy:=fail, - action:=Action, + action:=action, dimension:=Dimension, torsion:=p, groupname:=groupName, @@ -540,7 +540,7 @@ InstallGlobalFunction("ConvertTorsionComplexToGcomplex", function(C) local data, Elts,n,lnth,dims,Dimension, StabilizerGroups, RotSubGroups,boundaryList,k, tmp, BI, SGN, LstEl, - s, G, Boundary, Stabilizer, Action; + s, G, Boundary, Stabilizer, action; data:=StructuralCopy(C!.celldata); @@ -616,7 +616,7 @@ end; #################### -Action:=function(n,k,g) +action:=function(n,k,g) return 1; end; @@ -631,7 +631,7 @@ return Objectify(HapNonFreeResolution, length:=lnth, boundary:=Boundary, homotopy:=fail, - action:=Action, + action:=action, dimension:=Dimension, torsion:=C!.torsion, groupname:=C!.groupname, diff --git a/lib/TorsionSubcomplexes/subdivision.gi b/lib/TorsionSubcomplexes/subdivision.gi index d7bdefc5..52e35285 100644 --- a/lib/TorsionSubcomplexes/subdivision.gi +++ b/lib/TorsionSubcomplexes/subdivision.gi @@ -43,7 +43,7 @@ local W, StabRec, i, j, N, M, x, bdry, s1, s2, p, k, w, t, DimRec, BoundaryRec, id, dims, NotRigid, NewCell, Cell, Elts, Boundary, Dimension, CLeftCosetElt, LCoset, pos, Stab, Mult,DimTemp, BoundaryTemp, Partition, ConnectedCheck, - Stabilizer, Action, IsRigidCell, ReplaceCell, SubdividingCell, + Stabilizer, action, IsRigidCell, ReplaceCell, SubdividingCell, Orbit, C, NaiveEulerChar, CellHomology, exportFile, IsContractible, CosetRec, IsSimplyConnected, BoundaryMult, BoundaryMultRec, jj, jjj; @@ -1066,7 +1066,7 @@ if (k<=N) then return DimRec[k+1]; end; - Action:=function(k,i,j) + action:=function(k,i,j) return 1; end; ################################################################## @@ -1079,7 +1079,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=C!.group, stabilizer:=Stabilizer, - action:=Action, + action:=action, subdividing:=SubdividingCell, replacecell:=ReplaceCell, isrigid:=IsRigidCell, @@ -1105,7 +1105,7 @@ local W, StabRec, i, j, N, M, x, bdry, s1, s2, p, k, w, t, DimRec, BoundaryRec, id, dims, NotRigid, NewCell, Cell, Elts, Boundary, Dimension, CLeftCosetElt, LCoset, pos, Stab, Mult,DimTemp, BoundaryTemp, Partition, ConnectedCheck, - Stabilizer, Action, IsRigidCell, ReplaceCell, SubdividingCell, + Stabilizer, action, IsRigidCell, ReplaceCell, SubdividingCell, Orbit, C, NaiveEulerChar, CellHomology, exportFile, IsContractible, CosetRec, IsSimplyConnected, BoundaryMult, BoundaryMultRec, jj, jjj; @@ -2133,7 +2133,7 @@ if (k<=N-1) then return DimRec[k+1]; end; - Action:=function(k,i,j) + action:=function(k,i,j) return 1; end; ################################################################## @@ -2146,7 +2146,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=C!.group, stabilizer:=Stabilizer, - action:=Action, + action:=action, subdividing:=SubdividingCell, replacecell:=ReplaceCell, isrigid:=IsRigidCell, @@ -2168,7 +2168,7 @@ local W, StabRec, i, j, N, M, x, bdry, s1, s2, p, k, w, t, DimRec, BoundaryRec, id, dims, NotRigid, NewCell, Cell, Elts, Boundary, Dimension, CLeftCosetElt, LCoset, pos, Stab, Mult,DimTemp, BoundaryTemp, Partition, ConnectedCheck, - Stabilizer, Action, IsRigidCell, ReplaceCell, SubdividingCell, + Stabilizer, action, IsRigidCell, ReplaceCell, SubdividingCell, Orbit, C, NaiveEulerChar, CellHomology, exportFile, IsContractible, CosetRec; @@ -3016,7 +3016,7 @@ end; return DimRec[k+1]; end; - Action:=function(k,i,j) + action:=function(k,i,j) return 1; end; ################################################################## @@ -3029,7 +3029,7 @@ return Objectify(HapNonFreeResolution, elts:=Elts, group:=C!.group, stabilizer:=Stabilizer, - action:=Action, + action:=action, subdividing:=SubdividingCell, replacecell:=ReplaceCell, isrigid:=IsRigidCell, From e380092e42d8b22ada12bdee8c05068a6495395f Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 21 Dec 2025 16:35:54 +0100 Subject: [PATCH 2/2] Remove redundant semicolons in function definitions --- lib/ArithmeticGroups/barycentric.gi | 2 +- lib/ArithmeticGroups/cplGTree.gi | 4 +- lib/ArithmeticGroups/freeZGRes.gi | 4 +- lib/ArithmeticGroups/gchaincomplex.gi | 4 +- lib/ArtinCoxeter/coxeterWythoff.gi | 8 +- lib/ArtinCoxeter/diagrams.gi | 2 +- lib/ArtinCoxeter/resArtin.gi | 2 +- lib/ArtinCoxeter/resArtin_spherical.gi | 2 +- lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi | 4 +- lib/CatGroups/CatBasic.gi | 2 +- lib/CatGroups/CatConstructions.gi | 4 +- lib/CatGroups/algIdentities.gi | 4 +- lib/CatGroups/eilenberg.gi | 10 +-- lib/CategoryTheory/categories.gi | 8 +- lib/CohomologyOperations/mycupi.gi | 8 +- lib/CohomologyOperations/steenrod.gi | 4 +- lib/CohomologyOperations/stiefel.gi | 8 +- lib/Congruence/bianchi.gi | 4 +- lib/Congruence/bianchiComplex.gi | 10 +-- lib/Congruence/bianchiPart2.gi | 4 +- lib/Congruence/bianchiStab.gi | 8 +- lib/Congruence/cong.gi | 6 +- lib/Congruence/cuspidal.gi | 4 +- lib/Congruence/hecke.gi | 6 +- lib/Congruence/qnf_nc.gi | 6 +- lib/Congruence/quadArithmetic.gi | 10 +-- lib/Congruence/quadraticIntegers.gi | 12 +-- lib/Congruence/residues.gd | 2 +- lib/Congruence/sl2conjugates.gi | 10 +-- lib/Congruence/sl2o.gi | 12 +-- lib/Congruence/sl2subgroups.gi | 12 +-- lib/Congruence/volume.gi | 4 +- lib/FpGmodules/fpgbasics.gi | 8 +- lib/FpGmodules/meataxe.gi | 2 +- lib/FpGmodules/resfpgmod.gi | 4 +- lib/FreeGmodules/wordOperations.gi | 14 +-- lib/Functors/alexander.gi | 2 +- lib/Functors/equiChainMap.gi | 10 +-- lib/Functors/homToModpModule.gi | 4 +- lib/Functors/homToZmodule.gi | 4 +- lib/Functors/homtint.gi | 10 +-- lib/Functors/homtintmodp.gi | 12 +-- lib/Functors/modularEquiChainMap.gi | 8 +- lib/Functors/primePartDerivedvsgc.gi | 2 +- lib/Functors/simplify.gi | 4 +- lib/Functors/tensorWithModPModule.gi | 2 +- lib/Functors/tensorWithTwistedZ.gi | 2 +- lib/Functors/tensorWithTwistedZmodP.gi | 2 +- lib/Functors/tensorWithZmodP.gi | 8 +- lib/Functors/tensorWithZmodule.gi | 2 +- lib/Functors/transfer.gi | 8 +- lib/Functors/various.gi | 2 +- lib/GOuterGroups/functorialGouter.gi | 2 +- lib/GOuterGroups/functorialGouter.trial | 2 +- lib/GOuterGroups/goutergroup.gi | 14 +-- lib/GOuterGroups/homtogouter.gi | 8 +- lib/GraphsOfGroups/graphOfResolutions.gi | 12 +-- lib/GraphsOfGroups/graphs.gi | 2 +- lib/GraphsOfGroups/resGraph.gi | 4 +- lib/HapCocyclic/gap/ccgroup.gi | 2 +- lib/HapCocyclic/gap/ccsubgroups.gi | 2 +- lib/Homology/groupCohomology.gi | 2 +- lib/Homology/groupHomology.gi | 10 +-- lib/Homology/integralCohomology.gi | 2 +- lib/Homology/isSuperperfect.gi | 2 +- lib/Homology/modularCohomology.gi | 2 +- lib/Homology/modularHomology.gi | 2 +- lib/Homology/new_persistent.gi | 2 +- lib/Homology/persistent.gi | 12 +-- lib/Homology/syzygy.gi | 4 +- lib/Kelvin/cw-functions.gi | 2 +- lib/Kelvin/knot-comp-bound.gi | 12 +-- lib/Knots/cubicalKnot.gi | 2 +- lib/Knots/identifyKnots.gi | 2 +- lib/LieAlgebras/chev.gi | 8 +- lib/LieAlgebras/chevalleyEilenberg.gi | 12 +-- lib/LieAlgebras/leibniz.gi | 12 +-- lib/Manifolds/cubeCwComplex.gi | 2 +- lib/Manifolds/dehn.gi | 18 ++-- lib/Manifolds/manifoldType.gi | 2 +- lib/Manifolds/manifolds.gi | 8 +- lib/Manifolds/octahedronCwComplex.gi | 2 +- lib/Manifolds/simplicialcup.dev | 2 +- lib/Manifolds/simplicialcup.gi | 2 +- lib/ModPRings/functorial.gi | 2 +- lib/ModPRings/recordPart1.gi | 8 +- lib/NonabelianTensor/bogomolov.gi | 4 +- lib/NonabelianTensor/equivalenceclasses.gi | 2 +- lib/NonabelianTensor/exteriorProduct.gi | 2 +- lib/NonabelianTensor/tensorPair.gi | 2 +- lib/Operations/hapOps.gi | 86 +++++++++--------- lib/Perturbations/conrad.gi | 8 +- lib/Perturbations/conrad.lt | 4 +- lib/Perturbations/contractibleSL2Zcomplex.gi | 8 +- .../contractibleSL2ZcomplexALT.gi | 8 +- lib/Perturbations/dutour.gi | 18 ++-- lib/Perturbations/filteredChainComplex.gi | 2 +- lib/Perturbations/freeRes.gi | 20 ++--- lib/Perturbations/nonFreeResSubgroup.gi | 6 +- lib/Perturbations/resDirectProd.gi | 14 +-- lib/Perturbations/resDirectProd.good | 14 +-- lib/Perturbations/resDirectProdLazy.gi | 18 ++-- lib/Perturbations/resExtension.gi | 18 ++-- .../resFiniteDirectProd.15May2016 | 4 +- lib/Perturbations/resFiniteDirectProd.gi | 4 +- lib/Perturbations/resFiniteExt.gi | 20 ++--- lib/Perturbations/twistedTensorProduct.gi | 16 ++-- .../twistedTensorProduct.readable | 12 +-- lib/PolyComplexes/arrayOps.gi | 88 +++++++++---------- lib/PolyComplexes/chainComplexes.gi | 20 ++--- lib/PolyComplexes/clique.gi | 6 +- lib/PolyComplexes/cluster.gi | 22 ++--- lib/PolyComplexes/dvf.gi | 2 +- lib/PolyComplexes/groupComplexes.gi | 18 ++-- lib/PolyComplexes/metrics.gi | 6 +- lib/PolyComplexes/pureCubicalComplexes.gi | 34 +++---- .../purePermutahedralComplexes.gi | 2 +- lib/PolyComplexes/rips.gi | 4 +- lib/PolyComplexes/simplicialComplexes.gi | 22 ++--- lib/PolyComplexes/simpprod.gi | 2 +- lib/PolyComplexes/sparseCubicalComplexes.gi | 18 ++-- lib/PolyComplexes/twoDimensional.gi | 4 +- lib/PolyComplexes/twoDimensionalPerm.gi | 2 +- lib/Polymake/aspherical.gi | 4 +- lib/Polymake/cryst.gi | 6 +- lib/Polymake/polyFaces.gi | 8 +- lib/PureComplexes/pureComplexes.gi | 56 ++++++------ lib/Quandles/quandleKnots.gi | 6 +- lib/Quandles/quandleOrbits.gi | 6 +- lib/Quandles/quandles.gi | 10 +-- lib/RahmSanchez/DavisComplex.gi | 10 +-- lib/RegularCWComplexes/basicRegular.gi | 38 ++++---- lib/RegularCWComplexes/cocontract.gi | 12 +-- lib/RegularCWComplexes/cocycle.gi | 8 +- lib/RegularCWComplexes/contractAlt.gi | 2 +- lib/RegularCWComplexes/diagonal.gi | 2 +- lib/RegularCWComplexes/directproduct.gi | 2 +- .../elementaryCWConstructions.gi | 8 +- lib/RegularCWComplexes/equivariantCW.gi | 2 +- lib/RegularCWComplexes/filteredCW.gi | 6 +- lib/RegularCWComplexes/fundamental.gi | 6 +- lib/RegularCWComplexes/grannyknot.gi | 2 +- lib/RegularCWComplexes/ldcup.gi | 2 +- lib/RegularCWComplexes/piZero.gi | 6 +- lib/RegularCWComplexes/planartrees.gi | 2 +- lib/RegularCWComplexes/quotient.gi | 2 +- lib/RegularCWComplexes/spin.gi | 2 +- lib/RegularCWComplexes/universalCover.gi | 2 +- lib/Resolutions/coreducedRes.gi | 10 +-- lib/Resolutions/resAspherical.gi | 6 +- lib/Resolutions/resFiniteGroup.gi | 18 ++-- lib/Resolutions/resGeneric.gi | 2 +- lib/Resolutions/resInfSubgroup.gi | 2 +- lib/Resolutions/resSmallFpGroup.gi | 4 +- lib/Resolutions/resSubgroup.gi | 4 +- lib/Resolutions/tietzered.gi | 4 +- lib/ResolutionsModP/poincare.gi | 2 +- lib/ResolutionsModP/primepart.gi | 2 +- lib/ResolutionsModP/radical.gi | 6 +- lib/ResolutionsModP/ranksPrimeGroup.gi | 4 +- lib/ResolutionsModP/resPrimeGroup.gi | 6 +- lib/ResolutionsModP/resPrimeGroupSparse.gi | 6 +- lib/Rings/cocycleChainMap.gi | 2 +- lib/SimplicialGroups/tensor2chains.gi | 4 +- lib/Streams/HAPexport.gi | 2 +- lib/Streams/HAPimport.gi | 8 +- lib/Streams/streams.gi | 4 +- lib/TorsionSubcomplexes/quotientcomplex.gi | 18 ++-- lib/TorsionSubcomplexes/subdivision.gi | 2 +- read.g | 10 +-- tst/examples/1.2.6 | 2 +- tst/examples/1.3.4 | 2 +- tst/examples/1.3.5 | 2 +- tst/examples/4.3.2 | 2 +- tst/examples/A.6.2 | 2 +- tst/examples/A.6.3 | 4 +- tst/testall1/1.3.4.tst | 2 +- tst/testall1/1.99.2.tstx | 2 +- tutorial/tutex/10.1.txt | 2 +- tutorial/tutex/11.21.txt | 2 +- tutorial/tutex/12.19.txt | 2 +- tutorial/tutex/3.8.txt | 2 +- tutorial/tutex/4.4.txt | 2 +- tutorial/tutex/6.15.txt | 2 +- tutorial/tutex/6.16C.txt | 2 +- tutorial/tutex/6.16D.txt | 2 +- tutorial/tutex/6.16E.txt | 2 +- tutorial/tutex/6.24.txt | 2 +- www/SideLinks/About/aboutBogomolov.html | 2 +- www/SideLinks/About/aboutCocycles.html | 2 +- www/SideLinks/About/aboutCoverinSpaces.html | 2 +- www/SideLinks/About/aboutCoveringSpaces.html | 2 +- www/SideLinks/About/aboutParallel.html | 2 +- www/SideLinks/About/aboutQuandles.html | 2 +- www/SideLinks/About/aboutQuandles2.html | 2 +- www/SideLinks/About/aboutSpaceGroup.html | 2 +- .../About/aboutTwistedCoefficients.html | 2 +- 197 files changed, 707 insertions(+), 707 deletions(-) diff --git a/lib/ArithmeticGroups/barycentric.gi b/lib/ArithmeticGroups/barycentric.gi index f633bfc4..ed452bd8 100644 --- a/lib/ArithmeticGroups/barycentric.gi +++ b/lib/ArithmeticGroups/barycentric.gi @@ -268,7 +268,7 @@ end); InstallMethod(BarycentricSubdivision, "for non-free resolutions", [IsHapNonFreeResolution], -function(R); +function(R) return HAP_BaryCentricSubdivisionGComplex(R); end); ######################################################### diff --git a/lib/ArithmeticGroups/cplGTree.gi b/lib/ArithmeticGroups/cplGTree.gi index 889acae4..ebbedff1 100644 --- a/lib/ArithmeticGroups/cplGTree.gi +++ b/lib/ArithmeticGroups/cplGTree.gi @@ -127,7 +127,7 @@ local t1,t2, ## ## Output: 1 or -1 ## - action:=function(n,k,l); + action:=function(n,k,l) return 1; end; ################################################################### @@ -144,7 +144,7 @@ local t1,t2, ## ## Output: the kith stabiliser subgroup in dimension n ## - Stabilizer:=function(n,k); + Stabilizer:=function(n,k) return StabGrps[n+1][k]; end; ################################################################### diff --git a/lib/ArithmeticGroups/freeZGRes.gi b/lib/ArithmeticGroups/freeZGRes.gi index 5046b4a9..371da1fa 100644 --- a/lib/ArithmeticGroups/freeZGRes.gi +++ b/lib/ArithmeticGroups/freeZGRes.gi @@ -276,7 +276,7 @@ local DimensionRecord:=List([0..N],Dimension); - Dimension:=function(k); + Dimension:=function(k) return DimensionRecord[k+1]; end; ################################################################### @@ -676,7 +676,7 @@ local FilteredLength:=Maximum(Flat(FiltDimRecs)); ################################################################### - FilteredDimension:=function(r,k); + FilteredDimension:=function(r,k) return Length(Filtered(FiltDimRecs[k+1],x->x<=r)); diff --git a/lib/ArithmeticGroups/gchaincomplex.gi b/lib/ArithmeticGroups/gchaincomplex.gi index 3e7e331a..cb482bdc 100644 --- a/lib/ArithmeticGroups/gchaincomplex.gi +++ b/lib/ArithmeticGroups/gchaincomplex.gi @@ -72,14 +72,14 @@ stabilizers[k][i]:=Stabilizer(G,orbits[k][i][1],ontuples); od;od; ###################### -Dim:=function(k); +Dim:=function(k) if k<0 or k>Dimension(K) then return 0; fi; return Length(orbits[k+1]); end; ###################### ###################### -stabfn:=function(k,i); +stabfn:=function(k,i) return stabilizers[k+1][i]; end; ###################### diff --git a/lib/ArtinCoxeter/coxeterWythoff.gi b/lib/ArtinCoxeter/coxeterWythoff.gi index 44d8c650..da5e1f82 100644 --- a/lib/ArtinCoxeter/coxeterWythoff.gi +++ b/lib/ArtinCoxeter/coxeterWythoff.gi @@ -108,7 +108,7 @@ od; #Print(NonEssentialSets,"\n"); ############################################################## -CoxeterDiagramIsEssential:=function(T); +CoxeterDiagramIsEssential:=function(T) if Length(T)=Length(Vertices) then return true; fi; if Length(T)=0 then return true; fi; if T in NonEssentialSets[Length(T)] then return false; fi; @@ -133,7 +133,7 @@ end; ############################################################## ############################################################## -Vcomplement:=function(S); +Vcomplement:=function(S) return Filtered(Vertices,x->not x in S); end; ############################################################## @@ -163,7 +163,7 @@ od; od; ##################################################################### -Dimension:=function(n); +Dimension:=function(n) if n=0 then return 1; else return Length(ResGens[n+1]); fi; @@ -320,7 +320,7 @@ end; ############################################################### # This describes how the group WP acts on the orientation. -action:=function(n,k,g); +action:=function(n,k,g) if n=0 then return 1; fi; if EltsWP[g] in WPev then return 1; diff --git a/lib/ArtinCoxeter/diagrams.gi b/lib/ArtinCoxeter/diagrams.gi index 8d8aca7f..4003cdbc 100644 --- a/lib/ArtinCoxeter/diagrams.gi +++ b/lib/ArtinCoxeter/diagrams.gi @@ -15,7 +15,7 @@ basicgif:=Filename(tmpDir,"basic.gif"); D:=arg[1]; V:=CoxeterDiagramVertices(D); -M:=function(i,j); +M:=function(i,j) return CoxeterDiagramMatrix(D,i,j); end; diff --git a/lib/ArtinCoxeter/resArtin.gi b/lib/ArtinCoxeter/resArtin.gi index 81532551..6e1e62bf 100644 --- a/lib/ArtinCoxeter/resArtin.gi +++ b/lib/ArtinCoxeter/resArtin.gi @@ -50,7 +50,7 @@ od; od; ##################################################################### -Dimension:=function(n); +Dimension:=function(n) if n=0 then return 1; else return Length(ResGens[n+1]); fi; diff --git a/lib/ArtinCoxeter/resArtin_spherical.gi b/lib/ArtinCoxeter/resArtin_spherical.gi index 3c58f5a7..b678a524 100644 --- a/lib/ArtinCoxeter/resArtin_spherical.gi +++ b/lib/ArtinCoxeter/resArtin_spherical.gi @@ -51,7 +51,7 @@ od; od; ##################################################################### -Dimension:=function(n); +Dimension:=function(n) if n=0 then return 1; else return Length(ResGens[n+1]); fi; diff --git a/lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi b/lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi index dbb97754..75a82fa4 100644 --- a/lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi +++ b/lib/ArtinCoxeter/tuantobedeleted/freeZGRes.gi @@ -222,7 +222,7 @@ end; DimensionRecord:=List([0..N],Dimension); -Dimension:=function(k); +Dimension:=function(k) return DimensionRecord[k+1]; end; ################################################################### @@ -515,7 +515,7 @@ od; FilteredLength:=Maximum(Flat(FiltDimRecs)); ################################################## -FilteredDimension:=function(r,k); +FilteredDimension:=function(r,k) return Length(Filtered(FiltDimRecs[k+1],x->x<=r)); diff --git a/lib/CatGroups/CatBasic.gi b/lib/CatGroups/CatBasic.gi index e8a6d53a..a837f7e6 100644 --- a/lib/CatGroups/CatBasic.gi +++ b/lib/CatGroups/CatBasic.gi @@ -46,7 +46,7 @@ d:=GroupHomomorphismByImagesNC(M,N,gensM, List(gensM,x->Image(C!.targetMap,x))); ######### -fn:=function(i); +fn:=function(i) if i=1 then return GOuterGroup(d); fi; if i=2 then return GOuterGroup( diff --git a/lib/CatGroups/CatConstructions.gi b/lib/CatGroups/CatConstructions.gi index 5e40ada6..31503870 100644 --- a/lib/CatGroups/CatConstructions.gi +++ b/lib/CatGroups/CatConstructions.gi @@ -14,7 +14,7 @@ List(GeneratorsOfGroup(C),x-> ImageElm( Embedding(C,1), ImageElm( Projection(C),x) ))); ############################ -CmapG:=function(x); +CmapG:=function(x) return PreImagesRepresentative(Embedding(C,2), Image(Embedding(C,1), Image(Projection(C),x)^-1) *x); end; @@ -74,7 +74,7 @@ List(GeneratorsOfGroup(C),x-> Image( Embedding(C,1), Image( Projection(C),x) ))); ############################ -CmapG:=function(x); +CmapG:=function(x) return PreImagesRepresentative(Embedding(C,2), Image(Embedding(C,1), Image(Projection(C),x)^-1) *x); end; diff --git a/lib/CatGroups/algIdentities.gi b/lib/CatGroups/algIdentities.gi index 12195e5c..c3b8a50e 100644 --- a/lib/CatGroups/algIdentities.gi +++ b/lib/CatGroups/algIdentities.gi @@ -50,13 +50,13 @@ gens:=[]; ##################################################################### -Mult:=function(g,h); +Mult:=function(g,h) return Position(Elts,Elts[g]*Elts[h]); end; ##################################################################### ##################################################################### -Inv:=function(g); +Inv:=function(g) return Position(Elts,Elts[g]^-1); end; ##################################################################### diff --git a/lib/CatGroups/eilenberg.gi b/lib/CatGroups/eilenberg.gi index 34331e29..6c7206d8 100644 --- a/lib/CatGroups/eilenberg.gi +++ b/lib/CatGroups/eilenberg.gi @@ -25,7 +25,7 @@ end; M:=[];; for i in [1..m] do -MFUN:=function(i); +MFUN:=function(i) M[i]:=[]; for j in [0..i] do M[i][j+1]:=K!.boundariesList(i,j); @@ -40,7 +40,7 @@ od; D:=[];; for i in [1..m] do #so we are in degree i-1 -DFUN:=function(i); +DFUN:=function(i) D[i]:=[]; if L[i]>0 then for j in [0..i-1] do @@ -57,14 +57,14 @@ od; ##################################### -dimension:=function(n); +dimension:=function(n) if n<0 or n>Length(L)-1 then return 0; fi; return L[n+1]; end; ##################################### ##################################### -boundary:=function(n,j,k); #degree n, boundary map j, generator k +boundary:=function(n,j,k) #degree n, boundary map j, generator k if n<1 or n>Length(L)-1 then return []; fi; if not IsBound(M[n]) then MFUN(n); fi; return 1*M[n][j+1][k]; @@ -72,7 +72,7 @@ end; ##################################### ##################################### -degeneracy:=function(n,j,k); #degree n, degeneracy map j, generator k +degeneracy:=function(n,j,k) #degree n, degeneracy map j, generator k if n<0 or n>Length(L)-2 then return []; fi; if not IsBound(D[n+1]) then DFUN(n+1); fi; return 1*D[n+1][j+1][k]; diff --git a/lib/CategoryTheory/categories.gi b/lib/CategoryTheory/categories.gi index cbdb686e..8ec7d05a 100644 --- a/lib/CategoryTheory/categories.gi +++ b/lib/CategoryTheory/categories.gi @@ -179,7 +179,7 @@ InstallMethod( Target, "Method for making Target return Range", [ HasRange ], - function( X ); + function( X ) return Range(X); end); @@ -195,7 +195,7 @@ InstallMethod( CategoricalEnrichment, "method for creating a category object", [ IsObject, IsString ], - function( X , Name ); + function( X , Name ) return CategoryObject(X,Name); end); @@ -204,7 +204,7 @@ InstallMethod( CategoricalEnrichment, "method for creating a category arrow", [ HasSource , IsString ], #HasSource is not the best - function( X , Name ); + function( X , Name ) return CategoryArrow( CategoryObject(Source(X),Name), @@ -324,7 +324,7 @@ InstallOtherMethod( \=, "equality of objects in a category", [ IsCategoryObject, IsCategoryObject], - function( X, Y ); + function( X, Y ) if not CategoryName(X)=CategoryName(Y) then return false; fi; diff --git a/lib/CohomologyOperations/mycupi.gi b/lib/CohomologyOperations/mycupi.gi index 37c81708..161ff574 100644 --- a/lib/CohomologyOperations/mycupi.gi +++ b/lib/CohomologyOperations/mycupi.gi @@ -40,7 +40,7 @@ tauhom:=GroupHomomorphismByFunction(GG,GG,x-> ImageElm(SecondEmbedding,ImageElm(Fproj,x))*ImageElm(FirstEmbedding,ImageElm(Sproj,x)) ); ################################ -tau:=function(k); +tau:=function(k) return Position(RGG!.elts,ImageElm(tauhom,RGG!.elts[k])); end; ################################ @@ -50,13 +50,13 @@ phiRec:=List([1..N+1],i->[]); phiRecT:=List([1..N+1],i->[]); ################################ -Diag:=function(x); +Diag:=function(x) # G-->GxG, x--> (x,x) return Position(RGG!.elts,ImageElm(FirstEmbedding,x)*ImageElm(SecondEmbedding,x)); end; ################################ Diagrec:=List([1..Order(G)],i->Diag(Elements(G)[i])); -Diag:=function(x); return Diagrec[Position(Elements(G),x)];end; +Diag:=function(x) return Diagrec[Position(Elements(G),x)];end; ################################ Tau:=function(n,kk) @@ -70,7 +70,7 @@ end; MT:=MultiplicationTable(GG); ################################ -MultGG:=function(i,j); return MT[i][j]; end; +MultGG:=function(i,j) return MT[i][j]; end; ################################ ################################ diff --git a/lib/CohomologyOperations/steenrod.gi b/lib/CohomologyOperations/steenrod.gi index 8802c25a..cfe8c341 100644 --- a/lib/CohomologyOperations/steenrod.gi +++ b/lib/CohomologyOperations/steenrod.gi @@ -207,7 +207,7 @@ end; ######################## ######################## -Sq0:=function(w); +Sq0:=function(w) return w; end; ######################## @@ -242,7 +242,7 @@ if not IsBound(A!.squares) and IsBound(A!.chainComplex) then A!.maxdeg:=Length(A!.chainComplex); A!.complete:=true; A!.squares:=[]; -A!.squares[1]:=function(x); return x; end; +A!.squares[1]:=function(x) return x; end; A!.bockstein:=HAP_bockstein(A); A!.squares[2]:= A!.bockstein; fi; diff --git a/lib/CohomologyOperations/stiefel.gi b/lib/CohomologyOperations/stiefel.gi index 0bee5656..bc93a369 100644 --- a/lib/CohomologyOperations/stiefel.gi +++ b/lib/CohomologyOperations/stiefel.gi @@ -55,7 +55,7 @@ PreImagesRepresentative(phi, PreImagesRepresentative(iso,P!.elts[x[2]]))) ]); Add(BoundaryRec[n],bnd); od; od; -Boundary:=function(n,k); +Boundary:=function(n,k) if n>ln or n<1 then return []; fi; if k>0 then return BoundaryRec[n][k];fi; if k<0 then return NegateWord(BoundaryRec[n][-k]);fi; @@ -78,7 +78,7 @@ StabilizerSubgroupRec[n+1][k]:=Group(gens); fi; od; od; -StabilizerSubgroup:=function(n,k); +StabilizerSubgroup:=function(n,k) return StabilizerSubgroupRec[n+1][AbsInt(k)]; end; ################################ @@ -179,7 +179,7 @@ od; # The cochain map CT--->CR sends vector v to v*CTmatCR ####### -TRmapping:=function(v,n); +TRmapping:=function(v,n) return v*CTmatCR[n+1]; end; ####### @@ -283,7 +283,7 @@ Bas2:=List(Bas1,i->i*fund); L:=LeftModuleGeneralMappingByImages(Subspace(A,Bas1),Subspace(A,Bas2),Bas1,Bas2); ##### -PIRep:=function(L,x); +PIRep:=function(L,x) if x=fail then return x; fi; if x=Zero(A) then return Elements(Kernel(L)); fi; return Elements(PreImages(L,x)); diff --git a/lib/Congruence/bianchi.gi b/lib/Congruence/bianchi.gi index d2ee07c3..b60b342f 100644 --- a/lib/Congruence/bianchi.gi +++ b/lib/Congruence/bianchi.gi @@ -122,7 +122,7 @@ end); ##### ####################################################### ####################################################### InstallGlobalFunction(HAP_SqrtInequality, ##### -function(a,b,c); ##### +function(a,b,c) ##### #Inputs three positive rational numbers and #returns Sqrt(a) + Sqrt(b) <= Sqrt(c). if a+b>c then return false; fi; @@ -135,7 +135,7 @@ end); ##### ####################################################### ####################################################### InstallGlobalFunction(HAP_SqrtStrictInequality, ##### -function(a,b,c); ##### +function(a,b,c) ##### #Inputs three positive rational numbers and #returns Sqrt(a) + Sqrt(b) <= Sqrt(c). if a+b>=c then return false; fi; diff --git a/lib/Congruence/bianchiComplex.gi b/lib/Congruence/bianchiComplex.gi index d61572a1..bffc16c8 100644 --- a/lib/Congruence/bianchiComplex.gi +++ b/lib/Congruence/bianchiComplex.gi @@ -1,6 +1,6 @@ ####################################################### ####################################################### -HAP_QuadToCyclotomic:=function(z); +HAP_QuadToCyclotomic:=function(z) return z!.rational+z!.irrational*Sqrt(z!.bianchiInteger); end; ####################################################### @@ -135,7 +135,7 @@ local BianchiTrans, rep,Rec, Rec2, Rec3, Rec4, pos, OQ, T, TT, ans, e, f, A, ee, OQ:=Y!.ring; ###################################### -rep:=function(i); +rep:=function(i) return PositionProperty(Y!.ORBS[1],x->i in x); end; ###################################### @@ -500,7 +500,7 @@ Y!.ORBS[n+1]:=V; od; ####################################### -Dimension:=function(n); +Dimension:=function(n) if not n in [0,1,2] then return 0; fi; return Length(Y!.ORBS[n+1]); end; @@ -513,7 +513,7 @@ stb(n,i[1]);od;od; ####################################### -Stabilizer:=function(n,i); +Stabilizer:=function(n,i) return STABS[n+1][Y!.ORBS[n+1][i][1]]; end; ####################################### @@ -628,7 +628,7 @@ od; od; ####################################### -Boundary:=function(n,k); +Boundary:=function(n,k) if k>0 then return BoundaryRec[n][k]; else return NegateWord(BoundaryRec[n][-k]); fi; end; diff --git a/lib/Congruence/bianchiPart2.gi b/lib/Congruence/bianchiPart2.gi index 51c463c1..16ed3478 100644 --- a/lib/Congruence/bianchiPart2.gi +++ b/lib/Congruence/bianchiPart2.gi @@ -47,7 +47,7 @@ for i in [1..Length(S)] do od; ######## -fun:=function(v); +fun:=function(v) if v[1]R[2] then return false; fi; if v[2]!.irrationalfn(x)); end; ############################## diff --git a/lib/Congruence/hecke.gi b/lib/Congruence/hecke.gi index 6ff4975a..b6bdd743 100644 --- a/lib/Congruence/hecke.gi +++ b/lib/Congruence/hecke.gi @@ -10,7 +10,7 @@ ag, A, facts, T,E, Sfacts,Hecke ,fn, ConjugateIntersection,HHhomH; H:=arg[1]; pp:=arg[2]; k:=arg[3]; -#TietzeReducedResolution:=function(R); return R; end; +#TietzeReducedResolution:=function(R) return R; end; #There is a bug in the contracting homotopy of Tietze reducedResolution for #degree >1 but we only use degree 1 here. @@ -43,7 +43,7 @@ fi; ######################## -fn:=function(A,n); +fn:=function(A,n) if n=0 then return p^(k-2)*IdentityMat(Length(A)); fi; if n=1 then return A; fi; if n=2 then return A^2 - p^(k-1)*IdentityMat(Length(A)); fi; @@ -164,7 +164,7 @@ ag, A, facts, T,E, Sfacts,Hecke ,fn, ConjugateIntersection,HHhomH; H:=arg[1]; pp:=arg[2]; k:=arg[3]; -#TietzeReducedResolution:=function(R); return R; end; +#TietzeReducedResolution:=function(R) return R; end; #There is a bug in the contracting homotopy of Tietze reducedResolution for #degree >1 but we only use degree 1 here. diff --git a/lib/Congruence/qnf_nc.gi b/lib/Congruence/qnf_nc.gi index e03a249b..2dc1ba05 100644 --- a/lib/Congruence/qnf_nc.gi +++ b/lib/Congruence/qnf_nc.gi @@ -122,7 +122,7 @@ end); InstallOtherMethod(QuadraticIdeal, "ideal in a ring of quadratic integers", [IsRing and IsRingOfQuadraticIntegers_NC, IsHapQuadraticNumber], -function(R,x); +function(R,x) return QuadraticIdeal(R,[x]); end); ########################################################## @@ -263,7 +263,7 @@ end); InstallOtherMethod(Discriminant, "Discriminant of a quadratic number field", [IsQuadraticNumberField_NC], -function(Q); +function(Q) if Q!.bianchiInteger mod 4 = 1 then return Q!.bianchiInteger; else return 4*Q!.bianchiInteger; fi; end); @@ -275,7 +275,7 @@ end); InstallOtherMethod(Discriminant, "Discriminant of the quadratic number field associated to a ring of integers", [IsRingOfQuadraticIntegers_NC], -function(R); +function(R) return Discriminant(AssociatedQuadraticNumberField(R)); end); ########################################################## diff --git a/lib/Congruence/quadArithmetic.gi b/lib/Congruence/quadArithmetic.gi index f4021cce..5c323205 100644 --- a/lib/Congruence/quadArithmetic.gi +++ b/lib/Congruence/quadArithmetic.gi @@ -17,7 +17,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction (QuadraticNumberConjugate, -function(x); +function(x) if IsRat(x) then return x; fi; return QuadraticNumber(x!.rational, -x!.irrational, x!.bianchiInteger); end); @@ -382,7 +382,7 @@ InstallOtherMethod( \/, InstallOtherMethod( Sqrt, "for quadratic number", [IsHapQuadraticNumber], - function( x ); + function( x ) if x!.irrational=0 then return Sqrt(x!.rational); fi; return fail; end ); @@ -526,7 +526,7 @@ end; ##################################################################### ##################################################################### -HAPNorm:=function(OQ,x); +HAPNorm:=function(OQ,x) if IsRat(x) then return x^2; fi; if not OQ!.bianchiInteger=x!.bianchiInteger then return fail; fi; return x!.rational^2+(-x!.bianchiInteger)*x!.irrational^2; @@ -536,7 +536,7 @@ end; ##################################################################### ##################################################################### -HAPSqrt:=function(n); +HAPSqrt:=function(n) if IsRat(Sqrt(n)) then return Sqrt(n); fi; return QuadraticNumber(0,1,n); end; @@ -545,7 +545,7 @@ end; ##################################################################### ##################################################################### -QuadraticToCyclotomic:=function(a); +QuadraticToCyclotomic:=function(a) if IsRat(a) then return a; fi; return a!.rational+a!.irrational*Sqrt(a!.bianchiInteger); end; diff --git a/lib/Congruence/quadraticIntegers.gi b/lib/Congruence/quadraticIntegers.gi index 2528e72e..159cc0c8 100644 --- a/lib/Congruence/quadraticIntegers.gi +++ b/lib/Congruence/quadraticIntegers.gi @@ -82,7 +82,7 @@ end); InstallMethod(QuadraticIdeal, "ideal in a ring of quadratic integers", [IsRing and IsRingOfQuadraticIntegers, IsCyclotomic], -function(R,x); +function(R,x) return QuadraticIdeal(R,[x]); end); ########################################################## @@ -151,7 +151,7 @@ end); ############################## InstallGlobalFunction(Hap_int, -function(y); +function(y) if y>0 or IsInt(y) then return Int(y); else return Int(y)-1; fi; end); @@ -173,7 +173,7 @@ local g, N, D, p; ################################################### ############################## -#int:=function(y); +#int:=function(y) #if y>0 or IsInt(y) then return Int(y); #else return Int(y)-1; fi; #end; @@ -336,7 +336,7 @@ end); InstallOtherMethod(Discriminant, "Discriminant of a quadratic number field", [IsNumberField], -function(Q); +function(Q) if Q!.bianchiInteger mod 4 = 1 then return Q!.bianchiInteger; else return 4*Q!.bianchiInteger; fi; end); @@ -348,7 +348,7 @@ end); InstallOtherMethod(Discriminant, "Discriminant of the quadratic number field associated to a ring of integers", [IsRingOfQuadraticIntegers], -function(R); +function(R) return Discriminant(AssociatedNumberField(R)); end); ########################################################## @@ -458,7 +458,7 @@ InstallOtherMethod( Int, "Int for HAPSqrt", [ IsHapQuadraticNumber], 100000000, -function(x); +function(x) if not IsZero(x!.irrational) then return fail; fi; return Int(x!.rational); diff --git a/lib/Congruence/residues.gd b/lib/Congruence/residues.gd index 5af779c2..e4b2aa03 100644 --- a/lib/Congruence/residues.gd +++ b/lib/Congruence/residues.gd @@ -198,7 +198,7 @@ InstallMethod( InverseSameMutability, "for an ordinary matrix over a ring Z/nZ", [ IsMatrix and IsOrdinaryMatrix and CategoryCollections( CategoryCollections( IsHAPRingModIdealObj ) ) ], - function( mat ); + function( mat ) return InverseOp(mat); end ); diff --git a/lib/Congruence/sl2conjugates.gi b/lib/Congruence/sl2conjugates.gi index b00e4280..cfe11304 100644 --- a/lib/Congruence/sl2conjugates.gi +++ b/lib/Congruence/sl2conjugates.gi @@ -77,7 +77,7 @@ gg:=g^-1; H:=HAP_CongruenceSubgroupGamma0(n); ################################################### -membership:=function(x); +membership:=function(x) return x^gg in H; end; ################################################### @@ -105,7 +105,7 @@ gg:=g^-1; #H:=HAP_CongruenceSubgroupGamma0(n); ################################################### -membership:=function(x); +membership:=function(x) return x^gg in H; end; ################################################### @@ -134,7 +134,7 @@ gg:=g^-1; #H:=HAP_CongruenceSubgroupGamma0(n); ################################################### -membership:=function(x); +membership:=function(x) if not x in H then return false; fi; return x^gg in H; end; @@ -180,7 +180,7 @@ end; ############################## ############################## -posfun:=function(x); +posfun:=function(x) return elts!.posfun( x^gg); end; ############################## @@ -210,7 +210,7 @@ R:=RightTransversal(H,GG^gg); R2:=List(R,x->x^g); ########################################## -poscan:=function(x); +poscan:=function(x) return PositionCanonical(R,x^gg); end; ########################################## diff --git a/lib/Congruence/sl2o.gi b/lib/Congruence/sl2o.gi index 969c820e..65ae3948 100644 --- a/lib/Congruence/sl2o.gi +++ b/lib/Congruence/sl2o.gi @@ -45,7 +45,7 @@ one:=One(I!.GeneratorsOfTwoSidedIdeal[1]); zero:=Zero(one); ################################################### -membership:=function(g); +membership:=function(g) #if not Determinant(g)=1 then return false; fi; if not g[2][1] in I then return false; fi; return true; @@ -64,14 +64,14 @@ G!.ugrp:=Group(IdentityMat(2)); if IsPrime(I) then #I need to extend this to no primes R:=RightTransversal(I); ########################################### -CosetPos:=function(g); +CosetPos:=function(g) if g[1][1] mod I =zero then return 1+Norm(I); fi; return Position(R, ((g[2][1]*InverseOp(I,g[1][1])) mod I)); end; ########################################### ########################################### -CosetRep:=function(g); +CosetRep:=function(g) if g[1][1] mod I=zero then return one*[[0,-1],[1,0]]; fi; return [one*[1,0],[(g[2][1]*InverseOp(g[1][1])) mod I,one]]; end; @@ -100,7 +100,7 @@ G:=HAP_GenericSL2OSubgroup(); one:=One(I!.AssociatedRing); ################################################### -membership:=function(g); +membership:=function(g) #if not Determinant(g)=1 then return false; fi; if not g[2][1] in I then return false; fi; if not g[1][2] in I then return false; fi; @@ -200,7 +200,7 @@ return fail; end; ########################################### else - Perturb:=function(g); return g; end; + Perturb:=function(g) return g; end; fi; nodes:=[one]; @@ -467,7 +467,7 @@ R2:=List(R,x->PreImagesRepresentative(epi,x)); L:=Length(R2); ########################################## -poscan:=function(x); +poscan:=function(x) return PositionCanonical(R,ImagesRepresentative(epi2,x)); end; ########################################## diff --git a/lib/Congruence/sl2subgroups.gi b/lib/Congruence/sl2subgroups.gi index 4b98bb7e..31131095 100644 --- a/lib/Congruence/sl2subgroups.gi +++ b/lib/Congruence/sl2subgroups.gi @@ -62,7 +62,7 @@ end); ################################################################### ################################################################### InstallGlobalFunction(HAP_SL2SubgroupTree, -function(G); +function(G) if G!.tree=fail then if IsRing(G!.level) then @@ -302,7 +302,7 @@ sl:=SL(2,Integers); G:=HAP_GenericSL2ZSubgroup(); ################################################### -membership:=function(g); +membership:=function(g) if not g in sl then return false; fi; if not g[1][1] mod n = 1 then return false; fi; if not g[2][2] mod n = 1 then return false; fi; @@ -405,7 +405,7 @@ sl:=SL(2,Integers); G:=HAP_GenericSL2ZSubgroup(); ################################################### -membership:=function(g); +membership:=function(g) if not g in sl then return false; fi; if not g[2][1] mod n = 0 then return false; else return true; fi; @@ -428,14 +428,14 @@ fi; if IsPrimeInt(n) then #I need to extend this to no primes ########################################### -CosetPos:=function(g); +CosetPos:=function(g) if g[1][1] mod n =0 then return n+1; fi; return 1 +((g[2][1]*g[1][1]^-1) mod n); end; ########################################### ########################################### -CosetRep:=function(g); +CosetRep:=function(g) if g[1][1] mod n=0 then return [[0,-1],[1,0]]; fi; return [[1,0],[(g[2][1]*g[1][1]^-1) mod n,1]]; end; @@ -480,7 +480,7 @@ R:=RightTransversal(Image(iso),HN); R2:=List(R,x->PreImagesRepresentative(epi,x)); ########################################## -poscan:=function(x); +poscan:=function(x) return PositionCanonical(R,ImagesRepresentative(epi2,x)); end; ########################################## diff --git a/lib/Congruence/volume.gi b/lib/Congruence/volume.gi index ce6b2378..be730650 100644 --- a/lib/Congruence/volume.gi +++ b/lib/Congruence/volume.gi @@ -1,6 +1,6 @@ ################################## InstallGlobalFunction(QuadraticCharacter, -function(Q,m); +function(Q,m) return Jacobi(Discriminant(Q),m); end); ################################## @@ -43,7 +43,7 @@ InstallOtherMethod(AbelianInvariants, "for HAP SL2Z subgroups", [IsHapSL2ZSubgroup], 1000000,#Again, there must be a better way -function(H); +function(H) return AbelianInvariants(HAP_RightTransversalSL2ZSubgroups(H,false)); end); ################################## diff --git a/lib/FpGmodules/fpgbasics.gi b/lib/FpGmodules/fpgbasics.gi index a2367e8c..0eb52f94 100644 --- a/lib/FpGmodules/fpgbasics.gi +++ b/lib/FpGmodules/fpgbasics.gi @@ -69,7 +69,7 @@ end; ##################################################################### ##################################################################### -action:=function(g,B); +action:=function(g,B) return TransposedMat(GactMat( Position(R!.elts,g), TransposedMat(B))); @@ -347,7 +347,7 @@ end; ##################################################################### ##################################################################### -action:=function(g,B); +action:=function(g,B) return TransposedMat(GactMat( Position(Elts,g), TransposedMat(B))); @@ -382,7 +382,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(FpGModuleHomomorphismNC, -function(M,N,A); +function(M,N,A) return Objectify(HapFPGModuleHomomorphism, @@ -399,7 +399,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(FpGModuleHomomorphism, -function(M,N,A); +function(M,N,A) if not IsFpGModuleHomomorphismData(M,N,A) then return fail; diff --git a/lib/FpGmodules/meataxe.gi b/lib/FpGmodules/meataxe.gi index cb1e11e5..42028128 100644 --- a/lib/FpGmodules/meataxe.gi +++ b/lib/FpGmodules/meataxe.gi @@ -151,7 +151,7 @@ end; ##################################################################### ##################################################################### -action:=function(g,B); +action:=function(g,B) return TransposedMat(GactMat( Position(elts1,g), TransposedMat(B))); diff --git a/lib/FpGmodules/resfpgmod.gi b/lib/FpGmodules/resfpgmod.gi index db88f935..de436788 100644 --- a/lib/FpGmodules/resfpgmod.gi +++ b/lib/FpGmodules/resfpgmod.gi @@ -71,7 +71,7 @@ PseudoBoundaryAsVec[i]:=[]; od; ##################################################################### -Dimension:=function(i); +Dimension:=function(i) if i<0 then return 0; fi; return Length(PseudoBoundaryAsVec[i]); end; @@ -370,7 +370,7 @@ end; Toggle:=true; ##################################################################### -SMBM:=function(m,w); +SMBM:=function(m,w) if Toggle then Echelonize(); Toggle:=false; fi; diff --git a/lib/FreeGmodules/wordOperations.gi b/lib/FreeGmodules/wordOperations.gi index c7be24d3..540c9145 100644 --- a/lib/FreeGmodules/wordOperations.gi +++ b/lib/FreeGmodules/wordOperations.gi @@ -2,14 +2,14 @@ ##################################################################### InstallGlobalFunction(Negate, -function(p); +function(p) return [-p[1],p[2]]; end); ##################################################################### ##################################################################### InstallGlobalFunction(NegateWord, -function(b); +function(b) return List(b, x->[-x[1],x[2]]); end); ##################################################################### @@ -229,7 +229,7 @@ Append(coeffs[AbsoluteValue(x[1])],[SignInt(x[1])*x[2]]); od; ############################################################# - PrintGroupElt:=function(i); + PrintGroupElt:=function(i) if i>0 then Print("+ ", Elts[i], " "); else Print("- ", Elts[-i], " "); @@ -455,7 +455,7 @@ InstallOtherMethod( \=, "equality in opposite group", [ IsHapOppositeElement, IsHapOppositeElement], -function(x,y) ; +function(x,y) return x!.element = y!.element; end); ##################################################################### @@ -465,7 +465,7 @@ InstallOtherMethod( \=, "equality in quotient group", [ IsHapQuotientElement, IsHapQuotientElement], -function(x,y) ; +function(x,y) return SSortedList(x!.element) = SSortedList(y!.element); end); ##################################################################### @@ -476,7 +476,7 @@ InstallOtherMethod( \<, "equality in opposite group", [ IsHapOppositeElement, IsHapOppositeElement], -function(x,y) ; +function(x,y) return x!.element < y!.element; end); ##################################################################### @@ -486,7 +486,7 @@ InstallOtherMethod( \<, "equality in opposite group", [ IsHapQuotientElement, IsHapQuotientElement], -function(x,y) ; +function(x,y) return SSortedList(x!.element) < SSortedList(y!.element); end); ##################################################################### diff --git a/lib/Functors/alexander.gi b/lib/Functors/alexander.gi index bfdb2fc0..22543aa3 100644 --- a/lib/Functors/alexander.gi +++ b/lib/Functors/alexander.gi @@ -194,7 +194,7 @@ Bases:=List([1..Length(R)],i->[]); for b in B{[2..Length(B)]} do Add(Bases[A!.degree(b)],b); od; -F:=function(R); return TensorWithIntegersModP(R,p); end; +F:=function(R) return TensorWithIntegersModP(R,p); end; f:=GroupHomomorphismByFunction(P,G,x->x); ef:=EquivariantChainMap(R,R,f); cf:=F(ef); diff --git a/lib/Functors/equiChainMap.gi b/lib/Functors/equiChainMap.gi index f4c78af4..bd6db35d 100644 --- a/lib/Functors/equiChainMap.gi +++ b/lib/Functors/equiChainMap.gi @@ -37,7 +37,7 @@ od; #if false then if QisFinite then ##################################################################### -GhomQ:=function(i); +GhomQ:=function(i) #return Position(EltsQ,Image(f,EltsG[i])); return Position(EltsQ,ImageElm(f,EltsG[i])); #Added Jan 2012 end; @@ -45,7 +45,7 @@ end; if IsFinite(R!.group) then GhomQlst:=List([1..Order(R!.group)],GhomQ); ##################################################################### -GhomQ:=function(i); +GhomQ:=function(i) return GhomQlst[i]; end; ##################################################################### @@ -66,7 +66,7 @@ fi; if QisFinite then ##################################################################### -Mult:=function(i,j); +Mult:=function(i,j) return Position(EltsQ,EltsQ[i]*EltsQ[j]); end; ##################################################################### @@ -79,7 +79,7 @@ Multmat[i][j]:=Mult(i,j); od; od; ##################################################################### -Mult:=function(i,j); +Mult:=function(i,j) return Multmat[i][j]; end; ##################################################################### @@ -104,7 +104,7 @@ Charact:=Maximum(EvaluateProperty(R,"characteristic"), if not IsPrime(Charact) then AlgRed:=AlgebraicReduction; else -AlgRed:=function(v); return AlgebraicReduction(v,Charact); end; +AlgRed:=function(v) return AlgebraicReduction(v,Charact); end; fi; diff --git a/lib/Functors/homToModpModule.gi b/lib/Functors/homToModpModule.gi index abd8ab5b..b62cf3d1 100644 --- a/lib/Functors/homToModpModule.gi +++ b/lib/Functors/homToModpModule.gi @@ -17,7 +17,7 @@ return fail; fi; if IsBound(f!.fun) then #################################### -Image:=function(f,x); +Image:=function(f,x) return f!.fun(x); end; #################################### @@ -42,7 +42,7 @@ LengthC:=EvaluateProperty(R,"length"); M:=[1..LengthC]; M0:=0; ##################################################################### -DimensionC:=function(n); +DimensionC:=function(n) return LA*R!.dimension(n); end; ##################################################################### diff --git a/lib/Functors/homToZmodule.gi b/lib/Functors/homToZmodule.gi index 3999a238..893eae49 100644 --- a/lib/Functors/homToZmodule.gi +++ b/lib/Functors/homToZmodule.gi @@ -12,7 +12,7 @@ if Length(arg)=3 then ag:=arg[3]; else ag:=fail; fi; if IsBound(f!.fun) then #################################### -Image:=function(f,x); +Image:=function(f,x) return f!.fun(x); end; #################################### @@ -37,7 +37,7 @@ LengthC:=EvaluateProperty(R,"length"); M:=[1..LengthC]; M0:=0; ##################################################################### -DimensionC:=function(n); +DimensionC:=function(n) return LA*R!.dimension(n); end; ##################################################################### diff --git a/lib/Functors/homtint.gi b/lib/Functors/homtint.gi index 25c6b5f1..9051d788 100644 --- a/lib/Functors/homtint.gi +++ b/lib/Functors/homtint.gi @@ -24,7 +24,7 @@ BoundaryDrec:=[]; ################################ ################################ -DimensionD:=function(n); +DimensionD:=function(n) if n<0 or n>len then return 0; fi; return C!.dimension(n); @@ -39,7 +39,7 @@ end; #od; ####################### -BoundaryD:=function(n,k); +BoundaryD:=function(n,k) if n<0 or n>=len then return [0]; fi; if not IsBound(BoundaryDrec[n+1]) then @@ -92,7 +92,7 @@ BoundaryDrec:=[]; ################################ ################################ -DimensionD:=function(n); +DimensionD:=function(n) if n<0 or n>len then return 0; fi; return C!.dimension(n); @@ -107,7 +107,7 @@ end; #od; ####################### -BoundaryD:=function(n,k); +BoundaryD:=function(n,k) if n<0 or n>len then return [0]; fi; if not IsBound(BoundaryDrec[n]) then @@ -154,7 +154,7 @@ zero[n]:=0*[1..S!.dimension(n-1)]; od; A:=[]; -InitA:=function(n); +InitA:=function(n) A[n+1]:=IdentityMat(S!.dimension(n)); B:=List(A[n+1], r->F!.mapping(r,n)); A[n+1]:=TransposedMat(B); diff --git a/lib/Functors/homtintmodp.gi b/lib/Functors/homtintmodp.gi index 788f0537..87d0f887 100644 --- a/lib/Functors/homtintmodp.gi +++ b/lib/Functors/homtintmodp.gi @@ -29,7 +29,7 @@ BoundaryDrec:=[]; ################################ ################################ -DimensionD:=function(n); +DimensionD:=function(n) if n<0 or n>len then return 0; fi; return C!.dimension(n); @@ -44,7 +44,7 @@ end; #od; ####################### -BoundaryD:=function(n,k); +BoundaryD:=function(n,k) if n<0 or n>=len then return [0]; fi; if not IsBound(BoundaryDrec[n+1]) then @@ -102,7 +102,7 @@ BoundaryDrec:=[]; ################################ ################################ -DimensionD:=function(n); +DimensionD:=function(n) if n<0 or n>len then return 0; fi; return C!.dimension(n); @@ -117,7 +117,7 @@ end; #od; ####################### -BoundaryD:=function(n,k); +BoundaryD:=function(n,k) if n<0 or n>len then return [0]; fi; if not IsBound(BoundaryDrec[n]) then @@ -169,7 +169,7 @@ od; #A:=List([0..Length(S)],i->IdentityMat(S!.dimension(i))); A:=[]; #for n in [0..Length(A)-1] do -InitA:=function(n); +InitA:=function(n) A[n+1]:=IdentityMat(S!.dimension(n)); B:=List(A[n+1], r->F!.mapping(r,n)); A[n+1]:=TransposedMat(B); @@ -257,7 +257,7 @@ end; #################### #od; ################# -HThomHS:=function(v,n); +HThomHS:=function(v,n) if not IsBound(A[n+1]) then InitA(n); fi; return v*A[n+1]; end; diff --git a/lib/Functors/modularEquiChainMap.gi b/lib/Functors/modularEquiChainMap.gi index 583ebe2e..df3a6e6a 100644 --- a/lib/Functors/modularEquiChainMap.gi +++ b/lib/Functors/modularEquiChainMap.gi @@ -48,19 +48,19 @@ od; od; ##################################################################### -GhomQ:=function(i); +GhomQ:=function(i) return Position(EltsQ,Image(f,EltsG[i])); end; ##################################################################### GhomQlst:=List([1..Order(R!.group)],GhomQ); ##################################################################### -GhomQ:=function(i); +GhomQ:=function(i) return GhomQlst[i]; end; ##################################################################### ##################################################################### -Mult:=function(i,j); +Mult:=function(i,j) return Position(EltsQ,EltsQ[i]*EltsQ[j]); end; ##################################################################### @@ -73,7 +73,7 @@ Multmat[i][j]:=Mult(i,j); od; od; ##################################################################### -Mult:=function(i,j); +Mult:=function(i,j) return Multmat[i][j]; end; ##################################################################### diff --git a/lib/Functors/primePartDerivedvsgc.gi b/lib/Functors/primePartDerivedvsgc.gi index 139f54ad..798a90fd 100644 --- a/lib/Functors/primePartDerivedvsgc.gi +++ b/lib/Functors/primePartDerivedvsgc.gi @@ -180,7 +180,7 @@ end; #################################### #################################### -ord:=function(x,y); return Order(x)Order(P) then DCRS:=SmallGeneratingSet(P1); for L in DCRS do diff --git a/lib/Functors/simplify.gi b/lib/Functors/simplify.gi index a148db6a..d3cfa398 100644 --- a/lib/Functors/simplify.gi +++ b/lib/Functors/simplify.gi @@ -164,14 +164,14 @@ od; ################################### -Dimension:=function(n); +Dimension:=function(n) if n<0 or n>=Length(NewGens) then return 0; fi; return Length(NewGens[n+1]); end; ################################### ################################### -Boundary:=function(n,k); +Boundary:=function(n,k) if n>Length(bounds) then return []; fi; return List(bounds[n][k], x->[Position(NewGens[n],x[1]),x[2]]); diff --git a/lib/Functors/tensorWithModPModule.gi b/lib/Functors/tensorWithModPModule.gi index 557c7acf..2f9a3d28 100644 --- a/lib/Functors/tensorWithModPModule.gi +++ b/lib/Functors/tensorWithModPModule.gi @@ -30,7 +30,7 @@ LA:=Length(Identity(Image(f))); LengthC:=EvaluateProperty(R,"length"); ##################################################################### -DimensionC:=function(n); +DimensionC:=function(n) return LA*R!.dimension(n); end; ##################################################################### diff --git a/lib/Functors/tensorWithTwistedZ.gi b/lib/Functors/tensorWithTwistedZ.gi index 067220f7..b8d65e24 100644 --- a/lib/Functors/tensorWithTwistedZ.gi +++ b/lib/Functors/tensorWithTwistedZ.gi @@ -145,7 +145,7 @@ end; ##################################################################### ##################################################################### -ChomD:=function(v,n); +ChomD:=function(v,n) return SmapD(RhomS(CmapR(v,n),n),n); end; diff --git a/lib/Functors/tensorWithTwistedZmodP.gi b/lib/Functors/tensorWithTwistedZmodP.gi index 40704ca3..5eca869f 100644 --- a/lib/Functors/tensorWithTwistedZmodP.gi +++ b/lib/Functors/tensorWithTwistedZmodP.gi @@ -163,7 +163,7 @@ end; ##################################################################### -ChomD:=function(v,n); +ChomD:=function(v,n) return SmapD(RhomS(CmapR(v,n),n),n); end; diff --git a/lib/Functors/tensorWithZmodP.gi b/lib/Functors/tensorWithZmodP.gi index e5fe7b54..9a6653fd 100644 --- a/lib/Functors/tensorWithZmodP.gi +++ b/lib/Functors/tensorWithZmodP.gi @@ -182,7 +182,7 @@ end; ##################################################################### -ChomD:=function(v,n); +ChomD:=function(v,n) return SmapD(RhomS(CmapR(v,n),n),n); end; @@ -227,7 +227,7 @@ fi; one:=One(GF(prime)); oldboundary:=StructuralCopy(C!.boundary); ############################# -newboundary:=function(n,i); +newboundary:=function(n,i) return oldboundary(n,i)*one; end; ############################# @@ -261,7 +261,7 @@ N!.properties[pos][2]:=prime; one:=One(GF(prime)); oldmapping:=StructuralCopy(M!.mapping); #################################### -Mapping:=function(v,n); +Mapping:=function(v,n) return oldmapping(v,n)*one; end; #################################### @@ -300,7 +300,7 @@ fi; one:=One(GF(prime)); oldboundary:=StructuralCopy(C!.boundary); ############################# -newboundary:=function(n,i); +newboundary:=function(n,i) return oldboundary(n,i)*one; end; ############################# diff --git a/lib/Functors/tensorWithZmodule.gi b/lib/Functors/tensorWithZmodule.gi index 084907c5..93387ae6 100644 --- a/lib/Functors/tensorWithZmodule.gi +++ b/lib/Functors/tensorWithZmodule.gi @@ -23,7 +23,7 @@ LA:=Length(Identity(Image(f))); LengthC:=EvaluateProperty(R,"length"); ##################################################################### -DimensionC:=function(n); +DimensionC:=function(n) return LA*R!.dimension(n); end; ##################################################################### diff --git a/lib/Functors/transfer.gi b/lib/Functors/transfer.gi index 9109f09c..f7d668b2 100644 --- a/lib/Functors/transfer.gi +++ b/lib/Functors/transfer.gi @@ -5,7 +5,7 @@ function(arg) local R,H,A,B,rnk,S,CR,CS, T, TT, fn, SS,map, HhomH, trans, transTr, LT, TietzeReduced, hom, elts, mult; -TietzeReduced:=function(R); return R; end; +TietzeReduced:=function(R) return R; end; #TietzeReduced:=TietzeReducedResolution; R:=arg[1]; @@ -116,7 +116,7 @@ InstallGlobalFunction(TransferChainMap, function(R,H) local S,CR,CS, T, TT, fn, SS,map, HhomH, TietzeReduced; -TietzeReduced:=function(R); return R; end; +TietzeReduced:=function(R) return R; end; TietzeReduced:=TietzeReducedResolution; S:=ResolutionFiniteSubgroup(R,H);; CR:=TensorWithIntegers(R);; @@ -167,7 +167,7 @@ C:=Source(G); D:=Target(F); ################################## -FG:=function(v,n); +FG:=function(v,n) return F!.mapping(G!.mapping(v,n),n); end; ################################## @@ -196,7 +196,7 @@ local FG,C, D ; C:=Source(G); D:=Target(F); ################################## -FG:=function(v,n); +FG:=function(v,n) return F!.mapping(G!.mapping(v,n),n); #a:=G!.mapping(v,n); This takes time end; diff --git a/lib/Functors/various.gi b/lib/Functors/various.gi index 2e18aa56..bc282b59 100644 --- a/lib/Functors/various.gi +++ b/lib/Functors/various.gi @@ -356,7 +356,7 @@ T:=Target(G); if not S=T then return fail; fi; char:=EvaluateProperty(F,"characteristic"); -map:=function(n,k); +map:=function(n,k) return F!.mapping(n,G!.mapping(n,k)); end; diff --git a/lib/GOuterGroups/functorialGouter.gi b/lib/GOuterGroups/functorialGouter.gi index 869323a5..041aad6a 100644 --- a/lib/GOuterGroups/functorialGouter.gi +++ b/lib/GOuterGroups/functorialGouter.gi @@ -194,7 +194,7 @@ hom:=GroupHomomorphismByImages(aut,AUT,gens1, List(gens,x->x^-1)); CH!.ActingGroup:=aut; ############################# -CH!.OuterAction:=function(g,a); +CH!.OuterAction:=function(g,a) return Image(Image(hom,g),a); end; ############################# diff --git a/lib/GOuterGroups/functorialGouter.trial b/lib/GOuterGroups/functorialGouter.trial index 7b2a41b3..0cc61e9f 100644 --- a/lib/GOuterGroups/functorialGouter.trial +++ b/lib/GOuterGroups/functorialGouter.trial @@ -212,7 +212,7 @@ hom:=GroupHomomorphismByImages(aut,AUT,gens1, List(gens,x->x^-1)); CH!.ActingGroup:=aut; ############################# -CH!.OuterAction:=function(g,a); +CH!.OuterAction:=function(g,a) return Image(Image(hom,g),a); end; ############################# diff --git a/lib/GOuterGroups/goutergroup.gi b/lib/GOuterGroups/goutergroup.gi index d39cb521..48d01273 100644 --- a/lib/GOuterGroups/goutergroup.gi +++ b/lib/GOuterGroups/goutergroup.gi @@ -86,7 +86,7 @@ InstallMethod( TrivialGModuleAsGOuterGroup, fi; ###################################################### - alpha := function(g,a); + alpha := function(g,a) return a; end; ###################################################### @@ -163,7 +163,7 @@ InstallMethod( GOuterGroup, fi; if bool then ###################################################### - alpha := function(g,a); + alpha := function(g,a) return Representative(PreImages(nat,g)) *a* @@ -173,7 +173,7 @@ InstallMethod( GOuterGroup, else alphaRec:=List([1..Order(G)],i->List([1..Size(A)],j->0)); ###################################################### - alpha := function(g,a); + alpha := function(g,a) p:=Position(Elements(G),g); q:=Position(Elements(A),a); if alphaRec[p][q]=0 then @@ -194,7 +194,7 @@ InstallMethod( GOuterGroup, ################### if not IsAbelian(A) then -coc:=function(x,y); +coc:=function(x,y) return Representative(PreImages(nat,x))* Representative(PreImages(nat,y))* @@ -225,7 +225,7 @@ InstallMethod( GOuterGroup, G:=Group(Identity(E)); ###################################################### - alpha := function(g,a); + alpha := function(g,a) return g*a*g^-1; end; ###################################################### @@ -509,7 +509,7 @@ InstallOtherMethod( Embedding, A:=GOuterGroup(); SetActedGroup(A,Source(e)); SetActingGroup(A,ActingGroup(D)); - beta:=function(g,a); + beta:=function(g,a) return Image(p,OuterAction(g,Image(e,a))); end; SetOuterAction(A,beta); @@ -532,7 +532,7 @@ InstallOtherMethod( Projection, A:=GOuterGroup(); SetActedGroup(A,Source(e)); SetActingGroup(A,ActingGroup(D)); - beta:=function(g,a); + beta:=function(g,a) return Image(p,OuterAction(g,Image(e,a))); end; SetOuterAction(A,beta); diff --git a/lib/GOuterGroups/homtogouter.gi b/lib/GOuterGroups/homtogouter.gi index c080fcf8..cf8fa45f 100644 --- a/lib/GOuterGroups/homtogouter.gi +++ b/lib/GOuterGroups/homtogouter.gi @@ -144,7 +144,7 @@ end); InstallMethod(Cohomology, "Cohomology of a G-cocomplex returned as abelian invariants", [IsHapGCocomplex,IsInt], -function(C,n); +function(C,n) if n=0 then return @@ -238,7 +238,7 @@ R:=C!.resolution; ############################################# ############################################# - stancocycle:=function(arg); + stancocycle:=function(arg) return cocycle(Syzygy(R,List([1..Length(arg)],i->arg[i]))); end; ############################################# @@ -338,7 +338,7 @@ Q:=GOuterGroup(); alpha:=OuterAction(H); ############################################# - beta:=function(g,a); + beta:=function(g,a) return Image(nat,alpha(g,PreImagesRepresentative(nat,a))); end; @@ -358,7 +358,7 @@ end); InstallOtherMethod(\/, "Quotient of G-outer groups", [IsGOuterGroup,IsGOuterGroup], -function(H,M); +function(H,M) return Target(NaturalHomomorphism(H,M)); diff --git a/lib/GraphsOfGroups/graphOfResolutions.gi b/lib/GraphsOfGroups/graphOfResolutions.gi index 97c4902e..ede479f8 100644 --- a/lib/GraphsOfGroups/graphOfResolutions.gi +++ b/lib/GraphsOfGroups/graphOfResolutions.gi @@ -79,7 +79,7 @@ end); ############################################## InstallGlobalFunction(GraphOfResolutionsDisplay, -function(D); +function(D) if not GraphOfResolutionsTest(D) then Print("Input is not a graph of resolutions.\n"); @@ -104,7 +104,7 @@ ID:=Group(One(G)); Elts:=[One(G)]; ####################### -Dimension:=function(n); +Dimension:=function(n) if not n in [0,1] then return 0; fi; if n=0 then return Length(Vertices); fi; if n=1 then return Length(Edges); fi; @@ -113,7 +113,7 @@ end; PseudoBoundary:=[]; ####################### -Boundary:=function(n,k); +Boundary:=function(n,k) if not n=1 then return []; fi; if not IsBound(PseudoBoundary[k]) then PseudoBoundary[k]:= @@ -129,13 +129,13 @@ end; ####################### ####################### -action:=function(n,k,l); +action:=function(n,k,l) return 1; end; ####################### ####################### -Stabilizer:=function(n,k); +Stabilizer:=function(n,k) if n=0 then return Vertices[k]; fi; if n=1 then return @@ -205,7 +205,7 @@ newelts!.eltfun:= function(i) local g, el; fi; return eltlst[i]; end; -newelts!.addfun:=function(g); +newelts!.addfun:=function(g) Add(R!.elts,pinv*g*p); end; newelts!.lnthfun:=function(); return Length(R!.elts); end; diff --git a/lib/GraphsOfGroups/graphs.gi b/lib/GraphsOfGroups/graphs.gi index eca6591e..a7844308 100644 --- a/lib/GraphsOfGroups/graphs.gi +++ b/lib/GraphsOfGroups/graphs.gi @@ -79,7 +79,7 @@ tmpIn2log:=Filename(tmpDir,"tmpIn2.log"); basicgif:=Filename(tmpDir,"basic.gif"); ##################################################################### -PositionName:=function(L,x); +PositionName:=function(L,x) return PositionProperty(L,n->Name(n)=Name(x)); end; ##################################################################### diff --git a/lib/GraphsOfGroups/resGraph.gi b/lib/GraphsOfGroups/resGraph.gi index 4a6160d2..e06cd1f3 100644 --- a/lib/GraphsOfGroups/resGraph.gi +++ b/lib/GraphsOfGroups/resGraph.gi @@ -35,7 +35,7 @@ return fail; fi; ##################################################################### -PositionName:=function(L,x); +PositionName:=function(L,x) return PositionProperty(L,n->Name(n)=Name(x)); end; ##################################################################### @@ -335,7 +335,7 @@ end; FillPseudoBoundary(); ##################################################################### -Boundary:=function(k,i); +Boundary:=function(k,i) if k<1 then return 0; fi; if i>0 then return PseudoBoundary[k][i];fi; return NegateWord(PseudoBoundary[k][-i]); diff --git a/lib/HapCocyclic/gap/ccgroup.gi b/lib/HapCocyclic/gap/ccgroup.gi index 94da0e7e..5a0306ec 100644 --- a/lib/HapCocyclic/gap/ccgroup.gi +++ b/lib/HapCocyclic/gap/ccgroup.gi @@ -32,7 +32,7 @@ modSCo:=SCo; else fn:=SCo!.Mapping; nafn:=OA!.nonabeliancocycle; -newfn:=function(x,y); return nafn(x,y)*fn(x,y);end; +newfn:=function(x,y) return nafn(x,y)*fn(x,y);end; modSCo:=SCo; modSCo!.Mapping:=newfn; fi; diff --git a/lib/HapCocyclic/gap/ccsubgroups.gi b/lib/HapCocyclic/gap/ccsubgroups.gi index 8169a46c..12abac33 100644 --- a/lib/HapCocyclic/gap/ccsubgroups.gi +++ b/lib/HapCocyclic/gap/ccsubgroups.gi @@ -119,7 +119,7 @@ Apply(S!.elts,x->CcElement( ElementsFamily(G), x, One(Base(G)),G )); hom:=NaturalHomomorphismOntoBase(G); ############## -preimage:=function(x); +preimage:=function(x) return CcElement(ElementsFamily(G), One(HapFibre(G)), x, G ); end; diff --git a/lib/Homology/groupCohomology.gi b/lib/Homology/groupCohomology.gi index 4f79b428..a6da6b46 100644 --- a/lib/Homology/groupCohomology.gi +++ b/lib/Homology/groupCohomology.gi @@ -48,7 +48,7 @@ fi; ############################## DATA INPUT ########################### if IsPrime(p) then -Functor:=function(R); return HomToIntegersModP(R,p); end; +Functor:=function(R) return HomToIntegersModP(R,p); end; else Functor:=HomToIntegers; fi; diff --git a/lib/Homology/groupHomology.gi b/lib/Homology/groupHomology.gi index 0418d8e2..ecbe8d1f 100644 --- a/lib/Homology/groupHomology.gi +++ b/lib/Homology/groupHomology.gi @@ -83,13 +83,13 @@ if N=0 and p>0 and not IsGroupHomomorphism(arg[1]) then return [p]; fi; ############################## DATA INPUT ########################### if IsPrime(p) then -Functor:=function(R); return TensorWithIntegersModP(R,p); end; +Functor:=function(R) return TensorWithIntegersModP(R,p); end; else -Functor:=function(R); return ContractedComplex(TensorWithIntegers(R)); end; +Functor:=function(R) return ContractedComplex(TensorWithIntegers(R)); end; fi; if IsPrime(p) then -Functor2:=function(R); return TensorWithIntegersModP(R,p); end; +Functor2:=function(R) return TensorWithIntegersModP(R,p); end; else Functor2:=TensorWithIntegers; fi; @@ -431,13 +431,13 @@ C:=TensorWithIntegers(T); D:=TensorWithIntegers(RQ); ###### -newdimension:=function(n); +newdimension:=function(n) return C!.dimension(n)-D!.dimension(n); end; ###### ###### -newboundary:=function(n,k); +newboundary:=function(n,k) return C!.boundary(n,k+D!.dimension(n)); end; ###### diff --git a/lib/Homology/integralCohomology.gi b/lib/Homology/integralCohomology.gi index e746b4bc..4f694b8e 100644 --- a/lib/Homology/integralCohomology.gi +++ b/lib/Homology/integralCohomology.gi @@ -148,7 +148,7 @@ end; ##################################################################### -#HhomC:=function(w); +#HhomC:=function(w) #return BasisKerd1[w]; #end; ##################################################################### diff --git a/lib/Homology/isSuperperfect.gi b/lib/Homology/isSuperperfect.gi index 8505b660..edad2346 100644 --- a/lib/Homology/isSuperperfect.gi +++ b/lib/Homology/isSuperperfect.gi @@ -6,7 +6,7 @@ function(G) local C,P,primes,R,prm,F; -F:= function(X); +F:= function(X) return TensorWithIntegersModP(X,prm); end; diff --git a/lib/Homology/modularCohomology.gi b/lib/Homology/modularCohomology.gi index 8b07e653..b1335452 100644 --- a/lib/Homology/modularCohomology.gi +++ b/lib/Homology/modularCohomology.gi @@ -160,7 +160,7 @@ Qiso:=Image(iso); ##################################################################### -#HhomC:=function(w); +#HhomC:=function(w) #return BasisKerd2[w]; #end; ##################################################################### diff --git a/lib/Homology/modularHomology.gi b/lib/Homology/modularHomology.gi index 8c7133da..739ff098 100644 --- a/lib/Homology/modularHomology.gi +++ b/lib/Homology/modularHomology.gi @@ -232,7 +232,7 @@ epim:=EpimorphismFromFreeGroup(FH); ##################################################################### -#HhomC:=function(w); +#HhomC:=function(w) #return BasisKerd1[w]; #end; ##################################################################### diff --git a/lib/Homology/new_persistent.gi b/lib/Homology/new_persistent.gi index e8407cea..3f3c25df 100644 --- a/lib/Homology/new_persistent.gi +++ b/lib/Homology/new_persistent.gi @@ -21,7 +21,7 @@ od; L:=[]; for k in [1..ln-1] do -map:=function(n,i); return i; end; +map:=function(n,i) return i; end; cwmap:=Objectify( HapRegularCWMap, rec( source:=W[k], diff --git a/lib/Homology/persistent.gi b/lib/Homology/persistent.gi index cb7120d4..28ae2c48 100644 --- a/lib/Homology/persistent.gi +++ b/lib/Homology/persistent.gi @@ -588,7 +588,7 @@ end; if deg=Dimension(M)-1 then ############### -Fun:=function(x,y); +Fun:=function(x,y) #Ths function implements some partial recurrence in CollapseMat. if CollapseMat[x+1][y]=0 then return CollapseMat[x][y-1]; fi; if CollapseMat[x]=Bettis[x][2] then return CollapseMat[x][y-1]; fi; @@ -909,7 +909,7 @@ local SubComplex:=function(C,r) local D,DIM,BND; -DIM:=function(n); if n=0 then return C!.dimension(0); +DIM:=function(n) if n=0 then return C!.dimension(0); else return C!.filteredDimension(r,n); fi; end; ############### @@ -1042,26 +1042,26 @@ a:=arg[2]; b:=arg[3]; ################## -Dimension:=function(n); +Dimension:=function(n) if not n+a in [a..b] then return 0; fi; return R!.dimension(n+a); end; ################## ################## -Boundary:=function(n,i); +Boundary:=function(n,i) return R!.boundary(n+a,i); end; ################## ################## -Stabilizer:=function(n,i); +Stabilizer:=function(n,i) return R!.stabilizer(n+a,i); end; ################## ################## -action:=function(n,k,g); +action:=function(n,k,g) return R!.action(n+a,k,g); end; ################## diff --git a/lib/Homology/syzygy.gi b/lib/Homology/syzygy.gi index e7a0a142..39cd9938 100644 --- a/lib/Homology/syzygy.gi +++ b/lib/Homology/syzygy.gi @@ -11,13 +11,13 @@ local n:=Length(g); ##################################################################### -Elts:=function(x); +Elts:=function(x) return Position(R!.elts,x); end; ##################################################################### ##################################################################### -Mult:=function(x,w); #x is in the group G. +Mult:=function(x,w) #x is in the group G. return List(w,y->[y[1],Position(R!.elts,x*R!.elts[y[2]])]); end; ##################################################################### diff --git a/lib/Kelvin/cw-functions.gi b/lib/Kelvin/cw-functions.gi index 8b22cc31..1a644b67 100644 --- a/lib/Kelvin/cw-functions.gi +++ b/lib/Kelvin/cw-functions.gi @@ -364,7 +364,7 @@ InstallGlobalFunction( local sub, Y, closure, plus1, i, j, bnd, Last; -Last:=function(L); return L[Length(L)];end; +Last:=function(L) return L[Length(L)];end; sub:=RegularCWMapToCWSubcomplex(ShallowCopy(f)); Y:=sub[1]; # the actual CW-complex diff --git a/lib/Kelvin/knot-comp-bound.gi b/lib/Kelvin/knot-comp-bound.gi index 0488cb5e..17e3f2de 100644 --- a/lib/Kelvin/knot-comp-bound.gi +++ b/lib/Kelvin/knot-comp-bound.gi @@ -62,7 +62,7 @@ InstallGlobalFunction( return false; end; - CornerConfiguration:=function(i,j); + CornerConfiguration:=function(i,j) if grid[i][j]=1 then @@ -93,7 +93,7 @@ InstallGlobalFunction( bound:=[[],[],[],[],[]]; bigGrid:=List([1..2*len],x->List([1..2*len],y->0)); - GridFill:=function(c,i,j); + GridFill:=function(c,i,j) # places an * at each point where a 0-cell is to be added to bigGrid if c=1 or c=4 then @@ -804,7 +804,7 @@ InstallGlobalFunction( return false; end; - CornerConfiguration:=function(i,j); + CornerConfiguration:=function(i,j) if grid[i][j]=1 then @@ -835,7 +835,7 @@ InstallGlobalFunction( bound:=[[],[],[],[],[]]; bigGrid:=List([1..2*len],x->List([1..2*len],y->0)); - GridFill:=function(c,i,j); + GridFill:=function(c,i,j) if c=1 or c=4 then bigGrid[(2*i)-1][(2*j)-1]:='*'; @@ -1694,7 +1694,7 @@ InstallGlobalFunction( copy1, hbars2, vbars2, copy2, 3cell, colour, lcap, reg, closure, ucap, l1__, l2__, path_comp, pipes, HorizontalOrVertical, l, AboveBelow0Cell, IntersectingCylinders, pos, colour_,Last; -Last:=function(L); return L[Length(L)]; end; +Last:=function(L) return L[Length(L)]; end; if IsList(arc[1][1]) then prs:=arc[1]*1; crs:=arc[2]*1; @@ -1727,7 +1727,7 @@ Last:=function(L); return L[Length(L)]; end; fi; return false; end; - CornerConfiguration:=function(i,j); + CornerConfiguration:=function(i,j) if grd[i][j]=1 then if Size(Positions(grd[i]{[j..Length(prs)]},1))=2 then if Size(Positions(List([i..Length(prs)],x->grd[x][j]),1))=2 then diff --git a/lib/Knots/cubicalKnot.gi b/lib/Knots/cubicalKnot.gi index 07d10b28..2df90c0c 100644 --- a/lib/Knots/cubicalKnot.gi +++ b/lib/Knots/cubicalKnot.gi @@ -357,7 +357,7 @@ end; ################# ################# -poly:=function(m); +poly:=function(m) if not IsZero(m) then return SignInt(m)*LaurentPolynomialByCoefficients(FamilyObj(1),[SignInt(m)],m); else return 1; fi; diff --git a/lib/Knots/identifyKnots.gi b/lib/Knots/identifyKnots.gi index 172db3fd..a60352d2 100644 --- a/lib/Knots/identifyKnots.gi +++ b/lib/Knots/identifyKnots.gi @@ -48,7 +48,7 @@ fi; fi; for N in [3..7] do - Inv:=function(W); + Inv:=function(W) return HAP_KnotGroupInv(W,N); end; diff --git a/lib/LieAlgebras/chev.gi b/lib/LieAlgebras/chev.gi index b268ff40..0dd86b1c 100644 --- a/lib/LieAlgebras/chev.gi +++ b/lib/LieAlgebras/chev.gi @@ -43,26 +43,26 @@ end; ############################################################### -ITT:=function(n,j); +ITT:=function(n,j) return StructuralCopy(Comb[n][j]); end; ############################################################### ############################################################### -TTI:=function(c); +TTI:=function(c) return PositionSorted(Comb[Length(c)],SSortedList(c)); end; ############################################################### ################################################################ -Dim:=function(n); +Dim:=function(n) if n>s or n<0 then return 0; else return Binomial( d, n )*dimV; fi; end; ############################################################### ####################################### -pair2int:=function(m,k); +pair2int:=function(m,k) return dimV*(m-1)+k; end; ####################################### diff --git a/lib/LieAlgebras/chevalleyEilenberg.gi b/lib/LieAlgebras/chevalleyEilenberg.gi index d5507175..ddda3343 100644 --- a/lib/LieAlgebras/chevalleyEilenberg.gi +++ b/lib/LieAlgebras/chevalleyEilenberg.gi @@ -48,26 +48,26 @@ end; ################################################################ ############################################################### -ITT:=function(j,n); +ITT:=function(j,n) return StructuralCopy(Comb[n][j]); end; ############################################################### ############################################################### -TTI:=function(n); +TTI:=function(n) return PositionSorted(Comb[Length(n)],n); end; ############################################################### ################################################################ -Dim:=function(n); +Dim:=function(n) if n>s then return fail; else return Binomial( d, n ); fi; end; ############################################################### DimRec:=List([0..s],Dim); ################################################################ -Dim:=function(n); +Dim:=function(n) if n>s then return fail; else return DimRec[n+1]; fi; end; @@ -211,13 +211,13 @@ end; ################################################################ ############################################################### -ITT:=function(j,n); +ITT:=function(j,n) return StructuralCopy(CombSour[n][j]); end; ############################################################### ############################################################### -TTI:=function(n); +TTI:=function(n) return Position(Comb[Length(n)],SSortedList(n)); end; ############################################################### diff --git a/lib/LieAlgebras/leibniz.gi b/lib/LieAlgebras/leibniz.gi index c87a0284..dc87665b 100644 --- a/lib/LieAlgebras/leibniz.gi +++ b/lib/LieAlgebras/leibniz.gi @@ -43,19 +43,19 @@ end; ################################################################ ############################################################### -ITT:=function(j,n); +ITT:=function(j,n) return StructuralCopy(Tup[n][j]); end; ############################################################### ############################################################### -TTI:=function(n); +TTI:=function(n) return Position(Tup[Length(n)],n); end; ############################################################### ################################################################ -Dim:=function(n); +Dim:=function(n) if n>s then return fail; else return d^n; fi; end; @@ -207,13 +207,13 @@ end; ################################################################ ############################################################### -ITT:=function(j,n); +ITT:=function(j,n) return StructuralCopy(TupSour[n][j]); end; ############################################################### ############################################################### -TTI:=function(n); +TTI:=function(n) return Position(Tup[Length(n)],n); end; ############################################################### @@ -282,7 +282,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(LeibnizAlgebraHomology, -function(A,n); +function(A,n) if not IsLeftModule(A)=true then if not IsLeftModuleHomomorphism(A)=true then diff --git a/lib/Manifolds/cubeCwComplex.gi b/lib/Manifolds/cubeCwComplex.gi index 5b709bef..440d8652 100644 --- a/lib/Manifolds/cubeCwComplex.gi +++ b/lib/Manifolds/cubeCwComplex.gi @@ -86,7 +86,7 @@ local A, G, L, M, N, Y, B, F, data, NF, NFF, Vertices, Edges, Faces, ####################################### #action of an element g of the dihedral group of order 8 #on a list x=[x1,x2,x3,x4] of length 4 -act:=function(g,x); +act:=function(g,x) return List([1..4],i->x[i^g]); end; ####################################### diff --git a/lib/Manifolds/dehn.gi b/lib/Manifolds/dehn.gi index 070d85df..5a37ed50 100644 --- a/lib/Manifolds/dehn.gi +++ b/lib/Manifolds/dehn.gi @@ -571,7 +571,7 @@ od; faces:=Concatenation(TL0,TL1,TR0,TR1,BL0,BL1,BR0,BR1); ########################## -mymod:=function(x,m); +mymod:=function(x,m) if x=infinity then return infinity; fi; if x=-infinity then return -infinity; fi; return x mod m; @@ -579,15 +579,15 @@ end; ########################## ########################## -fmod:=function(x); +fmod:=function(x) return [mymod( x[1] , 10*(m+p) ), mymod(x[2] , 10*(m+q) )]; end; ########################## -ffmod:=function(e); +ffmod:=function(e) return SortedList([ fmod(e[1]), fmod(e[2]) ]); end; ########################## -fffmod:=function(P); +fffmod:=function(P) return SortedList(List(P,ffmod)); end; ########################## @@ -1131,7 +1131,7 @@ Y!.nrCells(0)+Position(vertices,VC), Y!.nrCells(0)+Position(vertices,VD)]; mins:=SSortedList(mins); ############################# -fn:=function(k); +fn:=function(k) if k=Y!.nrCells(0)+Position(vertices,VA) then return Va; fi; if k=Y!.nrCells(0)+Position(vertices,VB) then return Vb; fi; if k=Y!.nrCells(0)+Position(vertices,VC) then return Vc; fi; @@ -1149,7 +1149,7 @@ MB[2]:=List(MB[2],x->Concatenation( [[x[1]],List(x{[2..x[1]+1]},k->fn(k))] )); #Reduce the number of 1-cells mins:=SSortedList([ab, ba, cd, dc, ac, ca, bd, db]); ############################ -fn:=function(k); +fn:=function(k) if k=ab then return AB; fi; if k=ba then return BA; fi; if k=cd then return CD; fi; @@ -1165,7 +1165,7 @@ MB[3]:=List(MB[3],x->Concatenation( [[x[1]],List(x{[2..x[1]+1]},k->fn(k))] )); MB[3]:=List(MB[3],x->Flat(x)); MB[3]:=List(MB[3],x->Concatenation( [[Length(x)-1],x{[2..Length(x)]}] )); ############################ -fn:=function(k); +fn:=function(k) if kFlat(x)); MB[4]:=List(MB[4],x->Concatenation([Length(x)-1],x{[2..Length(x)]})); ############################ -fn:=function(k); +fn:=function(k) if kx[i^g]); end; ####################################### diff --git a/lib/Manifolds/simplicialcup.dev b/lib/Manifolds/simplicialcup.dev index 7a1c6c6e..345c2aa2 100644 --- a/lib/Manifolds/simplicialcup.dev +++ b/lib/Manifolds/simplicialcup.dev @@ -17,7 +17,7 @@ D:=HomToIntegersModP(C,2);; IntCoh:=ModularCohomology("CohomologyAsFpGroup",true);; ################################### -MyLength:=function(L); +MyLength:=function(L) if IsList(L) then return Length(L); else return L; fi; diff --git a/lib/Manifolds/simplicialcup.gi b/lib/Manifolds/simplicialcup.gi index da540d45..15492199 100644 --- a/lib/Manifolds/simplicialcup.gi +++ b/lib/Manifolds/simplicialcup.gi @@ -24,7 +24,7 @@ IntCoh:=ModularCohomology("CohomologyAsFpGroup",true);; fi; ################################### -MyLength:=function(L); +MyLength:=function(L) if IsList(L) then return Length(L); else return L; fi; diff --git a/lib/ModPRings/functorial.gi b/lib/ModPRings/functorial.gi index 69a33f6d..d8098c4e 100644 --- a/lib/ModPRings/functorial.gi +++ b/lib/ModPRings/functorial.gi @@ -83,7 +83,7 @@ PhomH:=GroupHomomorphismByFunction(PH,H,x->x);; RPGhomRG:=EquivariantChainMap(RPG,RG,PhomG);; RPHhomRH:=EquivariantChainMap(RPH,RH,PhomH);; -mat:=function(x); return TransposedMat(HomomorphismAsMatrix(x)); end; +mat:=function(x) return TransposedMat(HomomorphismAsMatrix(x)); end; Ghom:=[]; Hhom:=[]; diff --git a/lib/ModPRings/recordPart1.gi b/lib/ModPRings/recordPart1.gi index 5afed4d5..c0af24d4 100644 --- a/lib/ModPRings/recordPart1.gi +++ b/lib/ModPRings/recordPart1.gi @@ -120,13 +120,13 @@ end; #################################################################### ##################################################################### -IntToPair:=function(k); +IntToPair:=function(k) return IntPairList[k]; end; ##################################################################### ##################################################################### -IntToPairModified:=function(k); +IntToPairModified:=function(k) if k = 1 then return [0,1]; else return IntPairList[k-1]; @@ -135,13 +135,13 @@ end; ##################################################################### ##################################################################### -PairToInt:=function(x); +PairToInt:=function(x) return Position(IntPairList,x); end; ##################################################################### ##################################################################### -PairToIntModified:=function(x); +PairToIntModified:=function(x) if x = [0,1] then return 1; else return Position(IntPairList,x)+1; diff --git a/lib/NonabelianTensor/bogomolov.gi b/lib/NonabelianTensor/bogomolov.gi index be100d1a..74347515 100644 --- a/lib/NonabelianTensor/bogomolov.gi +++ b/lib/NonabelianTensor/bogomolov.gi @@ -1,6 +1,6 @@ ############################################# ############################################# -CommutingProbability:=function(G); +CommutingProbability:=function(G) return Length(ConjugacyClasses(G))/Order(G); end; ############################################# @@ -395,7 +395,7 @@ InstallGlobalFunction(PartialIsoclinismClasses, function(L) local test; -test:=function(G,H); return AreIsoclinic(G,H,false); end; +test:=function(G,H) return AreIsoclinic(G,H,false); end; return HAP_EquivalenceClasses(L,test); diff --git a/lib/NonabelianTensor/equivalenceclasses.gi b/lib/NonabelianTensor/equivalenceclasses.gi index f7c6f45e..50f22c03 100644 --- a/lib/NonabelianTensor/equivalenceclasses.gi +++ b/lib/NonabelianTensor/equivalenceclasses.gi @@ -109,7 +109,7 @@ od; stems:=GroupIsomorphismRepresentatives(stems,"with possible redundancies"); stems:=IsoclinismClasses(stems); -fn:=function(x,y); return Order(x)x[1]); return stems; diff --git a/lib/NonabelianTensor/exteriorProduct.gi b/lib/NonabelianTensor/exteriorProduct.gi index 0dae85c0..1dd81e3e 100644 --- a/lib/NonabelianTensor/exteriorProduct.gi +++ b/lib/NonabelianTensor/exteriorProduct.gi @@ -212,7 +212,7 @@ end); ##################################################################### InstallGlobalFunction(RelativeSchurMultiplier, -function(G,N); +function(G,N) if G=N then return GroupHomology(G,2); fi; diff --git a/lib/NonabelianTensor/tensorPair.gi b/lib/NonabelianTensor/tensorPair.gi index 200e8af1..391468f8 100644 --- a/lib/NonabelianTensor/tensorPair.gi +++ b/lib/NonabelianTensor/tensorPair.gi @@ -51,7 +51,7 @@ if not IsFinite(AG) then return NonabelianTensorProduct_Inf(AG,AH); fi; ############################################################# if Order(AH)=1 then delta:=GroupHomomorphismByFunction(AH,G,x->x); -CrossedPairing:=function(x,y); return Identity(G); end; +CrossedPairing:=function(x,y) return Identity(G); end; return rec(homomorphism:=delta, pairing:=CrossedPairing); fi; ############################################################ diff --git a/lib/Operations/hapOps.gi b/lib/Operations/hapOps.gi index 4f8e9aee..c6d9093d 100644 --- a/lib/Operations/hapOps.gi +++ b/lib/Operations/hapOps.gi @@ -370,7 +370,7 @@ ArrayAssignDim:=ArrayAssignFunctions(dim); ArrayIt:=ArrayIterate(dim); ######################### -Fun:=function(i); +Fun:=function(i) if ArrayValueDim(M!.binaryArray,i)=1 then ArrayAssignDim(A,i,1); fi; @@ -432,7 +432,7 @@ end); InstallMethod(PureComplexRandomCell, "random cell of a pure cubical complex ", [IsHapPureCubicalComplex], -function(K); +function(K) return RandomCellOfPureComplex(K); end); ########################################################## @@ -443,7 +443,7 @@ end); InstallOtherMethod(PureComplexRandomCell, "random cell of a pure cubical complex ", [IsHapPurePermutahedralComplex], -function(K); +function(K) return RandomCellOfPureComplex(K); end); ########################################################## @@ -486,7 +486,7 @@ end); InstallOtherMethod(ContractibleSubcomplex, "contractible subcomplex of simplicial complex ", [IsHapSimplicialComplex], -function(K); +function(K) return ContractibleSubcomplexOfSimplicialComplex(K); end); ########################################################## @@ -499,7 +499,7 @@ end); InstallMethod(BoundaryMap, "inclusion of the boundary of a regular CW complex ", [IsHapRegularCWComplex], -function(K); +function(K) return BoundaryPairOfPureRegularCWComplex(K); end); ########################################################## @@ -511,7 +511,7 @@ end); InstallMethod(CriticalCells, "critical cells of regular CW complex", [IsHapRegularCWComplex], -function(K); +function(K) if IsBound(K!.directed) then return HAP_CriticalCellsDirected(K); fi; @@ -526,7 +526,7 @@ end); InstallMethod(DisplayArcPresentation, "displays a pure cubical knot", [IsHapPureCubicalComplex], -function(K); +function(K) ViewPureCubicalKnot(K); end); ########################################################## @@ -537,7 +537,7 @@ end); InstallMethod(KnotReflection, "reflects a pure cubical knot", [IsHapPureCubicalComplex], -function(K); +function(K) return ReflectedCubicalKnot(K); end); ########################################################## @@ -660,7 +660,7 @@ end); InstallMethod(ZigZagContractedComplex, "zig zag contracted pure cubical complex", [IsHapPureCubicalComplex], -function(K); +function(K) return ZigZagContractedPureComplex(K); end); ########################################################## @@ -671,7 +671,7 @@ end); InstallOtherMethod(ZigZagContractedComplex, "zig zag contracted pure cubical complex", [IsHapPureCubicalComplex,IsInt], -function(K,n); +function(K,n) return ZigZagContractedPureComplex(K,n); end); ########################################################## @@ -683,7 +683,7 @@ end); InstallOtherMethod(ZigZagContractedComplex, "zig zag contracted pure permutahedral complex", [IsHapPurePermutahedralComplex], -function(K); +function(K) return ZigZagContractedPureComplex(K); end); ########################################################## @@ -694,7 +694,7 @@ end); InstallOtherMethod(ZigZagContractedComplex, "zig zag contracted pure permutahedral complex", [IsHapPurePermutahedralComplex,IsInt], -function(K,n); +function(K,n) return ZigZagContractedPureComplex(K,n); end); ########################################################## @@ -706,7 +706,7 @@ end); InstallOtherMethod(ZigZagContractedComplex, "zig zag contracted filtered pure cubical complex", [IsHapFilteredPureCubicalComplex], -function(K); +function(K) return ZigZagContractedFilteredPureCubicalComplex(K); end); ########################################################## @@ -751,21 +751,21 @@ SimplicesLst:=StructuralCopy(Y!.simplicesLst); dim:=Dimension(Y); ##################### -NrSimplices:=function(n); +NrSimplices:=function(n) if n<0 or n>dim then return 0; fi; return Length(SimplicesLst[n+1]); end; ##################### ##################### -Simplices:=function(n,i); +Simplices:=function(n,i) return SimplicesLst[n+1][i]; end; ##################### ##################### -EnumeratedSimplex:=function(v); +EnumeratedSimplex:=function(v) return PositionSet(SimplicesLst[Length(v)],v); end; ##################### @@ -796,7 +796,7 @@ end); InstallOtherMethod(ContractedComplex, "contracted filtered regular CW complex", [IsHapFilteredRegularCWComplex], -function(Y); +function(Y) return ContractedFilteredRegularCWComplex(Y); end); ########################################################## @@ -886,7 +886,7 @@ end); InstallOtherMethod(ContractedComplex, "contracted pure permutahedral complex", [IsHapPurePermutahedralComplex,IsHapPurePermutahedralComplex], -function(M,S); +function(M,S) return HomotopyEquivalentMinimalPureSubcomplex(M,S);; end); ########################################################## @@ -901,7 +901,7 @@ end); InstallOtherMethod(ContractedComplex, "contracted filtered pure cubical complex", [IsHapFilteredPureCubicalComplex], -function(Y); +function(Y) return ContractedFilteredPureCubicalComplex(Y); end); @@ -913,7 +913,7 @@ end); InstallMethod(SimplifiedComplex, "simplify a regular CW-complex while retaining the homeomorphism type", [IsHapRegularCWComplex], -function(Y); +function(Y) return SimplifiedRegularCWComplex(Y); end); @@ -925,7 +925,7 @@ end); InstallOtherMethod(SimplifiedComplex, "simplify a pure permutahedral complex", [IsHapPurePermutahedralComplex], -function(Y); +function(Y) return ZigZagContractedComplex(Y); end); @@ -937,7 +937,7 @@ end); InstallOtherMethod(ContractedComplex, "contracted sparse chain complex", [IsHapSparseChainComplex], -function(C); +function(C) return SimplifiedSparseChainComplex(C); end); @@ -949,7 +949,7 @@ end); InstallOtherMethod(ContractedComplex, "contracted sparse chain complex", [IsHapSparseChainComplex,IsInt], -function(C,b); +function(C,b) return SimplifiedSparseChainComplex(C,b); end); @@ -1024,7 +1024,7 @@ end); InstallMethod(ConcentricFiltration, "Concentric filtration on pure cubical complex", [IsHapPureCubicalComplex,IsInt], -function(Y,n); +function(Y,n) return ConcentricallyFilteredPureCubicalComplex(Y,n); end); @@ -1281,7 +1281,7 @@ end); InstallMethod(PersistentBettiNumbersAlt, "Betti number of a filtered regular CW-complex", [IsHapFilteredRegularCWComplex,IsInt,IsInt], -function(Y,n,prime); +function(Y,n,prime) return PersistentBettiNumbersViaContractions(Y,n,prime); end); ########################################################## @@ -1292,7 +1292,7 @@ end); InstallOtherMethod(PersistentBettiNumbersAlt, "Betti number of a filtered regular CW-complex", [IsHapFilteredRegularCWComplex,IsInt,IsInt,IsBool], -function(Y,n,prime,bool); +function(Y,n,prime,bool) return PersistentBettiNumbersViaContractions(Y,n,prime,bool); end); ########################################################## @@ -1304,7 +1304,7 @@ end); InstallOtherMethod(PersistentBettiNumbersAlt, "Betti number of a filtered regular CW-complex", [IsHapFilteredRegularCWComplex,IsInt], -function(Y,n); +function(Y,n) Print("Using homology over GF(2).\n"); return PersistentBettiNumbersViaContractions(Y,n,2); end); @@ -1316,7 +1316,7 @@ end); InstallOtherMethod(PersistentBettiNumbersAlt, "Betti number of a filtered regular CW-complex", [IsHapFilteredRegularCWComplex,IsInt,IsBool], -function(Y,n,bool); +function(Y,n,bool) Print("Using homology over GF(2).\n"); return PersistentBettiNumbersViaContractions(Y,n,2,bool); end); @@ -1329,7 +1329,7 @@ end); InstallOtherMethod(PersistentBettiNumbersAlt, "Betti number of a filtered regular CW-complex", [IsHapFilteredRegularCWComplex,IsList], -function(Y,N); +function(Y,N) Print("Using homology over GF(2).\n"); return PersistentBettiNumbersViaContractions(Y,N,2); end); @@ -1341,7 +1341,7 @@ end); InstallOtherMethod(PersistentBettiNumbersAlt, "Betti number of a filtered regular CW-complex", [IsHapFilteredRegularCWComplex,IsList,IsBool], -function(Y,N,bool); +function(Y,N,bool) Print("Using homology over GF(2).\n"); return PersistentBettiNumbersViaContractions(Y,N,2,bool); end); @@ -1360,7 +1360,7 @@ end); InstallOtherMethod(PersistentBettiNumbers, "Betti number of a sparse filtered chain complex", [IsHapFilteredSparseChainComplex,IsInt], -function(C,n); +function(C,n) return PersistentHomologyOfFilteredSparseChainComplex(C,n); end); ########################################################## @@ -1371,7 +1371,7 @@ end); InstallOtherMethod(PersistentBettiNumbers, "Betti number of a sparse filtered chain complex", [IsHapFilteredSparseChainComplex,IsInt,IsInt], -function(C,n,prime); +function(C,n,prime) return PersistentHomologyOfFilteredSparseChainComplex( TensorWithIntegersModPSparse(C,prime),n); end); @@ -1384,7 +1384,7 @@ end); InstallOtherMethod(PersistentBettiNumbers, "Betti number of a filtered chain complex", [IsHapFilteredChainComplex,IsInt], -function(C,n); +function(C,n) if EvaluateProperty(C,"charactieristic")<>0 then return fail; fi; #Oct 2025 return PersistentBettiNumbers( FilteredChainComplexToFilteredSparseChainComplex(C),n); @@ -1397,7 +1397,7 @@ end); InstallOtherMethod(PersistentBettiNumbers, "Betti number of a filtered chain complex", [IsHapFilteredChainComplex,IsInt,IsInt], -function(C,n,prime); +function(C,n,prime) if EvaluateProperty(C,"charactieristic")<>0 then return fail; fi; #Oct 202 return PersistentBettiNumbers( FilteredChainComplexToFilteredSparseChainComplex(C),n,prime); @@ -1414,7 +1414,7 @@ end); InstallOtherMethod(Size, "Size of an integer", [IsInt], -function(n); +function(n) return n; end); ########################################################## @@ -1425,7 +1425,7 @@ end); InstallOtherMethod(BettiNumber, "Betti number of a chain complex", [IsHapChainComplex,IsInt], -function(C,n); +function(C,n) if IsPrimeInt(EvaluateProperty(C,"characteristic")) then return Size(Homology(C,n)); fi; @@ -1443,7 +1443,7 @@ end); InstallOtherMethod(BettiNumber, "Betti number of a sparse chain complex", [IsHapSparseChainComplex,IsInt], -function(C,n); +function(C,n) return Bettinumbers(C,n); end); ########################################################## @@ -1455,7 +1455,7 @@ end); InstallOtherMethod(BettiNumber, "Betti number of a pure cubical complex", [IsHapPureCubicalComplex, IsInt], -function(S,n); +function(S,n) if n=0 then return PathComponentOfPureComplex(S,0); fi; @@ -1473,7 +1473,7 @@ end); InstallOtherMethod(BettiNumber, "Betti number of a pure cubical complex in characteristic p", [IsHapPureCubicalComplex, IsInt, IsInt], -function(S,n,p); +function(S,n,p) if n=0 then return PathComponentOfPureComplex(S,0); fi; @@ -1489,7 +1489,7 @@ end); InstallOtherMethod(BettiNumber, "Betti number of a pure permutahedral complex", [IsHapPurePermutahedralComplex,IsInt], -function(S,n); +function(S,n) if n=0 then return PathComponentOfPureComplex(S,0); fi; @@ -1507,7 +1507,7 @@ end); InstallOtherMethod(BettiNumber, "Betti number of a pure permutahedral complex in characteristic p", [IsHapPurePermutahedralComplex,IsInt,IsInt], -function(S,n,p); +function(S,n,p) if n=0 then return PathComponentOfPureComplex(S,0); fi; @@ -1523,7 +1523,7 @@ end); InstallOtherMethod(BettiNumber, "Betti number of a cubical complex", [IsHapCubicalComplex,IsInt], -function(S,n); +function(S,n) return BettiNumber(RegularCWComplex(S),n); end); ########################################################## @@ -1534,7 +1534,7 @@ end); InstallOtherMethod(BettiNumber, "Betti number of a cubical complex in characteristic p", [IsHapCubicalComplex,IsInt,IsInt], -function(S,n,p); +function(S,n,p) return BettiNumber(RegularCWComplex(S),n,p); end); ########################################################## diff --git a/lib/Perturbations/conrad.gi b/lib/Perturbations/conrad.gi index 32491a26..d633be83 100644 --- a/lib/Perturbations/conrad.gi +++ b/lib/Perturbations/conrad.gi @@ -7,7 +7,7 @@ local fn, L, Elts, posfn,LT,mult,multrec,inv,invrec; L:=[]; LT:=NewDictionary(GeneratorsOfGroup(G)[1],true,G); ############################################# -fn:=function(i); +fn:=function(i) if i>0 and i<=Length(L) then return L[i]; fi; return fail; end; @@ -31,7 +31,7 @@ Elts!.posfun:=posfn; multrec:=[]; ############################################# -mult:=function(i,j); +mult:=function(i,j) if not IsBound(multrec[i]) then multrec[i]:=[]; fi; if not IsBound(multrec[i][j]) then multrec[i][j]:=posfn(Elts[i]*Elts[j]); @@ -42,7 +42,7 @@ end; invrec:=[]; ############################################# -inv:=function(g); +inv:=function(g) if not IsBound(invrec[g]) then invrec[g]:= posfn(Elts[g]^-1); fi; @@ -114,7 +114,7 @@ end; ########################################################### ########################################################### -InSL2Z:=function(g); +InSL2Z:=function(g) if not IsList(g) then return false; fi; if not Length(g)=2 then return false; fi; if not IsList(g[1]) and IsList(g[2]) then return false; fi; diff --git a/lib/Perturbations/conrad.lt b/lib/Perturbations/conrad.lt index fb59a01f..18fda66a 100644 --- a/lib/Perturbations/conrad.lt +++ b/lib/Perturbations/conrad.lt @@ -7,7 +7,7 @@ local fn, L, Elts, posfn,LT; L:=[]; LT:=NewDictionary(GeneratorsOfGroup(G)[1],true,G); ############################################# -fn:=function(i); +fn:=function(i) if i>0 and i<=Length(L) then return L[i]; fi; return fail; end; @@ -94,7 +94,7 @@ end; ########################################################### ########################################################### -InSL2Z:=function(g); +InSL2Z:=function(g) if not IsList(g) then return false; fi; if not Length(g)=2 then return false; fi; if not IsList(g[1]) and IsList(g[2]) then return false; fi; diff --git a/lib/Perturbations/contractibleSL2Zcomplex.gi b/lib/Perturbations/contractibleSL2Zcomplex.gi index 2ce4807d..84690983 100644 --- a/lib/Perturbations/contractibleSL2Zcomplex.gi +++ b/lib/Perturbations/contractibleSL2Zcomplex.gi @@ -29,9 +29,9 @@ return fail; fi; if HAP_GCOMPLEX_SETUP[1] then -TransMat:=function(x); return x^-1; end; +TransMat:=function(x) return x^-1; end; else -TransMat:=function(x); return x; end; +TransMat:=function(x) return x; end; fi; @@ -41,7 +41,7 @@ lnth:=Length(C)-1; dims:=List([1..lnth+1],n->Length(C[n])); ################### -Dimension:=function(n); +Dimension:=function(n) if n>lnth then return 0; fi; return dims[n+1]; end; @@ -117,7 +117,7 @@ end; #################### #################### -Stabilizer:=function(n,k); +Stabilizer:=function(n,k) return StabilizerGroups[n+1][k]; end; #################### diff --git a/lib/Perturbations/contractibleSL2ZcomplexALT.gi b/lib/Perturbations/contractibleSL2ZcomplexALT.gi index 3341fd8c..b074521c 100644 --- a/lib/Perturbations/contractibleSL2ZcomplexALT.gi +++ b/lib/Perturbations/contractibleSL2ZcomplexALT.gi @@ -29,9 +29,9 @@ return fail; fi; if HAP_GCOMPLEX_SETUP[1] then -TransMat:=function(x); return x^-1; end; +TransMat:=function(x) return x^-1; end; else -TransMat:=function(x); return x; end; +TransMat:=function(x) return x; end; fi; @@ -41,7 +41,7 @@ lnth:=Length(C)-1; dims:=List([1..lnth+1],n->Length(C[n])); ################### -Dimension:=function(n); +Dimension:=function(n) if n>lnth then return 0; fi; return dims[n+1]; end; @@ -118,7 +118,7 @@ end; #################### #################### -Stabilizer:=function(n,k); +Stabilizer:=function(n,k) return StabilizerGroups[n+1][k]; end; #################### diff --git a/lib/Perturbations/dutour.gi b/lib/Perturbations/dutour.gi index 59657b2a..e157ff2c 100644 --- a/lib/Perturbations/dutour.gi +++ b/lib/Perturbations/dutour.gi @@ -35,9 +35,9 @@ bool:=ReadPackage("HAP",groupname); #InfGrps:=["SL2O-5"]; if HAP_GCOMPLEX_SETUP[1] then -TransMat:=function(x); return x^-1; end; +TransMat:=function(x) return x^-1; end; else -TransMat:=function(x); return x; end; +TransMat:=function(x) return x; end; fi; @@ -70,7 +70,7 @@ lnth:=Length(C)-1; dims:=List([1..lnth+1],n->Length(C[n])); ################### -Dimension:=function(n); +Dimension:=function(n) if n>lnth then return 0; fi; return dims[n+1]; end; @@ -132,7 +132,7 @@ G:=Group(One(Elts[1])*Elts); #March 2025 G!.bianchiInteger:=dd; #################### -Boundary:=function(n,k); +Boundary:=function(n,k) if k>0 then return boundaryList[n+1][k]; else @@ -142,7 +142,7 @@ end; #################### #################### -Stabilizer:=function(n,k); +Stabilizer:=function(n,k) return StabilizerGroups[n+1][k]; end; #################### @@ -213,7 +213,7 @@ local if IsBound(R!.standardWord) then StandardWord:=R!.standardWord; -else StandardWord:=function(n,bnd); return bnd; end; fi; +else StandardWord:=function(n,bnd) return bnd; end; fi; NewBoundaryList:=[]; for n in [1..Length(R)] do @@ -227,7 +227,7 @@ od; ############################## -NewBoundary:=function(n,i); +NewBoundary:=function(n,i) if i>0 then return NewBoundaryList[n][i]; else @@ -333,7 +333,7 @@ end; ##################### ##################### -Stabilizer:=function(n,i); +Stabilizer:=function(n,i) return Group(List(Elements(C!.stabilizer(n,i)),x->QuotientGroup(x,D))); end; @@ -423,7 +423,7 @@ Apply(PseudoBounds[1],bnd->fn(0,bnd)); Apply(PseudoBounds[2],bnd->fn(1,bnd)); ##################### -boundary:=function(n,k); +boundary:=function(n,k) if n<1 or n>2 then return []; fi; if k>0 then return PseudoBounds[n][k]; diff --git a/lib/Perturbations/filteredChainComplex.gi b/lib/Perturbations/filteredChainComplex.gi index 84b17028..6a48c14f 100644 --- a/lib/Perturbations/filteredChainComplex.gi +++ b/lib/Perturbations/filteredChainComplex.gi @@ -15,7 +15,7 @@ local FL:=EvaluateProperty(C,"filtration_length"); ############################### -FD:=function(r,k); +FD:=function(r,k) if r<0 then return 0; fi; return C!.filteredDimension(Minimum(r,FL),k); diff --git a/lib/Perturbations/freeRes.gi b/lib/Perturbations/freeRes.gi index 3f1b0dcf..32be0f82 100644 --- a/lib/Perturbations/freeRes.gi +++ b/lib/Perturbations/freeRes.gi @@ -245,7 +245,7 @@ end; DimensionRecord:=List([0..N],Dimension); -Dimension:=function(k); +Dimension:=function(k) return DimensionRecord[k+1]; end; ################################################################### @@ -542,7 +542,7 @@ od; FilteredLength:=Maximum(Flat(FiltDimRecs)); ################################################## -FilteredDimension:=function(r,k); +FilteredDimension:=function(r,k) return Length(Filtered(FiltDimRecs[k+1],x->x<=r)); @@ -760,7 +760,7 @@ EltsQ:=S!.elts; BoundaryS:=S!.boundary; ############################################################### -StabilizerSubgroup:=function(k,n); +StabilizerSubgroup:=function(k,n) return N; end; ################################################################ @@ -777,7 +777,7 @@ end; ################################################################# -Boundary:=function(k,n); +Boundary:=function(k,n) return List(BoundaryS(k,n),x->[x[1],QmapG(x[2])]); end; ################################################################# @@ -883,7 +883,7 @@ end; ############################################################### # This describes how the group WP acts on the orientation. -action:=function(k,j,g); +action:=function(k,j,g) if EltsWP[g] in WPev then return 1; else return -1; fi; @@ -892,7 +892,7 @@ end; ##################################################################### -Dimension:=function(n); +Dimension:=function(n) if n=0 then return 1; fi; if n>Length(R) then return 0; @@ -969,7 +969,7 @@ od; od; ##################################################################### -Dimension:=function(n); +Dimension:=function(n) if n=0 then return 1; fi; if n>=Length(ResGens) then return 0; @@ -1080,7 +1080,7 @@ end; ############################################################### # This describes how the group WP acts on the orientation. -action:=function(n,k,g); +action:=function(n,k,g) if n=0 then return 1; fi; return Determinant( EltsG[g]); end; @@ -1155,7 +1155,7 @@ BoundaryRec[n][k]:=StructuralCopy(Boundary(n,k)); od; od; ################################################## -Boundary:=function(n,k); +Boundary:=function(n,k) if k> 0 then return BoundaryRec[n][k]; else return @@ -1186,7 +1186,7 @@ for g in [1..Length(R!.elts)] do HomotopyRec[n+1][k][g]:=Homotopy(n,[k,g]); od;od;od; ################################################## -Homotopy:=function(n,x); +Homotopy:=function(n,x) if x[1]>0 then return HomotopyRec[n+1][x[1]][x[2]]; diff --git a/lib/Perturbations/nonFreeResSubgroup.gi b/lib/Perturbations/nonFreeResSubgroup.gi index bb0b53f1..e20c8535 100644 --- a/lib/Perturbations/nonFreeResSubgroup.gi +++ b/lib/Perturbations/nonFreeResSubgroup.gi @@ -99,7 +99,7 @@ od; if FIN then ##################################################################### -Mult:=function(n,k,i,j); +Mult:=function(n,k,i,j) return Position(EltsG,TransK[n+1][k][i]*EltsG[j]); end; ##################################################################### @@ -119,7 +119,7 @@ fi; if FIN then ##################################################################### -Conj:=function(n,k,i,j); +Conj:=function(n,k,i,j) return Position(EltsG,TransK[n+1][AbsInt(k)][i]^-1*EltsG[j]*TransK[n+1][AbsInt(k)][i]); end; ##################################################################### @@ -140,7 +140,7 @@ fi; ##################################################################### -Dimension:=function(n); +Dimension:=function(n) if n>len then return 0; fi; return sK[n+1]; end; diff --git a/lib/Perturbations/resDirectProd.gi b/lib/Perturbations/resDirectProd.gi index d052b476..a556a558 100644 --- a/lib/Perturbations/resDirectProd.gi +++ b/lib/Perturbations/resDirectProd.gi @@ -36,12 +36,12 @@ S:=arg[2]; if "appendToElts" in NamesOfComponents(R) then RappendToElts:=R!.appendToElts; else -RappendToElts:=function(x); Append(R!.elts,[x]); end; +RappendToElts:=function(x) Append(R!.elts,[x]); end; fi; if "appendToElts" in NamesOfComponents(S) then SappendToElts:=S!.appendToElts; else -SappendToElts:=function(x); Append(S!.elts,[x]); end; +SappendToElts:=function(x) Append(S!.elts,[x]); end; fi; @@ -127,21 +127,21 @@ EltsE:=[Identity(E)]; #od;od; # NOT A GOOD IDEA DOING THIS!! ##################################################################### - AppendToElts:=function(x); + AppendToElts:=function(x) EltsE[Length(EltsE)+1]:=x; end; ##################################################################### PseudoBoundary:=[]; ######################### -DimensionR:=function(n); +DimensionR:=function(n) if n<0 or n>Length(R) then return 0; else return R!.dimension(n); fi; end;; ######################### ######################### -DimensionS:=function(n); +DimensionS:=function(n) if n<0 or n>Length(S) then return 0; else return S!.dimension(n); fi; @@ -186,7 +186,7 @@ DivisorsInt(EvaluateProperty(S,"characteristic")) fi; if Charact=0 then AddWrds:=AddFreeWords; else - AddWrds:=function(v,w); + AddWrds:=function(v,w) return AddFreeWordsModP(v,w,Charact); end; fi; @@ -266,7 +266,7 @@ end; ##################################################################### ##################################################################### -Vector2Int:=function(p,q,r,s); +Vector2Int:=function(p,q,r,s) return Pair2Int([r,s],p,q); end; ##################################################################### diff --git a/lib/Perturbations/resDirectProd.good b/lib/Perturbations/resDirectProd.good index ca062593..9ff1b186 100644 --- a/lib/Perturbations/resDirectProd.good +++ b/lib/Perturbations/resDirectProd.good @@ -36,12 +36,12 @@ S:=arg[2]; if "appendToElts" in NamesOfComponents(R) then RappendToElts:=R!.appendToElts; else -RappendToElts:=function(x); Append(R!.elts,[x]); end; +RappendToElts:=function(x) Append(R!.elts,[x]); end; fi; if "appendToElts" in NamesOfComponents(S) then SappendToElts:=S!.appendToElts; else -SappendToElts:=function(x); Append(S!.elts,[x]); end; +SappendToElts:=function(x) Append(S!.elts,[x]); end; fi; @@ -123,21 +123,21 @@ fi; EltsE:=[Identity(E)]; ##################################################################### - AppendToElts:=function(x); + AppendToElts:=function(x) EltsE[Length(EltsE)+1]:=x; end; ##################################################################### PseudoBoundary:=[]; ######################### -DimensionR:=function(n); +DimensionR:=function(n) if n<0 or n>Length(R) then return 0; else return R!.dimension(n); fi; end;; ######################### ######################### -DimensionS:=function(n); +DimensionS:=function(n) if n<0 or n>Length(S) then return 0; else return S!.dimension(n); fi; @@ -182,7 +182,7 @@ DivisorsInt(EvaluateProperty(S,"characteristic")) fi; if Charact=0 then AddWrds:=AddFreeWords; else - AddWrds:=function(v,w); + AddWrds:=function(v,w) return AddFreeWordsModP(v,w,Charact); end; fi; @@ -262,7 +262,7 @@ end; ##################################################################### ##################################################################### -Vector2Int:=function(p,q,r,s); +Vector2Int:=function(p,q,r,s) return Pair2Int([r,s],p,q); end; ##################################################################### diff --git a/lib/Perturbations/resDirectProdLazy.gi b/lib/Perturbations/resDirectProdLazy.gi index 18098253..a52faa1c 100644 --- a/lib/Perturbations/resDirectProdLazy.gi +++ b/lib/Perturbations/resDirectProdLazy.gi @@ -22,7 +22,7 @@ g:=g[1]; ########################## ########################## -Dimension:=function(n); +Dimension:=function(n) if n>=0 then return 1; else return 0; fi; @@ -51,7 +51,7 @@ end; ########################## ########################## -fn:=function(k); +fn:=function(k) return g^(k-1); end; Elts:=LazyList(fn,[["length",M]]); @@ -68,7 +68,7 @@ Elts!.posfun:=posfn; if IsGroup(MM) then ########################## ########################## -fn:=function(k); +fn:=function(k) return Image(iso,g^(k-1)); end; Elts:=LazyList(fn,[["length",M]]); @@ -148,7 +148,7 @@ fi; ########################## ########################## -Dimension:=function(n); +Dimension:=function(n) if n=0 or n=1 then return 1; else return 0; fi; @@ -158,7 +158,7 @@ end; ########################## ########################## -Boundary:=function(n,k); +Boundary:=function(n,k) if n=1 and k=1 then return [[1,2], [-1,1]]; fi; return []; @@ -368,14 +368,14 @@ fi; PseudoBoundary:=[]; ######################### -DimensionR:=function(n); +DimensionR:=function(n) if n<0 or n>Length(R) then return 0; else return R!.dimension(n); fi; end;; ######################### ######################### -DimensionS:=function(n); +DimensionS:=function(n) if n<0 or n>Length(S) then return 0; else return S!.dimension(n); fi; @@ -420,7 +420,7 @@ DivisorsInt(EvaluateProperty(S,"characteristic")) fi; if Charact=0 then AddWrds:=AddFreeWords; else - AddWrds:=function(v,w); + AddWrds:=function(v,w) return AddFreeWordsModP(v,w,Charact); end; fi; @@ -500,7 +500,7 @@ end; ##################################################################### ##################################################################### -Vector2Int:=function(p,q,r,s); +Vector2Int:=function(p,q,r,s) return Pair2Int([r,s],p,q); end; ##################################################################### diff --git a/lib/Perturbations/resExtension.gi b/lib/Perturbations/resExtension.gi index 751a15d8..4342eab7 100644 --- a/lib/Perturbations/resExtension.gi +++ b/lib/Perturbations/resExtension.gi @@ -33,7 +33,7 @@ if Length(arg)>4 then PreImRep:=arg[5]; else ############################################################# - PreImRep:=function(x); + PreImRep:=function(x) return PreImagesRepresentative(EEhomGG,x); end; ############################################################# @@ -74,14 +74,14 @@ EltsE[1]:=Identity(E); ######################################################## - AppendToElts:=function(x); + AppendToElts:=function(x) Append(EltsE,[x]); end; ######################################################## if GisFinite then ######################################### - EhomG:=function(x); + EhomG:=function(x) return Position(RG!.elts,ImageElm(EEhomGG,EltsE[x])); end; ######################################### @@ -104,7 +104,7 @@ fi; if EisFinite then ######################################### - NhomE:=function(x); + NhomE:=function(x) return Position(EltsE,RN!.elts[x]); end; ######################################### @@ -128,7 +128,7 @@ PreimagesRecordE:=List([1..Order(G)],x-> Position(EltsE,PreImRep(RG!.elts[x]))); ######################################### - GmapE:=function(x); + GmapE:=function(x) return PreimagesRecordE[x]; end; ######################################### @@ -158,7 +158,7 @@ fi; if NisFinite then ######################################### - NEhomN:=function(x); + NEhomN:=function(x) return Position(RN!.elts,EltsE[x]); end; ######################################### @@ -178,7 +178,7 @@ fi; if EisFinite then ######################################### - MultE:=function(x,y); + MultE:=function(x,y) return Position(EltsE,EltsE[x]*EltsE[y]); end; ######################################### @@ -199,7 +199,7 @@ fi; if EisFinite then ######################################### - InvE:=function(x); + InvE:=function(x) return Position(EltsE,EltsE[x]^-1); end; ######################################### @@ -231,7 +231,7 @@ fi; T:=TwistedTensorProduct(RG,RN,EhomG,GmapE,NhomE,NEhomN,EltsE,MultE,InvE,E); ######################################################## - AppendToElts:=function(x); + AppendToElts:=function(x) Append(T!.elts,[x]); end; ######################################################## diff --git a/lib/Perturbations/resFiniteDirectProd.15May2016 b/lib/Perturbations/resFiniteDirectProd.15May2016 index 013f87d1..316d9198 100644 --- a/lib/Perturbations/resFiniteDirectProd.15May2016 +++ b/lib/Perturbations/resFiniteDirectProd.15May2016 @@ -149,7 +149,7 @@ DivisorsInt(EvaluateProperty(S,"characteristic")) fi; if Charact=0 then AddWrds:=AddFreeWords; else - AddWrds:=function(v,w); + AddWrds:=function(v,w) return AddFreeWordsModP(v,w,Charact); end; fi; @@ -229,7 +229,7 @@ end; ##################################################################### ##################################################################### -Vector2Int:=function(p,q,r,s); +Vector2Int:=function(p,q,r,s) return Pair2Int([r,s],p,q); end; ##################################################################### diff --git a/lib/Perturbations/resFiniteDirectProd.gi b/lib/Perturbations/resFiniteDirectProd.gi index b6525177..f6cd2e3b 100644 --- a/lib/Perturbations/resFiniteDirectProd.gi +++ b/lib/Perturbations/resFiniteDirectProd.gi @@ -150,7 +150,7 @@ DivisorsInt(EvaluateProperty(S,"characteristic")) fi; if Charact=0 then AddWrds:=AddFreeWords; else - AddWrds:=function(v,w); + AddWrds:=function(v,w) return AddFreeWordsModP(v,w,Charact); end; fi; @@ -277,7 +277,7 @@ end; eltse:=Elements(E); elts2intrec:=List([1..Length(eltse)],i->Elts2Int(eltse[i])); ##################################################################### -Elts2Int:=function(x); +Elts2Int:=function(x) return elts2intrec[PositionSorted(eltse,x)]; end; ##################################################################### diff --git a/lib/Perturbations/resFiniteExt.gi b/lib/Perturbations/resFiniteExt.gi index 51fa013c..efdbc250 100644 --- a/lib/Perturbations/resFiniteExt.gi +++ b/lib/Perturbations/resFiniteExt.gi @@ -31,13 +31,13 @@ EltsE:=Enumerator(E); #Added November 2024 fi; ##################################################################### -Mult:=function(i,j); +Mult:=function(i,j) return Position(EltsE,EltsE[i]*EltsE[j]); end; ##################################################################### ##################################################################### -InvE:=function(i); +InvE:=function(i) return Position(EltsE,EltsE[i]^-1); end; ##################################################################### @@ -48,7 +48,7 @@ if Order(E)<10^4 or n> 5 then EhomGsecond:=List([1..Size(E)],i->Position(EltsG,Image(EhomGfirst,EltsE[i]))); ##################################################################### -EhomG:=function(i); +EhomG:=function(i) return EhomGsecond[i]; end; ##################################################################### @@ -58,7 +58,7 @@ else EhomGsecond:=[]; ##################################################################### -EhomG:=function(i); +EhomG:=function(i) if not IsBound(EhomGsecond[i]) then EhomGsecond[i]:= Position(EltsG,Image(EhomGfirst,EltsE[i])); fi; @@ -74,7 +74,7 @@ GmapEsecond:=List([1..Size(G)],i->Position(EltsE, PreImagesRepresentative(EhomGfirst,EltsG[i]))); ##################################################################### -GmapE:=function(i); +GmapE:=function(i) return GmapEsecond[i]; end; ##################################################################### @@ -83,7 +83,7 @@ else GmapELst:=List([1..Size(G)],i->0); ##################################################################### -GmapE:=function(i); +GmapE:=function(i) if GmapELst[i]=0 then GmapELst[i]:= Position(EltsE,PreImagesRepresentative(EhomGfirst,EltsG[i])); fi; @@ -128,7 +128,7 @@ NhomEfirst:=GroupHomomorphismByImagesNC(N,E,GensN,GensN); NhomEsecond:=List([1..Size(N)],i->Position(EltsE,Image(NhomEfirst,EltsN[i]))); ##################################################################### -NhomE:=function(i); +NhomE:=function(i) return NhomEsecond[i]; end; ##################################################################### @@ -139,13 +139,13 @@ NEhomNfirst:=[]; #This next function can produce a fail when incorrectly used!! ##################################################################### -#NEhomN:=function(i); +#NEhomN:=function(i) #return NEhomNfirst[i]; #end; ##################################################################### ##################################################################### -NEhomN:=function(i); +NEhomN:=function(i) if not IsBound(NEhomNfirst[i]) then NEhomNfirst[i]:= Position(NhomEsecond,i); fi; @@ -154,7 +154,7 @@ end; ##################################################################### ##################################################################### -#NEhomN:=function(i); +#NEhomN:=function(i) #return Position(NhomEsecond,i); #end; ##################################################################### diff --git a/lib/Perturbations/twistedTensorProduct.gi b/lib/Perturbations/twistedTensorProduct.gi index 48449a6b..b8507bdb 100644 --- a/lib/Perturbations/twistedTensorProduct.gi +++ b/lib/Perturbations/twistedTensorProduct.gi @@ -96,7 +96,7 @@ fi; if Charact=0 then AddWrds:=AddFreeWords; else - AddWrds:=function(v,w); + AddWrds:=function(v,w) return AddFreeWordsModP(v,w,Charact); end; fi; @@ -365,7 +365,7 @@ if not BoolE then CompDel:=function(k,p,q,b) local r,v,w,x, map,SM,j,y; -map:=function(x); +map:=function(x) return Del(k,p,q,x); end; @@ -405,7 +405,7 @@ else CompDel:=function(k,p,q,b) local r,v,w,x, map,SM,j,y; -map:=function(x); +map:=function(x) return Del(k,p,q,x); end; @@ -482,7 +482,7 @@ od; ##################################################################### -Boundary:=function(k,j); +Boundary:=function(k,j) if k=0 then return []; else if SignInt(j)=1 then return PseudoBoundary[k][j][1]; @@ -503,7 +503,7 @@ end; #######START WORKING ON THE CONTRACTING HOMOTOPY#################### ##################################################################### -EmapN:=function(x); +EmapN:=function(x) #return NEhomN(Mult(x,InvE(GmapE(EhomG(x))))); return NEhomN(Mult(InvE(GmapE(EhomG(x))),x)); #Added 9th March 2011 @@ -529,7 +529,7 @@ end; ##################################################################### ##################################################################### -Vector2Int:=function(p,q,r,s); +Vector2Int:=function(p,q,r,s) return Pair2Int([r,s],p,q); end; ##################################################################### @@ -665,7 +665,7 @@ end; ##################################################################### -FinalHomotopy:=function(n,x); +FinalHomotopy:=function(n,x) return Homtpy(n,x,false); end; ##################################################################### @@ -686,7 +686,7 @@ grp:=E; FilteredLength:=Length(R); ################################################## -FilteredDimension:=function(r,i); +FilteredDimension:=function(r,i) return Length(Filtered(List(PseudoBoundary[i],x->x[2]),y->y<=r)); end; ################################################## diff --git a/lib/Perturbations/twistedTensorProduct.readable b/lib/Perturbations/twistedTensorProduct.readable index b3a3becd..69aad0f7 100644 --- a/lib/Perturbations/twistedTensorProduct.readable +++ b/lib/Perturbations/twistedTensorProduct.readable @@ -70,7 +70,7 @@ fi; if Charact=0 then AddWrds:=AddFreeWords; else - AddWrds:=function(v,w); + AddWrds:=function(v,w) return AddFreeWordsModP(v,w,Charact); end; fi; @@ -302,7 +302,7 @@ end; CompDel:=function(k,p,q,b) local r,v,w,x, map,SM,j,y; -map:=function(x); +map:=function(x) return Del(k,p,q,x); end; @@ -378,7 +378,7 @@ od; ##################################################################### -Boundary:=function(k,j); +Boundary:=function(k,j) if k=0 then return []; else if SignInt(j)=1 then return PseudoBoundary[k][j]; @@ -400,7 +400,7 @@ end; #######START WORKING ON THE CONTRACTING HOMOTOPY#################### ##################################################################### -EmapN:=function(x); +EmapN:=function(x) return NEhomN(Mult(x,InvE(GmapE(EhomG(x))))); @@ -425,7 +425,7 @@ end; ##################################################################### ##################################################################### -Vector2Int:=function(p,q,r,s); +Vector2Int:=function(p,q,r,s) return Pair2Int([r,s],p,q); end; ##################################################################### @@ -561,7 +561,7 @@ end; ##################################################################### -FinalHomotopy:=function(n,x); +FinalHomotopy:=function(n,x) return Homtpy(n,x,false); end; ##################################################################### diff --git a/lib/PolyComplexes/arrayOps.gi b/lib/PolyComplexes/arrayOps.gi index 9efb3ead..5617c65f 100644 --- a/lib/PolyComplexes/arrayOps.gi +++ b/lib/PolyComplexes/arrayOps.gi @@ -3,7 +3,7 @@ ##################################################################### ##################################################################### InstallGlobalFunction(ArrayValue, -function(A,x); +function(A,x) # A horrible piece of code!! It inputs an array A and list of integers x. # It returns the value A[x[1]][x[2]][x[3]]...[x[n]] where n is the length # of x. @@ -28,7 +28,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(ArrayAssign, -function(A,x,N); +function(A,x,N) # A horrible piece of code!! It inputs an array A and list of integers x and an object N. # It sets the value A[x[1]][x[2]][x[3]]...[x[n]] equal to N where n is the length # of x. @@ -71,7 +71,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(ArrayIterateBreak, -function(Dim); +function(Dim) ###### @@ -203,7 +203,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(ArrayIterate, -function(Dim); +function(Dim) ###### if Dim=1 then return @@ -313,18 +313,18 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(ArrayAssignFunctions, -function(x); - -if x=1 then return function(A,x,N); A[x[1]]:=N; end; fi; -if x=2 then return function(A,x,N); A[x[2]][x[1]]:=N; end; fi; -if x=3 then return function(A,x,N); A[x[3]][x[2]][x[1]]:=N; end; fi; -if x=4 then return function(A,x,N); A[x[4]][x[3]][x[2]][x[1]]:=N; end; fi; -if x=5 then return function(A,x,N); A[x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; -if x=6 then return function(A,x,N); A[x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; -if x=7 then return function(A,x,N); A[x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; -if x=8 then return function(A,x,N); A[x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; -if x=9 then return function(A,x,N); A[x[9]][x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; -if x=10 then return function(A,x,N); A[x[10]][x[9]][x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; +function(x) + +if x=1 then return function(A,x,N) A[x[1]]:=N; end; fi; +if x=2 then return function(A,x,N) A[x[2]][x[1]]:=N; end; fi; +if x=3 then return function(A,x,N) A[x[3]][x[2]][x[1]]:=N; end; fi; +if x=4 then return function(A,x,N) A[x[4]][x[3]][x[2]][x[1]]:=N; end; fi; +if x=5 then return function(A,x,N) A[x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; +if x=6 then return function(A,x,N) A[x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; +if x=7 then return function(A,x,N) A[x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; +if x=8 then return function(A,x,N) A[x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; +if x=9 then return function(A,x,N) A[x[9]][x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; +if x=10 then return function(A,x,N) A[x[10]][x[9]][x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]:=N; end; fi; if Length(x)>10 then Print("ArrayValueFunctions needs to be implemented for longer lists\n"); return fail;fi; @@ -336,18 +336,18 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(ArrayValueFunctions, -function(x); - -if x=1 then return function(A,x); return A[x[1]]; end; fi; -if x=2 then return function(A,x); return A[x[2]][x[1]]; end; fi; -if x=3 then return function(A,x); return A[x[3]][x[2]][x[1]]; end; fi; -if x=4 then return function(A,x); return A[x[4]][x[3]][x[2]][x[1]]; end; fi; -if x=5 then return function(A,x); return A[x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; -if x=6 then return function(A,x); return A[x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; -if x=7 then return function(A,x); return A[x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; -if x=8 then return function(A,x); return A[x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; -if x=9 then return function(A,x); return A[x[9]][x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; -if x=10 then return function(A,x); return A[x[10]][x[9]][x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; +function(x) + +if x=1 then return function(A,x) return A[x[1]]; end; fi; +if x=2 then return function(A,x) return A[x[2]][x[1]]; end; fi; +if x=3 then return function(A,x) return A[x[3]][x[2]][x[1]]; end; fi; +if x=4 then return function(A,x) return A[x[4]][x[3]][x[2]][x[1]]; end; fi; +if x=5 then return function(A,x) return A[x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; +if x=6 then return function(A,x) return A[x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; +if x=7 then return function(A,x) return A[x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; +if x=8 then return function(A,x) return A[x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; +if x=9 then return function(A,x) return A[x[9]][x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; +if x=10 then return function(A,x) return A[x[10]][x[9]][x[8]][x[7]][x[6]][x[5]][x[4]][x[3]][x[2]][x[1]]; end; fi; if Length(x)>10 then Print("ArrayValueFunctions needs to be implemented for longer lists\n"); return fail;fi; @@ -358,7 +358,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(ContractArray, -function(AA); +function(AA) if ArrayDimension(AA)=2 then return HomotopyEquivalentSmallerSubMatrix(AA,AA*0); @@ -377,7 +377,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(ContractPermArray, -function(AA); +function(AA) if ArrayDimension(AA)=2 then return HomotopyEquivalentSmallerSubPermMatrix(AA,AA*0); @@ -438,14 +438,14 @@ od; Ball:=ArrayToPureCubicalComplex(Ball,1); correction:=List([1..dim],i->2); ############################## -IsRemovableCube:=function(A,x); +IsRemovableCube:=function(A,x) if ArrayValueDim(SS,x)=1 then return false; fi; return IsContractibleCube_higherdims(A,A,dims,x,dim,dim1,ArrayValueDim,ArrayAssignDim,Ball,correction,cart); end; ############################## ###################### -Fun:=function(x); +Fun:=function(x) if IsRemovableCube(AA,x) then ArrayAssignDim(AA,x,0); bool:=true; @@ -468,7 +468,7 @@ od; ########################## Elts:=[]; -Fun2:=function(x); +Fun2:=function(x) if ArrayValueDim(AA,x)=1 then Add(Elts,x); fi; end; @@ -502,7 +502,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(HomotopyEquivalentSmallerSubPermArray, -function(AA,SS); +function(AA,SS) if ArrayDimension(AA)=2 then return HomotopyEquivalentSmallerSubPermMatrix(AA,SS); fi; @@ -517,7 +517,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(ContractibleSubArray, -function(AAA); +function(AAA) return HomotopyEquivalentLargerSubArray(AAA,AAA*0); end); ############################################################## @@ -569,21 +569,21 @@ od; Ball:=PureCubicalComplex(Ball); correction:=List([1..dim],i->2); ############################## -IsAddableCube:=function(A,S,x); +IsAddableCube:=function(A,S,x) if ArrayValueDim(S,x)=1 then return false; fi; return IsContractibleCube_higherdims(A,S,dims,x,dim,dim1,ArrayValueDim,ArrayAssignDim,Ball,correction,cart); end; ############################## ################# -Fun1:=function(x); +Fun1:=function(x) if ArrayValueDim(AA,x)=1 then start:=x; fi; end; ################# ################# -Fun2:=function(x); +Fun2:=function(x) if IsAddableCube(AA,S,x) then #w:=ArrayValueDim1(S,x{[2..dim]}); #w[x[1]]:=1; @@ -626,7 +626,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(HomotopyEquivalentLargerSubPermArray, -function(AAA,SSS); +function(AAA,SSS) if ArrayDimension(AAA)=2 then return HomotopyEquivalentLargerSubPermMatrix(AAA,SSS);fi; @@ -642,7 +642,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(FrameArray, -function(A); +function(A) #if IsInt(A[1]) then if not IsList(A[1]) then @@ -662,7 +662,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(UnframeArray, -function(A); +function(A) #if IsInt(A[1]) then if not IsList(A[1]) then @@ -697,7 +697,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(ArrayDimension, -function(A); +function(A) #if IsInt(A) then return 0; if not IsList(A) then return 0; @@ -712,7 +712,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(ArrayDimensions, -function(A) ; +function(A) #if IsInt(A) then return []; fi; if not IsList(A) then return []; fi; @@ -779,7 +779,7 @@ end); ############################################################## ############################################################## InstallGlobalFunction(Array, -function(A,f); +function(A,f) if IsList(A) and IsInt(A[1]) then return List(A,f);fi; #if IsList(A) and not IsList(A[1]) then return List(A,f);fi; diff --git a/lib/PolyComplexes/chainComplexes.gi b/lib/PolyComplexes/chainComplexes.gi index 4224ef5b..01243248 100644 --- a/lib/PolyComplexes/chainComplexes.gi +++ b/lib/PolyComplexes/chainComplexes.gi @@ -31,7 +31,7 @@ T[n+1]:=[]; od; ############################ -NewDimension:=function(n); +NewDimension:=function(n) return Length(S[n+1]); end; ############################ @@ -118,7 +118,7 @@ T[n+1]:=[]; od; ############################ -NewDimension:=function(n); +NewDimension:=function(n) return Length(S[n+1]); end; ############################ @@ -136,7 +136,7 @@ end; ############################ ############################ -FinalBoundary:=function(n,i); +FinalBoundary:=function(n,i) return NewBoundary(n,S[n+1][i]); @@ -214,14 +214,14 @@ D:=Objectify(HapChainComplex, rec( properties:=StructuralCopy(C!.properties) )); ###################### -D!.dimension:=function(n); +D!.dimension:=function(n) if n=0 then return 0; fi; return C!.dimension(n-1); end; ###################### ###################### -D!.boundary:=function(n,i); +D!.boundary:=function(n,i) if n=0 then return C!.boundary(0,i); fi; return C!.boundary(n-1,i); end; @@ -246,14 +246,14 @@ D:=Objectify(HapChainComplex, rec( properties:=StructuralCopy(C!.properties) )); ###################### -D!.dimension:=function(n); +D!.dimension:=function(n) if n=0 then return 0; fi; return C!.dimension(n-1); end; ###################### ###################### -D!.boundary:=function(n,i); +D!.boundary:=function(n,i) if n=0 then return C!.boundary(0,i); fi; if n=1 then return [1]; fi; return C!.boundary(n-1,i); @@ -279,7 +279,7 @@ inc, proj1, proj2; char:=EvaluateProperty(C,"characteristic"); ############################### -Dimension:=function(n); +Dimension:=function(n) #NEED TO FIX n=0 return 2*C!.dimension(n) + C!.dimension(n+1); @@ -333,7 +333,7 @@ inclusion:=Objectify(HapChainMap, P!.inclusion:=inclusion; ############################### ############################### -proj1:=function(v,n); +proj1:=function(v,n) return v{[1..C!.dimension(n)]}; end; firstProjection:=Objectify(HapChainMap, @@ -347,7 +347,7 @@ firstProjection:=Objectify(HapChainMap, ; P!.firstProjection:=firstProjection; ############################### -proj2:=function(v,n); +proj2:=function(v,n) return v{[1+C!.dimension(n)..2*C!.dimension(n)]}; end; secondProjection:=Objectify(HapChainMap, diff --git a/lib/PolyComplexes/clique.gi b/lib/PolyComplexes/clique.gi index 5618297b..0112696f 100644 --- a/lib/PolyComplexes/clique.gi +++ b/lib/PolyComplexes/clique.gi @@ -97,20 +97,20 @@ od; ########################## ########################## -Simplices:=function(d,k); +Simplices:=function(d,k) return SimplicesLst[d+1][k]; end; ######################### ########################## -NrSimplices:=function(d); +NrSimplices:=function(d) return Length(SimplicesLst[d+1]); end; ######################### ######################### -EnumeratedSimplex:=function(v); +EnumeratedSimplex:=function(v) return PositionSet(SimplicesLst[Length(v)],v); end; ######################### diff --git a/lib/PolyComplexes/cluster.gi b/lib/PolyComplexes/cluster.gi index ed52007c..16604093 100644 --- a/lib/PolyComplexes/cluster.gi +++ b/lib/PolyComplexes/cluster.gi @@ -326,7 +326,7 @@ L:=ReadLine(it);; M:=[]; ################# -fun:=function(x); +fun:=function(x) if x='\t' then return ','; else return x; fi; end; @@ -362,7 +362,7 @@ local M, Distance,S,i,j; ############################# M:=arg[1]; if Length(arg)=1 then - Distance:=function(u,v); + Distance:=function(u,v) return Sum(List(u-v,x->AbsInt(x))); end; else Distance:=arg[2]; @@ -801,20 +801,20 @@ SimplicesLst:=Filtered(SimplicesLst,x->Length(x)>0); dim:=Length(SimplicesLst)-1; ########################## -Simplices:=function(d,k); +Simplices:=function(d,k) return SimplicesLst[d+1][k]; end; ######################### ########################## -NrSimplices:=function(d); +NrSimplices:=function(d) return Length(SimplicesLst[d+1]); end; ######################### ######################### -EnumeratedSimplex:=function(v); +EnumeratedSimplex:=function(v) return PositionSet(SimplicesLst[Length(v)],v); end; ######################### @@ -1079,14 +1079,14 @@ SimplicesLst[d+1]:=Concatenation(SimplicesLst[d+1]); od; ########################## ########################## -Simplices:=function(d,k); +Simplices:=function(d,k) return SimplicesLst[d+1][k]; end; ######################### ########################## -NrSimplices:=function(d); +NrSimplices:=function(d) return Length(SimplicesLst[d+1]); end; ######################### @@ -1107,14 +1107,14 @@ end; ######################### ######################### -EnumeratedSimplex:=function(v); +EnumeratedSimplex:=function(v) return Position(SimplicesLst[Length(v)],v); end; ######################### ########################## -FilteredDimension:=function(t,d); +FilteredDimension:=function(t,d) return FilteredDims[d+1][t]; end; ######################### @@ -1168,7 +1168,7 @@ end); InstallOtherMethod(CliqueComplex, "Clique complex of graph", [IsHapGraph, IsInt], -function(K,n); +function(K,n) return SimplicialNerveOfGraph(K,n); @@ -1181,7 +1181,7 @@ end); InstallOtherMethod(CliqueComplex, "Clique complex of filtered graph", [IsHapFilteredGraph, IsInt], -function(K,n); +function(K,n) return SimplicialNerveOfFilteredGraph(K,n); diff --git a/lib/PolyComplexes/dvf.gi b/lib/PolyComplexes/dvf.gi index e1d7828c..424c53b8 100644 --- a/lib/PolyComplexes/dvf.gi +++ b/lib/PolyComplexes/dvf.gi @@ -1,7 +1,7 @@ ###################################################### ###################################################### InstallGlobalFunction(ContractCubicalComplex, -function(K); +function(K) if not IsHapCubicalComplex(K) then Print("This function must be applied to a cubical complex.\n"); diff --git a/lib/PolyComplexes/groupComplexes.gi b/lib/PolyComplexes/groupComplexes.gi index e2551925..f1b81253 100644 --- a/lib/PolyComplexes/groupComplexes.gi +++ b/lib/PolyComplexes/groupComplexes.gi @@ -11,7 +11,7 @@ G:=arg[1]; p:=arg[2]; if Length(arg)=3 then filt:=arg[3]; else -filt:=function(G); return true; end; +filt:=function(G) return true; end; fi; ###################################### if not IsPrimeInt(p) then @@ -38,7 +38,7 @@ od; Unbind(SubsCl); ################### -fn:=function(A,B); +fn:=function(A,B) return Order(A)>=Order(B); end; ################### @@ -94,7 +94,7 @@ end); #################################################### #################################################### InstallGlobalFunction(QuillenComplex, -function(G,p); +function(G,p) return PSubgroupSimplicialComplex(G,p,IsElementaryAbelian); end); #################################################### @@ -141,14 +141,14 @@ stabilizers[k][i]:=Stabilizer(G,orbits[k][i][1],ontuples); od;od; ###################### -Dim:=function(k); +Dim:=function(k) if k<0 or k>Dimension(K) then return 0; fi; return Length(orbits[k+1]); end; ###################### ###################### -stabfn:=function(k,i); +stabfn:=function(k,i) return stabilizers[k+1][i]; end; ###################### @@ -218,7 +218,7 @@ p:=arg[2]; if Length(arg)=3 then filt:=arg[3]; else -filt:=function(G); return true; end; +filt:=function(G) return true; end; fi; P:=SylowSubgroup(G,p); @@ -229,7 +229,7 @@ K:=K!.simplicesLst; orbs:=[]; ################################# -act:=function(x,g); +act:=function(x,g) return List(x,y->y^g); end; ################################# @@ -272,7 +272,7 @@ fi; ####################################################### ######################### -Dim:=function(n); +Dim:=function(n) if n<0 or n>dm then return 0; fi; return Length(orbs[n+1]); end; @@ -289,7 +289,7 @@ od; od; ######################### -stab:=function(n,k); +stab:=function(n,k) return STAB[n+1][k]; end; ######################### diff --git a/lib/PolyComplexes/metrics.gi b/lib/PolyComplexes/metrics.gi index 1fd26c7f..63c8ca91 100644 --- a/lib/PolyComplexes/metrics.gi +++ b/lib/PolyComplexes/metrics.gi @@ -138,7 +138,7 @@ InstallMethod(ManhattanMetric, "for two vectors u and v", [IsVector,IsVector], -function(u,v); +function(u,v) return Sum(List(u-v,x->AbsInt(x))); @@ -150,7 +150,7 @@ InstallMethod(EuclideanSquaredMetric, "for two vectors u and v", [IsVector,IsVector], -function(u,v); +function(u,v) return Sum(List(u-v,x->x^2)); @@ -162,7 +162,7 @@ InstallMethod(EuclideanApproximatedMetric, "for two vectors u and v", [IsVector,IsVector], -function(u,v); +function(u,v) return Rat(Sqrt(Float(Sum(List(u-v,x->x^2))))); diff --git a/lib/PolyComplexes/pureCubicalComplexes.gi b/lib/PolyComplexes/pureCubicalComplexes.gi index 68dd6ecf..f34ff8cd 100644 --- a/lib/PolyComplexes/pureCubicalComplexes.gi +++ b/lib/PolyComplexes/pureCubicalComplexes.gi @@ -164,7 +164,7 @@ end); InstallOtherMethod(EulerCharacteristic, "Euler characteristic of a chain complex", [IsHapChainComplex], -function(C); +function(C) return Sum(List([0..Length(C)],i->((-1)^i)*C!.dimension(i))); @@ -177,7 +177,7 @@ end); InstallOtherMethod(Length, "Length of a chain complex", [IsHapChainComplex], -function(C); +function(C) return EvaluateProperty(C,"length"); @@ -190,7 +190,7 @@ end); InstallOtherMethod(Length, "Length of a cochain complex", [IsHapCochainComplex], -function(C); +function(C) return EvaluateProperty(C,"length"); @@ -204,7 +204,7 @@ end); InstallOtherMethod(Length, "Length of a sparse chain complex", [IsHapSparseChainComplex], -function(C); +function(C) return EvaluateProperty(C,"length"); @@ -218,7 +218,7 @@ end); InstallOtherMethod(EulerCharacteristic, "Euler characteristic of a sparse chain complex", [IsHapSparseChainComplex], -function(C); +function(C) return Sum(List([0..Length(C)],i->((-1)^i)*C!.dimension(i))); @@ -449,7 +449,7 @@ ball:=Cartesian(List([1..dim],i->[-1,0,1])); dimsSet:=List([1..dim],x->[1..dimsM[x]]); ######################### -Fun:=function(i); +Fun:=function(i) if ArrayValueDim(M!.binaryArray,i)=1 then for b in ball do x:=2*i+b; @@ -512,7 +512,7 @@ LstBin:=List([0..Dimension(M)],i->[]); ############################## -numevens:=function(x); +numevens:=function(x) return Length(Filtered(x,i->IsEvenInt(i))); end; ############################## @@ -546,7 +546,7 @@ ArrayIt(dimsSet,Fun); fi; ####################################### -Dimsn:=function(n); +Dimsn:=function(n) return faces[n+1]; end; ####################################### @@ -761,7 +761,7 @@ LstBin:=List([0..Dimension(M)],i->[]); ############################## -numevens:=function(x); +numevens:=function(x) return Length(Filtered(x,i->IsEvenInt(i))); end; ############################## @@ -780,7 +780,7 @@ fi; od; ####################################### -Dimsn:=function(n); +Dimsn:=function(n) return faces[n+1]; end; ####################################### @@ -836,13 +836,13 @@ end; ####################################### ####################################### -Generator2Coordinates:=function(n,j); +Generator2Coordinates:=function(n,j) return LstBin[n+1][j]; end; ####################################### ####################################### -Coordinates2Generator:=function(x); +Coordinates2Generator:=function(x) return ArrayValueDim(BinLst,x); end; ####################################### @@ -1115,13 +1115,13 @@ SimplicesLst:=List([1..1000],i->[]); #VERY SLOPPY!!! SimplicesLst[1]:=List(Vertices,i->[i]); ################################################################# -NrSimplices:=function(n); +NrSimplices:=function(n) return Length(SimplicesLst[n+1]); end; ################################################################# ################################################################# -Simplices:=function(n,i); +Simplices:=function(n,i) return SimplicesLst[n+1][i]; end; ################################################################# @@ -1164,7 +1164,7 @@ SimplicesLst[i]:=SSortedList(SimplicesLst[i]); od; ############################################# -EnumeratedSimplex:=function(v); +EnumeratedSimplex:=function(v) return Position(SimplicesLst[Length(v)],v); end; @@ -1782,7 +1782,7 @@ dimsSet:=List([1..dim],x->[1..dimsM[x]]); ############################## -numevens:=function(x); +numevens:=function(x) return Length(Filtered(x,i->IsEvenInt(i))); end; ############################## @@ -2260,7 +2260,7 @@ end); ################################################################# ################################################################# InstallGlobalFunction(FramedPureCubicalComplex, -function(M); +function(M) return PureCubicalComplex(FrameArray(M!.binaryArray)); diff --git a/lib/PolyComplexes/purePermutahedralComplexes.gi b/lib/PolyComplexes/purePermutahedralComplexes.gi index aa873dbf..1d518995 100644 --- a/lib/PolyComplexes/purePermutahedralComplexes.gi +++ b/lib/PolyComplexes/purePermutahedralComplexes.gi @@ -98,7 +98,7 @@ od; ############################# ####################### -IsMSimplex:=function(x); +IsMSimplex:=function(x) if true in List(x, i->MVertices[i]) then return true; else return false; diff --git a/lib/PolyComplexes/rips.gi b/lib/PolyComplexes/rips.gi index 4eae1897..da8e8a0a 100644 --- a/lib/PolyComplexes/rips.gi +++ b/lib/PolyComplexes/rips.gi @@ -117,7 +117,7 @@ end; ################################################ ################### -Dimension:=function(n); +Dimension:=function(n) if n=0 then return Length(CRITICALVERTICES); fi; if n<=N and n>0 then return Length(PseudoBoundary[n]); fi; @@ -126,7 +126,7 @@ end; ################### ################### -Boundary:=function(n,i); +Boundary:=function(n,i) if n=0 then return []; fi; return PseudoBoundary[n][i]; end; diff --git a/lib/PolyComplexes/simplicialComplexes.gi b/lib/PolyComplexes/simplicialComplexes.gi index 0e1dcc6c..3a8ce7f0 100644 --- a/lib/PolyComplexes/simplicialComplexes.gi +++ b/lib/PolyComplexes/simplicialComplexes.gi @@ -59,7 +59,7 @@ end); InstallOtherMethod(EulerCharacteristic, "Euler characteristic of a simplicial complex", [IsHapSimplicialComplex], -function(M); +function(M) return Sum(List([0..Dimension(M)],i->((-1)^i)*M!.nrSimplices(i))); end); @@ -71,7 +71,7 @@ end); InstallOtherMethod(Homology, "Integral homologies of a simplicial complex", [IsHapSimplicialComplex], -function(M); +function(M) return List([0..Dimension(M)],n->Homology(M,n)); end); @@ -160,7 +160,7 @@ local Dimsn,Boundary,nullvecs,i; ############################# -Dimsn:=function(n); +Dimsn:=function(n) return M!.nrSimplices(n); end; ############################# @@ -216,7 +216,7 @@ local Dimsn,Boundary,i; ############################# -Dimsn:=function(n); +Dimsn:=function(n) return M!.nrSimplices(n); end; ############################# @@ -267,7 +267,7 @@ local Dimsn,Boundary,i; ############################# -Dimsn:=function(n); +Dimsn:=function(n) return M!.nrSimplices(n); end; ############################# @@ -340,21 +340,21 @@ Vertices:=SSortedList(Vertices); SimplicesLst:=L; ##################### -NrSimplices:=function(n); +NrSimplices:=function(n) if n<0 or n>dim then return 0; fi; return Length(SimplicesLst[n+1]); end; ##################### ##################### -Simplices:=function(n,i); +Simplices:=function(n,i) return SimplicesLst[n+1][i]; end; ##################### ##################### -EnumeratedSimplex:=function(v); +EnumeratedSimplex:=function(v) return PositionSet(SimplicesLst[Length(v)],v); end; ##################### @@ -450,7 +450,7 @@ local #mapping on simplexes. ################################### -SimpF:=function(s); +SimpF:=function(s) return List(s,F); end; ################################### @@ -614,7 +614,7 @@ for i in [1..Length(M)] do A[j][i]:=A[i][j]; od; od; -inv:=function(x); return x{[1..Length(x)-1]}; end; +inv:=function(x) return x{[1..Length(x)-1]}; end; MM:=[]; for i in [1..Length(M)] do mx:=0; @@ -1162,7 +1162,7 @@ fi; od; ############################# -Dimen:=function(k); +Dimen:=function(k) if k<0 or k>dim then return 0; fi; return Length(Faces[k+1]); end; diff --git a/lib/PolyComplexes/simpprod.gi b/lib/PolyComplexes/simpprod.gi index d4f47fe9..e87e0130 100644 --- a/lib/PolyComplexes/simpprod.gi +++ b/lib/PolyComplexes/simpprod.gi @@ -51,7 +51,7 @@ Add(expb,eb); od; ####################### -pair2simp:=function(v,w); +pair2simp:=function(v,w) return List([1..Length(v)], k-> Position(vertices,[v[k],w[k]])); end; ####################### diff --git a/lib/PolyComplexes/sparseCubicalComplexes.gi b/lib/PolyComplexes/sparseCubicalComplexes.gi index b69e0e64..ef08dd41 100644 --- a/lib/PolyComplexes/sparseCubicalComplexes.gi +++ b/lib/PolyComplexes/sparseCubicalComplexes.gi @@ -41,7 +41,7 @@ LstBin:=List([0..Dimension(M)],i->[]); ############################## -numevens:=function(x); +numevens:=function(x) return Length(Filtered(x,i->IsEvenInt(i))); end; ############################## @@ -75,7 +75,7 @@ ArrayIt(dimsSet,Fun); fi; ####################################### -Dimsn:=function(n); +Dimsn:=function(n) return faces[n+1]; end; ####################################### @@ -177,7 +177,7 @@ LstBin:=List([0..Dimension(M)],i->[]); ############################## -numevens:=function(x); +numevens:=function(x) return Length(Filtered(x,i->IsEvenInt(i))); end; ############################## @@ -196,7 +196,7 @@ fi; od; ####################################### -Dimsn:=function(n); +Dimsn:=function(n) return faces[n+1]; end; ####################################### @@ -253,13 +253,13 @@ end; ####################################### ####################################### -Generator2Coordinates:=function(n,j); +Generator2Coordinates:=function(n,j) return LstBin[n+1][j]; end; ####################################### ####################################### -Coordinates2Generator:=function(x); +Coordinates2Generator:=function(x) return ArrayValueDim(BinLst,x); end; ####################################### @@ -449,7 +449,7 @@ LstBin:=List([0..Dimension(M)],i->[]); ############################## -numevens:=function(x); +numevens:=function(x) return Length(Filtered(x,i->IsEvenInt(i))); end; ############################## @@ -490,7 +490,7 @@ od; od; ####################################### -Dimsn:=function(n); +Dimsn:=function(n) return faces[n+1]; end; ####################################### @@ -541,7 +541,7 @@ end; ####################################### ####################################### -FilteredDimension:=function(r,n); +FilteredDimension:=function(r,n) return Sum(List([1..r],i->Length(filtmat[n+1][i]) )); diff --git a/lib/PolyComplexes/twoDimensional.gi b/lib/PolyComplexes/twoDimensional.gi index cadc848c..36e45ede 100644 --- a/lib/PolyComplexes/twoDimensional.gi +++ b/lib/PolyComplexes/twoDimensional.gi @@ -121,7 +121,7 @@ end); ###################################################################### ###################################################################### InstallGlobalFunction(ContractMatrix, -function(A); +function(A) return HomotopyEquivalentSmallerSubMatrix(A,A*0); end); ###################################################################### @@ -207,7 +207,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(ContractibleSubMatrix, -function(AA); +function(AA) return HomotopyEquivalentLargerSubMatrix(AA,AA*0); end); ##################################################################### diff --git a/lib/PolyComplexes/twoDimensionalPerm.gi b/lib/PolyComplexes/twoDimensionalPerm.gi index 004f6801..bbb4f9bd 100644 --- a/lib/PolyComplexes/twoDimensionalPerm.gi +++ b/lib/PolyComplexes/twoDimensionalPerm.gi @@ -77,7 +77,7 @@ end); ###################################################################### ###################################################################### InstallGlobalFunction(ContractPermMatrix, -function(A); +function(A) return HomotopyEquivalentSmallerSubPermMatrix(A,A*0); end); ###################################################################### diff --git a/lib/Polymake/aspherical.gi b/lib/Polymake/aspherical.gi index fcfc7a26..cb134d08 100644 --- a/lib/Polymake/aspherical.gi +++ b/lib/Polymake/aspherical.gi @@ -42,7 +42,7 @@ CollEdges:=[]; Edges:=[]; ##################################################################### -RelatorToVertices:=function(R); +RelatorToVertices:=function(R) return SSortedList(LetterRepAssocWord(R)); end; ##################################################################### @@ -234,7 +234,7 @@ CollEdges:=[]; Edges:=[]; ##################################################################### -RelatorToVertices:=function(R); +RelatorToVertices:=function(R) return SSortedList(LetterRepAssocWord(R)); end; ##################################################################### diff --git a/lib/Polymake/cryst.gi b/lib/Polymake/cryst.gi index 62a2547c..d81dbbf0 100644 --- a/lib/Polymake/cryst.gi +++ b/lib/Polymake/cryst.gi @@ -128,7 +128,7 @@ end; ######################################## -Dimn:=function(n); +Dimn:=function(n) if n<0 or n>Dimension(Y) then return 0; fi; return Length(GCells[n+1]); end; @@ -148,7 +148,7 @@ od; od; ######################################## -Bndy:=function(n,k); +Bndy:=function(n,k) if n<1 or n>Dimension(Y) then return []; fi; return BNDS[n][k]; end; @@ -175,7 +175,7 @@ od; od; ######################################## -STAB:=function(n,k); +STAB:=function(n,k) return STABREC[n+1][k]; end; ######################################## diff --git a/lib/Polymake/polyFaces.gi b/lib/Polymake/polyFaces.gi index 6e21502d..11d868c2 100644 --- a/lib/Polymake/polyFaces.gi +++ b/lib/Polymake/polyFaces.gi @@ -49,7 +49,7 @@ EltsG:=Elements(G); VSGS:=VectorStabilizer(G,StartVector); ##################################################################### -Dimension:=function(k); +Dimension:=function(k) if k<0 then return 0; fi; if k=0 then return 1; fi; if k>lngth then return 0; fi; @@ -59,13 +59,13 @@ end; if IsPermGroup(G) then ##################################################################### -action:=function(g,V); +action:=function(g,V) return Permuted(V,g^-1); end; ##################################################################### else ##################################################################### -action:=function(g,V) ; +action:=function(g,V) return g*V; end; ##################################################################### @@ -81,7 +81,7 @@ Points:=SSortedList(Points); ##################################################################### -VertexToVector:=function(v); +VertexToVector:=function(v) return action(PG.generators[v+1],StartVector) - StartVector; end; ##################################################################### diff --git a/lib/PureComplexes/pureComplexes.gi b/lib/PureComplexes/pureComplexes.gi index 40151dee..cce10ecd 100644 --- a/lib/PureComplexes/pureComplexes.gi +++ b/lib/PureComplexes/pureComplexes.gi @@ -43,7 +43,7 @@ end); ############################# ############################# InstallGlobalFunction(IsPureComplex, -function(M); +function(M) if IsHapPureCubicalComplex(M) or IsHapPurePermutahedralComplex(M) then return true; @@ -126,7 +126,7 @@ end); ############################# ############################# InstallGlobalFunction(UnitBall, -function(M); +function(M) if IsHapPureCubicalComplex(M) then return UnitCubicalBall(Dimension(M));fi; if IsHapPurePermutahedralComplex(M) then return SSortedList(UnitPermutahedralBall(Dimension(M))); fi; @@ -141,28 +141,28 @@ end); InstallMethod(Nerve, "Nerve of lattice complex", [IsHapPureCubicalComplex], -function(M); +function(M) return PureComplexToSimplicialComplex(M); end); InstallMethod(Nerve, "Nerve of lattice complex", [IsHapPureCubicalComplex,IsInt], -function(M,n); +function(M,n) return PureComplexToSimplicialComplex(M,n); end); InstallMethod(Nerve, "Nerve of lattice complex", [IsHapPurePermutahedralComplex], -function(M); +function(M) return PureComplexToSimplicialComplex(M); end); InstallMethod(Nerve, "Nerve of lattice complex", [IsHapPurePermutahedralComplex,IsInt], -function(M,n); +function(M,n) return PureComplexToSimplicialComplex(M,n); end); @@ -276,19 +276,19 @@ od; fi; ################################################################# -NrSimplices:=function(n); +NrSimplices:=function(n) return Length(SimplicesLst[n+1]); end; ################################################################# ################################################################# -Simplices:=function(n,i); +Simplices:=function(n,i) return SimplicesLst[n+1][i]; end; ################################################################# ############################################# -EnumeratedSimplex:=function(v); +EnumeratedSimplex:=function(v) return Position(SimplicesLst[Length(v)],v); end; ############################################# @@ -491,7 +491,7 @@ dims:=EvaluateProperty(D,"arraySize"); #for x in CART do #################### -fn:=function(x); +fn:=function(x) if ArrayValueDim(N!.binaryArray,x)=1 then w:=ArrayValueDim1(D!.binaryArray,x{[2..dim]}); w[x[1]]:=1; @@ -562,7 +562,7 @@ dims:=EvaluateProperty(D,"arraySize"); #################### -fn:=function(x); +fn:=function(x) if ArrayValueDim(N!.binaryArray,x)=1 and ArrayValueDim(M!.binaryArray,x)=1 then w:=ArrayValueDim1(D!.binaryArray,x{[2..dim]}); w[x[1]]:=1; @@ -723,7 +723,7 @@ end; #################### -Fun:=function(x); +Fun:=function(x) if InBoundary(x) then ArrayAssignDim(B,x,1); fi; @@ -787,7 +787,7 @@ end); ###################################################################### ###################################################################### InstallGlobalFunction(HomotopyEquivalentMinimalPureCubicalSubcomplex, -function(T,S); +function(T,S) return HomotopyEquivalentMinimalPureSubcomplex(T,S); end); ###################################################################### @@ -797,7 +797,7 @@ end); ###################################################################### ###################################################################### InstallGlobalFunction(ContractPureComplex, -function(T); +function(T) ############################################# @@ -828,7 +828,7 @@ end); ###################################################################### ###################################################################### InstallGlobalFunction(ContractPureCubicalComplex, -function(T); +function(T) ContractPureComplex(T); end); ###################################################################### @@ -867,7 +867,7 @@ end); ###################################################################### ###################################################################### InstallGlobalFunction(HomotopyEquivalentMaximalPureCubicalSubcomplex, -function(T,S); +function(T,S) return HomotopyEquivalentMaximalPureSubcomplex(T,S); end); ###################################################################### @@ -902,7 +902,7 @@ firsts:=List([1..dim],i->infinity); lasts:=List([1..dim],i->0); ################ -Fun:=function(x); +Fun:=function(x) if ArrayValueDim(A,x)=1 then firsts:=List([1..dim],i->Minimum(x[i],firsts[i])); lasts:=List([1..dim],i->Maximum(x[i],lasts[i])); @@ -921,7 +921,7 @@ od; firsts:=firsts-List([1..Length(firsts)],i->1); ################ -Fun:=function(x); +Fun:=function(x) ArrayAssignDim(B,x,ArrayValueDim(A,x+firsts)); end; ################ @@ -942,7 +942,7 @@ end); ###################################################################### ###################################################################### InstallGlobalFunction(CropPureCubicalComplex, -function(T); +function(T) return CropPureComplex(T); end); ###################################################################### @@ -977,7 +977,7 @@ firsts:=List([1..dim],i->infinity); lasts:=List([1..dim],i->0); ################ -Fun:=function(x); +Fun:=function(x) if ArrayValueDim(A,x)=1 then firsts:=List([1..dim],i->Minimum(x[i],firsts[i])); lasts:=List([1..dim],i->Maximum(x[i],lasts[i])); @@ -988,7 +988,7 @@ ArrayIt(dimsSet,Fun); ################ -Fun:=function(x); +Fun:=function(x) if not false in List([1..dim],d-> firsts[d] <= x[d]) and not false in List([1..dim],d-> lasts[d] >= x[d]) @@ -1014,7 +1014,7 @@ end); ###################################################################### ###################################################################### InstallGlobalFunction(BoundingPureCubicalComplex, -function(T); +function(T) return BoundingPureComplex(T); end); ###################################################################### @@ -1202,7 +1202,7 @@ end); ###################################################################### ###################################################################### InstallGlobalFunction(ZigZagContractedPureCubicalComplex, -function(T); +function(T) return ZigZagContractedPureComplex(T); end); ###################################################################### @@ -1229,7 +1229,7 @@ if B[i][j][k]>0 then Add(A,[i,j,k]); fi; od;od;od; ############## -VtoS:=function(V); +VtoS:=function(V) return Concatenation("(" , String(V[1]) , "," , String(V[2]) , "," , String(V[3]) , ")"); end; ############## @@ -1318,7 +1318,7 @@ end); ############################################################# ############################################################# InstallGlobalFunction(ViewPureComplex, -function(M); +function(M) if IsHapPureCubicalComplex(M) then if Dimension(M)=3 then View3dPureComplex(M); fi; @@ -1414,7 +1414,7 @@ local Fun,start,x; start:=fail; -Fun:=function(x); +Fun:=function(x) if ArrayValueDim(B,x)=1 then start:=x; return true; else return false; fi; end; @@ -1454,7 +1454,7 @@ fi; if N=0 then return M!.zeroBetti;fi;### ###################################### -Fun:=function(z); if z=n then return 1;else return 0;fi;end; +Fun:=function(z) if z=n then return 1;else return 0;fi;end; P:=Array(M!.pathCompBinList,Fun); if IsHapPureCubicalComplex(M) then @@ -1484,7 +1484,7 @@ end); ################################################################# ################################################################# InstallGlobalFunction(PathComponentOfPureCubicalComplex, -function(M,N); +function(M,N) return PathComponentOfPureComplex(M,N); diff --git a/lib/Quandles/quandleKnots.gi b/lib/Quandles/quandleKnots.gi index faf4fcd2..ecf55183 100644 --- a/lib/Quandles/quandleKnots.gi +++ b/lib/Quandles/quandleKnots.gi @@ -107,7 +107,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(PlanarDiagramKnot, -function(n,k); +function(n,k) if not IsBound(Cedric_PlanarDiagram[n][k]) then return fail; fi; return Cedric_PlanarDiagram[n][k]; end); @@ -115,7 +115,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(GaussCodeKnot, -function(n,k); +function(n,k) if not IsBound(Cedric_PlanarDiagram[n][k]) then return fail; fi; return PD2GC(Cedric_PlanarDiagram[n][k]); end); @@ -123,7 +123,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(PresentationKnotQuandleKnot, -function(n,k); +function(n,k) if not IsBound(Cedric_PlanarDiagram[n][k]) then return fail; fi; return PresentationKnotQuandle(PD2GC(Cedric_PlanarDiagram[n][k])); end); diff --git a/lib/Quandles/quandleOrbits.gi b/lib/Quandles/quandleOrbits.gi index 203ccdb0..16713990 100644 --- a/lib/Quandles/quandleOrbits.gi +++ b/lib/Quandles/quandleOrbits.gi @@ -189,7 +189,7 @@ Add(RELS[Maximum(Flat(r))], r); od; ########################### -wrd:=function(mapping,rr); +wrd:=function(mapping,rr) if not IsList(rr) then return mapping[rr]; fi; return multTab[wrd(mapping,rr[1])][wrd(mapping,rr[2])]; end; @@ -328,7 +328,7 @@ C:=NumberOfHomomorphisms_connected(sP,Q,true); TRANS:=sP!.TRANS; ######################### -trans:=function(x,c); +trans:=function(x,c) if IsInt(x) then return c[x]; else return trans(x[1],c)*trans(x[2],c); @@ -336,7 +336,7 @@ fi; end; ######################### ######################### -elm2perm:=function(x); +elm2perm:=function(x) return PermList(List(Elements(Q),e->Position(Elements(Q),e*x))); end; ######################### diff --git a/lib/Quandles/quandles.gi b/lib/Quandles/quandles.gi index 1764f2d0..4d10e406 100644 --- a/lib/Quandles/quandles.gi +++ b/lib/Quandles/quandles.gi @@ -63,7 +63,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(Cedric_ConjugateQuandleElement, -function(w,n); +function(w,n) return Objectify(HapConjQuandElt, rec( @@ -107,7 +107,7 @@ InstallOtherMethod( \<, "comparison in a conjugation group quandle", [ IsHapConjQuandElt, IsHapConjQuandElt], -function(x,y) ; +function(x,y) return x!.element1) or (n=2 and k>1) or (n=3 and k>5) or (n=4 and k>7) or (n=5 and k>22) or (n=6 and k>73) or n>6 then return fail; fi; return Quandles(n)[k]; @@ -387,7 +387,7 @@ end); ##################################################################### ##################################################################### InstallGlobalFunction(IsQuandleEnvelope, -function(Q,G,e,st); +function(Q,G,e,st) return (IsTransitive(G,Q)) and (e in Elements(Q)) and (st in Center(Stabilizer(G,e))) and (NormalClosure(G,Group([st]))=G); end); diff --git a/lib/RahmSanchez/DavisComplex.gi b/lib/RahmSanchez/DavisComplex.gi index 27d739b0..32da87e7 100644 --- a/lib/RahmSanchez/DavisComplex.gi +++ b/lib/RahmSanchez/DavisComplex.gi @@ -704,9 +704,9 @@ local j, CoxeterGenerators, # name:=groupname; if HAP_GCOMPLEX_SETUP[1] then -TransMat:=function(x); return x^-1; end; +TransMat:=function(x) return x^-1; end; else -TransMat:=function(x); return x; end; +TransMat:=function(x) return x; end; fi; lnth:=Size(DC)-1; @@ -714,7 +714,7 @@ lnth:=Size(DC)-1; dims:=List([1..lnth+1],n->Size(DC[n])); ################### -Dimension:=function(n); +Dimension:=function(n) if n>lnth then return 0; fi; return dims[n+1]; end; @@ -792,7 +792,7 @@ od; G:=Group(CoxeterGenerators); #################### -Boundary:=function(n,k); +Boundary:=function(n,k) if k>0 then return boundaryList[n+1][k]; else @@ -802,7 +802,7 @@ end; #################### #################### -Stabilizer:=function(n,k); +Stabilizer:=function(n,k) return StabilizerGroups[n+1][k]; end; #################### diff --git a/lib/RegularCWComplexes/basicRegular.gi b/lib/RegularCWComplexes/basicRegular.gi index 69885965..b891a9ea 100644 --- a/lib/RegularCWComplexes/basicRegular.gi +++ b/lib/RegularCWComplexes/basicRegular.gi @@ -39,7 +39,7 @@ K:=IntegerSimplicialComplex(arg[1]); if Length(arg)>1 then dim:=arg[2]; else dim:=Dimension(K); fi; #################### -NrCells:=function(n); +NrCells:=function(n) if n>dim then return 0; fi; return Length(Filtered(Boundaries[n+1],x->not x[1]=0)); end; @@ -252,7 +252,7 @@ if n>0 then Y!.cobnd[n]:=LCoboundaries; fi; -Y!.nrCells:=function(k); +Y!.nrCells:=function(k) if k>EvaluateProperty(Y,"dimension") then return 0; fi; return Length(Filtered(Y!.bnd[k+1],x->not x[1]=0)); end; @@ -401,7 +401,7 @@ while true do Sum(List( [1..Length(Y!.bnd)],i->Y!.nrCells(i-1)))=0 then Y!.criticalCells:=cells; -Y!.nrCells:=function(k); +Y!.nrCells:=function(k) if k>EvaluateProperty(Y,"dimension") then return 0; fi; return Length(Filtered(Y!.boundaries[k+1],x->not x[1]=0)); end; @@ -442,7 +442,7 @@ fi; od; Y!.criticalCells:=cells; -Y!.nrCells:=function(k); +Y!.nrCells:=function(k) if k>EvaluateProperty(Y,"dimension") then return 0; fi; return Length(Filtered(Y!.boundaries[k+1],x->not x[1]=0)); end; @@ -482,7 +482,7 @@ if Length(arg)=1 then Dimension:=C!.dimension; else ### -Dimension:=function(n); +Dimension:=function(n) if ndim then return 0; fi; return Length(Y!.boundaries[n+1]); end; @@ -757,7 +757,7 @@ od; od; ############################### -Dimension:=function(n); +Dimension:=function(n) if IsBound(basis[n+1]) then return Length(basis[n+1]); else @@ -1271,7 +1271,7 @@ local #Dimension:=Y!.nrCells; ########################## -Dimension:=function(n); +Dimension:=function(n) if n<0 then return 0; fi; return Length(Y!.boundaries[n+1]); end; @@ -1354,7 +1354,7 @@ od; od; ############################### -Dimension:=function(n); +Dimension:=function(n) return Length(basis[n+1]); end; ############################### @@ -1575,7 +1575,7 @@ if Length(arg)=2 then Y!.orientation:=arg[2]; else OrientRegularCWComplex(Y); fi; #################### -Y!.nrCells:=function(n); +Y!.nrCells:=function(n) if n>dim then return 0; fi; return Length(Filtered(Y!.boundaries[n+1],x->not x[1]=0)); end; @@ -2211,7 +2211,7 @@ Y:=CubicalComplexToRegularCWComplex(M); Unbind(M); ##################### -weight:=function(k,i); +weight:=function(k,i) return W[k+1][i]; end; ##################### @@ -2255,7 +2255,7 @@ local TT,SS, VT, V, SimpT, SimpS, i, fn, F; VT:=T!.vertices; ################### -fn:=function(i); +fn:=function(i) #return i; return Position(VT,i); end; @@ -2268,7 +2268,7 @@ od; VT:=S!.vertices; ################### -fn:=function(i); +fn:=function(i) #return i; return Position(VT,i); end; @@ -2288,7 +2288,7 @@ SS:=RegularCWComplex(SS); ################ ################ -F:=function(n,k); +F:=function(n,k) return Position(T!.simplicesLst[n+1],S!.simplicesLst[n+1][k]); end; ################ @@ -2419,7 +2419,7 @@ od; ################## -map:=function(n,k); +map:=function(n,k) return invperm[n+1][k]; end; ################## @@ -2533,7 +2533,7 @@ end); InstallOtherMethod(BarycentricSubdivision, "for regular CW complexes", [IsHapRegularCWComplex], -function(Y); +function(Y) return HAP_BaryCentricSubdivisionRegularCWComplex(Y); end); ####################################################### @@ -2557,7 +2557,7 @@ chains:=List([1..Y!.nrCells(0)],i->[i]); newchains:=[]; ################################### -reduce:=function(x); +reduce:=function(x) if Length(x)>1 then return [x[1],x[Length(x)]]; else return x; fi; @@ -2612,7 +2612,7 @@ local X,Y,map; #THIS FUNTION IS NOT NEEDED X:=Source(G); Y:=Target(F); ####################### -map:=function(n,k); +map:=function(n,k) return F!.mapping(n,G!.mapping(n,k)); end; ####################### @@ -2819,7 +2819,7 @@ local R,Y,T,W,i; R:=ResolutionFiniteGroup(G,n); T:=Group(One(G)); -R!.stabilizer:=function(n,i); return T; end; +R!.stabilizer:=function(n,i) return T; end; R:=HAP_BaryCentricSubdivisionGComplex(R); R:=ResolutionToEquivariantCWComplex(R); Y:=EquivariantCWComplexToRegularCWComplex(R,G); diff --git a/lib/RegularCWComplexes/cocontract.gi b/lib/RegularCWComplexes/cocontract.gi index 8660383f..e5571093 100644 --- a/lib/RegularCWComplexes/cocontract.gi +++ b/lib/RegularCWComplexes/cocontract.gi @@ -102,7 +102,7 @@ if n>0 then Y!.cobnd[n]:=LCoboundaries; fi; -Y!.nrCells:=function(k); +Y!.nrCells:=function(k) if k>EvaluateProperty(Y,"dimension") or k<0 then return 0; fi; return Length(Filtered(Y!.bnd[k+1],x->not x[1]=0)); end; @@ -188,7 +188,7 @@ Add(Y!.properties,["codim",dim]); else Y!.properties[cpos][2]:=dim; fi; -Y!.nrCells:=function(k); +Y!.nrCells:=function(k) if k>EvaluateProperty(Y,"dimension") then return 0; fi; return Length(Filtered(Y!.boundaries[k+1],x->not x[1]=0)); end; @@ -219,7 +219,7 @@ else Y!.properties[cpos][2]:=dim; fi; -Y!.nrCells:=function(k); +Y!.nrCells:=function(k) if k>EvaluateProperty(Y,"dimension") then return 0; fi; return Length(Filtered(Y!.boundaries[k+1],x->not x[1]=0)); end; @@ -247,7 +247,7 @@ else Y!.properties[cpos][2]:=dim; fi; -Y!.nrCells:=function(k); +Y!.nrCells:=function(k) if k>EvaluateProperty(Y,"dimension") then return 0; fi; return Length(Filtered(Y!.boundaries[k+1],x->not x[1]=0)); end; @@ -264,13 +264,13 @@ end); ########################################################## ########################################################## InstallGlobalFunction(HAPRemoveVectorField, -function(Y); +function(Y) if Y!.vectorField=fail then return true; fi; Y!.vectorField:=fail; Y!.inverseVectorField:=fail; Y!.criticalCells:=fail; -Y!.nrCells:=function(k); +Y!.nrCells:=function(k) if k>EvaluateProperty(Y,"dimension") then return 0; fi; return Length(Filtered(Y!.boundaries[k+1],x->not x[1]=0)); end; diff --git a/lib/RegularCWComplexes/cocycle.gi b/lib/RegularCWComplexes/cocycle.gi index 75abb63c..f246c986 100644 --- a/lib/RegularCWComplexes/cocycle.gi +++ b/lib/RegularCWComplexes/cocycle.gi @@ -26,7 +26,7 @@ InstallMethod(IdentityMap, function(X) local map; -map:=function(n,k); +map:=function(n,k) return k; end; @@ -187,7 +187,7 @@ S:=ChainComplexOfRegularCWComplex(X); T:=S; #################### -mapT:=function(v,n); +mapT:=function(v,n) return v; end; #################### @@ -200,7 +200,7 @@ F:=Objectify(HapChainMap, properties:=[["characteristic", 0],["type","chainMap"]])); #################### -mapS:=function(v,n); +mapS:=function(v,n) return v; end; #################### @@ -661,7 +661,7 @@ end; ########################### if Cohomology(C,2)=[] then -cup:=function(a,b); return [0]; end; +cup:=function(a,b) return [0]; end; fi; ########################### diff --git a/lib/RegularCWComplexes/contractAlt.gi b/lib/RegularCWComplexes/contractAlt.gi index 6be2865e..03967aeb 100644 --- a/lib/RegularCWComplexes/contractAlt.gi +++ b/lib/RegularCWComplexes/contractAlt.gi @@ -90,7 +90,7 @@ if n>0 then Y!.coboundaries[n]:=LCoboundaries; fi; -Y!.nrCells:=function(k); +Y!.nrCells:=function(k) if k>EvaluateProperty(Y,"dimension") then return 0; fi; return Length(Filtered(Y!.boundaries[k+1],x->not x[1]=0)); end; diff --git a/lib/RegularCWComplexes/diagonal.gi b/lib/RegularCWComplexes/diagonal.gi index 226d0917..4d716434 100644 --- a/lib/RegularCWComplexes/diagonal.gi +++ b/lib/RegularCWComplexes/diagonal.gi @@ -163,7 +163,7 @@ end; ########################### ########################### -2CellDiagonal:=function(i); return CellDiagonal(2,i); end; +2CellDiagonal:=function(i) return CellDiagonal(2,i); end; ########################### ########################### diff --git a/lib/RegularCWComplexes/directproduct.gi b/lib/RegularCWComplexes/directproduct.gi index 3d483282..5367a00d 100644 --- a/lib/RegularCWComplexes/directproduct.gi +++ b/lib/RegularCWComplexes/directproduct.gi @@ -289,7 +289,7 @@ fp:=W!.secondProjection; fp:=fp!.mapping; ######################### -mapX:=function(n,i); +mapX:=function(n,i) return fp(n,mapW(n,i)); end; ######################### diff --git a/lib/RegularCWComplexes/elementaryCWConstructions.gi b/lib/RegularCWComplexes/elementaryCWConstructions.gi index 499ee7c3..19aee775 100644 --- a/lib/RegularCWComplexes/elementaryCWConstructions.gi +++ b/lib/RegularCWComplexes/elementaryCWConstructions.gi @@ -40,7 +40,7 @@ if Length(arg)>2 then b:=1*arg[3]; fi; ###### ########################### -NrCells:=function(n); +NrCells:=function(n) return Length(Y!.boundaries[n+1]); end; ########################### @@ -213,7 +213,7 @@ Add(bndX,[]); od; ###################### -perm0:=function(i); +perm0:=function(i) if i=v then return u; fi; if i[]); od; ##################################### -FiltDim:=function(t,d); +FiltDim:=function(t,d) if t<1 then return 0; else return Y!.filteredDimension(t,d); fi; diff --git a/lib/RegularCWComplexes/fundamental.gi b/lib/RegularCWComplexes/fundamental.gi index 1d0da237..d92b2326 100644 --- a/lib/RegularCWComplexes/fundamental.gi +++ b/lib/RegularCWComplexes/fundamental.gi @@ -345,7 +345,7 @@ end); InstallOtherMethod(FundamentalGroup, "for pure Regular CW-Maps", [IsHapRegularCWMap], -function(map); +function(map) return FundamentalGroupOfRegularCWMap(map); end); ########################################################## @@ -358,7 +358,7 @@ end); InstallOtherMethod(FundamentalGroup, "for pure Regular CW-Maps with specified base-point", [IsHapRegularCWMap,IsInt], -function(map,base); +function(map,base) return FundamentalGroupOfRegularCWMap(map,base); end); ########################################################## @@ -404,7 +404,7 @@ od; od; ######################### -map:=function(n,i); +map:=function(n,i) return 1*invperm[n+1][i]; end; ######################### diff --git a/lib/RegularCWComplexes/grannyknot.gi b/lib/RegularCWComplexes/grannyknot.gi index c5a64b52..82fef410 100644 --- a/lib/RegularCWComplexes/grannyknot.gi +++ b/lib/RegularCWComplexes/grannyknot.gi @@ -34,7 +34,7 @@ od; od; ########################## -ff:=function(n,i); +ff:=function(n,i) return WBcells[n+1][i]; end; ########################## diff --git a/lib/RegularCWComplexes/ldcup.gi b/lib/RegularCWComplexes/ldcup.gi index b16ac713..6a68d705 100644 --- a/lib/RegularCWComplexes/ldcup.gi +++ b/lib/RegularCWComplexes/ldcup.gi @@ -38,7 +38,7 @@ od; B:=[1..Length(H2)]; B:=Difference(B,A); -newcup:=function(x,y); +newcup:=function(x,y) return cup(x,y){B}; end; diff --git a/lib/RegularCWComplexes/piZero.gi b/lib/RegularCWComplexes/piZero.gi index c3e7ef13..595ae830 100644 --- a/lib/RegularCWComplexes/piZero.gi +++ b/lib/RegularCWComplexes/piZero.gi @@ -23,7 +23,7 @@ local T, cells, C, fn; if Dimension(Y)=0 then ########################### -fn:=function(i); +fn:=function(i) return i; end; ########################### @@ -38,7 +38,7 @@ cells:=List(cells,x->x[2]); C:=ChainComplex(T); ########################### -fn:=function(i); +fn:=function(i) return C!.deform(0,i)[1]; end; ########################### @@ -93,7 +93,7 @@ end); ################################################## ################################################## InstallGlobalFunction(DisplayDendrogramMat, -function(A,t,n); +function(A,t,n) DisplayDendrogram(DendrogramMat(A,t,n)); diff --git a/lib/RegularCWComplexes/planartrees.gi b/lib/RegularCWComplexes/planartrees.gi index dc0bd441..d248b05b 100644 --- a/lib/RegularCWComplexes/planartrees.gi +++ b/lib/RegularCWComplexes/planartrees.gi @@ -20,7 +20,7 @@ end); ############################################# ############################################# InstallGlobalFunction(HAP_PlanarTreeLeaves, -function(T); +function(T) return Difference([1..Length(T)],T); end); ############################################# diff --git a/lib/RegularCWComplexes/quotient.gi b/lib/RegularCWComplexes/quotient.gi index 61c107c4..349c3b76 100644 --- a/lib/RegularCWComplexes/quotient.gi +++ b/lib/RegularCWComplexes/quotient.gi @@ -63,7 +63,7 @@ SSBabs:=List(Babs,x->SSortedList(x)); dimsT:=List(SSBabs,x->Length(x)); ############################# -DimensionT:=function(n); +DimensionT:=function(n) if n<0 or n>Dimension(X) then return 0; fi; return dimsT[n+1]; end; diff --git a/lib/RegularCWComplexes/spin.gi b/lib/RegularCWComplexes/spin.gi index a29653fe..3aa2ddb9 100644 --- a/lib/RegularCWComplexes/spin.gi +++ b/lib/RegularCWComplexes/spin.gi @@ -123,7 +123,7 @@ bnd[n]:=bnd[n]{INDX[n]}; od; ########################### -pos:=function(n,i); +pos:=function(n,i) return Position(INDX[n],i); end; ########################### diff --git a/lib/RegularCWComplexes/universalCover.gi b/lib/RegularCWComplexes/universalCover.gi index 93825940..85680c37 100644 --- a/lib/RegularCWComplexes/universalCover.gi +++ b/lib/RegularCWComplexes/universalCover.gi @@ -147,7 +147,7 @@ dimU:=EvaluateProperty(U,"dimension"); ############################### -pair2int:=function(e,gH); +pair2int:=function(e,gH) return (e-1)*ind + gH; end; ############################### diff --git a/lib/Resolutions/coreducedRes.gi b/lib/Resolutions/coreducedRes.gi index 3de21c71..d2b21bd8 100644 --- a/lib/Resolutions/coreducedRes.gi +++ b/lib/Resolutions/coreducedRes.gi @@ -103,13 +103,13 @@ fi; ##################################################################### -action:=function(g,l); +action:=function(g,l) return [l[1],Position(Elts,Elts[g]*Elts[l[2]])]; end; ##################################################################### ##################################################################### -ActionInv:=function(g,l); +ActionInv:=function(g,l) return [l[1],Position(Elts,Elts[g]^-1*Elts[l[2]])]; end; ##################################################################### @@ -289,7 +289,7 @@ fi; ##################################### #################################################### -Dimension:=function(i); +Dimension:=function(i) if not i in [N,N+1] then return R!.dimension(i); fi; if i=N then return Length(PseudoBoundaryN); fi; return Length(PseudoBoundary); @@ -299,7 +299,7 @@ end; #################################################### -Boundary:=function(n,i); +Boundary:=function(n,i) if not n in [N,N+1,N+2] then return R!.boundary(n,i); fi; if i>0 then if n=N then return PseudoBoundaryN[i]; fi; @@ -318,7 +318,7 @@ end; #################################################### -Homotopy:=function(n,x); +Homotopy:=function(n,x) if not n in [N-1,N,N+1] then return R!.homotopy(n,x); fi; if x[1]>0 then if n=N-1 then return HmtpyNminus1[x[1]][x[2]]; fi; diff --git a/lib/Resolutions/resAspherical.gi b/lib/Resolutions/resAspherical.gi index 78c5a776..89991a76 100644 --- a/lib/Resolutions/resAspherical.gi +++ b/lib/Resolutions/resAspherical.gi @@ -42,7 +42,7 @@ od; fi; ##################################################################### -Dimension:=function(n); +Dimension:=function(n) if n=0 then return 1; fi; if n=1 then return Length(gensF); fi; @@ -83,7 +83,7 @@ Append(PseudoBoundary[2],[B]); od; ##################################################################### -Boundary:=function(n,i); +Boundary:=function(n,i) if n<1 or n>2 then return [ ]; fi; if i>0 then @@ -121,7 +121,7 @@ end; ##################################################################### ##################################################################### -Homotopy:=function(i,x); +Homotopy:=function(i,x) if SignInt(x[1])=1 then return HomotopyRecord(i,x); else return NegateWord(HomotopyRecord(i,x)); diff --git a/lib/Resolutions/resFiniteGroup.gi b/lib/Resolutions/resFiniteGroup.gi index 106b8364..0e45e9d5 100644 --- a/lib/Resolutions/resFiniteGroup.gi +++ b/lib/Resolutions/resFiniteGroup.gi @@ -119,7 +119,7 @@ Append(ExtendedElts,[1..N]); if Charact=0 then AlgebraicRed:=AlgebraicReduction; else - AlgebraicRed:=function(w); + AlgebraicRed:=function(w) return AlgebraicReduction(w,Charact); end; fi; @@ -128,7 +128,7 @@ if Order(G)<5096 then MT:=MultiplicationTable(Elts); ##################################################################### -action:=function(g,l); +action:=function(g,l) return [l[1],MT[g][l[2]]]; end; ##################################################################### @@ -136,7 +136,7 @@ end; else ##################################################################### -action:=function(g,l); +action:=function(g,l) return [l[1],Position(Elts,Elts[g]*Elts[l[2]])]; end; ##################################################################### @@ -145,7 +145,7 @@ fi; ##################################################################### -ChangeSign:=function(j,b); +ChangeSign:=function(j,b) if j>0 then return b; else return List(b,x->[-x[1],x[2]]); fi; end; @@ -173,7 +173,7 @@ ComputedContractions:=[]; ##################################################################### ##################################################################### -Dimension:=function(i); +Dimension:=function(i) if i<0 then return 0; fi; if i=0 then return 1; fi; return Length(PseudoBoundary[i]); @@ -181,7 +181,7 @@ end; ##################################################################### ##################################################################### -Boundary:=function(i,j); +Boundary:=function(i,j) if i<=0 then return []; else return ChangeSign(j,PseudoBoundary[i][AbsInt(j)]); fi; end; @@ -230,7 +230,7 @@ od; #return Random(temp); -LengthOfDiff:=function(p); +LengthOfDiff:=function(p) if DiffLengths[p[1]][p[2]]=0 then DiffLengths[p[1]][p[2]]:=Length(Differential(i,p)); fi;################### ##################################################Modified 5 Nov 2015####### @@ -247,7 +247,7 @@ end; ##################################################################### ##################################################################### -IsFinished:=function(MC); +IsFinished:=function(MC) if Product(Flat(MC)) = 1 then return true; else return false; fi; end; @@ -294,7 +294,7 @@ end; ##################################################################### ##################################################################### -Homotopy:=function(i,p); #It is useful to have a second name +Homotopy:=function(i,p) #It is useful to have a second name if i <0 then return fail; fi; #for Contraction with the correct indexing! return ChangeSign(-1,Contraction(i+1,p)); end; diff --git a/lib/Resolutions/resGeneric.gi b/lib/Resolutions/resGeneric.gi index 40a5bd9b..54940f8a 100644 --- a/lib/Resolutions/resGeneric.gi +++ b/lib/Resolutions/resGeneric.gi @@ -85,7 +85,7 @@ if IsMatrixGroup(G) then ###ABELIAN##### if IsAbelian(G) then ###### - fn:=function(g); + fn:=function(g) if Order(g)=infinity then return 0; else return Order(g); fi; diff --git a/lib/Resolutions/resInfSubgroup.gi b/lib/Resolutions/resInfSubgroup.gi index db807bd7..49d5f803 100644 --- a/lib/Resolutions/resInfSubgroup.gi +++ b/lib/Resolutions/resInfSubgroup.gi @@ -52,7 +52,7 @@ end; ##################################################################### ##################################################################### -Dimension:=function(n); +Dimension:=function(n) return sK*DimensionR(n); end; ##################################################################### diff --git a/lib/Resolutions/resSmallFpGroup.gi b/lib/Resolutions/resSmallFpGroup.gi index 109658eb..b2f3417d 100644 --- a/lib/Resolutions/resSmallFpGroup.gi +++ b/lib/Resolutions/resSmallFpGroup.gi @@ -523,7 +523,7 @@ return m; end; #*************************************************************** -Dimension:=function(n); +Dimension:=function(n) if n=0 then return 1; fi; if n=1 then return Length(GeneratorsOfGroup(G)); fi; if n= 2 then return Length(RelatorsOfFpGroup(G)); fi; @@ -610,7 +610,7 @@ end; IrinasRes:=Resolution(G,n); ##################################################################### -Dimension:=function(n); +Dimension:=function(n) if n=0 then return 1; fi; if n>2 or (not IsFpGroup(G)) then return Length(IrinasRes[n]); fi; if n=1 then return Length(GeneratorsOfGroup(G)); fi; diff --git a/lib/Resolutions/resSubgroup.gi b/lib/Resolutions/resSubgroup.gi index efa2b59e..cca96b46 100644 --- a/lib/Resolutions/resSubgroup.gi +++ b/lib/Resolutions/resSubgroup.gi @@ -45,7 +45,7 @@ sK:=Size(TransK); if FIN then ##################################################################### -Mult:=function(i,j); +Mult:=function(i,j) return Position(EltsG,TransK[i]*EltsG[j]); end; ##################################################################### @@ -73,7 +73,7 @@ end; fi; ##################################################################### -Dimension:=function(n); +Dimension:=function(n) return sK*DimensionR(n); end; ##################################################################### diff --git a/lib/Resolutions/tietzered.gi b/lib/Resolutions/tietzered.gi index a30bdd86..e26926b1 100644 --- a/lib/Resolutions/tietzered.gi +++ b/lib/Resolutions/tietzered.gi @@ -192,7 +192,7 @@ fi; ##################################### #################################################### -Dimension:=function(i); +Dimension:=function(i) if i<0 then return 0; fi; if not i in [N,N+1] then return R!.dimension(i); fi; if i=N then return Length(PseudoBoundaryN); fi; @@ -201,7 +201,7 @@ end; #################################################### #################################################### -Boundary:=function(n,i); +Boundary:=function(n,i) if not n in [N,N+1,N+2] then return R!.boundary(n,i); fi; if i>0 then if n=N then return 1*PseudoBoundaryN[i]; fi; diff --git a/lib/ResolutionsModP/poincare.gi b/lib/ResolutionsModP/poincare.gi index 3d62960d..c2da0188 100644 --- a/lib/ResolutionsModP/poincare.gi +++ b/lib/ResolutionsModP/poincare.gi @@ -248,7 +248,7 @@ P:=SylowSubgroup(G,p); R:=ResolutionPrimePowerGroup(P,n+1); #################################################################### -F:=function(R); +F:=function(R) return TensorWithIntegersModP(R,p); end; #################################################################### diff --git a/lib/ResolutionsModP/primepart.gi b/lib/ResolutionsModP/primepart.gi index a6789adb..6cf31092 100644 --- a/lib/ResolutionsModP/primepart.gi +++ b/lib/ResolutionsModP/primepart.gi @@ -186,7 +186,7 @@ P:=SylowSubgroup(G,p); R:=ResolutionPrimePowerGroup(P,n+1); #################################################################### -F:=function(R); +F:=function(R) return TensorWithIntegersModP(R,p); end; #################################################################### diff --git a/lib/ResolutionsModP/radical.gi b/lib/ResolutionsModP/radical.gi index 33ac9db3..1660a608 100644 --- a/lib/ResolutionsModP/radical.gi +++ b/lib/ResolutionsModP/radical.gi @@ -27,7 +27,7 @@ fi; one:=One(GF(prime)); ################### -Mult:=function(g,h); +Mult:=function(g,h) return Position(R!.elts,R!.elts[g]*R!.elts[h]); end; ################### @@ -49,14 +49,14 @@ invT:=T^-1; ################### ################### -Dimension:=function(n); +Dimension:=function(n) if n>Length(R) then return 0; fi; return ordG*R!.dimension(n); end; ################### ################### -FDimension:=function(k,n); +FDimension:=function(k,n) if n>Length(R) then return 0; fi; return FGdims[k]*R!.dimension(n); end; diff --git a/lib/ResolutionsModP/ranksPrimeGroup.gi b/lib/ResolutionsModP/ranksPrimeGroup.gi index 920e3a2f..19c79fdb 100644 --- a/lib/ResolutionsModP/ranksPrimeGroup.gi +++ b/lib/ResolutionsModP/ranksPrimeGroup.gi @@ -67,7 +67,7 @@ PseudoBoundaryAsVec[i]:=[]; od; ##################################################################### -Dimension:=function(i); +Dimension:=function(i) if i<0 then return 0; fi; if i=0 then return 1; fi; return DimList[i]; @@ -75,7 +75,7 @@ end; ##################################################################### ##################################################################### -Boundary:=function(i,j); +Boundary:=function(i,j) if i<=0 then return []; fi; if j>0 then return PseudoBoundary[i][j]; diff --git a/lib/ResolutionsModP/resPrimeGroup.gi b/lib/ResolutionsModP/resPrimeGroup.gi index e3734045..505de228 100644 --- a/lib/ResolutionsModP/resPrimeGroup.gi +++ b/lib/ResolutionsModP/resPrimeGroup.gi @@ -96,7 +96,7 @@ PseudoBoundaryAsVec[i]:=[]; od; ImageFBasis:=[1..n]; ##################################################################### -Dimension:=function(i); +Dimension:=function(i) if i<0 then return 0; fi; if i=0 then return 1; fi; if i<=n then return Length(PseudoBoundaryAsVec[i]); fi; @@ -105,7 +105,7 @@ end; ##################################################################### ##################################################################### -Boundary:=function(i,j); +Boundary:=function(i,j) if i<=0 then return []; fi; if j>0 then @@ -426,7 +426,7 @@ end; Toggle:=true; Toggle2:=true; ##################################################################### -SMBM:=function(m,w); +SMBM:=function(m,w) if Toggle then Echelonize(); Toggle:=false; fi; diff --git a/lib/ResolutionsModP/resPrimeGroupSparse.gi b/lib/ResolutionsModP/resPrimeGroupSparse.gi index 1702062a..1722d37f 100644 --- a/lib/ResolutionsModP/resPrimeGroupSparse.gi +++ b/lib/ResolutionsModP/resPrimeGroupSparse.gi @@ -94,7 +94,7 @@ PseudoBoundaryAsVec[i]:=[]; od; ImageFBasis:=[1..n]; ##################################################################### -Dimension:=function(i); +Dimension:=function(i) if i<0 then return 0; fi; if i=0 then return 1; fi; return Length(PseudoBoundaryAsVec[i]); @@ -102,7 +102,7 @@ end; ##################################################################### ##################################################################### -Boundary:=function(i,j); +Boundary:=function(i,j) if i<=0 then return []; fi; if j>0 then @@ -414,7 +414,7 @@ end; Toggle:=true; Toggle2:=true; ##################################################################### -SMBM:=function(m,w); +SMBM:=function(m,w) if Toggle then Echelonize(); Toggle:=false; fi; diff --git a/lib/Rings/cocycleChainMap.gi b/lib/Rings/cocycleChainMap.gi index b68f9ef2..4963f4ca 100644 --- a/lib/Rings/cocycleChainMap.gi +++ b/lib/Rings/cocycleChainMap.gi @@ -102,7 +102,7 @@ end; ##################################################################### ##################################################################### -ChainMap:=function(w); +ChainMap:=function(w) return map(w,n); end; ##################################################################### diff --git a/lib/SimplicialGroups/tensor2chains.gi b/lib/SimplicialGroups/tensor2chains.gi index 9c8e0714..7ce656a8 100644 --- a/lib/SimplicialGroups/tensor2chains.gi +++ b/lib/SimplicialGroups/tensor2chains.gi @@ -12,14 +12,14 @@ local Dimension,Boundary; ########################## Modified by Graham - rdim := function(n); + rdim := function(n) if n<0 or n> Length(R) then return 0; fi; return R!.dimension(n); end; ########################## rbound := R!.boundary; ########################## Modified by Graham - sdim := function(n); + sdim := function(n) if n<0 or n> Length(S) then return 0; fi; return S!.dimension(n); end; diff --git a/lib/Streams/HAPexport.gi b/lib/Streams/HAPexport.gi index f67c7d24..40416945 100644 --- a/lib/Streams/HAPexport.gi +++ b/lib/Streams/HAPexport.gi @@ -127,7 +127,7 @@ AppendTo(file,Dims); AppendTo(file,";\n\n"); AppendTo(file,"HAPTEMPORARYFUNCTION!.nrCells:="); -AppendTo(file,"function(n); if IsBound(DIMS[n+1]) then return DIMS[n+1]; fi; return 0; end;"); +AppendTo(file,"function(n) if IsBound(DIMS[n+1]) then return DIMS[n+1]; fi; return 0; end;"); AppendTo(file,";\n\n"); end); diff --git a/lib/Streams/HAPimport.gi b/lib/Streams/HAPimport.gi index cb3c2ecf..dad7dc08 100644 --- a/lib/Streams/HAPimport.gi +++ b/lib/Streams/HAPimport.gi @@ -36,7 +36,7 @@ if not IsList(R) then return R; fi; if not R.type=HapResolution then TryNextMethod(); fi; ##################################################################### -Dimension:=function(i); +Dimension:=function(i) if i<0 then return 0; fi; if i=0 then return 1; fi; return R.ranks[i+1]; @@ -44,21 +44,21 @@ end; ##################################################################### ##################################################################### -ChangeSign:=function(j,b); +ChangeSign:=function(j,b) if j>0 then return b; else return NegateWord(b); fi; end; ##################################################################### ##################################################################### -Boundary:=function(i,j); +Boundary:=function(i,j) if i=0 then return []; else return ChangeSign(j,R.boundaries[i][AbsoluteValue(j)]); fi; end; ##################################################################### ##################################################################### -Homotopy:=function(n,p); +Homotopy:=function(n,p) #if i <0 then return fail; fi; if p[1]>0 then return R.contracting_homotopy[n+1][p[1]][p[2]]; diff --git a/lib/Streams/streams.gi b/lib/Streams/streams.gi index e1fe3522..75e0c1db 100644 --- a/lib/Streams/streams.gi +++ b/lib/Streams/streams.gi @@ -205,7 +205,7 @@ end); ##################################################### ##################################################### InstallGlobalFunction(ChildReadEval, -function(s); +function(s) return EvalString(ChildRead(s)); end); ##################################################### @@ -683,7 +683,7 @@ for i in [1..Length(terms)-1] do od; for i in [1..Length(terms)-1] do - cmd1:="map:=function(n,j); return j; end;\n"; + cmd1:="map:=function(n,j) return j; end;\n"; cmd2:=Concatenation("cwmap:=Objectify( HapRegularCWMap, rec( source:=Y",String(terms[i]),", target:=YY",String(terms[i]),", mapping:=map));\n"); cmd3:="L:=ChainMapOfRegularCWMap(cwmap);\n"; cmd4:=Concatenation("Eq:=ChainComplexEquivalenceOfRegularCWComplex(Y",String(terms[i]),");\n"); diff --git a/lib/TorsionSubcomplexes/quotientcomplex.gi b/lib/TorsionSubcomplexes/quotientcomplex.gi index 8bc4bbf2..9df11d7d 100644 --- a/lib/TorsionSubcomplexes/quotientcomplex.gi +++ b/lib/TorsionSubcomplexes/quotientcomplex.gi @@ -113,7 +113,7 @@ local pTorsionSubcomplex, celldata, quotient, torsionCells, dims:=List([1..lnth+1],n->Length(quotient[n])); ################### - Dimension:=function(n); + Dimension:=function(n) if n>lnth then return 0; fi; return dims[n+1]; end; @@ -162,7 +162,7 @@ local pTorsionSubcomplex, celldata, quotient, torsionCells, G:=C!.group; #################### - Boundary:=function(n,k); + Boundary:=function(n,k) if k>0 then return boundaryList[n+1][k]; else @@ -172,7 +172,7 @@ local pTorsionSubcomplex, celldata, quotient, torsionCells, #################### #################### - Stabilizer:=function(n,k); + Stabilizer:=function(n,k) return StabilizerGroups[n+1][k]; end; #################### @@ -354,7 +354,7 @@ od; dims:=List([1..lnth+1],n->Length(data[n])); ################### - Dimension:=function(n); + Dimension:=function(n) if n>lnth then return 0; fi; return dims[n+1]; end; @@ -403,7 +403,7 @@ od; G:=C!.group; #################### - Boundary:=function(n,k); + Boundary:=function(n,k) if k>0 then return boundaryList[n+1][k]; else @@ -413,7 +413,7 @@ od; #################### #################### - Stabilizer:=function(n,k); + Stabilizer:=function(n,k) return StabilizerGroups[n+1][k]; end; #################### @@ -549,7 +549,7 @@ lnth:=Length(data)-1; dims:=List([1..lnth+1],n->Length(data[n])); ################### -Dimension:=function(n); +Dimension:=function(n) if n>lnth then return 0; fi; return dims[n+1]; end; @@ -599,7 +599,7 @@ od; G:=Group(Elts); #################### -Boundary:=function(n,k); +Boundary:=function(n,k) if k>0 then return boundaryList[n+1][k]; else @@ -609,7 +609,7 @@ end; #################### #################### -Stabilizer:=function(n,k); +Stabilizer:=function(n,k) return StabilizerGroups[n+1][k]; end; #################### diff --git a/lib/TorsionSubcomplexes/subdivision.gi b/lib/TorsionSubcomplexes/subdivision.gi index 52e35285..22929a3f 100644 --- a/lib/TorsionSubcomplexes/subdivision.gi +++ b/lib/TorsionSubcomplexes/subdivision.gi @@ -19,7 +19,7 @@ local NrCells,Properties; Properties:=[["dimension",dim]]; -NrCells:=function(n); +NrCells:=function(n) if n>dim then return 0; fi; return Length(Filtered(boundaries[n+1],x->not x[1]=0)); end; diff --git a/read.g b/read.g index fd9956e8..145c6da3 100644 --- a/read.g +++ b/read.g @@ -60,8 +60,8 @@ fi; ################# SIMPHOM COMMANDS ################################## if not IsPackageMarkedForLoading("homology","0.0") then -SMInvariantFactors:=function(M); return fail; end; -InfoHomology:=function(M); return fail; end; +SMInvariantFactors:=function(M) return fail; end; +InfoHomology:=function(M) return fail; end; else SetInfoLevel(InfoHomology,0); ReadPackageHap( "lib/Homology/probHomology.gi"); ReadPackageHap( "lib/Homology/sparseprobHomology.gi"); @@ -76,13 +76,13 @@ fi; ################# GAPDOC COMMANDS ####################################### #if not IsPackageMarkedForLoading("gapdoc","0.0") then -#MakeGAPDocDoc:=function(G); return fail; end; +#MakeGAPDocDoc:=function(G) return fail; end; #fi; ################# GAPDOC COMMANDS DONE ############################### ################# CONGRUENE COMMANDS ####################################### #if not IsPackageMarkedForLoading("congruence","0.0") then -#CongruenceSubgroupGamma0:=function(m); return fail; end; +#CongruenceSubgroupGamma0:=function(m) return fail; end; #fi; ################# CONGRUENCE COMMANDS DONE ############################### @@ -119,7 +119,7 @@ if IsPackageMarkedForLoading("aclib","1.1") then ReadPackageHap( "lib/Resolutions/resACgroup.gi"); ReadPackageHap( "lib/Resolutions/resACquotient.gi"); else -IsAlmostCrystallographic:=function(G); return fail; end; +IsAlmostCrystallographic:=function(G) return fail; end; fi; if IsPackageMarkedForLoading("nq","1.1") then ReadPackageHap( "lib/NonabelianTensor/epiNilGrp.gi"); diff --git a/tst/examples/1.2.6 b/tst/examples/1.2.6 index 8ca11153..ce53a74d 100644 --- a/tst/examples/1.2.6 +++ b/tst/examples/1.2.6 @@ -6,7 +6,7 @@ K:=Nerve(M);; XK:=RegularCWComplex(K); K1:=Nerve(M1);; XK1:=RegularCWComplex(K1); -Chi:=function(Y); +Chi:=function(Y) return List([0..Dimension(Y)],i->(-1)^i*Y!.nrCells(i)); end;; Print(Chi(XM),"\n"); diff --git a/tst/examples/1.3.4 b/tst/examples/1.3.4 index 2ceb70c3..bc49e339 100644 --- a/tst/examples/1.3.4 +++ b/tst/examples/1.3.4 @@ -5,7 +5,7 @@ dx:=EuclideanApproximatedMetric;; dz:=EuclideanApproximatedMetric;; L:=List(S,x->Maximum(List(S,y->dx(x,y))));; n:=Position(L,Minimum(L)); -f:=function(x); return [dx(S[n],x)]; end;; +f:=function(x) return [dx(S[n],x)]; end;; P:=30*[0..100];; P:=List(P, i->[i]);; r:=29;; epsilon:=75; diff --git a/tst/examples/1.3.5 b/tst/examples/1.3.5 index bf4c5492..7b1d7c2f 100644 --- a/tst/examples/1.3.5 +++ b/tst/examples/1.3.5 @@ -15,7 +15,7 @@ cluster:=function(S) end;; L:=List(S,v->Maximum(List(S,y->dx(v,y))));; n:=Position(L,Minimum(L));; -f:=function(x); return [dx(S[n],x)]; end;; +f:=function(x) return [dx(S[n],x)]; end;; M:=Mapper(S,dx,f,dz,P,r,cluster); Display(GraphOfSimplicialComplex(M)); diff --git a/tst/examples/4.3.2 b/tst/examples/4.3.2 index df02cd9e..6ebf5349 100644 --- a/tst/examples/4.3.2 +++ b/tst/examples/4.3.2 @@ -6,5 +6,5 @@ A:=CyclicGroup(32);; A:=TrivialGModuleAsGOuterGroup(G,A);; C:=HomToGModule(R,A);; H:=CohomologyModule(C,aut,3);; -act:=function(h,a); return H!.OuterAction(a^-1,h); end;; +act:=function(h,a) return H!.OuterAction(a^-1,h); end;; Print(Orbits(aut,H!.ActedGroup,act),"\n"); diff --git a/tst/examples/A.6.2 b/tst/examples/A.6.2 index b942d69b..3e010553 100644 --- a/tst/examples/A.6.2 +++ b/tst/examples/A.6.2 @@ -1,5 +1,5 @@ children:=List([1..8],i->ChildProcess());; -fn:=function(i); +fn:=function(i) return BogomolovMultiplier(SmallGroup(11^5,i)); end;; for s in children do diff --git a/tst/examples/A.6.3 b/tst/examples/A.6.3 index 6e5e573d..86db2c11 100644 --- a/tst/examples/A.6.3 +++ b/tst/examples/A.6.3 @@ -1,10 +1,10 @@ ######################################################## Bogo:=function(n,i,s,t) local fn1, fn2, cmd, r, B; -fn1:=function(n,i); +fn1:=function(n,i) return BogomolovMultiplier(SmallGroup(n,i),"standard"); end; -fn2:=function(n,i); +fn2:=function(n,i) return BogomolovMultiplier(SmallGroup(n,i),"homology"); end; ChildPut( fn1, "fn", s);; ChildPut( fn2, "fn", t);; diff --git a/tst/testall1/1.3.4.tst b/tst/testall1/1.3.4.tst index b0ffe1a0..0d789f5c 100644 --- a/tst/testall1/1.3.4.tst +++ b/tst/testall1/1.3.4.tst @@ -1,7 +1,7 @@ #D gap> START_TEST("HAP library"); gap> ReadPackage("HAP","tst/testall1/data134.txt");; -gap> f:=function(j); return D[50][j]; end; +gap> f:=function(j) return D[50][j]; end; function( j ) ... end gap> M:=Mapper(D,f,8,20,5); Simplicial complex of dimension 1. diff --git a/tst/testall1/1.99.2.tstx b/tst/testall1/1.99.2.tstx index 89cd29e5..4010f737 100644 --- a/tst/testall1/1.99.2.tstx +++ b/tst/testall1/1.99.2.tstx @@ -1,7 +1,7 @@ # gap> START_TEST("HAP library"); gap> children:=List([1..2],i->ChildProcess());; -gap> fn:=function(i); +gap> fn:=function(i) > return BogomolovMultiplier(SmallGroup(3^5,i)); > end;; gap> for s in children do diff --git a/tutorial/tutex/10.1.txt b/tutorial/tutex/10.1.txt index 98a6ecc9..9c6f9e15 100644 --- a/tutorial/tutex/10.1.txt +++ b/tutorial/tutex/10.1.txt @@ -1,5 +1,5 @@ gap> Processes:=List([1..15],i->ChildProcess());; -gap> fn:=function(i);return GroupHomology(SmallGroup(128,i),2);end;; +gap> fn:=function(i)return GroupHomology(SmallGroup(128,i),2);end;; gap> for p in Processes do > ChildPut(fn,"fn",p); > od; diff --git a/tutorial/tutex/11.21.txt b/tutorial/tutex/11.21.txt index f9a66cd0..10ef1dbe 100644 --- a/tutorial/tutex/11.21.txt +++ b/tutorial/tutex/11.21.txt @@ -3,7 +3,7 @@ gap> OQ:=RingOfIntegers(Q);; gap> N:=QuadraticIntegersByNorm(OQ,20000);; gap> ######################################### -gap> fn:=function(x); +gap> fn:=function(x) gap> if IsRat(x) then return x; fi; gap> return x!.rational+x!.irrational*Sqrt(-1); gap> end; diff --git a/tutorial/tutex/12.19.txt b/tutorial/tutex/12.19.txt index 6bdbe7c2..9960ed4f 100644 --- a/tutorial/tutex/12.19.txt +++ b/tutorial/tutex/12.19.txt @@ -1,4 +1,4 @@ -gap> invariant1:=function(m); +gap> invariant1:=function(m) > return List([1..3],k->Homology(m,k)); > end;; diff --git a/tutorial/tutex/3.8.txt b/tutorial/tutex/3.8.txt index 413f950f..197b52e0 100644 --- a/tutorial/tutex/3.8.txt +++ b/tutorial/tutex/3.8.txt @@ -10,7 +10,7 @@ gap> GeneratorsOfGroup(G); gap> RelatorsOfFpGroup(G); [ f2^-1*f1^-1*f2^-1*f1*f2*f1, f1^-1*f2^-1*f1^-1*f2*f1*f2 ] gap> hom:=GroupHomomorphismByImages(G,Group([[-1]]),[G.1,G.2],[[[-1]],[[-1]]]);; -gap> A:=function(x); return Determinant(Image(hom,x)); end;; +gap> A:=function(x) return Determinant(Image(hom,x)); end;; gap> D:=TensorWithTwistedIntegers(C,A); #Here the function A represents gap> #the integers with twisted action of G. Chain complex of length 3 in characteristic 0 . diff --git a/tutorial/tutex/4.4.txt b/tutorial/tutex/4.4.txt index 46192858..b2d5c83e 100644 --- a/tutorial/tutex/4.4.txt +++ b/tutorial/tutex/4.4.txt @@ -4,7 +4,7 @@ gap> dx:=EuclideanApproximatedMetric;; gap> dz:=EuclideanApproximatedMetric;; gap> L:=List(S,x->Maximum(List(S,y->dx(x,y))));; gap> n:=Position(L,Minimum(L));; -gap> f:=function(x); return [dx(S[n],x)]; end;; +gap> f:=function(x) return [dx(S[n],x)]; end;; gap> P:=30*[0..100];; P:=List(P, i->[i]);; gap> r:=29;; gap> epsilon:=75;; diff --git a/tutorial/tutex/6.15.txt b/tutorial/tutex/6.15.txt index 57b46e74..f32f6c4a 100644 --- a/tutorial/tutex/6.15.txt +++ b/tutorial/tutex/6.15.txt @@ -1,7 +1,7 @@ gap> G:=SymmetricGroup(6);; gap> A:=AbelianPcpGroup([0]);; -gap> alpha:=function(g,a); return a^SignPerm(g); end;; +gap> alpha:=function(g,a) return a^SignPerm(g); end;; gap> A:=GModuleAsGOuterGroup(G,A,alpha); ZG-module with abelian invariants [ 0 ] and G= SymmetricGroup( [ 1 .. 6 ] ) diff --git a/tutorial/tutex/6.16C.txt b/tutorial/tutex/6.16C.txt index b695a64f..d55caf97 100644 --- a/tutorial/tutex/6.16C.txt +++ b/tutorial/tutex/6.16C.txt @@ -1,6 +1,6 @@ gap> G:=AlternatingGroup(7);; gap> rho:=PermToMatrixGroup(G);; gap> R:=ResolutionFiniteGroup(SylowSubgroup(G,2),12);; -gap> F:=function(X); return TensorWithIntegralModule(X,rho); end;; +gap> F:=function(X) return TensorWithIntegralModule(X,rho); end;; gap> PrimePartDerivedFunctorViaSubgroupChain(G,R,F,11); [ 2, 2, 4 ] diff --git a/tutorial/tutex/6.16D.txt b/tutorial/tutex/6.16D.txt index 5fc867d2..da74105e 100644 --- a/tutorial/tutex/6.16D.txt +++ b/tutorial/tutex/6.16D.txt @@ -1,6 +1,6 @@ gap> G:=AlternatingGroup(10);; gap> rho:=PermToMatrixGroup(G);; gap> R:=ResolutionFiniteGroup(SylowSubgroup(G,2),4);; -gap> F:=function(X); return TensorWithIntegralModule(X,rho); end;; +gap> F:=function(X) return TensorWithIntegralModule(X,rho); end;; gap> PrimePartDerivedFunctorViaSubgroupChain(G,R,F,3); [ 4 ] diff --git a/tutorial/tutex/6.16E.txt b/tutorial/tutex/6.16E.txt index 891b7146..4eff407c 100644 --- a/tutorial/tutex/6.16E.txt +++ b/tutorial/tutex/6.16E.txt @@ -3,7 +3,7 @@ gap> rho:=IrreducibleRepresentations(G,GF(2))[3]; CompositionMapping( [ (5,7)(6,8), (2,3,5)(4,7,6) ] -> [ <an immutable 3x3 matrix over GF2>, <an immutable 3x3 matrix over GF2> ], <action isomorphism> ) -gap> F:=function(X); return TensorWithModPModule(X,rho); end;; +gap> F:=function(X) return TensorWithModPModule(X,rho); end;; gap> S:=ResolutionPrimePowerGroup(SylowSubgroup(G,2),101);; gap> PrimePartDerivedFunctorViaSubgroupChain(G,S,F,100); [ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, diff --git a/tutorial/tutex/6.24.txt b/tutorial/tutex/6.24.txt index b7b39948..3c0c9e8b 100644 --- a/tutorial/tutex/6.24.txt +++ b/tutorial/tutex/6.24.txt @@ -1,6 +1,6 @@ gap> sf:=Standard_f;; -gap> Test:=function(g,h,k,l); +gap> Test:=function(g,h,k,l) > return sf(h,k,l) - sf(g*h,k,l) + sf(g,h*k,l) - sf(g,h,k*l) + sf(g,h,k); > end; function( g, h, k, l ) ... end diff --git a/www/SideLinks/About/aboutBogomolov.html b/www/SideLinks/About/aboutBogomolov.html index 49565e0b..b9730b48 100644 --- a/www/SideLinks/About/aboutBogomolov.html +++ b/www/SideLinks/About/aboutBogomolov.html @@ -419,7 +419,7 @@

Some Theory

gap> children:=List([1..7],i->ChildProcess());;
-gap> fn:=function(i); return +gap> fn:=function(i) return BogomolovMultiplier(SmallGroup(11^5,i)); end;;
gap> for s in children do
> ChildPut(fn,"fn",s);
diff --git a/www/SideLinks/About/aboutCocycles.html b/www/SideLinks/About/aboutCocycles.html index 8acccd22..146c0e9e 100644 --- a/www/SideLinks/About/aboutCocycles.html +++ b/www/SideLinks/About/aboutCocycles.html @@ -235,7 +235,7 @@ style="vertical-align: top; background-color: rgb(255, 255, 204);">gap> sf:=Standard_f;;

-gap> Test:=function(g,h,k,l);
+gap> Test:=function(g,h,k,l)
> return sf(h,k,l) - sf(g*h,k,l) + sf(g,h*k,l) - sf(g,h,k*l) + sf(g,h,k);
> end;
diff --git a/www/SideLinks/About/aboutCoverinSpaces.html b/www/SideLinks/About/aboutCoverinSpaces.html index 2ce12ef3..411ccc9b 100644 --- a/www/SideLinks/About/aboutCoverinSpaces.html +++ b/www/SideLinks/About/aboutCoverinSpaces.html @@ -271,7 +271,7 @@

Cohomology with local coefficients

gap> RelatorsOfFpGroup(G);
[ f2^-1*f1^-1*f2^-1*f1*f2*f1, f1^-1*f2^-1*f1^-1*f2*f1*f2 ]
gap> hom:=GroupHomomorphismByImages(G,Group([[-1]]),[G.1,G.2],[[[-1]],[[-1]]]);;
-gap> A:=function(x); return Determinant(Image(hom,x)); end;;
+gap> A:=function(x) return Determinant(Image(hom,x)); end;;
gap> D:=TensorWithTwistedIntegers(C,A); #Here the function A represents the integers with twisted action of G.
Chain complex of length 3 in characteristic 0 .
gap> Homology(D,0);
diff --git a/www/SideLinks/About/aboutCoveringSpaces.html b/www/SideLinks/About/aboutCoveringSpaces.html index 5c148d00..6aa33c7a 100644 --- a/www/SideLinks/About/aboutCoveringSpaces.html +++ b/www/SideLinks/About/aboutCoveringSpaces.html @@ -144,7 +144,7 @@

Cohomology with local coefficients

gap> RelatorsOfFpGroup(G);
[ f2^-1*f1^-1*f2^-1*f1*f2*f1, f1^-1*f2^-1*f1^-1*f2*f1*f2 ]
gap> hom:=GroupHomomorphismByImages(G,Group([[-1]]),[G.1,G.2],[[[-1]],[[-1]]]);;
-gap> A:=function(x); return Determinant(Image(hom,x)); end;;
+gap> A:=function(x) return Determinant(Image(hom,x)); end;;
gap> D:=TensorWithTwistedIntegers(C,A); #Here the function A represents the integers with twisted action of G.
Chain complex of length 3 in characteristic 0 .
gap> Homology(D,0);
diff --git a/www/SideLinks/About/aboutParallel.html b/www/SideLinks/About/aboutParallel.html index 9c857a03..4a375a5f 100644 --- a/www/SideLinks/About/aboutParallel.html +++ b/www/SideLinks/About/aboutParallel.html @@ -112,7 +112,7 @@ style="vertical-align: top; background-color: rgb(255, 255, 204);">gap> s:=ChildProcess();;
gap> t:=ChildProcess();;
-gap> fn:=function(i);return +gap> fn:=function(i)return GroupHomology(SmallGroup(128,i),2);end;
gap> ChildPut( fn, "fn", s);
gap> ChildPut( fn, "fn", t);
diff --git a/www/SideLinks/About/aboutQuandles.html b/www/SideLinks/About/aboutQuandles.html index ea2ba838..d84401b1 100644 --- a/www/SideLinks/About/aboutQuandles.html +++ b/www/SideLinks/About/aboutQuandles.html @@ -462,7 +462,7 @@ > Add(L,PresentationKnotQuandleKnot(n,i));
> od; od;

-gap> inv:=function(K,n);
+gap> inv:=function(K,n)
> return List(ConnectedQuandles(n),x->PartitionedNumberOfHomomorphisms(K,x));
> end;;
diff --git a/www/SideLinks/About/aboutQuandles2.html b/www/SideLinks/About/aboutQuandles2.html index 74b903de..dd04a926 100644 --- a/www/SideLinks/About/aboutQuandles2.html +++ b/www/SideLinks/About/aboutQuandles2.html @@ -297,7 +297,7 @@ > Add(L,PresentationKnotQuandleKnot(n,i));
> od;od;
 
-gap> inv:=function(K,n); #A knot invariant
+gap> inv:=function(K,n) #A knot invariant
> return List(ConnectedQuandles(n),x->NumberOfHomomorphisms(K,x));
> end;;
gap> C:=Classify(L,K->inv(K,3));;
diff --git a/www/SideLinks/About/aboutSpaceGroup.html b/www/SideLinks/About/aboutSpaceGroup.html index d9b88e24..2dfc5e6a 100644 --- a/www/SideLinks/About/aboutSpaceGroup.html +++ b/www/SideLinks/About/aboutSpaceGroup.html @@ -162,7 +162,7 @@ gap> ################################

gap> GhomP:=GroupHomomorphismByFunction(G,P,GhomPfn);
-gap> PmapG:=function(MM); return MM; end;
+gap> PmapG:=function(MM) return MM; end;
diff --git a/www/SideLinks/About/aboutTwistedCoefficients.html b/www/SideLinks/About/aboutTwistedCoefficients.html index 38ff891b..52e9d975 100644 --- a/www/SideLinks/About/aboutTwistedCoefficients.html +++ b/www/SideLinks/About/aboutTwistedCoefficients.html @@ -192,7 +192,7 @@ gap>  P:=SylowSubgroup(G,5);;
gap>  R:=ResolutionFiniteGroup(P,15);;
-gap>  F:=function(R);return +gap>  F:=function(R)return TensorWithTwistedIntegersModP(R,5,SignPerm);end;;
gap>  PrimePartDerivedFunctor(G,R,F,12);
[ 5 ]