Vector Spaces

class sage.categories.vector_spaces.VectorSpaces(K)

Bases: sage.categories.category_types.Category_module

The category of (abstract) vector spaces over a given field

??? with an embedding in an ambient vector space ???

EXAMPLES:

sage: VectorSpaces(QQ)
Category of vector spaces over Rational Field
sage: VectorSpaces(QQ).super_categories()
[Category of modules over Rational Field]
class DualObjects(category, *args)

Bases: sage.categories.dual.DualObjectsCategory

TESTS:

sage: from sage.categories.covariant_functorial_construction import CovariantConstructionCategory
sage: class FooBars(CovariantConstructionCategory):
...       _functor_category = "FooBars"
sage: Category.FooBars = lambda self: FooBars.category_of(self)
sage: C = FooBars(ModulesWithBasis(ZZ))
sage: C
Category of foo bars of modules with basis over Integer Ring
sage: C.base_category()
Category of modules with basis over Integer Ring
sage: latex(C)
\mathbf{FooBars}(\mathbf{ModulesWithBasis}_{\Bold{Z}})
sage: import __main__; __main__.FooBars = FooBars # Fake FooBars being defined in a python module
sage: TestSuite(C).run()
extra_super_categories()

Returns the dual category

EXAMPLES:

The category of algebras over the Rational Field is dual to the category of coalgebras over the same field:

sage: C = VectorSpaces(QQ)
sage: C.dual()
Category of duals of vector spaces over Rational Field
sage: C.dual().super_categories() # indirect doctest
[Category of vector spaces over Rational Field]
class VectorSpaces.ElementMethods
class VectorSpaces.ParentMethods
class VectorSpaces.WithBasis(base_category)

Bases: sage.categories.category_with_axiom.CategoryWithAxiom_over_base_ring

TESTS:

sage: C = Modules(ZZ).FiniteDimensional(); C
Category of finite dimensional modules over Integer Ring
sage: type(C)
<class 'sage.categories.modules.Modules.FiniteDimensional_with_category'>
sage: type(C).__base__.__base__
<class 'sage.categories.category_with_axiom.CategoryWithAxiom_over_base_ring'>

sage: TestSuite(C).run()
is_abelian()

Return whether this category is abelian.

This is always True since the base ring is a field.

EXAMPLES:

sage: VectorSpaces(QQ).WithBasis().is_abelian()
True
VectorSpaces.base_field()

Returns the base field over which the vector spaces of this category are all defined.

EXAMPLES:

sage: VectorSpaces(QQ).base_field()
Rational Field
VectorSpaces.super_categories()

EXAMPLES:

sage: VectorSpaces(QQ).super_categories()
[Category of modules over Rational Field]

Previous topic

Unital algebras

Next topic

Weyl Groups

This Page