\documentclass{article}

\usepackage{amsmath,amsthm,amssymb,graphicx,geometry,longtable}

\geometry{
 a4paper,
 total={170mm,257mm},
 left=20mm,
 top=20mm,
}

\newcommand{\g}{\gamma}
\newcommand{\e}{\epsilon}
\newcommand{\p}{\partial}
\newcommand{\OO}{\mathbb{O}}
\newcommand{\HH}{\mathcal{H}}
\newcommand{\A}{\mathcal{A}}
\newcommand{\W}{\mathcal{W}}
\newcommand{\V}{\mathcal{V}}

\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\C}{\mathbb{C}}
\newcommand{\Cr}{\mathrm{Cr}}
\newcommand{\adj}{\mathrm{adj}}
\newcommand{\pp}{/\hspace{-3pt}/}
\newcommand{\Ee}{\mathbf{E}}
\newcommand{\Ff}{\mathbf{F}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}


\newtheorem{definition}{Definition}
\newtheorem{theorem}{Theorem}
\newtheorem{proposition}{Proposition}
\newtheorem{conjecture}{Conjecture}
\newtheorem{lemma}{Lemma}

\title{A polynomial time knot polynomial}
\author{Dror~Bar-Natan and Roland~van~der~Veen}


\date{}
\begin{document}



\maketitle

\abstract{
We present the strongest known knot invariant that can be computed effectively (in polynomial time)\footnote{This work was partially supported by NSERC grant RGPIN 262178 and the Netherlands Organisation for Scientific Research.}.
}
\section{Introduction}
We present a simple, strong knot invariant that is closely related to the Alexander polynomial and seems to share many of its good properties. 
For example, unlike the commonly used quantum invariants such as the Jones polynomial, our invariant is computable in polynomial time. For simple knots the Jones polynomial works
well but as the number of crossings grows the exponentially many terms in the resulting state sums quickly become unmanageable. Our invariant does not suffer from these issues, it scales well with the complexity of the knot. 

The plan of the paper is as follows. Our invariant is based on normal ordering exponentials in the $q$-Weyl algebra $\la E,F\ra/(EF-qFE=1)$, see Section \ref{sec.qWeyl}. As a warm-up we first show how the Alexander polynomial may be derived from the ordinary Weyl algebra $\la E,F\ra/(EF-FE=1)$ in Section \ref{sec.Weyl}. These algebras are but examples of a more general theory of invariants coming from algebras satisfying certain equations that we introduce in Section \ref{sec.Snarls}. As a preview we start by giving a condensed definition of the knot invariant. Proofs and additional (conjectured) properties are discussed in Section \ref{sec.Properties}.




\subsection{The knot invariant}

Consider a (long) knot $K$ presented as a proper smooth embedding of $[0,1]$ into the closed unit ball such that
the projection on the third coordinate is a generic immersion $\gamma$ in the plane, see for example Figure 1. More specifically, assume that there is an $n\in \mathbb{N}$ such
that $\gamma$ has the following properties. The points $\gamma(\frac{k}{n+1})$ where $k\in \{1,\dots, n\}$ are the union of all double points and
all points where $\gamma'$ is in the direction of the positive $x$-axis. The double points are known as crossings and the latter as cuaps. Close to any crossing we assume
$\gamma'$ has positive $y$-coordinate. The sign of a crossing is the sign of the $x$-coordinate of $\gamma'$ at the overpass. A crossing is denoted $X^\sigma_{i,j}$ where 
$\sigma$ is the sign and $i,j$ are the labels of the over and under strand. The sign of a cuap is the sign of the $y$-direction of $\gamma''$. A cuap is denoted $u^\sigma_{i}$ 
where $\sigma$ is the sign and $i$ is its label.

\begin{figure}[htp]
\includegraphics[width=\textwidth]{Pictures/Trefoil2.png}
\caption{\textsf{A diagram for the trefoil knot $3_1$. The double points at the crossings and the right-pointing cuaps are enumerated in order of appearance.
The matrices $W,Q$ and the number $c$ necessary for computation of the invariant $Z_0$ are listed next to it.}}
\label{fig.Trefoil}
\end{figure}

To define our knot invariant $Z_0$ we need to introduce some preliminary constructions. 
Let $E^i_j$ be the elementary $n\times n$ matrix with a single non-zero entry $1$ at the $(i,j)$-th place. Define the matrices 
\[
Q = \sum_{X^\sigma_{i,j}} \sigma t^{\frac{\sigma}{2}}(E^j_j-E^i_j) \quad W = \sum_{i<j} E^i_j \quad c = \prod_{X^\sigma_{i,j}, u^\sigma_{i}} t^{-\sigma}
\]
Here the sum and product are over all crossings/cuaps in the diagram. Next recall the adjugate of a matrix $M$ is defined by $M\mathrm{adj}(M) = \det(M)I$ and define
\[
B = I-(t^{\frac{1}{2}}-t^{-\frac{1}{2}})WQ\quad G = Q \mathrm{adj}(B) \quad H = \mathrm{adj}(B) W 
\]
\[
Z_G = (t-t^{-1})\sum_{j=2}^n\sum_{a,b<j}G^j_a\left(\frac{1}{2}G^j_b+\sum_{g>j}G^g_b\right)  
\]
\[
Z_H = \sum_{X^\sigma_{i,j}} \frac{\sigma}{2}((1-t^\sigma)H^j_i)^2-\frac{\sigma}{2}((1+t^\sigma)H^j_j)^2+\sigma t^\sigma(H^j_iH^i_j+H^i_iH^j_j)+t^\sigma(1-t)H^j_i((1+\sigma)H^j_j+(1-\sigma)H^i_i)
\]
\[+\det(B)\sum_{u^\sigma_{i}}\sigma H^i_i  
\]

\begin{theorem}
$c^{\frac{1}{2}}\det(B)$ is the Alexander polynomial $\Delta$ and $Z_0 = c(Z_G+Z_H)$ is a knot invariant. Both are elements of $\mathbb{Z}[t,t^{-1}]$ computable in {\bf polynomial time}.
\end{theorem}

The above formulas immediately show that the computation must be polynomial time, for a more detailed discussion see Theorem \ref{thm.poly} in Section \ref{sec.Properties}.

The pair $\Delta,Z_0$ distinguishes all knots in the Rolfsen table of prime knots up to ten crossings, see the Appendix. That is a better performance than for example Khovanov homology and HOMFLY polynomial combined\footnote{The knots $8_{16}$ and $10_{156}$ have identical Khovanov homology and identical HOMFLY polynomials \cite{Ka}.}. More importantly $Z_0$ appears to share many of the desirable properties of the Alexander polynomial. 

Our invariant $Z_0$ appears to coincide with a part of the colored Jones invariant studied by Overbay \cite{Ov13} and Rozansky \cite{Ro98}, see Conjecture \ref{conj.Overbay} of Section 
\ref{sec.Properties}. The present approach seems simpler as it allows a local version and a polynomial time algorithm. We also conjecture new bounds on the knot genus and argue $Z_0$ detects mirror images.



\subsection{Example: Trefoil}

We illustrate the computation of $Z_0$ for the trefoil knot $3_1$ shown in Figure 1.

\[
B = \left(
\begin{array}{ccccccc}
 1 & 0 & 0 & 0 & 1-t & 0 & 0 \\
 0 & t & 0 & 0 & 1-t & 0 & 0 \\
 0 & t-1 & 1 & 0 & 1-t & 0 & 1-t \\
 0 & t-1 & 0 & 1 & 1-t & 0 & 1-t \\
 0 & t-1 & 0 & 0 & 1 & 0 & 1-t \\
 0 & 0 & 0 & 0 & 0 & 1 & 1-t \\
 0 & 0 & 0 & 0 & 0 & 0 & 1 \\
\end{array}
\right) \quad \Delta_{3_1}(t) = c^{\frac{1}{2}}\det(A) = t-1+t^{-1}
\]

\[
G=\left(
\begin{array}{ccccccc}
 0 & t^{\frac{3}{2}}-t^{\frac{1}{2}} & 0 & 0 & -t^{\frac{3}{2}} & 0 & t^{\frac{3}{2}}-t^{\frac{5}{2}} \\
 0 & t^{\frac{1}{2}} & 0 & 0 & t^{\frac{3}{2}}-t^{\frac{1}{2}} & 0 & t^{\frac{5}{2}}-2 t^{\frac{3}{2}}+t^{\frac{1}{2}} \\
 0 & 0 & 0 & 0 & 0 & 0 & -t^{\frac{5}{2}}+t^{\frac{3}{2}}-t^{\frac{1}{2}} \\
 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & t^{\frac{1}{2}}-t^{\frac{3}{2}} & 0 & 0 & t^{\frac{3}{2}} & 0 & t^{\frac{5}{2}}-t^{\frac{3}{2}} \\
 0 & -t^{\frac{1}{2}} & 0 & 0 & t^{\frac{1}{2}}-t^{\frac{3}{2}} & 0 & -t^{\frac{5}{2}}+2 t^{\frac{3}{2}}-t^{\frac{1}{2}} \\
 0 & 0 & 0 & 0 & 0 & 0 & t^{\frac{5}{2}}-t^{\frac{3}{2}}+t^{\frac{1}{2}} \\
\end{array}
\right)\quad
Z_G = t^4-\frac{3 t^2}{2}+\frac{1}{2}
\]


\[
H=\left(
\begin{array}{ccccccc}
 0 & t^2-t+1 & t & t & t & t^2 & t^2 \\
 0 & 0 & 1 & 1 & 1 & t & t \\
 0 & 0 & t-t^2 & 1 & 1 & t & t \\
 0 & 0 & t-t^2 & t-t^2 & 1 & t & t \\
 0 & 0 & 1-t & 1-t & 1-t & 1 & 1 \\
 0 & 0 & 0 & 0 & 0 & 0 & t^2-t+1 \\
 0 & 0 & 0 & 0 & 0 & 0 & 0 \\
\end{array}
\right) \quad Z_H = t^4-3 t^3+\frac{7 t^2}{2}-t-\frac{1}{2}
\]

It follows that $Z_0(3_1) = c(Z_G+Z_H) = 2 - t^{-1} - 3 t + 2 t^2$ and its normalization is $\rho_1(t) = -t-t^{-1}$, see section \ref{sec.Properties}.
Comparing to the table in the Appendix, notice we used the mirror image of the usual trefoil $3_1$ from the table. Conjecture \ref{conj.sym} explains the ensuing sign in $\rho_1$.


\section{Snarl diagrams: A local version of the knot invariant}
\label{sec.Snarls}
So far we defined $Z_0$ for knot diagrams but did not yet show its value is independent of the chosen diagram. As any two diagrams for the same knot are related by Reidemeister moves, all we need to do is show $Z_0$ is unchanged under those moves. Instead of attempting a direct proof we first extend $Z_0$ to a function $Z$ on more general diagrams that we call snarl diagrams. Showing invariance of $Z$ is vastly simpler since now all computations become local. Our treatment is closely related to Kauffman's rotational virtual tangles \cite{Ka15} but avoids virtual crossings.	 

\begin{definition}
A {\bf snarl\footnote{Dictionary entry: a knot or tangle, also a growl.} diagram} is a finite set $L$ together with a finite oriented graph $G=(V,E)$ and functions $\sigma:V\to \{\pm 1\}$ and $\rho:E\to \mathbb{Z}$. The edges $E$ are assumed to be a disjoint union of oriented paths and each path is labelled by an element of $L$. Furthermore the edges around any vertex are ordered cyclically such that two adjacent edges enter and two exit each vertex that is not an endpoint of a path.
\end{definition}

The vertices of the graph should be viewed as the crossings and endpoints of a projection of a piece of a knot. The paths labeled by $L$ correspond to the connected components. The map $\rho$ keeps track of rotation numbers of the tangent vector on the edges so that our diagrams are like Morse diagrams. To build a snarl diagram from any knot diagram just make the tangent vector near each crossing point upwards and count the resulting rotation numbers of the tangent vector at each edge. For example the edge labeled 4 in Figure \ref{fig.Trefoil} has $\rho = -1$ as it rotates clockwise. $\rho=0$ for all other edges. A more interesting example of a snarl diagram is shown in Figure \ref{fig.R2}.

\begin{figure}[htp]
\begin{center}
\includegraphics[width=6cm]{Pictures/R2.png}
\end{center}
\caption{\textsf{Left: A snarl diagram corresponding to the left-hand side of equation (2), the numbers give the value of $\rho$, the letters $a,b$ are the labels of the two components. 
Right: A piece of a knot whose snarl diagram would be on the left hand side. Again $a,b$ depict the labels of the two components and the integers are labels of the smaller pieces used to build up this diagram as in equation (2).}}
\label{fig.R2}
\end{figure}

Knot diagrams may be assembled from simpler pieces by the following two operations on snarl diagrams.

\begin{definition}
{\bf Disjoint union:} For two snarl-diagrams $G,G'$ with label sets $L,L'$ the disjoint union $G\sqcup G'$ is the snarl diagram with underlying graph as indicated and label set $L\sqcup L'$. 
To avoid clutter we sometimes omit the $\sqcup$ symbol and use juxtaposition instead.\\
{\bf Stitching:} For $i\neq j\in L$ and $k\notin L-\{i,j\}$ define the snarl diagram $m^{ij}_k(G)$ to be the graph obtained from $G$ by connecting the endpoint of component $i$ to the start of component $j$, erasing the vertex in the middle. For the newly created edge $e$ we define $\rho(e)$ to be the sum of the values of $\rho$ on the edges that disappear. The newly created component is labeled $k$ so the label set is $L-\{i,j\}\cup \{k\}$.
\end{definition}

Notice how any snarl diagram may be constructed using disjoint union and stitching from two types of fundamental diagrams: The crossing $X^{\pm}_{ij}$ where we label the over-strand $i$ and $\rho$ of every edge is $0$ and the diagram $\alpha_i^r$, a single oriented edge labelled $i$ with rotation number $\rho=r$. It is sometimes useful to stitch many ends at the same time.
For a sequence $I = (I_1,\dots, I_n)$ of $n$ distinct elements of $L$ and $k\notin L-I$ define\footnote{In what follows $f\pp g$ means the composition $g\circ f$.} 
\[m^I_k = m^{I_1,I_2}_{k}\pp m^{k,I_3}_{k}\pp\dots m^{k,I_{n-1}}_{k}\pp m^{k,I_n}_{k}\]
Even more generally if $\tau = (\tau^1,\dots \tau^b)$ is a sequence of $b$ such sequences whose disjoint union is $L$ and $B=(B_1,\dots, B_b)$ is any $b$-element sequence then define
$m^{\tau}_B = m^{\tau^1}_{B_1}\pp \dots \pp m^{\tau^b}_{B_b}$. When $B$ is not specified we take it to be $(1,\dots, b)$, the commas are sometimes dropped for brevity. 

Snarl diagrams are meant to generalize Morse diagrams of pieces of knots. As such we should consider them up to equivalence under a version of the Reidemeister moves as for example described in Chapter 3 of \cite{Oh01}. Using rotation numbers instead of cuaps and using \cite{Po10} we only have to look at the four equations below, depicted in Figure \ref{fig.snarlmoves}.

\begin{definition}
Consider the equivalence relation $\sim$ on the set of snarl diagrams generated by relabeling components and the equivalences
\begin{align}
X^\pm_{13}\sqcup\alpha_2^{\mp 1} \pp m^{(123)} &\sim \alpha^0_1 \sim X^\pm_{31}\sqcup\alpha_2^{\pm 1} \pp m^{(123)}\\
X^-_{12}\sqcup X^+_{34}\sqcup \alpha_5\sqcup \alpha^{-1}_6\pp m^{(13)(4526)}&\sim \alpha^0_1\sqcup\alpha^0_2 \sim X^+_{12}\sqcup X^-_{34}\sqcup \alpha_5\sqcup \alpha^{-1}_6\pp m^{(5163)(42)} \\
X^\pm_{12}\sqcup X^\pm_{34}\sqcup X^\pm_{56}\pp m^{(13)(25)(46)} &\sim X^\pm_{12}\sqcup X^\pm_{34}\sqcup X^\pm_{56}\pp m^{(35)(16)(24)}\\
X^\pm_{12}&\sim \alpha_1^{\pm 1}\sqcup\alpha_2^{\pm 1}\sqcup X^\pm_{34}\sqcup \alpha_5^{\mp 1}\sqcup\alpha_6^{\mp 1}\pp m^{(135)(246)}
\end{align}
%remember rightmoving cup u is alpha, n is 1/alpha
\end{definition}

\begin{figure}[htp]
\begin{center}
\includegraphics[width=9cm]{Pictures/Equivalence3.png}
\end{center}
\caption{\textsf{Equivalences on snarl diagrams. The labels of the components and degree $1$ vertices are not shown. Only the edges with a non-zero value of $\rho$ are marked.}}
\label{fig.snarlmoves}
\end{figure}

Our motivation for defining this equivalence relation is the following Reidemeister type theorem. 

\begin{theorem}
\label{thm.Reidemeister}
Every isotopy class of long knots can be represented by a snarl diagram. Two snarl diagrams representing isotopic knots are equivalent. 
\end{theorem}
\begin{proof}
This can be proved exactly as in the case of the standard Reidemeister theorem for Morse diagrams of tangles. See for example Chapter 3 of \cite{Oh01} or \cite{Tu16}. 
The fact that our set of moves is sufficient follows from Thm 1.2 of \cite{Po10}. 
\end{proof}

Snarl diagrams may also be used to represent more general knotted objects such as planar tangles and for those a similar theorem will hold.


\section{Snarl algebra}
\label{sec.snarlalgebra}

In this section we formulate conditions on an algebra to yield a knot invariant. Such invariants are sometimes known as universal invariants, see \cite{Ha06} and the references therein. 

By an algebra $\A$ we mean a ring with $1$ whose center includes a commutative base ring $R$ with $1$. All tensor products are over $R$. Similar to the labeling of components of 
snarl diagrams we would like to explicitly label the tensor factors in our tensor products. Given a finite set $S$ we define $\A^{\otimes S}$ to be the tensor product of $|S|$ copies of $\A$ indexed by the elements of $S$. When $T\subset S$ define $\iota_T:\A^{\otimes T}\to \A^{\otimes S}$ by the identity on the tensor factors indexed by elements of $T$ and setting all other tensor factors to $1$. We use the shorthand $\iota_{\{i,j\}}(Y) = Y_{ij}$ and $\iota_{\{i\}}(y) = y_i$.
Denote by $m^{ij}_k$ the multiplication operation $\A^{\otimes S\sqcup\{i,j\}}\to \A^{\otimes S\sqcup \{k\}}$ defined by deleting the $i$-th and $j$-th tensor factors and placing the product of those elements into the $k$-th tensor factor.

\begin{definition}
A {\bf snarl-algebra} is an algebra $\A$ together with invertible elements $X\in \A^{\otimes \{1,2\}},\alpha\in \A$ such that the equations shown below are satisfied.
For any snarl diagram $D$ with label set $L$ denote by $Z(D)\in A^{\otimes L}$ the unique element characterized by 
$Z(X^\pm_{ij}) = X^\pm_{ij}$ and $Z(\alpha^r_i) = \alpha^r_i$ and $Z(D\sqcup D') = Z(D)\otimes Z(D')$ and $Z(m^{ij}_k D) = m^{ij}_k Z(D)$.
$Z= Z_{\A,X,\alpha}$ is called the snarl invariant corresponding to $\A$.
\end{definition}

\begin{align}
Z(X^\pm_{13}\alpha^{\mp 1}_2 \pp m^{(123)})&=Z(\alpha^0_1)=Z(X^\pm_{31}\alpha^{\pm 1}_2 \pp m^{(123)})  \\
Z(X^-_{12} X^+_{34} \alpha_5 \alpha^{-1}_6\pp m^{(13)(4526)})&= Z(\alpha^0_1\alpha^0_2) = Z(X^+_{12} X^-_{34} \alpha_5 \alpha^{-1}_6\pp m^{(5163)(42)}) \\
Z(X^\pm_{12} X^\pm_{34} X^\pm_{56}\pp m^{(13)(25)(46)}) &= Z(X^\pm_{12} X^\pm_{34} X^\pm_{56}\pp m^{(35)(16)(24)})\\
Z(X^\pm_{12})&= Z(\alpha_1^{\pm 1}\alpha_2^{\pm 1} X^\pm_{34} \alpha_5^{\mp 1}\alpha_6^{\mp 1}\pp m^{(135)(246)})
\end{align}

This definition is designed to make following theorem hold. 

\begin{theorem}
For any snarl algebra the corresponding invariant $Z$ is well-defined and its value is independent of the snarl diagram chosen to compute it.
\end{theorem}
\begin{proof}
For the well-definedness of $Z$ we argue that its value does not depend on the order of stitchings and disjoint unions used to build up the snarl. First one may carry out all disjoint union operations at the beginning. By associativity of both operations it is then clear that the order is irrelevant.

By construction equivalent snarl diagrams will yield the same value of $Z$. Theorem \ref{thm.Reidemeister} finishes the proof.
\end{proof}

As a relatively simple example, not used below, consider the group algebra $\C G$ of a finite group $G$ and its dual $\C(G) = \{f:G\to \C\}$. 
Define a snarl algebra $D(G) = \C(G)\otimes \C G$ with multiplication determined by 
\[(\delta^g\otimes h)(\delta^{g'}\otimes h') = \delta^g\delta^{hg'h^{-1}}\otimes hh'\] 
here $\delta^g$ denotes the function that takes value $1$ on $g$ and is zero otherwise. 

The reader is invited to check that $D(G)$ becomes a snarl algebra if we set:
\[Z_{D(G)}(X^{\sigma}_{ij}) = \sum_{g\in G} (\delta^g\otimes g^{-\sigma})_i (1\otimes g^{\sigma})_j \qquad Z_{D(G)}(\alpha_i) = (1\otimes 1)_i \qquad \sigma\in \{-1,1\}\]
Using the Wirtinger presentation, the corresponding knot invariant $Z_{D(G)}$ may be interpreted as 
\[
Z_{D(G)}(K) = \sum_\pi \delta^{\pi(\mu)}\otimes \pi(\lambda)\]
Here the sum is over all representations $\pi$ of the fundamental group of the knot complement into $G$ and $\mu,\lambda$ are the canonical meridian and $0$-framed longitude of the long knot.

For example the value of the trefoil knot is 
\[Z_{D(G)}(X^+_{15}X^+_{62}X^+_{37}\alpha_4^{-1}\pp m^{(1234567)}) = \sum_{a,b,c\in G}(\delta^{a}\delta^{bcb^{-1}}\delta^{bab(ba)^{-1}}\otimes a^{-3}bac)_1\]

We leave these statements as an exercise to the reader as they are neither difficult nor new \cite{Ma02} and also not the subject of the present paper. 
In the next section we will work out a more relevant and interesting example in full detail.

Before going into specific examples of snarl algebras it should be mentioned that many such algebras can be obtained from applying the
Drinfeld double construction \cite{ES98}. This includes the finite group example just given. The resulting ribbon Hopf algebras always yield snarl algebras but snarl algebras are a little
simpler since we do not require the coalgebra structure. In future work we will comment more on these general constructions.


\section{Alexander polynomial and Weyl algebra}
\label{sec.Weyl}
In this section we introduce the Weyl algebra and show how it is a snarl algebra. The corresponding invariant is the Alexander polynomial and serves as both a special case and a warming up example for the invariant treated in the next section.

The Weyl algebra $\W$ is the algebra generated over the ring $R=\Q(t^{\frac{1}{2}})$ by non-commutative power series in $E,F$ subject to the relation $FE-EF=1$.
Using this relation any element of $\W$ may be written as a sum of alphabetically ordered monomials. Infinite series are always understood in the topology suggested by this alphabetic ordering. 

The foundation for our computations is the well-known Weyl commutation relation between exponentials.

\begin{lemma}
\label{lem.ExpComm}
In $\W$ we have the following relation: 
\begin{equation}
\mathbf{e}^{yF}\mathbf{e}^{x E} = \mathbf{e}^{yx}\mathbf{e}^{x E}\mathbf{e}^{yF}
\end{equation}
\end{lemma}
\begin{proof}
This follows directly from the identity $F^bE^a = \sum_j \frac{a!b!E^{a-j}F^{b-j}}{(a-j)!j!(b-j)!}$ that may be proven by induction.
\end{proof}

For convenience we formalize our alphabetic approach to $\W$ a bit more by introducing $\V = R[[e,f]]$. 
The map $\OO: \V \to \W$ given by $\OO(e^if^j) = E^iF^j$ is a bijection, this follows from ordering. 
We may use it to pull back the product on $\W$ as follows. Define $m(g,g') = \OO^{-1}(\OO(g)\OO(g'))$, for example $m(ef,ef)=  e^2f^2+ef$. 
Our convention is that this special product on $\V$ will be denoted $m$, while the ordinary product of power-series
is denoted by juxtaposition. Since $\W$ is associative the same is true for $\V$ with the pulled back product $m$. 

For later use we also define renaming operations, these are algebra maps $r^{i}_j:\V^{\otimes S\sqcup \{i\}} \to \V^{\otimes S\sqcup \{j\}}$ by $r^i_j(e_i) =e_j$ and $r^i_j(f_i) =f_j$ and the identity on the other algebra generators. More generally for any ordered partition $\tau$ of $S$ into $b$ parts and $b$-element sequence $B$ we set $r^\tau_B(e_i) = e_{B_j}$ if $i\in \tau^j$ and the same for $f_i$.
We sometimes use the short hand $r^{ij}_k = r^i_k\pp r^j_k$ and also $r^\tau = r^\tau_{(1,2,\hdots, b)}$.

We now aim to develop techniques for showing $\V$ is a snarl algebra with if we set:

\[
Z(X^{\sigma}_{ij}) = t^{-\frac{\sigma}{2}}\mathbf{e}^{(1-t^{\sigma})(e_i-e_j)f_j} \qquad Z(\alpha_i^{\sigma}) = t^{-\frac{\sigma}{2}}
\]
 The main difficulty is to find a good formula for the multiplication $m$ on elements such as the above.
Let $S$ be a finite set of labels. Lemma \ref{lem.ExpComm} tells us that in $\V^{\otimes S}$ we have $m^{ij}_k \mathbf{e}^{bf_i+ae_j} = \mathbf{e}^{ba+ae_k+bf_k}$.
Setting $x=(x_s)_{s\in S}$, $y=(y_s)_{s\in S}$ and $e=(e_s)_{s\in S}$ and $f=(f_s)_{s\in S}$ we may write any element of 
$g\in \V^{\otimes S}$ as $g(e,f) = g(\p_x,\p_y)\mathbf{e}^{ex+yf}|_{x=y=0}$.
This allows us to compute $m^{ij}_k(g) = $ 
\[m^{ij}_k(g(\p_x,\p_y)\mathbf{e}^{ex+yf}|_{x=y=0})=g(\p_x,\p_y)m^{ij}_k(\mathbf{e}^{ex+yf})|_{x=y=0} = g(\p_x,\p_y) \mathbf{e}^{y_ix_j+xe+yf}|_{x=y=0}\pp r^{ij}_k
\]
More specifically if $g = \mathbf{e}^{eQf}$ for some square matrix $Q$, as is the case for the fundamental snarls then
\[
m^{ij}_k(\mathbf{e}^{eQf}) = \mathbf{e}^{\p_xQ\p_y}\mathbf{e}^{y_ix_j+xe+yf}|_{x=y=0}\pp r^{ij}_k
\] 
The lemma below will show us how to simplify this.

\begin{lemma}
\label{lem.Gauss}
Given square matrices $W,Q$ such that $\det(I-WQ) \neq 0$ and vectors $x,y,e,f$ we have
\begin{equation}
\mathbf{e}^{\p_xQ\p_y}\mathbf{e}^{yWx+ex+yf} = \frac{\mathbf{e}^{(eQ+y)(I-WQ)^{-1}(f+Wx)+ex}}{\det(I-WQ)}
\end{equation}
\end{lemma}
\begin{proof}
We claim that both sides of the equation satisfy the system of differential equations
\[
\partial_{Q_{ij}} \Psi = \partial_{x_i}\partial_{y_j} \Psi \qquad \Psi|_{Q=0} = \mathbf{e}^{yWx+ex+yf}
\]
There is only one power series in the commuting variables $Q_{i,j}, x_i,y_j$ satisfying these equations. Indeed we may use the differential
equation to express the coefficient of any monomial in terms of coefficients of monomials whose joint degree in the $Q$-variables is lower.
It thus suffices to prove our claim that both sides satisfy the differential equations. We focus on the right-hand side as the left hand side is clear.
Set $A = I-WQ$ so the exponent is $V=(eQ+y)A^{-1}(f+Wx)+ex$. Then 
\[
\p_{Q_{ij}}\frac{\mathbf{e}^V}{\det A} = \frac{\mathbf{e}^V}{\det A}\left(\p_{Q_{ij}}V-\frac{\p_{Q_{ij}}(\det A)}{\det A}\right) 
\]
For the first term we use $\p_{Q_{ij}}(A^{-1})_{rs} = (A^{-1}W)_{ri}A^{-1}_{js}$ to find  
\[\p_{Q_{ij}}V = e_i(A^{-1}(f+Wx))_j+((eQ+y)A^{-1}W)_i(A^{-1}(f+Wx))_j \]
For the second term we compute $\p_{Q_{ij}}(\det A) = -(\mathrm{adj}(A)W)_{ji}$ so $-\frac{\p_{Q_{ij}}(\det A)}{\det A} = (A^{-1}W)_{ji}$
This matches the other side of the equation:
\[
\p_{x_i}\p_{y_j}\frac{\mathbf{e}^V}{\det A} = \frac{\mathbf{e}^V}{\det A}( (eQ+y)A^{-1}W+e)_i(A^{-1}(f+Wx))_j   +(A^{-1}W)_{ji} )
\]
\end{proof}

Returning to our computation of $m^{ij}_k(\mathbf{e}^{eQf})$, taking $W = E_{ij}$ gives $(I-WQ)^{-1} = I+\frac{1}{1-Q_{ji}}\sum_b Q_{jb}E_{ib}$ and so $\det(I-WQ) = 1-Q_{ji}$ and $Q(I-WQ)^{-1} = Q+\frac{1}{1-Q_{ji}}\sum_{ab}Q_{jb}Q_{ai}E_{ab}$. This means that
\[
m^{ij}_k(\mathbf{e}^{eQf}) = \frac{\mathbf{e}^{eQf+\frac{1}{1-Q_{ji}}\sum_{ab}e_aQ_{ai}Q_{jb}f_b}}{(1-Q_{ji})}\pp r^{ij}_k
\] 

Sometimes it is convenient to do many multiplications (stitchings) at once. For this we generalize the above discussion to prove

\begin{lemma}
\label{lem.bulkAlex}
For any ordered partition of the labels $\tau = (\tau^1,..,\tau^n)$ and an $n$-element set of new labels $L$ we may describe $m^{\tau}_{L}$ as follows.
First define $W = \sum_{\{(i,j)|\exists s: i,j \in \tau^s, i\prec j\}} E^i_j$. Here $\prec$ refers to the ordering of the elements in $\tau^k$.

\[m^\tau_L \left(\frac{\mathbf{e}^{eQf}}{\Delta}\right) =  \frac{1}{\Delta\det (I-WQ)}\mathbf{e}^{Q(I-WQ)^{-1}}\pp r^{\tau}_L\]
For any constant $\Delta$ and matrix $Q$ whose entries are indexed by $L$.
\end{lemma}
\begin{proof}
Without loss of generality we restrict ourselves to the special case $\tau = (1,2,\dots n)=S$. For any $g \in \V^{\otimes S}$ we have
$m^{\tau}(g) =$ 
\[m^{\tau}_1(g(\p_x,\p_y)\mathbf{e}^{ex+yf}|_{x=y=0})=g(\p_x,\p_y)m^{\tau}_1(\mathbf{e}^{ex+yf})|_{x=y=0} =g(\p_x,\p_y) \mathbf{e}^{yWx+xe+yf}|_{x=y=0}\pp r^{\tau}_1
\]
Here we used the commutation relation that follows from lemma \ref{lem.ExpComm} 
\[
\mathbf{e}^{x_1E}\mathbf{e}^{y_1F}\mathbf{e}^{x_2E}\mathbf{e}^{y_2F}\dots \mathbf{e}^{x_nE}\mathbf{e}^{y_nF} = \mathbf{e}^{yWx}\mathbf{e}^{(x_1+\dots+x_n)E}\mathbf{e}^{(y_1+\dots+y_n)F}
\]
Now if $g = \frac{\mathbf{e}^{eQf}}{\Delta}$ Lemma \ref{lem.Gauss} finishes the proof. 
\end{proof}

In case $L = \{1,...,k\}$ and $\tau$ is a partition of $\{1,...,n\}$ we may write out the renaming operation $r^\tau$ explicitly. Define $M$ by $M_{ij} = 1$ if $i\in \tau^j$ and zero otherwise.
Then 
\[m^\tau_L\left(\frac{1}{\Delta}\mathbf{e}^{eQf}\right) = \frac{1}{\Delta \det(I-WQ)}\mathbf{e}^{eM^TQ(I-WQ)^{-1}Mf}\]


\subsection{The Weyl algebra is a snarl algebra}
\label{subsec.SnarlW}

In this section we prove that $\W$, or rather its normal ordered version $\V$, with the formulas below really satisfies the axioms of a snarl algebra. We will treat the most important cases and write down the main steps in the computations. Readers that would like to see more details are invited to run the computer implementation described in the Appendix.
\[
Z(X^{\sigma}_{ij}) = t^{-\frac{\sigma}{2}}\mathbf{e}^{(1-t^{\sigma})(e_i-e_j)f_j} \qquad Z(\alpha_i^{\sigma}) = t^{-\frac{\sigma}{2}}
\]
One of the benefits of extending knot invariants to local objects like snarls is that checking the Reidemeister moves becomes local too. 
Each of the axioms is a routine calculation using the formulas we derived above (Lemma \ref{lem.bulkAlex} and the remark coming after it).
Here and in the sequel we often write the invariant of a snarl $T$ as $Z(T) = \Delta_T^{-1} \mathbf{e}^{eQ_Tf}$ where $\Delta_T,Q_T$ are the constant and matrix defined by this equation.

First we check
\[
Z(X^\pm_{31}\alpha^{\pm 1}_2 \pp m^{(123)})= Z(\alpha^0_1)\\
\]
To evaluate the left hand side we first consider the disjoint union $D = X^\sigma_{31}\sqcup \alpha^{\sigma}_2$. $Z(D) = \Delta_D^{-1} \mathbf{e}^{eQ_Df}$,
where $\Delta_D = t^{\sigma}$ and $W$ and $Q_D$ are given below:
\[
W=
\left(
\begin{array}{ccc}
 0 & 1 & 1 \\
 0 & 0 & 1 \\
 0 & 0 & 0 \\
\end{array}
\right)
\quad
Q_D=
\left(
\begin{array}{ccc}
 t^\sigma-1 & 0 & 0 \\
 0 & 0 & 0 \\
 1-t^\sigma & 0 & 0 \\
\end{array}
\right)
\quad
(I-WQ)^{-1}=\left(
\begin{array}{ccc}
 t^{-\sigma} & 0 & 0 \\
 t^{-\sigma}-1 & 1 & 0 \\
 0 & 0 & 1 \\
\end{array}
\right)
\]
The last matrix has determinant $t^{-\sigma}$ and $M^TQ(I-WQ)^{-1}M = 0$, where $M^T=(1,1,1)$. It follows that $Z(D\pp m^{(123)}) = 1 = Z(\alpha_1^0)$. 
The other two cases of this equation are similar.

Next consider $Z(X^-_{12} X^+_{34} \alpha_5 \alpha^{-1}_6\pp m^{(13)(4526)})= Z(\alpha^0_1\alpha^0_2)$. Again we first study the disjoint union
$D = X^-_{12} X^+_{34} \alpha_5 \alpha^{-1}_6$. Then $\Delta_D = 1$ and $Q,W$ are given below:
\begin{equation*}
    \resizebox{0.90\hsize}{!}{
$Q_D=
\left(
\begin{array}{cccccc}
 0 & \frac{t-1}{t} & 0 & 0 & 0 & 0 \\
 0 & -\frac{t-1}{t} & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 1-t & 0 & 0 \\
 0 & 0 & 0 & t-1 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
\end{array}
\right)
\quad
W=
\left(
\begin{array}{cccccc}
 0 & 0 & 1 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 1 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 1 & 0 & 0 & 1 & 1 \\
 0 & 1 & 0 & 0 & 0 & 1 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
\end{array}
\right)
\quad
(I-WQ)^{-1}=
\left(
\begin{array}{cccccc}
 1 & \frac{(t-1)^2}{t} & 0 & 1-t & 0 & 0 \\
 0 & 1 & 0 & 0 & 0 & 0 \\
 0 & 0 & 1 & 0 & 0 & 0 \\
 0 & -\frac{t-1}{t} & 0 & 1 & 0 & 0 \\
 0 & -\frac{t-1}{t} & 0 & 0 & 1 & 0 \\
 0 & 0 & 0 & 0 & 0 & 1 \\
\end{array}
\right)
$}
\end{equation*}
Since 
$M^T = \left(\begin{array}{cccccc} 1 & 0 & 1 & 0 & 0 & 0\\
0 & 1 & 0 & 1 & 1 & 1\\
\end{array}\right)$
 we find $M^TQ(I-WQ)^{-1}M = 0$ and $\det (I-WQ)^{-1}$. Therefore
$Z(D\pp m^{(13)(4526)}) =1= Z(\alpha_1^0\sqcup \alpha_2^0)$. The second equation is proven similarly.

Next consider $Z(X^1_{12} X^1_{34} X^1_{56}\pp m^{(13)(25)(46)}) = Z(X^1_{12} X^1_{34} X^1_{56}\pp m^{(35)(16)(24)})$. 
The disjoint union of the left hand side is
$D_L = X^1_{12} X^1_{34} X^1_{56}$. Then $\Delta_{D_L} = t^{-\frac{3}{2}}$ and $Q_{D_L},W_L$ are given below:

\begin{equation*}
    \resizebox{0.90\hsize}{!}{
$Q_{D_L}=
\left(
\begin{array}{cccccc}
 0 & 1-t & 0 & 0 & 0 & 0 \\
 0 & t-1 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 1-t & 0 & 0 \\
 0 & 0 & 0 & t-1 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 1-t \\
 0 & 0 & 0 & 0 & 0 & t-1 \\
\end{array}
\right)
\quad
W_L=
\left(
\begin{array}{cccccc}
 0 & 0 & 1 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 1 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 1 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
\end{array}
\right)
\quad
(I-W_LQ_{D_L})^{-1}=
\left(
\begin{array}{cccccc}
 1 & 0 & 0 & 1-t & 0 & -(t-1)^2 \\
 0 & 1 & 0 & 0 & 0 & 1-t \\
 0 & 0 & 1 & 0 & 0 & 0 \\
 0 & 0 & 0 & 1 & 0 & t-1 \\
 0 & 0 & 0 & 0 & 1 & 0 \\
 0 & 0 & 0 & 0 & 0 & 1 \\
\end{array}
\right)
$}
\end{equation*}
So $\det(I-W_LQ_{D_{L}}) = 1$ and  
\[
M_L^T = \left(\begin{array}{cccccc} 1 & 0 & 1 & 0 & 0 & 0\\
0 & 1 & 0 & 0 & 1 & 0\\
0 & 0 & 0 & 1 & 0 & 1\\
\end{array}\right)
\quad 
M_L^TQ(I-W_LQ_{D_{L}})^{-1}M_L = 
\left(
\begin{array}{ccc}
 0 & 1-t & 1-t \\
 0 & t-1 & -(t-1) t \\
 0 & 0 & (t-1) (t+1) \\
\end{array}
\right)
\]
Likewise, the disjoint union for the right hand side is $D_R =D_L$ but with different $W_R,M_R$
as shown below
\begin{equation*}
    \resizebox{0.90\hsize}{!}{
$
W_R=
\left(
\begin{array}{cccccc}
 0 & 0 & 0 & 0 & 0 & 1 \\
 0 & 0 & 0 & 1 & 0 & 0 \\
 0 & 0 & 0 & 0 & 1 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
\end{array}
\right)\quad
M_R^T=
\left(
\begin{array}{cccccc}
 0 & 0 & 1 & 0 & 1 & 0 \\
 1 & 0 & 0 & 0 & 0 & 1 \\
 0 & 1 & 0 & 1 & 0 & 0 \\
\end{array}
\right)\quad
(I-W_RQ_{D_R})^{-1}=
\left(
\begin{array}{cccccc}
 0 & 1-t & 1-t & 0 & 0 & 0 \\
 0 & t-1 & -(t-1) t & 0 & 0 & 0 \\
 0 & 0 & (t-1) (t+1) & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
\end{array}
\right)$
}
\end{equation*}
So $\det(I-W_RQ_{D_{R}}) = 1$ and
$M_R^TQ(I-W_RQ_{D_{R}})^{-1}M_R = 
\left(
\begin{array}{ccc}
 0 & 1-t & 1-t \\
 0 & t-1 & -(t-1) t \\
 0 & 0 & (t-1) (t+1) \\
\end{array}
\right)
$

For the final equation $Z(X^1_{12}) = Z(\alpha_1^{1}\alpha_2^{1} X^\pm_{34} \alpha_5^{-1}\alpha_6^{-1}\pp m^{(135)(246)})$
we consider the right-hand side as the stitching of $D=\alpha_1^{1}\alpha_2^{1} X^1_{34} \alpha_5^{-1}\alpha_6^{-1}$,
with $\Delta_{D} = t^{-\frac{1}{2}}$ and 

\begin{equation*}
    \resizebox{0.90\hsize}{!}{
$Q_D=
\left(
\begin{array}{cccccc}
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 1-t & 0 & 0 \\
 0 & 0 & 0 & t-1 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
\end{array}
\right)
\quad
W=
\left(
\begin{array}{cccccc}
 0 & 0 & 1 & 0 & 1 & 0 \\
 0 & 0 & 0 & 1 & 0 & 1 \\
 0 & 0 & 0 & 0 & 1 & 0 \\
 0 & 0 & 0 & 0 & 0 & 1 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
 0 & 0 & 0 & 0 & 0 & 0 \\
\end{array}
\right)
\quad
(I-WQ_{D})^{-1}=
\left(
\begin{array}{cccccc}
 1 & 0 & 0 & 1-t & 0 & 0 \\
 0 & 1 & 0 & t-1 & 0 & 0 \\
 0 & 0 & 1 & 0 & 0 & 0 \\
 0 & 0 & 0 & 1 & 0 & 0 \\
 0 & 0 & 0 & 0 & 1 & 0 \\
 0 & 0 & 0 & 0 & 0 & 1 \\
\end{array}
\right)
$}
\end{equation*}
This shows that with $M^T = \left(\begin{array}{cccccc} 1 & 0 & 1 & 0 & 1 & 0\\
0 & 1 & 0 & 1 & 0 & 1\\
\end{array}\right)
$ we have 
$M^TQ(I-WQ)^{-1}M = \left(\begin{array}{cc} 0 & 1-t\\ 0 & t-1\end{array}\right)$ and $\det(I-WQ) = 1$ as required.

This proves that $\W$ is indeed a snarl algebra. Therefore the corresponding invariant $Z_{\W}$ is independent of the chosen snarl diagram. In the next section we will see that in fact
$Z_{\W}$ is the Alexander polynomial.


\subsection{Connection to the Burau representation and the Alexander polynomial}
For braids we can make the connection with the Burau representation $\beta_t:B_n\to GL(n)$ \cite{BZ03} p.162.
Recall on generators $\sigma_k$ we have $\beta_t(\sigma_{k})=I-tE^k_k+tE^k_{k+1}+E^{k+1}_k-E^{k+1}_{k+1}$. The special case $\beta_1$ factors through the symmetric group and just
gives the permutation matrix induced by the braid. Also recall that the Alexander polynomial may be defined (up to $\pm t^k$) as $\det_1(I-\beta_t(b))$ where the subscript indicates the first row and column of the matrix need to be deleted before taking the determinant.

\begin{theorem}
\begin{enumerate}
\item Suppose $b$ is a braid. Viewed as a snarl we may compute $Z_{\W}(b) = t^{-\frac{w}{2}}\mathbf{e}^{e(\beta_t(b)^T\beta_1(b)-I)f}$, where $w$ is the signed sum of the crossings (writhe).

\item For any knot $K$, viewed as a snarl, $Z_{\W}(K) = \Delta_K^{-1}$ where $\Delta_K$ is the Alexander polynomial of the knot.
\end{enumerate}
\end{theorem}
\begin{proof}
Part 1) Building the braid from a disjoint union $D$ of crossings we find that $\Delta_D = t^{\frac{w}{2}}$. If we label the pieces of $D$ so that labels ending up in the same component are enumerated in order of appearance then $(1-WQ)$ is upper triangular with ones on the diagonal. This proves $\Delta_b=t^{\frac{w}{2}}$. Moving on to $Q_b$ we aim to prove that 
\begin{equation}\beta_t(b) = \beta_1(b)(I+Q_b)^T\end{equation}
Notice that this formula is correct when $b = \sigma_k^{\pm 1}$ is a generator of the braid group or the identity. To prove the general case it suffices to show that the right hand side is multiplicative in $b$. In other words we should show that $\beta_1(b')(I+Q_{b'})^T\beta_1(b)(I+Q_b)^T=\beta_1(b'b)(I+Q_{b'b})^T$. This is equivalent to showing 
\begin{equation}Q_{b'b} = Q_b+Q_b\beta_1(b)^TQ_{b'}\beta_1(b)+\beta_1(b)^TQ_{b'}\beta_1(b) \label{eq.Burau}\end{equation}

This formula follows directly from stitching the ends of the disjoint union $D=b\sqcup b'$ where we number the components of $b$ by $1,2,..n$ as they appear at the bottom and likewise $b'$ by $n+1,..2n$.
The precise stitching rule is determined by the permutation $\beta_1(b)$ induced by $b$: the end $i$ of $b$ is stitched to the beginning of component $n+\beta_1(i)$ of $b'$. Therefore in the stitching formula the matrices $Q_D,W,M$ have the following block shapes:
\[
W= \left(\begin{array}{cc}0 & \beta_1(b)^T\\ 0 & 0\end{array}\right) \quad  Q_D= \left(\begin{array}{cc}Q_b & 0\\ 0 & Q_{b'}\end{array}\right) \quad 
M= \left(\begin{array}{c}I \\ \beta_1(b)\end{array}\right)
\]
The result \eqref{eq.Burau} now follows from computing $Q_{b'b} = M^TQ(1-WQ)^{-1}M$. Note the inverse is easy to compute as it is an upper-triangular matrix.

Part 2) To see that $Q_K=0$ for any knot, consider stitching the knot from a disjoint union $D$ of crossings and $\alpha$'s and notice that $M^TQ_D = 0$, hence $Q_K=0$.
Now view the long knot $K$ as the partial closure of braid $b$ to interpret the inverse of the constant as the Alexander polynomial. By conjugating our braid we may assume
that only the first top and bottom strands are open and $\beta_1(b)$ is the permutation matrix of the cycle $(1,2,3,...,n)$. At first let us ignore the $\alpha$'s and stitch the ends of the braid directly.

We aim to show that the determinant $\det(I-WQ_b)$, arising from stitching the braid as above, equals the determinant $\det_1(I-\beta_t(b))$ defining the Alexander polynomial.
As a first step notice that the bottom row of $WQ_b$ consists of zeroes. Hence $\det(I-WQ_b) = \det_n(I-WQ_b)$, where $\det_k$ is the determinant after deleting the $k$-th row and column. 

The formula for $Q_b$ from part 1) indicates proving $\det_1(I-\beta_t(b)) = \det_{n}(I-W(\beta_t(b)^T \beta_1(b)-I))$ is enough.
To prove this identity we note that the right hand side equals 
\[\det_{n}((I-\beta_1(b)^T)(I-W(\beta_t(b)^T \beta_1(b)-I))) = \det_{n}(I-\beta_1(b)^T-\beta_1(b)^T(\beta_t(b)^T \beta_1(b)-I)) = 
\det_{n}(I-\beta_1(b)^T\beta_t(b)^T \beta_1(b))\]
Conjugation by $\beta_1(b)$ and transposition turns it into the desired $\det_1(I-\beta_t(b))$.

Had we included the $\alpha$'s into the stitching the only thing that changes is we pick up a power $t^{-\frac{n}{2}}$ where $n$ is the number of strands in our braid (we are doing a closure to the right so we only pick up $n$ copies of $\alpha^{-1}$).
\end{proof}

In fact the normalization of the Alexander polynomial we compute appears to be symmetric with respect to $t\mapsto t^{-1}$.



\section{Generalization to the $q$-Weyl algebra}
\label{sec.qWeyl}
In this section we present the knot invariant built on a deformation of the Weyl algebra. The theory is developed in complete analogy to the case of the usual Weyl algebra and the Alexander polynomial described above. We will also indicate how this invariant relates to the knot invariant $Z_0$ from the introduction.

Define the $q$-Weyl\footnote{Often called q-Heisenberg algebra \cite{Lu97}.} algebra $\W_q$ to be the associative algebra with generators $1,E,F$ and relation $FE= qEF+1$.
To stay as close to the Alexander polynomial as possible we restrict ourselves to the special case where our variable $q$ satisfies $q=1+\e$ and $\e^2=0$. This means we consider
our algebra over the base ring $R = \Q(t^{\frac{1}{2}})[\e]/(\e^2)$. Many of the techniques below apply to more general values of $q$ but we leave this for future work.

Alphabetic ordering of the monomials is used precisely as in the case of $\W$ to deal with infinite series. The commutation relation between exponentials is as follows (recall that $\mathbf{e}^{\e x} = 1+\e x$). 
\begin{lemma}
\label{lem.ExpCommq} 
\[
\mathbf{e}^{y F} \mathbf{e}^{x E}= \mathbf{e}^{xE}\mathbf{e}^{xy\mathbf{e}^{\e(\frac{y}{2}+E)(\frac{x}{2}+F)}} \mathbf{e}^{yF} 
\]
And more generally:
\[
\prod_{i=1}^n{\mathbf{e}^{x_iE}\mathbf{e}^{y_iF}} = \mathbf{e}^{(x_1+..+x_n)E}\mathbf{e}^{\sum_{j}x_j(y_1+..+y_{j-1})\mathbf{e}^{\e(\frac{y_1+..y_{j-1}}{2}+E)(\frac{x_j}{2}+x_{j+1}+..x_n+F)}} \mathbf{e}^{(y_1+..+y_n)F} 
\]
\end{lemma}
\begin{proof}
If we define $[k] = \frac{1-q^k}{1-q} = k(1+\e \frac{k-1}{2})$ and $[a]! = a!(1+\e \frac{a(a-1)}{4})$ induction as in Lemma \ref{lem.ExpComm} shows
\[
F^bE^a = \sum_j \frac{[a]![b]!E^{a-j}(1+j\e EF)F^{b-j}}{[a-j]![j]![b-j]!} = \sum_j \frac{a!b!E^{a-j}(1+\e j(\frac{a+b}{2}-1-\frac{3}{4}(j-1)+EF)F^{b-j}}{(a-j)!j!(b-j)!}
\]
The relations between the exponentials are a direct consequence.
\end{proof}

We prefer to work in commutative setting so define $\V_q$ to be the power series ring $R[[e,f]]$ as in the Alexander case. The map $\OO:\V_q\to \W_q$ defined by $\OO(e^af^b) = E^aF^b$ is used to 
pull back the multiplication $m$ from $\W_q$ to $\V_q$. Notice $\OO$ remains a bijection in this more general set up. We claim the following makes $\V_q$ into a snarl algebra. 

\[
Z(X^{\sigma}_{i,j}) =  t^{-\frac{\sigma}{2}}\mathbf{e}^{(1-t^\sigma)(e_i-e_j)f_j+\e P}
\quad Z(\alpha_i^\sigma) = t^{-\frac{\sigma}{2}}\mathbf{e}^{\e \sigma e_if_i}
\]
where 
\[P = \sigma\left(\left(\frac{1-t^\sigma}{4}e_if_j\right)^2-\left(\frac{1+t^\sigma}{4}e_jf_j\right)^2+
		t^\sigma e_if_j(e_jf_i +\frac{1-t}{2}\left(  (\sigma+1)e_jf_j + (\sigma-1)e_if_i \right))\right)  \]

To work with such formulas we need to develop good stitching (multiplication) formulas as we did in the Alexander case. Since the arguments are entirely analogous we summarize the results in the following lemma. 

\begin{lemma}
\label{lem.1coBulkStitch}
For any ordered partition of the labels $\tau = (\tau^1,..,\tau^n)$ and an $n$-element set of new labels $L$, define 
$W = \sum_{\{(i,j)|\exists s: i,j \in \tau^s, i\prec j\}} E^i_j$ and $A = (I-WQ)^{-1}$. Here $\prec$ refers to the ordering of the elements in $\tau^k$. Also set
\[
S(x,y) = \frac{t+1}{t-1}\sum_{m=1}^n \sum_{j\in \tau^m}
\left(\sum_{i\prec j \in \tau^m}y_i\right)x_j
\left(\frac{1}{2}\sum_{k\prec j\in \tau^m}y_k+\tilde{e}_j\right)\left(\frac{x_j}{2}+\sum_{j\prec l \in \tau^m}x_l+\tilde{f}_j\right)
\]
Then 
\[m^\tau_L \left(\frac{\mathbf{e}^{eQf+\e P}}{\Delta }\right) = 
(1+\e P(\p_x,\p_y)+\e S(\p_e,\p_f))\frac{\mathbf{e}^{(eQ+y)A(f+Wx)+ex}}{\Delta\det(I-WQ)}|_{x=y=0;\tilde{e},\tilde{f}\mapsto e,f}\pp r^{\tau}_L
\]
For any constant $\Delta$ and matrix $Q$ whose entries are indexed by $L$.
\end{lemma}
\begin{proof}
The proof is analogous to the $\W$ case. Without loss of generality we consider the case $\tau = (1,2\dots, n)$.
For any $g \in \V_q^{\otimes S}$ we have $m^{\tau}(g) =$ 
\[m^{\tau}(g(\p_x,\p_y)\mathbf{e}^{ex+yf}|_{x=y=0})=g(\p_x,\p_y)m^{\tau}(\mathbf{e}^{ex+yf})|_{x=y=0} =g(\p_x,\p_y) \mathbf{e}^{yWx+xe+yf+\e S(x,y)}|_{x=y=0}\pp r^{\tau}
\]
Here we used the commutation relation from lemma \ref{lem.ExpCommq}.
Now set $g = \Delta^{-1}\mathbf{e}^{eQf+\e P(e,f)}$ and recall $\e^2=0$ so that we find
\[
m^{\tau}(g) =\Delta^{-1}\mathbf{e}^{\p_xQ\p_y+\e P(\p_x,\p_y)} \mathbf{e}^{yWx+xe+yf+\e S(x,y)}|_{x=y=0;\tilde{e},\tilde{f}\mapsto e,f}\pp r^{\tau} = 
\]
\[
(1+\e P(\p_x,\p_y)+\e S(\p_e,\p_f))\Delta^{-1}\mathbf{e}^{\p_xQ\p_y} \mathbf{e}^{yWx+xe+yf}|_{x=y=0;\tilde{e},\tilde{f}\mapsto e,f}\pp r^{\tau}
\]
Applying Lemma \ref{lem.Gauss} gives us 
\[
(1+\e P(\p_x,\p_y))(1+\e S(\p_e,\p_f))\frac{\mathbf{e}^{(eQ+y)(I-WQ)^{-1}(f+Wx)+ex}}{\Delta\det(I-WQ)}|_{x=y=0;\tilde{e},\tilde{f}\mapsto e,f}\pp r^{\tau}
\]
as required.
\end{proof}

The above formula may be simplified slightly since both $P$ and $S$ only depend on two of the four sets of variables. We may rewrite it as 
$m^\tau_L (\frac{\mathbf{e}^{eQf+\e P}}{\Delta }) = \frac{Z_C+\e Z_S+\e Z_P}{\Delta\det(I-WQ)}\pp r^{\tau}_L$ where
\[
Z_C=\mathbf{e}^{eQAf}\quad 
Z_S=S(\p_e,\p_f)\mathbf{e}^{eQAf}|_{\tilde{e},\tilde{f}\mapsto e,f}
\quad Z_P=P(\p_x,\p_y)\mathbf{e}^{e(QAW+I)x+yA(f+Wx)}|_{x=y=0}
\]

Now that we know how to multiply (stitch) exponentials in $\W_q$ (or rather $\V_q$) we are in a position to turn it into a snarl algebra.

\begin{proposition}
\label{prop.verysnarl}
$\W_q$ is a snarl algebra when we set 
\[
Z_{\W_q}(X^{\sigma}_{i,j}) =  t^{-\frac{\sigma}{2}}\mathbf{e}^{(1-t^\sigma)(e_i-e_j)f_j+\e P}
\quad Z_{\W_q}(\alpha_i^\sigma) = t^{-\frac{\sigma}{2}}\mathbf{e}^{\e \sigma e_if_i}
\]
where 
\[P = \sigma\left(\left(\frac{1-t^\sigma}{4}e_if_j\right)^2-\left(\frac{1+t^\sigma}{4}e_jf_j\right)^2+
		t^\sigma e_if_j(e_jf_i +\frac{1-t}{2}\left(  (\sigma+1)e_jf_j + (\sigma-1)e_if_i \right))\right)  \]
\end{proposition}
\begin{proof}
In checking the snarl algebra axioms we only need to pay attention to the $\e$-dependent part as the rest together with the matrices $Q,W$ etc are already computed in Section \ref{subsec.SnarlW} where we proved that 
$\W$ was a snarl algebra with a compatible snarl structure. Given the formulas for stitching in Lemma \ref{lem.1coBulkStitch} checking the axioms is a straightforward if tedious calculation. 
As such routine calculations are best done by computer we refer the reader to the Mathematica implementation in the Appendix for more details.
\end{proof} 

By section \label{sec.snarlalgebra} any snarl algebra gives rise to a knot invariant. Hence we now have a knot invariant $Z_{\W_q}$ coming from the snarl algebra $\W_q$.
In the next section we explore some of its properties. We end this section by showing how the formula for $Z_0$ from the introduction follows from the above definition of $Z_{\W_q}$.

\begin{proposition}
\label{prop.CK}
For any knot $K$, let $C_K$ be the coefficient of $\e$ of the constant part of $Z_{\W_q}$, i.e. when we set $e=f=0$. We have $C_K = Z_0/\Delta^2_K$, where $Z_0$ was defined in the introduction.
\end{proposition}
\begin{proof}
Our set up is that of a knot diagram with $n$ crossings and cuaps numbered in order of appearance as described in the introduction. Denote the disjoint union of these elements as $D$.
The knot $K$ is obtained as $K=D\pp m^{(12...n)}_{1}$. To match the description of $Z_0$ we will follow the instructions for computing the $\e$-part of $Z_{\W_q}$ cutting a few corners along the way.

We start with the matrix $W=\sum_{i<j}E^i_j$. Next, the matrix $Q_D$ is $Q_D= \sum_{X^s_{i,j}}(1-t^s)(E^i_j-E^j_j)$. Set $A = (1-WQ)^{-1}$ and $S$ is as above.
Since we are only interested in the constant term $C_K$ we may ignore all parts that only contribute $e$ or $f$. The formula becomes: 
\[
C_K = P_D(\partial_x,\partial_y)\mathbf{e}^{yAWx}|_{x=y=0}+\bar{S}(\partial_e,\partial_f)\mathbf{e}^{eQAf}|_{e=f=0}
\]
Here $\bar{S}$ is a simplified version of $S$ without any irrelevant terms such as $\tilde{e}_j$ and $\tilde{f}_j$:
\[
\bar{S} = \frac{t+1}{t-1}\sum_{m=1}^n \sum_{j=2}^n\frac{1}{2}\left(\sum_{i,k< j}y_iy_k\right)\left(\frac{x_j^2}{2}+\sum_{j< l}x_jx_l\right)
\]
The first term in $C_K$ is a sum over all crossings and cuaps where each monomial $e_if_je_kf_l$ contributes $(AW)^i_j(AW)^k_l+(AW)^i_l(AW)^k_j$
and $x_iy_j$ contributes $(AW)^i_j$. Likewise each monomial $y_ix_jy_kx_l$ of $\bar{S}$ contributes $(QA)^i_j(QA)^k_l+(QA)^i_l(QA)^k_j$.
As these expressions are nearly homogeneous in $A$ and $Q$ we chose to rescale them: $Q$ is replaced by $\bar{Q} = Q/(t^{\frac{1}{2}}-t^{-\frac{1}{2}})$
and we set $B =A^{-1}= I-(t^{\frac{1}{2}}-t^{-\frac{1}{2}})W\bar{Q}$ as in the introduction. In terms of $B$ we have $A= \mathrm{adj}(B)/\det(B)$. 
The reader should now recognize the expressions for $Z_H$ and $Z_G$ as the contributions of the crossings/cuaps and the polynomial $\bar{S}$ scaled suitably with
$H=\mathrm{adj}(B)W$ and $G=Q\mathrm{adj}(B)$ as described.

We already know that $\Delta_K^{-1} = c^{\frac{1}{2}}\det(B)$ is the normalized Alexander polynomial, where $c$ is the correction that comes from $\Delta_D$. This prompts us to
scale $P_K$ by $\Delta_K^2$ and not just by $\det(B)^2$ as we were about to.
\end{proof}






\section{Properties of $Z_{\W_q}$}
\label{sec.Properties}

In this section we list some (conjectured) properties of the invariant $Z_{\W_q}$ coming from the $q$-Weyl algebra. For simplicity we restrict ourselves to the case for knots.

\begin{theorem}
\label{thm.poly}
If a knot diagram for $K$ is stitched from $n$ fundamental snarls ($X$ and $\alpha$) then $\mathcal{O}(n^{6})$ operations in the ring $\mathbb{Z}[t^{\frac{1}{2}},t^{-\frac{1}{2}}]$ suffice 
to compute $Z_{\W_q}$.
\end{theorem}
\begin{proof}
By proposition \ref{prop.CK} it suffices to consider computing $Z_0$ as described in the introduction. Computing the matrices $G$ and $H$ may be done in $\mathcal{O}(n^{4})$ steps.
Their matrix entries are Laurent polynomials of degree $\mathcal{O}(n)$ with coefficients bounded by $\mathcal{O}(2^n)$. Since $Z_G$ has $\mathcal{O}(n^{4})$ terms and each term
consists of multiplying two entries of $G$, computing $Z_G$ takes $\mathcal{O}(n^{6})$ operations in $\mathbb{Z}[t^{\frac{1}{2}},t^{-\frac{1}{2}}]$. Computing $Z_H$ is similar but faster as it involves less terms. 
\end{proof}

The above bound can be improved on quite a bit. For example a divide and conquer approach as in \cite{BN07} is expected to bring the complexity down to $\mathcal{O}(n^{5})$. 
For general snarl diagrams Lemma \ref{lem.1coBulkStitch} and similar arguments as above predict the number of operations is $\mathcal{O}(n^{8})$.

We remark that the algorithm being polynomial time is a qualitative feature that is independent of the precise notion of complexity of the input used. This is because converting our knot to any other reasonable format can be done in polynomial time (usually linear time). The precise cost of the ring-operations needed is also of little consequence to polynomiality as all such operations can be done in polynomial time.

We end this section with three conjectures on our invariant $Z_{\W_q}(K) = \frac{1}{\Delta_K}\mathbf{e}^{eQ_Kf+\e P_K}$ or rather the normalization 
\[\rho_1(K;t) = -\frac{t\Delta_K^2}{(1-t)^2}\left(P_K - t\frac{\mathrm{d}}{\mathrm{d}t}\log \Delta_K\right)\]

\begin{conjecture}
\label{conj.sym}
The normalized knot invariant $\rho_1(K;t)$ is a Laurent polynomial in $t$ with the following symmetries.
\begin{enumerate}
\item If $-K$ denotes the mirror image of a knot $K$ then we have $\rho_1(-K) = -\rho_1(K)$. 
\item $\rho_1(K)$ is symmetric with respect to $t\mapsto t^{-1}$.
\item $\rho_1(K)$ is invariant under reversing the orientation of $K$.
\end{enumerate}
\end{conjecture}
In particular, $\rho_1$ vanishes on amphicheiral knots as conjectured by Rozansky for his related invariant, see below. The conjecture was checked experimentally for all knots up to 12 crossings.

As an illustration we list the value of $\rho_1$ on the family of alternating torus knots $T(2,\pm(2p+1))$ where $p\in \mathbb{Z}_{> 0}$ is the closure of the braid $\sigma_1^{\mp(2p+1)}$ in $B_2$.
\[
\rho_1 T(2,\pm(2p+1)) = \mp\sum_{k=0}^{p-1} \frac{1}{2}(p-k)(p+k+1)(t^{2k+1}-t^{-2k-1})
\]

Recall that the Alexander polynomial bounds the genus $g$ as follows. Denote by $\mathrm{maxdeg}\ f(t)$ the highest power of $t$ in Laurent polynomial $f$. 
When written in its symmetric form, the Alexander polynomial satisfies $\mathrm{maxdeg}\ \Delta \leq g$. A similar but sometimes more powerful bound is provided by $\rho_1$.  

\begin{conjecture}
\label{conj.genus}
For a knot $K$ with genus $g$ we have $\mathrm{maxdeg}(\rho_1)\leq 2g-1$.
\end{conjecture}
This was checked experimentally for all knots up to 12-crossings and sometimes improves the genus bound given by the Alexander polynomial.
For example the knot $12_{313}$ has genus $2$ \cite{Ki} and trivial Alexander polynomial, but the maximal power in $t$ of $\rho_1$ is $2$. 
We expect this conjecture to follow from a formula for $Z$ in terms of a Seifert surface for the knot.

\begin{conjecture}
\label{conj.Overbay}
$\rho_1(K;t^2) = \frac{t^2}{(1-t^2)^2} P^{(1)}(K;t)$ where $P^{(1)}$ is the invariant of Rozansky defined in \cite{Ro98}.
\end{conjecture}
This conjecture is true for all knots up to nine crossings for which $P^{(1)}$ was computed in \cite{Ov13}. Briefly, Rozansky showed that the colored Jones polynomial
may be expanded in $h = q-1$ as \[J_\alpha(q) = \sum_{n\geq 0}h^n(\sum_{0\leq m\leq n}D_{m,n}(\alpha h)^{2m})\] such that the coefficients have the property
$\sum_{m\geq 0}D_{m,n+2m}(\alpha h)^{2m}=\frac{P^{(n)}(K;q^\alpha)}{\Delta_{K}^{2n+1}(q^{\frac{\alpha}{2}}-q^{-\frac{\alpha}{2}})}$ where $\Delta_K$ is as above and
$P^{(n)}(K;t)$ is a Laurent polynomial. 

The invariant $P^{(1)}$ is also known as the 2-loop invariant and was studied from the Kontsevich integral point of view by Ohtsuki in \cite{Oh07}. His work includes a similar genus bound so that the second conjecture will follow from the last. 

Instead of deriving our invariant as an expansion of the colored Jones polynomial, we in some sense expanded the underlying quantum group itself. 
Our invariant may be interpreted as the universal invariant \cite{Oh01} for some simplified versions of $U_q(sl_2)$ or rather the Drinfeld double \cite{ES98} of the universal enveloping algebra of the Borel subgroup of $sl_2$. In a sequel to this paper we will explain a general theory for solvable approximation of Lie algebras and how it may be used to derive effective knot invariants. In particular we expect polynomial time algorithms for all of Rozansky's invariants $P^{(n)}$. Our approach is also expected to yield formulas for strand reversal and doubling using Hopf-algebraic techniques. This might yield a proof of the first two conjectures. 



\section{Summary and outlook}

After formulating a convenient local notion of knot diagrams called snarl diagrams, we constructed a powerful new knot invariant from the $q$-Weyl algebra.
This algebra has two generators and one relation $EF-qFE=1$. We considered the cases $q =1$ and $q= 1+\e$ with $\e^2=1$. The first yields the Alexander polynomial,
while the latter is new. Both may be computed in polynomial time using normally ordered exponentials. As such our invariant is the strongest known knot invariant computable in polynomial time,
this is illustrated in the table in the appendix: all knots up to ten crossings are distinguished.

In future work we plan to show that our techniques apply to algebras much more general than the Weyl algebras presented here. 
For example we expect that the invariants coming from appropriately truncated Drinfeld doubles of universal enveloping algebras of solvable Lie algebras yields similar invariants. All computable in polynomial time. In this context the $q$-Weyl algebra arose from considering the two-dimensional non-abelian Lie algebra. We also hope to clarify connections to classical invariants such as the genus and
with Rozansky's work on the colored Jones polynomial.


\bibliographystyle{plain}
\bibliography{biblio}

\noindent{\sc Department of Mathematics, University of Toronto, Toronto Ontario M5S 2E4, Canada}\\
\emph{E-mail address:} \texttt{drorbn@math.toronto.edu}\\
\emph{URL:} \texttt{http://www.math.toronto.edu/drorbn}\\

\noindent{ \sc  Mathematisch Instituut, Universiteit Leiden, Niels Bohrweg 1, 2333 CA Leiden, Holland}\\
\emph{E-mail address:} \texttt{r.i.van.der.veen@math.leidenuniv.nl}\\
\emph{URL:} \texttt{http://www.rolandvdv.nl}\\

\newpage

\section*{Appendix: Implementation}

In this appendix we briefly describe an implementation of the knot invariant described in this paper in Mathematica. This serves two purposes. First it allows us to automatically verify the snarl axioms hold as claimed in Proposition \ref{prop.verysnarl}. It also allows us to compile a table of the values of our invariant on the table of prime knots up to 10 crossings.
The program and table are available at \texttt{http://www.rolandvdv.nl/MLA/}

The program encodes our invariant $Z_{\W_q}(K) = \frac{1}{\Delta}\mathbf{e}^{eQf+\e P}$ as $\mathbb{E}[\Delta,Q,P]$, 
where $\Delta$ is a Laurent polynomial in $t$ and $Q$ (really $eQf$) is a quadratic in $e_i,f_i$ with coefficients in $\mathbb{Q}(t^{\frac{1}{2}})$ and $P$ is
a quartic in the same variables. 

To specify the stitching $m^{\tau}$ we use a list of disjoint subsets $\tau^i$ of the label set. For simplicity, after stitching all components in $\tau^i$ are renamed $i$.
To improve clarity, disjoint union is written as juxtaposition.\\

\subsubsection*{The program}

\noindent Introducing the canonical form, disjoint union and some utilities:\\

\includegraphics[width=15cm]{Pictures/Prog1.pdf}\\

\noindent The program for stitching, implementing Lemma \ref{lem.1coBulkStitch}:\\

\includegraphics[width=15cm]{Pictures/Prog2.pdf}\\

\noindent The values of $\Z_{W_q}$ on the fundamental tangles:\\ 

\includegraphics[width=15cm]{Pictures/Prog3.pdf}\\

\newpage
\subsubsection*{Verification of Proposition \ref{prop.verysnarl}}

\noindent The following commands verify the computations required for Proposition \ref{prop.verysnarl} and also Section \ref{subsec.SnarlW}, 
the output is trivial as expected.\\
\includegraphics[width=13cm]{Pictures/Prog4.pdf}\\

\subsubsection*{Sample output}
As a sample calculation we apply our algorithm to a snarl diagram of the figure eight knot. The disjoint union of the fundamental snarls it is built up from is shown in figure \ref{fig.FigEight}.\\
\includegraphics[width=13cm]{Pictures/Prog5.pdf}

\begin{figure}[htp]
\begin{center}
\includegraphics[width=4cm]{Pictures/FigEight.png}
\end{center}
\caption{\textsf{A diagram for the figure eight knot $4_1$ about to be stitched together from a disjoint union of fundamental snarls. Rotation numbers $\rho$ are not listed but should be clear from the picture.}}
\label{fig.FigEight}
\end{figure}



\end{document}



