#
# branch(v,J,R) determines the irreducible decomposition when an irrep
#  of LieAlg(R) of highest weight v is restricted to the (reductive)
#  subalgebra generated by a Cartan subalgebra and the root spaces
#  supported on simple roots indexed by J.
# branch(v,J,R,'klimyk') uses the Brauer-Klimyk Rule (the default).
# branch(v,J,R,'mchain') uses the Minuscule Chain algorithm.
#  In this case, v can be a dominant weight or a (quasi-)minuscule chain.
#
`weyl/branch`:=proc(v,J,R) local n;
  if nargs<4 or args[4]='klimyk' then
    n:=coxeter['rank'](R);
    `weyl/klimyk`(v,0,{$1..n} minus {op(J)},R)
  elif args[4]='mchain' then
    `weyl/mchain`(v,0,{op(J)},R)
  else
    ERROR(cat(`unknown option `,args[4]))
  fi
end:
#
save `weyl/branch`, cat(HomeLib,`/weyl/branch.m`);
read cat(HomeLib,`/help/weyl/branch`);
quit;

