Skip to content

Commit

Permalink
Trac 17359: fix Hom sets for schemes and Hecke modules
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbruin committed Dec 8, 2014
1 parent 0925390 commit b669992
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
20 changes: 16 additions & 4 deletions src/sage/categories/hecke_modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,9 @@ def _Hom_(self, Y, category):

class Homsets(HomsetsCategory):
"""
.. TODO:: shall there be any additional category structure on Homsets of hecke modules?
TESTS::
sage: HeckeModules(ZZ).Homsets().super_categories()
[Category of homsets]
sage: TestSuite(HeckeModules(ZZ).Homsets()).run()
"""

def base_ring(self):
Expand All @@ -169,5 +166,20 @@ def base_ring(self):
"""
return self.base_category().base_ring()

def extra_super_categories(self):
"""
TESTS:
Check that Hom sets of Hecke modules are in the correct
category (see :trac:`17359`)::
sage: HeckeModules(ZZ).Homsets().super_categories()
[Category of modules over Integer Ring, Category of homsets]
sage: HeckeModules(QQ).Homsets().super_categories()
[Category of vector spaces over Rational Field, Category of homsets]
"""
from sage.categories.modules import Modules
return [Modules(self.base_ring())]

class ParentMethods:
pass
15 changes: 5 additions & 10 deletions src/sage/categories/schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ class Schemes(Category):
TESTS::
sage: TestSuite(Schemes()).run()
Check that Hom sets of schemes are in the correct category::
sage: Schemes().Homsets().super_categories()
[Category of homsets]
"""

@staticmethod
Expand Down Expand Up @@ -145,16 +150,6 @@ def _call_(self, x):
raise TypeError("No way to create an object or morphism in %s from %s"%(self, x))


class Homsets(HomsetsCategory):
"""
TESTS::
sage: Schemes().Homsets().super_categories()
[Category of homsets]
.. TODO:: shall there be any additional category structure on Homsets of hecke modules?
"""

#############################################################
# Schemes over a given base scheme.
#############################################################
Expand Down

0 comments on commit b669992

Please sign in to comment.