\\ --------------- GP code ------------------------------------------------------------ \\ Bianchi.gp \\ \\ Description: Compute the quotient of Hyperbolic Space by PSL_2 of imaginary \\ quadratic number fields \\ \\ \\ Author: Alexander D. Rahm \\ \\ Copyright (C) 2010 by Alexander D. Rahm. \\ Bianchi.gp is a free software covered by the GNU General Public License. \\ Version 1.0.0 of October 29th, 2010. \\--------------------------------------------------------------------------------------- global( logfile, K, x, m, mIs3mod4, w, numberOfLines:small, maxNeighboursNumber:small, totalPointSet, pointsOfSphere, pointsOfLine, edgesList:list=List([]), twoCellSupport:list=List([]), sphereCenter, radiusSquare, neighbours, linesOfSphere, stabilizer, edgeStabilizer, vertexIdentifications, edgesOf2cell, EdgeOrigin, EdgeEnd, vertexOrbitNumber, vertexOrbitRepresentative, numberOfVertexOrbits:small, edgeIdentifications, numberOfEdgeOrbits:small, edgeOrbitNumber, edgeOrbitRepresentative, Mu:list=List([]),Lambda:list=List([]), numberOfSpheres:small, cornersOf2cell, deleteFlag:list=List([]), numberOf2cells, deleteCellFlag, boundaryMatrix, boundaryMap, numberOfTwoCells, CellBoundaryMatrix, singularpoint:list=List([]), singularDenominator:list=List([]), classNumber, EdgeTwoDim, edge2Label:list, EdgeThreeDim, edge3Label:list); allocatemem(64000000); print("\n Loading the script Bianchi.gp :"); print("Program for the computation of the quotient of hyperbolic three-space"); print("by the Bianchi groups PSL_2(R), R a ring of imaginary quadratic integers.") print("\n Copyright (C) 2010 by Alexander D. Rahm. \n Bianchi.gp is a free software covered by the GNU General Public License."); print(" Version 1.0.0 of October 29th, 2010. \n"); print("The program is started with the command Start(m), \n","where m has to be chosen amongst the positive square-free integers."); print("The imaginary quadratic number field K is then defined as the field of the"); print("rational numbers extended by x with x^2 = -m, and R is its ring of integers."); read("Bianchi-common_procedures_and_diagnosis.gp"); read("Bianchi-Fundamental_Polyhedron_functions.gp"); read("Bianchi-Fundamental_Polyhedron_procedures.gp"); read("Bianchi-orbit_space_functions.gp"); read("Bianchi-orbit_space_procedures.gp"); read("Bianchi-group_homology.gp"); read("Bianchi-output.gp"); Start(mInput) = /* User call of the main program. */{ m = mInput; if( issquarefree(m), MainProgram(); print("\n","To save the computed data in backup files in the current folder, type the command BackUp()"); print("To output a selection of the obtained information in .tex files, type the command OutputFiles()"); ,/* else */ print(m,"=m is not squarefree. ", "We would get a subgroup of the Bianchi group for m/(squares in m)."); ); }; /* end of the program Bianchi.gp. */ fdomain(mInput) = /* Call the main program, output and backup. */{ m = mInput; if (issquarefree(m), MainProgram(); if ( m >= 10, /* Create backup files for the computed data. */ BackUp( "record"); ); OutputFiles(); ,/* else */ print(m,"=m is not squarefree. ", "We would get a subgroup of the Bianchi group for m/(squares in m).") ); }; /* end of the program Bianchi.gp. */ MainProgram() = { gettime(); logfile = " "; initializeNumberField(m); getSingularPoints(); getFundamentalDomain(); if ( mIs3mod4 == 0, /* m not congruent to 3 mod 4 */ compareHeights(3); createLines(); getVertices(); prepareSpuriousCellFissionNot3mod4(); compareHeights(0); removePoints(); removeLines(); logfile = Str( logfile,"m=",m," Cell structure found in ",gettime()," milliseconds."); ComputeOrbitSpaceNot3mod4(); ,/* else m congruent 3 mod 4 */ compareHeights(1); createLines(); getVertices(); removePoints(); removeLines(); compareHeights(2); createLines(); getVertices(); compareHeights(3); createLines(); getVertices(); prepareSpuriousCellFission(); compareHeights(0); prepareDivideOutAssociatedMatrices(); removePoints(); removeLines(); logfile = Str( logfile, "m=",m," Cell structure found in ",gettime()," milliseconds."); ComputeOrbitSpace3mod4(); ); logfile = Str( logfile,"m=",m," orbit space found in ",gettime()," milliseconds."); logfile = Str( logfile, "m=",m," gives ", length(edgesList)," edges and ", length(totalPointSet), " vertices in the base rectangle."); if( m!= 1 && m != 3, ComputeGroupHomology(); ); }; /* end of the main program of Bianchi.gp. */ initializeNumberField( mInput=m) = { m = mInput; if (m<0, error("m negative. Want to use Q[sqrt(-m)]")); /* Define the number field K globally. */ K = nfinit( x^2 +m); w = nfbasistoalg(K, [0,1]~); mIs3mod4 = (Mod(m,4) == Mod(3,4)); classNumber = qfbclassno(K.disc); print("Starting the computation of the Floege PSL_2(Z[w])-cellular complex, with w = ",w,"."); if ( mIs3mod4, if( w != Mod(1/2*x - 1/2, x^2 + m), error(Str("Base should be chosen such that w = ", Mod(1/2*x -1/2, x^2+ m), ". Please use version 2.4.3 or higher of Pari/GP for the case m =",m,".")); ); ); }; /* end of the procedure initializeNumberField. */ BackUp( mode="record") = { local( namesOfVariables); namesOfVariables = [ "numberOfLines", " maxNeighboursNumber", "totalPointSet", "pointsOfSphere", " pointsOfLine", " edgesList", " sphereCenter", "radiusSquare", " neighbours", " linesOfSphere", " stabilizer", "edgeStabilizer", "vertexIdentifications", " edgesOf2cell", " EdgeOrigin","EdgeEnd", "vertexOrbitNumber", " vertexOrbitRepresentative", "numberOfVertexOrbits", "edgeIdentifications", "numberOfEdgeOrbits", " edgeOrbitNumber", "edgeOrbitRepresentative", "Mu", "Lambda", " numberOfSpheres", "numberOf2cells", "twoCellSupport", "cornersOf2cell", "deleteFlag", "deleteCellFlag", "boundaryMatrix", " boundaryMap", " numberOfTwoCells", "CellBoundaryMatrix", "singularpoint", " singularDenominator"]; if( mode == "record", for( j = 1, length( namesOfVariables), write( Str( "m=", m, namesOfVariables[j], ".txt"), eval(namesOfVariables[j]) ); ); ); if( type(mode) == "t_INT", m = mode; initializeNumberField(m); getSingularPoints(); for( j = 1, length( namesOfVariables), /*Attention, do not try to read new variables which are not yet recorded. */ eval( Str( namesOfVariables[j], "=", read( Str( "m=", m, namesOfVariables[j], ".txt")) ) ); ); print("You can now use the command ComputeGroupHomology()"); ); }; addhelp(BackUp, "To load data for the case m which is stored in the current folder, type BackUp(m)"); /* end of procedure BackUp. */