with(combinat): ff:=x->x-1/x: NULL; #z-factors zs := proc (Y) local i, j, za, v; description "Calculates symmetry factor of the diagram Y"; v := Vector(Y[numelems(Y)]); for i to numelems(Y) do v[Y[i]] := v[Y[i]]+1 end do; za := mul(j^v[j]*factorial(v[j]), j = 1 .. Y[numelems(Y)]); return za end proc: #|lambda| Dim:=lambda->add(lambda[i],i=1..nops(lambda)): #Littlewood-Richardson coefficients C:=(lambda1,lambda2,mu)->add(add(Chi(lambda1,rho1)*Chi(lambda2,rho2)*Chi(mu,T(rho1,rho2))/zs(rho1)/zs(rho2),rho1=partition(Dim(lambda1))),rho2=partition(Dim(lambda2))): #D_R qD:=lambda->product(product(f(A*q^(j1-i1))/ff(q^(lambda[nops(lambda)-i1+1]-j1+conjpart(lambda)[nops(conjpart(lambda))-j1+1]-i1+1)),j1=1..lambda[nops(lambda)-i1+1]),i1=1..nops(lambda)): #d_R d:=R->mul(mul(R[nops(R)-i+1]-i-R[nops(R)-j+1]+j,i=1..j-1),j=1..nops(R))/product((nops(R)+R[nops(R)-i+1]-i)!,i=1..nops(R)): ##### seq([d(R),R],R=partition(6)): phi := proc (R, Delta) options operator, arrow; combinat:-Chi(R, Delta)/(zs(Delta)*d(R)) end proc; #Schur_R(p) S:=R->add(Chi(R,Delta)/zs(Delta)*product(p[Delta[i]],i=1..nops(Delta)),Delta=partition(Dim(R))): ###### S([1,4]): S([]) := 1: S([0]) := 1: