  
  [1X1 [33X[0;0YOverview[133X[101X
  
  
  [1X1.1 [33X[0;0YExamples[133X[101X
  
  [1X1.1-1 TriangleGroup[101X
  
  [33X[1;0Y[29X[2XTriangleGroup[102X( [3Xp[103X, [3Xq[103X, [3Xr[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya pregroup presentation[133X
  
  [33X[0;0YReturns a pregroup presentation for the [22X([3Xp[103X,[3Xq[103X,[3Xr[103X)[122X-triangle group, the pregroup
  is  the  pregroup of the free product of a cyclic group of order [3Xp[103X generated
  by [22Xx[122X and a cyclic group of order [3Xq[103X generated by [22Xy[122X together with the relation
  [22X(xy)^r[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XT := TriangleGroup(2,3,7);[127X[104X
    [4X[28X<pregroup presentation with 3 generators and 1 relators>[128X[104X
    [4X[25Xgap>[125X [27XPregroup(T);[127X[104X
    [4X[28X<pregroup with 4 elements in table rep>[128X[104X
    [4X[25Xgap>[125X [27XRelators(T);[127X[104X
    [4X[28X[ <pregroup relator ([ "2", "3" ])^7> ][128X[104X
    [4X[25Xgap>[125X [27XT := TriangleGroup(17,22,100);[127X[104X
    [4X[28X<pregroup presentation with 37 generators and 1 relators>[128X[104X
    [4X[25Xgap>[125X [27XPregroup(T);[127X[104X
    [4X[28X<pregroup with 38 elements in table rep>[128X[104X
    [4X[25Xgap>[125X [27XRelators(T);[127X[104X
    [4X[28X[ <pregroup relator ([ "2", "18" ])^100> ][128X[104X
    [4X[25Xgap>[125X [27XIsHyperbolic(T, 1/6);[127X[104X
    [4X[28Xtrue[128X[104X
  [4X[32X[104X
  
  [1X1.1-2 TriangleCommutatorQuotient[101X
  
  [33X[1;0Y[29X[2XTriangleCommutatorQuotient[102X( [3Xm[103X, [3Xn[103X ) [32X function[133X
  [33X[1;0Y[29X[2XTriSH[102X( [3Xarg[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya pregroup presentation[133X
  
  [33X[0;0YReturns  a  pregroup  presentation  of  the quotient of the [22X(2,3,[3Xm[103X)[122X-triangle
  group  by  the normal subgroup generated by [22Xn[122Xth power of the commutator of [22Xx[122X
  and  [22Xy[122X.  The name [2XTriSH[102X is a synonym for [2XTriangleCommutatorQuotient[102X provided
  for backwards compatibility and might be removed in the future.[133X
  
  [1X1.1-3 RandomTriangleQuotient[101X
  
  [33X[1;0Y[29X[2XRandomTriangleQuotient[102X( [3Xp[103X, [3Xq[103X, [3Xr[103X, [3Xlen[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya pregroup presentation[133X
  
  [33X[0;0YReturns  the  quotient  of the [22X([3Xp[103X,[3Xq[103X,[3Xr[103X)[122X-triangle group by a random relator of
  length [3Xlen[103X.[133X
  
  [1X1.1-4 JackButtonGroup[101X
  
  [33X[1;0Y[29X[2XJackButtonGroup[102X(  ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya pregroup presentation[133X
  
  [33X[0;0YThe  Jack-Button  group, as suggested to me by Alan Logan. It is known to be
  hyperbolic, but the tester fails for it. The pregroup is the pregroup of the
  free  group  of  rank  3  with  generators  [22Xa[122X,[22Xb[122X,  and  [22Xt[122X  and  two  relators
  [22Xt^-1atb^-1a^-1[122X and [22Xt^-1ata^-1b^-1[122X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XJ := JackButtonGroup();[127X[104X
    [4X[28X<pregroup presentation with 6 generators and 2 relators>[128X[104X
    [4X[25Xgap>[125X [27XPregroup(J);[127X[104X
    [4X[28X<pregroup of free group of rank 3>[128X[104X
    [4X[25Xgap>[125X [27XRelators(J);[127X[104X
    [4X[28X[ <pregroup relator TatBA>, <pregroup relator TatAB> ][128X[104X
  [4X[32X[104X
  
  [1X1.1-5 RandomPregroupPresentation[101X
  
  [33X[1;0Y[29X[2XRandomPregroupPresentation[102X( [3Xpg[103X, [3Xnrel[103X, [3Xlrel[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya pregroup presentation[133X
  
  [33X[0;0YReturns  a  pregroup  presentation  over  the  given  pregroup  [3Xpg[103X with [3Xnrel[103X
  randomly chosen relators of length [3Xlrel[103X.[133X
  
  [1X1.1-6 RandomPregroupWord[101X
  
  [33X[1;0Y[29X[2XRandomPregroupWord[102X( [3Xpg[103X, [3Xlen[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya list of integers[133X
  
  [33X[0;0YA random list of pregroup element numbers of the pregroup [3Xpregroup[103X of length
  [3Xlen[103X. When interpreted as a pregroup word this is cyclically reduced.[133X
  
  [33X[0;0YThis  package  provides  the  operations  [10XIsHyperbolic[110X,  ways  of  testing a
  finitely presented group for hyperbolicity in the sense of Gromov.[133X
  
  [33X[0;0YThe  algorithm  is  based  on  ideas  by  Richard  Parker, and the theory is
  described in the paper "Polynomial time proofs that groups are hyperbolic".[133X
  
  
  [1X1.2 [33X[0;0YTesting Hyperbolicity[133X[101X
  
  [33X[0;0YThe  main  function  of  this  package is the so-called RSym-tester. Given a
  (pregroup)  presentation of a group, this function will try to prove whether
  the group defined by the presentation is hyperbolic, and will give an answer
  in  polynomial  time.  Since hyperbolicity is undecidable, the answer can be
  positive, negative, or inconclusive.[133X
  
  [33X[0;0YAs  a simple example consider the following. Triangle groups are known to be
  hyperbolic  when  the  sum  [22Xfrac1p  +  frac1q  +  frac1r[122X is less than [22X1[122X. The
  parameter  for  [2XIsHyperbolic[102X  ([14X3.5-3[114X) gives the algorithm a hint how hard it
  should try.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xtriangle := TriangleGroup(2,3,7);[127X[104X
    [4X[28X<pregroup presentation with 3 generators and 1 relators>[128X[104X
    [4X[25Xgap>[125X [27XIsHyperbolic(triangle, 1/6);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27Xtriangle := TriangleGroup(3,3,3);[127X[104X
    [4X[28X<pregroup presentation with 3 generators and 1 relators>[128X[104X
    [4X[25Xgap>[125X [27XIsHyperbolic(triangle, 1/6);[127X[104X
    [4X[28X[ fail, [ [ 1, 0, 0, 0 ], [ 2, 1, 1, 1/36 ], [ 1, 2, 2, 1/18 ],[128X[104X
    [4X[28X         [ 2, 3, 3, 1/12 ], [ 1, 4, 4, 1/9 ], [ 2, 5, 5, 5/36 ],[128X[104X
    [4X[28X         [ 1, 6, 6, 1/6 ] ], [ 2, 5, 5, 5/36 ] ][128X[104X
  [4X[32X[104X
  
  [33X[0;0YOne  can  also  create  pregroup  presentations  by  giving  a  pregroup and
  relators, that is, words over the pregroup.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XG1 := CyclicGroup(3);[127X[104X
    [4X[28X<pc group of size 3 with 1 generators>[128X[104X
    [4X[25Xgap>[125X [27Xpg := PregroupOfFreeProduct(G1,G1);[127X[104X
    [4X[28X<pregroup with 5 elements in table rep>[128X[104X
    [4X[25Xgap>[125X [27Xrel := [2,5,3,4,3,4,3,4,3,5,2,4,3,5,2,4,3,5,3,4,2,4,3,5];[127X[104X
    [4X[28X[ 2, 5, 3, 4, 3, 4, 3, 4, 3, 5, 2, 4, 3, 5, 2, 4, 3, 5, 3, 4, 2, 4, 3, 5 ][128X[104X
    [4X[25Xgap>[125X [27Xpgp := NewPregroupPresentation(pg,[pg_word(pg,rel)]);[127X[104X
    [4X[28X<pregroup presentation with 4 generators and 1 relators>[128X[104X
    [4X[25Xgap>[125X [27Xres := RSymTest(pgp, 0);;[127X[104X
    [4X[25Xgap>[125X [27Xres[1];[127X[104X
    [4X[28Xfail[128X[104X
  [4X[32X[104X
  
  
  [1X1.3 [33X[0;0YThe MAGMA-compatible interface[133X[101X
  
  [33X[0;0YAn  implementation  of  the hyperbolicity testing algorithm and word-problem
  solver  exist  in  MAGMA as well. For ease of comparison between the results
  these  two  systems  give,  [5Xwalrus[105X  contains  an  interface  that aims to be
  compatible  with  MAGMA's. Please refer to MAGMA's documentation for further
  details.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XF := FreeGroup("x", "y");;[127X[104X
    [4X[25Xgap>[125X [27XAssignGeneratorVariables(F);;[127X[104X
    [4X[25Xgap>[125X [27Xrred := [ y^3 ];;[127X[104X
    [4X[25Xgap>[125X [27Xrgreen := [ x^4, (x*y)^4 ];;[127X[104X
    [4X[25Xgap>[125X [27XIsHyperbolic(F, rred, rgreen, 1/10);[127X[104X
    [4X[28X[ fail, [ [ 1, 0, 0, 0 ], [ 2, 1, 1, 13/120 ], [ 1, 2, 2, 13/60 ],[128X[104X
    [4X[28X          [ 2, 3, 3, 13/40 ], [ 1, 4, 4, 13/30 ] ], [ 2, 3, 3, 13/40 ] ][128X[104X
  [4X[32X[104X
  
