Skip to content

Commit

Permalink
Update example extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander Konovalov committed Sep 15, 2018
1 parent ff34725 commit ca21ca0
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 73 deletions.
11 changes: 9 additions & 2 deletions makedoc.g
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
###########################################################################

ExtractMyManualExamples:=function( pkgname, main, files )
local path, tst, i, s, basename, name, output, ch, a, comment;
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" );
Expand Down Expand Up @@ -37,7 +37,14 @@ for i in [ 1 .. Length(tst) ] do
"#\n");
AppendTo(output, "gap> START_TEST( \"", basename, "\");\n\n");
for a in ch do
comment := a[2][1]{[PositionSublist(a[2][1],LowercaseString(pkgname))..Length(a[2][1])]};
location := a[2][1];
pos := PositionSublist(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");
Expand Down
2 changes: 1 addition & 1 deletion tst/wedderga01.tst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
gap> START_TEST( "wedderga01.tst");

# wedderga/doc/intro.xml:139-162
# doc/intro.xml:139-162

gap> QG := GroupRing( Rationals, SymmetricGroup(4) );
<algebra-with-one over Rationals, with 2 generators>
Expand Down
22 changes: 11 additions & 11 deletions tst/wedderga02.tst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
gap> START_TEST( "wedderga02.tst");

# wedderga/doc/decomp.xml:31-45
# doc/decomp.xml:31-45

gap> WedderburnDecomposition( GroupRing( GF(5), DihedralGroup(16) ) );
[ ( GF(5)^[ 1, 1 ] ), ( GF(5)^[ 1, 1 ] ), ( GF(5)^[ 1, 1 ] ),
Expand All @@ -22,7 +22,7 @@ gap> WedderburnDecomposition( GroupRing( CF(5), DihedralGroup(16) ) );
<crossed product with center NF(40,[ 1, 31 ]) over AsField( NF(40,
[ 1, 31 ]), CF(40) ) of a group of size 2> ]

# wedderga/doc/decomp.xml:77-96
# doc/decomp.xml:77-96

gap> WedderburnDecomposition( GroupRing( Rationals, SmallGroup(48,15) ) );
[ Rationals, Rationals, Rationals, Rationals,
Expand All @@ -41,7 +41,7 @@ gap> WedderburnDecomposition( GroupRing( CF(3), SmallGroup(48,15) ) );
( CF(3)^[ 2, 2 ] ), ( <crossed product with center CF(3) over AsField( CF(
3), CF(12) ) of a group of size 2>^[ 2, 2 ] ) ]

# wedderga/doc/decomp.xml:108-124
# doc/decomp.xml:108-124

gap> QG:=GroupRing(Rationals,SmallGroup(240,89));
<algebra-with-one over Rationals, with 2 generators>
Expand All @@ -57,7 +57,7 @@ Some of the Wedderburn components displayed are FRACTIONAL MATRIX ALGEBRAS!!!
[ 3/2, <crossed product with center NF(8,[ 1, 7 ]) over AsField( NF(8,
[ 1, 7 ]), NF(40,[ 1, 31 ]) ) of a group of size 4> ] ]

# wedderga/doc/decomp.xml:193-202
# doc/decomp.xml:193-202

gap> WedderburnDecompositionInfo( GroupRing( Rationals, DihedralGroup(16) ) );
[ [ 1, Rationals ], [ 1, Rationals ], [ 1, Rationals ], [ 1, Rationals ],
Expand All @@ -66,7 +66,7 @@ gap> WedderburnDecompositionInfo( GroupRing( CF(5), DihedralGroup(16) ) );
[ [ 1, CF(5) ], [ 1, CF(5) ], [ 1, CF(5) ], [ 1, CF(5) ], [ 2, CF(5) ],
[ 1, NF(40,[ 1, 31 ]), 8, [ 2, 7, 0 ] ] ]

# wedderga/doc/decomp.xml:220-239
# doc/decomp.xml:220-239

gap> F:=FreeGroup("a","b");;a:=F.1;;b:=F.2;;rel:=[a^8,a^4*b^2,b^-1*a*b*a];;
gap> Q16:=F/rel;; QQ16:=GroupRing( Rationals, Q16 );;
Expand All @@ -85,7 +85,7 @@ gap> WedderburnDecompositionInfo(QS4);
[ [ 1, Rationals ], [ 1, Rationals ], [ 1, Rationals, 3, [ 2, 2, 0 ] ],
[ 3, Rationals ], [ 3, Rationals ] ]

# wedderga/doc/decomp.xml:293-307
# doc/decomp.xml:293-307

gap> WedderburnDecompositionInfo( GroupRing( Rationals, SmallGroup(48,15) ) );
[ [ 1, Rationals ], [ 1, Rationals ], [ 1, Rationals ], [ 1, Rationals ],
Expand All @@ -99,7 +99,7 @@ gap> WedderburnDecompositionInfo( GroupRing( CF(3), SmallGroup(48,15) ) );
[ 2, CF(3), 6, [ 1, 1, 0 ] ], [ 1, NF(24,[ 1, 7 ]), 8, [ 2, 7, 0 ] ],
[ 2, CF(3) ], [ 2, CF(3) ], [ 2, CF(3), 12, [ 2, 7, 0 ] ] ]

# wedderga/doc/decomp.xml:320-333
# doc/decomp.xml:320-333

gap> QG:=GroupRing(Rationals,SmallGroup(240,89));
<algebra-with-one over Rationals, with 2 generators>
Expand All @@ -112,7 +112,7 @@ Some of the Wedderburn components displayed are FRACTIONAL MATRIX ALGEBRAS!!!
[ 6, Rationals ], [ 1, NF(12,[ 1, 11 ]), 10, [ 4, 3, 5 ] ],
[ 3/2, NF(8,[ 1, 7 ]), 10, [ 4, 3, 5 ] ] ]

# wedderga/doc/decomp.xml:390-411
# doc/decomp.xml:390-411

gap> A5 := AlternatingGroup(5);
Alt( [ 1 .. 5 ] )
Expand All @@ -133,7 +133,7 @@ gap> List(chi4,x->SimpleAlgebraByCharacter(GroupRing(Rationals,G),x));
( <crossed product with center NF(8,[ 1, 3 ]) over AsField( NF(8,
[ 1, 3 ]), CF(8) ) of a group of size 2>^[ 2, 2 ] ) ]

# wedderga/doc/decomp.xml:444-455
# doc/decomp.xml:444-455

gap> G:=SmallGroup(128,100);
<pc group of size 128 with 7 generators>
Expand All @@ -144,7 +144,7 @@ gap> List(chi4,x->SimpleAlgebraByCharacterInfo(QG,x));
[ [ 2, NF(8,[ 1, 3 ]), 8, [ 2, 3, 0 ] ], [ 2, NF(8,[ 1, 3 ]), 8, [ 2, 3, 0 ] ],
[ 2, NF(8,[ 1, 3 ]), 8, [ 2, 3, 4 ] ], [ 2, NF(8,[ 1, 3 ]), 8, [ 2, 3, 4 ] ] ]

# wedderga/doc/decomp.xml:524-538
# doc/decomp.xml:524-538

gap> F:=FreeGroup("a","b");; a:=F.1;; b:=F.2;;
gap> G:=F/[ a^16, b^2*a^8, b^-1*a*b*a^9 ];; a:=G.1;; b:=G.2;;
Expand All @@ -158,7 +158,7 @@ gap> SimpleAlgebraByStrongSP( FG, K, H, [1,7] );
gap> SimpleAlgebraByStrongSP( FG, K, H, 1 );
( GF(7)^[ 2, 2 ] )

# wedderga/doc/decomp.xml:598-614
# doc/decomp.xml:598-614

gap> F:=FreeGroup("a","b");; a:=F.1;; b:=F.2;;
gap> G:=F/[ a^16, b^2*a^8, b^-1*a*b*a^9 ];; a:=G.1;; b:=G.2;;
Expand Down
14 changes: 7 additions & 7 deletions tst/wedderga03.tst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
gap> START_TEST( "wedderga03.tst");

# wedderga/doc/SSP.xml:25-53
# doc/SSP.xml:25-53

gap> ExtremelyStrongShodaPairs(DihedralGroup(32));
[ [ <pc group of size 32 with 5 generators>,
Expand Down Expand Up @@ -36,7 +36,7 @@ gap> ExtremelyStrongShodaPairs(SymmetricGroup(5));
[ [ Sym( [ 1 .. 5 ] ), Sym( [ 1 .. 5 ] ) ],
[ Sym( [ 1 .. 5 ] ), Alt( [ 1 .. 5 ] ) ] ]

# wedderga/doc/SSP.xml:80-101
# doc/SSP.xml:80-101

gap> StrongShodaPairs( SymmetricGroup(4) );
[ [ Sym( [ 1 .. 4 ] ), Sym( [ 1 .. 4 ] ) ],
Expand All @@ -57,7 +57,7 @@ gap> StrongShodaPairs( DihedralGroup(64) );
[ Group([ f2, f3, f4, f5, f6 ]), Group([ f6 ]) ],
[ Group([ f2, f3, f4, f5, f6 ]), Group([ ]) ] ]

# wedderga/doc/SSP.xml:124-138
# doc/SSP.xml:124-138

gap> G:=SymmetricGroup(4);; K:=Group( (1,3,2,4), (3,4) );;
gap> H1:=Group( (2,4,3), (1,4)(2,3), (1,3)(2,4) );;
Expand All @@ -71,7 +71,7 @@ false
gap> IsExtremelyStrongShodaPair( G, G, K );
false

# wedderga/doc/SSP.xml:159-173
# doc/SSP.xml:159-173

gap> G:=SymmetricGroup(4);; K:=Group( (1,3,2,4), (3,4) );;
gap> H1:=Group( (2,4,3), (1,4)(2,3), (1,3)(2,4) );;
Expand All @@ -85,7 +85,7 @@ true
gap> IsStrongShodaPair( G, G, K );
false

# wedderga/doc/SSP.xml:193-203
# doc/SSP.xml:193-203

gap> G:=AlternatingGroup(5);;
gap> K:=AlternatingGroup(4);;
Expand All @@ -95,7 +95,7 @@ false
gap> IsShodaPair( G, K, H );
true

# wedderga/doc/SSP.xml:218-234
# doc/SSP.xml:218-234

gap> S4:=SymmetricGroup(4);;
gap> IsStronglyMonomial(S4);
Expand All @@ -111,7 +111,7 @@ true
gap> IsStronglyMonomial(G);
false

# wedderga/doc/SSP.xml:249-272
# doc/SSP.xml:249-272

gap> D24:=DihedralGroup(24);
<pc group of size 24 with 4 generators>
Expand Down
16 changes: 8 additions & 8 deletions tst/wedderga04.tst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
gap> START_TEST( "wedderga04.tst");

# wedderga/doc/idempot.xml:23-41
# doc/idempot.xml:23-41

gap> QS3 := GroupRing( Rationals, SymmetricGroup(3) );;
gap> PrimitiveCentralIdempotentsByCharacterTable( QS3 );
Expand All @@ -26,7 +26,7 @@ gap> Length(pciQG);
gap> Length(pciFG);
7

# wedderga/doc/idempot.xml:80-91
# doc/idempot.xml:80-91

gap> QS5 := GroupRing( Rationals, SymmetricGroup(5) );;
gap> idemp := PrimitiveCentralIdempotentsByCharacterTable( QS5 );;
Expand All @@ -37,7 +37,7 @@ true
gap> IsCompleteSetOfOrthogonalIdempotents( QS5, [ One( QS5 ), One( QS5 ) ] );
false

# wedderga/doc/idempot.xml:124-162
# doc/idempot.xml:124-162

gap> QG:=GroupRing( Rationals, DihedralGroup(16) );;
gap> PrimitiveCentralIdempotentsByESSP( QG );
Expand Down Expand Up @@ -75,7 +75,7 @@ The output is a NON-COMPLETE list of prim. central idemp.s of the input!
1/6)*f3+(1/6)*f4+(-1/12)*f2^2+(-1/12)*f2*f3+(-1/12)*f2*f4+(1/6)*f3*f4+(-1/
12)*f2^2*f3+(-1/12)*f2^2*f4+(-1/12)*f2*f3*f4+(-1/12)*f2^2*f3*f4 ]

# wedderga/doc/idempot.xml:196-220
# doc/idempot.xml:196-220

gap> QG:=GroupRing( Rationals, AlternatingGroup(4) );;
gap> PrimitiveCentralIdempotentsByStrongSP( QG );
Expand All @@ -99,7 +99,7 @@ gap> PrimitiveCentralIdempotentsByStrongSP( FG );;
Wedderga: Warning!!!
The output is a NON-COMPLETE list of prim. central idemp.s of the input!

# wedderga/doc/idempot.xml:243-277
# doc/idempot.xml:243-277

gap> QG := GroupRing( Rationals, SymmetricGroup(4) );
<algebra-with-one over Rationals, with 2 generators>
Expand Down Expand Up @@ -133,7 +133,7 @@ The output is a NON-COMPLETE list of prim. central idemp.s of the input!
gap> IsCompleteSetOfPCIs( QS5 , pci );
false

# wedderga/doc/idempot.xml:283-307
# doc/idempot.xml:283-307

gap> QG := GroupRing( Rationals, SmallGroup(48,28) );;
gap> pci:=PrimitiveCentralIdempotentsBySP( QG );;
Expand All @@ -157,7 +157,7 @@ Wedderga: Warning!!!
The output is a NON-COMPLETE list of prim. central idemp.s of the input!
false

# wedderga/doc/idempot.xml:338-361
# doc/idempot.xml:338-361

gap> G:=DihedralGroup(8);;
gap> F:=GF(3);;
Expand All @@ -180,7 +180,7 @@ gap> PrimitiveIdempotentsNilpotent(FG,H,K,C,[epi,gq]);
[ (Z(3)^0)*<identity> of ...+(Z(3))*f3+(Z(3)^0)*f1*f2+(Z(3))*f1*f2*f3,
(Z(3)^0)*<identity> of ...+(Z(3))*f3+(Z(3))*f1*f2+(Z(3)^0)*f1*f2*f3 ]

# wedderga/doc/idempot.xml:388-411
# doc/idempot.xml:388-411

gap> G:=DihedralGroup(8);;
gap> F:=GF(3);;
Expand Down
18 changes: 9 additions & 9 deletions tst/wedderga05.tst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#
gap> START_TEST( "wedderga05.tst");

# wedderga/doc/crossed.xml:91-122
# doc/crossed.xml:91-122

gap> R := GaussianRationals;
GaussianRationals
Expand Down Expand Up @@ -39,7 +39,7 @@ gap> j^2;
gap> i*j+j*i;
<zero> of ...

# wedderga/doc/crossed.xml:131-154
# doc/crossed.xml:131-154

gap> twist2:=function(RG,g,h)
> if IsOne(g) or IsOne(h) then
Expand All @@ -62,7 +62,7 @@ gap> j^2;
gap> i*j+j*i;
<zero> of ...

# wedderga/doc/crossed.xml:160-192
# doc/crossed.xml:160-192

gap> C2 := CyclicGroup(2);
<pc group of size 2 with 1 generators>
Expand Down Expand Up @@ -94,7 +94,7 @@ function( RG, g, h ) ... end
gap> HQ := CrossedProduct( Rationals, G, act, twist );
<crossed product over Rationals of a group of size 4>

# wedderga/doc/crossed.xml:196-211
# doc/crossed.xml:196-211

gap> HZ := CrossedProduct( Integers, G, act, twist );
<crossed product over Integers of a group of size 4>
Expand All @@ -109,7 +109,7 @@ gap> j^2;
gap> i*j+j*i;
<zero> of ...

# wedderga/doc/crossed.xml:224-240
# doc/crossed.xml:224-240

gap> LeftActingDomain(HZ);
Integers
Expand All @@ -125,7 +125,7 @@ function( RG, g, h ) ... end
gap> List( G, x -> List( G , y -> tw( HZ, x, y ) ) );
[ [ 1, 1, 1, 1 ], [ 1, -1, -1, 1 ], [ 1, 1, -1, -1 ], [ 1, -1, 1, -1 ] ]

# wedderga/doc/crossed.xml:246-284
# doc/crossed.xml:246-284

gap> G := SmallGroup(32,50);
<pc group of size 32 with 5 generators>
Expand Down Expand Up @@ -163,7 +163,7 @@ gap> List( H , x -> ac( B, x ) );
gap> List( H , x -> List( H , y -> tw( B, x, y ) ) );
[ [ 1, 1 ], [ 1, -1 ] ]

# wedderga/doc/crossed.xml:287-342
# doc/crossed.xml:287-342

gap> QG:=GroupRing( Rationals, SmallGroup(24,3) );;
gap> WedderburnDecomposition(QG);
Expand Down Expand Up @@ -218,7 +218,7 @@ gap> Characteristic(R);
gap> CenterOfCrossedProduct(R);
Rationals

# wedderga/doc/crossed.xml:348-402
# doc/crossed.xml:348-402

gap> Quat := function(R,a,b)
> local G,act,twist;
Expand Down Expand Up @@ -272,7 +272,7 @@ function( RG, g, h ) ... end
gap> List( G, x -> List( G, y -> tw( HQ, x, y ) ) );
[ [ 1, 1, 1, 1 ], [ 1, 3, -1, -3 ], [ 1, 1, 2, 2 ], [ 1, 3, -3, -6 ] ]

# wedderga/doc/crossed.xml:448-480
# doc/crossed.xml:448-480

gap> QG := GroupRing( Rationals, SmallGroup(24,3) );
<algebra-with-one over Rationals, with 4 generators>
Expand Down
Loading

0 comments on commit ca21ca0

Please sign in to comment.