From 98891acb65469add0737bcf315b438010ef96a82 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Wed, 28 Aug 2024 23:10:09 +0100 Subject: [PATCH] Use AutoDoc to build documentation (#16) This gets rid of the metadata duplication in PackageInfo.g. Also remove extraneous newlines in XML sources that resulted in extra whitespace in the extracted .tst files. --- .gitignore | 1 + PackageInfo.g | 24 +++++++--- doc/cong.xml | 102 +++++++++++++++---------------------------- doc/farey.xml | 36 +++++---------- doc/gens.xml | 42 ++++++------------ doc/intro.xml | 6 +-- doc/manual.xml | 2 +- makedoc.g | 97 +++++----------------------------------- tst/congruence02.tst | 63 +++++++++++--------------- tst/congruence03.tst | 33 +++++++------- tst/congruence04.tst | 36 +++++++-------- 11 files changed, 150 insertions(+), 292 deletions(-) diff --git a/.gitignore b/.gitignore index 63cc691..641c2ee 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ doc/*.six doc/*.tex doc/*.toc doc/*.txt +doc/_*.xml /tmp/ /gh-pages/ diff --git a/PackageInfo.g b/PackageInfo.g index a6932c8..2bcc62c 100644 --- a/PackageInfo.g +++ b/PackageInfo.g @@ -15,11 +15,6 @@ Subtitle := "Congruence subgroups of SL(2,Integers)", Version := "1.2.6", Date := "23/03/2024", # dd/mm/yyyy format License := "GPL-2.0-or-later", -## <#GAPDoc Label="PKGVERSIONDATA"> -## -## -## -## <#/GAPDoc> SourceRepository := rec( Type := "git", @@ -122,5 +117,22 @@ Dependencies := rec( AvailabilityTest := ReturnTrue, TestFile := "tst/testall.g", -Keywords := ["congruence subgroup", "Farey symbol"] +Keywords := ["congruence subgroup", "Farey symbol"], + +AutoDoc := rec( + entities := rec( + VERSION := ~.Version, + RELEASEDATE := function(date) + local day, month, year, allMonths; + day := Int(date{[1,2]}); + month := Int(date{[4,5]}); + year := Int(date{[7..10]}); + allMonths := [ "January", "February", "March", "April", "May", "June", "July", + "August", "September", "October", "November", "December"]; + return Concatenation(String(day)," ", allMonths[month], " ", String(year)); + end(~.Date), + RELEASEYEAR := ~.Date{[7..10]}, + ), +), + )); diff --git a/doc/cong.xml b/doc/cong.xml index 468003d..cbdfa4e 100644 --- a/doc/cong.xml +++ b/doc/cong.xml @@ -14,8 +14,7 @@ canonical congruence subgroups). To start to work with the package, you need first to load it as follows: - - LoadPackage("congruence"); ----------------------------------------------------------------------------- Loading Congruence 1.2.6 (Congruence subgroups of SL(2,Integers)) @@ -31,8 +30,7 @@ Homepage: https://gap-packages.github.io/congruence Report issues at https://github.com/gap-packages/congruence/issues ----------------------------------------------------------------------------- true -]]> - +]]>
Construction of congruence subgroups @@ -68,8 +66,7 @@ where a,b,c,d are integers. - - G_8:=PrincipalCongruenceSubgroup(8); gap> IsGroup(G_8); @@ -90,8 +87,7 @@ gap> SL_2:=SL(2,Integers); SL(2,Integers) gap> IsSubgroup(SL_2,G_8); true -]]> - +]]> @@ -125,12 +121,10 @@ where a,b,c,d are integers. - - G0_4:=CongruenceSubgroupGamma0(4); -]]> - +]]> @@ -164,12 +158,10 @@ where a,b,c,d are integers. - - GU0_2:=CongruenceSubgroupGammaUpper0(2); -]]> - +]]> @@ -203,12 +195,10 @@ where a,b,c,d are integers. - - G1_6:=CongruenceSubgroupGamma1(6); -]]> - +]]> @@ -242,12 +232,10 @@ where a,b,c,d are integers. - - GU1_4:=CongruenceSubgroupGammaUpper1(4); -]]> - +]]> @@ -276,14 +264,12 @@ gap> GU1_4:=CongruenceSubgroupGammaUpper1(4); - - I:=IntersectionOfCongruenceSubgroups(G0_4,GU1_4); gap> J:=IntersectionOfCongruenceSubgroups(G0_4,G1_6); -]]> - +]]>
@@ -310,16 +296,14 @@ or not. - - IsPrincipalCongruenceSubgroup(G_8); true gap> IsPrincipalCongruenceSubgroup(G0_4); false gap> IsPrincipalCongruenceSubgroup(I); true -]]> - +]]> @@ -383,14 +367,12 @@ true - - IsIntersectionOfCongruenceSubgroups(I); false gap> IsIntersectionOfCongruenceSubgroups(J); true -]]> - +]]> @@ -410,8 +392,7 @@ number N such that G contains the principal congruence subgroup of level N. - - LevelOfCongruenceSubgroup(G_8); 8 gap> LevelOfCongruenceSubgroup(G1_6); @@ -420,8 +401,7 @@ gap> LevelOfCongruenceSubgroup(I); 4 gap> LevelOfCongruenceSubgroup(J); 12 -]]> - +]]> @@ -432,8 +412,7 @@ gap> LevelOfCongruenceSubgroup(J); - - IndexInSL2Z(G_8); 384 gap> G_2:=PrincipalCongruenceSubgroup(2); @@ -442,8 +421,7 @@ gap> IndexInSL2Z(G_2); 12 gap> IndexInSL2Z(GU1_4); 12 -]]> - +]]> IndexInSL2Z(GU1_4); - - DefiningCongruenceSubgroups(J); [ , ] @@ -472,8 +449,7 @@ gap> G:=IntersectionOfCongruenceSubgroups(Q,P); gap> DefiningCongruenceSubgroups(G); [ ] -]]> - +]]> @@ -500,14 +476,12 @@ available in &GAP;. - - Random(G_2) in G_2; true gap> Random(G_8,2) in G_8; true -]]> - +]]> @@ -519,14 +493,12 @@ true - - \in([ [ 21, 10 ], [ 2, 1 ] ],G_2); true gap> \in([ [ 21, 10 ], [ 2, 1 ] ],G_8); false -]]> - +]]> @@ -548,12 +520,10 @@ false - - CanEasilyCompareCongruenceSubgroups(G_8,I); false -]]> - +]]> - - IsSubset(G_2,G_8); true gap> IsSubset(G_8,G_2); @@ -584,8 +553,7 @@ gap> for g in g2 do [ false, false, true, false, true ] [ false, false, false, true, false ] [ false, false, false, false, true ] -]]> - +]]> @@ -598,12 +566,10 @@ gap> for g in g2 do - - Index(G_2,G_8); 32 -]]> - +]]> diff --git a/doc/farey.xml b/doc/farey.xml index 94da86a..6aed5e5 100644 --- a/doc/farey.xml +++ b/doc/farey.xml @@ -56,13 +56,11 @@ Attr="LabelsOfFareySymbol"/>. - - fs:=FareySymbolByData([infinity,0,1,2,infinity],[1,2,2,1]); [ infinity, 0, 1, 2, infinity ] [ 1, 2, 2, 1 ] -]]> - +]]> @@ -73,12 +71,10 @@ This function is used in to validate its output - - IsValidFareySymbol(fs); true -]]> - +]]> @@ -96,12 +92,10 @@ symbol. - - GeneralizedFareySequence(fs); [ infinity, 0, 1, 2, infinity ] -]]> - +]]> @@ -118,12 +112,10 @@ numerator. - - List([1..5], i -> NumeratorOfGFSElement(GeneralizedFareySequence(fs),i)); [ -1, 0, 1, 2, 1 ] -]]> - +]]> @@ -139,12 +131,10 @@ other ones returns the usual denominator. - - List([1..5], i -> DenominatorOfGFSElement(GeneralizedFareySequence(fs),i)); [ 0, 1, 1, 1, 0 ] -]]> - +]]> @@ -156,12 +146,10 @@ Returns the list of labels of the Farey symbol. This list has "odd", - - LabelsOfFareySymbol(fs); [ 1, 2, 2, 1 ] -]]> - +]]> diff --git a/doc/gens.xml b/doc/gens.xml index 41c50e3..828e690 100644 --- a/doc/gens.xml +++ b/doc/gens.xml @@ -27,8 +27,7 @@ for any matrix group for which a membership test is available. - - FareySymbol(PrincipalCongruenceSubgroup(8)); [ infinity, 0, 1/4, 1/3, 3/8, 2/5, 1/2, 3/5, 5/8, 2/3, 3/4, 1, 5/4, 4/3, 11/8, 7/5, 3/2, 8/5, 13/8, 5/3, 7/4, 2, 9/4, 7/3, 19/8, 12/5, 5/2, 13/5, @@ -43,8 +42,7 @@ gap> FareySymbol(CongruenceSubgroupGamma0(20)); [ infinity, 0, 1/5, 1/4, 2/7, 3/10, 1/3, 2/5, 1/2, 3/5, 2/3, 3/4, 4/5, 1, infinity ] [ 1, 3, 4, 6, 7, 7, 5, 2, 2, 3, 6, 4, 5, 1 ] -]]> - +]]> @@ -125,8 +123,7 @@ for each pair of free intervals [x_k,x_{k+1}] and - - H:=CongruenceSubgroupGamma0(5); gap> fs:=FareySymbol(H); @@ -136,8 +133,7 @@ gap> gfs:=GeneralizedFareySequence(fs); [ infinity, 0, 1/2, 1, infinity ] gap> MatrixByEvenInterval(gfs,2); [ [ 2, -1 ], [ 5, -2 ] ] -]]> - +]]> @@ -149,15 +145,13 @@ gap> MatrixByEvenInterval(gfs,2); - - fs_oo:=FareySymbolByData([infinity,0,infinity],["odd","odd"]);; gap> gfs_oo:=GeneralizedFareySequence(fs_oo); [ infinity, 0, infinity ] gap> MatrixByOddInterval(gfs_oo,1); [ [ -1, -1 ], [ 1, 0 ] ] -]]> - +]]> @@ -169,14 +163,12 @@ gap> MatrixByOddInterval(gfs_oo,1); - - fs_free:=FareySymbolByData([infinity,0,1,2,infinity],[1,2,2,1]);; gap> gfs_free:=GeneralizedFareySequence(fs_free);; gap> MatrixByFreePairOfIntervals(gfs_free,2,3); [ [ 3, -2 ], [ 2, -1 ] ] -]]> - +]]> @@ -188,8 +180,7 @@ gap> MatrixByFreePairOfIntervals(gfs_free,2,3); - - fs_eo:=FareySymbolByData([infinity,0,infinity],["even","odd"]);; gap> GeneratorsByFareySymbol(last); [ [ [ 0, -1 ], [ 1, 0 ] ], [ [ 0, -1 ], [ 1, -1 ] ] ] @@ -199,8 +190,7 @@ gap> GeneratorsByFareySymbol(fs_oo); [ [ [ -1, -1 ], [ 1, 0 ] ], [ [ 0, -1 ], [ 1, -1 ] ] ] gap> GeneratorsByFareySymbol(fs_free); [ [ [ 1, 2 ], [ 0, 1 ] ], [ [ 3, -2 ], [ 2, -1 ] ] ] -]]> - +]]> @@ -212,8 +202,7 @@ gap> GeneratorsByFareySymbol(fs_free); - - G:=PrincipalCongruenceSubgroup(2); gap> FareySymbol(G); @@ -237,8 +226,7 @@ gap> GeneratorsOfGroup(I); [ [ [ 1, 2 ], [ 0, 1 ] ], [ [ 11, -2 ], [ 6, -1 ] ], [ [ 19, -8 ], [ 12, -5 ] ], [ [ 17, -10 ], [ 12, -7 ] ], [ [ 7, -6 ], [ 6, -5 ] ] ] -]]> - +]]> @@ -259,16 +247,14 @@ number of odd intervals. - - IndexInPSL2ZByFareySymbol(fs); 6 gap> IndexInPSL2ZByFareySymbol(fs_oo); 2 gap> IndexInPSL2ZByFareySymbol(fs_free); 6 -]]> - +]]> diff --git a/doc/intro.xml b/doc/intro.xml index 911de8e..911c194 100644 --- a/doc/intro.xml +++ b/doc/intro.xml @@ -49,11 +49,9 @@ Installation of the package is standard and follows the guidelines from the After the package is installed, you can start &GAP; and load the &Congruence; package using the command: - - LoadPackage("congruence"); -]]> - +]]> diff --git a/doc/manual.xml b/doc/manual.xml index ce1a9d1..9057846 100644 --- a/doc/manual.xml +++ b/doc/manual.xml @@ -2,7 +2,7 @@ Congruence"> - <#Include Label="PKGVERSIONDATA"> + <#Include SYSTEM "_entities.xml"> ] > diff --git a/makedoc.g b/makedoc.g index e869832..b448169 100644 --- a/makedoc.g +++ b/makedoc.g @@ -4,89 +4,16 @@ ## ########################################################################### -ExtractMyManualExamples:=function( pkgname, main, files ) -local path, tst, i, s, basename, name, output, ch, a, location, pos, comment; -path:=Directory( - Concatenation(PackageInfo(pkgname)[1].InstallationPath, "/doc") ); -Print("Extracting manual examples for ", pkgname, " package ...\n" ); -tst:=ExtractExamples( path, main, files, "Chapter" ); -Print(Length(tst), " chapters detected\n"); -for i in [ 1 .. Length(tst) ] do - Print( "Chapter ", i, " : \c" ); - if Length( tst[i] ) > 0 then - s := String(i); - if Length(s)=1 then - # works for <100 chapters - s:=Concatenation("0",s); - fi; - basename:=Concatenation( LowercaseString(pkgname), s, ".tst" ); - name := Filename( - Directory( - Concatenation( PackageInfo(pkgname)[1].InstallationPath, - "/tst" ) ), basename ); - output := OutputTextFile( name, false ); # to empty the file first - SetPrintFormattingStatus( output, false ); # to avoid line breaks - ch := tst[i]; - AppendTo(output, "# ", pkgname, ", chapter ",i,"\n"); - AppendTo(output, "#\n", - "# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!\n", - "#\n", - "# This file has been autogenerated with GAP. It contains examples\n", - "# extracted from the documentation. Each example is preceded by the\n", - "# comment which points to the location of its source.\n", - "#\n"); - AppendTo(output, "gap> START_TEST( \"", basename, "\");\n\n"); - for a in ch do - location := a[2][1]; - pos := PositionSublist(LowercaseString(location),LowercaseString(pkgname)); - if pos <> fail then - comment := location{[ pos+Length(pkgname)+1 .. Length(location) ]}; - else - pos := PositionSublist(location,".//"); - comment := location{[ pos+3 .. Length(location) ]}; - fi; - AppendTo(output, "# ", comment, ":", a[2][2], "-", a[2][3], a[1]); - od; - AppendTo(output, "gap> STOP_TEST(\"", basename, "\", 1 );\n"); - Print("extracted ", Length(ch), " examples \n"); - else - Print("no examples \n" ); - fi; -od; -end; +if fail = LoadPackage("AutoDoc", ">= 2019.04.10") then + Error("AutoDoc 2019.04.10 or newer is required"); +fi; -########################################################################### - -CONGRUENCEMANUALFILES:=[ -"../PackageInfo.g" -]; - -MakeGAPDocDoc( "doc", # path to the directory containing the main file - "manual", # the name of the main file (without extension) - # list of (probably source code) files relative - # to path which contain pieces of documentation - # which must be included in the document - CONGRUENCEMANUALFILES, - "Congruence",# the name of the book used by GAP's online help - "../../..",# optional: relative path to the main GAP root - # directory to produce HTML files with relative - # paths to external books. - "MathJax" # optional: use "MathJax", "Tth" and/or "MathML" - # to produce additional variants of HTML files - );; - -# Copy the *.css and *.js files from the styles directory of the GAPDoc -# package into the directory containing the package manual. -CopyHTMLStyleFiles( "doc" ); - -# Create the manual.lab file which is needed if the main manuals or another -# package is referring to your package -GAPDocManualLab( "Congruence" );; - -ExtractMyManualExamples( "congruence", "manual.xml", CONGRUENCEMANUALFILES ); - -QUIT; -########################################################################### -## -#E -## +AutoDoc(rec( + scaffold := rec( + bib := "manual.bib", + MainPage := false, + TitlePage := false, + ), + extract_examples := rec( skip_empty_in_numbering := false ), + gapdoc := rec( main := "manual.xml" ), +)); diff --git a/tst/congruence02.tst b/tst/congruence02.tst index 2cfa260..b585b14 100644 --- a/tst/congruence02.tst +++ b/tst/congruence02.tst @@ -1,15 +1,16 @@ -# congruence, chapter 2 +# Congruence, chapter 2 # # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! # -# This file has been autogenerated with GAP. It contains examples -# extracted from the documentation. Each example is preceded by the -# comment which points to the location of its source. +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. # -gap> START_TEST( "congruence02.tst"); - -# doc/cong.xml:71-94 +gap> START_TEST("congruence02.tst"); +# doc/cong.xml:69-90 gap> G_8:=PrincipalCongruenceSubgroup(8); gap> IsGroup(G_8); @@ -31,35 +32,29 @@ SL(2,Integers) gap> IsSubgroup(SL_2,G_8); true -# doc/cong.xml:128-133 - +# doc/cong.xml:124-127 gap> G0_4:=CongruenceSubgroupGamma0(4); -# doc/cong.xml:167-172 - +# doc/cong.xml:161-164 gap> GU0_2:=CongruenceSubgroupGammaUpper0(2); -# doc/cong.xml:206-211 - +# doc/cong.xml:198-201 gap> G1_6:=CongruenceSubgroupGamma1(6); -# doc/cong.xml:245-250 - +# doc/cong.xml:235-238 gap> GU1_4:=CongruenceSubgroupGammaUpper1(4); -# doc/cong.xml:279-286 - +# doc/cong.xml:267-272 gap> I:=IntersectionOfCongruenceSubgroups(G0_4,GU1_4); gap> J:=IntersectionOfCongruenceSubgroups(G0_4,G1_6); -# doc/cong.xml:313-322 - +# doc/cong.xml:299-306 gap> IsPrincipalCongruenceSubgroup(G_8); true gap> IsPrincipalCongruenceSubgroup(G0_4); @@ -67,15 +62,13 @@ false gap> IsPrincipalCongruenceSubgroup(I); true -# doc/cong.xml:386-393 - +# doc/cong.xml:370-375 gap> IsIntersectionOfCongruenceSubgroups(I); false gap> IsIntersectionOfCongruenceSubgroups(J); true -# doc/cong.xml:413-424 - +# doc/cong.xml:395-404 gap> LevelOfCongruenceSubgroup(G_8); 8 gap> LevelOfCongruenceSubgroup(G1_6); @@ -85,8 +78,7 @@ gap> LevelOfCongruenceSubgroup(I); gap> LevelOfCongruenceSubgroup(J); 12 -# doc/cong.xml:435-446 - +# doc/cong.xml:415-424 gap> IndexInSL2Z(G_8); 384 gap> G_2:=PrincipalCongruenceSubgroup(2); @@ -96,8 +88,7 @@ gap> IndexInSL2Z(G_2); gap> IndexInSL2Z(GU1_4); 12 -# doc/cong.xml:462-476 - +# doc/cong.xml:440-452 gap> DefiningCongruenceSubgroups(J); [ , ] @@ -110,27 +101,23 @@ gap> G:=IntersectionOfCongruenceSubgroups(Q,P); gap> DefiningCongruenceSubgroups(G); [ ] -# doc/cong.xml:503-510 - +# doc/cong.xml:479-484 gap> Random(G_2) in G_2; true gap> Random(G_8,2) in G_8; true -# doc/cong.xml:522-529 - +# doc/cong.xml:496-501 gap> \in([ [ 21, 10 ], [ 2, 1 ] ],G_2); true gap> \in([ [ 21, 10 ], [ 2, 1 ] ],G_8); false -# doc/cong.xml:551-556 - +# doc/cong.xml:523-526 gap> CanEasilyCompareCongruenceSubgroups(G_8,I); false -# doc/cong.xml:570-588 - +# doc/cong.xml:540-556 gap> IsSubset(G_2,G_8); true gap> IsSubset(G_8,G_2); @@ -147,9 +134,9 @@ gap> for g in g2 do [ false, false, false, true, false ] [ false, false, false, false, true ] -# doc/cong.xml:601-606 - +# doc/cong.xml:569-572 gap> Index(G_2,G_8); 32 -gap> STOP_TEST("congruence02.tst", 1 ); +# +gap> STOP_TEST("congruence02.tst", 1); diff --git a/tst/congruence03.tst b/tst/congruence03.tst index 3c6e666..8b133ea 100644 --- a/tst/congruence03.tst +++ b/tst/congruence03.tst @@ -1,42 +1,39 @@ -# congruence, chapter 3 +# Congruence, chapter 3 # # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! # -# This file has been autogenerated with GAP. It contains examples -# extracted from the documentation. Each example is preceded by the -# comment which points to the location of its source. +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. # -gap> START_TEST( "congruence03.tst"); - -# doc/farey.xml:59-65 +gap> START_TEST("congruence03.tst"); +# doc/farey.xml:59-63 gap> fs:=FareySymbolByData([infinity,0,1,2,infinity],[1,2,2,1]); [ infinity, 0, 1, 2, infinity ] [ 1, 2, 2, 1 ] -# doc/farey.xml:76-81 - +# doc/farey.xml:74-77 gap> IsValidFareySymbol(fs); true -# doc/farey.xml:99-104 - +# doc/farey.xml:95-98 gap> GeneralizedFareySequence(fs); [ infinity, 0, 1, 2, infinity ] -# doc/farey.xml:121-126 - +# doc/farey.xml:115-118 gap> List([1..5], i -> NumeratorOfGFSElement(GeneralizedFareySequence(fs),i)); [ -1, 0, 1, 2, 1 ] -# doc/farey.xml:142-147 - +# doc/farey.xml:134-137 gap> List([1..5], i -> DenominatorOfGFSElement(GeneralizedFareySequence(fs),i)); [ 0, 1, 1, 1, 0 ] -# doc/farey.xml:159-164 - +# doc/farey.xml:149-152 gap> LabelsOfFareySymbol(fs); [ 1, 2, 2, 1 ] -gap> STOP_TEST("congruence03.tst", 1 ); +# +gap> STOP_TEST("congruence03.tst", 1); diff --git a/tst/congruence04.tst b/tst/congruence04.tst index 07a3410..9a8dcdd 100644 --- a/tst/congruence04.tst +++ b/tst/congruence04.tst @@ -1,15 +1,16 @@ -# congruence, chapter 4 +# Congruence, chapter 4 # # DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! # -# This file has been autogenerated with GAP. It contains examples -# extracted from the documentation. Each example is preceded by the -# comment which points to the location of its source. +# This file has been generated by AutoDoc. It contains examples extracted from +# the package documentation. Each example is preceded by a comment which gives +# the name of a GAPDoc XML file and a line range from which the example were +# taken. Note that the XML file in turn may have been generated by AutoDoc +# from some other input. # -gap> START_TEST( "congruence04.tst"); - -# doc/gens.xml:30-47 +gap> START_TEST("congruence04.tst"); +# doc/gens.xml:30-45 gap> FareySymbol(PrincipalCongruenceSubgroup(8)); [ infinity, 0, 1/4, 1/3, 3/8, 2/5, 1/2, 3/5, 5/8, 2/3, 3/4, 1, 5/4, 4/3, 11/8, 7/5, 3/2, 8/5, 13/8, 5/3, 7/4, 2, 9/4, 7/3, 19/8, 12/5, 5/2, 13/5, @@ -25,8 +26,7 @@ gap> FareySymbol(CongruenceSubgroupGamma0(20)); infinity ] [ 1, 3, 4, 6, 7, 7, 5, 2, 2, 3, 6, 4, 5, 1 ] -# doc/gens.xml:128-140 - +# doc/gens.xml:126-136 gap> H:=CongruenceSubgroupGamma0(5); gap> fs:=FareySymbol(H); @@ -37,23 +37,20 @@ gap> gfs:=GeneralizedFareySequence(fs); gap> MatrixByEvenInterval(gfs,2); [ [ 2, -1 ], [ 5, -2 ] ] -# doc/gens.xml:152-160 - +# doc/gens.xml:148-154 gap> fs_oo:=FareySymbolByData([infinity,0,infinity],["odd","odd"]);; gap> gfs_oo:=GeneralizedFareySequence(fs_oo); [ infinity, 0, infinity ] gap> MatrixByOddInterval(gfs_oo,1); [ [ -1, -1 ], [ 1, 0 ] ] -# doc/gens.xml:172-179 - +# doc/gens.xml:166-171 gap> fs_free:=FareySymbolByData([infinity,0,1,2,infinity],[1,2,2,1]);; gap> gfs_free:=GeneralizedFareySequence(fs_free);; gap> MatrixByFreePairOfIntervals(gfs_free,2,3); [ [ 3, -2 ], [ 2, -1 ] ] -# doc/gens.xml:191-203 - +# doc/gens.xml:183-193 gap> fs_eo:=FareySymbolByData([infinity,0,infinity],["even","odd"]);; gap> GeneratorsByFareySymbol(last); [ [ [ 0, -1 ], [ 1, 0 ] ], [ [ 0, -1 ], [ 1, -1 ] ] ] @@ -64,8 +61,7 @@ gap> GeneratorsByFareySymbol(fs_oo); gap> GeneratorsByFareySymbol(fs_free); [ [ [ 1, 2 ], [ 0, 1 ] ], [ [ 3, -2 ], [ 2, -1 ] ] ] -# doc/gens.xml:215-241 - +# doc/gens.xml:205-229 gap> G:=PrincipalCongruenceSubgroup(2); gap> FareySymbol(G); @@ -90,8 +86,7 @@ gap> GeneratorsOfGroup(I); [ [ 19, -8 ], [ 12, -5 ] ], [ [ 17, -10 ], [ 12, -7 ] ], [ [ 7, -6 ], [ 6, -5 ] ] ] -# doc/gens.xml:262-271 - +# doc/gens.xml:250-257 gap> IndexInPSL2ZByFareySymbol(fs); 6 gap> IndexInPSL2ZByFareySymbol(fs_oo); @@ -99,4 +94,5 @@ gap> IndexInPSL2ZByFareySymbol(fs_oo); gap> IndexInPSL2ZByFareySymbol(fs_free); 6 -gap> STOP_TEST("congruence04.tst", 1 ); +# +gap> STOP_TEST("congruence04.tst", 1);