Skip to content

Improvements to the Tangle class#69

Open
Shakugannotorch wants to merge 12 commits into
3-manifolds:masterfrom
Shakugannotorch:master
Open

Improvements to the Tangle class#69
Shakugannotorch wants to merge 12 commits into
3-manifolds:masterfrom
Shakugannotorch:master

Conversation

@Shakugannotorch
Copy link
Copy Markdown
Contributor

This is to improve the Tangle class while updating the link class slightly.

Feature additions

  1. Tangles are now oriented and knows exactly how many components and crossings it has; by default, the orientation on Tangles tries to make all the strands go upwards.
  2. Tangles can now be simplified with simplify('basic') and simplify('level') (the pickup moves are not implemented for now).
  3. Add PD_code(KnotTheory = False, min_strand_index = 0) method for Tangles and allow Tangles to be created from PD code (the PD codes for tangles is a slightly decorated version of those for links, see the docstring)
  4. Add reverse_orientation(component_index) for both Tangles and Links for easy manipulation of their orientations.
  5. Strands can now also be oriented similar to Crossings, and CrossingEntryPoints now fully support Strands as its crossing attribute.

Behavior changes

  1. Crossings in Tangles near the boundary are always connected to Strands in Tangle.boundary_strands, which is connected to Tangle.adjacent.
  2. Tangle.crossings now only contains Crossings after build; any strand in Tangle.crossings will be fused and if it has component_idx, the component_idx will be saved in the correspondingboundary_strands at the start of the component.
  3. Modified __repr__() for Tangles so that it now also prints the number of components, the number of crossings and the shape of the boundary similar to Links; the previous __repr__() is replaced by __str__() for Tangles.
  4. Basic operations for gluing tangles, such as __add__() and __mul__(), erases the orientations on both tangles and creates a new one on the new tangle (without any inheritance), in order to avoid conflicts on orientations
    after gluing.
  5. Spherogram now makes BraidTangle and ComponentTangle importable by SnapPy (needs corresponding change on SnapPy side for it to take affect)

Bug fixes

  1. _rebuild(same_components_and_orientations = True) now properly preserve the orientations for links; previously it reverse all orientations instead.

The previous code for Tangle is preserved as old_tangle.py, which is used for preserving the methods describe() and isosig() for tangles.

The improvement to the Tangle class is essential for subsequent implementation of computing Reshetikhin--Turaev knot polynomials in SnapPy using R-matrices.

Shakugannotorch and others added 12 commits May 8, 2026 15:35
Co-authored-by: Copilot <copilot@github.com>
More tests pending

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
_rebuild() bug fixed
simplify() bug fixed.
All three Reidemeister moves work for Tangles but not the pickup moves

TODO:
1. decide whether to fix describe() or replace it entirely with PD_code()
2. fix isosig() for Tangles
3. implement rot_num()
describe and isosig kept using old_tangles

TODO:
1. rot_num
2. flip
3. computation of RT invariants
4. is_planar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant