#
# decompose tensor products of Weyl characters.
# tensor(u,v,R) or tensor(u,v,R,'klimyk') computes the decomposition of
#  the tensor product of irreps of LieAlg(R) with highest weights u and v,
#  using an algorithm based on the Brauer-Klimyk Rule.
# tensor(u,v,R,'mchain') uses the minuscule chain algorithm.
# tensor(u,v,R,'qtensor') uses the quick-and-dirty algorithm based on
#  double specialization of Weyl characters.
#
`weyl/tensor`:=proc(u,v,R) local n;
  if nargs<4 or args[4]='klimyk' then
    `weyl/klimyk`(u,v,{},R)
  elif args[4]='mchain' then
    n:=coxeter['rank'](R);
    `weyl/mchain`(u,v,{$1..n},R)
  elif args[4]='qtensor' then
    `weyl/qtensor`(u,v,R)
  else
    ERROR(cat(`unknown option `,args[4]))
  fi
end:
#
save `weyl/tensor`, cat(HomeLib,`/weyl/tensor.m`);
read cat(HomeLib,`/help/weyl/tensor`);
quit;

