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

Fix bug in covering map of simplicial set with degenerate faces. #38837

Merged
merged 1 commit into from
Oct 26, 2024

Conversation

miguelmarco
Copy link
Contributor

@miguelmarco miguelmarco commented Oct 22, 2024

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

  • The title is concise and informative.
  • The description explains in detail what this PR is about.
  • I have linked a relevant issue or discussion.
  • I have created tests covering the changes.
  • I have updated the documentation and checked the documentation preview.

⌛ Dependencies

Copy link

Documentation preview for this PR (built with commit 6c3f6c9; changes) is ready! 🎉
This preview will update shortly after each push to this PR.

@jhpalmieri
Copy link
Member

Looks good, thanks for catching fixing this.

@vbraun vbraun merged commit 8a5615f into sagemath:develop Oct 26, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants