Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

54

55

56

57

58

59

60

61

62

63

64

65

66

67

68

69

70

71

72

73

74

75

76

77

78

79

80

81

82

83

84

85

86

87

88

89

90

91

92

93

94

95

96

97

98

99

100

101

102

103

104

105

106

107

108

109

110

111

112

113

114

115

116

117

118

119

120

121

122

123

124

125

126

127

128

129

130

131

132

133

134

r""" 

Graded modules 

""" 

#***************************************************************************** 

# Copyright (C) 2008 Teresa Gomez-Diaz (CNRS) <Teresa.Gomez-Diaz@univ-mlv.fr> 

# 2008-2013 Nicolas M. Thiery <nthiery at users.sf.net> 

# 

# Distributed under the terms of the GNU General Public License (GPL) 

# http://www.gnu.org/licenses/ 

#****************************************************************************** 

 

from sage.misc.cachefunc import cached_method 

from sage.misc.lazy_attribute import lazy_class_attribute 

from sage.categories.category import Category 

from sage.categories.category_types import Category_over_base_ring 

from sage.categories.category_with_axiom import CategoryWithAxiom_over_base_ring 

from sage.categories.covariant_functorial_construction import RegressiveCovariantConstructionCategory 

 

class GradedModulesCategory(RegressiveCovariantConstructionCategory, Category_over_base_ring): 

def __init__(self, base_category): 

""" 

EXAMPLES:: 

 

sage: C = GradedAlgebras(QQ) 

sage: C 

Category of graded algebras over Rational Field 

sage: C.base_category() 

Category of algebras over Rational Field 

sage: sorted(C.super_categories(), key=str) 

[Category of filtered algebras over Rational Field, 

Category of graded modules over Rational Field] 

 

sage: AlgebrasWithBasis(QQ).Graded().base_ring() 

Rational Field 

sage: GradedHopfAlgebrasWithBasis(QQ).base_ring() 

Rational Field 

 

TESTS:: 

 

sage: GradedModules(ZZ) 

Category of graded modules over Integer Ring 

sage: Modules(ZZ).Graded() 

Category of graded modules over Integer Ring 

sage: GradedModules(ZZ) is Modules(ZZ).Graded() 

True 

""" 

super(GradedModulesCategory, self).__init__(base_category, base_category.base_ring()) 

 

_functor_category = "Graded" 

 

def _repr_object_names(self): 

""" 

EXAMPLES:: 

 

sage: AlgebrasWithBasis(QQ).Graded() # indirect doctest 

Category of graded algebras with basis over Rational Field 

""" 

return "graded {}".format(self.base_category()._repr_object_names()) 

 

@classmethod 

def default_super_categories(cls, category, *args): 

r""" 

Return the default super categories of ``category.Graded()``. 

 

Mathematical meaning: every graded object (module, algebra, 

etc.) is a filtered object with the (implicit) filtration 

defined by `F_i = \bigoplus_{j \leq i} G_j`. 

 

INPUT: 

 

- ``cls`` -- the class ``GradedModulesCategory`` 

- ``category`` -- a category 

 

OUTPUT: a (join) category 

 

In practice, this returns ``category.Filtered()``, joined 

together with the result of the method 

:meth:`RegressiveCovariantConstructionCategory.default_super_categories() <sage.categories.covariant_functorial_construction.RegressiveCovariantConstructionCategory.default_super_categories>` 

(that is the join of ``category.Filtered()`` and ``cat`` for 

each ``cat`` in the super categories of ``category``). 

 

EXAMPLES: 

 

Consider ``category=Algebras()``, which has ``cat=Modules()`` 

as super category. Then, a grading of an algebra `G` 

is also a filtration of `G`:: 

 

sage: Algebras(QQ).Graded().super_categories() 

[Category of filtered algebras over Rational Field, 

Category of graded modules over Rational Field] 

 

This resulted from the following call:: 

 

sage: sage.categories.graded_modules.GradedModulesCategory.default_super_categories(Algebras(QQ)) 

Join of Category of filtered algebras over Rational Field 

and Category of graded modules over Rational Field 

""" 

cat = super(GradedModulesCategory, cls).default_super_categories(category, *args) 

return Category.join([category.Filtered(), cat]) 

 

class GradedModules(GradedModulesCategory): 

r""" 

The category of graded modules. 

 

We consider every graded module `M = \bigoplus_i M_i` as a 

filtered module under the (natural) filtration given by 

 

.. MATH:: 

 

F_i = \bigoplus_{j < i} M_j. 

 

EXAMPLES:: 

 

sage: GradedModules(ZZ) 

Category of graded modules over Integer Ring 

sage: GradedModules(ZZ).super_categories() 

[Category of filtered modules over Integer Ring] 

 

The category of graded modules defines the graded structure which 

shall be preserved by morphisms:: 

 

sage: Modules(ZZ).Graded().additional_structure() 

Category of graded modules over Integer Ring 

 

TESTS:: 

 

sage: TestSuite(GradedModules(ZZ)).run() 

""" 

class ParentMethods: 

pass 

 

class ElementMethods: 

pass