Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac #31669: make lift_from_homology entirely abstract
Browse files Browse the repository at this point in the history
  • Loading branch information
mjungmath committed Apr 23, 2021
1 parent 57ee0af commit a475f2a
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/sage/categories/chain_complexes.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def super_categories(self):
return [Modules(base_ring)]

class ParentMethods:
@abstract_method(optional=True)
@abstract_method
def homology(self, n=None):
r"""
Return the homology of the chain complex.
Expand Down Expand Up @@ -114,6 +114,7 @@ def differential(self, *args, **kwargs):
"""

@abstract_method(optional=True)
def lift_from_homology(self, x):
r"""
Lift the homology element ``x`` to the corresponding module.
Expand All @@ -123,12 +124,6 @@ def lift_from_homology(self, x):
...
"""
try:
# is homology already a quotient?
x.lift()
except AttributeError:
# if not, this methods needs to be overwritten by parent
raise NotImplementedError

def reduce_to_homology(self, x, n=None):
r"""
Expand Down

0 comments on commit a475f2a

Please sign in to comment.