Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sage.{topology,homology}: Modularization fixes #35581

Merged
merged 24 commits into from
May 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
326078e
sage.homology: Add # optional
mkoeppe Apr 28, 2023
6b5cd65
sage.topology: More # optional
mkoeppe Apr 28, 2023
acf3d47
sage.homology: Modularization fixes for imports
mkoeppe Apr 28, 2023
b9aa548
sage.topology: Modularization fixes for imports
mkoeppe Apr 28, 2023
a0398e9
sage.topology: More # optional
mkoeppe Apr 28, 2023
3a435fc
src/sage/homology/homology_morphism.py: Replace use of numpy.cumsum b…
mkoeppe Apr 28, 2023
f0e41e5
src/sage/categories/simplicial_sets.py: More # optional
mkoeppe Apr 28, 2023
7b24c69
sage.{homology,topology}: Doctest cosmetics
mkoeppe Apr 28, 2023
19083cd
src/sage/features/standard.py: Add pyparsing
mkoeppe May 4, 2023
661ce3e
sage.topology: Fix # optional
mkoeppe May 13, 2023
d68dc8b
Merge remote-tracking branch 'upstream/develop' into sage_topology_ho…
mkoeppe May 13, 2023
b8340ef
src/sage/topology/simplicial_complex.py: Add # optional
mkoeppe May 15, 2023
983f464
src/sage/topology/simplicial_set.py: Add # optional
mkoeppe May 17, 2023
8a9620d
Merge remote-tracking branch 'upstream/develop' into sage_topology_ho…
mkoeppe May 21, 2023
d3ae042
src/sage/homology/free_resolution.py: Use file-level # optional
mkoeppe May 24, 2023
d352ca5
src/sage/topology/filtered_simplicial_complex.py: Add # optional - sa…
mkoeppe May 24, 2023
33f30d6
src/sage/topology/simplicial_complex.py: Add # optional - sage.module…
mkoeppe May 24, 2023
5f853b5
src/sage/topology/simplicial_complex.py: Remove unnecessary # optional
mkoeppe May 24, 2023
11fd1f7
src/sage/topology/simplicial_set_constructions.py: Add # optional - s…
mkoeppe May 24, 2023
9dfc0c4
src/sage/topology/simplicial_set_morphism.py: Add # optional - sage.m…
mkoeppe May 24, 2023
f3eb176
src/sage/topology/simplicial_complex_homset.py: Doctest cosmetics
mkoeppe May 24, 2023
170fab6
src/sage/homology/algebraic_topological_model.py: Add # optional - sa…
mkoeppe May 24, 2023
0c97bcf
src/sage/homology/chain_complex_homspace.py: Doctest cosmetics
mkoeppe May 24, 2023
c4c593a
src/sage/homology/graded_resolution.py: Use file-level # optional
mkoeppe May 24, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 28 additions & 27 deletions src/sage/categories/simplicial_sets.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,10 +347,10 @@ def _universal_cover_dict(self):

TESTS::

sage: RP2 = simplicial_sets.RealProjectiveSpace(2)
sage: RP2._universal_cover_dict()
sage: RP2 = simplicial_sets.RealProjectiveSpace(2) # optional - sage.groups
sage: RP2._universal_cover_dict() # optional - sage.groups
(Finitely presented group < e | e^2 >, {f: e})
sage: RP2.nondegenerate_simplices()
sage: RP2.nondegenerate_simplices() # optional - sage.groups
[1, f, f * f]
"""
from sage.groups.free_group import FreeGroup
Expand Down Expand Up @@ -393,14 +393,14 @@ def universal_cover_map(self):

EXAMPLES::

sage: RP2 = simplicial_sets.RealProjectiveSpace(2)
sage: phi = RP2.universal_cover_map()
sage: phi
sage: RP2 = simplicial_sets.RealProjectiveSpace(2) # optional - sage.groups
sage: phi = RP2.universal_cover_map(); phi # optional - sage.groups
Simplicial set morphism:
From: Simplicial set with 6 non-degenerate simplices
To: RP^2
Defn: [(1, 1), (1, e), (f, 1), (f, e), (f * f, 1), (f * f, e)] --> [1, 1, f, f, f * f, f * f]
sage: phi.domain().face_data()
Defn: [(1, 1), (1, e), (f, 1), (f, e), (f * f, 1), (f * f, e)]
--> [1, 1, f, f, f * f, f * f]
sage: phi.domain().face_data() # optional - sage.groups
{(1, 1): None,
(1, e): None,
(f, 1): ((1, e), (1, 1)),
Expand Down Expand Up @@ -432,18 +432,20 @@ def covering_map(self, character):
EXAMPLES::

sage: S1 = simplicial_sets.Sphere(1)
sage: W = S1.wedge(S1)
sage: G = CyclicPermutationGroup(3)
sage: a, b = W.n_cells(1)
sage: C = W.covering_map({a : G.gen(0), b : G.one()})
sage: C
sage: W = S1.wedge(S1) # optional - sage.graphs
sage: G = CyclicPermutationGroup(3) # optional - sage.groups
sage: a, b = W.n_cells(1) # optional - sage.graphs
sage: C = W.covering_map({a : G.gen(0), b : G.one()}); C # optional - sage.graphs sage.groups
Simplicial set morphism:
From: Simplicial set with 9 non-degenerate simplices
To: Wedge: (S^1 v S^1)
Defn: [(*, ()), (*, (1,2,3)), (*, (1,3,2)), (sigma_1, ()), (sigma_1, ()), (sigma_1, (1,2,3)), (sigma_1, (1,2,3)), (sigma_1, (1,3,2)), (sigma_1, (1,3,2))] --> [*, *, *, sigma_1, sigma_1, sigma_1, sigma_1, sigma_1, sigma_1]
sage: C.domain()
Defn: [(*, ()), (*, (1,2,3)), (*, (1,3,2)), (sigma_1, ()),
(sigma_1, ()), (sigma_1, (1,2,3)), (sigma_1, (1,2,3)),
(sigma_1, (1,3,2)), (sigma_1, (1,3,2))]
--> [*, *, *, sigma_1, sigma_1, sigma_1, sigma_1, sigma_1, sigma_1]
sage: C.domain() # optional - sage.graphs sage.groups
Simplicial set with 9 non-degenerate simplices
sage: C.domain().face_data()
sage: C.domain().face_data() # optional - sage.graphs sage.groups
{(*, ()): None,
(*, (1,2,3)): None,
(*, (1,3,2)): None,
Expand Down Expand Up @@ -517,11 +519,11 @@ def cover(self, character):
EXAMPLES::

sage: S1 = simplicial_sets.Sphere(1)
sage: W = S1.wedge(S1)
sage: G = CyclicPermutationGroup(3)
sage: (a, b) = W.n_cells(1)
sage: C = W.cover({a : G.gen(0), b : G.gen(0)^2})
sage: C.face_data()
sage: W = S1.wedge(S1) # optional - sage.graphs
sage: G = CyclicPermutationGroup(3) # optional - sage.groups
sage: (a, b) = W.n_cells(1) # optional - sage.graphs
sage: C = W.cover({a : G.gen(0), b : G.gen(0)^2}) # optional - sage.graphs sage.groups
sage: C.face_data() # optional - sage.graphs sage.groups
{(*, ()): None,
(*, (1,2,3)): None,
(*, (1,3,2)): None,
Expand All @@ -531,9 +533,9 @@ def cover(self, character):
(sigma_1, (1,2,3)): ((*, ()), (*, (1,2,3))),
(sigma_1, (1,3,2)): ((*, ()), (*, (1,3,2))),
(sigma_1, (1,3,2)): ((*, (1,2,3)), (*, (1,3,2)))}
sage: C.homology(1)
sage: C.homology(1) # optional - sage.graphs sage.groups sage.modules
Z x Z x Z x Z
sage: C.fundamental_group()
sage: C.fundamental_group() # optional - sage.graphs sage.groups
Finitely presented group < e0, e1, e2, e3 | >
"""
return self.covering_map(character).domain()
Expand All @@ -546,11 +548,10 @@ def universal_cover(self):

EXAMPLES::

sage: RP3 = simplicial_sets.RealProjectiveSpace(3)
sage: C = RP3.universal_cover()
sage: C
sage: RP3 = simplicial_sets.RealProjectiveSpace(3) # optional - sage.groups
sage: C = RP3.universal_cover(); C # optional - sage.groups
Simplicial set with 8 non-degenerate simplices
sage: C.face_data()
sage: C.face_data() # optional - sage.groups
{(1, 1): None,
(1, e): None,
(f, 1): ((1, e), (1, 1)),
Expand Down
1 change: 1 addition & 0 deletions src/sage/features/standard.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def all_features():
JoinFeature('pplpy', (PythonModule('ppl'),), spkg='pplpy'),
PythonModule('primecountpy', spkg='primecountpy'),
PythonModule('ptyprocess', spkg='ptyprocess'),
PythonModule('pyparsing', spkg='pyparsing'),
PythonModule('requests', spkg='requests'),
PythonModule('scipy', spkg='scipy'),
PythonModule('sympy', spkg='sympy')]
13 changes: 7 additions & 6 deletions src/sage/homology/algebraic_topological_model.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
# sage.doctest: optional - sage.graphs
r"""
Algebraic topological model for a cell complex

Expand Down Expand Up @@ -100,8 +100,8 @@ def algebraic_topological_model(K, base_ring=None):

sage: from sage.homology.algebraic_topological_model import algebraic_topological_model
sage: RP2 = simplicial_complexes.RealProjectivePlane()
sage: phi, M = algebraic_topological_model(RP2, GF(2))
sage: M.homology()
sage: phi, M = algebraic_topological_model(RP2, GF(2)) # optional - sage.rings.finite_rings
sage: M.homology() # optional - sage.rings.finite_rings
{0: Vector space of dimension 1 over Finite Field of size 2,
mkoeppe marked this conversation as resolved.
Show resolved Hide resolved
1: Vector space of dimension 1 over Finite Field of size 2,
2: Vector space of dimension 1 over Finite Field of size 2}
Expand All @@ -123,7 +123,8 @@ def algebraic_topological_model(K, base_ring=None):
1
sage: phi.dual()
Chain homotopy between:
Chain complex endomorphism of Chain complex with at most 3 nonzero terms over Rational Field
Chain complex endomorphism of
Chain complex with at most 3 nonzero terms over Rational Field
and Chain complex morphism:
From: Chain complex with at most 3 nonzero terms over Rational Field
To: Chain complex with at most 3 nonzero terms over Rational Field
Expand Down Expand Up @@ -369,8 +370,8 @@ def algebraic_topological_model_delta_complex(K, base_ring=None):

sage: from sage.homology.algebraic_topological_model import algebraic_topological_model_delta_complex as AT_model
sage: RP2 = simplicial_complexes.RealProjectivePlane()
sage: phi, M = AT_model(RP2, GF(2))
sage: M.homology()
sage: phi, M = AT_model(RP2, GF(2)) # optional - sage.rings.finite_rings
sage: M.homology() # optional - sage.rings.finite_rings
{0: Vector space of dimension 1 over Finite Field of size 2,
1: Vector space of dimension 1 over Finite Field of size 2,
2: Vector space of dimension 1 over Finite Field of size 2}
Expand Down
Loading