diff --git a/lib/local.gd b/lib/local.gd index f57d8f5..ced98e7 100644 --- a/lib/local.gd +++ b/lib/local.gd @@ -135,7 +135,7 @@ DeclareAttribute( "UnitsOfNearRing", IsNearRing ); #! (f1*f3*f4*f5), (f1*f2), (f1*f2*f5), (f1*f2*f4), (f1*f2*f4*f5), (f1*f2*f3), #! (f1*f2*f3*f5), (f1*f2*f3*f4), (f1*f2*f3*f4*f5) ] #! gap> Un:=NearRingUnits(N);; -#! U=Un; +#! gap> U=Un; #! true #! @EndExample @@ -208,7 +208,7 @@ DeclareAttribute( "NearRingNonUnits", IsNearRing ); #! gap> R:=LibraryNearRing(SmallGroup(8,4),3); #! #I using isomorphic copy of the group #! LibraryNearRing(8/5, 3) -#! gap> N:=NearRingNonUnits(R); +#! gap> N:=SortedList(NearRingNonUnits(R)); #! [ (()), ((1,2,3,4)(5,6,7,8)), ((1,3)(2,4)(5,7)(6,8)), ((1,4,3,2)(5,8,7,6)), #! ((1,5,3,7)(2,8,4,6)), ((1,6,3,8)(2,5,4,7)), ((1,7,3,5)(2,6,4,8)), #! ((1,8,3,6)(2,7,4,5)) ] @@ -582,8 +582,7 @@ DeclareOperation( "IsSubNearRing",[ IsNearRing, IsGroup ] ); #! true #! gap> IsSubNearRing(T,S[9]); #! false -#! gap> D:=SmallGroup(7,1); -#! +#! gap> D:=SmallGroup(7,1);; #! gap> IsSubNearRing(T,D); #! false #! @EndExample diff --git a/makedoc.g b/makedoc.g index 15c62bb..1e86628 100644 --- a/makedoc.g +++ b/makedoc.g @@ -2,6 +2,7 @@ LoadPackage("AutoDoc"); AutoDoc(rec( scaffold := true, + extract_examples := true, autodoc := rec( scan_dirs := [ "lib" ], ), diff --git a/tst/chapter1.tst b/tst/localnr01.tst similarity index 52% rename from tst/chapter1.tst rename to tst/localnr01.tst index b705ee1..400223c 100644 --- a/tst/chapter1.tst +++ b/tst/localnr01.tst @@ -1,23 +1,21 @@ -## To create a test file, place GAP prompts, input and output exactly as -## they must appear in the GAP session. Do not remove lines containing -## START_TEST and STOP_TEST statements. -## -## The first line starts the test. START_TEST reinitializes the caches and -## the global random number generator, in order to be independent of the -## reading order of several test files. Furthermore, the assertion level -## is set to 2 by START_TEST and set back to the previous value in the -## subsequent STOP_TEST call. -## -## The argument of STOP_TEST may be an arbitrary identifier string. -## -gap> START_TEST("LocalNR package: man-examples.tst"); - -# Note that you may use comments in the test file -# and also separate parts of the test by empty lines +# LocalNR, chapter 1 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# 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("localnr01.tst"); +# doc/_Chapter_Local_nearrings.xml:56-60 gap> List(TheAdditiveGroupsOfLibraryOfLNRsOfOrder(81),IdGroup); [ [ 81, 1 ], [ 81, 2 ], [ 81, 3 ], [ 81, 5 ], [ 81, 6 ], [ 81, 11 ], [ 81, 12 ], [ 81, 13 ], [ 81, 15 ] ] + +# doc/_Chapter_Local_nearrings.xml:76-85 gap> G:=SmallGroup(81,2); gap> TheLibraryOfLNRsOnGroup(G); @@ -26,6 +24,26 @@ gap> TheLibraryOfLNRsOnGroup(G); "AllLocalNearRings(81,2,54,11)", "AllLocalNearRings(81,2,54,15)", "AllLocalNearRings(81,2,72,14)", "AllLocalNearRings(81,2,72,19)", "AllLocalNearRings(81,2,72,24)", "AllLocalNearRings(81,2,72,26)" ] + +# doc/_Chapter_Local_nearrings.xml:101-105 +gap> L:=LocalNearRing(81,12,54,8,3); +ExplicitMultiplicationNearRing ( , multiplication ) + +# doc/_Chapter_Local_nearrings.xml:120-124 +gap> L:=AllLocalNearRings(81,12,54,8);; +gap> Size(L); +30 + +# doc/_Chapter_Local_nearrings.xml:140-147 +gap> G:=SmallGroup(25,2); + +gap> IsAdditiveGroupOfLibraryOfLNRs(G); +true +gap> IsAdditiveGroupOfLibraryOfLNRs(SmallGroup(81,14)); +false + +# doc/_Chapter_Local_nearrings.xml:162-171 gap> InfoLocalNearRing(SmallGroup(361,2)); The local nearrings are sorted by their multiplicative groups. [ "AllLocalNearRings(361,2,342,1) (2)", "AllLocalNearRings(361,2,342,2) (2)", \ @@ -34,20 +52,6 @@ The local nearrings are sorted by their multiplicative groups. "AllLocalNearRings(361,2,342,8) (6)", "AllLocalNearRings(361,2,360,4) (1)", "AllLocalNearRings(361,2,360,15) (1)"\ ] -gap> InfoLocalNearRing(SmallGroup(49,1)); -[ "AllLocalNearRings(49,1,42,6) (1)" ] -gap> G:=SmallGroup(25,2); - -gap> IsAdditiveGroupOfLibraryOfLNRs(G); -true -gap> IsAdditiveGroupOfLibraryOfLNRs(SmallGroup(81,14)); -false - - -## Each test file should finish with the call of STOP_TEST. -## The argument of STOP_TEST should be the name of the test file. -gap> STOP_TEST( "man-examples.tst" ); -############################################################################# -## -#E +# +gap> STOP_TEST("localnr01.tst", 1); diff --git a/tst/chapter2.tst b/tst/localnr02.tst similarity index 70% rename from tst/chapter2.tst rename to tst/localnr02.tst index 44e3653..8459204 100644 --- a/tst/chapter2.tst +++ b/tst/localnr02.tst @@ -1,20 +1,16 @@ -## To create a test file, place GAP prompts, input and output exactly as -## they must appear in the GAP session. Do not remove lines containing -## START_TEST and STOP_TEST statements. -## -## The first line starts the test. START_TEST reinitializes the caches and -## the global random number generator, in order to be independent of the -## reading order of several test files. Furthermore, the assertion level -## is set to 2 by START_TEST and set back to the previous value in the -## subsequent STOP_TEST call. -## -## The argument of STOP_TEST may be an arbitrary identifier string. -## -gap> START_TEST("LocalNR package: man-examples.tst"); - -# Note that you may use comments in the test file -# and also separate parts of the test by empty lines +# LocalNR, chapter 2 +# +# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD! +# +# 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("localnr02.tst"); +# doc/_Chapter_Functions.xml:25-36 gap> H:=SmallGroup(120,4); gap> IsMinimalNonAbelianGroup(H); @@ -23,18 +19,18 @@ gap> K:=SmallGroup(16,6); gap> IsMinimalNonAbelianGroup(K); true +gap> IsMinimalNonAbelianGroup(SmallGroup(16,8)); +false + +# doc/_Chapter_Functions.xml:51-58 gap> IsMetacyclicPGroup(K); true -gap> Q:=SmallGroup(16,8); - -gap> IsMinimalNonAbelianGroup(Q); -false -gap> S:=SmallGroup(81,4); - -gap> IsMetacyclicPGroup(S); +gap> IsMetacyclicPGroup(SmallGroup(81,4)); true gap> IsMetacyclicPGroup(SmallGroup(81,15)); false + +# doc/_Chapter_Functions.xml:72-80 gap> D:=SmallGroup(81,2); gap> T:=EndoOrbitsOfGroup(D);; @@ -42,20 +38,24 @@ gap> Length(T); 1 gap> Size(T[1][2]); 81 + +# doc/_Chapter_Functions.xml:100-103 gap> IsEndoCyclicGroup(D); true -gap> N:=LocalNearRing(49,2,42,2,2); -ExplicitMultiplicationNearRing ( , multiplication ) + +# doc/_Chapter_Functions.xml:124-135 +gap> N:=LocalNearRing(32,5,16,3,8); +ExplicitMultiplicationNearRing ( , multiplication ) gap> U:=UnitsOfNearRing(N); -[ (f1), (f1*f2), (f1*f2^2), (f1*f2^3), (f1*f2^4), (f1*f2^5), (f1*f2^6), (f1^2), (f1^2*f2), - (f1^2*f2^2), (f1^2*f2^3), (f1^2*f2^4), (f1^2*f2^5), (f1^2*f2^6), (f1^3), (f1^3*f2), - (f1^3*f2^2), (f1^3*f2^3), (f1^3*f2^4), (f1^3*f2^5), (f1^3*f2^6), (f1^4), (f1^4*f2), - (f1^4*f2^2), (f1^4*f2^3), (f1^4*f2^4), (f1^4*f2^5), (f1^4*f2^6), (f1^5), (f1^5*f2), - (f1^5*f2^2), (f1^5*f2^3), (f1^5*f2^4), (f1^5*f2^5), (f1^5*f2^6), (f1^6), (f1^6*f2), - (f1^6*f2^2), (f1^6*f2^3), (f1^6*f2^4), (f1^6*f2^5), (f1^6*f2^6) ] +[ (f1), (f1*f5), (f1*f4), (f1*f4*f5), (f1*f3), (f1*f3*f5), (f1*f3*f4), + (f1*f3*f4*f5), (f1*f2), (f1*f2*f5), (f1*f2*f4), (f1*f2*f4*f5), (f1*f2*f3), + (f1*f2*f3*f5), (f1*f2*f3*f4), (f1*f2*f3*f4*f5) ] gap> Un:=NearRingUnits(N);; gap> U=Un; true + +# doc/_Chapter_Functions.xml:150-164 gap> H:=SmallGroup(16,6); gap> A:= AutomorphismNearRing(H); @@ -69,11 +69,16 @@ gap> K:=LibraryNearRingWithOne(SmallGroup(8,2),1); LibraryNearRing(8/2, 814) gap> IsLocalNearRing(K); false + +# doc/_Chapter_Functions.xml:179-186 gap> L:=AllLocalNearRings(16,14,8,4);; gap> Size(L); 24 -gap> F:=Filtered(L,x->IsLocalRing(x)); -[ ExplicitMultiplicationNearRing ( , multiplication ) ] +gap> F:=Filtered(L,x->IsLocalRing(x));; +gap> Size(F); +1 + +# doc/_Chapter_Functions.xml:200-215 gap> T:=LocalNearRing(49,2,42,1,1); ExplicitMultiplicationNearRing ( , multiplication ) @@ -84,23 +89,26 @@ gap> Size(Nu); gap> R:=LibraryNearRing(SmallGroup(8,4),3); #I using isomorphic copy of the group LibraryNearRing(8/5, 3) -gap> N:=NearRingNonUnits(R);; -gap> Size(N); -8 +gap> N:=SortedList(NearRingNonUnits(R)); +[ (()), ((1,2,3,4)(5,6,7,8)), ((1,3)(2,4)(5,7)(6,8)), ((1,4,3,2)(5,8,7,6)), + ((1,5,3,7)(2,8,4,6)), ((1,6,3,8)(2,5,4,7)), ((1,7,3,5)(2,6,4,8)), + ((1,8,3,6)(2,7,4,5)) ] + +# doc/_Chapter_Functions.xml:229-242 gap> B:=LocalNearRing(25,2,20,3,1); ExplicitMultiplicationNearRing ( , multiplication ) -gap> D:=DistributiveElements(B); -[ ( of ...), (f1), (f1^2), (f1^3), (f1^4) ] +gap> D:=DistributiveElements(B);; gap> Size(D); 5 -gap> Rs:=SubNearRingByGenerators(B,D); -ExplicitMultiplicationNearRing ( Group([ of ..., f1, f1^2, f1^3, f1^4 ]) , multiplication ) +gap> Rs:=SubNearRingByGenerators(B,D);; gap> Size(Rs); 5 gap> IsDgNearRing(B); false gap> IsDgNearRing(Rs); true + +# doc/_Chapter_Functions.xml:256-266 gap> T:=LocalNearRing(125,4,100,9,1); ExplicitMultiplicationNearRing ( , multiplication ) @@ -110,20 +118,28 @@ Group([ of ..., f2, f3, f2^2, f2*f3, f3^2, f2^3, f2^2*f3, f2*f3^2, f3 f2^3*f3^3, f2^2*f3^4, f2^4*f3^3, f2^3*f3^4, f2^4*f3^4 ]) gap> IdGroup(L); [ 25, 2 ] + +# doc/_Chapter_Functions.xml:280-285 gap> I:=NonUnitsAsNearRingIdeal(T); < nearring ideal > gap> Size(I); 25 + +# doc/_Chapter_Functions.xml:299-306 gap> B:=LocalNearRing(16,10,8,2,7);; gap> M:=MultiplicativeSemigroupOfNearRing(B); Semigroup with identity (f1) gap> Size(M); 16 + +# doc/_Chapter_Functions.xml:320-325 gap> Nm:=NonUnitsAsMultiplicativeSemigroup(B); gap> Size(Nm); 8 + +# doc/_Chapter_Functions.xml:340-350 gap> D:=LocalNearRing(49,2,42,4,1); ExplicitMultiplicationNearRing ( , multiplication ) gap> IsOneGeneratedNearRing(D); @@ -133,6 +149,8 @@ ExplicitMultiplicationNearRing ( , multiplication ) gap> IsOneGeneratedNearRing(H); false + +# doc/_Chapter_Functions.xml:368-379 gap> S:=UnitsOfNearRing(D); [ (f1), (f1*f2), (f1*f2^2), (f1*f2^3), (f1*f2^4), (f1*f2^5), (f1*f2^6), (f1^2), (f1^2*f2), (f1^2*f2^2), (f1^2*f2^3), (f1^2*f2^4), (f1^2*f2^5), (f1^2*f2^6), (f1^3), (f1^3*f2), @@ -143,41 +161,57 @@ gap> S:=UnitsOfNearRing(D); gap> A:=AutomorphismsAssociatedWithNearRingUnits(D,S);; gap> Size(A); 42 + +# doc/_Chapter_Functions.xml:393-399 gap> Nu:=NearRingNonUnits(D); [ ( of ...), (f2), (f2^2), (f2^3), (f2^4), (f2^5), (f2^6) ] gap> En:=EndomorphismsAssociatedWithNearRingElements(D,Nu);; gap> Size(En); 7 + +# doc/_Chapter_Functions.xml:413-420 gap> T:=LocalNearRing(25,2,20,2,1); ExplicitMultiplicationNearRing ( , multiplication ) gap> SemidirectProductAssociatedWithNearRing(T); gap> Size(last); 500 + +# doc/_Chapter_Functions.xml:436-442 gap> Sg:=Subgroups(GroupReduct(T));; gap> Size(Sg); 8 gap> F:=Filtered(Sg,x->IsCircleSubgroupOfNearRing(T,x)); [ Group([ ]), Group([ f2 ]) ] + +# doc/_Chapter_Functions.xml:457-462 gap> FG:=FactorizedGroupAssociatedWithCircleSubgroupOfNearRing(T,F[2]); gap> IdGroup(FG); [ 25, 2 ] + +# doc/_Chapter_Functions.xml:476-483 gap> H:=LocalNearRing(361,2,342,7,7); ExplicitMultiplicationNearRing ( , multiplication ) gap> C:=ConstantPartOfNearRing(H);; gap> Size(C); 19 + +# doc/_Chapter_Functions.xml:497-501 gap> ZeroSymmetricPartOfNearRing(H);; gap> Size(last); 19 + +# doc/_Chapter_Functions.xml:515-522 gap> M:=LocalNearRing(27,4,18,3,2); ExplicitMultiplicationNearRing ( , multiplication ) gap> GroupOfUnitsAsGroupOfAutomorphisms(M); gap> Size(last); -18 +18 + +# doc/_Chapter_Functions.xml:537-546 gap> D:=LocalNearRing(49,2,42,6,1); ExplicitMultiplicationNearRing ( , multiplication ) @@ -186,10 +220,14 @@ gap> d:=h[3]; (f2^2) gap> IsDistributiveElementOfNearRing(D,d); true + +# doc/_Chapter_Functions.xml:561-566 gap> N:=LocalNearRing(16,10,8,2,7); ExplicitMultiplicationNearRing ( , multiplication ) gap> IsSemiDistributiveNearRing(N); true + +# doc/_Chapter_Functions.xml:581-591 gap> N:=LocalNearRing(343,5,294,8,2); ExplicitMultiplicationNearRing ( , multiplication ) @@ -199,6 +237,8 @@ gap> Identity(N); (f1) gap> IsNearRingWithIdentity(N); true + +# doc/_Chapter_Functions.xml:607-623 gap> T:=LocalNearRing(49,2,42,1,2); ExplicitMultiplicationNearRing ( , multiplication ) @@ -215,10 +255,5 @@ gap> D:=SmallGroup(7,1);; gap> IsSubNearRing(T,D); false -## Each test file should finish with the call of STOP_TEST. -## The argument of STOP_TEST should be the name of the test file. -gap> STOP_TEST( "man-examples.tst" ); - -############################################################################# -## -#E +# +gap> STOP_TEST("localnr02.tst", 1);