Modules With Basis¶
AUTHORS:
- Nicolas M. Thiery (2008-2014): initial revision, axiomatization
- Jason Bandlow and Florent Hivert (2010): Triangular Morphisms
- Christian Stump (2010): trac ticket #9648 module_morphism’s to a wider class of codomains
-
sage.categories.modules_with_basis.
ModulesWithBasis
¶ The category of modules with a distinguished basis.
The elements are represented by expanding them in the distinguished basis. The morphisms are not required to respect the distinguished basis.
EXAMPLES:
sage: ModulesWithBasis(ZZ) Category of modules with basis over Integer Ring sage: ModulesWithBasis(ZZ).super_categories() [Category of modules over Integer Ring]
If the base ring is actually a field, this constructs instead the category of vector spaces with basis:
sage: ModulesWithBasis(QQ) Category of vector spaces with basis over Rational Field sage: ModulesWithBasis(QQ).super_categories() [Category of modules with basis over Rational Field, Category of vector spaces over Rational Field]
Let \(X\) and \(Y\) be two modules with basis. We can build \(Hom(X,Y)\):
sage: X = CombinatorialFreeModule(QQ, [1,2]); X.__custom_name = "X" sage: Y = CombinatorialFreeModule(QQ, [3,4]); Y.__custom_name = "Y" sage: H = Hom(X, Y); H Set of Morphisms from X to Y in Category of finite dimensional vector spaces with basis over Rational Field
The simplest morphism is the zero map:
sage: H.zero() # todo: move this test into module once we have an example Generic morphism: From: X To: Y
which we can apply to elements of \(X\):
sage: x = X.monomial(1) + 3 * X.monomial(2) sage: H.zero()(x) 0
EXAMPLES:
We now construct a more interesting morphism by extending a function by linearity:
sage: phi = H(on_basis = lambda i: Y.monomial(i+2)); phi Generic morphism: From: X To: Y sage: phi(x) B[3] + 3*B[4]
We can retrieve the function acting on indices of the basis:
sage: f = phi.on_basis() sage: f(1), f(2) (B[3], B[4])
\(Hom(X,Y)\) has a natural module structure (except for the zero, the operations are not yet implemented though). However since the dimension is not necessarily finite, it is not a module with basis; but see
FiniteDimensionalModulesWithBasis
andGradedModulesWithBasis
:sage: H in ModulesWithBasis(QQ), H in Modules(QQ) (False, True)
Some more playing around with categories and higher order homsets:
sage: H.category() Category of homsets of modules with basis over Rational Field sage: Hom(H, H).category() Category of endsets of homsets of modules with basis over Rational Field
Todo
End(X)
is an algebra.Note
This category currently requires an implementation of an element method
support
. Once trac ticket #18066 is merged, an implementation of anitems
method will be required.