Package sage :: Package categories :: Module homset
[hide private]
[frames] | no frames]

Module homset

source code


Homsets

AUTHORS:
    -- David Kohel and William Stein
    -- David Joyner (2005-12-17): added examples
    -- William Stein (2006-01-14): Changed from Homspace to Homset.



Classes [hide private]
  Homset
The class for collections of morphisms in a category.
  HomsetWithBase
Functions [hide private]
 
Hom(X, Y, cat=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)
Create the space of homomorphisms from X to Y in the category cat.
source code
 
hom(X, Y, f)
Return Hom(X,Y)(f), where f is data that defines an element of Hom(X,Y).
source code
 
End(X, cat=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)
Create the set of endomorphisms of X in the category cat.
source code
 
end(X, f)
Return End(X)(f), where f is data that defines an element of End(X).
source code
 
is_Homset(x)
Return True if x is a set of homomorphisms in a category.
source code
 
is_Endset(x)
Return True if x is a set of endomorphisms in a category.
source code
Variables [hide private]
  _cache = {(Integer Ring, Rational Field, Category of rings): <...
Function Details [hide private]

Hom(X, Y, cat=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)

source code 

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

hom(X, Y, f)

source code 

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

End(X, cat=['4ti2-20061025', 'R-2.6.0', 'atlas-3.7.37', 'atlas-3.8.1', 'a...)

source code 

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: is_Endset(S)
    True
    sage: S.domain()
    Symmetric group of order 3! as a permutation group

Homsets are \emph{not} objects in their category.  They are
currently sets.
    sage: S.category()
    Category of sets
    sage: S.domain().category()
    Category of groups

end(X, f)

source code 

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


Variables Details [hide private]

_cache

Value:
{(Integer Ring, Rational Field, Category of rings): <weakref at 0x1e49\
2b8; to 'RingHomset_generic' at 0x1e2ad50>,
 (Rational Field,
  Complex Interval Field with 64 bits of precision,
  Category of fields): <weakref at 0x1e49628; to 'RingHomset_generic' \
at 0x1e53250>,
 (Rational Field,
  Number Field in I with defining polynomial x^2 + 1,
...