Skip to content

Commit

Permalink
Update src/sage/homology/homology_vector_space_with_basis.py
Browse files Browse the repository at this point in the history
Co-authored-by: Travis Scrimshaw <[email protected]>
  • Loading branch information
jhpalmieri and tscrim authored Sep 23, 2023
1 parent 647c9bd commit 9df8bba
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/sage/homology/homology_vector_space_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -690,11 +690,10 @@ def _acted_upon_(self, a, self_on_left):
if m <= n:
return self.parent().zero()

vec = []
for x in sorted(self.parent().dual().basis(m-n)):
vec.append(self.eval(a * x))
B = list(self.parent().basis(m-n))
return self.parent().linear_combination(zip(B, vec))
P = self.parent()
B = list(P.basis(m-n))
return P._from_dict({b.support()[0]: self.eval(a * x)
for x in sorted(self.parent().dual().basis(m-n))})


class CohomologyRing(HomologyVectorSpaceWithBasis):
Expand Down

0 comments on commit 9df8bba

Please sign in to comment.