homflypt#
HOMFLY-PT polynomial in several normalizations.
Variations (skein relations):
l–m:
l·P(L+) + l⁻¹·P(L−) + m·P(L₀) = 0
v–z:
v⁻¹·P(L+) − v·P(L−) − z·P(L₀) = 0
A–z:
A·P(L+) − A⁻¹·P(L−) − z·P(L₀) = 0
x–y–z:
x·P(L+) + y·P(L−) + z·P(L₀) = 0
References: - https://ncatlab.org/nlab/show/HOMFLY-PT+polynomial - https://en.wikipedia.org/wiki/HOMFLY_polynomial
- homflypt(k, variables='vz')#
Compute the HOMFLY–PT polynomial.
This version satisfies the skein relation
\[x\,P(L_+) + y\,P(L_-) + z\,P(L_0) \;=\; 0.\]\[ \begin{align}\begin{aligned} \ell\,P(L_+) + \ell^{-1}\,P(L_-) + m\,P(L_0) \;=\; 0.\\.. math::\\ v^{-1}\,P(L_+) - v\,P(L_-) - z\,P(L_0) \;=\; 0.\\ .. math::\\ A\,P(L_+) - A^{-1}\,P(L_-) - z\,P(L_0) \;=\; 0.\\If the diagram is not oriented, it is oriented automatically.\\Args: k: The input knot or link diagram (oriented or unoriented).\\Returns: sympy.Expr: The HOMFLY–PT polynomial \(P\) in variables \(x, y, z\).\\Raises: ValueError: If a reduced terminal state contains unexpected vertices/crossings.\\Examples: >>> import knotpy as kp >>> k = kp.knot("3_1") >>> kp.homflypt(k) -v**4 + v**2*z**2 + 2*v**2 >>> kp.homflypt(k, variables="lm") m**2/l**2 - 2/l**2 - 1/l**4 >>> kp.homflypt(k, variables="az") z**2/A**2 + 2/A**2 - 1/A**4 >>> kp.homflypt(k, variables="xyz") -2*y/x - y**2/x**2 + z**2/x**2\end{aligned}\end{align} \]- Parameters:
variables (str)
- Return type:
Expr