Beispiel #1
0
#*****************************************************************************

from sage.categories.category import Category
import morphism
from sage.structure.parent import Parent, Set_generic
from sage.misc.lazy_attribute import lazy_attribute
from sage.misc.cachefunc import cached_function
import types

###################################
# Use the weak "triple" dictionary
# introduced in trac ticket #715

from weakref import KeyedRef
from sage.structure.coerce_dict import signed_id, TripleDict
_cache = TripleDict(53)


def Hom(X, Y, category=None):
    """
    Create the space of homomorphisms from X to Y in the category ``category``.
    
    INPUT:
    
    
    - ``X`` -- an object of a category

    - ``Y`` -- an object of a category

    - ``category`` -- a category in which the morphisms must be.
      (default: the meet of the categories of ``X`` and ``Y``)
Beispiel #2
0
from sage.categories.category import Category, JoinCategory
from . import morphism
from sage.structure.parent import Parent, Set_generic
from sage.misc.fast_methods import WithEqualityById
from sage.structure.dynamic_class import dynamic_class
from sage.structure.unique_representation import UniqueRepresentation
from sage.misc.lazy_attribute import lazy_attribute

###################################
# Use the weak "triple" dictionary
# introduced in trac ticket #715
# with weak values, as introduced in
# trac ticket #14159

from sage.structure.coerce_dict import TripleDict
_cache = TripleDict(weak_values=True)


def Hom(X, Y, category=None, check=True):
    """
    Create the space of homomorphisms from X to Y in the category ``category``.

    INPUT:


    - ``X`` -- an object of a category

    - ``Y`` -- an object of a category

    - ``category`` -- a category in which the morphisms must be.
      (default: the meet of the categories of ``X`` and ``Y``)