AUTHORS:
This module implements morphisms of simplicial complexes. The input is given by a dictionary on the vertex set or the effective vertex set of a simplicial complex. The initialization checks that faces are sent to faces.
There is also the capability to create the fiber product of two morphisms with the same codomain.
EXAMPLES:
sage: S = SimplicialComplex(5,[[0,2],[1,5],[3,4]])
sage: H = Hom(S,S.product(S))
sage: H.diagonal_morphism()
Simplicial complex morphism {0: 'L0R0', 1: 'L1R1', 2: 'L2R2', 3: 'L3R3', 4: 'L4R4', 5: 'L5R5'} from Simplicial complex with vertex set (0, 1, 2, 3, 4, 5) and facets {(3, 4), (1, 5), (0, 2)} to Simplicial complex with 36 vertices and 18 facets
sage: S = SimplicialComplex(5,[[0,2],[1,5],[3,4]])
sage: T = SimplicialComplex(4,[[0,2],[1,3]])
sage: f = {0:0,1:1,2:2,3:1,4:3,5:3}
sage: H = Hom(S,T)
sage: x = H(f)
sage: x.image()
Simplicial complex with vertex set (0, 1, 2, 3) and facets {(1, 3), (0, 2)}
sage: x.is_surjective()
False
sage: x.is_injective()
False
sage: x.is_identity()
False
sage: S = simplicial_complexes.Sphere(2)
sage: H = Hom(S,S)
sage: i = H.identity()
sage: i.image()
Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 2, 3), (0, 1, 2), (1, 2, 3), (0, 1, 3)}
sage: i.is_surjective()
True
sage: i.is_injective()
True
sage: i.is_identity()
True
sage: S = simplicial_complexes.Sphere(2)
sage: H = Hom(S,S)
sage: i = H.identity()
sage: j = i.fiber_product(i)
sage: j
Simplicial complex morphism {'L1R1': 1, 'L3R3': 3, 'L2R2': 2, 'L0R0': 0} from Simplicial complex with 4 vertices and 4 facets 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: S = simplicial_complexes.Sphere(2)
sage: T = S.product(SimplicialComplex(1,[[0,1]]),rename_vertices = False)
sage: H = Hom(T,S)
sage: T
Simplicial complex with 8 vertices and 12 facets
sage: T.vertices()
((0, 0), (0, 1), (1, 0), (1, 1), (2, 0), (2, 1), (3, 0), (3, 1))
sage: f = {(0, 0): 0, (0, 1): 0, (1, 0): 1, (1, 1): 1, (2, 0): 2, (2, 1): 2, (3, 0): 3, (3, 1): 3}
sage: x = H(f)
sage: U = simplicial_complexes.Sphere(1)
sage: G = Hom(U,S)
sage: U
Simplicial complex with vertex set (0, 1, 2) and facets {(1, 2), (0, 2), (0, 1)}
sage: g = {0:0,1:1,2:2}
sage: y = G(g)
sage: z = y.fiber_product(x)
sage: z # this is the mapping path space
Simplicial complex morphism {'L2R(2, 0)': 2, 'L2R(2, 1)': 2, 'L0R(0, 0)': 0, 'L0R(0, 1)': 0, 'L1R(1, 0)': 1, 'L1R(1, 1)': 1} from Simplicial complex with 6 vertices and 6 facets to Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 2, 3), (0, 1, 2), (1, 2, 3), (0, 1, 3)}
Bases: sage.structure.sage_object.SageObject
An element of this class is a morphism of simplicial complexes.
Returns the associated chain complex morphism of self.
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:2}
sage: x = H(f)
sage: x
Simplicial complex morphism {0: 0, 1: 1, 2: 2} 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: a = x.associated_chain_complex_morphism()
sage: a
Chain complex morphism from Chain complex with at most 2 nonzero terms over Integer Ring to Chain complex with at most 3 nonzero terms over Integer Ring
sage: a._matrix_dictionary
{0: [0 0 0]
[0 1 0]
[0 0 1]
[1 0 0],
1: [0 0 0]
[0 1 0]
[0 0 0]
[1 0 0]
[0 0 0]
[0 0 1],
2: []}
sage: x.associated_chain_complex_morphism(augmented=True)
Chain complex morphism from Chain complex with at most 3 nonzero terms over Integer Ring to Chain complex with at most 4 nonzero terms over Integer Ring
sage: x.associated_chain_complex_morphism(cochain=True)
Chain complex morphism from Chain complex with at most 3 nonzero terms over Integer Ring to Chain complex with at most 2 nonzero terms over Integer Ring
sage: x.associated_chain_complex_morphism(augmented=True,cochain=True)
Chain complex morphism from Chain complex with at most 4 nonzero terms over Integer Ring to Chain complex with at most 3 nonzero terms over Integer Ring
sage: x.associated_chain_complex_morphism(base_ring=GF(11))
Chain complex morphism from Chain complex with at most 2 nonzero terms over Finite Field of size 11 to Chain complex with at most 3 nonzero terms over Finite Field of size 11
Some simplicial maps which reverse the orientation of a few simplices:
sage: g = {0:1, 1:2, 2:0}
sage: H(g).associated_chain_complex_morphism()._matrix_dictionary
{0: [0 0 0]
[1 0 0]
[0 1 0]
[0 0 1], 1: [ 0 0 0]
[-1 0 0]
[ 0 0 0]
[ 0 0 1]
[ 0 0 0]
[ 0 -1 0], 2: []}
sage: X = SimplicialComplex(1, [[0, 1]])
sage: Hom(X,X)({0:1, 1:0}).associated_chain_complex_morphism()._matrix_dictionary
{0: [0 1]
[1 0], 1: [-1]}
Returns the codomain of the morphism.
EXAMPLES:
sage: S = SimplicialComplex(3,[[0,1],[2,3]])
sage: T = SimplicialComplex(1,[[0,1]])
sage: f = {0:0,1:1,2:0,3:1}
sage: H = Hom(S,T)
sage: x = H(f)
sage: x.codomain()
Simplicial complex with vertex set (0, 1) and facets {(0, 1)}
Returns the domain of the morphism.
EXAMPLES:
sage: S = SimplicialComplex(3,[[0,1],[2,3]])
sage: T = SimplicialComplex(1,[[0,1]])
sage: f = {0:0,1:1,2:0,3:1}
sage: H = Hom(S,T)
sage: x = H(f)
sage: x.domain()
Simplicial complex with vertex set (0, 1, 2, 3) and facets {(2, 3), (0, 1)}
Fiber product of self and other. Both morphisms should have the same codomain. The method returns a morphism of simplicial complexes, which is the morphism from the space of the fiber product to the codomain.
EXAMPLES:
sage: S = SimplicialComplex(2,[[0,1],[1,2]])
sage: T = SimplicialComplex(2,[[0,2]])
sage: U = SimplicialComplex(1,[[0,1]])
sage: H = Hom(S,U)
sage: G = Hom(T,U)
sage: f = {0:0,1:1,2:0}
sage: g = {0:0,1:1,2:1}
sage: x = H(f)
sage: y = G(g)
sage: z = x.fiber_product(y)
sage: z
Simplicial complex morphism {'L1R2': 1, 'L2R0': 0, 'L0R0': 0} from Simplicial complex with vertex set ('L0R0', 'L1R2', 'L2R0') and facets {('L2R0',), ('L0R0', 'L1R2')} to Simplicial complex with vertex set (0, 1) and facets {(0, 1)}
Computes the image simplicial complex of f.
EXAMPLES:
sage: S = SimplicialComplex(3,[[0,1],[2,3]])
sage: T = SimplicialComplex(1,[[0,1]])
sage: f = {0:0,1:1,2:0,3:1}
sage: H = Hom(S,T)
sage: x = H(f)
sage: x.image()
Simplicial complex with vertex set (0, 1) and facets {(0, 1)}
sage: S = SimplicialComplex(2)
sage: H = Hom(S,S)
sage: i = H.identity()
sage: i.image()
Simplicial complex with vertex set (0, 1, 2) and facets {()}
sage: i.is_surjective()
True
sage: S = SimplicialComplex(5,[[0,1]])
sage: T = SimplicialComplex(3,[[0,1]])
sage: f = {0:0,1:1}
sage: g = {0:0,1:1,2:2,3:3,4:4,5:5}
sage: H = Hom(S,T)
sage: x = H(f)
sage: y = H(g)
sage: x == y
False
sage: x.image()
Simplicial complex with vertex set (0, 1) and facets {(0, 1)}
sage: y.image()
Simplicial complex with vertex set (0, 1, 2, 3, 4, 5) and facets {(0, 1)}
If x is an identity morphism, returns True. Otherwise, False.
EXAMPLES:
sage: T = simplicial_complexes.Sphere(1)
sage: G = Hom(T,T)
sage: T
Simplicial complex with vertex set (0, 1, 2) and facets {(1, 2), (0, 2), (0, 1)}
sage: j = G({0:0,1:1,2:2})
sage: j.is_identity()
True
sage: S = simplicial_complexes.Sphere(2)
sage: T = simplicial_complexes.Sphere(3)
sage: H = Hom(S,T)
sage: f = {0:0,1:1,2:2,3:3}
sage: x = H(f)
sage: x
Simplicial complex morphism {0: 0, 1: 1, 2: 2, 3: 3} 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 vertex set (0, 1, 2, 3, 4) and 5 facets
sage: x.is_identity()
False
Returns True if and only if self is injective.
EXAMPLES:
sage: S = simplicial_complexes.Sphere(1)
sage: T = simplicial_complexes.Sphere(2)
sage: U = simplicial_complexes.Sphere(3)
sage: H = Hom(T,S)
sage: G = Hom(T,U)
sage: f = {0:0,1:1,2:0,3:1}
sage: x = H(f)
sage: g = {0:0,1:1,2:2,3:3}
sage: y = G(g)
sage: x.is_injective()
False
sage: y.is_injective()
True
Returns True if and only if self is surjective.
EXAMPLES:
sage: S = SimplicialComplex(3,[(0,1,2)])
sage: S
Simplicial complex with vertex set (0, 1, 2, 3) and facets {(0, 1, 2)}
sage: T = SimplicialComplex(2,[(0,1)])
sage: T
Simplicial complex with vertex set (0, 1, 2) and facets {(0, 1)}
sage: H = Hom(S,T)
sage: x = H({0:0,1:1,2:1,3:2})
sage: x.is_surjective()
True
sage: S = SimplicialComplex(3,[[0,1],[2,3]])
sage: T = SimplicialComplex(1,[[0,1]])
sage: f = {0:0,1:1,2:0,3:1}
sage: H = Hom(S,T)
sage: x = H(f)
sage: x.is_surjective()
True
Returns True if and only if x is a morphism of simplicial complexes.
EXAMPLES:
sage: from sage.homology.simplicial_complex_morphism import is_SimplicialComplexMorphism
sage: S = SimplicialComplex(5,[[0,1],[3,4]])
sage: H = Hom(S,S)
sage: f = {0:0,1:1,2:2,3:3,4:4,5:5}
sage: x = H(f)
sage: is_SimplicialComplexMorphism(x)
True