Homsets between simplicial complexes#

AUTHORS:

  • Travis Scrimshaw (2012-08-18): Made all simplicial complexes immutable to work with the homset cache.

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:
  From: Minimal triangulation of the 1-sphere
  To: Minimal triangulation of the 2-sphere
  Defn: 0 |--> 0
        1 |--> 1
        2 |--> 3
sage: x.is_injective()
True
sage: x.is_surjective()
False
sage: x.image()
Simplicial complex with vertex set (0, 1, 3) and facets {(0, 1), (0, 3), (1, 3)}
sage: from sage.topology.simplicial_complex import Simplex
sage: s = Simplex([1,2])
sage: x(s)
(1, 3)
>>> from sage.all import *
>>> S = simplicial_complexes.Sphere(Integer(1))
>>> T = simplicial_complexes.Sphere(Integer(2))
>>> H = Hom(S,T)
>>> f = {Integer(0):Integer(0),Integer(1):Integer(1),Integer(2):Integer(3)}
>>> x = H(f)
>>> x
Simplicial complex morphism:
  From: Minimal triangulation of the 1-sphere
  To: Minimal triangulation of the 2-sphere
  Defn: 0 |--> 0
        1 |--> 1
        2 |--> 3
>>> x.is_injective()
True
>>> x.is_surjective()
False
>>> x.image()
Simplicial complex with vertex set (0, 1, 3) and facets {(0, 1), (0, 3), (1, 3)}
>>> from sage.topology.simplicial_complex import Simplex
>>> s = Simplex([Integer(1),Integer(2)])
>>> x(s)
(1, 3)
class sage.topology.simplicial_complex_homset.SimplicialComplexHomset(X, Y, category=None, base=None, check=True)[source]#

Bases: Homset

an_element()[source]#

Return 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:
  From: Minimal triangulation of the Klein bottle
  To:   Minimal triangulation of the 5-sphere
  Defn: [0, 1, 2, 3, 4, 5, 6, 7] --> [0, 0, 0, 0, 0, 0, 0, 0]
>>> from sage.all import *
>>> S = simplicial_complexes.KleinBottle()
>>> T = simplicial_complexes.Sphere(Integer(5))
>>> H = Hom(S,T)
>>> x = H.an_element()
>>> x
Simplicial complex morphism:
  From: Minimal triangulation of the Klein bottle
  To:   Minimal triangulation of the 5-sphere
  Defn: [0, 1, 2, 3, 4, 5, 6, 7] --> [0, 0, 0, 0, 0, 0, 0, 0]
diagonal_morphism(rename_vertices=True)[source]#

Return the diagonal morphism in \(Hom(S, S \times S)\).

EXAMPLES:

sage: S = simplicial_complexes.Sphere(2)
sage: H = Hom(S,S.product(S, is_mutable=False))
sage: d = H.diagonal_morphism(); d
Simplicial complex morphism:
  From: Minimal triangulation of the 2-sphere
  To:   Simplicial complex with 16 vertices and 96 facets
  Defn: 0 |--> L0R0
        1 |--> L1R1
        2 |--> L2R2
        3 |--> L3R3

sage: T = SimplicialComplex([[0], [1]], is_mutable=False)
sage: U = T.product(T, rename_vertices=False, is_mutable=False)
sage: G = Hom(T, U)
sage: e = G.diagonal_morphism(rename_vertices=False); e
Simplicial complex morphism:
  From: Simplicial complex with vertex set (0, 1) and facets {(0,), (1,)}
  To:   Simplicial complex with 4 vertices and
        facets {((0, 0),), ((0, 1),), ((1, 0),), ((1, 1),)}
  Defn: 0 |--> (0, 0)
        1 |--> (1, 1)
>>> from sage.all import *
>>> S = simplicial_complexes.Sphere(Integer(2))
>>> H = Hom(S,S.product(S, is_mutable=False))
>>> d = H.diagonal_morphism(); d
Simplicial complex morphism:
  From: Minimal triangulation of the 2-sphere
  To:   Simplicial complex with 16 vertices and 96 facets
  Defn: 0 |--> L0R0
        1 |--> L1R1
        2 |--> L2R2
        3 |--> L3R3

>>> T = SimplicialComplex([[Integer(0)], [Integer(1)]], is_mutable=False)
>>> U = T.product(T, rename_vertices=False, is_mutable=False)
>>> G = Hom(T, U)
>>> e = G.diagonal_morphism(rename_vertices=False); e
Simplicial complex morphism:
  From: Simplicial complex with vertex set (0, 1) and facets {(0,), (1,)}
  To:   Simplicial complex with 4 vertices and
        facets {((0, 0),), ((0, 1),), ((1, 0),), ((1, 1),)}
  Defn: 0 |--> (0, 0)
        1 |--> (1, 1)
identity()[source]#

Return 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([[0,1]], is_mutable=False)
sage: G = Hom(T, T)
sage: G.identity()
Simplicial complex endomorphism of
 Simplicial complex with vertex set (0, 1) and facets {(0, 1)}
  Defn: 0 |--> 0
        1 |--> 1
>>> from sage.all import *
>>> S = simplicial_complexes.Sphere(Integer(2))
>>> H = Hom(S, S)
>>> i = H.identity()
>>> i.is_identity()
True

>>> T = SimplicialComplex([[Integer(0),Integer(1)]], is_mutable=False)
>>> G = Hom(T, T)
>>> G.identity()
Simplicial complex endomorphism of
 Simplicial complex with vertex set (0, 1) and facets {(0, 1)}
  Defn: 0 |--> 0
        1 |--> 1
sage.topology.simplicial_complex_homset.is_SimplicialComplexHomset(x)[source]#

Return True if and only if x is a simplicial complex homspace.

EXAMPLES:

sage: S = SimplicialComplex(is_mutable=False)
sage: T = SimplicialComplex(is_mutable=False)
sage: H = Hom(S, T)
sage: H
Set of Morphisms from Simplicial complex with vertex set () and facets {()}
 to Simplicial complex with vertex set () and facets {()}
 in Category of finite simplicial complexes
sage: from sage.topology.simplicial_complex_homset import is_SimplicialComplexHomset
sage: is_SimplicialComplexHomset(H)
doctest:warning...
DeprecationWarning: the function is_SimplicialComplexHomset is deprecated;
use 'isinstance(..., SimplicialComplexHomset)' instead
See https://github.com/sagemath/sage/issues/37922 for details.
True
>>> from sage.all import *
>>> S = SimplicialComplex(is_mutable=False)
>>> T = SimplicialComplex(is_mutable=False)
>>> H = Hom(S, T)
>>> H
Set of Morphisms from Simplicial complex with vertex set () and facets {()}
 to Simplicial complex with vertex set () and facets {()}
 in Category of finite simplicial complexes
>>> from sage.topology.simplicial_complex_homset import is_SimplicialComplexHomset
>>> is_SimplicialComplexHomset(H)
doctest:warning...
DeprecationWarning: the function is_SimplicialComplexHomset is deprecated;
use 'isinstance(..., SimplicialComplexHomset)' instead
See https://github.com/sagemath/sage/issues/37922 for details.
True