Quotients of Modules With Basis

class sage.modules.with_basis.subquotient.QuotientModuleWithBasis(submodule, category)

Bases: sage.combinat.free_module.CombinatorialFreeModule

A class for quotients of a module with basis by a submodule.

INPUT:

  • submodule – a submodule of self

  • category – a category (default: ModulesWithBasis(submodule.base_ring()))

submodule should be a free submodule admitting a basis in unitriangular echelon form. Typically submodule is a SubmoduleWithBasis as returned by Modules.WithBasis.ParentMethods.submodule().

The lift method should have a method .cokernel_basis_indices that computes the indexing set of a subset \(B\) of the basis of self that spans some supplementary of submodule in self (typically the non characteristic columns of the aforementioned echelon form). submodule should further implement a submodule.reduce(x) method that returns the unique element in the span of \(B\) which is equivalent to \(x\) modulo submodule.

This is meant to be constructed via Modules.WithBasis.FiniteDimensional.ParentMethods.quotient_module()

This differs from sage.rings.quotient_ring.QuotientRing in the following ways:

  • submodule needs not be an ideal. If it is, the transportation of the ring structure is taken care of by the Subquotients categories.

  • 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()

  • SubmoduleWithBasis

  • 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 x to the ambient space of self.

INPUT:

  • x – an element 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]));         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 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]));         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: sage.combinat.free_module.CombinatorialFreeModule

A 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 some module with basis \(V\), or data that can be converted into such a family

  • support_order – an ordering of the support of basis expressed in ambient given as a list

  • unitriangular – if the lift morphism is unitriangular

  • ambient – the ambient space \(V\)

  • category – a category

Further arguments are passed down to CombinatorialFreeModule.

This is meant to be constructed via Modules.WithBasis.ParentMethods.submodule().

See also

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 self is a submodule of other.

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 self to 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]