Access to the KnotInfo database¶
This module contains the class KnotInfoBase which is derived from
Enum and provides knots and links listed in the databases at the
web-pages KnotInfo
and LinkInfo as its items.
This interface contains a set of about twenty knots and links statically as demonstration cases. The complete database can be installed as an optional Sage package using
- sage -i database_knotinfo(does not install if the current version is present)
- sage -f database_knotinfo(installs even if the current version is present)
This will install a Python wrapper for the original databases in Sage. This wrapper perfoms an automatic progress of version numbers. For more details and further install instructions please see the corresponding web-page.
To perform all the doctests concerning the usage of the database on the installation
add the option -c. In this case (for instance sage -f -c database_knotinfo)
the installation breaks on failing tests.
The installation of the complete database will be necessary in order to have access to all the properties recorded in the databases, as well.
If the entire database is installed as explained above, the import instructions
for KnotInfo and KnotInfoSeries, which can be seen in the opening
lines of the examples, are unnecessary.
Be aware that there are a couple of conventions used differently on KnotInfo as in Sage.
For different conventions regarding normalization of the polynomial invariants see
the according documentation of KnotInfoBase.homfly_polynomial(),
KnotInfoBase.jones_polynomial() and KnotInfoBase.alexander_polynomial().
Also, note that the braid notation is used according to Sage, even thought in the source where it is taken from, the braid generators are assumed to have a negative crossing which would be opposite to the convention in Sage (see definition 3 of Gittings, T., “Minimum Braids: A Complete Invariant of Knots and Links”).
Furthermore, note that not all columns available in the database are visible on the web pages. It is planned to remove non-visible columns from the database in the future (see the Python Wrapper for updated information).
EXAMPLES:
sage: L = KnotInfo.L4a1_0
sage: L.pd_notation()
[[6, 1, 7, 2], [8, 3, 5, 4], [2, 5, 3, 6], [4, 7, 1, 8]]
sage: L.pd_notation(original=True)
'{{6, 1, 7, 2}, {8, 3, 5, 4}, {2, 5, 3, 6}, {4, 7, 1, 8}}'
sage: L.is_knot()
False
sage: L.num_components()
2
>>> from sage.all import *
>>> L = KnotInfo.L4a1_0
>>> L.pd_notation()
[[6, 1, 7, 2], [8, 3, 5, 4], [2, 5, 3, 6], [4, 7, 1, 8]]
>>> L.pd_notation(original=True)
'{{6, 1, 7, 2}, {8, 3, 5, 4}, {2, 5, 3, 6}, {4, 7, 1, 8}}'
>>> L.is_knot()
False
>>> L.num_components()
2
Items for knots need a leading K for technical reason:
sage: K = KnotInfo.K4_1
sage: K.is_knot()
True
>>> from sage.all import *
>>> K = KnotInfo.K4_1
>>> K.is_knot()
True
Injecting the variable name into the namespace:
sage: KnotInfo.K5_1.inject()
Defining K5_1
sage: K5_1.dt_notation()
[6, 8, 10, 2, 4]
>>> from sage.all import *
>>> KnotInfo.K5_1.inject()
Defining K5_1
>>> K5_1.dt_notation()
[6, 8, 10, 2, 4]
Defining a link from the original name string:
sage: KnotInfo('L6a1{1}').inject()
Defining L6a1_1
sage: L6a1_1.is_alternating()
True
>>> from sage.all import *
>>> KnotInfo('L6a1{1}').inject()
Defining L6a1_1
>>> L6a1_1.is_alternating()
True
Obtaining an instance of Braid:
sage: L.braid()
s1^-2*s0^-1*s1*s0^-1
sage: type(_)
<class 'sage.groups.braid.BraidGroup_class_with_category.element_class'>
>>> from sage.all import *
>>> L.braid()
s1^-2*s0^-1*s1*s0^-1
>>> type(_)
<class 'sage.groups.braid.BraidGroup_class_with_category.element_class'>
Obtaining an instance of Link:
sage: l = L.link(); l
Link with 2 components represented by 4 crossings
sage: type(l)
<class 'sage.knots.link.Link'>
>>> from sage.all import *
>>> l = L.link(); l
Link with 2 components represented by 4 crossings
>>> type(l)
<class 'sage.knots.link.Link'>
If you have SnapPy installed inside
Sage, you can obtain an instance of Link,
too:
sage: # optional - snappy
sage: L6 = KnotInfo.L6a1_0
sage: l6s = L6.link(snappy=True); l6s
...
<Link: 2 comp; 6 cross>
sage: type(l6s)
<class 'spherogram.links.invariants.Link'>
sage: l6  = L6.link()
sage: l6 == l6s.sage_link()
True
sage: L6.link(L6.items.name, snappy=True)
<Link L6a1: 2 comp; 6 cross>
sage: l6sn = _
sage: l6s == l6sn
False
sage: l6m = l6.mirror_image()
sage: l6sn.sage_link().is_isotopic(l6m)
True
>>> from sage.all import *
>>> # optional - snappy
>>> L6 = KnotInfo.L6a1_0
>>> l6s = L6.link(snappy=True); l6s
...
<Link: 2 comp; 6 cross>
>>> type(l6s)
<class 'spherogram.links.invariants.Link'>
>>> l6  = L6.link()
>>> l6 == l6s.sage_link()
True
>>> L6.link(L6.items.name, snappy=True)
<Link L6a1: 2 comp; 6 cross>
>>> l6sn = _
>>> l6s == l6sn
False
>>> l6m = l6.mirror_image()
>>> l6sn.sage_link().is_isotopic(l6m)
True
But observe that the name conversion to SnapPy does not distinguish orientation types:
sage: L6b = KnotInfo.L6a1_1
sage: L6b.link(L6b.items.name, snappy=True)  # optional - snappy
<Link L6a1: 2 comp; 6 cross>
sage: _.PD_code() == l6sn.PD_code()          # optional - snappy
True
>>> from sage.all import *
>>> L6b = KnotInfo.L6a1_1
>>> L6b.link(L6b.items.name, snappy=True)  # optional - snappy
<Link L6a1: 2 comp; 6 cross>
>>> _.PD_code() == l6sn.PD_code()          # optional - snappy
True
Obtaining the HOMFLY-PT polynomial:
sage: L.homfly_polynomial()
-v^-1*z - v^-3*z - v^-3*z^-1 + v^-5*z^-1
sage: _ == l.homfly_polynomial(normalization='vz')
True
>>> from sage.all import *
>>> L.homfly_polynomial()
-v^-1*z - v^-3*z - v^-3*z^-1 + v^-5*z^-1
>>> _ == l.homfly_polynomial(normalization='vz')
True
Obtaining the original string from the database for an arbitrary property:
sage: K[K.items.classical_conway_name]  # optional - database_knotinfo
'4_1'
>>> from sage.all import *
>>> K[K.items.classical_conway_name]  # optional - database_knotinfo
'4_1'
Further methods:
sage: K.crossing_number()
4
sage: K.gauss_notation()
[-1, 2, -3, 1, -4, 3, -2, 4]
sage: K.dt_notation()
[4, 6, 8, 2]
sage: K.determinant()
5
sage: K.symmetry_type()
'fully amphicheiral'
sage: _ == K[K.items.symmetry_type]
True
sage: K.is_reversible()
True
sage: K.is_amphicheiral()
True
sage: K.jones_polynomial()                                                          # needs sage.symbolic
t^2 - t - 1/t + 1/t^2 + 1
sage: K.kauffman_polynomial()
a^2*z^2 + a*z^3 - a^2 - a*z + 2*z^2 + a^-1*z^3 - 1 - a^-1*z + a^-2*z^2 - a^-2
sage: K.alexander_polynomial()
t^2 - 3*t + 1
>>> from sage.all import *
>>> K.crossing_number()
4
>>> K.gauss_notation()
[-1, 2, -3, 1, -4, 3, -2, 4]
>>> K.dt_notation()
[4, 6, 8, 2]
>>> K.determinant()
5
>>> K.symmetry_type()
'fully amphicheiral'
>>> _ == K[K.items.symmetry_type]
True
>>> K.is_reversible()
True
>>> K.is_amphicheiral()
True
>>> K.jones_polynomial()                                                          # needs sage.symbolic
t^2 - t - 1/t + 1/t^2 + 1
>>> K.kauffman_polynomial()
a^2*z^2 + a*z^3 - a^2 - a*z + 2*z^2 + a^-1*z^3 - 1 - a^-1*z + a^-2*z^2 - a^-2
>>> K.alexander_polynomial()
t^2 - 3*t + 1
Using the column_type of a property:
sage: def select_column(i):
....:     return i.column_type() != i.types.OnlyLinks and K[i] == 'Y'
sage: [i.column_name() for i in K.items if select_column(i)]  # optional - database_knotinfo
['Alternating', 'Fibered', 'Quasialternating', 'Adequate']
>>> from sage.all import *
>>> def select_column(i):
...     return i.column_type() != i.types.OnlyLinks and K[i] == 'Y'
>>> [i.column_name() for i in K.items if select_column(i)]  # optional - database_knotinfo
['Alternating', 'Fibered', 'Quasialternating', 'Adequate']
You can launch web-pages attached to the links:
sage: # not tested
sage: K.diagram()
True
sage: L.diagram(single=True)
True
sage: L.knot_atlas_webpage()
True
sage: K.knotilus_webpage()
True
>>> from sage.all import *
>>> # not tested
>>> K.diagram()
True
>>> L.diagram(single=True)
True
>>> L.knot_atlas_webpage()
True
>>> K.knotilus_webpage()
True
and the description web-pages of the properties:
sage: K.items.positive.description_webpage()  # not tested
True
>>> from sage.all import *
>>> K.items.positive.description_webpage()  # not tested
True
To see all the properties available in this interface you can use “tab-completion”.
For example type K.items. and than hit the Tab key. You can select the item
you want from the list. If you know some first letters type them first to obtain a
reduced selection list.
In a similar way you may select the knots and links. Here you have to type KnotInfo.
or KnotInfo.L7 before stroking the Tab key. In the latter case  the selection list
will be reduced to proper links with 7 crossings.
Finally there is a method Link.get_knotinfo() of class Link to find an instance
in the KnotInfo database:
sage: L = Link([[3,1,2,4], [8,9,1,7], [5,6,7,3], [4,18,6,5],
....:           [17,19,8,18], [9,10,11,14], [10,12,13,11],
....:           [12,19,15,13], [20,16,14,15], [16,20,17,2]])
sage: L.get_knotinfo()
KnotInfo['K0_1']
>>> from sage.all import *
>>> L = Link([[Integer(3),Integer(1),Integer(2),Integer(4)], [Integer(8),Integer(9),Integer(1),Integer(7)], [Integer(5),Integer(6),Integer(7),Integer(3)], [Integer(4),Integer(18),Integer(6),Integer(5)],
...           [Integer(17),Integer(19),Integer(8),Integer(18)], [Integer(9),Integer(10),Integer(11),Integer(14)], [Integer(10),Integer(12),Integer(13),Integer(11)],
...           [Integer(12),Integer(19),Integer(15),Integer(13)], [Integer(20),Integer(16),Integer(14),Integer(15)], [Integer(16),Integer(20),Integer(17),Integer(2)]])
>>> L.get_knotinfo()
KnotInfo['K0_1']
REFERENCES:
AUTHORS:
- Sebastian Oehms August 2020: initial version 
- Sebastian Oehms June 2022: add - conway_polynomial()and- khovanov_polynomial()(Issue #33969)
Thanks to Chuck Livingston and Allison Moore for their support. For further acknowledgments see the corresponding hompages.
- class sage.knots.knotinfo.KnotInfo(*values)[source]¶
- Bases: - KnotInfoBase
- class sage.knots.knotinfo.KnotInfoBase(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]¶
- Bases: - Enum- Enum class to select the knots and links listed in the databases at the web-pages KnotInfo and LinkInfo. - EXAMPLES: - sage: [knot.name for knot in KnotInfo if knot.crossing_number() < 5] ['K0_1', 'K3_1', 'K4_1', 'L2a1_0', 'L2a1_1', 'L4a1_0', 'L4a1_1'] - >>> from sage.all import * >>> [knot.name for knot in KnotInfo if knot.crossing_number() < Integer(5)] ['K0_1', 'K3_1', 'K4_1', 'L2a1_0', 'L2a1_1', 'L4a1_0', 'L4a1_1'] - More examples and information can be seen in the module header - knotinfo(by typing):- sage: import sage.knots.knotinfo # not tested sage: sage.knots.knotinfo? # not tested - >>> from sage.all import * >>> import sage.knots.knotinfo # not tested >>> sage.knots.knotinfo? # not tested - alexander_polynomial(var='t', original=False, laurent_poly=False)[source]¶
- Return the Alexander polynomial according to the value of column - alexander_polynomialfor this knot as an instance of- Polynomial.- It is obtained from the Seifert matrix \(V\) of - selfby the following formula (see the KnotInfo description web-page; to launch it see the example below):\[A(L) = \det(V -t V^t)\]- Here \(V^t\) stands for the transpose of \(V\). - INPUT: - var– (default:- 't') the variable
- original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
- laurent_poly– boolean (default:- False); see the note below
 - OUTPUT: - A polynomial over the integers, more precisely an instance of - Polynomial. If- laurent_polyis set to- Truea Laurent polynomial over the integers, more precisely an instance of- LaurentPolynomialis returned. If- originalis set to- Truethen a string is returned.- Note - As an invariant the Alexander polynomial is only unique up to a unit factor in the Laurent polynomial ring over the integers in the indeterminate \(t\). While the normalization of the exponents in KnotInfo guarantees it to be a proper polynomial, this is not the case for the implementation in Sage. Use the keyword - laurent_polyto achiev a normalization according to Sage. But, still there may be a difference in sign (see the example below).- EXAMPLES: - sage: K = KnotInfo.K4_1 sage: Ka = K.alexander_polynomial(); Ka t^2 - 3*t + 1 - >>> from sage.all import * >>> K = KnotInfo.K4_1 >>> Ka = K.alexander_polynomial(); Ka t^2 - 3*t + 1 - Comparison with Sage’s results: - sage: k = K.link() sage: ka = k.alexander_polynomial(); ka -t^-1 + 3 - t sage: K.alexander_polynomial(laurent_poly=True) t^-1 - 3 + t sage: _ == -ka True - >>> from sage.all import * >>> k = K.link() >>> ka = k.alexander_polynomial(); ka -t^-1 + 3 - t >>> K.alexander_polynomial(laurent_poly=True) t^-1 - 3 + t >>> _ == -ka True - Launch the KnotInfo description web-page: - sage: K.items.alexander_polynomial.description_webpage() # not tested True - >>> from sage.all import * >>> K.items.alexander_polynomial.description_webpage() # not tested True 
 - braid()[source]¶
- Return the braid notation of - selfas an instance of- Braid.- EXAMPLES: - sage: K = KnotInfo.K3_1 sage: K.braid() s^3 sage: K.braid_notation() (1, 1, 1) sage: KnotInfo.K13n_1448.braid() # optional - database_knotinfo s0^-1*s1*s2*s3*s4*s3^2*s2^-1*s1^-1*s0*s2^-1*s1*(s3*s2)^2*s4^-1*s3*s2*s1^-1*s3*s2^-1*s3 - >>> from sage.all import * >>> K = KnotInfo.K3_1 >>> K.braid() s^3 >>> K.braid_notation() (1, 1, 1) >>> KnotInfo.K13n_1448.braid() # optional - database_knotinfo s0^-1*s1*s2*s3*s4*s3^2*s2^-1*s1^-1*s0*s2^-1*s1*(s3*s2)^2*s4^-1*s3*s2*s1^-1*s3*s2^-1*s3 
 - braid_index()[source]¶
- Return the value of column - braid_indexfor this link as a Python int.- OUTPUT: - Python int giving the minimum of strands needed to represent - selfas closure of a braid.- EXAMPLES: - sage: L = KnotInfo.L4a1_0 sage: L.braid_index() 3 sage: KnotInfo.K13a_1.inject() # optional - database_knotinfo Defining K13a_1 sage: K13a_1.braid_index() # optional - database_knotinfo Traceback (most recent call last): ... NotImplementedError: this integer is not provided by the database - >>> from sage.all import * >>> L = KnotInfo.L4a1_0 >>> L.braid_index() 3 >>> KnotInfo.K13a_1.inject() # optional - database_knotinfo Defining K13a_1 >>> K13a_1.braid_index() # optional - database_knotinfo Traceback (most recent call last): ... NotImplementedError: this integer is not provided by the database 
 - braid_length()[source]¶
- Return the value of column - braid_lengthfor this link as a Python int.- OUTPUT: - Python int giving the minimum length of a braid word needed to represent - selfas closure of a braid.- EXAMPLES: - sage: K = KnotInfo.K3_1 sage: K.braid_length() 3 - >>> from sage.all import * >>> K = KnotInfo.K3_1 >>> K.braid_length() 3 
 - braid_notation(original=False)[source]¶
- Return the value of column - braid_notationfor this link as a Python tuple (Tietze form). For more information type- KnotInfo.K0_1.items.braid_notation.description_webpage().- INPUT: - original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
 - OUTPUT: - Python tuple representing the braid whose closure is - selfin Tietze form.- ..NOTE: - There has been a major change to braid representatives for proper links since version 2021.10.1. The former braid reresentatives can be obtained by the column ``braid_notation_old`` (see the final example below). - EXAMPLES: - sage: L = KnotInfo.L4a1_0 sage: L.braid_notation() (-2, -2, -1, 2, -1) sage: L.braid_notation(original=True) '{3, {-2, -2, -1, 2, -1}}' sage: L[L.items.braid_notation_old] '{4, {1, -2, 3, -2, -1, -2, -3, -2}}' - >>> from sage.all import * >>> L = KnotInfo.L4a1_0 >>> L.braid_notation() (-2, -2, -1, 2, -1) >>> L.braid_notation(original=True) '{3, {-2, -2, -1, 2, -1}}' >>> L[L.items.braid_notation_old] '{4, {1, -2, 3, -2, -1, -2, -3, -2}}' 
 - conway_polynomial(var='t', original=False)[source]¶
- Return the Conway polynomial according to the value of column - conway_polynomialfor this knot or link as an instance of- Polynomial.- It is obtained from the Seifert matrix \(V\) of - selfby the following formula (see the KnotInfo description web-page; to launch it see the example below):\[\nabla(L) = \det(t^{\frac{1}{2}} V -t^{\frac{-1}{2}} V^t)\]- Here \(V^t\) stands for the transpose of \(V\). - INPUT: - var– (default:- 't') the variable
- original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
 - OUTPUT: - A polynomial over the integers, more precisely an instance of - Polynomial. If- originalis set to- Truethen a string is returned.- EXAMPLES: - sage: K = KnotInfo.K4_1 sage: Kc = K.conway_polynomial(); Kc -t^2 + 1 sage: L = KnotInfo.L5a1_0 sage: Lc = L.conway_polynomial(); Lc t^3 - >>> from sage.all import * >>> K = KnotInfo.K4_1 >>> Kc = K.conway_polynomial(); Kc -t^2 + 1 >>> L = KnotInfo.L5a1_0 >>> Lc = L.conway_polynomial(); Lc t^3 - Comparison to Sage’s results: - sage: Kc == K.link().conway_polynomial() True sage: Lc == L.link().conway_polynomial() True - >>> from sage.all import * >>> Kc == K.link().conway_polynomial() True >>> Lc == L.link().conway_polynomial() True - Launch the KnotInfo description web-page: - sage: K.items.conway_polynomial.description_webpage() # not tested True - >>> from sage.all import * >>> K.items.conway_polynomial.description_webpage() # not tested True 
 - cosmetic_crossing_conjecture_verified()[source]¶
- Return whether the Cosmetic Crossing Conjecture has been verified for - self.- From the KnotInfo description page: - A crossing change in a diagram of a knot - Kis called cosmetic if the resulting diagram also represents- K. The cosmetic crossing conjecture posits that for any knot- K, the only cosmetic crossing changes are nugatory, i.e. there exists an embedded 2-sphere in- S3which intersects K only at the two points of the relevant crossing. Conversely, it is not hard to see that any nugatory crossing change is cosmetic.- EXAMPLES: - sage: knots = [K for K in KnotInfo if K.is_knot() and K.crossing_number() < 10] sage: all(K.cosmetic_crossing_conjecture_verified() for K in knots) True - >>> from sage.all import * >>> knots = [K for K in KnotInfo if K.is_knot() and K.crossing_number() < Integer(10)] >>> all(K.cosmetic_crossing_conjecture_verified() for K in knots) True 
 - crossing_number()[source]¶
- Return the minimal number of crossings of - self.- Note - In contrast to the number of crossings displayed for instances of - Linkthis number is the minimum over all possible diagrams of the link. The number of crossings displayed in the representation string of- Linkrefers to the special diagram which could be larger.- EXAMPLES: - sage: KnotInfo.L4a1_0.crossing_number() 4 sage: KnotInfo.K3_1.crossing_number() 3 sage: Link(KnotInfo.L4a1_0.braid()) Link with 2 components represented by 5 crossings - >>> from sage.all import * >>> KnotInfo.L4a1_0.crossing_number() 4 >>> KnotInfo.K3_1.crossing_number() 3 >>> Link(KnotInfo.L4a1_0.braid()) Link with 2 components represented by 5 crossings 
 - determinant()[source]¶
- Return the determinant of - self.- From the KnotInfo description page: - The determinant of a knot is \(\det(V + V^t)\), where \(V\) is a Seifert matrix for the knot. - To read the complete description type - KnotInfo.K0_1.items.determinant.description_webpage().- Note - KnotInfo’s value for the unknot - 0_1is zero. This is not compatible whith Sage’s result (the value of the Alexander polynomial at -1). Since this method is needed to identify Sage links we take the according value in that case.- EXAMPLES: - sage: KnotInfo.L4a1_0.determinant() 4 sage: KnotInfo.K3_1.determinant() 3 sage: KnotInfo.K0_1.determinant() 1 - >>> from sage.all import * >>> KnotInfo.L4a1_0.determinant() 4 >>> KnotInfo.K3_1.determinant() 3 >>> KnotInfo.K0_1.determinant() 1 
 - diagram(single=False, new=0, autoraise=True)[source]¶
- Launch the diagram of - selfgiven on the KnotInfo web-page.- INPUT: - single– boolean (default:- False); if set to- Trueonly one diagram is shown
- new– integer according to- open()of- webbrowser(- 0default,- 1new window,- 2new tab)
- autoraise– boolean (default:- True)
 - EXAMPLES: - sage: K = KnotInfo.K3_1 sage: K.diagram() # not tested True sage: K.diagram(single=True) # not tested True - >>> from sage.all import * >>> K = KnotInfo.K3_1 >>> K.diagram() # not tested True >>> K.diagram(single=True) # not tested True 
 - dt_notation(original=False)[source]¶
- Return the value of column - dt_notationfor this link as a Python list of Python lists. For more information type- KnotInfo.K0_1.items.dt_notation.description_webpage().- INPUT: - original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
 - OUTPUT: - Python list of python lists each entry of the outer list representing a crossing. - EXAMPLES: - sage: L = KnotInfo.L4a1_0 sage: L.dt_notation() [[6, 8], [2, 4]] sage: L.dt_notation(original=True) '[{6, 8}, {2, 4}]' sage: L = KnotInfo.L4a1_0 sage: K = KnotInfo.K4_1 sage: K.dt_notation() [4, 6, 8, 2] - >>> from sage.all import * >>> L = KnotInfo.L4a1_0 >>> L.dt_notation() [[6, 8], [2, 4]] >>> L.dt_notation(original=True) '[{6, 8}, {2, 4}]' >>> L = KnotInfo.L4a1_0 >>> K = KnotInfo.K4_1 >>> K.dt_notation() [4, 6, 8, 2] 
 - gauss_notation(original=False)[source]¶
- Return the value of column - gauss_notationfor this link as a Python list of Python lists. For more information type- KnotInfo.K0_1.items.gauss_notation.description_webpage().- INPUT: - original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
 - EXAMPLES: - sage: L = KnotInfo.L4a1_0 sage: L.gauss_notation() [[1, -3, 2, -4], [3, -1, 4, -2]] sage: L.gauss_notation(original=True) '{{1, -3, 2, -4}, {3, -1, 4, -2}}' - >>> from sage.all import * >>> L = KnotInfo.L4a1_0 >>> L.gauss_notation() [[1, -3, 2, -4], [3, -1, 4, -2]] >>> L.gauss_notation(original=True) '{{1, -3, 2, -4}, {3, -1, 4, -2}}' 
 - homfly_polynomial(var1='v', var2='z', original=False)[source]¶
- Return the HOMFLY-PT polynomial according to the value of column - homfly_polynomialfor this knot or link (in the latter case the column- homflypt_polynomialis used) as an instance of the element class according to the output of- Link.homfly_polynomial()of- Link.- The HOMFLY-PT polynomial \(P(L)\) of a link \(L\) satisfies the following skein relation (see the corresponding KnotInfo description page): \[P(O) = 1,\,\,\, v^{-1} P(L_+) - v P(L_-) = z P(L_0)\]- INPUT: - var1– string (default:- 'v'); for the name of the first variable
- var2– string (default:- 'z'); for the name of the second variable
- original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
 - OUTPUT: - A Laurent polynomial over the integers, more precisely an instance of - LaurentPolynomial_mpair. If- originalis set to- Truethen a string is returned.- Note - The skein-relation for the HOMFLY-PT polynomial given on KnotInfo does not match the default used in Sage. For comparison you have to use the keyword argument - normalization='vz'on the side of Sage.- EXAMPLES: - sage: K3_1 = KnotInfo.K3_1 sage: PK3_1 = K3_1.homfly_polynomial(); PK3_1 -v^4 + v^2*z^2 + 2*v^2 sage: K3_1.homfly_polynomial(original=True) '(2*v^2-v^4)+v^2*z^2' sage: PK3_1 == K3_1.link().homfly_polynomial(normalization='vz') True - >>> from sage.all import * >>> K3_1 = KnotInfo.K3_1 >>> PK3_1 = K3_1.homfly_polynomial(); PK3_1 -v^4 + v^2*z^2 + 2*v^2 >>> K3_1.homfly_polynomial(original=True) '(2*v^2-v^4)+v^2*z^2' >>> PK3_1 == K3_1.link().homfly_polynomial(normalization='vz') True - for proper links: - sage: L4a1_1 = KnotInfo.L4a1_1 sage: PL4a1_1 = L4a1_1.homfly_polynomial(var1='x', var2='y'); PL4a1_1 -x^5*y + x^3*y^3 - x^5*y^-1 + 3*x^3*y + x^3*y^-1 sage: _ == L4a1_1.link().homfly_polynomial('x', 'y', 'vz') True - >>> from sage.all import * >>> L4a1_1 = KnotInfo.L4a1_1 >>> PL4a1_1 = L4a1_1.homfly_polynomial(var1='x', var2='y'); PL4a1_1 -x^5*y + x^3*y^3 - x^5*y^-1 + 3*x^3*y + x^3*y^-1 >>> _ == L4a1_1.link().homfly_polynomial('x', 'y', 'vz') True - check the skein-relation from the KnotInfo description page (applied to one of the positive crossings of the right-handed trefoil): - sage: R = PK3_1.parent() sage: PO = R.one() sage: L2a1_1 = KnotInfo.L2a1_1 sage: PL2a1_1 = L2a1_1.homfly_polynomial() sage: v, z = R.gens() sage: ~v*PK3_1 -v*PO == z*PL2a1_1 True - >>> from sage.all import * >>> R = PK3_1.parent() >>> PO = R.one() >>> L2a1_1 = KnotInfo.L2a1_1 >>> PL2a1_1 = L2a1_1.homfly_polynomial() >>> v, z = R.gens() >>> ~v*PK3_1 -v*PO == z*PL2a1_1 True - REFERENCES: 
 - inject(verbose=True)[source]¶
- Inject - selfwith its name into the namespace of the Python code from which this function is called.- INPUT: - verbose– boolean (default:- True); whether to suppress the message printed on the invocation
 - EXAMPLES: - sage: KnotInfo.K5_2.inject() Defining K5_2 sage: K5_2.is_alternating() True - >>> from sage.all import * >>> KnotInfo.K5_2.inject() Defining K5_2 >>> K5_2.is_alternating() True 
 - is_adequate()[source]¶
- Return whether - selfis adequate.- EXAMPLES: - sage: KnotInfo.K5_2.is_adequate() # optional - database_knotinfo True - >>> from sage.all import * >>> KnotInfo.K5_2.is_adequate() # optional - database_knotinfo True 
 - is_almost_alternating()[source]¶
- Return whether - selfis almost alternating.- EXAMPLES: - sage: KnotInfo.K5_2.is_almost_alternating() # optional - database_knotinfo False - >>> from sage.all import * >>> KnotInfo.K5_2.is_almost_alternating() # optional - database_knotinfo False 
 - is_alternating()[source]¶
- Return whether - selfis alternating.- EXAMPLES: - sage: KnotInfo.K5_2.is_alternating() True - >>> from sage.all import * >>> KnotInfo.K5_2.is_alternating() True 
 - is_amphicheiral(positive=False)[source]¶
- Return whether - selfis amphicheiral.- INPUT: - positive– boolean (default:- False); whether to check if- selfis positive or negative amphicheiral (see documentation of- symmetry_type())
 - OUTPUT: boolean or - Noneif this cannot be determined- Trueif- selfis fully or negative amphicheiral per default. If- positiveis set to- Truethan fully and positive amphicheiral links give- True.- Note - For proper links this property is not provided in the database. Anyway, we support it here in this case, as well, except for a few items where it cannot be determined easily and where - Noneis returned as answer.- EXAMPLES: - sage: # optional - database_knotinfo sage: Kp = KnotInfo.K12a_427 sage: Kp.is_amphicheiral() False sage: Kp.is_amphicheiral(positive=True) True sage: Kn = KnotInfo.K10_88 sage: Kn.is_amphicheiral() True sage: Kn.is_amphicheiral(positive=True) False sage: KnotInfo.L4a1_0.is_amphicheiral() False sage: KnotInfo.L10n59_1.is_amphicheiral() True sage: KnotInfo.L10n36_0.inject() Defining L10n36_0 sage: L10n36_0.is_amphicheiral() is None True - >>> from sage.all import * >>> # optional - database_knotinfo >>> Kp = KnotInfo.K12a_427 >>> Kp.is_amphicheiral() False >>> Kp.is_amphicheiral(positive=True) True >>> Kn = KnotInfo.K10_88 >>> Kn.is_amphicheiral() True >>> Kn.is_amphicheiral(positive=True) False >>> KnotInfo.L4a1_0.is_amphicheiral() False >>> KnotInfo.L10n59_1.is_amphicheiral() True >>> KnotInfo.L10n36_0.inject() Defining L10n36_0 >>> L10n36_0.is_amphicheiral() is None True 
 - is_fibered()[source]¶
- Return whether - selfis fibered.- EXAMPLES: - sage: KnotInfo.K6_3.is_fibered() True - >>> from sage.all import * >>> KnotInfo.K6_3.is_fibered() True 
 - is_hyperbolic()[source]¶
- Return whether - selfis hyperbolic.- EXAMPLES: - sage: KnotInfo.K3_1.is_hyperbolic() False sage: KnotInfo.K5_2.is_hyperbolic() True - >>> from sage.all import * >>> KnotInfo.K3_1.is_hyperbolic() False >>> KnotInfo.K5_2.is_hyperbolic() True 
 - is_knot()[source]¶
- Return whether - selfis a knot or a proper link.- EXAMPLES: - sage: KnotInfo.L7a1_0.is_knot() # optional - database_knotinfo False sage: KnotInfo.K6_3.is_knot() True - >>> from sage.all import * >>> KnotInfo.L7a1_0.is_knot() # optional - database_knotinfo False >>> KnotInfo.K6_3.is_knot() True 
 - is_oriented()[source]¶
- Return whether - selfis oriented.- EXAMPLES: - sage: KnotInfo.L6a2_1.is_oriented() True - >>> from sage.all import * >>> KnotInfo.L6a2_1.is_oriented() True 
 - is_positive()[source]¶
- Return whether - selfis positive.- EXAMPLES: - sage: KnotInfo.K5_2.is_positive() True - >>> from sage.all import * >>> KnotInfo.K5_2.is_positive() True 
 - is_positive_braid()[source]¶
- Return whether - selfis a positive braid.- EXAMPLES: - sage: KnotInfo.K5_2.is_positive_braid() # optional - database_knotinfo False - >>> from sage.all import * >>> KnotInfo.K5_2.is_positive_braid() # optional - database_knotinfo False 
 - is_quasi_alternating()[source]¶
- Return whether - selfis quasi alternating.- EXAMPLES: - sage: KnotInfo.K5_2.is_quasi_alternating() # optional - database_knotinfo True - >>> from sage.all import * >>> KnotInfo.K5_2.is_quasi_alternating() # optional - database_knotinfo True 
 - is_quasipositive()[source]¶
- Return whether - selfis quasi-positive.- EXAMPLES: - sage: KnotInfo.K5_2.is_quasipositive() # optional - database_knotinfo True - >>> from sage.all import * >>> KnotInfo.K5_2.is_quasipositive() # optional - database_knotinfo True 
 - is_recoverable(unique=True)[source]¶
- Return if - selfcan be recovered from its conversion to Sage links using the- pd_notationand the- braid_notationand their mirror images.- The method is indirectly used by the - TestSuiteof the series of- self.- INPUT: - unique– boolean (default:- True); if set to- Falseit is only checked if- selfis among the recovered items
 - EXAMPLES: - sage: KnotInfo.L4a1_0.inject() Defining L4a1_0 sage: L4a1_0.is_recoverable() True sage: L4a1_0.is_recoverable(unique=False) True sage: KnotInfo.L5a1_0.inject() Defining L5a1_0 sage: L5a1_0.is_recoverable() False sage: L5a1_0.is_recoverable(unique=False) True - >>> from sage.all import * >>> KnotInfo.L4a1_0.inject() Defining L4a1_0 >>> L4a1_0.is_recoverable() True >>> L4a1_0.is_recoverable(unique=False) True >>> KnotInfo.L5a1_0.inject() Defining L5a1_0 >>> L5a1_0.is_recoverable() False >>> L5a1_0.is_recoverable(unique=False) True 
 - is_reversible()[source]¶
- Return whether - selfis reversible.- EXAMPLES: - sage: KnotInfo.K6_3.is_reversible() True - >>> from sage.all import * >>> KnotInfo.K6_3.is_reversible() True 
 - is_strongly_quasipositive()[source]¶
- Return whether - selfis strongly quasi-positive.- EXAMPLES: - sage: KnotInfo.K5_2.is_strongly_quasipositive() # optional - database_knotinfo True - >>> from sage.all import * >>> KnotInfo.K5_2.is_strongly_quasipositive() # optional - database_knotinfo True 
 - is_unique()[source]¶
- Return whether there is no other isotopic link in the database or not. - OUTPUT: boolean or - Noneif this cannot be determined- EXAMPLES: - sage: KnotInfo.L4a1_0.is_unique() True sage: KnotInfo.L5a1_0.is_unique() False sage: L = KnotInfo.L9a43_0_1 # optional - database_knotinfo sage: L.series(oriented=True).inject() # optional - database_knotinfo Defining L9a43 sage: [(L,L.is_unique()) for L in L9a43] # optional - database_knotinfo [(<KnotInfo.L9a43_0_0: 'L9a43{0,0}'>, True), (<KnotInfo.L9a43_1_0: 'L9a43{1,0}'>, False), (<KnotInfo.L9a43_0_1: 'L9a43{0,1}'>, None), (<KnotInfo.L9a43_1_1: 'L9a43{1,1}'>, False)] - >>> from sage.all import * >>> KnotInfo.L4a1_0.is_unique() True >>> KnotInfo.L5a1_0.is_unique() False >>> L = KnotInfo.L9a43_0_1 # optional - database_knotinfo >>> L.series(oriented=True).inject() # optional - database_knotinfo Defining L9a43 >>> [(L,L.is_unique()) for L in L9a43] # optional - database_knotinfo [(<KnotInfo.L9a43_0_0: 'L9a43{0,0}'>, True), (<KnotInfo.L9a43_1_0: 'L9a43{1,0}'>, False), (<KnotInfo.L9a43_0_1: 'L9a43{0,1}'>, None), (<KnotInfo.L9a43_1_1: 'L9a43{1,1}'>, False)] 
 - property items¶
- Return an Enum class to select a column item of the KnotInfo database. - EXAMPLES: - sage: L = KnotInfo.L4a1_0 sage: it = L.items sage: [i.name for i in it if i.name.startswith('braid')] ['braid_index', 'braid_length', 'braid_notation', 'braid_notation_old'] sage: L.items.dt_notation.column_name() 'DT Notation' - >>> from sage.all import * >>> L = KnotInfo.L4a1_0 >>> it = L.items >>> [i.name for i in it if i.name.startswith('braid')] ['braid_index', 'braid_length', 'braid_notation', 'braid_notation_old'] >>> L.items.dt_notation.column_name() 'DT Notation' - To check if the item is available for proper links or only knots type: - sage: it.gauss_notation.column_type() <KnotInfoColumnTypes.KnotsAndLinks: 'B'> sage: it.dt_notation.column_type() <KnotInfoColumnTypes.OnlyKnots: 'K'> - >>> from sage.all import * >>> it.gauss_notation.column_type() <KnotInfoColumnTypes.KnotsAndLinks: 'B'> >>> it.dt_notation.column_type() <KnotInfoColumnTypes.OnlyKnots: 'K'> - To see the description of the item in your web browser type: - sage: it.gauss_notation.description_webpage() # not tested True - >>> from sage.all import * >>> it.gauss_notation.description_webpage() # not tested True 
 - jones_polynomial(variab=None, skein_normalization=False, puiseux=False, original=False, use_sqrt=False)[source]¶
- Return the Jones polynomial according to the value of column - jones_polynomialfor this knot or link as an element of the symbolic ring- SRor an instance of- LaurentPolynomialdepending on the keyword- skein_normalization. Using the keyword- puiseuxinstead of an element of the symbolic ring an instance of- PuiseuxSeriescan be returned.- The Jones polynomial \(V(L)\) of a link \(L\) satisfies the following skein relation (see the corresponding KnotInfo description page): \[V(O) = 1,\,\,\, t^{-1} V(L_+) - t V(L_-) = (t^{\frac{1}{2}} - t^{-\frac{1}{2}}) V(L_0)\]- INPUT: - variab– variable (default:- None); used according to- Link.jones_polynomial()
- skein_normalization– boolean (default:- False); used according to- Link.jones_polynomial()
- puiseux– boolean (default:- True); only used in case- skein_normalization=False. If set to- Trueinstead of an element of the symbolic ring an instance of- PuiseuxSeriesis returned
- original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
- use_sqrt– boolean (default:- False); see the note below
 - OUTPUT: - Depends on the keywords (in excluding order): - original=Truea string according to the original value from the database
- skein_normalization=Truea Laurent polynomial over the integers, more precisely an instance of- LaurentPolynomial
- puiseux=Truea puiseux series over the integers, more precisely an instance of- PuiseuxSeries
 - In all other cases an element of the symbolic ring - SR.- Note - There is a difference to Sage’s conventions concerning the Jones polynomial in the case of proper links. KnotInfo does not display these polynomials in the indeterminate \(t\) used in the skein relation. Instead a variable \(x\) is used defined by \(x^2 = t\). Sage uses \(t\) in both cases, knots and proper links. Thus, to obtain the Jones polynomial for a proper link in \(t\) you have to set the keyword - use_sqrtto- True.- EXAMPLES: - sage: K = KnotInfo.K4_1 sage: Kj = K.jones_polynomial(); Kj # needs sage.symbolic t^2 - t - 1/t + 1/t^2 + 1 sage: Kjs = K.jones_polynomial(skein_normalization=True); Kjs A^-8 - A^-4 + 1 - A^4 + A^8 sage: Kjp = K.jones_polynomial(puiseux=True); Kjp t^-2 - t^-1 + 1 - t + t^2 - >>> from sage.all import * >>> K = KnotInfo.K4_1 >>> Kj = K.jones_polynomial(); Kj # needs sage.symbolic t^2 - t - 1/t + 1/t^2 + 1 >>> Kjs = K.jones_polynomial(skein_normalization=True); Kjs A^-8 - A^-4 + 1 - A^4 + A^8 >>> Kjp = K.jones_polynomial(puiseux=True); Kjp t^-2 - t^-1 + 1 - t + t^2 - for proper links: - sage: L = KnotInfo.L2a1_1 sage: Lj = L.jones_polynomial(); Lj # needs sage.symbolic -x^5 - x sage: Ljt = L.jones_polynomial(use_sqrt=True); Ljt # needs sage.symbolic -t^(5/2) - sqrt(t) sage: Ljp = L.jones_polynomial(puiseux=True); Ljp -t^(1/2) - t^(5/2) sage: Ljs = L.jones_polynomial(skein_normalization=True); Ljs -A^2 - A^10 sage: Lj.parent() # needs sage.symbolic Symbolic Ring sage: Ljt.parent() # needs sage.symbolic Symbolic Ring sage: Ljp.parent() Puiseux Series Ring in t over Integer Ring sage: Ljs.parent() Univariate Laurent Polynomial Ring in A over Integer Ring - >>> from sage.all import * >>> L = KnotInfo.L2a1_1 >>> Lj = L.jones_polynomial(); Lj # needs sage.symbolic -x^5 - x >>> Ljt = L.jones_polynomial(use_sqrt=True); Ljt # needs sage.symbolic -t^(5/2) - sqrt(t) >>> Ljp = L.jones_polynomial(puiseux=True); Ljp -t^(1/2) - t^(5/2) >>> Ljs = L.jones_polynomial(skein_normalization=True); Ljs -A^2 - A^10 >>> Lj.parent() # needs sage.symbolic Symbolic Ring >>> Ljt.parent() # needs sage.symbolic Symbolic Ring >>> Ljp.parent() Puiseux Series Ring in t over Integer Ring >>> Ljs.parent() Univariate Laurent Polynomial Ring in A over Integer Ring - Comparison with Sage’s results: - sage: k = K.link() sage: kj = k.jones_polynomial() # needs sage.symbolic sage: bool(Kj == kj) # needs sage.symbolic True sage: kjs = k.jones_polynomial(skein_normalization=True) sage: Kjs == kjs True sage: l = L.link() sage: lj = l.jones_polynomial() # needs sage.symbolic sage: bool(Lj == lj) # needs sage.symbolic False sage: bool(Ljt == lj) # see note above # needs sage.symbolic True sage: ljs = l.jones_polynomial(skein_normalization=True) sage: Ljs == ljs True - >>> from sage.all import * >>> k = K.link() >>> kj = k.jones_polynomial() # needs sage.symbolic >>> bool(Kj == kj) # needs sage.symbolic True >>> kjs = k.jones_polynomial(skein_normalization=True) >>> Kjs == kjs True >>> l = L.link() >>> lj = l.jones_polynomial() # needs sage.symbolic >>> bool(Lj == lj) # needs sage.symbolic False >>> bool(Ljt == lj) # see note above # needs sage.symbolic True >>> ljs = l.jones_polynomial(skein_normalization=True) >>> Ljs == ljs True - Check the skein-relation from the KnotInfo description page (applied to one of the positive crossings of the right-handed trefoil): - sage: K3_1 = KnotInfo.K3_1 sage: # needs sage.symbolic sage: K3_1j = K3_1.jones_polynomial() sage: L2a1_1j = Ljt # see note above sage: R = L2a1_1j.parent() sage: Oj = R(1) sage: t = R('t') sage: lhs = expand(~t*K3_1j - t*Oj) sage: rhs = expand((sqrt(t) - ~sqrt(t))*L2a1_1j) sage: bool(lhs == rhs) True - >>> from sage.all import * >>> K3_1 = KnotInfo.K3_1 >>> # needs sage.symbolic >>> K3_1j = K3_1.jones_polynomial() >>> L2a1_1j = Ljt # see note above >>> R = L2a1_1j.parent() >>> Oj = R(Integer(1)) >>> t = R('t') >>> lhs = expand(~t*K3_1j - t*Oj) >>> rhs = expand((sqrt(t) - ~sqrt(t))*L2a1_1j) >>> bool(lhs == rhs) True - The same with the Puiseux series version: - sage: K3_1jp = K3_1.jones_polynomial(puiseux=True) sage: L2a1_1jp = Ljp sage: R = L2a1_1jp.parent() sage: Ojp = R(1) sage: t = R('t') sage: ~t*K3_1jp - t*Ojp == (t^(1/2)-~t^(1/2))*L2a1_1jp True - >>> from sage.all import * >>> K3_1jp = K3_1.jones_polynomial(puiseux=True) >>> L2a1_1jp = Ljp >>> R = L2a1_1jp.parent() >>> Ojp = R(Integer(1)) >>> t = R('t') >>> ~t*K3_1jp - t*Ojp == (t**(Integer(1)/Integer(2))-~t**(Integer(1)/Integer(2)))*L2a1_1jp True - The same in the case of skein normalization (using \(t = A^4\)): - sage: K3_1js = K3_1.jones_polynomial(skein_normalization=True) sage: L2a1_1js = L.jones_polynomial(skein_normalization=True) sage: Rs = K3_1js.parent() sage: Ojs = Rs.one() sage: A, = Rs.gens() sage: ~A^4*K3_1js - A^4*Ojs == (A^2-~A^2)*L2a1_1js True - >>> from sage.all import * >>> K3_1js = K3_1.jones_polynomial(skein_normalization=True) >>> L2a1_1js = L.jones_polynomial(skein_normalization=True) >>> Rs = K3_1js.parent() >>> Ojs = Rs.one() >>> A, = Rs.gens() >>> ~A**Integer(4)*K3_1js - A**Integer(4)*Ojs == (A**Integer(2)-~A**Integer(2))*L2a1_1js True - REFERENCES: 
 - kauffman_polynomial(var1='a', var2='z', original=False)[source]¶
- Return the Kauffman polynomial according to the value of column - kauffman_polynomialfor this knot or link as an instance of- LaurentPolynomial_mpair.- The Kauffman polynomial \(F(L)\) respectivlely its corresponding invariant under regular isotopy \(\Delta (L) = a^{w(L)} F(L)\) where \(w(L)\) is the writhe of the link \(L\) satisfies the following skein relation (see the corresponding KnotInfo description page): \[\Delta(O) = 1,\,\,\, \Delta(L_+) - \Delta(L_-) = z (\Delta(L_0 + \Delta(L_{\infty}))\]- Furthermore, removing a curl of sign \(\epsilon\) leads to a multiplication of \(\Delta(L)\) with \(a^{\epsilon}\). - INPUT: - var1– (default:- 'a') the first variable
- var2– (default:- 'z') the second variable
- original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
 - OUTPUT: - A Laurent polynomial over the integers, more precisely an instance of - LaurentPolynomial_mpair. If- originalis set to- Falsethen a string is returned.- EXAMPLES: - sage: L = KnotInfo.L2a1_1 sage: K = KnotInfo.K4_1 sage: L.kauffman_polynomial() a^-1*z - a^-1*z^-1 + a^-2 + a^-3*z - a^-3*z^-1 sage: K.kauffman_polynomial() a^2*z^2 + a*z^3 - a^2 - a*z + 2*z^2 + a^-1*z^3 - 1 - a^-1*z + a^-2*z^2 - a^-2 - >>> from sage.all import * >>> L = KnotInfo.L2a1_1 >>> K = KnotInfo.K4_1 >>> L.kauffman_polynomial() a^-1*z - a^-1*z^-1 + a^-2 + a^-3*z - a^-3*z^-1 >>> K.kauffman_polynomial() a^2*z^2 + a*z^3 - a^2 - a*z + 2*z^2 + a^-1*z^3 - 1 - a^-1*z + a^-2*z^2 - a^-2 - Comparison with Jones polynomial: - sage: # needs sage.symbolic sage: k = _ sage: a, z = k.variables() sage: j = K.jones_polynomial(skein_normalization=True) sage: t, = j.variables() sage: k.subs(a=-t^3, z=~t+t) == j.subs(t=t^4) True - >>> from sage.all import * >>> # needs sage.symbolic >>> k = _ >>> a, z = k.variables() >>> j = K.jones_polynomial(skein_normalization=True) >>> t, = j.variables() >>> k.subs(a=-t**Integer(3), z=~t+t) == j.subs(t=t**Integer(4)) True - Check the skein relation: - sage: K3_1 = KnotInfo.K3_1 sage: FK3_1 = K3_1.kauffman_polynomial() sage: FL2a1_1 = L.kauffman_polynomial() sage: z, a = FK3_1.variables() sage: ΔK3_1 = FK3_1 * a**K3_1.link().writhe() sage: ΔL2a1_1 = FL2a1_1 * a**L.link().writhe() sage: ΔO1p = a # unknot with one positive curl sage: ΔO2n = a**-2 # unknot with two negative curls sage: ΔK3_1 + ΔO1p == z*(ΔL2a1_1 + ΔO2n) True - >>> from sage.all import * >>> K3_1 = KnotInfo.K3_1 >>> FK3_1 = K3_1.kauffman_polynomial() >>> FL2a1_1 = L.kauffman_polynomial() >>> z, a = FK3_1.variables() >>> ΔK3_1 = FK3_1 * a**K3_1.link().writhe() >>> ΔL2a1_1 = FL2a1_1 * a**L.link().writhe() >>> ΔO1p = a # unknot with one positive curl >>> ΔO2n = a**-Integer(2) # unknot with two negative curls >>> ΔK3_1 + ΔO1p == z*(ΔL2a1_1 + ΔO2n) True - REFERENCES: 
 - khovanov_polynomial(var1='q', var2='t', base_ring=Integer Ring, original=False, reduced=False, odd=False, KhoHo=False)[source]¶
- Return the Khovanov polynomial according to the value of column - khovanov_polynomialfor this knot or link as an instance of- LaurentPolynomial_mpair.- INPUT: - var1– (default:- 'q') the first variable
- var2– (default:- 't') the second variable
- base_ring– (default:- ZZ) the ring of the polynomial’s coefficients
- original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
- reduced– boolean (default:- False); if set to- Truethe reduced version of the homology is used
- odd– boolean (default:- False); if set to- Truethe odd version of the homology is used
- KhoHo– boolean (deprecated). The corresponding values have disappeared from the database since January 2024
 - OUTPUT: - A Laurent polynomial over the integers, more precisely an instance of - LaurentPolynomial_mpair. If- originalis set to- Truethen a string is returned.- Note - The data used for multi-component links were calculated with the program KhoHo.which uses the - DTnotation. For knots data calculated with KnotJob are used. The latter program is more accurate in terms of orientation and reflection as it is based on- PDcode.- EXAMPLES: - sage: K = KnotInfo.K6_3 sage: Kk = K.khovanov_polynomial(); Kk q^7*t^3 + q^5*t^2 + q^3*t^2 + q^3*t + q*t + 2*q + 2*q^-1 + q^-1*t^-1 + q^-3*t^-1 + q^-3*t^-2 + q^-5*t^-2 + q^-7*t^-3 sage: Kk2 = K.khovanov_polynomial(var1='p', base_ring=GF(2)); Kk2 p^7*t^3 + p^5*t^3 + p^5*t^2 + p^3*t + p^-1 + p^-1*t^-1 + p^-3*t^-2 + p^-7*t^-3 sage: L = KnotInfo.L5a1_0 sage: Lk = L.khovanov_polynomial(); Lk q^4*t^2 + t + 2 + 2*q^-2 + q^-2*t^-1 + q^-4*t^-2 + q^-6*t^-2 + q^-8*t^-3 sage: L.khovanov_polynomial(original=True) '2 + 2/q^2 + 1/(q^8*t^3) + 1/(q^6*t^2) + 1/(q^4*t^2) + 1/(q^2*t) + t + q^4*t^2' - >>> from sage.all import * >>> K = KnotInfo.K6_3 >>> Kk = K.khovanov_polynomial(); Kk q^7*t^3 + q^5*t^2 + q^3*t^2 + q^3*t + q*t + 2*q + 2*q^-1 + q^-1*t^-1 + q^-3*t^-1 + q^-3*t^-2 + q^-5*t^-2 + q^-7*t^-3 >>> Kk2 = K.khovanov_polynomial(var1='p', base_ring=GF(Integer(2))); Kk2 p^7*t^3 + p^5*t^3 + p^5*t^2 + p^3*t + p^-1 + p^-1*t^-1 + p^-3*t^-2 + p^-7*t^-3 >>> L = KnotInfo.L5a1_0 >>> Lk = L.khovanov_polynomial(); Lk q^4*t^2 + t + 2 + 2*q^-2 + q^-2*t^-1 + q^-4*t^-2 + q^-6*t^-2 + q^-8*t^-3 >>> L.khovanov_polynomial(original=True) '2 + 2/q^2 + 1/(q^8*t^3) + 1/(q^6*t^2) + 1/(q^4*t^2) + 1/(q^2*t) + t + q^4*t^2' - Obtaining the reduced homology (for knots only): - sage: Kkr = K.khovanov_polynomial(reduced=True); Kkr q^6*t^3 + 2*q^4*t^2 + 2*q^2*t + 3 + 2*q^-2*t^-1 + 2*q^-4*t^-2 + q^-6*t^-3 sage: K.khovanov_polynomial(base_ring=QQ, reduced=True) == Kkr True sage: Kkr2 = K.khovanov_polynomial(base_ring=GF(2), reduced=True); Kkr2 q^6*t^3 + 1 + q^-6*t^-3 sage: KnotInfo.K8_19.inject() # optional database_knotinfo Defining K8_19 sage: K8kr = K8_19.khovanov_polynomial(reduced=True); K8kr # optional database_knotinfo q^16*t^5 + q^12*t^4 + q^12*t^3 + q^10*t^2 + q^6 - >>> from sage.all import * >>> Kkr = K.khovanov_polynomial(reduced=True); Kkr q^6*t^3 + 2*q^4*t^2 + 2*q^2*t + 3 + 2*q^-2*t^-1 + 2*q^-4*t^-2 + q^-6*t^-3 >>> K.khovanov_polynomial(base_ring=QQ, reduced=True) == Kkr True >>> Kkr2 = K.khovanov_polynomial(base_ring=GF(Integer(2)), reduced=True); Kkr2 q^6*t^3 + 1 + q^-6*t^-3 >>> KnotInfo.K8_19.inject() # optional database_knotinfo Defining K8_19 >>> K8kr = K8_19.khovanov_polynomial(reduced=True); K8kr # optional database_knotinfo q^16*t^5 + q^12*t^4 + q^12*t^3 + q^10*t^2 + q^6 - Obtaining the odd Khovanov homology (for knots only): - sage: K.khovanov_polynomial(odd=True) == Kkr True sage: K.khovanov_polynomial(base_ring=QQ, odd=True) == Kkr True sage: K.khovanov_polynomial(base_ring=GF(2), odd=True) == Kkr2 True sage: K8ko = K8_19.khovanov_polynomial(odd=True); K8ko # optional database_knotinfo q^16*t^5 + q^10*t^2 + q^6 sage: K8kr == K8ko # optional database_knotinfo False - >>> from sage.all import * >>> K.khovanov_polynomial(odd=True) == Kkr True >>> K.khovanov_polynomial(base_ring=QQ, odd=True) == Kkr True >>> K.khovanov_polynomial(base_ring=GF(Integer(2)), odd=True) == Kkr2 True >>> K8ko = K8_19.khovanov_polynomial(odd=True); K8ko # optional database_knotinfo q^16*t^5 + q^10*t^2 + q^6 >>> K8kr == K8ko # optional database_knotinfo False - Comparison to Sage’s results: - sage: Kk == K.link().khovanov_polynomial() True sage: Kk2 == K.link().khovanov_polynomial(var1='p', base_ring=GF(2)) True sage: Lk == L.link().khovanov_polynomial() True - >>> from sage.all import * >>> Kk == K.link().khovanov_polynomial() True >>> Kk2 == K.link().khovanov_polynomial(var1='p', base_ring=GF(Integer(2))) True >>> Lk == L.link().khovanov_polynomial() True - REFERENCES: 
 - knot_atlas_webpage(new=0, autoraise=True)[source]¶
- Launch the Knot Atlas web-page for - self.- INPUT: - new– integer according to- open()of- webbrowser(- 0default,- 1new window,- 2new tab)
- autoraise– boolean (default:- True)
 - EXAMPLES: - sage: K = KnotInfo.K3_1 sage: K.knot_atlas_webpage() # not tested True - >>> from sage.all import * >>> K = KnotInfo.K3_1 >>> K.knot_atlas_webpage() # not tested True 
 - knotilus_webpage(new=0, autoraise=True)[source]¶
- Launch the Knotilus web-page for - self.- INPUT: - new– integer according to- open()of- webbrowser(- 0default,- 1new window,- 2new tab)
- autoraise– boolean (default:- True)
 - EXAMPLES: - sage: K = KnotInfo.K3_1 sage: K.knotilus_webpage(new=1) # not tested True - >>> from sage.all import * >>> K = KnotInfo.K3_1 >>> K.knotilus_webpage(new=Integer(1)) # not tested True 
 - link(use_item=<Columns.pd_notation: ['PD Notation', <KnotInfoColumnTypes.OnlyKnots: 'K'>]>, snappy=False)[source]¶
- Return - selfas an instance of- Linkor optional- spherogram.links.invariants.Link(SnapPy).- INPUT: - use_item– (default:- self.items.pd_notation) instance of- KnotInfoColumnsto choose the column that should be used to construct the link. Allowed values are:- self.items.pd_notation
- self.items.braid_notation
- self.items.name(only for- snappy=True)
- self.items.dt_notation(only for knots and- snappy=False)
- self.items.gauss_notation(only for knots and- snappy=False)
 
- snappy– boolean (default:- False); if set to- Truethe target of the conversion is the- pipinstallable package SnapPy (explicitely,- spherogram.links.invariants.Link). If SnapPy is not installed an- ImportErroris raised. To install SnapPy use- sage -pip install snappy.
 - Note - We use the PD-notation to construct - selfas default. This ensures that the number of crossings displayed in the representation string of the link coincides with the crossing number as a topological invariant.- Furthermore, note that the mirror version may depend on the used KnotInfo-notation. For instance, regarding to the knot - 5_1the Gauss- and the DT-notation refer to the mirror image (see example below).- EXAMPLES: - sage: K = KnotInfo.K3_1 sage: K.link() Knot represented by 3 crossings sage: _.braid() s^3 sage: _ == K.braid() True - >>> from sage.all import * >>> K = KnotInfo.K3_1 >>> K.link() Knot represented by 3 crossings >>> _.braid() s^3 >>> _ == K.braid() True - using - dt_notation:- sage: K.link(use_item=K.items.dt_notation) Knot represented by 3 crossings sage: _.braid() s^3 sage: L = KnotInfo.L4a1_0 sage: L.link() Link with 2 components represented by 4 crossings sage: L.link(use_item=L.items.dt_notation) Traceback (most recent call last): ... ValueError: link construction using Columns.dt_notation not possible - >>> from sage.all import * >>> K.link(use_item=K.items.dt_notation) Knot represented by 3 crossings >>> _.braid() s^3 >>> L = KnotInfo.L4a1_0 >>> L.link() Link with 2 components represented by 4 crossings >>> L.link(use_item=L.items.dt_notation) Traceback (most recent call last): ... ValueError: link construction using Columns.dt_notation not possible - using - snappy:- sage: L2 = KnotInfo.L2a1_1 sage: l2 = L2.link() sage: l2s = L2.link(snappy=True).sage_link() # optional - snappy sage: l2 == l2s # optional - snappy True - >>> from sage.all import * >>> L2 = KnotInfo.L2a1_1 >>> l2 = L2.link() >>> l2s = L2.link(snappy=True).sage_link() # optional - snappy >>> l2 == l2s # optional - snappy True - but observe: - sage: K7 = KnotInfo.K7_2 sage: k7s = K7.link(snappy=True); k7s # optional - snappy <Link: 1 comp; 7 cross> sage: k7sn = K7.link(K7.items.name, snappy=True); k7sn # optional - snappy <Link 7_2: 1 comp; 7 cross> sage: k7s.sage_link().is_isotopic(k7sn) # optional - snappy False sage: k7snm = k7sn.sage_link().mirror_image() # optional - snappy sage: k7s.sage_link().is_isotopic(k7snm) # optional - snappy True - >>> from sage.all import * >>> K7 = KnotInfo.K7_2 >>> k7s = K7.link(snappy=True); k7s # optional - snappy <Link: 1 comp; 7 cross> >>> k7sn = K7.link(K7.items.name, snappy=True); k7sn # optional - snappy <Link 7_2: 1 comp; 7 cross> >>> k7s.sage_link().is_isotopic(k7sn) # optional - snappy False >>> k7snm = k7sn.sage_link().mirror_image() # optional - snappy >>> k7s.sage_link().is_isotopic(k7snm) # optional - snappy True - using - braid_notation:- sage: L2.link(use_item=L.items.braid_notation) == l2 True - >>> from sage.all import * >>> L2.link(use_item=L.items.braid_notation) == l2 True - observe: - sage: L.link(use_item=L.items.braid_notation) Link with 2 components represented by 5 crossings sage: K6_1 = KnotInfo.K6_1 sage: K6_1.link().braid() == K6_1.braid() False - >>> from sage.all import * >>> L.link(use_item=L.items.braid_notation) Link with 2 components represented by 5 crossings >>> K6_1 = KnotInfo.K6_1 >>> K6_1.link().braid() == K6_1.braid() False - also observe: - sage: K4_1 = KnotInfo.K4_1 sage: K4_1.link().pd_code() [[4, 2, 5, 1], [8, 6, 1, 5], [6, 3, 7, 4], [2, 7, 3, 8]] sage: K4_1.pd_notation() [[4, 2, 5, 1], [8, 6, 1, 5], [6, 3, 7, 4], [2, 7, 3, 8]] sage: K5_1 = KnotInfo.K5_1 sage: K5_1.link().braid() s^5 sage: K5_1.link(K5_1.items.dt_notation).braid() s^-5 sage: K5_1.link(K5_1.items.gauss_notation).braid() s^-5 - >>> from sage.all import * >>> K4_1 = KnotInfo.K4_1 >>> K4_1.link().pd_code() [[4, 2, 5, 1], [8, 6, 1, 5], [6, 3, 7, 4], [2, 7, 3, 8]] >>> K4_1.pd_notation() [[4, 2, 5, 1], [8, 6, 1, 5], [6, 3, 7, 4], [2, 7, 3, 8]] >>> K5_1 = KnotInfo.K5_1 >>> K5_1.link().braid() s^5 >>> K5_1.link(K5_1.items.dt_notation).braid() s^-5 >>> K5_1.link(K5_1.items.gauss_notation).braid() s^-5 
 - name_unoriented()[source]¶
- Return the part of the name of - selfwhich is independent on the orientation.- EXAMPLES: - sage: KnotInfo.L10a122_1_0.name_unoriented() # optional - database_knotinfo 'L10a122' - >>> from sage.all import * >>> KnotInfo.L10a122_1_0.name_unoriented() # optional - database_knotinfo 'L10a122' 
 - num_components()[source]¶
- Return the number of components of - self.- EXAMPLES: - sage: KnotInfo.L6a1_0.num_components() 2 - >>> from sage.all import * >>> KnotInfo.L6a1_0.num_components() 2 
 - pd_notation(original=False)[source]¶
- Return the value of column - pd_notationfor this link as a Python list of Python lists. For more information type- KnotInfo.K0_1.items.pd_notation.description_webpage().- INPUT: - original– boolean (default:- False); if set to- Truethe original table entry is returned as a string
 - OUTPUT: - Python list of python lists each entry of the outer list representing a crossing. - EXAMPLES: - sage: L = KnotInfo.L4a1_0 sage: L.pd_notation() [[6, 1, 7, 2], [8, 3, 5, 4], [2, 5, 3, 6], [4, 7, 1, 8]] sage: L.pd_notation(original=True) '{{6, 1, 7, 2}, {8, 3, 5, 4}, {2, 5, 3, 6}, {4, 7, 1, 8}}' sage: K = KnotInfo.K4_1 sage: K.pd_notation() [[4, 2, 5, 1], [8, 6, 1, 5], [6, 3, 7, 4], [2, 7, 3, 8]] - >>> from sage.all import * >>> L = KnotInfo.L4a1_0 >>> L.pd_notation() [[6, 1, 7, 2], [8, 3, 5, 4], [2, 5, 3, 6], [4, 7, 1, 8]] >>> L.pd_notation(original=True) '{{6, 1, 7, 2}, {8, 3, 5, 4}, {2, 5, 3, 6}, {4, 7, 1, 8}}' >>> K = KnotInfo.K4_1 >>> K.pd_notation() [[4, 2, 5, 1], [8, 6, 1, 5], [6, 3, 7, 4], [2, 7, 3, 8]] 
 - series(oriented=False)[source]¶
- Return the series of links - selfbelongs to.- INPUT: - oriented– boolean (default:- False); it only affects proper links. By default the items of the series will be again series of links collecting all orientation mutants of an unoriented name. To obtain the series of the individual links this keyword has to be set to- True.
 - EXAMPLES: - sage: K5 = KnotInfo.K5_2.series() sage: K5(1) <KnotInfo.K5_1: '5_1'> sage: KnotInfo.L4a1_1.series().inject() Defining L4a sage: L4a(1) Series of links L4a1 sage: KnotInfo.L4a1_1.series(oriented=True).inject() Defining L4a1 sage: L4a(1) == L4a1 True sage: L4a1(1) <KnotInfo.L4a1_1: 'L4a1{1}'> - >>> from sage.all import * >>> K5 = KnotInfo.K5_2.series() >>> K5(Integer(1)) <KnotInfo.K5_1: '5_1'> >>> KnotInfo.L4a1_1.series().inject() Defining L4a >>> L4a(Integer(1)) Series of links L4a1 >>> KnotInfo.L4a1_1.series(oriented=True).inject() Defining L4a1 >>> L4a(Integer(1)) == L4a1 True >>> L4a1(Integer(1)) <KnotInfo.L4a1_1: 'L4a1{1}'> 
 - signature()[source]¶
- Return the signature of - self.- From the KnotInfo description page: - The signature of a knot, \(\sigma (K)\), is equal to \(\sigma (V + V^t)\), the signature of \(V + V^t\) where \(V\) is a Seifert matrix for the knot and \(V^t\) is its transpose. - To read the complete description type - KnotInfo.K0_1.items.signatur.description_webpage().- EXAMPLES: - sage: KnotInfo.K5_2.signature() # optional - database_knotinfo -2 - >>> from sage.all import * >>> KnotInfo.K5_2.signature() # optional - database_knotinfo -2 
 - symmetry_type()[source]¶
- Return the symmetry type of - self.- From the KnotInfo description page: - If a knot is viewed as the oriented diffeomorphism class of an oriented pair, \(K = (S_3, S_1)\), with \(S_i\) diffeomorphic to \(S^i\), there are four oriented knots associated to any particular knot \(K\). In addition to \(K\) itself, there is the reverse, \(K^r = (S_3, -S_1)\), the concordance inverse, \(-K = (-S_3, -S_1)\), and the mirror image, \(K^m = (-S_3, S_1)\). A knot is called reversible if \(K = K^r\), negative amphicheiral if \(K = -K\), and positive amphicheiral if \(K = K^m\). - A knot possessing any two of these types of symmetry has all three. Thus, in the table, a knot is called reversible if that is the only type of symmetry it has, and likewise for negative amphicheiral. If it has none of these types of symmetry it is called chiral, and if it has all three it is called fully amphicheiral. - For prime knots with fewer than 12 crossings, all amphicheiral knots are negative amphicheiral. - EXAMPLES: - sage: KnotInfo.K6_1.series().inject() Defining K6 sage: [(K.name, K.symmetry_type()) for K in K6] [('K6_1', 'reversible'), ('K6_2', 'reversible'), ('K6_3', 'fully amphicheiral')] - >>> from sage.all import * >>> KnotInfo.K6_1.series().inject() Defining K6 >>> [(K.name, K.symmetry_type()) for K in K6] [('K6_1', 'reversible'), ('K6_2', 'reversible'), ('K6_3', 'fully amphicheiral')] 
 - three_genus()[source]¶
- Return the three genus of - self.- From the KnotInfo description page: - The three-genus of a knot is defined to be the minimal genus of a Seifert surface for a knot. - To read the complete description type - KnotInfo.K0_1.items.three_genus.description_webpage().- EXAMPLES: - sage: KnotInfo.K5_2.three_genus() # optional - database_knotinfo 1 - >>> from sage.all import * >>> KnotInfo.K5_2.three_genus() # optional - database_knotinfo 1 - Note that this differs from the corresponding result in Sage since the latter is obtained for a Seifert surface that does not have the minimal genus: - sage: KnotInfo.K5_2.link().genus() 3 - >>> from sage.all import * >>> KnotInfo.K5_2.link().genus() 3 
 
- class sage.knots.knotinfo.KnotInfoSeries(crossing_number, is_knot, is_alternating, name_unoriented=None)[source]¶
- Bases: - UniqueRepresentation,- SageObject- This class can be used to access knots and links via their index according to the series they belong to. - INPUT: - crossing_number– integer giving the crossing number of this series of links
- is_knot– boolean; whether this series is a series of knots or proper links
- is_alternating– boolean; whether this series is restricted to alternating links or not This is not relevant for knots with less than 11 crossings
- name_unoriented– string restricting the series to all links with that- name_unoriented
 - EXAMPLES: - sage: from sage.knots.knotinfo import KnotInfoSeries sage: K6 = KnotInfoSeries(6, True, True); K6 Series of knots K6 sage: K6(3) <KnotInfo.K6_3: '6_3'> sage: list(K6) [<KnotInfo.K6_1: '6_1'>, <KnotInfo.K6_2: '6_2'>, <KnotInfo.K6_3: '6_3'>] sage: L6a = KnotInfoSeries(6, False, True); L6a Series of links L6a sage: L6a(2) Series of links L6a2 sage: _.inject() Defining L6a2 sage: list(L6a2) [<KnotInfo.L6a2_0: 'L6a2{0}'>, <KnotInfo.L6a2_1: 'L6a2{1}'>] sage: L6a2(0).series() == L6a True sage: L6a2(0) == L6a2('0') True - >>> from sage.all import * >>> from sage.knots.knotinfo import KnotInfoSeries >>> K6 = KnotInfoSeries(Integer(6), True, True); K6 Series of knots K6 >>> K6(Integer(3)) <KnotInfo.K6_3: '6_3'> >>> list(K6) [<KnotInfo.K6_1: '6_1'>, <KnotInfo.K6_2: '6_2'>, <KnotInfo.K6_3: '6_3'>] >>> L6a = KnotInfoSeries(Integer(6), False, True); L6a Series of links L6a >>> L6a(Integer(2)) Series of links L6a2 >>> _.inject() Defining L6a2 >>> list(L6a2) [<KnotInfo.L6a2_0: 'L6a2{0}'>, <KnotInfo.L6a2_1: 'L6a2{1}'>] >>> L6a2(Integer(0)).series() == L6a True >>> L6a2(Integer(0)) == L6a2('0') True - inject(verbose=True)[source]¶
- Inject - selfwith its name into the namespace of the Python code from which this function is called.- INPUT: - verbose– boolean (default:- True); to suppress the message printed on the invocation
 - EXAMPLES: - sage: KnotInfoSeries(6, True, True).inject() Defining K6 sage: K6(2) <KnotInfo.K6_2: '6_2'> - >>> from sage.all import * >>> KnotInfoSeries(Integer(6), True, True).inject() Defining K6 >>> K6(Integer(2)) <KnotInfo.K6_2: '6_2'> 
 - is_recoverable(unique=True, max_samples=8)[source]¶
- Return if all items of - selfcan be recovered from its conversion to Sage links using the- pd_notationand the- braid_notationand their mirror images.- The method is indirectly used by the - TestSuite.- INPUT: - unique– boolean (default:- True); see- KnotInfoBase.is_recoverable()
- max_samples– nonnegative integer or- infinity(default: \(8\)); limits the number of items to check (random sample). If set to- infinitythen no limit is set.
 - EXAMPLES: - sage: KnotInfo.L4a1_0.series().inject() Defining L4a sage: L4a.is_recoverable() True sage: L4a.is_recoverable(unique=False) True sage: KnotInfo.L5a1_0.series().inject() Defining L5a sage: L5a.is_recoverable() False sage: L5a.is_recoverable(unique=False) True - >>> from sage.all import * >>> KnotInfo.L4a1_0.series().inject() Defining L4a >>> L4a.is_recoverable() True >>> L4a.is_recoverable(unique=False) True >>> KnotInfo.L5a1_0.series().inject() Defining L5a >>> L5a.is_recoverable() False >>> L5a.is_recoverable(unique=False) True 
 - list(oriented=False, comp=None, det=None, homfly=None)[source]¶
- Return this series as a Python list. - INPUT: - oriented– boolean (default:- False); it only affects series of proper links. By default the list items of a series of proper links are again series of links collecting all orientation types of an unoriented name. To obtain the list of the individual links this keyword has to be set to- True.
- comp– (default:- None) if given an integer for this keyword the list is restriced to links having the according number of components. This keyword implies- oriented=True.
- det– (default:- None) if given an integer for this keyword the list is restriced to links having the according value for its determinant. This keyword implies- oriented=True.
- homfly– (default:- None) if given a HOMFLY-PT polynomial having- normalization='vz'for this keyword the list is restriced to links having the according value for its HOMFLY-PT polynomial. This keyword implies- oriented=True.
 - EXAMPLES: - sage: from sage.knots.knotinfo import KnotInfoSeries sage: K6 = KnotInfoSeries(6, True, True); K6 Series of knots K6 sage: K6.list() [<KnotInfo.K6_1: '6_1'>, <KnotInfo.K6_2: '6_2'>, <KnotInfo.K6_3: '6_3'>] sage: KnotInfoSeries(2, False, True).inject() Defining L2a sage: L2a.list() [Series of links L2a1] sage: L2a.list(oriented=True) [<KnotInfo.L2a1_0: 'L2a1{0}'>, <KnotInfo.L2a1_1: 'L2a1{1}'>] - >>> from sage.all import * >>> from sage.knots.knotinfo import KnotInfoSeries >>> K6 = KnotInfoSeries(Integer(6), True, True); K6 Series of knots K6 >>> K6.list() [<KnotInfo.K6_1: '6_1'>, <KnotInfo.K6_2: '6_2'>, <KnotInfo.K6_3: '6_3'>] >>> KnotInfoSeries(Integer(2), False, True).inject() Defining L2a >>> L2a.list() [Series of links L2a1] >>> L2a.list(oriented=True) [<KnotInfo.L2a1_0: 'L2a1{0}'>, <KnotInfo.L2a1_1: 'L2a1{1}'>] 
 - lower_list(oriented=False, comp=None, det=None, homfly=None)[source]¶
- Return this series together with all series with smaller crossing number as a Python list. - INPUT: - oriented– boolean (default:- False); see the description for- list()
- comp– (default:- None) see the description for- list()
- det– (default:- None) see the description for- list()
- homfly– (default:- None) see the description for- list()
 - EXAMPLES: - sage: from sage.knots.knotinfo import KnotInfoSeries sage: KnotInfoSeries(5, True, True).lower_list() [<KnotInfo.K0_1: '0_1'>, <KnotInfo.K3_1: '3_1'>, <KnotInfo.K4_1: '4_1'>, <KnotInfo.K5_1: '5_1'>, <KnotInfo.K5_2: '5_2'>] sage: KnotInfoSeries(4, False, True).lower_list() [Series of links L2a1, Series of links L4a1] sage: KnotInfoSeries(4, False, True).lower_list(oriented=True) [<KnotInfo.L2a1_0: 'L2a1{0}'>, <KnotInfo.L2a1_1: 'L2a1{1}'>, <KnotInfo.L4a1_0: 'L4a1{0}'>, <KnotInfo.L4a1_1: 'L4a1{1}'>] - >>> from sage.all import * >>> from sage.knots.knotinfo import KnotInfoSeries >>> KnotInfoSeries(Integer(5), True, True).lower_list() [<KnotInfo.K0_1: '0_1'>, <KnotInfo.K3_1: '3_1'>, <KnotInfo.K4_1: '4_1'>, <KnotInfo.K5_1: '5_1'>, <KnotInfo.K5_2: '5_2'>] >>> KnotInfoSeries(Integer(4), False, True).lower_list() [Series of links L2a1, Series of links L4a1] >>> KnotInfoSeries(Integer(4), False, True).lower_list(oriented=True) [<KnotInfo.L2a1_0: 'L2a1{0}'>, <KnotInfo.L2a1_1: 'L2a1{1}'>, <KnotInfo.L4a1_0: 'L4a1{0}'>, <KnotInfo.L4a1_1: 'L4a1{1}'>] 
 
- class sage.knots.knotinfo.SymmetryMutant(*values)[source]¶
- Bases: - Enum- Enum to specify the symmetry mutant link of the prime link listed in the KnotInfo and LinkInfo databases. From the KnotInfo description page: - If a knot is viewed as the oriented diffeomorphism class of an oriented pair, \(K = (S_3, S_1)\), with \(S_i\) diffeomorphic to \(S^i\), there are four oriented knots associated to any particular knot \(K\). In addition to \(K\) itself, there is the reverse, \(K^r = (S_3, -S_1)\), the concordance inverse, \(-K = (-S_3, -S_1)\), and the mirror image, \(K^m = (-S_3, S_1)\). - is_minimal(link)[source]¶
- Return whether - selfis minimal among its matching mutants.- EXAMPLES: - sage: from sage.knots.knotinfo import SymmetryMutant sage: SymmetryMutant.itself.is_minimal(KnotInfo.K6_1) True sage: SymmetryMutant.concordance_inverse.is_minimal(KnotInfo.K6_1) False - >>> from sage.all import * >>> from sage.knots.knotinfo import SymmetryMutant >>> SymmetryMutant.itself.is_minimal(KnotInfo.K6_1) True >>> SymmetryMutant.concordance_inverse.is_minimal(KnotInfo.K6_1) False 
 - matches(link)[source]¶
- Return the list of other symmetry mutants that give isotopic links with respect to - linkand- self. For- selfis- SymmetryMutant.unknowna boolean is returned which is- Trueif the chirality of- linkis unknown.- EXAMPLES: - sage: from sage.knots.knotinfo import SymmetryMutant sage: SymmetryMutant.itself.matches(KnotInfo.K6_1) [<SymmetryMutant.reverse: 'r'>] sage: SymmetryMutant.mirror_image.matches(KnotInfo.K6_1) [<SymmetryMutant.concordance_inverse: 'c'>] - >>> from sage.all import * >>> from sage.knots.knotinfo import SymmetryMutant >>> SymmetryMutant.itself.matches(KnotInfo.K6_1) [<SymmetryMutant.reverse: 'r'>] >>> SymmetryMutant.mirror_image.matches(KnotInfo.K6_1) [<SymmetryMutant.concordance_inverse: 'c'>] 
 - mir()[source]¶
- Return the mirror image of - self.- EXAMPLES: - sage: from sage.knots.knotinfo import SymmetryMutant sage: all( sym.mir().mir() == sym for sym in SymmetryMutant) True - >>> from sage.all import * >>> from sage.knots.knotinfo import SymmetryMutant >>> all( sym.mir().mir() == sym for sym in SymmetryMutant) True 
 - rev()[source]¶
- Return the reverse of - self.- EXAMPLES: - sage: from sage.knots.knotinfo import SymmetryMutant sage: all( sym.rev().rev() == sym for sym in SymmetryMutant) True - >>> from sage.all import * >>> from sage.knots.knotinfo import SymmetryMutant >>> all( sym.rev().rev() == sym for sym in SymmetryMutant) True 
 
- sage.knots.knotinfo.eval_knotinfo(string, locals={}, to_tuple=True)[source]¶
- Preparse a string from the KnotInfo database and evaluate it by - sage_eval.- INPUT: - string– string that gives a value of some database entry
- locals– dictionary of locals passed to- sage_eval
 - EXAMPLES: - sage: from sage.knots.knotinfo import eval_knotinfo sage: L = KnotInfo.L4a1_0 sage: L.braid_notation(original=True) '{3, {-2, -2, -1, 2, -1}}' sage: eval_knotinfo(_) (3, (-2, -2, -1, 2, -1)) sage: KnotInfo.K13a_1.kauffman_polynomial() # optional - database_knotinfo # indirect doctest Traceback (most recent call last): ... NotImplementedError: this value is not provided by the database - >>> from sage.all import * >>> from sage.knots.knotinfo import eval_knotinfo >>> L = KnotInfo.L4a1_0 >>> L.braid_notation(original=True) '{3, {-2, -2, -1, 2, -1}}' >>> eval_knotinfo(_) (3, (-2, -2, -1, 2, -1)) >>> KnotInfo.K13a_1.kauffman_polynomial() # optional - database_knotinfo # indirect doctest Traceback (most recent call last): ... NotImplementedError: this value is not provided by the database 
- sage.knots.knotinfo.knotinfo_bool(string)[source]¶
- Preparse a string from the KnotInfo database representing a boolean. - INPUT: - string– string that gives a value of some database entry
 - EXAMPLES: - sage: from sage.knots.knotinfo import knotinfo_bool sage: knotinfo_bool('Y') True sage: KnotInfo.K13a_1.is_almost_alternating() # optional - database_knotinfo # indirect doctest Traceback (most recent call last): ... NotImplementedError: this boolean is not provided by the database - >>> from sage.all import * >>> from sage.knots.knotinfo import knotinfo_bool >>> knotinfo_bool('Y') True >>> KnotInfo.K13a_1.is_almost_alternating() # optional - database_knotinfo # indirect doctest Traceback (most recent call last): ... NotImplementedError: this boolean is not provided by the database 
- sage.knots.knotinfo.knotinfo_int(string)[source]¶
- Preparse a string from the KnotInfo database representing an integer. - INPUT: - string– string that gives a value of some database entry
 - EXAMPLES: - sage: from sage.knots.knotinfo import knotinfo_int sage: knotinfo_int('7') 7 sage: KnotInfo.K13a_1.braid_index() # optional - database_knotinfo # indirect doctest Traceback (most recent call last): ... NotImplementedError: this integer is not provided by the database - >>> from sage.all import * >>> from sage.knots.knotinfo import knotinfo_int >>> knotinfo_int('7') 7 >>> KnotInfo.K13a_1.braid_index() # optional - database_knotinfo # indirect doctest Traceback (most recent call last): ... NotImplementedError: this integer is not provided by the database