yamada#

Implementation of the Yamada polynomial. The Yamada polynomial R is defined via the following relations:

  1. R(K+) = A R(K0) + A^(-1) R(K∞) + R(K•)

  1. R(K ∪ e) = R(K / e) + R(K - e)

  1. R(K ∐ L) = R(K) * R(L)

  1. R(K ∨ L) = - R(K) * R(L)

  1. if K has a cut edge, then R(K) = 0

Other relations (σ = A + 1 + A^(-1)):

  1. R(loop) = σ

  1. R(loop with other edges) = -σ R(loop removed)

  1. R(positive twist at vertex) = -A R(twist removed) - (A^2 + A) R(twist replaced by a non-edge)

  1. R(negative twist at vertex) = -A^(-1) R(twist removed) - (A^(-2) + A^(-1)) R(twist replaced by a non-edge)

  1. R(3-valent positive twist at vertex) = -A R(twist removed)

  1. R(3-valent negative twist at vertex) = -A^(-1) R(twist removed)

  1. R(positive loop) = A^2 R(twist removed)

  1. R(negative loop) = A^(-2) R(twist removed)

Additional relations
  1. R(n-leafed bouquet) = -(σ)^n

https://en.wikipedia.org/wiki/Mathematical_operators_and_symbols_in_Unicode

Functions

yamada(g[, variable])