Quotients of modules with basis#
- class sage.modules.with_basis.subquotient.QuotientModuleWithBasis(submodule, category)#
Bases:
CombinatorialFreeModuleA class for quotients of a module with basis by a submodule.
INPUT:
submodule– a submodule ofselfcategory– a category (default:ModulesWithBasis(submodule.base_ring()))
submoduleshould be a free submodule admitting a basis in unitriangular echelon form. Typicallysubmoduleis aSubmoduleWithBasisas returned byModules.WithBasis.ParentMethods.submodule().The
liftmethod should have a method.cokernel_basis_indicesthat computes the indexing set of a subset of the basis ofselfthat spans some supplementary ofsubmoduleinself(typically the non characteristic columns of the aforementioned echelon form).submoduleshould further implement asubmodule.reduce(x)method that returns the unique element in the span of which is equivalent to modulosubmodule.This is meant to be constructed via
Modules.WithBasis.FiniteDimensional.ParentMethods.quotient_module()This differs from
sage.rings.quotient_ring.QuotientRingin the following ways:submoduleneeds not be an ideal. If it is, the transportation of the ring structure is taken care of by theSubquotientscategories.Thanks to
.cokernel_basis_indices, we know the indices of a basis of the quotient, and elements are represented directly in the free module spanned by those indices rather than by wrapping elements of the ambient space.
There is room for sharing more code between those two implementations and generalizing them. See trac ticket #18204.
See also
Modules.WithBasis.ParentMethods.submodule()Modules.WithBasis.FiniteDimensional.ParentMethods.quotient_module()sage.rings.quotient_ring.QuotientRing
- ambient()#
Return the ambient space of
self.EXAMPLES:
sage: X = CombinatorialFreeModule(QQ, range(3), prefix="x"); x = X.basis() sage: Y = X.quotient_module((x[0]-x[1], x[1]-x[2])) sage: Y.ambient() is X True
- lift(x)#
Lift
xto the ambient space ofself.INPUT:
x– an element ofself
EXAMPLES:
sage: X = CombinatorialFreeModule(QQ, range(3), prefix="x"); x = X.basis() sage: Y = X.quotient_module((x[0]-x[1], x[1]-x[2])); y = Y.basis() sage: Y.lift(y[2]) x[2]
- retract(x)#
Retract an element of the ambient space by projecting it back to
self.INPUT:
x– an element of the ambient space ofself
EXAMPLES:
sage: X = CombinatorialFreeModule(QQ, range(3), prefix="x"); x = X.basis() sage: Y = X.quotient_module((x[0]-x[1], x[1]-x[2])); y = Y.basis() sage: Y.print_options(prefix='y') sage: Y.retract(x[0]) y[2] sage: Y.retract(x[1]) y[2] sage: Y.retract(x[2]) y[2]
- class sage.modules.with_basis.subquotient.SubmoduleWithBasis(basis, support_order, ambient, unitriangular, category, *args, **opts)#
Bases:
CombinatorialFreeModuleA base class for submodules of a ModuleWithBasis spanned by a (possibly infinite) basis in echelon form.
INPUT:
basis– a family of elements in echelon form in somemodule with basis , or data that can be converted into such a familysupport_order– an ordering of the support ofbasisexpressed inambientgiven as a listunitriangular– if the lift morphism is unitriangularambient– the ambient spacecategory– a category
Further arguments are passed down to
CombinatorialFreeModule.This is meant to be constructed via
Modules.WithBasis.ParentMethods.submodule().See also
Modules.WithBasis.ParentMethods.submodule()
- ambient()#
Return the ambient space of
self.EXAMPLES:
sage: X = CombinatorialFreeModule(QQ, range(3)); x = X.basis() sage: Y = X.submodule((x[0]-x[1], x[1]-x[2])) sage: Y.ambient() is X True
- is_submodule(other)#
Return whether
selfis a submodule ofother.INPUT:
other– another submodule of the same ambient module, or the ambient module itself
EXAMPLES:
sage: X = CombinatorialFreeModule(QQ, range(4)); x = X.basis() sage: F = X.submodule([x[0]-x[1], x[1]-x[2], x[2]-x[3]]) sage: G = X.submodule([x[0]-x[2]]) sage: H = X.submodule([x[0]-x[1], x[2]]) sage: F.is_submodule(X) True sage: G.is_submodule(F) True sage: H.is_submodule(F) False
- lift()#
The lift (embedding) map from
selfto the ambient space.EXAMPLES:
sage: X = CombinatorialFreeModule(QQ, range(3), prefix="x"); x = X.basis() sage: Y = X.submodule((x[0]-x[1], x[1]-x[2]), already_echelonized=True); y = Y.basis() sage: Y.lift Generic morphism: From: Free module generated by {0, 1} over Rational Field To: Free module generated by {0, 1, 2} over Rational Field sage: [ Y.lift(u) for u in y ] [x[0] - x[1], x[1] - x[2]] sage: (y[0] + y[1]).lift() x[0] - x[2]
- reduce()#
The reduce map.
This map reduces elements of the ambient space modulo this submodule.
EXAMPLES:
sage: X = CombinatorialFreeModule(QQ, range(3), prefix="x"); x = X.basis() sage: Y = X.submodule((x[0]-x[1], x[1]-x[2]), already_echelonized=True) sage: Y.reduce Generic endomorphism of Free module generated by {0, 1, 2} over Rational Field sage: Y.reduce(x[1]) x[2] sage: Y.reduce(2*x[0] + x[1]) 3*x[2]
- retract()#
The retract map from the ambient space.
EXAMPLES:
sage: X = CombinatorialFreeModule(QQ, range(3), prefix="x"); x = X.basis() sage: Y = X.submodule((x[0]-x[1], x[1]-x[2]), already_echelonized=True) sage: Y.print_options(prefix='y') sage: Y.retract Generic morphism: From: Free module generated by {0, 1, 2} over Rational Field To: Free module generated by {0, 1} over Rational Field sage: Y.retract(x[0] - x[2]) y[0] + y[1]