Homsets

AUTHORS:

  • David Kohel and William Stein
  • David Joyner (2005-12-17): added examples
  • William Stein (2006-01-14): Changed from Homspace to Homset.
sage.categories.homset.End(X, cat=None)

Create the set of endomorphisms of X in the category cat.

INPUT:

  • X - anything
  • cat - (optional) category in which to coerce X

OUTPUT: a set of endomorphisms in cat

EXAMPLES:

sage: V = VectorSpace(QQ, 3)
sage: End(V)
Set of Morphisms from Vector space of dimension 3 over Rational
Field to Vector space of dimension 3 over Rational Field in
Category of vector spaces over Rational Field
sage: G = SymmetricGroup(3)
sage: S = End(G); S
Set of Morphisms from SymmetricGroup(3) to SymmetricGroup(3) in Category of groups
sage: from sage.categories.homset import is_Endset
sage: is_Endset(S)
True
sage: S.domain()
Symmetric group of order 3! as a permutation group

Homsets are not objects in their category. They are currently sets.

sage: S.category()
Category of sets
sage: S.domain().category()
Category of groups
sage.categories.homset.Hom(X, Y, cat=None)

Create the space of homomorphisms from X to Y in the category cat.

INPUT:

  • X - anything
  • Y - anything
  • cat - (optional) category in which the morphisms must be

OUTPUT: a homset in cat

EXAMPLES:

sage: V = VectorSpace(QQ,3)
sage: Hom(V, V)
Set of Morphisms from Vector space of dimension 3 over Rational
Field to Vector space of dimension 3 over Rational Field in
Category of vector spaces over Rational Field
sage: G = SymmetricGroup(3)
sage: Hom(G, G)
Set of Morphisms from SymmetricGroup(3) to SymmetricGroup(3) in Category of groups
sage: Hom(ZZ, QQ, Sets())
Set of Morphisms from Integer Ring to Rational Field in Category of sets
class sage.categories.homset.Homset(X, Y, cat=None, check=True)

The class for collections of morphisms in a category.

EXAMPLES:

sage: H = Hom(QQ^2, QQ^3)
sage: loads(H.dumps()) == H
True
sage: E = End(AffineSpace(2, names='x,y'))
sage: loads(E.dumps()) == E
True
__call__(x, y=None, check=True)

Construct a morphism in this homset from x if possible.

EXAMPLES:

sage: H = Hom(SymmetricGroup(4), SymmetricGroup(7))
sage: phi = Hom(SymmetricGroup(5), SymmetricGroup(6)).natural_map()
sage: phi
Coercion morphism:
  From: SymmetricGroup(5)
  To:   SymmetricGroup(6)
sage: H(phi)
Composite map:
  From: SymmetricGroup(4)
  To:   SymmetricGroup(7)
  Defn:   Composite map:
          From: SymmetricGroup(4)
          To:   SymmetricGroup(6)
          Defn:   Call morphism:
                  From: SymmetricGroup(4)
                  To:   SymmetricGroup(5)
                then
                  Coercion morphism:
                  From: SymmetricGroup(5)
                  To:   SymmetricGroup(6)
        then
          Call morphism:
          From: SymmetricGroup(6)
          To:   SymmetricGroup(7)

AUTHORS:

  • Robert Bradshaw
__cmp__(other)
__contains__(x)
__init__(X, Y, cat=None, check=True)
__nonzero__()
_generic_convert_map(S)
_repr_()
codomain()
coerce_map_from_c(R)
domain()
get_action_c(R, op, self_on_left)
homset_category()

Return the category that this is a Hom in, i.e., this is typically the category of the domain or codomain object.

EXAMPLES:

sage: H = Hom(SymmetricGroup(4), SymmetricGroup(7)) 
sage: H.homset_category() 
Category of groups
identity()
is_endomorphism_set()
Return True if the domain and codomain of self are the same object.
natural_map()
reversed()

Return the corresponding homset, but with the domain and codomain reversed.

EXAMPLES:

sage: H = Hom(ZZ^2, ZZ^3); H
Set of Morphisms from Ambient free module of rank 2 over the principal ideal domain Integer Ring to Ambient free module of rank 3 over the principal ideal domain Integer Ring in Category of free modules over Integer Ring
sage: type(H)
<class 'sage.modules.free_module_homspace.FreeModuleHomspace'>
sage: H.reversed()
Set of Morphisms from Ambient free module of rank 3 over the principal ideal domain Integer Ring to Ambient free module of rank 2 over the principal ideal domain Integer Ring in Category of free modules over Integer Ring
sage: type(H.reversed())
<class 'sage.modules.free_module_homspace.FreeModuleHomspace'>
class sage.categories.homset.HomsetWithBase(X, Y, cat=None, check=True, base=None)
__init__(X, Y, cat=None, check=True, base=None)
sage.categories.homset.end(X, f)

Return End(X)(f), where f is data that defines an element of End(X).

EXAMPLES:

sage: R, x = PolynomialRing(QQ,'x').objgen()
sage: phi = end(R, [x + 1])
sage: phi
Ring endomorphism of Univariate Polynomial Ring in x over Rational Field
  Defn: x |--> x + 1
sage: phi(x^2 + 5)
x^2 + 2*x + 6
sage.categories.homset.hom(X, Y, f)

Return Hom(X,Y)(f), where f is data that defines an element of Hom(X,Y).

EXAMPLES:

sage: R, x = PolynomialRing(QQ,'x').objgen()
sage: phi = hom(R, QQ, [2])
sage: phi(x^2 + 3)
7
sage.categories.homset.is_Endset(x)
Return True if x is a set of endomorphisms in a category.
sage.categories.homset.is_Homset(x)
Return True if x is a set of homomorphisms in a category.

Previous topic

Categories

Next topic

Morphisms

This Page