Vector Spaces#

class sage.categories.vector_spaces.VectorSpaces(K)[source]#

Bases: 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]
>>> from sage.all import *
>>> VectorSpaces(QQ)
Category of vector spaces over Rational Field
>>> VectorSpaces(QQ).super_categories()
[Category of modules over Rational Field]
class CartesianProducts(category, *args)[source]#

Bases: CartesianProductsCategory

extra_super_categories()[source]#

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
>>> from sage.all import *
>>> C = VectorSpaces(QQ)
>>> C.CartesianProducts()
Category of Cartesian products of vector spaces over Rational Field
>>> C in C.CartesianProducts().super_categories()
True
class DualObjects(category, *args)[source]#

Bases: DualObjectsCategory

extra_super_categories()[source]#

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]
>>> from sage.all import *
>>> C = VectorSpaces(QQ)
>>> C.dual()
Category of duals of vector spaces over Rational Field
>>> C.dual().super_categories() # indirect doctest
[Category of vector spaces over Rational Field]
class ElementMethods[source]#

Bases: object

class Filtered(base_category)[source]#

Bases: FilteredModulesCategory

Category of filtered vector spaces.

class FiniteDimensional(base_category)[source]#

Bases: CategoryWithAxiom_over_base_ring

class TensorProducts(category, *args)[source]#

Bases: TensorProductsCategory

extra_super_categories()[source]#

Implement the fact that a (finite) tensor product of finite dimensional vector spaces is a finite dimensional vector space.

EXAMPLES:

sage: VectorSpaces(QQ).FiniteDimensional().TensorProducts().extra_super_categories()
[Category of finite dimensional vector spaces over Rational Field]
sage: VectorSpaces(QQ).FiniteDimensional().TensorProducts().FiniteDimensional()
Category of tensor products of finite dimensional vector spaces over Rational Field
>>> from sage.all import *
>>> VectorSpaces(QQ).FiniteDimensional().TensorProducts().extra_super_categories()
[Category of finite dimensional vector spaces over Rational Field]
>>> VectorSpaces(QQ).FiniteDimensional().TensorProducts().FiniteDimensional()
Category of tensor products of finite dimensional vector spaces over Rational Field
class Graded(base_category)[source]#

Bases: GradedModulesCategory

Category of graded vector spaces.

class ParentMethods[source]#

Bases: object

dimension()[source]#

Return the dimension of this vector space.

EXAMPLES:

sage: M = FreeModule(FiniteField(19), 100)                              # needs sage.modules
sage: W = M.submodule([M.gen(50)])                                      # needs sage.modules
sage: W.dimension()                                                     # needs sage.modules
1

sage: M = FiniteRankFreeModule(QQ, 3)                                   # needs sage.modules
sage: M.dimension()                                                     # needs sage.modules
3
sage: M.tensor_module(1, 2).dimension()                                 # needs sage.modules
27
>>> from sage.all import *
>>> M = FreeModule(FiniteField(Integer(19)), Integer(100))                              # needs sage.modules
>>> W = M.submodule([M.gen(Integer(50))])                                      # needs sage.modules
>>> W.dimension()                                                     # needs sage.modules
1

>>> M = FiniteRankFreeModule(QQ, Integer(3))                                   # needs sage.modules
>>> M.dimension()                                                     # needs sage.modules
3
>>> M.tensor_module(Integer(1), Integer(2)).dimension()                                 # needs sage.modules
27
class TensorProducts(category, *args)[source]#

Bases: TensorProductsCategory

extra_super_categories()[source]#

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
>>> from sage.all import *
>>> C = VectorSpaces(QQ)
>>> C.TensorProducts()
Category of tensor products of vector spaces over Rational Field
>>> C in C.TensorProducts().super_categories()
True
class WithBasis(base_category)[source]#

Bases: CategoryWithAxiom_over_base_ring

class CartesianProducts(category, *args)[source]#

Bases: CartesianProductsCategory

extra_super_categories()[source]#

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
>>> from sage.all import *
>>> C = VectorSpaces(QQ).WithBasis()
>>> C.CartesianProducts()
Category of Cartesian products of vector spaces with basis over Rational Field
>>> C in C.CartesianProducts().super_categories()
True
class Filtered(base_category)[source]#

Bases: FilteredModulesCategory

Category of filtered vector spaces with basis.

example(base_ring=None)[source]#

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

EXAMPLES:

sage: Modules(QQ).WithBasis().Graded().example()                    # needs sage.combinat sage.modules
An example of a graded module with basis:
 the free module on partitions over Rational Field
>>> from sage.all import *
>>> Modules(QQ).WithBasis().Graded().example()                    # needs sage.combinat sage.modules
An example of a graded module with basis:
 the free module on partitions over Rational Field
class FiniteDimensional(base_category)[source]#

Bases: CategoryWithAxiom_over_base_ring

class TensorProducts(category, *args)[source]#

Bases: TensorProductsCategory

extra_super_categories()[source]#

Implement the fact that a (finite) tensor product of finite dimensional vector spaces is a finite dimensional vector space.

EXAMPLES:

sage: VectorSpaces(QQ).WithBasis().FiniteDimensional().TensorProducts().extra_super_categories()
[Category of finite dimensional vector spaces with basis over Rational Field]
sage: VectorSpaces(QQ).WithBasis().FiniteDimensional().TensorProducts().FiniteDimensional()
Category of tensor products of finite dimensional vector spaces with basis over Rational Field
>>> from sage.all import *
>>> VectorSpaces(QQ).WithBasis().FiniteDimensional().TensorProducts().extra_super_categories()
[Category of finite dimensional vector spaces with basis over Rational Field]
>>> VectorSpaces(QQ).WithBasis().FiniteDimensional().TensorProducts().FiniteDimensional()
Category of tensor products of finite dimensional vector spaces with basis over Rational Field
class Graded(base_category)[source]#

Bases: GradedModulesCategory

Category of graded vector spaces with basis.

example(base_ring=None)[source]#

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

EXAMPLES:

sage: Modules(QQ).WithBasis().Graded().example()                    # needs sage.combinat sage.modules
An example of a graded module with basis:
 the free module on partitions over Rational Field
>>> from sage.all import *
>>> Modules(QQ).WithBasis().Graded().example()                    # needs sage.combinat sage.modules
An example of a graded module with basis:
 the free module on partitions over Rational Field
class TensorProducts(category, *args)[source]#

Bases: TensorProductsCategory

extra_super_categories()[source]#

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
>>> from sage.all import *
>>> C = VectorSpaces(QQ).WithBasis()
>>> C.TensorProducts()
Category of tensor products of vector spaces with basis over Rational Field
>>> C in C.TensorProducts().super_categories()
True
is_abelian()[source]#

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
>>> from sage.all import *
>>> VectorSpaces(QQ).WithBasis().is_abelian()
True
additional_structure()[source]#

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()
>>> from sage.all import *
>>> VectorSpaces(QQ).additional_structure()
base_field()[source]#

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

EXAMPLES:

sage: VectorSpaces(QQ).base_field()
Rational Field
>>> from sage.all import *
>>> VectorSpaces(QQ).base_field()
Rational Field
super_categories()[source]#

EXAMPLES:

sage: VectorSpaces(QQ).super_categories()
[Category of modules over Rational Field]
>>> from sage.all import *
>>> VectorSpaces(QQ).super_categories()
[Category of modules over Rational Field]