# by Viktor Petrov 2006 # withcoxeter(): withweyl(): reflect_weights := proc (R) local C,i,j; C:=cartan_matrix(R); [seq(omega[i]-add(C[i,j]*omega[j],j=1..rank(R)),i=1..rank(R))]; end proc: weyl_length := proc (C, r, w) local res, i, j, t; t:=add(omega[i],i=1..r); res := 0; for i to nops(w) do if coeff(t,omega[w[i]])>0 then res:=res+1 else res:=res-1; fi; t := subs(omega[w[i]]=C[w[i]],t); od; res; end proc: pieri1 := proc (R, k, w) option remember; local C, r, i, j, t, wop, w0, w1, res; w0:=longest_elt(R); wop := reduce([op(ListTools[Reverse](w)),op(w0)],R); res:=0; C:=reflect_weights(R); r:=rank(R); for i to nops(wop) do w1:=[op(wop[1..i-1]),op(wop[i+1..nops(wop)])]; if weyl_length(C,r,w1)=nops(wop)-1 then t:=omega[k]; for j to i-1 do t:=subs(omega[wop[j]]=C[wop[j]],t); od; res:=res+coeff(t,omega[wop[i]])*Z[op(reduce([op(w0),op(ListTools[Reverse](w1))],R))]; fi; od; res; end proc: my_indets := proc (p) local res, i, S; S:=indets(p); res:=[]; for i to nops(S) do if op(0,S[i])=Z then res:=[op(res),[seq(op(j,S[i]),j=1..nops(S[i]))]]; fi; od; res; end proc: pieri2 := proc (R, k, p) local L,i; L:=my_indets(p); subs(seq(Z[op(L[i])]=pieri1(R,k,L[i]),i=1..nops(L)),p) end proc: pieri := proc (R, k, n, p) local i,t; t:=p; for i to n do t:=pieri2(R,k,t); od; t; end proc: # Example of computing the multiplication Z[1]*D_2^5 in CH(G/B), # where D_2 is the divisor corresponding to the second root. pieri(F4,2,5,Z[1]);