Skip to content

Commit 14a4071

Browse files
author
Matthias Koeppe
committed
sage.{hom,top}ology: Update from #35095
1 parent b63cff6 commit 14a4071

File tree

5 files changed

+32
-24
lines changed

5 files changed

+32
-24
lines changed

src/sage/topology/cell_complex.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,7 @@ def is_acyclic(self, base_ring=ZZ):
736736
737737
sage: K = cubical_complexes.KleinBottle()
738738
sage: C = cubical_complexes.Cube(2)
739-
sage: P = K.product(C)
740-
sage: P
739+
sage: P = K.product(C); P
741740
Cubical complex with 168 vertices and 1512 cubes
742741
sage: P.euler_characteristic()
743742
0
@@ -971,7 +970,7 @@ def cohomology_ring(self, base_ring=QQ):
971970
sage: T.set_immutable()
972971
sage: T.cohomology_ring() # needs sage.modules
973972
Cohomology ring of Simplicial complex with 9 vertices and
974-
18 facets over Rational Field
973+
18 facets over Rational Field
975974
"""
976975
from sage.homology.homology_vector_space_with_basis import CohomologyRing
977976
return CohomologyRing(base_ring, self)

src/sage/topology/simplicial_complex_examples.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@
6969
sage: from sage.topology.simplicial_complex_examples import PseudoQuaternionicProjectivePlane
7070
sage: H = PseudoQuaternionicProjectivePlane() # needs sage.groups
7171
doctest:warning...:
72-
DeprecationWarning: PseudoQuaternionicProjectivePlane is deprecated. Please use sage.topology.simplicial_complex_examples.QuaternionicProjectivePlane instead.
72+
DeprecationWarning: PseudoQuaternionicProjectivePlane is deprecated.
73+
Please use sage.topology.simplicial_complex_examples.QuaternionicProjectivePlane instead.
7374
See https://github.com/sagemath/sage/issues/34568 for details.
7475
"""
7576

@@ -1078,7 +1079,8 @@ def NotIConnectedGraphs(n, i):
10781079
10791080
EXAMPLES::
10801081
1081-
sage: simplicial_complexes.NotIConnectedGraphs(5, 2).f_vector()
1082+
sage: NICG52 = simplicial_complexes.NotIConnectedGraphs(5, 2)
1083+
sage: NICG52.f_vector()
10821084
[1, 10, 45, 120, 210, 240, 140, 20]
10831085
sage: NICG52.homology(5).ngens() # needs sage.modules
10841086
6

src/sage/topology/simplicial_complex_morphism.py

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,9 @@ def associated_chain_complex_morphism(self, base_ring=ZZ,
317317
sage: # needs sage.modules
318318
sage: S = simplicial_complexes.Sphere(1)
319319
sage: T = simplicial_complexes.Sphere(2)
320-
sage: H = Hom(S,T)
321-
sage: f = {0:0,1:1,2:2}
322-
sage: x = H(f)
323-
sage: x
320+
sage: H = Hom(S, T)
321+
sage: f = {0:0, 1:1, 2:2}
322+
sage: x = H(f); x
324323
Simplicial complex morphism:
325324
From: Minimal triangulation of the 1-sphere
326325
To: Minimal triangulation of the 2-sphere
@@ -365,19 +364,22 @@ def associated_chain_complex_morphism(self, base_ring=ZZ,
365364
sage: g = {0:1, 1:2, 2:0}
366365
sage: H(g).associated_chain_complex_morphism()._matrix_dictionary # needs sage.modules
367366
{0: [0 0 1]
368-
[1 0 0]
369-
[0 1 0]
370-
[0 0 0], 1: [ 0 -1 0]
371-
[ 0 0 -1]
372-
[ 0 0 0]
373-
[ 1 0 0]
374-
[ 0 0 0]
375-
[ 0 0 0], 2: []}
367+
[1 0 0]
368+
[0 1 0]
369+
[0 0 0],
370+
1: [ 0 -1 0]
371+
[ 0 0 -1]
372+
[ 0 0 0]
373+
[ 1 0 0]
374+
[ 0 0 0]
375+
[ 0 0 0],
376+
2: []}
376377
sage: X = SimplicialComplex([[0, 1]], is_mutable=False)
377378
sage: g = {0:1, 1:0}
378379
sage: Hom(X, X)(X).associated_chain_complex_morphism()._matrix_dictionary # needs sage.modules
379380
{0: [0 1]
380-
[1 0], 1: [-1]}
381+
[1 0],
382+
1: [-1]}
381383
"""
382384
from sage.homology.chain_complex_morphism import ChainComplexMorphism
383385

@@ -636,8 +638,8 @@ def mapping_torus(self):
636638
sage: T.homology() == simplicial_complexes.Torus().homology() # needs sage.modules
637639
True
638640
639-
sage: f = Hom(C,C)({0:0,1:2,2:1})
640-
sage: K = f.mapping_torus() ; K # Klein Bottle
641+
sage: f = Hom(C,C)({0:0, 1:2, 2:1})
642+
sage: K = f.mapping_torus(); K # Klein Bottle
641643
Simplicial complex with 9 vertices and 18 facets
642644
sage: K.homology() == simplicial_complexes.KleinBottle().homology() # needs sage.modules
643645
True
@@ -682,8 +684,10 @@ def induced_homology_morphism(self, base_ring=None, cohomology=False):
682684
sage: diag = H.diagonal_morphism()
683685
sage: h = diag.induced_homology_morphism(QQ); h # needs sage.modules
684686
Graded vector space morphism:
685-
From: Homology module of Minimal triangulation of the 1-sphere over Rational Field
686-
To: Homology module of Simplicial complex with 9 vertices and 18 facets over Rational Field
687+
From: Homology module of
688+
Minimal triangulation of the 1-sphere over Rational Field
689+
To: Homology module of
690+
Simplicial complex with 9 vertices and 18 facets over Rational Field
687691
Defn: induced by:
688692
Simplicial complex morphism:
689693
From: Minimal triangulation of the 1-sphere

src/sage/topology/simplicial_set.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@
216216
sage: B3.product(S1).homology() # needs sage.groups sage.modules
217217
Traceback (most recent call last):
218218
...
219-
NotImplementedError: this simplicial set may be infinite, so specify dimensions when computing homology
219+
NotImplementedError: this simplicial set may be infinite,
220+
so specify dimensions when computing homology
220221
221222
It should be easy to construct many simplicial sets from the
222223
predefined ones using pushouts, pullbacks, etc., but they can also be
@@ -2075,7 +2076,8 @@ def cohomology(self, dim=None, **kwds):
20752076
sage: BC3.cohomology() # needs sage.groups
20762077
Traceback (most recent call last):
20772078
...
2078-
NotImplementedError: this simplicial set may be infinite, so specify dimensions when computing homology
2079+
NotImplementedError: this simplicial set may be infinite,
2080+
so specify dimensions when computing homology
20792081
"""
20802082
return self.homology(dim=dim, cohomology=True, **kwds)
20812083

src/sage/topology/simplicial_set_morphism.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
from sage.categories.morphism import Morphism
3838
from sage.categories.simplicial_sets import SimplicialSets
3939
from sage.misc.latex import latex
40+
from sage.misc.lazy_import import lazy_import
4041
from sage.rings.integer_ring import ZZ
4142

4243
from .simplicial_set import SimplicialSet_arbitrary

0 commit comments

Comments
 (0)