Vector Space Categories
Vector spaces in TensorCategories are of the abstract type
abstract type VectorSpaceObject <: Object endAll objects with vector space structure like hom-spaces are and should be implemented as a subtype of this type. They always need the following fields:
basis::Vector
parent::CategoryFinite Dimensional VectorSpaces
The simplest example to provide are the finite dimensional vector spaces over a field. This category has type
VectorSpaces <: TensorCategoryand can be constructed like so:
F = GF(5,2)
Vec = VectorSpaces(F)
# output
Category of finite dimensional VectorSpaces over Finite field of degree 2 and characteristic 5Objects of this category are of the type
VSObject <: VectorSpaceObjectEvery vector space object is defined by a basis and a base field provided by the parent category.
TensorCategories.VectorSpaceObject — TypeVectorSpaceObjectAn object in the category of finite dimensional vector spaces.
TensorCategories.VectorSpaceObject — MethodVectorSpaceObject(Vec::VectorSpaces, n::Int64)
VectorSpaceObject(K::Field, n::Int)
VectorSpaceObject(Vec::VectorSpaces, basis::Vector)
VectorSpaceObject(K::Field, basis::Vector)The n-dimensional vector space with basis v1,..,vn (or other specified basis)
Morphisms in this Category are defined only by matrices of matching dimensions. They are typed as
VSMorphism <: Morphismand constructed giving a domain, codomain and matrix element.
Oscar.morphism — Methodmorphism(X::VectorSpaceObject, Y::VectorSpaceObject, m::MatElem)Return a morphism in the category of vector spaces defined by m.
Graded Vector Spaces
Very similar we have the category of finite dimensional (twisted) $G$-graded vector spaces for a finite group $G$. We have the type
GradedVectorSpaces <: VectorSpacesand they are constructed in straightforward manner
G = symmetric_group(6)
VecG = graded_vector_spaces(G)To add a non-trivial associator (twist) there is another constructor.
TensorCategories.twisted_graded_vector_spaces — Functiontwisted_graded_vector_spaces(G::Group, i::Int)Construct the category of twisted graded vectorspaces with the i-th 3-cocycle.
Graded vector spaces decompose into direct sums of vector spaces for each element in $G$.
GVSObject <: VectorSpaceObjectG = symmetric_group(5)
g,s = gens(G)
V1 = VectorSpaceObject(QQ,5)
V2 = VectorSpaceObject(QQ, [:v, :w])
W = VectorSpaceObject(g => V1, s => V2, g*s => V1⊗V2)Morphisms are implemented analogously by pairs of group elements and vector space objects.
GVSMorphism <: MorphismThe constructor is given by
Oscar.morphism — Methodfunction morphism(V::GVSObject, Y::GVSObject, m::MatElem)Return the morphism $V → W$defined by $m$.
Functionality
(Graded) vector spaces form a fusion category. Thus the methods for direct sums, tensor products, dual, one and zero object are all implemented.
AbstractAlgebra.Generic.dim — Methoddim(V::VectorSpaceObject) = length(V.basis)Return the vector space dimension of $V$.
AbstractAlgebra.direct_sum — Methodfunction direct_sum(V::GVSObject, W::GVSObject)Return the direct sum object $V⊕W$.
AbstractAlgebra.direct_sum — Methoddirect_sum(f::VectorSpaceMorphism{T},g::VectorSpaceMorphism{T}) where TReturn the direct sum of morphisms of vector spaces.
AbstractAlgebra.direct_sum — Methoddirect_sum(X::VectorSpaceObject{T}, Y::VectorSpaceObject{T}) where {T}Direct sum of vector spaces together with the embedding morphisms.
AbstractAlgebra.is_isomorphic — Methodfunction is_isomorphic(V::GVSObject, W::GVSObject)Check whether $V$and $W$are isomorphic as $G$-graded vector spaces and return an isomorphism in the positive case.
AbstractAlgebra.is_isomorphic — Methodis_isomorphic(V::VSObject, W::VSObject)Check whether $V$ and $W$are isomorphic. Return the isomorphisms if existent.
AbstractAlgebra.kernel — Methodfunction kernel(f::GVSMorphism)Return the graded vector space kernel of $f$.
Base.one — Methodfunction one(C::GradedVectorSpaces)Return $k$ as the one dimensional graded vector space.
Base.one — Methodone(Vec::VectorSpaces) = VectorSpaceObject(base_ring(Vec),1)Return the one-dimensional vector space.
Base.zero — Methodfunction zero(C::GradedVectorSpaces)Return the zero diemsnional graded vector space.
Base.zero — Methodzero(Vec::VectorSpaces) = VectorSpaceObject(base_ring(Vec), 0)Return the zero-dimensional vector space.
Hecke.cokernel — Methodfunction cokernel(f::GVSMorphism)Return the graded vector space cokernel of $f$.
Hecke.decompose — Methodfunction decompose(V::GVSObject)Return a vector with the simple objects together with their multiplicities $[V:Xi]$.
Hecke.dual — Methodfunction dual(V::GVSObject)Return the graded dual vector space of $V$.
Hecke.id — Methodid(X::VectorSpaceObject{T}) where TReturn the identity on the vector space $X$.
Hecke.tensor_product — Methodfunction tensor_product(V::GVSObject, W::GVSObject)Return the tensor product $V⊗W$.
Hecke.tensor_product — Methodtensor_product(f::VectorSpaceMorphism, g::VectorSpaceMorphism)Return the tensor product of vector space morphisms.
Hecke.tensor_product — Methodtensor_product(X::VectorSpaceObject{T}, Y::VectorSpaceObject{T}) where {T,S1,S2}Return the tensor product of vector spaces.
Oscar.morphism — Methodmorphism(m::MatElem)Vector space morphisms defined by m.
Oscar.morphism — Methodmorphism(X::VectorSpaceObject, Y::VectorSpaceObject, m::MatElem)Return a morphism in the category of vector spaces defined by m.
TensorCategories.Hom — Methodfunction Hom(V::GVSObject, W::GVSObject)Return the space of morphisms between graded vector spaces $V$ and $W$.
TensorCategories.Hom — MethodHom(X::VectorSpaceObject, Y::VectorSpaceObject)Return the Hom($X,Y$`) as a vector space.
TensorCategories.associator — Methodfunction associator(U::GVSObject, V::GVSObject, W::GVSObject)return the associator isomorphism $(U⊗V)⊗W → U⊗(V⊗W)$.
TensorCategories.associator — Methodassociator(X::VectorSpaceObject, Y::VectorSpaceObject, Z::VectorSpaceObject)Return the associator isomorphism a::(X⊗Y)⊗Z -> X⊗(Y⊗Z).
TensorCategories.ev — Methodfunction ev(V::GVSObject)Return the evaluation map $V*⊗V → 𝟙$.
TensorCategories.graded_vector_spaces — Methodgraded_vector_spaces(F::Field, G::Group)The category of G-graded vector spaces.
TensorCategories.simples — Methodfunction simples(C::GradedVectorSpaces)Return a vector containing the simple objects of $C$.