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

Commit 0579337

Browse files
author
Travis Scrimshaw
committed
Some reviewer tweaks and doc additions.
1 parent 7fd1df2 commit 0579337

5 files changed

+59
-9
lines changed

src/sage/categories/modules.py

+9-2
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,10 @@ def Super(self, base_ring=None):
405405
406406
.. TODO::
407407
408-
Same as :meth:`Graded`.
408+
- Explain why this does not commute with :meth:`WithBasis`
409+
- Improve the support for covariant functorial
410+
constructions categories over a base ring so as to
411+
get rid of the ``base_ring`` argument.
409412
410413
TESTS::
411414
@@ -476,7 +479,11 @@ def tensor_square(self):
476479
477480
sage: A = HopfAlgebrasWithBasis(QQ).example()
478481
sage: A.tensor_square()
479-
An example of Hopf algebra with basis: the group algebra of the Dihedral group of order 6 as a permutation group over Rational Field # An example of Hopf algebra with basis: the group algebra of the Dihedral group of order 6 as a permutation group over Rational Field
482+
An example of Hopf algebra with basis:
483+
the group algebra of the Dihedral group of order 6
484+
as a permutation group over Rational Field # An example
485+
of Hopf algebra with basis: the group algebra of the Dihedral
486+
group of order 6 as a permutation group over Rational Field
480487
"""
481488
return tensor([self, self])
482489

src/sage/categories/super_algebras.py

+12
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@ class SuperAlgebras(SuperModulesCategory):
1717
"""
1818
The category of super algebras.
1919
20+
An `R`-*super algebra* is an `R`-super module `A` endowed with an
21+
`R`-algebra structure satisfying
22+
23+
.. MATH::
24+
25+
A_0 A_0 \subseteq A_0, \qquad
26+
A_0 A_1 \subseteq A_1, \qquad
27+
A_1 A_0 \subseteq A_1, \qquad
28+
A_1 A_1 \subseteq A_0
29+
30+
and `1 \in A_0`.
31+
2032
EXAMPLES::
2133
2234
sage: Algebras(ZZ).Super()

src/sage/categories/super_hopf_algebras_with_basis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
class SuperHopfAlgebrasWithBasis(SuperModulesCategory):
1414
"""
15-
The category of super algebras with a distinguished basis
15+
The category of super Hopf algebras with a distinguished basis.
1616
1717
EXAMPLES::
1818

src/sage/categories/super_modules.py

+21-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
from sage.categories.covariant_functorial_construction import CovariantConstructionCategory
1717
from sage.categories.modules import Modules
1818

19+
# Note, a commutative algebra is not a commutative super algebra,
20+
# therefore the following whitelist.
1921
axiom_whitelist = frozenset(["Facade", "Finite", "Infinite",
2022
"FiniteDimensional", "Connected", "WithBasis",
2123
# "Commutative",
@@ -88,6 +90,15 @@ class SuperModules(SuperModulesCategory):
8890
"""
8991
The category of super modules.
9092
93+
An `R`-*super module* (where `R` is a ring) is an `R`-module `M` equipped
94+
with a decomposition `M = M_0 \oplus M_1` into two `R`-submodules
95+
`M_0` and `M_1` (called the *even part* and the *odd part* of `M`,
96+
respectively).
97+
98+
Thus, an `R`-super module automatically becomes a `\ZZ / 2 \ZZ`-graded
99+
`R`-module, with `M_0` being the degree-`0` component and `M_1` being the
100+
degree-`1` component.
101+
91102
EXAMPLES::
92103
93104
sage: Modules(ZZ).Super()
@@ -134,7 +145,7 @@ def extra_super_categories(self):
134145
[]
135146
136147
This makes sure that ``Modules(QQ).Super()`` returns an
137-
instance of :class:`GradedModules` and not a join category of
148+
instance of :class:`SuperModules` and not a join category of
138149
an instance of this class and of ``VectorSpaces(QQ)``::
139150
140151
sage: type(Modules(QQ).Super())
@@ -144,7 +155,7 @@ def extra_super_categories(self):
144155
145156
Get rid of this workaround once there is a more systematic
146157
approach for the alias ``Modules(QQ)`` -> ``VectorSpaces(QQ)``.
147-
Probably the later should be a category with axiom, and
158+
Probably the latter should be a category with axiom, and
148159
covariant constructions should play well with axioms.
149160
"""
150161
from sage.categories.modules import Modules
@@ -164,6 +175,14 @@ def is_even_odd(self):
164175
Return ``0`` if ``self`` is an even element or ``1``
165176
if an odd element.
166177
178+
.. NOTE::
179+
180+
The default implementation assumes that the even/odd is
181+
determined by the parity of :meth:`degree`.
182+
183+
Overwrite this method if the even/odd behavior is desired
184+
to be independent.
185+
167186
EXAMPLES::
168187
169188
sage: cat = Algebras(QQ).WithBasis().Super()

src/sage/categories/super_modules_with_basis.py

+16-4
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ class SuperModulesWithBasis(SuperModulesCategory):
1414
"""
1515
The category of super modules with a distinguished basis.
1616
17+
An `R`-*super module with a distinguished basis* is an
18+
`R`-super module equipped with an `R`-module basis whose elements are
19+
homogeneous.
20+
1721
EXAMPLES::
1822
1923
sage: C = GradedModulesWithBasis(ZZ); C
@@ -31,13 +35,21 @@ class SuperModulesWithBasis(SuperModulesCategory):
3135
class ParentMethods:
3236
def _even_odd_on_basis(self, m):
3337
"""
34-
Return if ``m`` is an index of an even or odd basis element.
38+
Return the parity of the basis element indexed by ``m``.
3539
3640
OUTPUT:
3741
3842
``0`` if ``m`` is for an even element or ``1`` if ``m``
3943
is for an odd element.
4044
45+
.. NOTE::
46+
47+
The default implementation assumes that the even/odd is
48+
determined by the parity of :meth:`degree`.
49+
50+
Overwrite this method if the even/odd behavior is desired
51+
to be independent.
52+
4153
EXAMPLES::
4254
4355
sage: Q = QuadraticForm(QQ, 2, [1,2,3])
@@ -53,7 +65,7 @@ class ElementMethods:
5365
def is_super_homogeneous(self):
5466
r"""
5567
Return whether this element is homogeneous, in the sense
56-
of a super module.
68+
of a super module (i.e., is even or odd).
5769
5870
EXAMPLES::
5971
@@ -70,8 +82,8 @@ def is_super_homogeneous(self):
7082
False
7183
7284
The exterior algebra has a `\ZZ` grading, which induces the
73-
`\ZZ / 2\ZZ` grading, however the definition of homogeneous
74-
elements differ because of the different gradings::
85+
`\ZZ / 2\ZZ` grading. However the definition of homogeneous
86+
elements differs because of the different gradings::
7587
7688
sage: E.<x,y> = ExteriorAlgebra(QQ)
7789
sage: a = x*y + 4

0 commit comments

Comments
 (0)