`coxeter/text/cartan_matrix` := TEXT(`   `,
`FUNCTION:  cartan_matrix - Cartan matrix of a crystallographic root system`,
`   `,`CALLING SEQUENCE:  cartan_matrix(R);`,`    `,
`PARAMETERS:  R = a crystallographic root system data structure`,`   `,
`SYNOPSIS:   `,
`  The Cartan matrix of a crystallographic root system with simple roots`,
`  [r_1,...,r_n] is the n x n integer matrix whose (i,j)-entry is`,`   `,
`                  2 * iprod(r_i,r_j) / iprod(r_j,r_j).`,`   `,
`  An error is generated if these quantities do not evaluate to integers.`,
`  The Cartan "matrix" of the empty root system is the empty list [].`,`   `,
`  If R is a Coxeter matrix, cartan_matrix(R) returns the Cartan matrix for`,
`  some crystallographic root system with Coxeter matrix R, if one exists.`,
`   `,
`  If R is a matrix of integers whose (1,1)-entry is 2, it is assumed that`,
`  R is itself a Cartan matrix and cartan_matrix(R) returns R.`,`    `,
`  For a description of root system data structures, see coxeter[structure].`,
`   `,`EXAMPLES:   `,
`  cartan_matrix(F4)[3,2];                 yields            -2`,
`  a:=cartan_matrix([e1-e2,2*e2]);         yields   array([[2,-1],[-2,2]])`,
`  cartan_matrix(a);                       yields   array([[2,-1],[-2,2]])`,
`  m:=array([[1,2,3],[2,1,3],[3,3,1]]);`,
`  cartan_matrix(m)[1,3];                  yields            -1`,`   `,
`SEE ALSO:  base, cox_matrix, iprod, diagram, name_of, structure`):

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