@@ -954,9 +954,8 @@ def _product_LTwTv(self, L, w, v):
954
954
ret = {v : self .base_ring ().one ()}
955
955
qm1 = self ._q - self .base_ring ().one ()
956
956
for i in reversed (w .reduced_word ()):
957
- temp = {} # start from 0
958
- for p in ret :
959
- c = ret [p ]
957
+ temp = {} # start from 0
958
+ for p , c in ret .items ():
960
959
# We have to flip the side due to Sage's
961
960
# convention for multiplying permutations
962
961
pi = p .apply_simple_reflection (i , side = 'left' )
@@ -965,7 +964,7 @@ def _product_LTwTv(self, L, w, v):
965
964
else :
966
965
iaxpy (1 , {pi : c }, temp )
967
966
ret = temp
968
- return {(L , p ): ret [ p ] for p in ret }
967
+ return {(L , p ): c for p , c in ret . items () }
969
968
970
969
def _product_Tw_L (self , w , L ):
971
970
r"""
@@ -1011,10 +1010,9 @@ def _product_Tw_L(self, w, L):
1011
1010
q = self ._q
1012
1011
one = q .parent ().one ()
1013
1012
for i in w .reduced_word ()[::- 1 ]:
1014
- iL = {} # this will become T_i * L, written in standard form
1015
- for lv in wL :
1016
- c = wL [lv ]
1017
- L = list (lv [0 ]) # make a copy
1013
+ iL = {} # this will become T_i * L, written in standard form
1014
+ for lv , c in wL .items ():
1015
+ L = list (lv [0 ]) # make a copy
1018
1016
v = lv [1 ]
1019
1017
a , b = L [i - 1 ], L [i ]
1020
1018
L [i - 1 ], L [i ] = L [i ], L [i - 1 ] # swap L_i=L[i-1] and L_{i+1}=L[i]
@@ -1038,7 +1036,7 @@ def _product_Tw_L(self, w, L):
1038
1036
c *= (one - q )
1039
1037
iaxpy (1 , {(tuple (l ), v ): c for l in Ls }, iL )
1040
1038
1041
- wL = iL # replace wL with iL and repeat
1039
+ wL = iL # replace wL with iL and repeat
1042
1040
return self ._from_dict (wL , remove_zeros = False , coerce = False )
1043
1041
1044
1042
@cached_method
0 commit comments