Skip to content

Commit b04cc0d

Browse files
author
Matthias Koeppe
committed
sage.homology: ./sage -fixdoctests --long --distribution 'sagemath-modules' --only-tags --probe=sage.rings.finite_rings --overwrite src/sage/homology/*.py
1 parent 0fd5967 commit b04cc0d

File tree

6 files changed

+35
-35
lines changed

6 files changed

+35
-35
lines changed

src/sage/homology/chain_complex.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def _latex_module(R, m):
8585
'\\Bold{Z}^{3}'
8686
sage: _latex_module(ZZ, 0)
8787
'0'
88-
sage: _latex_module(GF(3), 1) # optional - sage.rings.finite_rings
88+
sage: _latex_module(GF(3), 1)
8989
'\\Bold{F}_{3}^{1}'
9090
"""
9191
if m == 0:
@@ -188,11 +188,11 @@ def ChainComplex(data=None, base_ring=None, grading_group=None,
188188
Chain complex with at most 2 nonzero terms over Integer Ring
189189
190190
sage: m = matrix(ZZ, 2, 2, [0, 1, 0, 0])
191-
sage: D = ChainComplex([m, m], base_ring=GF(2)); D # optional - sage.rings.finite_rings
191+
sage: D = ChainComplex([m, m], base_ring=GF(2)); D
192192
Chain complex with at most 3 nonzero terms over Finite Field of size 2
193-
sage: D == loads(dumps(D)) # optional - sage.rings.finite_rings
193+
sage: D == loads(dumps(D))
194194
True
195-
sage: D.differential(0)==m, m.is_immutable(), D.differential(0).is_immutable() # optional - sage.rings.finite_rings
195+
sage: D.differential(0)==m, m.is_immutable(), D.differential(0).is_immutable()
196196
(True, False, True)
197197
198198
Note that when a chain complex is defined in Sage, new
@@ -336,9 +336,9 @@ def __init__(self, parent, vectors, check=True):
336336
337337
EXAMPLES::
338338
339-
sage: C = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])}, # optional - sage.rings.finite_rings
339+
sage: C = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])},
340340
....: base_ring=GF(7))
341-
sage: C.category() # optional - sage.rings.finite_rings
341+
sage: C.category()
342342
Category of chain complexes over Finite Field of size 7
343343
344344
TESTS::
@@ -771,7 +771,7 @@ def rank(self, degree, ring=None):
771771
[2]
772772
sage: C.rank(0)
773773
1
774-
sage: C.rank(0, ring=GF(2)) # optional - sage.rings.finite_rings
774+
sage: C.rank(0, ring=GF(2))
775775
0
776776
"""
777777
degree = self.grading_group()(degree)
@@ -1079,12 +1079,12 @@ def __eq__(self, other):
10791079
10801080
EXAMPLES::
10811081
1082-
sage: C = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])}, # optional - sage.rings.finite_rings
1082+
sage: C = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])},
10831083
....: base_ring=GF(2))
1084-
sage: D = ChainComplex({0: matrix(GF(2), 2, 3, [1, 0, 0, 0, 0, 0]), # optional - sage.rings.finite_rings
1084+
sage: D = ChainComplex({0: matrix(GF(2), 2, 3, [1, 0, 0, 0, 0, 0]),
10851085
....: 1: matrix(ZZ, 0, 2),
10861086
....: 3: matrix(ZZ, 0, 0)}) # base_ring determined from the matrices
1087-
sage: C == D # optional - sage.rings.finite_rings
1087+
sage: C == D
10881088
True
10891089
"""
10901090
if not isinstance(other, ChainComplex_class) or self.base_ring() != other.base_ring():
@@ -1108,16 +1108,16 @@ def __ne__(self, other):
11081108
11091109
EXAMPLES::
11101110
1111-
sage: C = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])}, # optional - sage.rings.finite_rings
1111+
sage: C = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])},
11121112
....: base_ring=GF(2))
1113-
sage: D = ChainComplex({0: matrix(GF(2), 2, 3, [1, 0, 0, 0, 0, 0]), # optional - sage.rings.finite_rings
1113+
sage: D = ChainComplex({0: matrix(GF(2), 2, 3, [1, 0, 0, 0, 0, 0]),
11141114
....: 1: matrix(ZZ, 0, 2),
11151115
....: 3: matrix(ZZ, 0, 0)}) # base_ring determined from the matrices
1116-
sage: C != D # optional - sage.rings.finite_rings
1116+
sage: C != D
11171117
False
11181118
sage: E = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])},
11191119
....: base_ring=ZZ)
1120-
sage: C != E # optional - sage.rings.finite_rings
1120+
sage: C != E
11211121
True
11221122
"""
11231123
return not self == other
@@ -1143,7 +1143,7 @@ def _homology_chomp(self, deg, base_ring, verbose, generators):
11431143
11441144
EXAMPLES::
11451145
1146-
sage: C = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])}, base_ring=GF(2)) # optional - sage.rings.finite_rings
1146+
sage: C = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])}, base_ring=GF(2))
11471147
sage: C._homology_chomp(None, GF(2), False, False) # optional - CHomP # optional - sage.rings.finite_rings
11481148
doctest:...: DeprecationWarning: the CHomP interface is deprecated; hence so is this function
11491149
See https://github.com/sagemath/sage/issues/33777 for details.
@@ -1253,7 +1253,7 @@ def homology(self, deg=None, base_ring=None, generators=False,
12531253
sage: C = ChainComplex({0: matrix(ZZ, 2, 3, [3, 0, 0, 0, 0, 0])})
12541254
sage: C.homology()
12551255
{0: Z x Z, 1: Z x C3}
1256-
sage: C.homology(deg=1, base_ring=GF(3)) # optional - sage.rings.finite_rings
1256+
sage: C.homology(deg=1, base_ring=GF(3))
12571257
Vector space of dimension 2 over Finite Field of size 3
12581258
sage: D = ChainComplex({0: identity_matrix(ZZ, 4), 4: identity_matrix(ZZ, 30)})
12591259
sage: D.homology()
@@ -1461,8 +1461,8 @@ def betti(self, deg=None, base_ring=None):
14611461
sage: C.betti()
14621462
{0: 2, 1: 1}
14631463
1464-
sage: D = ChainComplex({0: matrix(GF(5), [[3, 1],[1, 2]])}) # optional - sage.rings.finite_rings
1465-
sage: D.betti() # optional - sage.rings.finite_rings
1464+
sage: D = ChainComplex({0: matrix(GF(5), [[3, 1],[1, 2]])})
1465+
sage: D.betti()
14661466
{0: 1, 1: 1}
14671467
"""
14681468
if base_ring is None:

src/sage/homology/chains.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ def to_complex(self):
235235
236236
sage: square = cubical_complexes.Cube(2)
237237
sage: C1 = square.n_chains(1, QQ)
238-
sage: from sage.topology.cubical_complex import Cube
238+
sage: from sage.topology.cubical_complex import Cube # optional - sage.graphs
239239
sage: chain = C1(Cube([[1, 1], [0, 1]]))
240240
sage: chain.to_complex()
241241
Chain(1:(0, 0, 0, 1))
@@ -261,7 +261,7 @@ def boundary(self):
261261
262262
sage: square = cubical_complexes.Cube(2)
263263
sage: C1 = square.n_chains(1, QQ)
264-
sage: from sage.topology.cubical_complex import Cube
264+
sage: from sage.topology.cubical_complex import Cube # optional - sage.graphs
265265
sage: chain = C1(Cube([[1, 1], [0, 1]])) - 2 * C1(Cube([[0, 1], [0, 0]]))
266266
sage: chain
267267
-2*[0,1] x [0,0] + [1,1] x [0,1]
@@ -288,7 +288,7 @@ def is_cycle(self):
288288
289289
sage: square = cubical_complexes.Cube(2)
290290
sage: C1 = square.n_chains(1, QQ)
291-
sage: from sage.topology.cubical_complex import Cube
291+
sage: from sage.topology.cubical_complex import Cube # optional - sage.graphs
292292
sage: chain = C1(Cube([[1, 1], [0, 1]])) - C1(Cube([[0, 1], [0, 0]]))
293293
sage: chain.is_cycle()
294294
False
@@ -315,7 +315,7 @@ def is_boundary(self):
315315
316316
sage: square = cubical_complexes.Cube(2)
317317
sage: C1 = square.n_chains(1, QQ)
318-
sage: from sage.topology.cubical_complex import Cube
318+
sage: from sage.topology.cubical_complex import Cube # optional - sage.graphs
319319
sage: chain = C1(Cube([[1, 1], [0, 1]])) - C1(Cube([[0, 1], [0, 0]]))
320320
sage: chain.is_boundary()
321321
False
@@ -476,7 +476,7 @@ def to_complex(self):
476476
477477
sage: square = cubical_complexes.Cube(2)
478478
sage: C1 = square.n_chains(1, QQ, cochains=True)
479-
sage: from sage.topology.cubical_complex import Cube
479+
sage: from sage.topology.cubical_complex import Cube # optional - sage.graphs
480480
sage: cochain = C1(Cube([[1, 1], [0, 1]]))
481481
sage: cochain.to_complex()
482482
Chain(1:(0, 0, 0, 1))
@@ -502,7 +502,7 @@ def coboundary(self):
502502
503503
sage: square = cubical_complexes.Cube(2)
504504
sage: C1 = square.n_chains(1, QQ, cochains=True)
505-
sage: from sage.topology.cubical_complex import Cube
505+
sage: from sage.topology.cubical_complex import Cube # optional - sage.graphs
506506
sage: cochain = C1(Cube([[1, 1], [0, 1]])) - 2 * C1(Cube([[0, 1], [0, 0]]))
507507
sage: cochain
508508
-2*\chi_[0,1] x [0,0] + \chi_[1,1] x [0,1]
@@ -529,7 +529,7 @@ def is_cocycle(self):
529529
530530
sage: square = cubical_complexes.Cube(2)
531531
sage: C1 = square.n_chains(1, QQ, cochains=True)
532-
sage: from sage.topology.cubical_complex import Cube
532+
sage: from sage.topology.cubical_complex import Cube # optional - sage.graphs
533533
sage: cochain = C1(Cube([[1, 1], [0, 1]])) - C1(Cube([[0, 1], [0, 0]]))
534534
sage: cochain.is_cocycle()
535535
True
@@ -556,7 +556,7 @@ def is_coboundary(self):
556556
557557
sage: square = cubical_complexes.Cube(2)
558558
sage: C1 = square.n_chains(1, QQ, cochains=True)
559-
sage: from sage.topology.cubical_complex import Cube
559+
sage: from sage.topology.cubical_complex import Cube # optional - sage.graphs
560560
sage: cochain = C1(Cube([[1, 1], [0, 1]])) - C1(Cube([[0, 1], [0, 0]]))
561561
sage: cochain.is_coboundary()
562562
True

src/sage/homology/free_resolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def __classcall_private__(cls, module, *args, graded=False, degrees=None, shifts
131131
sage: Q = R.quo(I)
132132
sage: Q.is_integral_domain()
133133
False
134-
sage: xb, yb = Q.gens()
134+
sage: xb, yb = Q.gens() # optional - sage.rings.function_field
135135
sage: FreeResolution(Q.ideal([xb])) # has torsion
136136
Traceback (most recent call last):
137137
...

src/sage/homology/graded_resolution.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
sage: R.<s,t> = QQ[]
4848
sage: S.<a,b,c,d> = QQ[]
4949
sage: phi = S.hom([s, s*t, s*t^2, s*t^3])
50-
sage: I = phi.kernel(); I
50+
sage: I = phi.kernel(); I # optional - sage.rings.function_field
5151
Ideal (c^2 - b*d, b*c - a*d, b^2 - a*c) of
5252
Multivariate Polynomial Ring in a, b, c, d over Rational Field
5353
sage: P3 = ProjectiveSpace(S)

src/sage/homology/homology_vector_space_with_basis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -576,7 +576,7 @@ def product_on_basis(self, li, ri):
576576
577577
and simplicial sets::
578578
579-
sage: from sage.topology.simplicial_set_examples import RealProjectiveSpace
579+
sage: from sage.topology.simplicial_set_examples import RealProjectiveSpace # optional - sage.graphs
580580
sage: RP5 = RealProjectiveSpace(5)
581581
sage: x = RP5.cohomology_ring(GF(2)).basis()[1,0]
582582
sage: x**4

src/sage/homology/tests.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
1010
TESTS::
1111
12-
sage: from sage.homology.tests import test_random_chain_complex
12+
sage: from sage.homology.tests import test_random_chain_complex # optional - sage.modules
1313
sage: test_random_chain_complex(trials=20) # optional - CHomP
1414
doctest:...: DeprecationWarning: the CHomP interface is deprecated; hence so is this function
1515
See https://github.com/sagemath/sage/issues/33777 for details.
1616
sage: test_random_chain_complex(level=2, trials=20) # optional - CHomP
1717
sage: test_random_chain_complex(level=3, trials=20) # long time # optional - CHomP
1818
19-
sage: from sage.homology.tests import test_random_simplicial_complex
19+
sage: from sage.homology.tests import test_random_simplicial_complex # optional - sage.modules
2020
sage: test_random_simplicial_complex(level=1, trials=20) # optional - CHomP
2121
doctest:...: DeprecationWarning: the CHomP interface is deprecated; hence so is this function
2222
See https://github.com/sagemath/sage/issues/33777 for details.
@@ -46,7 +46,7 @@ def random_chain_complex(level=1):
4646
4747
EXAMPLES::
4848
49-
sage: from sage.homology.tests import random_chain_complex
49+
sage: from sage.homology.tests import random_chain_complex # optional - sage.modules
5050
sage: C = random_chain_complex()
5151
sage: C # random
5252
Chain complex with at most ... nonzero terms over Integer Ring
@@ -84,7 +84,7 @@ def test_random_chain_complex(level=1, trials=1, verbose=False):
8484
8585
EXAMPLES::
8686
87-
sage: from sage.homology.tests import test_random_chain_complex
87+
sage: from sage.homology.tests import test_random_chain_complex # optional - sage.modules
8888
sage: test_random_chain_complex(trials=2) # optional - CHomP
8989
doctest:...: DeprecationWarning: the CHomP interface is deprecated; hence so is this function
9090
See https://github.com/sagemath/sage/issues/33777 for details.
@@ -115,7 +115,7 @@ def random_simplicial_complex(level=1, p=0.5):
115115
116116
EXAMPLES::
117117
118-
sage: from sage.homology.tests import random_simplicial_complex
118+
sage: from sage.homology.tests import random_simplicial_complex # optional - sage.modules
119119
sage: X = random_simplicial_complex()
120120
sage: X # random
121121
Simplicial complex with vertex set (0, 1, 2, 3, 4, 5, 6, 7) and 31 facets
@@ -146,7 +146,7 @@ def test_random_simplicial_complex(level=1, trials=1, verbose=False):
146146
147147
EXAMPLES::
148148
149-
sage: from sage.homology.tests import test_random_simplicial_complex
149+
sage: from sage.homology.tests import test_random_simplicial_complex # optional - sage.modules
150150
sage: test_random_simplicial_complex(trials=2) # optional - CHomP
151151
doctest:...: DeprecationWarning: the CHomP interface is deprecated; hence so is this function
152152
See https://github.com/sagemath/sage/issues/33777 for details.

0 commit comments

Comments
 (0)