home *** CD-ROM | disk | FTP | other *** search
/ Math Solutions 1995 October / Math_Solutions_CD-ROM_Walnut_Creek_October_1995.iso / pc / mac / discrete / lib / chevgrp.g < prev    next >
Encoding:
Text File  |  1993-05-05  |  36.4 KB  |  1,628 lines

  1. #############################################################################
  2. ##
  3. #A  chevgrp.g                   GAP library                      Frank Celler
  4. ##
  5. #A  @(#)$Id: chevgrp.g,v 3.2 1992/06/03 12:26:31 fceller Rel $
  6. ##
  7. #Y  Copyright 1990-1992,  Lehrstuhl D fuer Mathematik,  RWTH Aachen,  Germany
  8. ##
  9. ##  This file contains information about the Chevalley-groups.  They are used
  10. ##  in "recsl.g" to exclude subgroups of GL(q,n).
  11. ##
  12. #H  $Log: chevgrp.g,v $
  13. #H  Revision 3.2  1992/06/03  12:26:31  fceller
  14. #H  Initial GAP 3.2 release
  15. #H
  16. ##
  17.  
  18.  
  19. #############################################################################
  20. ##
  21. ##  'ChevX.lowerBound( <n>, <p>, <k> )':
  22. ##      gives  an  lower  bound  for  the dimension of the  representation of
  23. ##      'ChevX' over  a prime other than <p>. See Vicente Landazuri and  Gary
  24. ##      M. Seitz, "On the  Minimal Degrees of Projective presentations of the
  25. ##      Finite  Chevalley  Groups"  and   P.Kleiderman  and  M.Liebeck,  "The
  26. ##      Subgroup Structure of the finite Classical groups".
  27. ##
  28. ##  'ChevX.order( <n>, <p>, <k> )':
  29. ##      gives the order  of the adjoint  Chevalley  group. Returns 'false' if
  30. ##      the group is not simple for the given parameter.
  31. ##
  32. ##  'ChevX.automorphism( <n>, <p>, <k> )':
  33. ##      gives the order of the outer automorphism group
  34. ##
  35. ##  'ChevX.multiplier( <n>, <p>, <k> )':
  36. ##      gives the order of the Schur multiplier
  37. ##
  38. ##  'ChevX.uexponent( <n>, <p>, <k> )':
  39. ##      gives an upper bound for the exponent. This might be the order!
  40. ##
  41. ##  'ChevX.possibilities( <d>, <m>, <p> )'
  42. ##      returns  a  pair  [l1,l2] of lists such  that l2 contains  triples of
  43. ##      parameters for simple Chevalley-X-groups of dimension at most <d> and
  44. ##      order  at  most  <m> over a  field with characteristic different than
  45. ##      <p>, l1 contains  triples for simple  Chevalley-X-groups of dimension
  46. ##      at most <d> for fields with characteristic <p>.
  47. ##
  48.  
  49.  
  50. #############################################################################
  51. ##
  52. #V  ChevA . . . . . . . . . . . . . . . . . . . . . .  PSL(n+1,q) information
  53. ##
  54. ##  Exceptions:
  55. ##    A_1(2) = S_3
  56. ##    A_1(3) = A_4
  57. ##
  58. ChevA := rec( name := "ChevA" );
  59.  
  60. ChevA.order := function( n, p, k )
  61.     local   i,  o,  q;
  62.  
  63.     if n < 1 or ( n = 1 and k = 1 and ( p = 2 or p = 3 ) )  then
  64.         return false;
  65.     fi;
  66.     q := p ^ k;
  67.     o := q ^ (n*(n+1)/2);
  68.     for i  in [ 2 .. n+1 ]  do
  69.         o := o * ( q^i - 1 );
  70.     od;
  71.     return o / Gcd( n+1, q-1 );
  72.  
  73. end;
  74.  
  75. ChevA.possibilities := function( n, m, p )
  76.     local   l1,  l2,  t,  o,  d,  exc;
  77.  
  78.     # at first no possibilities at all
  79.     l1 := [];
  80.     l2 := [];
  81.  
  82.     # at first characteristic <p>
  83.     t := [1,p,1];
  84.     if p = 2 or p = 3  then
  85.         t[3] := 2;
  86.     fi;
  87.     o := ChevA.order( t[1], t[2], t[3] );
  88.     while o <= m  do
  89.         while o <= m  do
  90.             Add( l1, Copy(t) );
  91.             t[3] := t[3] + 1;
  92.             o := ChevA.order( t[1], t[2], t[3] );
  93.         od;
  94.         t[1] := t[1] + 1;
  95.         t[3] := 1;
  96.         o := ChevA.order( t[1], t[2], t[3] );
  97.     od;
  98.  
  99.     # exceptions in lower bound formula or order
  100.     exc := [ [1,2,2], [1,3,2], [2,2,1], [2,2,2], [2,2,1], [2,3,1] ];
  101.  
  102.     # now different characteristic
  103.     t := [1,2,1];
  104.     if p = 2  then
  105.         t[2] := 3;
  106.     fi;
  107.     if t[2] = 2 or t[2] = 3  then
  108.         t[1] := 2;
  109.     fi;
  110.     o := ChevA.order( t[1], t[2], t[3] );
  111.     d := ChevA.lowerBound( t[1], t[2], t[3] );
  112.     while ( o <= m and d <= n ) or ( t in exc )  do
  113.         while ( o <= m and d <= n ) or ( t in exc )  do
  114.             while ( o <= m and d <= n ) or ( t in exc )  do
  115.                 if o <= m and d <= n  then
  116.                     Add( l2, Copy(t) );
  117.                 fi;
  118.                 t[1] := t[1] + 1;
  119.                 o := ChevA.order( t[1], t[2], t[3] );
  120.                 d := ChevA.lowerBound( t[1], t[2], t[3] );
  121.             od;
  122.             t[1] := 1;
  123.             t[3] := t[3] + 1;
  124.             o := ChevA.order( t[1], t[2], t[3] );
  125.             d := ChevA.lowerBound( t[1], t[2], t[3] );
  126.         od;
  127.         t[1] := 1;
  128.         t[2] := NextPrimeInt(t[2]);
  129.         t[3] := 1;
  130.         if t[2] = p  then
  131.             t[2] := NextPrimeInt(t[2]);
  132.         fi;
  133.         if t[2] = 3  then
  134.             t[1] := 2;
  135.         fi;
  136.         o := ChevA.order( t[1], t[2], t[3] );
  137.         d := ChevA.lowerBound( t[1], t[2], t[3] );
  138.     od;
  139.  
  140.     # return the possibilities
  141.     return [ l1, l2 ];
  142.  
  143. end;
  144.  
  145. ChevA.lowerBound := function( n, p, k )
  146.     local   q;
  147.  
  148.     q := p^k;
  149.     if n = 1 and q = 4  then
  150.         return 2;
  151.     elif n = 1 and q = 9  then
  152.         return 3;
  153.     elif n = 2 and q = 2  then
  154.         return 2;
  155.     elif n = 2 and q = 4  then
  156.         return 4;
  157.     elif n = 1  then
  158.         return ( q - 1 ) / Gcd( 2, q - 1 );
  159.     else
  160.         return q^n - 1;
  161.     fi;
  162.  
  163. end;
  164.  
  165. ChevA.automorphism := function( n, p, k )
  166.  
  167.     if n = 1  then
  168.         return Gcd( 2, p^k - 1 ) * k;
  169.     else
  170.         return Gcd( n+1, p^k-1 ) * k * 2;
  171.     fi;
  172.  
  173. end;
  174.  
  175. ChevA.multiplier := function( n, p, k )
  176.     local   q;
  177.  
  178.     q := p^k;
  179.     if n = 1 and q = 4 then
  180.         return Gcd( 2, q-1 ) * 2;
  181.     elif n = 1 and q = 9  then
  182.         return Gcd( 2, q-1 ) * 3;
  183.     elif n = 2 and q = 2  then
  184.         return Gcd( n+1, q-1 ) * 2;
  185.     elif n = 2 and q = 4  then
  186.         return Gcd( n+1, q-1 ) * 4^2;
  187.     elif n = 3 and q = 2  then
  188.         return Gcd( n+1, q-1 ) * 2;
  189.     else
  190.         return Gcd( n+1, q-1 );
  191.     fi;
  192.  
  193. end;    
  194.  
  195. ChevA.uexponent := function( n, p, k )
  196.     local   e,  i,  q;
  197.  
  198.     q := p ^ k;
  199.     e := p ^ ( 1 + LogInt( n, p ) );
  200.     for i  in [ 1 .. n+1 ]  do
  201.         e := Lcm( e, q^i - 1 );
  202.     od;
  203.     return e / Gcd( n+1, q+1 );
  204.  
  205. end;
  206.     
  207.  
  208. #############################################################################
  209. ##
  210. #V  ChevB . . . . . . . . . . . . . . . . . . . . . . . O_2n+1(q) information
  211. ##
  212. ChevB := rec( name := "ChevB" );
  213.  
  214. ChevB.order := function( n, p, k )
  215.     local   i,  o,  q;
  216.  
  217.     if n < 3 and 2 < p  then
  218.         return false;
  219.     fi;
  220.     q := p ^ k;
  221.     o := q ^ ( n^2 );
  222.     for i  in [ 1 .. n ]  do
  223.         o := o * ( q^(2*i) - 1 );
  224.     od;
  225.     return o / 2;
  226.  
  227. end;
  228.  
  229. ChevB.possibilities := function( n, m, p )
  230.     local   l1,  l2,  t,  o,  d,  exc;
  231.  
  232.     # at first no possibilities at all
  233.     l1 := [];
  234.     l2 := [];
  235.  
  236.     # at first characteristic <p>
  237.     if 2 < p  then
  238.         t := [3,p,1];
  239.         o := ChevB.order( t[1], t[2], t[3] );
  240.         while o <= m  do
  241.             while o <= m  do
  242.                 Add( l1, Copy(t) );
  243.                 t[3] := t[3] + 1;
  244.                 o := ChevB.order( t[1], t[2], t[3] );
  245.             od;
  246.             t[1] := t[1] + 1;
  247.             t[3] := 1;
  248.             o := ChevB.order( t[1], t[2], t[3] );
  249.         od;
  250.     fi;
  251.  
  252.     # exceptions in lower bound formula or order
  253.     exc := [ [3,3,1], [3,5,1] ];
  254.  
  255.     # now different characteristic
  256.     t := [3,3,1];
  257.     if p = 3  then
  258.         t[2] := 5;
  259.     fi;
  260.     o := ChevB.order( t[1], t[2], t[3] );
  261.     d := ChevB.lowerBound( t[1], t[2], t[3] );
  262.     while ( o <= m and d <= n ) or ( t in exc )  do
  263.         while ( o <= m and d <= n ) or ( t in exc )  do
  264.             while ( o <= m and d <= n ) or ( t in exc )  do
  265.                 if o <= m and d <= n  then
  266.                     Add( l2, Copy(t) );
  267.                 fi;
  268.                 t[1] := t[1] + 1;
  269.                 o := ChevB.order( t[1], t[2], t[3] );
  270.                 d := ChevB.lowerBound( t[1], t[2], t[3] );
  271.             od;
  272.             t[1] := 3;
  273.             t[3] := t[3] + 1;
  274.             o := ChevB.order( t[1], t[2], t[3] );
  275.             d := ChevB.lowerBound( t[1], t[2], t[3] );
  276.         od;
  277.         t[1] := 3;
  278.         t[2] := NextPrimeInt(t[2]);
  279.         t[3] := 1;
  280.         if t[2] = p  then
  281.             t[2] := NextPrimeInt(t[2]);
  282.         fi;
  283.         o := ChevB.order( t[1], t[2], t[3] );
  284.         d := ChevB.lowerBound( t[1], t[2], t[3] );
  285.     od;
  286.  
  287.     # return the possibilities
  288.     return [ l1, l2 ];
  289.  
  290. end;
  291.  
  292. ChevB.lowerBound := function( n, p, k )
  293.     local   q;
  294.  
  295.     q := p ^ k;
  296.     if n = 3 and q = 3  then
  297.         return 27;
  298.     elif q < 7  then
  299.         return q^(n-1) * ( q^(n-1) - 1 );
  300.     else
  301.         return q^( 2*(n-1) ) - 1;
  302.     fi;
  303.  
  304. end;
  305.  
  306. ChevB.automorphism := function( n, p, k )
  307.     return 2 * k;
  308. end;
  309.  
  310. ChevB.multiplier := function( n, p, k )
  311.     local   q;
  312.  
  313.     q := p ^ k;
  314.     if n = 3 and q = 3  then
  315.         return 6;
  316.     else
  317.         return 2;
  318.     fi;
  319.  
  320. end;    
  321.  
  322. ChevB.uexponent := function( n, p, k )
  323.     local   e,  i,  q;
  324.  
  325.     #N this is too big, there should be a lower bound for the <p>-part
  326.     e := p ^ ( 1 + LogInt( 2*n, p ) );
  327.     q := p ^ k;
  328.     for i  in [ 1 .. n ]  do
  329.         e := Lcm( e, q^i - 1 );
  330.         e := Lcm( e, q^i + 1 );
  331.     od;
  332.     return Gcd( e, ChevB.order( n, p, k ) );
  333.  
  334. end;
  335.     
  336.  
  337. #############################################################################
  338. ##
  339. #V  ChevC . . . . . . . . . . . . . . . . . . . . . . .  Sp_2n(q) information
  340. ##
  341. ##  Exceptions:
  342. ##    Sp_4(2) = S_6
  343. ##
  344. ChevC := rec( name := "ChevC" );
  345.  
  346. ChevC.order := function( n, p, k )
  347.     local   i,  o,  q;
  348.  
  349.     if n < 2 or ( n = 2 and p = 2 and k = 1 )  then
  350.         return false;
  351.     fi;
  352.     q := p ^ k;
  353.     o := q ^ ( n^2 );
  354.     for i  in [ 1 .. n ]  do
  355.         o := o * ( q^(2*i) - 1 );
  356.     od;
  357.     return o / Gcd( 2, q-1 );
  358.  
  359. end;
  360.  
  361. ChevC.possibilities := function( n, m, p )
  362.     local   l1,  l2,  t,  o,  d,  exc;
  363.  
  364.     # at first no possibilities at all
  365.     l1 := [];
  366.     l2 := [];
  367.  
  368.     # at first characteristic <p>
  369.     t := [2,p,1];
  370.     if p = 2  then
  371.         t[3] := 2;
  372.     fi;
  373.     o := ChevC.order( t[1], t[2], t[3] );
  374.     while o <= m  do
  375.         while o <= m  do
  376.             Add( l1, Copy(t) );
  377.             t[3] := t[3] + 1;
  378.             o := ChevC.order( t[1], t[2], t[3] );
  379.         od;
  380.         t[1] := t[1] + 1;
  381.         t[3] := 1;
  382.         o := ChevC.order( t[1], t[2], t[3] );
  383.     od;
  384.  
  385.     # exceptions in lower bound formula or order
  386.     exc := [ [2,2,1], [3,2,1] ];
  387.  
  388.     # now different characteristic
  389.     t := [2,2,1];
  390.     if p = 2  then
  391.         t[2] := 3;
  392.     fi;
  393.     if t[2] = 2  then
  394.         t[1] := 2;
  395.     fi;
  396.     o := ChevC.order( t[1], t[2], t[3] );
  397.     d := ChevC.lowerBound( t[1], t[2], t[3] );
  398.     while ( o <= m and d <= n ) or ( t in exc )  do
  399.         while ( o <= m and d <= n ) or ( t in exc )  do
  400.             while ( o <= m and d <= n ) or ( t in exc )  do
  401.                 if o <= m and d <= n  then
  402.                     Add( l2, Copy(t) );
  403.                 fi;
  404.                 t[1] := t[1] + 1;
  405.                 o := ChevC.order( t[1], t[2], t[3] );
  406.                 d := ChevC.lowerBound( t[1], t[2], t[3] );
  407.             od;
  408.             t[1] := 2;
  409.             t[3] := t[3] + 1;
  410.             o := ChevC.order( t[1], t[2], t[3] );
  411.             d := ChevC.lowerBound( t[1], t[2], t[3] );
  412.         od;
  413.         t[1] := 2;
  414.         t[2] := NextPrimeInt(t[2]);
  415.         t[3] := 1;
  416.         if t[2] = p  then
  417.             t[2] := NextPrimeInt(t[2]);
  418.         fi;
  419.         o := ChevC.order( t[1], t[2], t[3] );
  420.         d := ChevC.lowerBound( t[1], t[2], t[3] );
  421.     od;
  422.  
  423.     # return the possibilities
  424.     return [ l1, l2 ];
  425.  
  426. end;
  427.  
  428. ChevC.lowerBound := function( n, p, k )
  429.     local   q;
  430.  
  431.     q := p ^ k;
  432.     if n = 3 and q = 2  then
  433.         return 7;
  434.     elif p = 2  then
  435.         return q^(n-1) * ( q^(n-1) - 1 ) * ( q - 1 ) / 2;
  436.     else
  437.         return ( q^n - 1 ) / 2;
  438.     fi;
  439.  
  440. end;
  441.  
  442. ChevC.automorphism := function( n, p, k )
  443.     return Gcd( 2, p^k-1 ) * k;
  444. end;
  445.  
  446. ChevC.multiplier := function( n, p, k )
  447.  
  448.     if n = 3 and p = 2 and k = 1  then
  449.         return 2;
  450.     else
  451.         return Gcd( 2, p^k-1 );
  452.     fi;
  453.  
  454. end;    
  455.  
  456. ChevC.uexponent := function( n, p, k )
  457.     local   e,  i,  q;
  458.  
  459.     #N this is too big, there should be a lower bound for the <p>-part
  460.     e := p ^ ( 1 + LogInt( 2*n-1, p ) );
  461.     q := p ^ k;
  462.     for i  in [ 1 .. n ]  do
  463.         e := Lcm( e, q^i - 1 );
  464.         e := Lcm( e, q^i + 1 );
  465.     od;
  466.     return Gcd( e, ChevC.order( n, p, k ) );
  467.  
  468. end;
  469.     
  470.  
  471. #############################################################################
  472. ##
  473. #V  ChevD . . . . . . . . . . . . . . . . . . . . . . .  O_2n+(q) information
  474. ##
  475. ChevD := rec( name := "ChevD" );
  476.  
  477. ChevD.order := function( n, p, k )
  478.     local   i,  o,  q;
  479.  
  480.     if n < 4  then
  481.         return false;
  482.     fi;
  483.     q := p ^ k;
  484.     o := q ^ (n^2-n) * ( q^n - 1 );
  485.     for i  in [ 1 .. n-1 ]  do
  486.         o := o * ( q^(2*i) - 1 );
  487.     od;
  488.     return o / Gcd( 4, q^n-1 );
  489.  
  490. end;
  491.  
  492. ChevD.possibilities := function( n, m, p )
  493.     local   l1,  l2,  t,  o,  d,  exc;
  494.  
  495.     # at first no possibilities at all
  496.     l1 := [];
  497.     l2 := [];
  498.  
  499.     # at first characteristic <p>
  500.     t := [4,p,1];
  501.     o := ChevD.order( t[1], t[2], t[3] );
  502.     while o <= m  do
  503.         while o <= m  do
  504.             Add( l1, Copy(t) );
  505.             t[3] := t[3] + 1;
  506.             o := ChevD.order( t[1], t[2], t[3] );
  507.         od;
  508.         t[1] := t[1] + 1;
  509.         t[3] := 1;
  510.         o := ChevD.order( t[1], t[2], t[3] );
  511.     od;
  512.  
  513.     # exceptions in lower bound formula or order
  514.     exc := [ [4,2,1], [4,3,1], [4,5,1] ];
  515.  
  516.     # now different characteristic
  517.     t := [4,2,1];
  518.     if p = 2  then
  519.         t[2] := 3;
  520.     fi;
  521.     o := ChevD.order( t[1], t[2], t[3] );
  522.     d := ChevD.lowerBound( t[1], t[2], t[3] );
  523.     while ( o <= m and d <= n ) or ( t in exc )  do
  524.         while ( o <= m and d <= n ) or ( t in exc )  do
  525.             while ( o <= m and d <= n ) or ( t in exc )  do
  526.                 if o <= m and d <= n  then
  527.                     Add( l2, Copy(t) );
  528.                 fi;
  529.                 t[1] := t[1] + 1;
  530.                 o := ChevD.order( t[1], t[2], t[3] );
  531.                 d := ChevD.lowerBound( t[1], t[2], t[3] );
  532.             od;
  533.             t[1] := 4;
  534.             t[3] := t[3] + 1;
  535.             o := ChevD.order( t[1], t[2], t[3] );
  536.             d := ChevD.lowerBound( t[1], t[2], t[3] );
  537.         od;
  538.         t[1] := 4;
  539.         t[2] := NextPrimeInt(t[2]);
  540.         t[3] := 1;
  541.         if t[2] = p  then
  542.             t[2] := NextPrimeInt(t[2]);
  543.         fi;
  544.         o := ChevD.order( t[1], t[2], t[3] );
  545.         d := ChevD.lowerBound( t[1], t[2], t[3] );
  546.     od;
  547.  
  548.     # return the possibilities
  549.     return [ l1, l2 ];
  550.  
  551. end;
  552.  
  553. ChevD.lowerBound := function( n, p, k )
  554.     local   q;
  555.  
  556.     q := p ^ k;
  557.     if n = 4 and q = 2  then
  558.         return 8;
  559.     elif q < 7  then
  560.         return q^(n-2) * ( q^(n-1) - 1 );
  561.     else
  562.         return ( q^(n-1) - 1 ) * ( q^(n-2) + 1 );
  563.     fi;
  564.  
  565. end;
  566.  
  567. ChevD.automorphism := function( n, p, k )
  568.  
  569.     if n = 4  then
  570.         return Gcd( 2, p^k-1 )^2 * k * 6;
  571.     elif n mod 2 = 0  then
  572.         return Gcd( 2, p^k-1 )^2 * k * 2;
  573.     else
  574.        return Gcd( 4, p^(k*n)-1 ) * k * 2;
  575.     fi;
  576.  
  577. end;
  578.  
  579. ChevD.multiplier := function( n, p, k )
  580.  
  581.     if n = 4 and p = 2 and k = 1  then
  582.         return 4;
  583.     elif n mod 2 = 0  then
  584.         return Gcd( 2, p^k-1 )^2;
  585.     else
  586.         return Gcd( 4, p^(k*n)-1 );
  587.     fi;
  588.  
  589. end;    
  590.  
  591. ChevD.uexponent := function( n, p, k )
  592.     local   e,  i,  q;
  593.  
  594.     #N this is too big, there should be a lower bound for the <p>-part
  595.     e := p ^ ( 1 + LogInt( 2*n-1, p ) );
  596.     q := p ^ k;
  597.     for i  in [ 1 .. n ]  do
  598.         e := Lcm( e, q^i - 1 );
  599.         e := Lcm( e, q^i + 1 );
  600.     od;
  601.     return Gcd( e, ChevD.order( n, p, k ) );
  602.  
  603. end;
  604.     
  605.  
  606. #############################################################################
  607. ##
  608. #V  ChevG . . . . . . . . . . . . . . . . . . . . . . . .  G_2(q) information
  609. ##
  610. ChevG := rec( name := "ChevG" );
  611.  
  612. ChevG.order := function( n, p, k )
  613.     local   q;
  614.  
  615.     q := p ^ k;
  616.     if n <> 2  then
  617.         return false;
  618.     fi;
  619.     return q^6 * ( q^6-1 ) * ( q^2-1 );
  620.  
  621. end;
  622.  
  623. ChevG.possibilities := function( n, m, p )
  624.     local   l1,  l2,  t,  o,  d,  exc;
  625.  
  626.     # at first no possibilities at all
  627.     l1 := [];
  628.     l2 := [];
  629.  
  630.     # at first characteristic <p>
  631.     t := [2,p,1];
  632.     o := ChevG.order( t[1], t[2], t[3] );
  633.     while o <= m  do
  634.         Add( l1, Copy(t) );
  635.         t[3] := t[3] + 1;
  636.         o := ChevG.order( t[1], t[2], t[3] );
  637.     od;
  638.  
  639.     # exceptions in lower bound formula or order
  640.     exc := [ [2,3,1], [2,2,1], [2,2,2] ];
  641.  
  642.     # now different characteristic
  643.     t := [2,2,1];
  644.     if p = 2  then
  645.         t[2] := 3;
  646.     fi;
  647.     o := ChevG.order( t[1], t[2], t[3] );
  648.     d := ChevG.lowerBound( t[1], t[2], t[3] );
  649.     while ( o <= m and d <= n ) or ( t in exc )  do
  650.         while ( o <= m and d <= n ) or ( t in exc )  do
  651.             if o <= m and d <= n  then
  652.                 Add( l2, Copy(t) );
  653.             fi;
  654.             t[3] := t[3] + 1;
  655.             o := ChevG.order( t[1], t[2], t[3] );
  656.             d := ChevG.lowerBound( t[1], t[2], t[3] );
  657.         od;
  658.         t[2] := NextPrimeInt(t[2]);
  659.         t[3] := 1;
  660.         if t[2] = p  then
  661.             t[2] := NextPrimeInt(t[2]);
  662.         fi;
  663.         o := ChevG.order( t[1], t[2], t[3] );
  664.         d := ChevG.lowerBound( t[1], t[2], t[3] );
  665.     od;
  666.  
  667.     # return the possibilities
  668.     return [ l1, l2 ];
  669.  
  670. end;
  671.  
  672. ChevG.lowerBound := function( n, p, k )
  673.     local   q;
  674.  
  675.     q := p ^ k;
  676.     if n = 2 and q = 3  then
  677.         return 14;
  678.     elif n =2 and q = 4  then
  679.         return 12;
  680.     else
  681.         return q * ( q^2 - 1 );
  682.     fi;
  683.  
  684. end;
  685.  
  686. ChevG.automorphism := function( n, p, k )
  687.  
  688.     if p = 3  then
  689.         return k * 2;
  690.     else
  691.        return k;
  692.     fi;
  693.  
  694. end;
  695.  
  696. ChevG.multiplier := function( n, p, k )
  697.  
  698.     if p = 3 and k = 1  then
  699.         return 3;
  700.     elif p = 2 and k = 2  then
  701.         return 2;
  702.     else
  703.         return 1;
  704.     fi;
  705.  
  706. end;    
  707.  
  708. ChevG.uexponent := ChevG.order; #N  What is the exponent of G_n(n)?
  709.     
  710.  
  711. #############################################################################
  712. ##
  713. #V  ChevF . . . . . . . . . . . . . . . . . . . . . . . .  F_4(q) information
  714. ##
  715. ChevF := rec( name := "ChevF" );
  716.  
  717. ChevF.order := function( n, p, k )
  718.     local   q;
  719.  
  720.     q := p ^ k;
  721.     if n <> 4  then
  722.         return false;
  723.     fi;
  724.     return q^24 * (q^12-1) * (q^8-1) * (q^6-1) * (q^2-1);
  725.  
  726. end;
  727.  
  728. ChevF.possibilities := function( n, m, p )
  729.     local   l1,  l2,  t,  o,  d,  exc;
  730.  
  731.     # at first no possibilities at all
  732.     l1 := [];
  733.     l2 := [];
  734.  
  735.     # at first characteristic <p>
  736.     t := [4,p,1];
  737.     o := ChevF.order( t[1], t[2], t[3] );
  738.     while o <= m  do
  739.         Add( l1, Copy(t) );
  740.         t[3] := t[3] + 1;
  741.         o := ChevF.order( t[1], t[2], t[3] );
  742.     od;
  743.  
  744.     # exceptions in lower bound formula or order
  745.     exc := [ [4,3,1], [4,2,1] ];
  746.  
  747.     # now different characteristic
  748.     t := [4,2,1];
  749.     if p = 2  then
  750.         t[2] := 3;
  751.     fi;
  752.     o := ChevF.order( t[1], t[2], t[3] );
  753.     d := ChevF.lowerBound( t[1], t[2], t[3] );
  754.     while ( o <= m and d <= n ) or ( t in exc )  do
  755.         while ( o <= m and d <= n ) or ( t in exc )  do
  756.             if o <= m and d <= n  then
  757.                 Add( l2, Copy(t) );
  758.             fi;
  759.             t[3] := t[3] + 1;
  760.             o := ChevF.order( t[1], t[2], t[3] );
  761.             d := ChevF.lowerBound( t[1], t[2], t[3] );
  762.         od;
  763.         t[2] := NextPrimeInt(t[2]);
  764.         t[3] := 1;
  765.         if t[2] = p  then
  766.             t[2] := NextPrimeInt(t[2]);
  767.         fi;
  768.         o := ChevF.order( t[1], t[2], t[3] );
  769.         d := ChevF.lowerBound( t[1], t[2], t[3] );
  770.     od;
  771.  
  772.     # return the possibilities
  773.     return [ l1, l2 ];
  774.  
  775. end;
  776.  
  777. ChevF.lowerBound := function( n, p, k )
  778.     local   q;
  779.  
  780.     q := p ^ k;
  781.     if q = 2  then
  782.         return 44;
  783.     elif q mod 2 = 0  then
  784.         return q^7 * ( q^3 - 1 ) * ( q - 1 ) / 2;
  785.  
  786.     else
  787.         return q^6 * ( q^2 - 1 );
  788.     fi;
  789.  
  790. end;
  791.  
  792. ChevF.automorphism := function( n, p, k )
  793.  
  794.     if p = 2  then
  795.         return k * 2;
  796.     else
  797.        return k;
  798.     fi;
  799.  
  800. end;
  801.  
  802. ChevF.multiplier := function( n, p, k )
  803.  
  804.     if p = 2 and k = 1 then
  805.         return 2;
  806.     else
  807.         return 1;
  808.     fi;
  809.  
  810. end;    
  811.  
  812. ChevF.uexponent := ChevF.order; #N What is the exponent of F_4(q)?
  813.  
  814.  
  815. #############################################################################
  816. ##
  817. #V  ChevE . . . . . . . . . . . . . . . . . . . . . . . .  E_n(q) information
  818. ##
  819. ChevE := rec( name := "ChevE" );
  820.  
  821. ChevE.order := function( n, p, k )
  822.     local   q;
  823.  
  824.     if 8 < n or n < 6  then
  825.         return false;
  826.     fi;
  827.     q := p ^ k;
  828.     if n = 6  then
  829.         return q^36*(q^12-1)*(q^9-1)*(q^8-1)*(q^6-1)*(q^5-1)*(q^2-1)
  830.                / Gcd( 3, q-1 );
  831.     elif n = 7  then
  832.         return q^63*(q^18-1)*(q^14-1)*(q^12-1)*(q^10-1)*(q^8-1)
  833.                *(q^6-1)*(q^2-1) / Gcd( 2, q-1 );
  834.     elif n = 8  then
  835.         return q^120*(q^30-1)*(q^24-1)*(q^20-1)*(q^18-1)*(q^14-1)
  836.                *(q^12-1)*(q^8-1)*(q^2-1);
  837.     fi;
  838.  
  839. end;
  840.  
  841. ChevE.possibilities := function( n, m, p )
  842.     local   l1,  l2,  t,  o,  d,  exc,  i;
  843.  
  844.     # at first no possibilities at all
  845.     l1 := [];
  846.     l2 := [];
  847.  
  848.     # at first characteristic <p>
  849.     t := [6,p,1];
  850.     for i  in [ 6, 7, 8 ]  do
  851.         t[1] := i;
  852.         t[3] := 1;
  853.         o := ChevE.order( t[1], t[2], t[3] );
  854.         while o <= m  do
  855.             Add( l1, Copy(t) );
  856.             t[3] := t[3] + 1;
  857.             o := ChevE.order( t[1], t[2], t[3] );
  858.         od;
  859.     od;
  860.  
  861.     # exceptions in lower bound formula or order
  862.     exc := [];
  863.  
  864.     # now different characteristic
  865.     t := [6,2,1];
  866.     if p = 2  then
  867.         t[2] := 3;
  868.     fi;
  869.     for i  in [ 6, 7, 8 ]  do
  870.         t[1] := i;
  871.         o := ChevE.order( t[1], t[2], t[3] );
  872.         d := ChevE.lowerBound( t[1], t[2], t[3] );
  873.         while ( o <= m and d <= n ) or ( t in exc )  do
  874.             while ( o <= m and d <= n ) or ( t in exc )  do
  875.                 if o <= m and d <= n  then
  876.                     Add( l2, Copy(t) );
  877.                 fi;
  878.                 t[3] := t[3] + 1;
  879.                 o := ChevE.order( t[1], t[2], t[3] );
  880.                 d := ChevE.lowerBound( t[1], t[2], t[3] );
  881.             od;
  882.             t[2] := NextPrimeInt(t[2]);
  883.             t[3] := 1;
  884.             if t[2] = p  then
  885.                 t[2] := NextPrimeInt(t[2]);
  886.             fi;
  887.             o := ChevE.order( t[1], t[2], t[3] );
  888.             d := ChevE.lowerBound( t[1], t[2], t[3] );
  889.         od;
  890.     od;
  891.  
  892.     # return the possibilities
  893.     return [ l1, l2 ];
  894.  
  895. end;
  896.  
  897. ChevE.lowerBound := function( n, p, k )
  898.     local   q;
  899.  
  900.     q := p ^ k;
  901.     if n = 6  then
  902.         return q^9 * ( q^2-1 );
  903.     elif n = 7  then
  904.         return q^15 * ( q^2-1 );
  905.     elif n = 8  then
  906.         return q^27 * ( q^2-1 );
  907.     fi;
  908.  
  909. end;
  910.  
  911. ChevE.automorphism := function( n, p, k )
  912.  
  913.     if n = 6  then
  914.         return Gcd( 3, p^k-1 ) * k * 2;
  915.     elif n = 7  then
  916.         return Gcd( 2, p^k-1 ) * k;
  917.     elif n = 8  then
  918.         return k;
  919.     fi;
  920.  
  921. end;
  922.  
  923. ChevE.multiplier := function( n, p, k )
  924.  
  925.     if n = 6  then
  926.         return Gcd( 3, p^k-1 );
  927.     elif n = 7  then
  928.         return Gcd( 2, p^k-1 );
  929.     elif n = 8  then
  930.         return 1;
  931.     fi;
  932.  
  933. end;    
  934.  
  935. ChevE.uexponent := ChevE.order; #N What is the exponent of E_n(q)?
  936.  
  937.  
  938. #############################################################################
  939. ##
  940. #V  Chev2A  . . . . . . . . . . . . . . . . . . . . .  PSU(n+1,q) information
  941. ##
  942. Chev2A := rec( name := "Chev2A" );
  943.  
  944. Chev2A.order := function( n, p, k )
  945.     local   i,  o,  q;
  946.  
  947.     if n < 2 or ( n = 2 and p = 2 and k = 1 )  then
  948.         return false;
  949.     fi;
  950.     q := p ^ k;
  951.     o := q ^ ( n * ( n+1 ) / 2 );
  952.     for i  in [ 1 .. n ]  do
  953.         o := o * ( q^(i+1) - (-1)^(i+1) );
  954.     od;
  955.     return o;
  956.  
  957. end;
  958.  
  959. Chev2A.possibilities := function( n, m, p )
  960.     local   l1,  l2,  t,  o,  d,  exc;
  961.  
  962.     # at first no possibilities at all
  963.     l1 := [];
  964.     l2 := [];
  965.  
  966.     # at first characteristic <p>
  967.     t := [2,p,1];
  968.     if p = 2  then
  969.         t[3] := 2;
  970.     fi;
  971.     o := Chev2A.order( t[1], t[2], t[3] );
  972.     while o <= m  do
  973.         while o <= m  do
  974.             Add( l1, Copy(t) );
  975.             t[3] := t[3] + 1;
  976.             o := Chev2A.order( t[1], t[2], t[3] );
  977.         od;
  978.         t[1] := t[1] + 1;
  979.         t[3] := 2;
  980.         o := Chev2A.order( t[1], t[2], t[3] );
  981.     od;
  982.  
  983.     # exceptions in lower bound formula or order
  984.     exc := [ [2,2,1], [3,2,1], [3,3,1] ];
  985.  
  986.     # now different characteristic
  987.     t := [2,2,1];
  988.     if p = 2  then
  989.         t[2] := 3;
  990.     fi;
  991.     if t[2] = 2  then
  992.         t[1] := 2;
  993.     fi;
  994.     o := Chev2A.order( t[1], t[2], t[3] );
  995.     d := Chev2A.lowerBound( t[1], t[2], t[3] );
  996.     while ( o <= m and d <= n ) or ( t in exc )  do
  997.         while ( o <= m and d <= n ) or ( t in exc )  do
  998.             while ( o <= m and d <= n ) or ( t in exc )  do
  999.                 if o <= m and d <= n  then
  1000.                     Add( l2, Copy(t) );
  1001.                 fi;
  1002.                 t[1] := t[1] + 1;
  1003.                 o := Chev2A.order( t[1], t[2], t[3] );
  1004.                 d := Chev2A.lowerBound( t[1], t[2], t[3] );
  1005.             od;
  1006.             t[1] := 2;
  1007.             t[3] := t[3] + 1;
  1008.             o := Chev2A.order( t[1], t[2], t[3] );
  1009.             d := Chev2A.lowerBound( t[1], t[2], t[3] );
  1010.         od;
  1011.         t[1] := 2;
  1012.         t[2] := NextPrimeInt(t[2]);
  1013.         t[3] := 1;
  1014.         if t[2] = p  then
  1015.             t[2] := NextPrimeInt(t[2]);
  1016.         fi;
  1017.         o := Chev2A.order( t[1], t[2], t[3] );
  1018.         d := Chev2A.lowerBound( t[1], t[2], t[3] );
  1019.     od;
  1020.  
  1021.     # return the possibilities
  1022.     return [ l1, l2 ];
  1023.  
  1024. end;
  1025.  
  1026. Chev2A.lowerBound := function( n, p, k )
  1027.     local   q;
  1028.  
  1029.     q := p ^ k;
  1030.     if n = 3 and q = 2  then
  1031.         return 4;
  1032.     elif n = 3 and q = 3  then
  1033.         return 6;
  1034.     elif n mod 2 = 0  then
  1035.         return ( q^(n+1) - 1 ) / ( q+1 );
  1036.     else
  1037.         return q * ( q^n - 1 ) / ( q+1 );
  1038.     fi;
  1039.  
  1040. end;
  1041.  
  1042. Chev2A.automorphism := function( n, p, k )
  1043.     return Gcd( n+1, p^k+1 ) * k;
  1044. end;
  1045.  
  1046. Chev2A.multiplier := function( n, p, k )
  1047.  
  1048.     if n = 3 and p = 2 and k = 1  then
  1049.         return Gcd( n+1, p^k+1 ) * 2;
  1050.     elif n = 3 and p = 3 and k = 1  then
  1051.         return Gcd( n+1, p^k+1 ) * 9;
  1052.     elif n = 3 and p = 2 and k = 2  then
  1053.         return Gcd( n+1, p^k+1 ) * 4;
  1054.     else
  1055.         return Gcd( n+1, p^k+1 );
  1056.     fi;
  1057.  
  1058. end;    
  1059.  
  1060. Chev2A.uexponent := function( n, p, k )
  1061.     local   i,  e,  q;
  1062.  
  1063.     #N this is too big, there should be a lower bound for the <p>-part
  1064.     e := p ^ ( 1 + LogInt( n, p ) );
  1065.     q := p ^ k;
  1066.     for i  in [ 1 .. n+1 ]  do
  1067.         e := Lcm( e, q^i - (-1)^i );
  1068.     od;
  1069.     return Gcd( e, Chev2A.order( n, p, k ) );
  1070.  
  1071. end;
  1072.  
  1073. #############################################################################
  1074. ##
  1075. #V  Chev2B  . . . . . . . . . . . . . . . . . . . . . . . . Sz(q) information
  1076. ##
  1077. Chev2B := rec( name := "Chev2B" );
  1078.  
  1079. Chev2B.order := function( n, p, k )
  1080.     local   q;
  1081.  
  1082.     if n <> 2 or p <> 2 or k mod 2 = 0  then
  1083.         return false;
  1084.     fi;
  1085.     q := p ^ k;
  1086.     return q^2 * ( q^2+1 ) * ( q-1 );
  1087.  
  1088. end;
  1089.  
  1090. Chev2B.possibilities := function( n, m, p )
  1091.     local   l1,  l2,  t,  o,  d,  exc;
  1092.  
  1093.     # at first no possibilities at all
  1094.     l1 := [];
  1095.     l2 := [];
  1096.  
  1097.     # at first characteristic <p>
  1098.     if p = 2  then
  1099.         t := [2,p,3];
  1100.         o := Chev2B.order( t[1], t[2], t[3] );
  1101.         while o <= m  do
  1102.             Add( l1, Copy(t) );
  1103.             t[3] := t[3] + 2;
  1104.             o := Chev2B.order( t[1], t[2], t[3] );
  1105.         od;
  1106.     fi;
  1107.  
  1108.     # exceptions in lower bound formula or order
  1109.     exc := [ [2,2,3] ];
  1110.  
  1111.     # now different characteristic
  1112.     if 2 < p  then
  1113.         t := [2,2,3];
  1114.         o := Chev2B.order( t[1], t[2], t[3] );
  1115.         d := Chev2B.lowerBound( t[1], t[2], t[3] );
  1116.         while ( o <= m and d <= n ) or ( t in exc )  do
  1117.             if o <= m and d <= n  then
  1118.                 Add( l2, Copy(t) );
  1119.             fi;
  1120.             t[3] := t[3] + 2;
  1121.             o := Chev2B.order( t[1], t[2], t[3] );
  1122.             d := Chev2B.lowerBound( t[1], t[2], t[3] );
  1123.         od;
  1124.     fi;
  1125.  
  1126.     # return the possibilities
  1127.     return [ l1, l2 ];
  1128.  
  1129. end;
  1130.  
  1131. Chev2B.lowerBound := function( n, p, k )
  1132.     local   q;
  1133.  
  1134.     q := p ^ k;
  1135.     if q = 8  then
  1136.         return 8;
  1137.     else
  1138.         return p ^ ((k-1)/2) * ( q - 1 );
  1139.     fi;
  1140.  
  1141. end;
  1142.  
  1143. Chev2B.automorphism := function( n, p, k )
  1144.     return k;
  1145. end;
  1146.  
  1147. Chev2B.multiplier := function( n, p, k )
  1148.  
  1149.     if p = 2 and k = 2  then
  1150.         return 4;
  1151.     else
  1152.         return 1;
  1153.     fi;
  1154.  
  1155. end;    
  1156.  
  1157. Chev2B.uexponent := Chev2B.order; #N What is the exponent of Sz(q)?
  1158.  
  1159.  
  1160. #############################################################################
  1161. ##
  1162. #V  Chev2D  . . . . . . . . . . . . . . . . . . . . . .  O_2n-(q) information
  1163. ##
  1164. Chev2D := rec( name := "Chev2D" );
  1165.  
  1166. Chev2D.order := function( n, p, k )
  1167.     local   o,  i,  q;
  1168.  
  1169.     if n < 4  then
  1170.         return false;
  1171.     fi;
  1172.     q := p ^ k;
  1173.     o := q ^ ( n*(n-1) ) * ( q^n+1 );
  1174.     for i  in [ 1 .. n-1 ]  do
  1175.         o := o * ( q^(2*i)-1 );
  1176.     od;
  1177.     return o / Gcd( 4, q^n+1 );
  1178.  
  1179. end;
  1180.  
  1181. Chev2D.possibilities := function( n, m, p )
  1182.     local   l1,  l2,  t,  o,  d,  exc;
  1183.  
  1184.     # at first no possibilities at all
  1185.     l1 := [];
  1186.     l2 := [];
  1187.  
  1188.     # at first characteristic <p>
  1189.     t := [4,p,1];
  1190.     o := Chev2D.order( t[1], t[2], t[3] );
  1191.     while o <= m  do
  1192.         while o <= m  do
  1193.             Add( l1, Copy(t) );
  1194.             t[3] := t[3] + 1;
  1195.             o := Chev2D.order( t[1], t[2], t[3] );
  1196.         od;
  1197.         t[1] := t[1] + 1;
  1198.         t[3] := 1;
  1199.         o := Chev2D.order( t[1], t[2], t[3] );
  1200.     od;
  1201.  
  1202.     # exceptions in lower bound formula or order
  1203.     exc := [];
  1204.  
  1205.     # now different characteristic
  1206.     t := [4,2,1];
  1207.     if p = 2  then
  1208.         t[2] := 3;
  1209.     fi;
  1210.     o := Chev2D.order( t[1], t[2], t[3] );
  1211.     d := Chev2D.lowerBound( t[1], t[2], t[3] );
  1212.     while ( o <= m and d <= n ) or ( t in exc )  do
  1213.         while ( o <= m and d <= n ) or ( t in exc )  do
  1214.             while ( o <= m and d <= n ) or ( t in exc )  do
  1215.                 if o <= m and d <= n  then
  1216.                     Add( l2, Copy(t) );
  1217.                 fi;
  1218.                 t[1] := t[1] + 1;
  1219.                 o := Chev2D.order( t[1], t[2], t[3] );
  1220.                 d := Chev2D.lowerBound( t[1], t[2], t[3] );
  1221.             od;
  1222.             t[1] := 4;
  1223.             t[3] := t[3] + 1;
  1224.             o := Chev2D.order( t[1], t[2], t[3] );
  1225.             d := Chev2D.lowerBound( t[1], t[2], t[3] );
  1226.         od;
  1227.         t[1] := 4;
  1228.         t[2] := NextPrimeInt(t[2]);
  1229.         t[3] := 1;
  1230.         if t[2] = p  then
  1231.             t[2] := NextPrimeInt(t[2]);
  1232.         fi;
  1233.         o := Chev2D.order( t[1], t[2], t[3] );
  1234.         d := Chev2D.lowerBound( t[1], t[2], t[3] );
  1235.     od;
  1236.  
  1237.     # return the possibilities
  1238.     return [ l1, l2 ];
  1239.  
  1240. end;
  1241.  
  1242. Chev2D.lowerBound := function( n, p, k )
  1243.     local   q;
  1244.  
  1245.     q := p ^ k;
  1246.     return ( q^(n-1) + 1 ) * ( q^(n-2) - 1 );
  1247.  
  1248. end;
  1249.  
  1250. Chev2D.automorphism := function( n, p, k )
  1251.     return Gcd( 4, p^(k*n)+1 ) * 2 * k;
  1252. end;
  1253.  
  1254. Chev2D.multiplier := function( n, p, k )
  1255.     return Gcd( 4, p^(k*n)+1 );
  1256. end;    
  1257.  
  1258. Chev2D.uexponent := function( n, p, k )
  1259.     local   e,  i,  q;
  1260.  
  1261.     #N this is too big, there should be a lower bound for the <p>-part
  1262.     e := p ^ ( 1 + LogInt( 2*n-1, p ) );
  1263.     q := p ^ k;
  1264.     for i  in [ 1 .. n ]  do
  1265.         e := Lcm( e, q^i - 1 );
  1266.         e := Lcm( e, q^i + 1 );
  1267.     od;
  1268.     return Gcd( e, Chev2D.order( n, p, k ) );
  1269.  
  1270. end;
  1271.  
  1272.  
  1273. #############################################################################
  1274. ##
  1275. #V  Chev3D  . . . . . . . . . . . . . . . . . . . . . . . 3D_4(q) information
  1276. ##
  1277. Chev3D := rec( name := "Chev3D" );
  1278.  
  1279. Chev3D.order := function( n, p, k )
  1280.     local   q;
  1281.  
  1282.     if n <> 4  then
  1283.         return false;
  1284.     fi;
  1285.     q := p ^ k;
  1286.     return q^12 * ( q^8+q^4+1 ) * ( q^6-1 ) * ( q^2-1 );
  1287.  
  1288. end;
  1289.  
  1290. Chev3D.possibilities := function( n, m, p )
  1291.     local   l1,  l2,  t,  o,  d,  exc;
  1292.  
  1293.     # at first no possibilities at all
  1294.     l1 := [];
  1295.     l2 := [];
  1296.  
  1297.     # at first characteristic <p>
  1298.     t := [4,p,1];
  1299.     o := Chev3D.order( t[1], t[2], t[3] );
  1300.     while o <= m  do
  1301.         Add( l1, Copy(t) );
  1302.         t[3] := t[3] + 1;
  1303.         o := Chev3D.order( t[1], t[2], t[3] );
  1304.     od;
  1305.  
  1306.     # exceptions in lower bound formula or order
  1307.     exc := [];
  1308.  
  1309.     # now different characteristic
  1310.     t := [4,2,1];
  1311.     if p = 2  then
  1312.         t[2] := 3;
  1313.     fi;
  1314.     o := Chev3D.order( t[1], t[2], t[3] );
  1315.     d := Chev3D.lowerBound( t[1], t[2], t[3] );
  1316.     while ( o <= m and d <= n ) or ( t in exc )  do
  1317.         while ( o <= m and d <= n ) or ( t in exc )  do
  1318.             if o <= m and d <= n  then
  1319.                 Add( l2, Copy(t) );
  1320.             fi;
  1321.             t[3] := t[3] + 1;
  1322.             o := Chev3D.order( t[1], t[2], t[3] );
  1323.             d := Chev3D.lowerBound( t[1], t[2], t[3] );
  1324.         od;
  1325.         t[2] := NextPrimeInt(t[2]);
  1326.         t[3] := 1;
  1327.         if t[2] = p  then
  1328.             t[2] := NextPrimeInt(t[2]);
  1329.         fi;
  1330.         o := Chev3D.order( t[1], t[2], t[3] );
  1331.         d := Chev3D.lowerBound( t[1], t[2], t[3] );
  1332.     od;
  1333.  
  1334.     # return the possibilities
  1335.     return [ l1, l2 ];
  1336.  
  1337. end;
  1338.  
  1339. Chev3D.lowerBound := function( n, p, k )
  1340.     local   q;
  1341.  
  1342.     q := p ^ k;
  1343.     return q^3 * ( q^2-1 );
  1344.  
  1345. end;
  1346.  
  1347. Chev3D.automorphism := function( n, p, k )
  1348.     return 3 * k;
  1349. end;
  1350.  
  1351. Chev3D.multiplier := function( n, p, k )
  1352.     return 1;
  1353. end;    
  1354.  
  1355. Chev3D.uexponent := Chev3D.order; #N What is the exponent of 3D(q)?
  1356.  
  1357.  
  1358. #############################################################################
  1359. ##
  1360. #V  Chev2G  . . . . . . . . . . . . . . . . . . . . . . . 2G_2(q) information
  1361. ##
  1362. Chev2G := rec( name := "Chev2G" );
  1363.  
  1364. Chev2G.order := function( n, p, k )
  1365.     local   q;
  1366.  
  1367.     if n <> 2 or p <> 3 or k mod 2 = 0  then
  1368.         return false;
  1369.     fi;
  1370.     q := p ^ k;
  1371.     return q^3 * ( q^3+1 ) * ( q-1 );
  1372.  
  1373. end;
  1374.  
  1375. Chev2G.possibilities := function( n, m, p )
  1376.     local   l1,  l2,  t,  o,  d,  exc;
  1377.  
  1378.     # at first no possibilities at all
  1379.     l1 := [];
  1380.     l2 := [];
  1381.  
  1382.     # at first characteristic <p>
  1383.     if p = 3  then
  1384.         t := [2,p,3];
  1385.         o := Chev2G.order( t[1], t[2], t[3] );
  1386.         while o <= m  do
  1387.             Add( l1, Copy(t) );
  1388.             t[3] := t[3] + 2;
  1389.             o := Chev2G.order( t[1], t[2], t[3] );
  1390.         od;
  1391.     fi;
  1392.  
  1393.     # exceptions in lower bound formula or order
  1394.     exc := [];
  1395.  
  1396.     # now different characteristic
  1397.     if 3 <> p  then
  1398.         t := [2,3,3];
  1399.         o := Chev2G.order( t[1], t[2], t[3] );
  1400.         d := Chev2G.lowerBound( t[1], t[2], t[3] );
  1401.         while ( o <= m and d <= n ) or ( t in exc )  do
  1402.             if o <= m and d <= n  then
  1403.                 Add( l2, Copy(t) );
  1404.             fi;
  1405.             t[3] := t[3] + 2;
  1406.             o := Chev2G.order( t[1], t[2], t[3] );
  1407.             d := Chev2G.lowerBound( t[1], t[2], t[3] );
  1408.         od;
  1409.     fi;
  1410.  
  1411.     # return the possibilities
  1412.     return [ l1, l2 ];
  1413.  
  1414. end;
  1415.  
  1416. Chev2G.lowerBound := function( n, p, k )
  1417.     local   q;
  1418.  
  1419.     q := p ^ k;
  1420.     return q * ( q - 1 );
  1421.  
  1422. end;
  1423.  
  1424. Chev2G.automorphism := function( n, p, k )
  1425.     return k;
  1426. end;
  1427.  
  1428. Chev2G.multiplier := function( n, p, k )
  1429.     return 1;
  1430.  
  1431. end;    
  1432.  
  1433. Chev2G.uexponent := Chev2G.order; #N What is the exponent of 2G_2(q)?
  1434.  
  1435.  
  1436. #############################################################################
  1437. ##
  1438. #V  Chev2F  . . . . . . . . . . . . . . . . . . . . . . . 2F_4(q) information
  1439. ##
  1440. Chev2F := rec( name := "Chev2F" );
  1441.  
  1442. Chev2F.order := function( n, p, k )
  1443.     local   q,  o;
  1444.  
  1445.     if n <> 4 or p <> 2 or k mod 2 = 0  then
  1446.         return false;
  1447.     fi;
  1448.     q := p ^ k;
  1449.     if q = 2  then
  1450.         return q^12 * ( q^6+1 ) * ( q^4-1 ) * ( q^3+1 ) * ( q-1 ) / 2;
  1451.     else
  1452.         return q^12 * ( q^6+1 ) * ( q^4-1 ) * ( q^3+1 ) * ( q-1 );
  1453.     fi;
  1454.  
  1455. end;
  1456.  
  1457. Chev2F.possibilities := function( n, m, p )
  1458.     local   l1,  l2,  t,  o,  d,  exc;
  1459.  
  1460.     # at first no possibilities at all
  1461.     l1 := [];
  1462.     l2 := [];
  1463.  
  1464.     # at first characteristic <p>
  1465.     if p = 2  then
  1466.         t := [4,p,1];
  1467.         o := Chev2F.order( t[1], t[2], t[3] );
  1468.         while o <= m  do
  1469.             Add( l1, Copy(t) );
  1470.             t[3] := t[3] + 2;
  1471.             o := Chev2F.order( t[1], t[2], t[3] );
  1472.         od;
  1473.     fi;
  1474.  
  1475.     # exceptions in lower bound formula or order
  1476.     exc := [ [4,2,1] ];
  1477.  
  1478.     # now different characteristic
  1479.     if 2 < p  then
  1480.         t := [4,2,1];
  1481.         o := Chev2F.order( t[1], t[2], t[3] );
  1482.         d := Chev2F.lowerBound( t[1], t[2], t[3] );
  1483.         while ( o <= m and d <= n ) or ( t in exc )  do
  1484.             if o <= m and d <= n  then
  1485.                 Add( l2, Copy(t) );
  1486.             fi;
  1487.             t[3] := t[3] + 2;
  1488.             o := Chev2F.order( t[1], t[2], t[3] );
  1489.             d := Chev2F.lowerBound( t[1], t[2], t[3] );
  1490.         od;
  1491.     fi;
  1492.  
  1493.     # return the possibilities
  1494.     return [ l1, l2 ];
  1495.  
  1496. end;
  1497.  
  1498. Chev2F.lowerBound := function( n, p, k )
  1499.     local   q;
  1500.  
  1501.     q := p ^ k;
  1502.     return p ^ ( (k-1)/2 ) * q^4 * ( q-1 );
  1503.  
  1504. end;
  1505.  
  1506. Chev2F.automorphism := function( n, p, k )
  1507.  
  1508.     if k = 1  then
  1509.         return 2 * k;
  1510.     else
  1511.         return k;
  1512.     fi;
  1513.  
  1514. end;
  1515.  
  1516. Chev2F.multiplier := function( n, p, k )
  1517.     return 1;
  1518. end;    
  1519.  
  1520. Chev2F.uexponent := Chev2F.order; #N What is the exponent?
  1521.  
  1522.  
  1523. #############################################################################
  1524. ##
  1525. #V  Chev2E  . . . . . . . . . . . . . . . . . . . . . . . 2E_6(q) information
  1526. ##
  1527. Chev2E := rec( name := "Chev2E" );
  1528.  
  1529. Chev2E.order := function( n, p, k )
  1530.     local   q;
  1531.  
  1532.     if n <> 6  then
  1533.         return false;
  1534.     fi;
  1535.     q := p ^ k;
  1536.     return q^36*(q^12-1)*(q^9+1)*(q^8-1)*(q^6-1)*(q^5+1)*(q^2-1)/Gcd(3,q+1);
  1537.  
  1538. end;
  1539.  
  1540. Chev2E.possibilities := function( n, m, p )
  1541.     local   l1,  l2,  t,  o,  d,  exc;
  1542.  
  1543.     # at first no possibilities at all
  1544.     l1 := [];
  1545.     l2 := [];
  1546.  
  1547.     # at first characteristic <p>
  1548.     t := [6,p,1];
  1549.     o := Chev2E.order( t[1], t[2], t[3] );
  1550.     while o <= m  do
  1551.         Add( l1, Copy(t) );
  1552.         t[3] := t[3] + 1;
  1553.         o := Chev2E.order( t[1], t[2], t[3] );
  1554.     od;
  1555.  
  1556.     # exceptions in lower bound formula or order
  1557.     exc := [];
  1558.  
  1559.     # now different characteristic
  1560.     t := [6,2,1];
  1561.     if p = 2  then
  1562.         t[2] := 3;
  1563.     fi;
  1564.     o := Chev2E.order( t[1], t[2], t[3] );
  1565.     d := Chev2E.lowerBound( t[1], t[2], t[3] );
  1566.     while ( o <= m and d <= n ) or ( t in exc )  do
  1567.         while ( o <= m and d <= n ) or ( t in exc )  do
  1568.             if o <= m and d <= n  then
  1569.                 Add( l2, Copy(t) );
  1570.             fi;
  1571.             t[3] := t[3] + 1;
  1572.             o := Chev2E.order( t[1], t[2], t[3] );
  1573.             d := Chev2E.lowerBound( t[1], t[2], t[3] );
  1574.         od;
  1575.         t[2] := NextPrimeInt(t[2]);
  1576.         t[3] := 1;
  1577.         if t[2] = p  then
  1578.             t[2] := NextPrimeInt(t[2]);
  1579.         fi;
  1580.         o := Chev2E.order( t[1], t[2], t[3] );
  1581.         d := Chev2E.lowerBound( t[1], t[2], t[3] );
  1582.     od;
  1583.  
  1584.     # return the possibilities
  1585.     return [ l1, l2 ];
  1586.  
  1587. end;
  1588.  
  1589. Chev2E.lowerBound := function( n, p, k )
  1590.     local   q;
  1591.  
  1592.     q := p ^ k;
  1593.     return q^9 * ( q^2-1 );
  1594.  
  1595. end;
  1596.  
  1597. Chev2E.automorphism := function( n, p, k )
  1598.     local   q;
  1599.  
  1600.     q := p ^ k;
  1601.     return Gcd( 3, q+1 ) * 2 * k;
  1602.  
  1603. end;
  1604.  
  1605. Chev2E.multiplier := function( n, p, k )
  1606.  
  1607.     if p = 2 and k = 1  then
  1608.         return Gcd( 3, p^k+1 ) * 4;
  1609.     else
  1610.         return Gcd( 3, p^k+1 );
  1611.     fi;
  1612.  
  1613. end;    
  1614.  
  1615. Chev2E.uexponent := Chev2E.order; #N What is the exponent?
  1616.  
  1617.  
  1618. #############################################################################
  1619. ##
  1620. #E  Emacs . . . . . . . . . . . . . . . . . . . . . . . local emacs variables
  1621. ##
  1622. ## Local Variables:
  1623. ## mode:           outline
  1624. ## outline-regexp: "#F\\|#V\\|#E"
  1625. ## eval:           (hide-body)
  1626. ## End:
  1627. ##
  1628.