  
  [1X2 [33X[0;0YUsing Deep Thought functions[133X[101X
  
  [33X[0;0YIn  the  following  sections,  functions provided for computing Deep Thought
  polynomials and using them for calculations are listed.[133X
  
  
  [1X2.1 [33X[0;0YComputing Deep Thought polynomials[133X[101X
  
  [1X2.1-1 DTP_DTapplicability[101X
  
  [33X[1;0Y[29X[2XDTP_DTapplicability[102X( [3Xcoll[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Yboolean[133X
  
  [33X[0;0YChecks  the collector [10Xcoll[110X for applicability of Deep Thought functions. Note
  that  depending on confluency some functions may be applicable, while others
  are  not.  Information  on  the applicability and which type of Deep Thought
  polynomials  are  suggested is printed to the terminal. Here, "+" means that
  the  following property is fulfilled, otherwise there is a "-". The function
  returns  [10Xfalse[110X  if  Deep Thought is not applicable to the collector [10Xcoll[110X and
  [10Xtrue[110X  otherwise. Anyway, even if [10Xtrue[110X is returned, [13Xnot all functions need to
  be applicable[113X (in case of inconfluencies).[133X
  
  [1X2.1-2 DTP_DTObjFromCollector[101X
  
  [33X[1;0Y[29X[2XDTP_DTObjFromCollector[102X( [3Xcoll[103X[, [3Xrs_flag[103X] ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ya DTObj[133X
  
  [33X[0;0YComputes  a  DTObj  for  the collector coll, either with polynomials of type
  [23Xf_{rs}[123X  (if  [10Xrs_flag  =  true[110X) or with polynomials of type [23Xf_r[123X, if [10Xrs_flag =
  false[110X. If the optional argument [10Xrs_flag[110X is not provided, polynomials of type
  [23Xf_{rs}[123X  are  computed.  The  function  checks  whether the collector [10Xcoll[110X is
  confluent.  If  not,  a warning is displayed. Note that the function assumes
  the   collector   [10Xcoll[110X  to  be  suitable  for  Deep  Thought,  see  function
  [10XDTP_DTapplicability[110X.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XG := UnitriangularPcpGroup(10, 0);;[127X[104X
    [4X[25Xgap>[125X [27Xcoll := Collector(G);;[127X[104X
    [4X[25Xgap>[125X [27XDTP_DTapplicability(coll);[127X[104X
    [4X[28XChecking collector for DT-applicability. "+" means the following property[128X[104X
    [4X[28Xis fulfilled.[128X[104X
    [4X[28X+   conjugacy relations[128X[104X
    [4X[28X+   power relations[128X[104X
    [4X[28X+   confluent[128X[104X
    [4X[28XSuggestion: Call DTP_DTObjFromColl with rs_flag = true.[128X[104X
    [4X[28Xtrue[128X[104X
    [4X[28X# calling DTP_DTObjFromCollector without rs_flag implies rs_flag = true:[128X[104X
    [4X[25Xgap>[125X [27XDTObj := DTP_DTObjFromCollector(coll);[127X[104X
    [4X[28X<DTObj>[128X[104X
  [4X[32X[104X
  
  
  [1X2.2 [33X[0;0YComputations with Deep Thought polynomials[133X[101X
  
  [1X2.2-1 DTP_Exp[101X
  
  [33X[1;0Y[29X[2XDTP_Exp[102X( [3Xexpvec[103X, [3Xint[103X, [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Yan exponent vector[133X
  
  [33X[0;0YComputes  the exponent vector of [10Xexpvec[110X[23X^{int}[123X. If [10XIsConfluent(DTObj) = true[110X,
  then the result is in normal form.[133X
  
  [1X2.2-2 DTP_Inverse[101X
  
  [33X[1;0Y[29X[2XDTP_Inverse[102X( [3Xexpvec[103X, [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Yan exponent vector[133X
  
  [33X[0;0YComputes  the exponent vector of the inverse of the element corresponding to
  [10Xexpvec[110X. If [10XIsConfluent(DTObj) = true[110X, then the result is in normal form.[133X
  
  [1X2.2-3 DTP_IsInNormalForm[101X
  
  [33X[1;0Y[29X[2XDTP_IsInNormalForm[102X( [3Xexpvec[103X, [3Xcoll[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Yboolean or positive integer[133X
  
  [33X[0;0YChecks  whether [10Xexpvec[110X is in normal form or not. If yes, the return value is
  [10Xtrue[110X.  Otherwise  the return value is the smallest generator index for which
  the  normal  form  condition  is violated, i.e. for which the relative order
  [10XRelativeOrder(coll)[i][110X  is  non-zero,  and  [10Xexpvec[i][110X  < [10X0[110X or [10Xexpvec[i][110X [23X\geq[123X
  [10XRelativeOrder(coll)[i][110X.[133X
  
  [1X2.2-4 DTP_Multiply[101X
  
  [33X[1;0Y[29X[2XDTP_Multiply[102X( [3Xexpvec1[103X, [3Xexpvec2[103X, [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Yan exponent vector[133X
  
  [33X[0;0YComputes the exponent vector of the product [10Xexpvec1 * expvec2[110X using the Deep
  Thought  polynomials.  If  [10XIsConfluent(DTObj)  =  true[110X,  then  the result is
  returned  in  normal  form.  [10XDTP_Multiply[110X  either  calls  [10XDTP_Multiply_r[110X  or
  [10XDTP_Multiply_rs[110X depending on which type of polynomials are stored in [10XDTObj[110X.[133X
  
  [1X2.2-5 DTP_Multiply_r[101X
  
  [33X[1;0Y[29X[2XDTP_Multiply_r[102X( [3Xexpvec1[103X, [3Xexpvec2[103X, [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Yan exponent vector[133X
  
  [33X[0;0YComputes the exponent vector of the product [10Xexpvec1 * expvec2[110X using the Deep
  Thought  polynomials  of  type [23Xf_r[123X stored in [10XDT_Obj[110X. If [10XIsConfluent(DTObj) =
  true[110X, then the result is returned in normal form.[133X
  
  [1X2.2-6 DTP_Multiply_rs[101X
  
  [33X[1;0Y[29X[2XDTP_Multiply_rs[102X( [3Xexpvec1[103X, [3Xexpvec2[103X, [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Yan exponent vector[133X
  
  [33X[0;0YComputes the exponent vector of the product [10Xexpvec1 * expvec2[110X using the Deep
  Thought polynomials of type [23Xf_{rs}[123X stored in [10XDT_Obj[110X. If [10XIsConfluent(DTObj) =
  true[110X, then the result is returned in normal form.[133X
  
  [1X2.2-7 DTP_NormalForm[101X
  
  [33X[1;0Y[29X[2XDTP_NormalForm[102X( [3Xexpvec[103X, [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Yan exponent vector[133X
  
  [33X[0;0YComputes the exponent vector of the normal form of [10Xexpvec[110X. For this function
  to be applicable, we need [10XIsConfluent(DTObj) = true[110X.[133X
  
  [1X2.2-8 DTP_Order[101X
  
  [33X[1;0Y[29X[2XDTP_Order[102X( [3Xexpvec[103X, [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ypositive integer or infinity[133X
  
  [33X[0;0YComputes  the order of the element described by [10Xexpvec[110X. For this function to
  be applicable, we need [10XIsConfluent(DTObj) = true[110X.[133X
  
  [1X2.2-9 DTP_SolveEquation[101X
  
  [33X[1;0Y[29X[2XDTP_SolveEquation[102X( [3Xexpvec1[103X, [3Xexpvec2[103X, [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Yan exponent vector[133X
  
  [33X[0;0YComputes  the exponent vector of the element corresponding to [10Xexpvec1[110X[23X^{-1}[123X [10X*
  expvec2[110X,  i.e. the result solves the equation [10Xexpvec1 * result = expvec2[110X. If
  [10XIsConfluent(DTObj) = true[110X, then the result describes a normal form.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XG := PcGroupToPcpGroup(SmallGroup(23^5, 2));[127X[104X
    [4X[28XPcp-group with orders [ 23, 23, 23, 23, 23 ][128X[104X
    [4X[25Xgap>[125X [27Xcoll := Collector(G);[127X[104X
    [4X[28X<<from the left collector with 5 generators>>[128X[104X
    [4X[25Xgap>[125X [27XDTObj := DTP_DTObjFromCollector(coll);[127X[104X
    [4X[28X<DTObj>[128X[104X
    [4X[25Xgap>[125X [27Xg := [100, 134, -31, 52, 5235];[127X[104X
    [4X[28X[ 100, 134, -31, 52, 5235 ][128X[104X
    [4X[25Xgap>[125X [27XDTP_IsInNormalForm(g, DTObj);[127X[104X
    [4X[28X1[128X[104X
    [4X[25Xgap>[125X [27Xg := DTP_NormalForm(g, DTObj);[127X[104X
    [4X[28X[ 8, 19, 15, 10, 19 ][128X[104X
    [4X[25Xgap>[125X [27XDTP_IsInNormalForm(g, DTObj);[127X[104X
    [4X[28Xtrue[128X[104X
    [4X[25Xgap>[125X [27XDTP_Inverse(g, DTObj);[127X[104X
    [4X[28X[ 15, 4, 22, 12, 3 ][128X[104X
    [4X[25Xgap>[125X [27XDTP_Order(g, DTObj);[127X[104X
    [4X[28X529[128X[104X
    [4X[25Xgap>[125X [27Xh := [142, 2, -41, 23, 1];[127X[104X
    [4X[28X[ 142, 2, -41, 23, 1 ][128X[104X
    [4X[25Xgap>[125X [27XDTP_Multiply(g, h, DTObj);[127X[104X
    [4X[28X[ 12, 21, 4, 16, 20 ][128X[104X
  [4X[32X[104X
  
  
  [1X2.3 [33X[0;0YComputations with pcp-elements[133X[101X
  
  [33X[0;0YWhen  Deep  Thought  polynomials  are  available, certain computations allow
  different  approaches  which may be faster than the methods used by default.
  In  this  section,  computations  for  which  such  extra  functions  taking
  pcp-elements  as  input  are  available  are  listed. All of these functions
  expect the collector belonging to the pcp-elements to be a [10XDTObj[110X.[133X
  
  [1X2.3-1 DTP_PCP_Exp[101X
  
  [33X[1;0Y[29X[2XDTP_PCP_Exp[102X( [3Xpcp-element[103X, [3Xint[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ypcp-element[133X
  
  [33X[0;0YReturns  the  pcp-element  [10Xpcp-element[110X[23X^{int}[123X.  If [10XIsConfluent(DTObj) = true[110X,
  then the result is in normal form.[133X
  
  [1X2.3-2 DTP_PCP_Inverse[101X
  
  [33X[1;0Y[29X[2XDTP_PCP_Inverse[102X( [3Xpcp-element[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ypcp-element[133X
  
  [33X[0;0YReturns  the  pcp-elment  [10Xpcp-element^-1[110X. If [10XIsConfluent(DTObj) = true[110X, then
  the result is in normal form.[133X
  
  [1X2.3-3 DTP_PCP_NormalForm[101X
  
  [33X[1;0Y[29X[2XDTP_PCP_NormalForm[102X( [3Xpcp-element[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ypcp-element[133X
  
  [33X[0;0YReturns a pcp-element which is the normal form of the input pcp-element. For
  this function to be applicable, we need [10XIsConfluent(DTObj) = true[110X.[133X
  
  [1X2.3-4 DTP_PCP_Order[101X
  
  [33X[1;0Y[29X[2XDTP_PCP_Order[102X( [3Xpcp-element[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ypositive integer or infinity[133X
  
  [33X[0;0YComputes  the  order of the pcp-element. For this function to be applicable,
  we need [10XIsConfluent(DTObj) = true[110X.[133X
  
  [1X2.3-5 DTP_PCP_SolveEquation[101X
  
  [33X[1;0Y[29X[2XDTP_PCP_SolveEquation[102X( [3Xpcp-element1[103X, [3Xpcp-element2[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ypcp-element[133X
  
  [33X[0;0YReturns  the  pcp-element  [10Xpcp-element1[110X[23X^{-1}[123X [10X* pcp-element2[110X, i.e. the result
  solves   the   equation   [10Xpcp-element1  *  pcp-element  =  pcp-element2[110X.  If
  [10XIsConfluent(DTObj) = true[110X, then the result describes a normal form.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27XG := HeisenbergPcpGroup(7);;[127X[104X
    [4X[25Xgap>[125X [27Xcoll := Collector(G);;[127X[104X
    [4X[25Xgap>[125X [27XDTObj := DTP_DTObjFromCollector(coll);;[127X[104X
    [4X[25Xgap>[125X [27XH := PcpGroupByCollector(DTObj);;[127X[104X
    [4X[25Xgap>[125X [27Xg := Random(H);; h := Random(H);;[127X[104X
    [4X[25Xgap>[125X [27XDTP_PCP_SolveEquation(g, h);[127X[104X
    [4X[28Xg1^-3*g2^-1*g3^-7*g4*g5^-6*g6*g7*g8^2*g9^3*g11^-4*g12^5*g14^-2*g15^7[128X[104X
    [4X[28Xg1^-3*g2^-1*g3^-7*g4*g5^-6*g6*g7*g8^2*g9^3*g11^-4*g12^5*g14^-2*g15^7[128X[104X
    [4X[28Xinfinity[128X[104X
    [4X[25Xgap>[125X [27Xg^-1;[127X[104X
    [4X[28Xg1^-2*g3^-3*g4^-1*g5^-4*g6^2*g7*g8^-3*g10^-3*g11^-1*g12^4*g14^-2*g15^-3[128X[104X
    [4X[25Xgap>[125X [27XDTP_PCP_Inverse(h);[127X[104X
    [4X[28Xg1*g2*g3^4*g4^-2*g5^2*g6*g8^-5*g9^-3*g10^-3*g11^3*g12^-1*g15^-33[128X[104X
  [4X[32X[104X
  
  
  [1X2.4 [33X[0;0YAccessing Deep Thought polynomials[133X[101X
  
  [33X[0;0YIn  this  section,  functions  which can be used to display the content of a
  [10XDTObj[110X  are  documented.  Furthermore,  Deep  Thought polynomials stored in a
  [10XDTObj[110X can be converted to [5XGAP[105X polynomials.[133X
  
  [1X2.4-1 DTP_Display_DTObj[101X
  
  [33X[1;0Y[29X[2XDTP_Display_DTObj[102X( [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ynothing[133X
  
  [33X[0;0YPrints  information  about  [10XDTObj[110X  to  the terminal. In particular, the Deep
  Thought  polynomials  are  printed  in human-readable form. This function is
  also called by the method of [10XDisplay[110X for a [10XDTObj[110X.[133X
  
  [1X2.4-2 DTP_pols2GAPpols[101X
  
  [33X[1;0Y[29X[2XDTP_pols2GAPpols[102X( [3XDTObj[103X ) [32X function[133X
  [6XReturns:[106X  [33X[0;10Ylist[133X
  
  [33X[0;0YConverts  the Deep Thought polynomials stored in [10XDTObj[PC_DTPPolynomials][110X to
  [5XGAP[105X  polynomials  and  returns them in a list together with their polynomial
  ring.[133X
  
  [4X[32X  Example  [32X[104X
    [4X[25Xgap>[125X [27Xcoll := FromTheLeftCollector(4);;[127X[104X
    [4X[25Xgap>[125X [27XSetConjugate(coll, 2, 1, [2, 1, 3, 2]);[127X[104X
    [4X[25Xgap>[125X [27XSetConjugate(coll, 3, 1, [3, 1, 4, 1]);[127X[104X
    [4X[25Xgap>[125X [27XSetConjugate(coll, 3, 2, [3, 1, 4, 5]);[127X[104X
    [4X[25Xgap>[125X [27XUpdatePolycyclicCollector(coll);[127X[104X
    [4X[25Xgap>[125X [27XDTObj := DTP_DTObjFromCollector(coll);[127X[104X
    [4X[28X<DTObj>[128X[104X
    [4X[25Xgap>[125X [27XDisplay(DTObj);[127X[104X
    [4X[28XPolynomials f_rs for s = 1:[128X[104X
    [4X[28Xf_1,s = X_1 + Y_1[128X[104X
    [4X[28Xf_2,s = X_2[128X[104X
    [4X[28Xf_3,s = X_3 + 2 * X_2 Y_1[128X[104X
    [4X[28Xf_4,s = X_4 + X_3 Y_1 + 2 * X_2 Binomial(Y_1, 2) + 10 * Binomial(X_2, 2) Y_1[128X[104X
    [4X[28XPolynomials f_rs for s = 2:[128X[104X
    [4X[28Xf_1,s = X_1[128X[104X
    [4X[28Xf_2,s = X_2 + Y_2[128X[104X
    [4X[28Xf_3,s = X_3[128X[104X
    [4X[28Xf_4,s = X_4 + 5 * X_3 Y_2[128X[104X
    [4X[28XPolynomials f_rs for s = 3:[128X[104X
    [4X[28Xf_1,s = X_1[128X[104X
    [4X[28Xf_2,s = X_2[128X[104X
    [4X[28Xf_3,s = X_3 + Y_3[128X[104X
    [4X[28Xf_4,s = X_4[128X[104X
    [4X[28XPolynomials f_rs for s = 4:[128X[104X
    [4X[28Xf_1,s = X_1[128X[104X
    [4X[28Xf_2,s = X_2[128X[104X
    [4X[28Xf_3,s = X_3[128X[104X
    [4X[28Xf_4,s = X_4 + Y_4[128X[104X
    [4X[25Xgap>[125X [27XDTObj := DTP_DTObjFromCollector(coll, false);[127X[104X
    [4X[28X<DTObj>[128X[104X
    [4X[25Xgap>[125X [27XDisplay(DTObj);[127X[104X
    [4X[28Xf_1 = X_1 + Y_1[128X[104X
    [4X[28Xf_2 = X_2 + Y_2[128X[104X
    [4X[28Xf_3 = X_3 + Y_3 + 2 * X_2 Y_1[128X[104X
    [4X[28Xf_4 = X_4 + Y_4 + X_3 Y_1 + 2 * X_2 Binomial(Y_1, 2) +[128X[104X
    [4X[28X10 * Binomial(X_2, 2) Y_1 + 5 * X_3 Y_2 + 10 * X_2 Y_1 Y_2[128X[104X
    [4X[25Xgap>[125X [27XDTP_pols2GAPpols(DTObj);[127X[104X
    [4X[28X [ [ x1+y1, x2+y2, 2*x2*y1+x3+y3,[128X[104X
    [4X[28X5*x2^2*y1+x2*y1^2+10*x2*y1*y2-6*x2*y1+x3*y1+5*x3*y2+x4+y4 ],[128X[104X
    [4X[28XRationals[x1,x2,x3,x4,y1,y2,y3,y4] ][128X[104X
  [4X[32X[104X
  
