@@ -954,9 +954,8 @@ def _product_LTwTv(self, L, w, v):
954954 ret = {v : self .base_ring ().one ()}
955955 qm1 = self ._q - self .base_ring ().one ()
956956 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 ():
960959 # We have to flip the side due to Sage's
961960 # convention for multiplying permutations
962961 pi = p .apply_simple_reflection (i , side = 'left' )
@@ -965,7 +964,7 @@ def _product_LTwTv(self, L, w, v):
965964 else :
966965 iaxpy (1 , {pi : c }, temp )
967966 ret = temp
968- return {(L , p ): ret [ p ] for p in ret }
967+ return {(L , p ): c for p , c in ret . items () }
969968
970969 def _product_Tw_L (self , w , L ):
971970 r"""
@@ -1011,10 +1010,9 @@ def _product_Tw_L(self, w, L):
10111010 q = self ._q
10121011 one = q .parent ().one ()
10131012 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
10181016 v = lv [1 ]
10191017 a , b = L [i - 1 ], L [i ]
10201018 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):
10381036 c *= (one - q )
10391037 iaxpy (1 , {(tuple (l ), v ): c for l in Ls }, iL )
10401038
1041- wL = iL # replace wL with iL and repeat
1039+ wL = iL # replace wL with iL and repeat
10421040 return self ._from_dict (wL , remove_zeros = False , coerce = False )
10431041
10441042 @cached_method
0 commit comments