These should all work with Maple 7, but are probably compatible as far back as version 5R5.

#dom takes two partitions and tests if the first dominates the second
#a partition is a decreasing list of positive integers
#Requires: nothing

dom:=proc(mu,nu)
local i, sm, sn;
sm:=0: sn:=0:
for i to min(nops(mu),nops(nu)) do
 sm:=sm+mu[i]: sn:=sn+nu[i]:
 if sm<sn then false; break;
 else true; fi; od;
end:


#longanti returns the length of the longest antichain in dominance(n)
#and provides one antichain of that length
#Note: Mathematica can do this more efficiently
#Requires: posets package, dominance

longanti:=proc(n)
local i,j,k,l,foo,bar,P,L,long;
P:=dominance(n,'L'):
foo:=antichains(P):
j:=nops(foo):
bar:=0:
for i to j do
 if nops(foo[i])>bar then bar:=nops(foo[i]): k:=i fi:
od:
print(bar);
for l to nops(foo[k]) do
 long[l]:=L[foo[k,l]] od:
convert(long,list);
end:


#makee takes a partition and returns the corresponding elementary symmetric function
#Requires: sf package

makee:=proc(lamb)
 local bar,i;
bar:=1:
for i to nops(lamb) do
 bar:=bar*cat(e,lamb[i]) od:
bar;
end:


#shrinkposet takes a poset and an element and returns the poset with that element deleted
#Note: some of the "covers" in the new poset may not really be covers, but other than 
#that it works as advertised.
#Requires: posets package

shrinkposet:=proc(P,x) 
local lelts,relts,Q,R,i,j,foo;
lelts:={}:
relts:={}:
Q:={}:
R:={}:
for i to nops(P) do
 if P[i,1]=x then
  relts:=relts union {P[i,2]}:
  Q:=Q union {P[i]}; fi:
 if P[i,2]=x then
  lelts:=lelts union {P[i,1]}:
  Q:=Q union {P[i]}; fi: od:
for i to nops(lelts) do
for j to nops(relts) do
 R:=R union {[lelts[i],relts[j]]}: od: od:
foo:=P minus Q:
foo:=foo union R:
foo;
end:


#getranked takes a poset P and returns the subposet of elements that have a well-defined 
#level, i.e. those on chains of maximal length.
#Requires: posets package

getranked:=proc(P)
local i,j,k,foo,bar,nbar,fp,x,Q;
fp:=filter(P):
bar:=fp[nops(fp)]:
foo:={}:
nbar:={}:
for i from nops(fp)-1 by -1 to 1 do
 for j to nops(fp[i]) do
  x:=fp[i,j]:
  for k to nops(bar) do
   if `subset`({[x,bar[k]]},P) then nbar:=nbar union {x}: fi: od:
  od:
 foo:=foo union bar:
 bar:=nbar:
 nbar:={}:
 od:
foo:=foo union bar:
Q:={}:
for i to nops(P) do
 if {P[i,1],P[i,2]} subset foo then Q:=Q union {P[i]}: fi: od:
Q;
end:


#transition returns the transition matrix from e to m'
#indexed by partitions of n in reverse lexicographic order
#Requires: sf package

dual_basis(m,h);

transition:=proc(n)
local a,b,bar,i,j,k,foo,fu,fub,M;
foo:=Par(n):
a:=nops(foo):
M:=matrix(a,a,0):
M[1,1]:=1: #index
for i from 2 to a do
 bar:=convert(tom(makee(foo[i])),list):
 for j to nops(bar) do
  b:=bar[j];
  if type(b,`*`) then
   fu:=convert(b,list):
   fub:=conjugate(convert(fu[2],list)):
   for k to a do if fub=foo[k] then break: fi: od:
   M[i,k]:=fu[1]: #index
   else
   fu:=conjugate(convert(b,list)):
   for k to a do if fu=foo[k] then break: fi: od:
   M[i,k]:=1: #index
   fi:
  od:
od:
evalm(M);
end:

#getblocks works with transition to get the jordan block sizes of the transition matrix
#Requires: linalg

getblocks:=proc(n)
local a,bar,foo,i,N;
N:=jordan(transition(n)):
a:=numbpart(n):
foo:={a}:
for i to a-1 do
 if N[i,i+1]=0 then foo:=foo union {i} fi: od:
bar:={foo[1]}:
for i from 2 to nops(foo) do bar:=bar union {foo[i]-foo[i-1]} od:
bar;
end: