with(combinat): reverse := proc(L::list) return [seq(L[nops(L)-i+1], i = 1 .. nops(L))] end proc: mypartition := proc(d ::integer) local X; X := reverse(partition(d)): return [seq(reverse(X[i]),i=1..numbpart(d))]; end proc: myconjpart := proc (L::list) local preK, K; description "I needed to have a conjugate partition function that is in decreasing order."; return reverse(conjpart(reverse(L))); end proc; smash := proc (u, v) description "smash two vectors together"; [seq(u[i], i = 1 .. nops(u)), seq(v[i], i = 1 .. nops(v))] end proc; dimModule := proc (LL::list, k) local L, m; description "this just applies a formula from Fulton and Harris pg 77"; L := smash(LL, [seq(0, i = 1 .. k)]); m := `*`(seq(seq((L[i]-L[j]+j-i)/(j-i), j = i+1 .. k), i = 1 .. k-1)); if k < nops(LL) then m := 0 end if; return m end proc; numbclass:= proc (L::list) local m, f, g, r, top, i, j, c, LL; description "see exercise in http://www.math.unibas.ch/~kraft/Papers/KP-Primer.pdf for the formula for computing the number of elements in a given conjugacy class. This procedure computes the number of elements in the conjugacy class corresponding to a given partition as imput"; top := max(seq(L[k], k = 1 .. nops(L))); for i to top do c := 0; for j to nops(L) do if L[j] = i then c := c+1 end if end do; r[i] := c end do; LL := [seq(r[i], i = 1 .. top)]; m := `+`(seq(i*LL[i], i = 1 .. nops(LL))); f := `*`(seq(i^LL[i], i = 1 .. nops(LL))); g := `*`(seq(factorial(LL[i]), i = 1 .. nops(LL))); return factorial(m)/(f*g) end proc; mults := proc (degree::integer, numfacts::integer, maxdim::integer) local M, Par, i, p, X, IP2, N, NN, k, numpar, temp, stopper, d, n, count, myindicator, myoutput, breaker, cc, K; description "This procedure computes the multiplicites of the irreducible modules in the decomposition of S^d(A_1\otimes \dots \otimes A_n). It expects three integers, the degree - d, the number of factors -n, and the maximum dimension of the A_i - maxdim."; d := degree; n := numfacts; if d = 1 then return start*over end if; K := partition(d); N := [seq(numbclass(K[i]), i = 1 .. nops(K))]; M := character(d); Par := mypartition(d); numpar := nops(Par); count := 1; for i to numpar do if evalb(nops(Par[i]) <= maxdim) then myindicator[count] := i; count := count+1 end if end do; stopper := count-1; count := 'count'; for i to stopper do X[myindicator[i]] := S[Par[myindicator[i]]] end do; i := 'i'; cc := 1; if n <= 10 then breaker := [seq(1, i = 1 .. n), seq(0, i = n+1 .. 11)]; for i[1] to stopper do for i[2] from i[1] to i[1]+breaker[2]*(stopper-i[1]) do for i[3] from i[2] to i[2]+breaker[3]*(stopper-i[2]) do for i[4] from i[3] to i[3]+breaker[4]*(stopper-i[3]) do for i[5] from i[4] to i[4]+breaker[5]*(stopper-i[4]) do for i[6] from i[5] to i[5]+breaker[6]*(stopper-i[5]) do for i[7] from i[6] to i[6]+breaker[7]*(stopper-i[6]) do for i[8] from i[7] to i[7]+breaker[8]*(stopper-i[7]) do for i[9] from i[8] to i[8]+breaker[9]*(stopper-i[8]) do for i[10] from i[9] to i[9]+breaker[10]*(stopper-i[9]) do temp := simplify((`+`(seq(N[q]*(`*`(seq(M[myindicator[i[p]], q], p = 1 .. n))), q = 1 .. nops(Par))))/factorial(d)); if 0 < temp then myoutput[cc] := [temp, [seq(X[myindicator[i[p]]], p = 1 .. n)]]; cc := cc+1 end if end do end do end do end do end do end do end do end do end do end do end if; return [seq(myoutput[i], i = 1 .. cc-1)] end proc; prettymults := proc (n, d, max) local p, i, box, pp; for p to nops(mults(n, d, max)) do pp := nops(op(2, op(p, mults(n, d, max)))); for i to pp do box[2*i-1] := op(i, op(2, op(p, mults(n, d, max)))); box[2*i] := `&bigotimes` end do; print(Matrix([seq(box[i], i = 1 .. 2*pp-1)]), `&oplus`, op(1, op(p, mults(n, d, max)))) end do end proc; ##examples ## mults(3,6,3); dimModule([3,2,1],4);