Graded modules with basis#
- class sage.categories.graded_modules_with_basis.GradedModulesWithBasis(base_category)#
Bases:
GradedModulesCategory
The category of graded modules with a distinguished basis.
EXAMPLES:
sage: C = GradedModulesWithBasis(ZZ); C Category of graded modules with basis over Integer Ring sage: sorted(C.super_categories(), key=str) [Category of filtered modules with basis over Integer Ring, Category of graded modules over Integer Ring] sage: C is ModulesWithBasis(ZZ).Graded() True
- class ElementMethods#
Bases:
object
- degree_negation()#
Return the image of
self
under the degree negation automorphism of the graded module to whichself
belongs.The degree negation is the module automorphism which scales every homogeneous element of degree \(k\) by \((-1)^k\) (for all \(k\)). This assumes that the module to which
self
belongs (that is, the moduleself.parent()
) is \(\ZZ\)-graded.EXAMPLES:
sage: E.<a,b> = ExteriorAlgebra(QQ) # optional - sage.combinat sage.modules sage: ((1 + a) * (1 + b)).degree_negation() # optional - sage.combinat sage.modules a*b - a - b + 1 sage: E.zero().degree_negation() # optional - sage.combinat sage.modules 0 sage: P = GradedModulesWithBasis(ZZ).example(); P # optional - sage.combinat sage.modules An example of a graded module with basis: the free module on partitions over Integer Ring sage: pbp = lambda x: P.basis()[Partition(list(x))] # optional - sage.combinat sage.modules sage: p = pbp([3,1]) - 2 * pbp([2]) + 4 * pbp([1]) # optional - sage.combinat sage.modules sage: p.degree_negation() # optional - sage.combinat sage.modules -4*P[1] - 2*P[2] + P[3, 1]
- class ParentMethods#
Bases:
object
- degree_negation(element)#
Return the image of
element
under the degree negation automorphism of the graded moduleself
.The degree negation is the module automorphism which scales every homogeneous element of degree \(k\) by \((-1)^k\) (for all \(k\)). This assumes that the module
self
is \(\ZZ\)-graded.INPUT:
element
– element of the moduleself
EXAMPLES:
sage: E.<a,b> = ExteriorAlgebra(QQ) # optional - sage.combinat sage.modules sage: E.degree_negation((1 + a) * (1 + b)) # optional - sage.combinat sage.modules a*b - a - b + 1 sage: E.degree_negation(E.zero()) # optional - sage.combinat sage.modules 0 sage: P = GradedModulesWithBasis(ZZ).example(); P # optional - sage.combinat sage.modules An example of a graded module with basis: the free module on partitions over Integer Ring sage: pbp = lambda x: P.basis()[Partition(list(x))] # optional - sage.combinat sage.modules sage: p = pbp([3,1]) - 2 * pbp([2]) + 4 * pbp([1]) # optional - sage.combinat sage.modules sage: P.degree_negation(p) # optional - sage.combinat sage.modules -4*P[1] - 2*P[2] + P[3, 1]
- quotient_module(submodule, check=True, already_echelonized=False, category=None)#
Construct the quotient module
self
/submodule
.INPUT:
submodule
– a submodule with basis ofself
, or something that can be turned into one viaself.submodule(submodule)
check
,already_echelonized
– passed down toModulesWithBasis.ParentMethods.submodule()
category
– (optional) the category of the quotient module
Warning
At this point, this only supports quotients by free submodules admitting a basis in unitriangular echelon form. In this case, the quotient is also a free module, with a basis consisting of the retract of a subset of the basis of
self
.EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ) # optional - sage.combinat sage.modules sage: S = E.submodule([x + y, x*y - y*z, y]) # optional - sage.combinat sage.modules sage: Q = E.quotient_module(S) # optional - sage.combinat sage.modules sage: Q.category() # optional - sage.combinat sage.modules Join of Category of quotients of graded modules with basis over Rational Field and Category of graded vector spaces with basis over Rational Field and Category of finite dimensional vector spaces with basis over Rational Field
See also
Modules.WithBasis.ParentMethods.submodule()
- submodule(gens, check=True, already_echelonized=False, unitriangular=False, support_order=None, category=None, *args, **opts)#
Return the submodule spanned by a finite set of elements.
INPUT:
gens
– a list or family of elements ofself
check
– (default:True
) whether to verify that theelements of
gens
are inself
already_echelonized
– (default:False
) whetherthe elements of
gens
are already in (not necessarily reduced) echelon form
unitriangular
– (default:False
) whether the lift morphism is unitriangularsupport_order
– (optional) either something that can be converted into a tuple or a key functioncategory
– (optional) the category of the submodule
If
already_echelonized
isFalse
, then the generators are put in reduced echelon form usingechelonize()
, and reindexed by \(0,1,...\).Warning
At this point, this method only works for finite dimensional submodules and if matrices can be echelonized over the base ring.
If in addition
unitriangular
isTrue
, then the generators are made such that the coefficients of the pivots are 1, so that lifting map is unitriangular.The basis of the submodule uses the same index set as the generators, and the lifting map sends \(y_i\) to \(gens[i]\).
See also
ModulesWithBasis.FiniteDimensional.ParentMethods.quotient_module()
EXAMPLES:
A graded submodule of a graded module generated by homogeneous elements is naturally graded:
sage: E.<x,y,z> = ExteriorAlgebra(QQ) # optional - sage.combinat sage.modules sage: S = E.submodule([x + y, x*y - y*z]) # optional - sage.combinat sage.modules sage: S.category() # optional - sage.combinat sage.modules Join of Category of graded vector spaces with basis over Rational Field and Category of subobjects of filtered modules with basis over Rational Field and Category of finite dimensional vector spaces with basis over Rational Field sage: S.basis()[0].degree() # optional - sage.combinat sage.modules 1 sage: S.basis()[1].degree() # optional - sage.combinat sage.modules 2
We check on the echelonized basis:
sage: Sp = E.submodule([1, x + y + 5, x*y - y*z + x + y - 2]) # optional - sage.combinat sage.modules sage: Sp.category() # optional - sage.combinat sage.modules Join of Category of graded vector spaces with basis over Rational Field and Category of subobjects of filtered modules with basis over Rational Field and Category of finite dimensional vector spaces with basis over Rational Field
If it is generated by inhomogeneous elements, then it is filtered by default:
sage: F = E.submodule([x + y*z, x*z + y*x]) # optional - sage.combinat sage.modules sage: F.category() # optional - sage.combinat sage.modules Join of Category of subobjects of filtered modules with basis over Rational Field and Category of filtered vector spaces with basis over Rational Field and Category of finite dimensional vector spaces with basis over Rational Field
If
category
is specified, then it does not give any extra structure to the submodule (we can think of this as applying the forgetful functor):sage: SM = E.submodule([x + y, x*y - y*z], # optional - sage.combinat sage.modules ....: category=ModulesWithBasis(QQ)) sage: SM.category() # optional - sage.combinat sage.modules Join of Category of finite dimensional vector spaces with basis over Rational Field and Category of subobjects of sets sage: FM = E.submodule([x + 1, x*y - x*y*z], # optional - sage.combinat sage.modules ....: category=ModulesWithBasis(QQ)) sage: FM.category() # optional - sage.combinat sage.modules Join of Category of finite dimensional vector spaces with basis over Rational Field and Category of subobjects of sets
If we have specified that this is a graded submodule of a graded module, then the echelonized elements must be homogeneous:
sage: Cat = ModulesWithBasis(QQ).Graded().Subobjects() sage: E.submodule([x + y, x*y - 1], category=Cat) # optional - sage.combinat sage.modules Traceback (most recent call last): ... ValueError: all of the generators must be homogeneous sage: E.submodule([x + y, x*y - x - y], category=Cat) # optional - sage.combinat sage.modules Free module generated by {0, 1} over Rational Field
- class Quotients(category, *args)#
Bases:
QuotientsCategory
- class ElementMethods#
Bases:
object
- degree()#
Return the degree of
self
.EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ) # optional - sage.combinat sage.modules sage: S = E.submodule([x + y, x*y - y*z, y]) # optional - sage.combinat sage.modules sage: Q = E.quotient_module(S) # optional - sage.combinat sage.modules sage: B = Q.basis() # optional - sage.combinat sage.modules sage: [B[i].lift() for i in Q.indices()] # optional - sage.combinat sage.modules [1, z, x*z, y*z, x*y*z] sage: [B[i].degree() for i in Q.indices()] # optional - sage.combinat sage.modules [0, 1, 2, 2, 3]
- class ParentMethods#
Bases:
object
- degree_on_basis(m)#
Return the degree of the basis element indexed by
m
inself
.EXAMPLES:
sage: E.<x,y,z> = ExteriorAlgebra(QQ) # optional - sage.combinat sage.modules sage: S = E.submodule([x + y, x*y - y*z, y]) # optional - sage.combinat sage.modules sage: Q = E.quotient_module(S) # optional - sage.combinat sage.modules sage: B = Q.basis() # optional - sage.combinat sage.modules sage: [B[i].lift() for i in Q.indices()] # optional - sage.combinat sage.modules [1, z, x*z, y*z, x*y*z] sage: [Q.degree_on_basis(i) for i in Q.indices()] # optional - sage.combinat sage.modules [0, 1, 2, 2, 3]