Skip to content

Commit

Permalink
fix PoincareBirkhoffWittBasis.Element._act_on_
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed May 2, 2024
1 parent dc98444 commit f9124c5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/sage/algebras/lie_algebras/poincare_birkhoff_witt.py
Original file line number Diff line number Diff line change
Expand Up @@ -609,24 +609,24 @@ def _act_on_(self, x, self_on_left):
return ret
cm = get_coercion_model()
L = self.parent()._g
if self_on_left:
if cm.discover_action(L, x.parent(), mul):
ret = x.parent().zero()
X = x.parent()
action = X.get_action(L, self_on_left=not self_on_left)
if action:
assert action.actor() is L
ret = X.zero()
if self_on_left:
for mon, coeff in self._monomial_coefficients.items():
term = coeff * x
for k, exp in reversed(mon._sorted_items()):
for _ in range(exp):
term = L.monomial(k) * term
ret += term
return ret
else:
if cm.discover_action(x.parent(), L, mul):
ret = x.parent().zero()
else:
for mon, coeff in self._monomial_coefficients.items():
term = coeff * x
term = x * coeff
for k, exp in reversed(mon._sorted_items()):
for _ in range(exp):
term = term * L.monomial(k)
ret += term
return ret
return ret
return None

0 comments on commit f9124c5

Please sign in to comment.