`coxeter/text/cox_matrix` := TEXT(`   `,
`FUNCTION:  cox_matrix - Coxeter matrix of a root system or Coxeter group`,
`    `,`CALLING SEQUENCE:  cox_matrix(R);`,`    `,
`PARAMETERS:  R = a root system data structure`,`   `,`SYNOPSIS:   `,
`  The Coxeter matrix of R is the n x n matrix whose (i,j) entry is the`,
`  order of s_i * s_j in W(R), where [s_1,...,s_n] denote the simple`,
`  reflections. Equivalently, the (i,j)-entry is m if (1-1/m)*Pi is the`,
`  angle between the i-th and j-th simple roots of R.`,`   `,
`  If R is a matrix whose (1,1) entry is 1, it is assumed that R is itself`,
`  a Coxeter matrix and cox_matrix(R) returns R. Any other matrix is assumed`,
`  to be the Cartan matrix of a (not necessarily finite) root system.`,`   `,
`  The Coxeter "matrix" of the empty root system is the empty list [].`,`   `,
`  For a description of root system data structures, see coxeter[structure].`,
`   `,`EXAMPLES:   `,
`  cox_matrix(H4)[1,2];             yields                 5`,
`  m:=cox_matrix([e1-e3,-e1-e2+2*e3]);`,
`                                   yields       array([[1,6],[6,1]])`,
`  cox_matrix(m);                   yields       array([[1,6],[6,1]])`,
`  m:=array([[2,-2,0],[-1,2,-1],[0,-2,2]]);`,
`  cox_matrix(m);                  yields   array([[1,4,2],[4,1,4],[2,4,1]])`,
`    `,
`SEE ALSO:  base, cartan_matrix, diagram, name_of, presentation, structure`):

if `+`(0)=0 then # Maple V.4 or later
  print(INTERFACE_HELP(insert, topic=`coxeter/cox_matrix`,
  helpfile=HomeLib, text=`coxeter/text/cox_matrix`))
elif ceil(0)=0 then # Maple V.2 or V.3
  `help/coxeter/text/cox_matrix`:=`coxeter/text/cox_matrix`:
  save `help/coxeter/text/cox_matrix`, cat(HomeLib,`/help/coxeter/text/cox_matrix.m`);
fi:
