Quiver Homspace

class sage.quivers.homspace.QuiverHomSpace(domain, codomain, category=None)[source]

Bases: Homset

A homomorphism of quiver representations (of one and the same quiver) is given by specifying, for each vertex of the quiver, a homomorphism of the spaces assigned to this vertex such that these homomorphisms commute with the edge maps. This class handles the set of all such maps, \(Hom_Q(M, N)\).

INPUT:

  • domain – the domain of the homomorphism space

  • codomain – the codomain of the homomorphism space

OUTPUT:

Note

The quivers of the domain and codomain must be equal or a ValueError is raised.

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b']}}).path_semigroup()
sage: H = Q.S(QQ, 2).Hom(Q.P(QQ, 1))
sage: H.dimension()
2
sage: H.gens()
(Homomorphism of representations of Multi-digraph on 2 vertices,
 Homomorphism of representations of Multi-digraph on 2 vertices)
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b']}}).path_semigroup()
>>> H = Q.S(QQ, Integer(2)).Hom(Q.P(QQ, Integer(1)))
>>> H.dimension()
2
>>> H.gens()
(Homomorphism of representations of Multi-digraph on 2 vertices,
 Homomorphism of representations of Multi-digraph on 2 vertices)
Element[source]

alias of QuiverRepHom

base_ring()[source]

Return the base ring of the representations.

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b']}}).path_semigroup()
sage: H = Q.S(QQ, 2).Hom(Q.P(QQ, 1))
sage: H.base_ring()
Rational Field
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b']}}).path_semigroup()
>>> H = Q.S(QQ, Integer(2)).Hom(Q.P(QQ, Integer(1)))
>>> H.base_ring()
Rational Field
codomain()[source]

Return the codomain of the hom space.

OUTPUT: QuiverRep; the codomain of the Hom space

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b']}}).path_semigroup()
sage: P = Q.P(QQ, 1)
sage: H = Q.S(QQ, 2).Hom(P)
sage: H.codomain() is P
True
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b']}}).path_semigroup()
>>> P = Q.P(QQ, Integer(1))
>>> H = Q.S(QQ, Integer(2)).Hom(P)
>>> H.codomain() is P
True
coordinates(hom)[source]

Return the coordinates of the map when expressed in terms of the generators (i. e., the output of the gens method) of the hom space.

INPUT:

OUTPUT:

  • list, the coordinates of the given map when written in terms of the generators of the QuiverHomSpace

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b']}}).path_semigroup()
sage: S = Q.S(QQ, 2)
sage: P = Q.P(QQ, 1)
sage: H = S.Hom(P)
sage: f = S.hom({2: [[1,-1]]}, P)
sage: H.coordinates(f)
[1, -1]
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b']}}).path_semigroup()
>>> S = Q.S(QQ, Integer(2))
>>> P = Q.P(QQ, Integer(1))
>>> H = S.Hom(P)
>>> f = S.hom({Integer(2): [[Integer(1),-Integer(1)]]}, P)
>>> H.coordinates(f)
[1, -1]
dimension()[source]

Return the dimension of the hom space.

OUTPUT: integer; the dimension

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b']}}).path_semigroup()
sage: H = Q.S(QQ, 2).Hom(Q.P(QQ, 1))
sage: H.dimension()
2
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b']}}).path_semigroup()
>>> H = Q.S(QQ, Integer(2)).Hom(Q.P(QQ, Integer(1)))
>>> H.dimension()
2
domain()[source]

Return the domain of the hom space.

OUTPUT: QuiverRep; the domain of the Hom space

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b']}}).path_semigroup()
sage: S = Q.S(QQ, 2)
sage: H = S.Hom(Q.P(QQ, 1))
sage: H.domain() is S
True
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b']}}).path_semigroup()
>>> S = Q.S(QQ, Integer(2))
>>> H = S.Hom(Q.P(QQ, Integer(1)))
>>> H.domain() is S
True
gens()[source]

Return a tuple of generators of the hom space (as a \(k\)-vector space).

OUTPUT: tuple of QuiverRepHom objects; the generators

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b']}}).path_semigroup()
sage: H = Q.S(QQ, 2).Hom(Q.P(QQ, 1))
sage: H.gens()
(Homomorphism of representations of Multi-digraph on 2 vertices,
 Homomorphism of representations of Multi-digraph on 2 vertices)
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b']}}).path_semigroup()
>>> H = Q.S(QQ, Integer(2)).Hom(Q.P(QQ, Integer(1)))
>>> H.gens()
(Homomorphism of representations of Multi-digraph on 2 vertices,
 Homomorphism of representations of Multi-digraph on 2 vertices)
left_module(basis=False)[source]

Create the QuiverRep of self as a module over the opposite quiver.

INPUT:

  • basis – boolean; if False, then only the module is returned. If True, then a tuple is returned. The first element is the QuiverRep and the second element is a dictionary which associates to each vertex a list. The elements of this list are the homomorphisms which correspond to the basis elements of that vertex in the module.

OUTPUT: QuiverRep or tuple

Warning

The codomain of the Hom space must be a left module.

Note

The left action of a path \(e\) on a map \(f\) is given by \((ef)(m) = ef(m)\). This gives the Hom space its structure as a left module over the path algebra. This is then converted to a right module over the path algebra of the opposite quiver Q.reverse() and returned.

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b'], 3: ['c', 'd']}, 2:{3:['e']}}).path_semigroup()
sage: P = Q.P(GF(3), 3)
sage: A = Q.free_module(GF(3))
sage: H = P.Hom(A)
sage: H.dimension()
6
sage: M, basis_dict = H.left_module(true)
sage: M.dimension_vector()
(4, 1, 1)
sage: Q.reverse().P(GF(3), 3).dimension_vector()
(4, 1, 1)
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b'], Integer(3): ['c', 'd']}, Integer(2):{Integer(3):['e']}}).path_semigroup()
>>> P = Q.P(GF(Integer(3)), Integer(3))
>>> A = Q.free_module(GF(Integer(3)))
>>> H = P.Hom(A)
>>> H.dimension()
6
>>> M, basis_dict = H.left_module(true)
>>> M.dimension_vector()
(4, 1, 1)
>>> Q.reverse().P(GF(Integer(3)), Integer(3)).dimension_vector()
(4, 1, 1)

As lists start indexing at 0 the \(i\)-th vertex corresponds to the \((i-1)\)-th entry of the dimension vector:

sage: len(basis_dict[2]) == M.dimension_vector()[1]
True
>>> from sage.all import *
>>> len(basis_dict[Integer(2)]) == M.dimension_vector()[Integer(1)]
True
natural_map()[source]

The natural map from domain to codomain.

This is the zero map.

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b']}, 2:{3:['c']}}).path_semigroup()
sage: spaces = {1: QQ^2, 2: QQ^2, 3:QQ^1}
sage: maps = {(1, 2, 'a'): [[1, 0], [0, 0]], (1, 2, 'b'): [[0, 0], [0, 1]], (2, 3, 'c'): [[1], [1]]}
sage: M = Q.representation(QQ, spaces, maps)
sage: spaces2 = {2: QQ^1, 3: QQ^1}
sage: S = Q.representation(QQ, spaces2)
sage: S.hom(M)      # indirect doctest
Homomorphism of representations of Multi-digraph on 3 vertices
sage: S.hom(M) == S.Hom(M).natural_map()
True
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b']}, Integer(2):{Integer(3):['c']}}).path_semigroup()
>>> spaces = {Integer(1): QQ**Integer(2), Integer(2): QQ**Integer(2), Integer(3):QQ**Integer(1)}
>>> maps = {(Integer(1), Integer(2), 'a'): [[Integer(1), Integer(0)], [Integer(0), Integer(0)]], (Integer(1), Integer(2), 'b'): [[Integer(0), Integer(0)], [Integer(0), Integer(1)]], (Integer(2), Integer(3), 'c'): [[Integer(1)], [Integer(1)]]}
>>> M = Q.representation(QQ, spaces, maps)
>>> spaces2 = {Integer(2): QQ**Integer(1), Integer(3): QQ**Integer(1)}
>>> S = Q.representation(QQ, spaces2)
>>> S.hom(M)      # indirect doctest
Homomorphism of representations of Multi-digraph on 3 vertices
>>> S.hom(M) == S.Hom(M).natural_map()
True
quiver()[source]

Return the quiver of the representations.

OUTPUT: DiGraph; the quiver of the representations

EXAMPLES:

sage: P = DiGraph({1:{2:['a', 'b']}}).path_semigroup()
sage: H = P.S(QQ, 2).Hom(P.P(QQ, 1))
sage: H.quiver() is P.quiver()
True
>>> from sage.all import *
>>> P = DiGraph({Integer(1):{Integer(2):['a', 'b']}}).path_semigroup()
>>> H = P.S(QQ, Integer(2)).Hom(P.P(QQ, Integer(1)))
>>> H.quiver() is P.quiver()
True
zero()[source]

Return the zero morphism.

Note

It is needed to override the method inherited from the category of modules, because it would create a morphism that is of the wrong type and does not comply with QuiverRepHom.

EXAMPLES:

sage: Q = DiGraph({1:{2:['a', 'b']}}).path_semigroup()
sage: H = Q.S(QQ, 2).Hom(Q.P(QQ, 1))
sage: H.zero() + H.an_element() == H.an_element()
True
sage: isinstance(H.zero(), H.element_class)
True
>>> from sage.all import *
>>> Q = DiGraph({Integer(1):{Integer(2):['a', 'b']}}).path_semigroup()
>>> H = Q.S(QQ, Integer(2)).Hom(Q.P(QQ, Integer(1)))
>>> H.zero() + H.an_element() == H.an_element()
True
>>> isinstance(H.zero(), H.element_class)
True