Homspaces between chain complexes#
Note that some significant functionality is lacking. Namely, the homspaces
are not actually modules over the base ring. It will be necessary to
enrich some of the structure of chain complexes for this to be naturally
available. On other hand, there are various overloaded operators. __mul__
acts as composition. One can __add__
, and one can __mul__
with a ring
element on the right.
EXAMPLES:
sage: S = simplicial_complexes.Sphere(2)
sage: T = simplicial_complexes.Torus()
sage: C = S.chain_complex(augmented=True, cochain=True)
sage: D = T.chain_complex(augmented=True, cochain=True)
sage: G = Hom(C, D); G
Set of Morphisms
from Chain complex with at most 4 nonzero terms over Integer Ring
to Chain complex with at most 4 nonzero terms over Integer Ring
in Category of chain complexes over Integer Ring
sage: S = simplicial_complexes.ChessboardComplex(3, 3)
sage: H = Hom(S,S)
sage: i = H.identity()
sage: x = i.associated_chain_complex_morphism(augmented=True); x
Chain complex morphism:
From: Chain complex with at most 4 nonzero terms over Integer Ring
To: Chain complex with at most 4 nonzero terms over Integer Ring
sage: x._matrix_dictionary
{-1: [1],
0: [1 0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0 0]
[0 0 1 0 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0]
[0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 0 1],
1: [1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0]
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1],
2: [1 0 0 0 0 0]
[0 1 0 0 0 0]
[0 0 1 0 0 0]
[0 0 0 1 0 0]
[0 0 0 0 1 0]
[0 0 0 0 0 1]}
sage: S = simplicial_complexes.Sphere(2)
sage: A = Hom(S, S)
sage: i = A.identity()
sage: x = i.associated_chain_complex_morphism(); x
Chain complex morphism:
From: Chain complex with at most 3 nonzero terms over Integer Ring
To: Chain complex with at most 3 nonzero terms over Integer Ring
sage: y = x*4
sage: z = y*y
sage: y + z
Chain complex morphism:
From: Chain complex with at most 3 nonzero terms over Integer Ring
To: Chain complex with at most 3 nonzero terms over Integer Ring
sage: f = x._matrix_dictionary
sage: C = S.chain_complex()
sage: G = Hom(C, C)
sage: w = G(f)
sage: w == x
True
>>> from sage.all import *
>>> S = simplicial_complexes.Sphere(Integer(2))
>>> T = simplicial_complexes.Torus()
>>> C = S.chain_complex(augmented=True, cochain=True)
>>> D = T.chain_complex(augmented=True, cochain=True)
>>> G = Hom(C, D); G
Set of Morphisms
from Chain complex with at most 4 nonzero terms over Integer Ring
to Chain complex with at most 4 nonzero terms over Integer Ring
in Category of chain complexes over Integer Ring
>>> S = simplicial_complexes.ChessboardComplex(Integer(3), Integer(3))
>>> H = Hom(S,S)
>>> i = H.identity()
>>> x = i.associated_chain_complex_morphism(augmented=True); x
Chain complex morphism:
From: Chain complex with at most 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= simplicial_complexes.Sphere(Integer(2))
>>> A = Hom(S, S)
>>> i = A.identity()
>>> x = i.associated_chain_complex_morphism(); x
Chain complex morphism:
From: Chain complex with at most 3 nonzero terms over Integer Ring
To: Chain complex with at most 3 nonzero terms over Integer Ring
>>> y = x*Integer(4)
>>> z = y*y
>>> y + z
Chain complex morphism:
From: Chain complex with at most 3 nonzero terms over Integer Ring
To: Chain complex with at most 3 nonzero terms over Integer Ring
>>> f = x._matrix_dictionary
>>> C = S.chain_complex()
>>> G = Hom(C, C)
>>> w = G(f)
>>> w == x
True
- class sage.homology.chain_complex_homspace.ChainComplexHomspace(X, Y, category=None, base=None, check=True)[source]#
Bases:
Homset
Class of homspaces of chain complex morphisms.
EXAMPLES:
sage: T = SimplicialComplex([[1,2,3,4],[7,8,9]]) sage: C = T.chain_complex(augmented=True, cochain=True) sage: G = Hom(C, C) sage: G Set of Morphisms from Chain complex with at most 5 nonzero terms over Integer Ring to Chain complex with at most 5 nonzero terms over Integer Ring in Category of chain complexes over Integer Ring
>>> from sage.all import * >>> T = SimplicialComplex([[Integer(1),Integer(2),Integer(3),Integer(4)],[Integer(7),Integer(8),Integer(9)]]) >>> C = T.chain_complex(augmented=True, cochain=True) >>> G = Hom(C, C) >>> G Set of Morphisms from Chain complex with at most 5 nonzero terms over Integer Ring to Chain complex with at most 5 nonzero terms over Integer Ring in Category of chain complexes over Integer Ring
- sage.homology.chain_complex_homspace.is_ChainComplexHomspace(x)[source]#
Return
True
if and only ifx
is a morphism of chain complexes.EXAMPLES:
sage: from sage.homology.chain_complex_homspace import is_ChainComplexHomspace sage: T = SimplicialComplex([[1,2,3,4],[7,8,9]]) sage: C = T.chain_complex(augmented=True, cochain=True) sage: G = Hom(C, C) sage: is_ChainComplexHomspace(G) doctest:warning... DeprecationWarning: The function is_ChainComplexHomspace is deprecated; use 'isinstance(..., ChainComplexHomspace)' instead. See https://github.com/sagemath/sage/issues/38184 for details. True
>>> from sage.all import * >>> from sage.homology.chain_complex_homspace import is_ChainComplexHomspace >>> T = SimplicialComplex([[Integer(1),Integer(2),Integer(3),Integer(4)],[Integer(7),Integer(8),Integer(9)]]) >>> C = T.chain_complex(augmented=True, cochain=True) >>> G = Hom(C, C) >>> is_ChainComplexHomspace(G) doctest:warning... DeprecationWarning: The function is_ChainComplexHomspace is deprecated; use 'isinstance(..., ChainComplexHomspace)' instead. See https://github.com/sagemath/sage/issues/38184 for details. True