EXAMPLES:
sage: S = simplicial_complexes.Sphere(1)
sage: T = simplicial_complexes.Sphere(2)
sage: H = Hom(S,T)
sage: f = {0:0,1:1,2:3}
sage: x = H(f)
sage: x
Simplicial complex morphism {0: 0, 1: 1, 2: 3} from Simplicial complex with vertex set (0, 1, 2) and facets {(1, 2), (0, 2), (0, 1)} to Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 2, 3), (0, 1, 2), (1, 2, 3), (0, 1, 3)}
sage: x.is_injective()
True
sage: x.is_surjective()
False
sage: x.image()
Simplicial complex with vertex set (0, 1, 3) and facets {(1, 3), (0, 3), (0, 1)}
sage: from sage.homology.simplicial_complex import Simplex
sage: s = Simplex([1,2])
sage: x(s)
(1, 3)
TESTS:
sage: S = simplicial_complexes.Sphere(1)
sage: T = simplicial_complexes.Sphere(2)
sage: H = Hom(S,T)
sage: loads(dumps(H))==H
True
Bases: sage.categories.homset.Homset
Returns a (non-random) element of self.
EXAMPLES:
sage: S = simplicial_complexes.KleinBottle()
sage: T = simplicial_complexes.Sphere(5)
sage: H = Hom(S,T)
sage: x = H.an_element()
sage: x
Simplicial complex morphism {0: 0, 1: 0, 2: 0, 'R3': 0, 'L4': 0, 'L5': 0, 'L3': 0, 'R5': 0, 'R4': 0} from Simplicial complex with 9 vertices and 18 facets to Simplicial complex with vertex set (0, 1, 2, 3, 4, 5, 6) and 7 facets
Returns the diagonal morphism in Hom(S,SxS).
EXAMPLES:
sage: S = simplicial_complexes.Sphere(2)
sage: H = Hom(S,S.product(S))
sage: d = H.diagonal_morphism()
sage: d
Simplicial complex morphism {0: 'L0R0', 1: 'L1R1', 2: 'L2R2', 3: 'L3R3'} from Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 2, 3), (0, 1, 2), (1, 2, 3), (0, 1, 3)} to Simplicial complex with 16 vertices and 96 facets
sage: T = SimplicialComplex(3)
sage: U = T.product(T,rename_vertices = False)
sage: G = Hom(T,U)
sage: e = G.diagonal_morphism(rename_vertices = False)
sage: e
Simplicial complex morphism {0: (0, 0), 1: (1, 1), 2: (2, 2), 3: (3, 3)} from Simplicial complex with vertex set (0, 1, 2, 3) and facets {()} to Simplicial complex with 16 vertices and facets {()}
Returns the identity morphism of Hom(S,S).
EXAMPLES:
sage: S = simplicial_complexes.Sphere(2)
sage: H = Hom(S,S)
sage: i = H.identity()
sage: i.is_identity()
True
sage: T = SimplicialComplex(3,[[0,1]])
sage: G = Hom(T,T)
sage: G.identity()
Simplicial complex morphism {0: 0, 1: 1, 2: 2, 3: 3} from Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 1)} to Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 1)}
Return True if and only if x is a simplicial complex homspace.
EXAMPLES:
sage: H = Hom(SimplicialComplex(2),SimplicialComplex(3))
sage: H
Set of Morphisms from Simplicial complex with vertex set (0, 1, 2) and facets {()} to Simplicial complex with vertex set (0, 1, 2, 3) and facets {()} in Category of simplicial complexes
sage: from sage.homology.simplicial_complex_homset import is_SimplicialComplexHomset
sage: is_SimplicialComplexHomset(H)
True