####################################################################
#  Compute products in the equivariant cohomology of Fl(2,4;5)     #
#  and the equivariant quantum cohomology of Gr(2,5), reproducing  #
#  Example 2.2 and Example 2.5 in the paper                        #
#  "Mutations of puzzles and equivariant cohomology of two-step    #
#  flag varieties" by A. Buch.                                     #
####################################################################


read equivcalc:
with(equivcalc):


t2y := {seq(t[i] = y[i+1]-y[i], i=1..4)}:


printf("H_T(Fl(2,4;5)):\n"):
Fl(2,4,5):
up := X[1,4,2,5,3]:   #  012-string 01201
vp := X[2,4,1,3,5]:
u := sp_weyl(up):
v := sp_weyl(vp):
prd := expand(subs(t2y, htmult(u, v))):
lprint(weyl_sp(u * v = prd)):
printf("\n"):


printf("QH_T(Gr(2,5)):\n"):
Gr(2,5):
la := X[2,1]:
mu := X[3,1]:
u := part_weyl(la):
v := part_weyl(mu):
prd := expand(subs(t2y, comin_qhtmult(u, v))):
lprint(weyl_part(u * v = prd)):


###

