Skip to content

Commit

Permalink
gh-38254: Extend the method get_knotinfo of the Link class to cover n…
Browse files Browse the repository at this point in the history
…on-prime knots

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes #12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes #12345". -->

This PR implements a task from the following code-comment in `link.py`:

>        # ToDo: extension to non prime links in which case an element
of the monoid
>        # over :class:`KnotInfo` should be returned

In connection with this I switch the output of `get_knotinfo` to
elements of the new class `FreeKnotInfoMonoid` for all knots (prime or
not) For multi-component links I keep the output as it is, since the
`FreeKnotInfoMonoid` does not make sence here.

Another thing changes: Currently, if the `unique=False` option is used
symmetry mutants may be listed separately, even though they are known to
be isotopic because their symmetry type is reversible or amphicheiral.
Now, if symmetry mutants are known to be isotopic because of their
symmetry type, just the minimal of them is listed (in the order of the
enum).


### 📝 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.
- [x] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->
    
URL: #38254
Reported by: Sebastian Oehms
Reviewer(s): Sebastian Oehms, Travis Scrimshaw
  • Loading branch information
Release Manager committed Sep 27, 2024
2 parents b104450 + cfe19f9 commit 6a039da
Show file tree
Hide file tree
Showing 6 changed files with 747 additions and 136 deletions.
1 change: 1 addition & 0 deletions src/doc/en/reference/knots/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ Knot Theory
sage/knots/knot
sage/knots/link
sage/knots/knotinfo
sage/knots/free_knotinfo_monoid

.. include:: ../footer.txt
2 changes: 1 addition & 1 deletion src/sage/databases/knotinfo_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@ def _test_database(self, **options):
sage: from sage.databases.knotinfo_db import KnotInfoDataBase
sage: ki_db = KnotInfoDataBase()
sage: TestSuite(ki_db).run() # long time indirect doctest
sage: TestSuite(ki_db).run() # optional - database_knotinfo, long time, indirect doctest
"""
from sage.knots.knotinfo import KnotInfo
from sage.misc.misc import some_tuples
Expand Down
1 change: 0 additions & 1 deletion src/sage/knots/all.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from sage.misc.lazy_import import lazy_import
from sage.features.databases import DatabaseKnotInfo

lazy_import('sage.knots.knot', ['Knot', 'Knots'])
lazy_import('sage.knots.link', 'Link')
Expand Down
Loading

0 comments on commit 6a039da

Please sign in to comment.