-
-
Notifications
You must be signed in to change notification settings - Fork 657
Description
Currently, graded submodules do not inherit grading from its ambient:
sage: M = ModulesWithBasis(QQ).Graded().example()
sage: M(Partition((4,2,1,1,1,1))).degree()
10
sage: N = M.submodule([M(Partition((4,2,1,1,1,1)))], category=GradedModulesWithBasis(QQ).Subobjects())
sage: n = N.basis()
sage: n[0].degree()
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
...
AttributeError: 'SubmoduleWithBasis_with_category' object has no attribute 'degree_on_basis'
We implement this by fulfilling the regressive category construction requirement for the GradedModules().Subobjects()
category. We also do this for filtered modules (every submodule of a filtered module has a natural filtration inherited from the ambient module).
Want: In the case where the generators are not from homogeneous but can made homogeneous by row reducing, it inherits its degrees. If the basis elements cannot be made homogeneous by row reduction, raise an error when trying to use graded_submodule
. For example,
sage: M = ModulesWithBasis(QQ).Graded().example()
sage: N = M.graded_submodule([M(Partition((4,2,1,1,1,1))) - M(Partition((5,3))),
M(Partition((5,3)))])
sage: n = N.basis()
sage: (n[0].lift(), n[1].lift())
(P[4, 2, 1, 1, 1, 1], P[5,3])
sage: (n[0].degree(), n[1].degree())
(10, 8)
sage: K = M.graded_submodule([M(Partition((4,2,1,1,1,1))) - M(Partition((5,3))),
M(Partition((5,3)) - M(Partition((4,3)))])
Traceback (most recent call last):
...
ValueError: element is not homogeneous
CC: @mkoeppe @tscrim @jhpalmieri
Component: categories
Keywords: submodule
Author: Louis Ng, Travis Scrimshaw
Branch/Commit: e5901b5
Reviewer: Matthias Koeppe
Issue created by migration from https://trac.sagemath.org/ticket/33321