25.36 Save

Save( file, Q, N )

Save saves the PQp record Q to the file file in such a way that the file can be read by GAP. The name of the record in the file will be N. This differs from printing Q to a file in that the required abstract generators are also created in file.

    gap> x := AbstractGenerator("x");;
    gap> y := AbstractGenerator("y");;
    gap> G := rec( generators := [x,y],
    >              relators := [ x^25/(x*y)^5, Comm(x,y)^5, (x^y)^25] );;
    gap> P := PQuotient( G, 5, 4 );;
    #I  PQuotient: class 1 : 2
    #I  PQuotient: Runtime : 0
    #I  PQuotient: class 2 : 2
    #I  PQuotient: Runtime : 27
    #I  PQuotient: class 3 : 2
    #I  PQuotient: Runtime : 78
    #I  PQuotient: class 4 : 3
    #I  PQuotient: Runtime : 156
    gap> Save( "Quo54", P, "Q" );
    gap> # The Unix command 'cat' in the next statement should be
    gap> # replaced appropriately if you are working under a different
    gap> # operating system.
    gap> Exec( "cat Quo54" );
    g1 := AbstractGenerator("g1");
    g2 := AbstractGenerator("g2");
    a3 := AbstractGenerator("a3");
    a4 := AbstractGenerator("a4");
    a6 := AbstractGenerator("a6");
    a7 := AbstractGenerator("a7");
    a11 := AbstractGenerator("a11");
    a12 := AbstractGenerator("a12");
    a14 := AbstractGenerator("a14");
    Q := PQp( rec(
       generators  := [ g1, g2, a3, a4, a6, a7, a11, a12, a14 ],
       definedby   := [ -1, -2, [ 2, 1 ], 1, [ 3, 1 ], [ 3, 2 ],
      [ 5, 1 ], [ 5, 2 ], [ 6, 2 ] ],
       prime       := 5,
       dimensions  := [ 2, 2, 2, 3 ],
       epimorphism := [ 1, 2 ],
       powerRelators := [ g1^5/(a4), g2^5/(a4^4), a3^5, a4^5, a6^5, a7^
    5, a11^5, a12^5, a14^5 ],
       commutatorRelators := [ Comm(g2,g1)/(a3), Comm(a3,g1)/(a6), Comm(a3\
    ,g2)/(a7), Comm(a6,g1)/(a11), Comm(a6,g2)/(a12), Comm(a7,g1)/(a12), Co\
    mm(a7,g2)/(a14) ],
       definingCommutators := [ [ 2, 1 ], [ 3, 1 ], [ 3, 2 ], [ 5, 1 ],
      [ 5, 2 ], [ 6, 1 ], [ 6, 2 ] ] ) );

Previous Up Top Next
Index

GAP 3.4.4
April 1997