Help:=proc() if nargs=0 then print(`partitions: a maple package for exploring solid partitions and `): print(`3D standard young tableaux`): print(`by Lara Pudwell`): print(`math 640: final project, may 2007`): print(``): print(`functions are:`): print(`rev(L), part(n), dom(L1, L2), printplanepart(L), planepart(n) `): print(`dom2(PP1,PP2), solidpart(n), printsolidpart(SP), boxsolidpartbrute(n,i,j,k)`): print(`boxpart(n,k), boxplanepart(n,m,p), boxsolidpart(n,m,p,q)`): print(`addsyt(n,L), syt(n), domsyt3d(S1,S2), addsyt3d(n,L3), syt3d(n)`): print(`boxaddsyt(n,j), boxsyt(n,j), boxaddsyt3d(n,L3,k,l), boxsyt3d(n,j,k)`): print(``): print(`Main functions are:`): print(`solidpart(n), boxsolidpart(n,m,p,q), syt3d(n), boxsyt3d(n,j,k)`): print(`type Help(function_name) for more info about a main function.`): elif args[1]=solidpart then print(`solidpart(n): returns the set of solid partitions of n`): elif args[1]=boxsolidpart then print(`boxsolidpart(n): returns the set of solid partitions of n`): print(`that fit in a m by p by q box`): elif args[1]=syt3d then print(`syt3d(n): the set of all 3D standard young tableaux on n boxes`): elif args[1]=boxsyt3d then print(`boxsyt3d(n,j,k): the set of 3D standard young tableaux with a j by k base`): fi: end: #rev(L): reverses list L rev:=proc(L) [seq(L[nops(L)-i],i=0..nops(L)-1)]: end: #part(n): all partitions of n into positive parts part:=proc(n) local i, j, P, S: option remember: if n=1 then return {[1]}: fi: if n=0 then return {[]}: fi: S:={}: for i from 1 to n do P:=part(n-i): for j from 1 to nops(P) do S:=S union {rev(sort([i,op(P[j])]))}: od: od: S: end: #dom(L1, L2): returns true if L1 is at least as long as L2 #and the ith entry of L1 is at least as big as the ith entry of L2 dom:=proc(L1,L2) local i: if nops(L1)0 then return {[n]}: fi: if n=1 then return {[1]}: fi: if n=0 then return {[]}: fi: S:={}: for i from 1 to n do P:=boxpart(n-i,k-1): for j from 1 to nops(P) do S:=S union {rev(sort([i,op(P[j])]))}: od: od: S: end: #boxplanepart(n,m,p): the set of plane partitions of n #that fit in an m by k box boxplanepart:=proc(n,m,p) local S,T,i,R,T2,k,j,l,T2old,RE: option remember: S:=boxpart(n,m): T:={}: for i from 1 to nops(S) do R:=S[i]: #sum of rows T2:={[]}: for j from 1 to nops(R) do RE:=boxpart(R[j],p): T2old:=T2: T2:={}: for k from 1 to nops(T2old) do for l from 1 to nops(RE) do if evalb(T2old={[]}) then T2:=T2 union {[op(T2old[k]),RE[l]]}: elif dom(T2old[k][nops(T2old[k])],RE[l]) then T2:=T2 union {[op(T2old[k]),RE[l]]}: fi: od: od: od: T:=T union T2; od: T; end: #boxsolidpart(n,m,p,q); the solid partitions of n #that fit in an mxpxq box boxsolidpart:=proc(n,m,p,q) local S,T,i,R,T2,k,j,l,T2old,RE: S:=boxpart(n,m): T:={}: for i from 1 to nops(S) do R:=S[i]: #sum of rows T2:={[]}: for j from 1 to nops(R) do RE:=boxplanepart(R[j],p,q): T2old:=T2: T2:={}: for k from 1 to nops(T2old) do for l from 1 to nops(RE) do if evalb(T2old={[]}) then T2:=T2 union {[op(T2old[k]),RE[l]]}: elif dom2(T2old[k][nops(T2old[k])],RE[l]) then T2:=T2 union {[op(T2old[k]),RE[l]]}: fi: od: od: od: T:=T union T2; od: T; end: #adds entry n to an SYT of 1..n-1 addsyt:=proc(n,L) local S,r,i: S:={[[op(L[1]),n],op(2..nops(L),L)]}: for i from 2 to nops(L) do if nops(L[i-1])>nops(L[i]) then S:=S union {[op(1..i-1,L),[op(L[i]),n],op(i+1..nops(L),L)]}: fi: od: S:=S union {[op(L),[n]]}: end: #syt(n): the standard young tableaux on n boxes syt:=proc(n) local S,T,i: option remember: if n=1 then return {[[1]]}: fi: S:=syt(n-1): T:={}: for i from 1 to nops(S) do T:=T union addsyt(n,S[i]): od: T: end: #domsyt3d(S1,S2) returns true if S1 and S2 are valid neighboring walls #in a 3d syt domsyt3d:=proc(S1,S2) local i: if nops(S2)>nops(S1) then return false: fi: for i from 1 to nops(S2) do if nops(S1[i])nops(L[i]) then S:=S union {[op(1..i-1,L),[op(L[i]),n],op(i+1..nops(L),L)]}: fi: od: if nops(L)