###################################################################### ##DiagHar.txt: Save this file as DiagHar.txt # ## To use it, stay in the # ##same directory, get into Maple (by typing: maple ) # ##and then type: read DiagHar.txt # ##Then follow the instructions given there # ## # ##Written by AJ Bu and Doron Zeilberger, Rutgers University # ###################################################################### #Created: May 2021 print(`Created: May 2021`): print(` This is DiagHar.txt `): print(`It is one of the packages that accompany the article `): print(`An elementary approach to Diagonal Harmonics`): print(`by AJ Bu and Doron Zeilberger`): print(`and also available from Zeilberger's website`): print(``): print(`Please report bugs to DoronZeil at gmail dot com `): print(``): print(`The most current version of this package and paper`): print(` are available from`): print(`http://sites.math.rutgers.edu/~zeilberg/ .`): print(`---------------------------------------`): print(`For a list of the Supporting procedures type ezra1();, for help with`): print(`a specific procedure, type ezra(procedure_name); .`): print(``): print(`---------------------------------------`): print(`---------------------------------------`): print(`For a list of the Two Parameter procedures type ezraT();, for help with`): print(`a specific procedure, type ezra(procedure_name); .`): print(``): print(`---------------------------------------`): print(`---------------------------------------`): print(`For a list of the MAIN procedures type ezra();, for help with`): print(`a specific procedure, type ezra(procedure_name); .`): print(``): print(`---------------------------------------`): with(combinat): ezraT:=proc() if args=NULL then print(` The Two-Parameter procedures are: HPt, Id2T, LeMHt, LeMHtA, MHt, MHtA, prsT, SurvT,SurvTA,VecsTwo, VecsTwoA `): print(``): else ezra(args): fi: end: ezra1:=proc() if args=NULL then print(` The supporting procedures are: A, AND1, ColD, Cond, Cond1, Halev, HMnice, Id1, Id2p, NiceP, prs, Sol, Wt `): print(``): else ezra(args): fi: end: ezra:=proc() if args=NULL then print(`The main procedures are: HP, HPpc, Id2 ,LeMH, LeMHp, MH, MHp, Surv, SurvTree, Vecs, Vecsp, VecsTree`): print(` `): elif nops([args])=1 and op(1,[args])=A then print(`A(n,i,j): coeff(coeff(HPpc(n,p,q),p,i),q,j). Try:`): print(`A(5,2,3);`): elif nops([args])=1 and op(1,[args])=AND1 then print(`AND1(S1,S2): inputs DNF S1 and S2 and outputs S1 AND S2`): elif nops([args])=1 and op(1,[args])=ColD then print(`ColD(N): collects the Hyman data for N>=n>=m>=1. Try:`): print(`ColD(3);`): elif nops([args])=1 and op(1,[args])=Cond then print(`Cond(S,a): given a set of vectors S and a symbol a outputs the conditions that none is>=S`): elif nops([args])=1 and op(1,[args])=Cond1 then print(`Cond1(v,a): inputs a vector v and a symbol a outputs the set of conditions OR that it may be`): print(`Try:`): print(`Cond1([1,0,3],a);`): elif nops([args])=1 and op(1,[args])=Halev then print(`Halev(n,a,b): the value of the operator A(n,a,b)-add(add(A(n-1,a1,b-b1),a1=0..a),b1=0..n-a-1).`): print(`Try Halev(5,2,2);`): elif nops([args])=1 and op(1,[args])=HP then print(`HP(n,p,q): The Haiman polynomial (Hilbert bi-series of the space of Diagonal Harmonics of n variables of each kind. Try: `): print(`HP(3,p,q);`): elif nops([args])=1 and op(1,[args])=HPpc then print(`HPpc(n,p,q): Pre-computed version of HP(n,p,q) for n<=6. Try:`): print(`HPpc(5,p,q);`): elif nops([args])=1 and op(1,[args])=HMnice then print(`HMnice(m,n): The Maiman matrix in ince form. Try:`): print(`HMnice(3,3);`): elif nops([args])=1 and op(1,[args])=HPt then print(`HPt(n,m,p,q): The generalized Haiman polynomial (Hilbert bi-series of the space of general Diagonal Harmonics of (n,m) variables.`): print(`HPt(4,2,p,q);`): elif nops([args])=1 and op(1,[args])=Id1 then print(`Id1(x,n): the generator for the ideal generated by the non-constant symmetric polynomials in n variables. Try:`): print(`Id1(x,3);`): elif nops([args])=1 and op(1,[args])=Id2 then print(`Id2(x,y,n): the set prs(r,s,x,y,n) for 1<=r+s<=n. Try:`): print(`Id2(x,y,3);`): elif nops([args])=1 and op(1,[args])=Id2p then print(`Id2p(x,y,n,s): the set prs(r,s1,x,y,n) for 0<=r+s<=n-1 0<=s1<=s. Try:`): print(`Id2p(x,y,3,0);`): elif nops([args])=1 and op(1,[args])=Id2T then print(`Id2T(x,y,n,m): the generators of the Haiman ideal. Try:`): print(`Id2T(x,y,3,2);`): elif nops([args])=1 and op(1,[args])=LeMH then print(`LeMH(x,y,n): The set of Leading Monomials f the Groebner basis of the Haiman ideal. Try:`): print(`LeMH(x,y,3);`): print(` `): elif nops([args])=1 and op(1,[args])=LeMHp then print(`LeMHp(x,y,n,s): The set of Leading Monomials f the Groebner basis of the partial Haiman ideal. Try:`): print(`LeMHp(x,y,3,1);`): print(` `): elif nops([args])=1 and op(1,[args])=A then print(`A(n,i,j): coeff(coeff(HPpc(n,p,q),p,i),q,j). Try:`): print(`A(5,2,3);`): elif nops([args])=1 and op(1,[args])=AND1 then print(`AND1(S1,S2): inputs DNF S1 and S2 and outputs S1 AND S2`): elif nops([args])=1 and op(1,[args])=ColD then print(`ColD(N): collects the Hyman data for N>=n>=m>=1. Try:`): print(`ColD(3);`): elif nops([args])=1 and op(1,[args])=Cond then print(`Cond(S,a): given a set of vectors S and a symbol a outputs the conditions that none is>=S`): elif nops([args])=1 and op(1,[args])=Cond1 then print(`Cond1(v,a): inputs a vector v and a symbol a outputs the set of conditions OR that it may be`): print(`Try:`): print(`Cond1([1,0,3],a);`): elif nops([args])=1 and op(1,[args])=Halev then print(`Halev(n,a,b): the value of the operator A(n,a,b)-add(add(A(n-1,a1,b-b1),a1=0..a),b1=0..n-a-1).`): print(`Try Halev(5,2,2);`): elif nops([args])=1 and op(1,[args])=HP then print(`HP(n,p,q): The Haiman polynomial (Hilbert bi-series of the space of Diagonal Harmonics of n variables of each kind. Try: `): print(`HP(3,p,q);`): elif nops([args])=1 and op(1,[args])=HPpc then print(`HPpc(n,p,q): Pre-computed version of HP(n,p,q) for n<=6. Try:`): print(`HPpc(5,p,q);`): elif nops([args])=1 and op(1,[args])=HMnice then print(`HMnice(m,n): The Maiman matrix in ince form. Try:`): print(`HMnice(3,3);`): elif nops([args])=1 and op(1,[args])=HPt then print(`HPt(n,m,p,q): The generalized Haiman polynomial (Hilbert bi-series of the space of general Diagonal Harmonics of (n,m) variables.`): print(`HPt(4,2,p,q);`): elif nops([args])=1 and op(1,[args])=Id1 then print(`Id1(x,n): the generator for the ideal generated by the non-constant symmetric polynomials in n variables. Try:`): print(`Id1(x,3);`): elif nops([args])=1 and op(1,[args])=Id2 then print(`Id2(x,y,n): the set prs(r,s,x,y,n) for 1<=r+s<=n. Try:`): print(`Id2(x,y,3);`): elif nops([args])=1 and op(1,[args])=Id2p then print(`Id2p(x,y,n,s): the set prs(r,s1,x,y,n) for 0<=r+s<=n-1 0<=s1<=s. Try:`): print(`Id2p(x,y,3,0);`): elif nops([args])=1 and op(1,[args])=Id2T then print(`Id2T(x,y,n,m): the generators of the Haiman ideal. Try:`): print(`Id2T(x,y,3,2);`): elif nops([args])=1 and op(1,[args])=A then print(`A(n,i,j): coeff(coeff(HPpc(n,p,q),p,i),q,j). Try:`): print(`A(5,2,3);`): elif nops([args])=1 and op(1,[args])=AND1 then print(`AND1(S1,S2): inputs DNF S1 and S2 and outputs S1 AND S2`): elif nops([args])=1 and op(1,[args])=ColD then print(`ColD(N): collects the Hyman data for N>=n>=m>=1. Try:`): print(`ColD(3);`): elif nops([args])=1 and op(1,[args])=Cond then print(`Cond(S,a): given a set of vectors S and a symbol a outputs the conditions that none is>=S`): elif nops([args])=1 and op(1,[args])=Cond1 then print(`Cond1(v,a): inputs a vector v and a symbol a outputs the set of conditions OR that it may be`): print(`Try:`): print(`Cond1([1,0,3],a);`): elif nops([args])=1 and op(1,[args])=Halev then print(`Halev(n,a,b): the value of the operator A(n,a,b)-add(add(A(n-1,a1,b-b1),a1=0..a),b1=0..n-a-1).`): print(`Try Halev(5,2,2);`): elif nops([args])=1 and op(1,[args])=HP then print(`HP(n,p,q): The Haiman polynomial (Hilbert bi-series of the space of Diagonal Harmonics of n variables of each kind. Try: `): print(`HP(3,p,q);`): elif nops([args])=1 and op(1,[args])=HPpc then print(`HPpc(n,p,q): Pre-computed version of HP(n,p,q) for n<=6. Try:`): print(`HPpc(5,p,q);`): elif nops([args])=1 and op(1,[args])=HMnice then print(`HMnice(m,n): The Maiman matrix in ince form. Try:`): print(`HMnice(3,3);`): elif nops([args])=1 and op(1,[args])=HPt then print(`HPt(n,m,p,q): The generalized Haiman polynomial (Hilbert bi-series of the space of general Diagonal Harmonics of (n,m) variables.`): print(`HPt(4,2,p,q);`): elif nops([args])=1 and op(1,[args])=Id1 then print(`Id1(x,n): the generator for the ideal generated by the non-constant symmetric polynomials in n variables. Try:`): print(`Id1(x,3);`): elif nops([args])=1 and op(1,[args])=Id2 then print(`Id2(x,y,n): the set prs(r,s,x,y,n) for 1<=r+s<=n. Try:`): print(`Id2(x,y,3);`): elif nops([args])=1 and op(1,[args])=Id2p then print(`Id2p(x,y,n,s): the set prs(r,s1,x,y,n) for 0<=r+s<=n-1 0<=s1<=s. Try:`): print(`Id2p(x,y,3,0);`): elif nops([args])=1 and op(1,[args])=Id2T then print(`Id2T(x,y,n,m): the generators of the Haiman ideal. Try:`): print(`Id2T(x,y,3,2);`): elif nops([args])=1 and op(1,[args])=LeMHt then print(`LeMHt(x,y,n,m): The set of Leading Monomials f the Groebner basis of the generalized (m,n) Haiman ideal. Try:`): print(`LeMH(x,y,3,2);`): elif nops([args])=1 and op(1,[args])=LeMHtA then print(`LeMHtA(x,y,n,m): The set of Leading Monomials f the Groebner basis of the generalized (m,n) Haiman ideal. `): print(`but with ordering x1, ..., xn, y1,.., ym `): print( `Try:`): print(`LeMH(x,y,3,2);`): elif nops([args])=1 and op(1,[args])=MH then print(`MH(x,y,n): The Groebner basis of the Haiman ideal. Try:`): print(`MH(x,y,3);`): elif nops([args])=1 and op(1,[args])=MHp then print(`MHp(x,y,n,s): The Groebner basis of the Haiman ideal with y exponent <=s. Try:`): print(`MHp(x,y,3,1);`): elif nops([args])=1 and op(1,[args])=MHt then print(`MHt(x,y,n,m): The Groebner basis of the generalized (n,m) Haiman ideal. Try:`): print(`MHt(x,y,3,2);`): elif nops([args])=1 and op(1,[args])=MHtA then print(`MHtA(x,y,n,m): The Groebner basis of the generalized (n,m) Haiman ideal but with ordering [x1,...,xn,y1,..,ym]. Try:`): print(`MHtA(x,y,3,2);`): elif nops([args])=1 and op(1,[args])=NiceP then print(`NiceP(f,p,q): displays the coefficients of the polynomial f in p and q nicely. Try:`): print(`NiceP((1+p)^3*(1+q)^2,p,q);`): elif nops([args])=1 and op(1,[args])=prs then print(`prs(r,s,x,y,n): p_rs(x1,..,xn;y1...yn); Try:`): print(`prs(2,3,x,y,4);`): elif nops([args])=1 and op(1,[args])=prsT then print(`prsT(r,s,x,y,n,m): p_rs(x1,..,xn;y1...ym); Try:`): print(`prsT(3,2,x,y,5,2);`): elif nops([args])=1 and op(1,[args])=Sol then print(`Sol(x,n): A Groebner basis for the Solomon ideal. Try:`): print(`Sol(x,3);`): elif nops([args])=1 and op(1,[args])=Surv then print(`Surv(n): The set of vectors that survive after kicking out all the vectors >=vectors in Vecs(n). Try:`): print(`Surv(n);`): elif nops([args])=1 and op(1,[args])=SurvTree then print(`SurvTree(n): The survivor tree for n. Try:`): print(`SurvTree(n);`): elif nops([args])=1 and op(1,[args])=SurvT then print(`SurvT(n,m): The set of vectors that survive after kicking out all the vectors >=vectors in VecsT(n,m). Try:`): print(`SurvT(n,m);`): elif nops([args])=1 and op(1,[args])=Vecs then print(`Vecs(n): The set of exponents pf LeMH(x,y,n). Try:`): print(`Vecs(3);`): elif nops([args])=1 and op(1,[args])=Vecsp then print(`Vecsp(n,s): The set of exponents pf LeMHp(x,y,n,s). Try:`): print(`Vecs(3,1);`): elif nops([args])=1 and op(1,[args])=VecsTree then print(`VectsTree(n): inputs a positive integer n and outputs the member of Vecs(n) according to their parents. Try:`): print(`VectsTree(3);`): elif nops([args])=1 and op(1,[args])=VecsTwo then print(`VecsTwo(n,m): The set of exponents pf LeMHt(x,y,n,m). Try:`): print(`VecsTwo(3,2);`): elif nops([args])=1 and op(1,[args])=VecsTwoA then print(`VecsTwoA(n,m): The set of exponents pf LeMHtA(x,y,n,m). Try:`): print(`VecsTwoA(3,2);`): elif nops([args])=1 and op(1,[args])=Wt then print(`Wt(L,p,q): the weight of the vector L of even length. p^SumOfEvenEntries*q^SumOfOddEntries. Try:`): print(`Wt([1,2,0,4]],p,q);`): else print(`There is no ezra for`,args): fi: end: #Id1(x,n): the generator for the ideal generated by the non-constant symmetric polynomials in n variables. Try: #Id1(x,3); Id1:=proc(x,n) local i,r: {seq(add(x[i]^r,i=1..n),r=1..n)}: end: #Sol(x,n): A Groebner basis for the Solomon ideal. Try: #Sol(x,3); Sol:=proc(x,n) local i: Groebner[Basis](Id1(x,n),plex(seq(x[i],i=1..n))): end: #prs(r,s,x,y,n): p_rs(x1,..,xn;y1...yn); prs:=proc(r,s,x,y,n) local i: add(x[i]^r*y[i]^s,i=1..n): end: #Id2(x,y,n): the set prs(r,s,x,y,n) for 1<=r+s<=n. Try: #Id2(x,y,3); Id2:=proc(x,y,n) local r,C: {seq(seq(prs(r,C-r,x,y,n),r=0..C),C=1..n)}: end: #MH(x,y,n): The Groebner basis of the Haiman ideal. Try #MH(x,y,3); MH:=proc(x,y,n) local i: Groebner[Basis](Id2(x,y,n),plex(seq(op([x[i],y[i]]),i=1..n)) ): end: #LeMH(x,y,n): The set of Leading Monomials f the Groebner basis of the Haiman ideal. Try #LeMH(x,y,3); LeMH:=proc(x,y,n) local i: option remember: Groebner[LeadingMonomial](MH(x,y,n),plex(seq(op([x[i],y[i]]),i=1..n))): end: #Vecs(n): The set of exponents pf LeMH(x,y,n). Try: #Vecs(3); Vecs:=proc(n) local i,gu,x,y,g: option remember: gu:=LeMH(x,y,n): [seq([seq(op([degree(g,x[i]), degree(g,y[i])]), i=1..n)],g in gu)]: end: #Surv(n): The set of vectors that survive after kicking out all the vectors >=vectors in Vecs(n). Try: #Surv(n); Surv:=proc(n) local c,gu,V,gu1,i: option remember: gu:=Cond(Vecs(n),c): V:=[seq(c[i],i=1..2*n)]: {seq(subs(gu1,V),gu1 in gu)}: end: DHd:=proc(n) local a: nops(Cond(Vecs(n),a)):end: #Cond1(v,a): inputs a vector v and a symbol a outputs the set of conditions OR that it may be #Try: #Cond1([1,0,3],a); Cond1:=proc(v,a) local n,i,j,gu: n:=nops(v): gu:={}: for i from 1 to n do if v[i]>0 then gu:=gu union {seq({a[i]=j},j=0..v[i]-1)}: fi: od: gu: end: #IsBad(G):Is the vector G bad? IsBad:=proc(G) local i1, L: L:=[seq(op(1,op(i1,G)),i1=1..nops(G))]: if nops(L)<>nops(convert(L,set)) then RETURN(true): else RETURN(false): fi: end: #AND1(S1,S2): inputs DNF S1 and S2 and outputs S1 AND S2 AND1:=proc(S1,S2) local s1,s2,kha,gu: gu:={}: for s1 in S1 do for s2 in S2 do kha:=s1 union s2: if not IsBad(kha) then gu:=gu union {kha}: fi: od: od: gu: end: #Cond(S,a): given a set of vectors S and a symbol a outputs the conditions that none is>==S Cond:=proc(S,a) local n,gu,i,s: n:=nops(S[1]): if {seq(nops(s),s in S)}<>{n} then RETURN(FAIL): fi: gu:=Cond1(S[1],a): for i from 2 to nops(S) do gu:=AND1(gu,Cond1(S[i],a)): od: gu: end: #Wt(L,p,q): the weight of the vector L of even length. p^SumOfEvenEntries*q^SumOfOddEntries Wt:=proc(L,p,q) local i,n: n:=nops(L): if n mod 2<>0 then RETURN(FAIL): fi: p^add(L[2*i-1],i=1..n/2)*q^add(L[2*i],i=1..n/2): end: #HP(n,p,q): The Haiman polynomial (Hilbert bi-series of the space of Diagonal Harmonics of n variables of each kind. Try #HP(3,p,q); HP:=proc(n,p,q) local gu,gu1: option remember: gu:=Surv(n): add(Wt(gu1,p,q),gu1 in gu): end: ###start different m and n #prsT(r,s,x,y,n,m): p_rs(x1,..,xn;y1...ym); Try: #prsT(3,2,x,y,5,2); prsT:=proc(r,s,x,y,n,m) local i: option remember: #I am here if r=0 then add(x[i]^r*y[i]^s,i=1..m): else add(x[i]^r*y[i]^s,i=1..m)+add(x[i]^r,i=m+1..n): fi: end: #Id2Told(x,y,n,m): the set prsT(r,s,x,y,n,m) for 1<=r+s<=n. Try: #Id2Told(x,y,3,2); Id2Told:=proc(x,y,n,m) local r,s,gu: option remember: gu:={}: for r from 0 to max(m,n) do for s from 0 to max(m,n) do if r+s>0 and r+s<=n then gu:=gu union {prsT(r,s,x,y,n,m)}: fi: od: od: gu: end: #Id2T(x,y,n,m): the set prsT(r,s,x,y,n,m) for 1<=r+s<=n. Try: #Id2T(x,y,3,2); Id2T:=proc(x,y,n,m) local gu,i,j,r,s: option remember: gu:={seq( add(x[i]^r,i=1..n), r=1..n)}: for s from 1 to m do for r from 0 to n do gu:=gu union {add(x[i]^r*y[i]^s,i=1..m)}: od: od: gu: end: #MHt(x,y,n,m): The Groebner basis of the generalized (n,m) Haiman ideal. Try: #MHt(x,y,3,2); MHt:=proc(x,y,n,m) local i: option remember: if n=m `): RETURN(FAIL): fi: Groebner[Basis](Id2T(x,y,n,m),plex(seq(op([x[i],y[i]]),i=1..m),seq(x[i],i=m+1..n) ) ): end: #LeMHt(x,y,n,m): The set of Leading Monomials f the Groebner basis of the generalized (m,n) Haiman ideal. Try #LeMH(x,y,3,2); LeMHt:=proc(x,y,n,m) local i: option remember: Groebner[LeadingMonomial](MHt(x,y,n,m),plex(seq(op([x[i],y[i]]),i=1..m),seq(x[i],i=m+1..n) )): end: #VecsTwo(n,m): The set of exponents pf LeMHt(x,y,n,m). Try: #VecsTwo(3,2); VecsTwo:=proc(n,m) local i,gu,x,y,g: option remember: gu:=LeMHt(x,y,n,m): [seq([seq(op([degree(g,x[i]), degree(g,y[i])]), i=1..m),seq(degree(g,x[i]),i=m+1..n)],g in gu)]: end: #SurvT(n,m): The set of vectors that survive after kicking out all the vectors >=vectors in VecsT(n,m). Try: #SurvT(n,m); SurvT:=proc(n,m) local c,gu,V,gu1,i: option remember: gu:=Cond(VecsTwo(n,m),c): V:=[seq(c[i],i=1..n+m)]: {seq(subs(gu1,V),gu1 in gu)}: end: #WtT(L,p,q): the weight of the vector L of even length. p^SumOfEvenEntries*q^SumOfOddEntries WtT:=proc(L,n,m,p,q) local i: if nops(L)<>n+m then RETURN(FAIL): fi: p^add(L[2*i-1],i=1..m)*q^add(L[2*i],i=1..m)*p^add(L[i],i=2*m+1..m+n): end: #HPt(n,m,p,q): The generalized Haiman polynomial (Hilbert bi-series of the space of general Diagonal Harmonics of (n,m) variables. #HPt(4,2,p,q); HPt:=proc(n,m,p,q) local gu,gu1: option remember: gu:=SurvT(n,m): gu:=add(WtT(gu1,n,m,p,q),gu1 in gu): add(factor(coeff(gu,q,i))*q^i,i=0..degree(gu,q)): end: #VecsTree(n): inputs a positive integer n and outputs the member of Vecs(n) according to their parents. Try: #VecsTree(3); VecsTree:=proc(n) local P,C,T,p,c,hore: C:=convert(Vecs(n),set): P:={seq([op(1..2*n-2,c)],c in C)}: for p in P do T[p]:={}: od: for c in C do hore:=[op(1..2*n-2,c)]: T[hore]:= T[hore] union {[op(2*n-1..2*n,c)]}: od: {seq([p,T[p]], p in P)}; end: ##start with [x1,...,xn,y1,..,ym, ordering] #MHtA(x,y,n,m): The Groebner basis of the generalized (n,m) Haiman ideal but with ordering [x1,...,xn,y1,..ym]. Try: #MHtA(x,y,3,2); MHtA:=proc(x,y,n,m) local i: option remember: Groebner[Basis]( Id2T(x,y,n,m), plex(seq(x[i],i=1..n), seq(y[i],i=1..m) ) ): end: #LeMHtA(x,y,n,m): The set of Leading Monomials f the Groebner basis of the generalized (m,n) Haiman ideal #but with ordering [x1,...,xn,y1,..ym]. Try: #LeMHtA(x,y,3,2); LeMHtA:=proc(x,y,n,m) local i: option remember: Groebner[LeadingMonomial](MHtA(x,y,n,m), plex(seq(x[i],i=1..n), seq(y[i],i=1..m) ) ): end: #VecsTwoA(n,m): The set of exponents pf LeMHtA(x,y,n,m). Try: #VecsTwoA(3,2); VecsTwoA:=proc(n,m) local i,gu,x,y,g: option remember: gu:=LeMHtA(x,y,n,m): [seq([seq(degree(g,x[i]),i=1..n),seq(degree(g,y[i]),i=1..m)],g in gu)]: end: #SurvTA(n,m): The set of vectors that survive after kicking out all the vectors >=vectors in VecsTA(n,m). Try: #SurvTA(n,m); SurvTA:=proc(n,m) local c,gu,V,gu1,i: option remember: gu:=Cond(VecsTwoA(n,m),c): V:=[seq(c[i],i=1..n+m)]: {seq(subs(gu1,V),gu1 in gu)}: end: #SurvTree(n): inputs a positive integer n and outputs the member of Surv(n) according to their parents. Try: #SurvTree(3); SurvTree:=proc(n) local P,C,T,p,c,hore: C:=Surv(n): P:={seq([op(1..2*n-2,c)],c in C)}: if P<>Surv(n-1) then print(`Something is wrong`): RETURN(FAIL): fi: for p in P do T[p]:={}: od: for c in C do hore:=[op(1..2*n-2,c)]: T[hore]:= T[hore] union {[op(2*n-1..2*n,c)]}: od: {seq([p,T[p]], p in P)}; end: #NiceP(f,p,q): displays the coefficients of the polynomial f in p and q nicely. Try #NiceP((1+p)^3*(1+q)^2,p,q); NiceP:=proc(f,p,q) local i,j,f1: for i from 0 to degree(f,p) do f1:=coeff(f,p,i): lprint(seq(coeff(f1,q,j),j=0..degree(f1,q))): od: end: #ColD(N): collects the Hyman data for N>=n>=m>=1. Try: #ColD(3); ColD:=proc(N) local m,n,p,q: for n from 1 to N do for m from 1 to n do print(`The Haiman table for [m,n]=`,[m,n], ` is : `): print(``): NiceP( HPt(n,m,p,q),p,q): od: od: end: #HMnice(m,n): The Maiman matrix in ince form. Try: #HMnice(3,3); HMnice:=proc(m,n) local i,j,p,q,gu,d1,d2,mu,gu1: gu:= HPt(n,m,p,q): d1:=degree(gu,p): d2:=degree(gu,q): mu:=[]: for i from 0 to d1 do gu1:=coeff(gu,p,i): mu:=[op(mu),[seq(coeff(gu1,q,j),j=0..d2)]]: od: mu: end: HPpc:=proc(n,p,q) local gu: gu:= [1, 1+q+p, p^3+p^2*q+p*q^2+q^3+2*p^2+3*p*q+2*q^2+2*p+2*q+1, p^6+p^5*q+p^4*q^2+p ^3*q^3+p^2*q^4+p*q^5+q^6+3*p^5+4*p^4*q+4*p^3*q^2+4*p^2*q^3+4*p*q^4+3*q^5+5*p^4+ 9*p^3*q+9*p^2*q^2+9*p*q^3+5*q^4+6*p^3+11*p^2*q+11*p*q^2+6*q^3+5*p^2+8*p*q+5*q^2 +3*p+3*q+1, p^10+p^9*q+p^8*q^2+p^7*q^3+p^6*q^4+p^5*q^5+p^4*q^6+p^3*q^7+p^2*q^8+ p*q^9+q^10+4*p^9+5*p^8*q+5*p^7*q^2+5*p^6*q^3+5*p^5*q^4+5*p^4*q^5+5*p^3*q^6+5*p^ 2*q^7+5*p*q^8+4*q^9+9*p^8+14*p^7*q+15*p^6*q^2+15*p^5*q^3+15*p^4*q^4+15*p^3*q^5+ 15*p^2*q^6+14*p*q^7+9*q^8+15*p^7+29*p^6*q+33*p^5*q^2+34*p^4*q^3+34*p^3*q^4+33*p ^2*q^5+29*p*q^6+15*q^7+20*p^6+44*p^5*q+54*p^4*q^2+58*p^3*q^3+54*p^2*q^4+44*p*q^ 5+20*q^6+22*p^5+51*p^4*q+66*p^3*q^2+66*p^2*q^3+51*p*q^4+22*q^5+20*p^4+46*p^3*q+ 56*p^2*q^2+46*p*q^3+20*q^4+15*p^3+31*p^2*q+31*p*q^2+15*q^3+9*p^2+15*p*q+9*q^2+4 *p+4*q+1, p^15+p^14*q+p^13*q^2+p^12*q^3+p^11*q^4+p^10*q^5+p^9*q^6+p^8*q^7+p^7*q^8+p^6*q^9 +p^5*q^10+p^4*q^11+p^3*q^12+p^2*q^13+p*q^14+q^15+5*p^14+6*p^13*q+6*p^12*q^2+6*p ^11*q^3+6*p^10*q^4+6*p^9*q^5+6*p^8*q^6+6*p^7*q^7+6*p^6*q^8+6*p^5*q^9+6*p^4*q^10 +6*p^3*q^11+6*p^2*q^12+6*p*q^13+5*q^14+14*p^13+20*p^12*q+21*p^11*q^2+21*p^10*q^ 3+21*p^9*q^4+21*p^8*q^5+21*p^7*q^6+21*p^6*q^7+21*p^5*q^8+21*p^4*q^9+21*p^3*q^10 +21*p^2*q^11+20*p*q^12+14*q^13+29*p^12+49*p^11*q+55*p^10*q^2+56*p^9*q^3+56*p^8* q^4+56*p^7*q^5+56*p^6*q^6+56*p^5*q^7+56*p^4*q^8+56*p^3*q^9+55*p^2*q^10+49*p*q^ 11+29*q^12+49*p^11+98*p^10*q+118*p^9*q^2+124*p^8*q^3+125*p^7*q^4+125*p^6*q^5+ 125*p^5*q^6+125*p^4*q^7+124*p^3*q^8+118*p^2*q^9+98*p*q^10+49*q^11+71*p^10+163*p ^9*q+212*p^8*q^2+232*p^7*q^3+238*p^6*q^4+238*p^5*q^5+238*p^4*q^6+232*p^3*q^7+ 212*p^2*q^8+163*p*q^9+71*q^10+90*p^9+229*p^8*q+322*p^7*q^2+371*p^6*q^3+385*p^5* q^4+385*p^4*q^5+371*p^3*q^6+322*p^2*q^7+229*p*q^8+90*q^9+101*p^8+276*p^7*q+415* p^6*q^2+493*p^5*q^3+513*p^4*q^4+493*p^3*q^5+415*p^2*q^6+276*p*q^7+101*q^8+101*p ^7+287*p^6*q+447*p^5*q^2+532*p^4*q^3+532*p^3*q^4+447*p^2*q^5+287*p*q^6+101*q^7+ 90*p^6+257*p^5*q+398*p^4*q^2+453*p^3*q^3+398*p^2*q^4+257*p*q^5+90*q^6+71*p^5+ 196*p^4*q+287*p^3*q^2+287*p^2*q^3+196*p*q^4+71*q^5+49*p^4+125*p^3*q+160*p^2*q^2 +125*p*q^3+49*q^4+29*p^3+64*p^2*q+64*p*q^2+29*q^3+14*p^2+24*p*q+14*q^2+5*p+5*q+ 1 ]: if n<=6 then gu[n]: else HP(n,p,q): fi: end: #A(n,i,j): coeff(coeff(HPpc(n,p,q),p,i),q,j). Try: #A(5,2,3); A:=proc(n,i,j) local p,q: coeff(coeff(HPpc(n,p,q),p,i),q,j): end: #HalevOld(n,a,b): the value of the operator A(n,a,b)-add(add(A(n-1,a1,b-b1),a1=0..a),b1=0..n-a-1). #Try Halev(5,2,2); HalevOld:=proc(n,a,b) local a1,b1,p,q: coeff(coeff(HPpc(n,p,q),p,a),q,b)- add(add(coeff(coeff(HPpc(n-1,p,q),p,a1),q,b-b1) ,a1=0..a),b1=0..n-a-1): end: #Halev(n,a,b): the value of the operator A(n,a,b)-add(add(A(n-1,a1,b-b1),a1=0..a),b1=0..n-a-1). #Try Halev(5,2,2); Halev:=proc(n,a,b) local a1,b1: A(n,a,b)-add(add(A(n-1,a1,b-b1) ,a1=0..a),b1=0..n-a-1): end: ############start partial #Id2p(x,y,n,s): the set prs(r,s1,x,y,n) for 1<=r<=n,0<=s1<=s. Try: #Id2p(x,y,3,0); Id2p:=proc(x,y,n,s) local r,C,s1: {seq(prs(r,0,x,y,n),r=1..n),seq(seq(prs(r,s1,x,y,n),r=0..n-s1),s1=1..s)}: end: #MHp(x,y,n,s): The Groebner basis of the Haiman ideal. Try #MHp(x,y,3,s); MHp:=proc(x,y,n,s) local i: Groebner[Basis](Id2p(x,y,n,s),plex(seq(op([x[i],y[i]]),i=1..n)) ): end: #LeMHp(x,y,n,s): The set of Leading Monomials f the Groebner basis of the Haiman ideal. Try #LeMHp(x,y,3,1); LeMHp:=proc(x,y,n,s) local i: option remember: Groebner[LeadingMonomial](MHp(x,y,n,s),plex(seq(op([x[i],y[i]]),i=1..n))): end: #Vecsp(n,s): The set of exponents pf LeMH(x,y,n). Try: #Vecsp(3,1); Vecsp:=proc(n,s) local i,gu,x,y,g: option remember: gu:=LeMHp(x,y,n,s): [seq([seq([degree(g,x[i]), degree(g,y[i])], i=1..n)],g in gu)]: end: #MHpA(x,y,n,s): The Groebner basis of the Haiman ideal. Try #MHpA(x,y,3,s); MHpA:=proc(x,y,n,s) local i: Groebner[Basis](Id2p(x,y,n,s),plex(seq(x[i],i=1..n), seq(y[i],i=1..n) ) ): end: #LeMHpA(x,y,n,s): The set of Leading Monomials f the Groebner basis of the Haiman ideal. Try #LeMHpA(x,y,3,1); LeMHpA:=proc(x,y,n,s) local i: option remember: Groebner[LeadingMonomial](MHpA(x,y,n,s),plex(seq(x[i],i=1..n), seq(y[i],i=1..n) )): end: #VecspA(n,s): The set of exponents pf LeMH(x,y,n). Try: #VecspA(3,1); VecspA:=proc(n,s) local i,x,y,g,gu: option remember: gu:=LeMHpA(x,y,n,s): {seq([ [seq(degree(g,x[i]), i=1..n)], [seq(degree(g,y[i]), i=1..n)]], g in gu)}: end: