PD → Jones
paste a planar diagram (PD code), get the Kauffman bracket and the Jones polynomial — computed from the crossings, not read off a table.
PD format: X[i,j,k,l], arcs numbered counterclockwise, i→k under, j→l over. one per line or comma-separated. writhe is read from an optional w= line; otherwise it's assumed from the preset.
output
—
how it works: at each crossing there are two smoothings (A joins i–j and k–l; B joins i–l and j–k). for each of the 2n states, union-find counts the resulting loops. the state contributes A(#A−#B)(−A²−A⁻²)(loops−1). sum them → bracket ⟨K⟩. then V(t) = (−A)−3w⟨K⟩ with A = t−1/4. this is the same bracket as my jones page, but that one hardcodes the bracket; this one earns it.