from sage.categories.all import FreeModules
from sage.categories.map import Map
+def _is_clan(x):
+ r"""
+ I'm sure there's a great reason why this basic functionality
+ doesn't work, but I don't have the time to waste right now.
+ """
+ return any( str(c).startswith("Category of clans")
+ for c in x.categories() )
+
class ClanOperator(Map):
r"""
An operator between two clans.
"""
def __init__(self, domain, codomain, mat):
- from mjo.clan.clan import Clans
-
- if not domain in Clans:
+ if not _is_clan(domain):
raise TypeError("domain must be a clan")
- if not codomain in Clans:
+ if not _is_clan(codomain):
raise TypeError("codomain must be a clan")
F = domain.base_ring()