# Vector Spaces¶

class sage.categories.vector_spaces.VectorSpaces(K)

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 CartesianProducts(category, *args)
extra_super_categories()

The category of vector spaces is closed under Cartesian products:

sage: C = VectorSpaces(QQ)
sage: C.CartesianProducts()
Category of Cartesian products of vector spaces over Rational Field
sage: C in C.CartesianProducts().super_categories()
True

class DualObjects(category, *args)
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 ElementMethods
class Filtered(base_category)

Category of filtered vector spaces.

class Graded(base_category)

class ParentMethods
class TensorProducts(category, *args)
extra_super_categories()

The category of vector spaces is closed under tensor products:

sage: C = VectorSpaces(QQ)
sage: C.TensorProducts()
Category of tensor products of vector spaces over Rational Field
sage: C in C.TensorProducts().super_categories()
True

class WithBasis(base_category)
class CartesianProducts(category, *args)
extra_super_categories()

The category of vector spaces with basis is closed under Cartesian products:

sage: C = VectorSpaces(QQ).WithBasis()
sage: C.CartesianProducts()
Category of Cartesian products of vector spaces with basis over Rational Field
sage: C in C.CartesianProducts().super_categories()
True

class Filtered(base_category)

Category of filtered vector spaces with basis.

example(base_ring=None)

Return an example of a graded vector space with basis, as per Category.example().

EXAMPLES:

sage: Modules(QQ).WithBasis().Graded().example()
An example of a graded module with basis:
the free module on partitions over Rational Field

class Graded(base_category)

Category of graded vector spaces with basis.

example(base_ring=None)

Return an example of a graded vector space with basis, as per Category.example().

EXAMPLES:

sage: Modules(QQ).WithBasis().Graded().example()
An example of a graded module with basis:
the free module on partitions over Rational Field

class TensorProducts(category, *args)
extra_super_categories()

The category of vector spaces with basis is closed under tensor products:

sage: C = VectorSpaces(QQ).WithBasis()
sage: C.TensorProducts()
Category of tensor products of vector spaces with basis over Rational Field
sage: C in C.TensorProducts().super_categories()
True

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

additional_structure()

Return None.

Indeed, the category of vector spaces defines no additional structure: a bimodule morphism between two vector spaces is a vector space morphism.

Todo

Should this category be a CategoryWithAxiom?

EXAMPLES:

sage: VectorSpaces(QQ).additional_structure()

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

super_categories()

EXAMPLES:

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