Skip to content

Commit 8a5615f

Browse files
author
Release Manager
committed
sagemathgh-38837: Fix bug in covering map of simplicial set with degenerate faces. There is a bug in the method to compute universal covers of simplicial sets. It is triggered when a nondegenerate cell has degenerate faces: ``` sage: RP2 = simplicial_sets.RealProjectiveSpace(2) sage: S3 = simplicial_sets.Sphere(3) sage: X = S3.wedge(RP2) sage: XU = X.universal_cover() ------------------------------------------------------------------------ --- KeyError Traceback (most recent call last) Cell In[5], line 1 ----> 1 X.universal_cover() File /usr/local/sage97/src/sage/categories/simplicial_sets.py:581, in SimplicialSets.Pointed.ParentMethods.universal_cover(self) 557 def universal_cover(self): 558 r""" 559 Return the universal cover of the simplicial set. 560 The fundamental group must be finite in order to ensure that the (...) 579 Finitely presented group < | > 580 """ --> 581 return self.universal_cover_map().domain() File /usr/local/sage97/src/sage/categories/simplicial_sets.py:429, in SimplicialSets.Pointed.ParentMethods.universal_cover_map(self) 427 return self.identity() 428 G, char = self._universal_cover_dict() --> 429 return self.covering_map(char) File /usr/local/sage97/src/sage/categories/simplicial_sets.py:499, in SimplicialSets.Pointed.ParentMethods.covering_map(self, character) 497 char[s] = char[s.nondegenerate()] 498 else: --> 499 char[s] = char[self.face(s, d)] 500 if s.is_nondegenerate(): 501 for g in G: KeyError: s_1 s_0 * ``` This PR fixes this. ### 📝 Checklist <!-- Put an `x` in all the boxes that apply. --> - [X] The title is concise and informative. - [X] The description explains in detail what this PR is about. - [ ] I have linked a relevant issue or discussion. - [X] I have created tests covering the changes. - [ ] I have updated the documentation and checked the documentation preview. ### ⌛ Dependencies <!-- List all open PRs that this PR logically depends on. For example, --> <!-- - sagemath#12345: short description why this is a dependency --> <!-- - sagemath#34567: ... --> URL: sagemath#38837 Reported by: miguelmarco Reviewer(s): John H. Palmieri
2 parents a90e4a3 + 6c3f6c9 commit 8a5615f

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/sage/categories/simplicial_sets.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ def covering_map(self, character):
484484
char[s] = G.one()
485485

486486
for d in range(1, self.dimension() + 1):
487-
for s in self.n_cells(d):
487+
for s in self.all_n_simplices(d):
488488
if s not in char.keys():
489489
if d == 1 and s.is_degenerate():
490490
char[s] = G.one()
@@ -575,6 +575,16 @@ def universal_cover(self):
575575
(f * f * f, e): ((f * f, 1), s_0 (f, e), s_1 (f, e), (f * f, e))}
576576
sage: C.fundamental_group()
577577
Finitely presented group < | >
578+
579+
TESTS::
580+
581+
sage: RP2 = simplicial_sets.RealProjectiveSpace(2)
582+
sage: S3 = simplicial_sets.Sphere(3)
583+
sage: X = S3.wedge(RP2)
584+
sage: XU = X.universal_cover()
585+
sage: [XU.homology(i) for i in range(5)]
586+
[0, 0, Z, Z x Z, 0]
587+
578588
"""
579589
return self.universal_cover_map().domain()
580590

0 commit comments

Comments
 (0)