Skip to content

Commit

Permalink
Trac #32505: Finitely presented graded modules over graded connected …
Browse files Browse the repository at this point in the history
…algebras

This is a precursor to #30680, laying out the framework for finitely
presented modules over graded connected algebras. #30680 will focus on
the case of the Steenrod algebra, with specific applications in mind.

URL: https://trac.sagemath.org/32505
Reported by: jhpalmieri
Ticket author(s): Bob Bruner, Michael Catanzaro, Sverre Lunøe-Nielsen,
Koen van Woerden, John Palmieri, Travis Scrimshaw
Reviewer(s): John Palmieri, Travis Scrimshaw
  • Loading branch information
Release Manager committed Feb 6, 2022
2 parents 226937d + a1a9467 commit 9c6afb9
Show file tree
Hide file tree
Showing 15 changed files with 5,987 additions and 14 deletions.
15 changes: 15 additions & 0 deletions src/doc/en/reference/modules/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,19 @@ Modules
sage/modules/multi_filtered_vector_space
sage/modules/tensor_operations

Finitely presented graded modules
---------------------------------

.. toctree::
:maxdepth: 2

sage/modules/fp_graded/free_module
sage/modules/fp_graded/free_element
sage/modules/fp_graded/free_morphism
sage/modules/fp_graded/free_homspace
sage/modules/fp_graded/module
sage/modules/fp_graded/element
sage/modules/fp_graded/morphism
sage/modules/fp_graded/homspace

.. include:: ../footer.txt
2 changes: 1 addition & 1 deletion src/sage/categories/category_with_axiom.py
Original file line number Diff line number Diff line change
Expand Up @@ -1679,7 +1679,7 @@ class ``Sets.Finite``), or in a separate file (typically in a class
"Facade", "Finite", "Infinite","Enumerated",
"Complete",
"Nilpotent",
"FiniteDimensional", "Connected",
"FiniteDimensional", "FinitelyPresented", "Connected",
"FinitelyGeneratedAsLambdaBracketAlgebra",
"WithBasis",
"Irreducible",
Expand Down
40 changes: 40 additions & 0 deletions src/sage/categories/graded_algebras_with_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,46 @@ def graded_algebra(self):
# Also, ``projection`` could be overridden by, well, a
# projection.

def free_graded_module(self, generator_degrees, names=None):
"""
Create a finitely generated free graded module over ``self``
INPUTS:
- ``generator_degrees`` -- tuple of integers defining the
number of generators of the module, and their degrees
- ``names`` -- optional, the names of the generators. If
``names`` is a comma-separated string like ``'a, b,
c'``, then those will be the names. Otherwise, for
example if ``names`` is ``abc``, then the names will be
``abc[d,i]``.
By default, if all generators are in distinct degrees,
then the ``names`` of the generators will have the form
``g[d]`` where ``d`` is the degree of the generator. If
the degrees are not distinct, then the generators will be
called ``g[d,i]`` where ``d`` is the degree and ``i`` is
its index in the list of generators in that degree.
See :mod:`sage.modules.fp_graded.free_module` for more
examples and details.
EXAMPLES::
sage: Q = QuadraticForm(QQ, 3, [1,2,3,4,5,6])
sage: Cl = CliffordAlgebra(Q)
sage: M = Cl.free_graded_module((0, 2, 3))
sage: M.gens()
(g[0], g[2], g[3])
sage: N.<xy, z> = Cl.free_graded_module((1, 2))
sage: N.generators()
(xy, z)
"""
from sage.modules.fp_graded.free_module import FreeGradedModule
return FreeGradedModule(self, generator_degrees, names=names)


class ElementMethods:
pass

Expand Down
52 changes: 52 additions & 0 deletions src/sage/categories/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,26 @@ def FiniteDimensional(self):
"""
return self._with_axiom("FiniteDimensional")

@cached_method
def FinitelyPresented(self):
r"""
Return the full subcategory of the finitely presented objects of ``self``.
EXAMPLES::
sage: Modules(ZZ).FinitelyPresented()
Category of finitely presented modules over Integer Ring
sage: A = SteenrodAlgebra(2)
sage: from sage.modules.fp_graded.module import FPModule
sage: FPModule(A, [0, 1], [[Sq(2), Sq(1)]]).category()
Category of finitely presented graded modules over mod 2 Steenrod algebra, milnor basis
TESTS::
sage: TestSuite(Modules(ZZ).FinitelyPresented()).run()
"""
return self._with_axiom("FinitelyPresented")

@cached_method
def Filtered(self, base_ring=None):
r"""
Expand Down Expand Up @@ -514,6 +534,38 @@ def extra_super_categories(self):
else:
return []

class FinitelyPresented(CategoryWithAxiom_over_base_ring):

def extra_super_categories(self):
"""
Implement the fact that a finitely presented module over a finite
ring is finite.
EXAMPLES::
sage: Modules(IntegerModRing(4)).FiniteDimensional().extra_super_categories()
[Category of finite sets]
sage: Modules(ZZ).FiniteDimensional().extra_super_categories()
[]
sage: Modules(GF(5)).FiniteDimensional().is_subcategory(Sets().Finite())
True
sage: Modules(ZZ).FiniteDimensional().is_subcategory(Sets().Finite())
False
sage: Modules(Rings().Finite()).FiniteDimensional().is_subcategory(Sets().Finite())
True
sage: Modules(Rings()).FiniteDimensional().is_subcategory(Sets().Finite())
False
"""
base_ring = self.base_ring()
FiniteSets = Sets().Finite()
if (isinstance(base_ring, Category) and
base_ring.is_subcategory(FiniteSets)) or \
base_ring in FiniteSets:
return [FiniteSets]
else:
return []

Filtered = LazyImport('sage.categories.filtered_modules', 'FilteredModules')
Graded = LazyImport('sage.categories.graded_modules', 'GradedModules')
Super = LazyImport('sage.categories.super_modules', 'SuperModules')
Expand Down
19 changes: 14 additions & 5 deletions src/sage/combinat/free_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ class CombinatorialFreeModule(UniqueRepresentation, Module, IndexedGenerators):
sage: original_print_options = F.print_options()
sage: sorted(original_print_options.items())
[('bracket', None),
('latex_bracket', False), ('latex_prefix', None),
('latex_scalar_mult', None), ('prefix', 'x'),
('iterate_key', False),
('latex_bracket', False), ('latex_names', None),
('latex_prefix', None), ('latex_scalar_mult', None),
('names', None), ('prefix', 'x'),
('scalar_mult', '*'),
('sorting_key', <function ...<lambda> at ...>),
('sorting_reverse', False), ('string_quotes', True),
Expand Down Expand Up @@ -313,6 +315,13 @@ def __classcall_private__(cls, base_ring, basis_keys=None, category=None,
if prefix is None:
prefix = "B"

if keywords.get('latex_names', None) is not None:
latex_names = keywords['latex_names']
if isinstance(latex_names, str):
latex_names = latex_names.split(',')
latex_names = tuple(latex_names)
keywords['latex_names'] = latex_names

return super(CombinatorialFreeModule, cls).__classcall__(cls,
base_ring, basis_keys, category=category, prefix=prefix, names=names,
**keywords)
Expand Down Expand Up @@ -413,9 +422,9 @@ def __init__(self, R, basis_keys=None, element_class=None, category=None,
ValueError: keyy is not a valid print option.
"""
# Make sure R is a ring with unit element
from sage.categories.all import Rings
from sage.categories.rings import Rings
if R not in Rings():
raise TypeError("Argument R must be a ring.")
raise TypeError("argument R must be a ring")

if element_class is not None:
self.Element = element_class
Expand All @@ -438,7 +447,7 @@ def __init__(self, R, basis_keys=None, element_class=None, category=None,
kwds['sorting_key'] = kwds.pop('monomial_key')
if 'monomial_reverse' in kwds:
kwds['sorting_reverse'] = kwds.pop('monomial_reverse')
IndexedGenerators.__init__(self, basis_keys, prefix, **kwds)
IndexedGenerators.__init__(self, basis_keys, prefix, names=names, **kwds)

if category is None:
category = ModulesWithBasis(R)
Expand Down
Empty file.
Loading

0 comments on commit 9c6afb9

Please sign in to comment.