Module: sage.categories.homset
Author Log:
Module-level Functions
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
sage: V = VectorSpace(Q, 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 Symmetric group of order 3! as a permutation group to Symmetric group of order 3! as a permutation group in Category of groups 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
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
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 Symmetric group of order 3! as a permutation group to Symmetric group of order 3! as a permutation group in Category of groups sage: Hom(ZZ, QQ, Sets()) Set of Morphisms from Integer Ring to Rational Field in Category of sets
X, f) |
Return End(X)(f), where f is data that defines an element of End(X).
sage: R, x = PolynomialRing(Q).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
X, Y, f) |
Return Hom(X,Y)(f), where f is data that defines an element of Hom(X,Y).
sage: R, x = PolynomialRing(Q).objgen() sage: phi = hom(R, Q, [2]) sage: phi(x^2 + 3) 7
x) |
Return True if x is a set of endomorphisms in a category.
x) |
Return True if x is a set of homomorphisms in a category.
Class: Homset
sage: H = Hom(Q^2, Q^3) sage: loads(H.dumps()) == H True sage: E = End(AffineSpace(2)) sage: loads(E.dumps()) == E True
self, X, Y, [cat=True], [check=None]) |
Functions: codomain,
domain,
is_endomorphism_set,
natural_map,
reversed
self) |
Return True if the domain and codomain of self are the same object.
self) |
Return the corresponding homset, but with the domain and codomain reversed.
Special Functions: __call__,
__cmp__,
__contains__,
_repr_
self, x, [y=None]) |
Construct a morphism in this homset from x if possible.
See About this document... for information on suggesting changes.