\section{Introduction}
This paper is devoted to study the notion of stated skein algebra of surfaces introduced by the second author in \cite{Le:TDEC} in order to reinterpret in skein theoretical terms the construction of the quantum trace by Bonahon and Wong \cite{BW} as well as incorporating Muller's version of skein algebra \cite{Muller}. 
Although the definition of the stated skein module applies to $3$-manifolds, this paper is entirely devoted to the case of surfaces: a forthcoming paper will describe how this fits in the framework of an extended topological field theory in dimensions $1,2,3$. 
Indeed the case of surfaces is sufficiently rich in algebraic and geometrical terms to deserve a separate treatment and we will now outline the results of this paper. 
 
 
 \subsection{Skein algebras} Let $\mathcal R= \mathbb Z[q^{\pm 1/2}]$ be the ring of Laurent polynomials in a variable $q^{1/2}$.
 Suppose $\mathfrak S$ is the result of removing a finite number of points, called {\em punctures}, from a compact oriented 2-dimensional manifold with possibly non-empty boundary. 
 The ordinary skein algebra $\mathring {\cS}(\mathfrak S)$, introduced by Przytycki~\cite{Prz} and Turaev~\cite{Turaev}, is defined to be the $\mathcal R$-module generated by isotopy classes of framed unoriented links in $\mathfrak S \times (0,1)$  modulo the Kauffman relations \cite{Kauffman}
\begin{align}
\label{eq.skein0}   \raisebox{-8pt}{\incl{.8 cm}{cross}}  \ &= \ q  \raisebox{-8pt}{\incl{.8 cm}{resoP}}  + q^{-1}   \raisebox{-8pt}{\incl{.8 cm}{resoN}} \\
\label{eq.loop0}    \raisebox{-8pt}{\incl{.8 cm}{trivloop}} \  &=\  (-q^2 -q^{-2})\raisebox{-8pt}{\incl{.8 cm}{empty}}.
 \end{align}
The product of two links $\alpha_1$ and $\alpha_2$ is the result of stacking $\alpha_1$ above $\alpha_2$.  The skein algebra  has played an important role in low-dimensional topology and quantum topology and it serves as a bridge between classical topology and quantum topology. The skein module has connections to the $\mathrm{SL}_2(\mathbb C)$-character variety \cite{Bullock,PS1}, the quantum group of $\mathrm{SL}_2(\mathbb C)$, the Witten-Reshetikhin-Turaev topological quantum field theory \cite{BHMV}, the quantum Teichm\"uller spaces \cite{CF,Kashaev,BW,Le:QT}, and the quantum cluster algebra theory \cite{Muller}.
 
 In the definition of the skein algebra $\mathring {\cS}(\mathfrak S)$ the boundary $\partial \fS$ does not play any role, and we have $\mathring {\cS}(\mathfrak S) = \mathring {\cS}(\mathring {\mathfrak S})$, where $\mathring {\mathfrak S}$ is the interior of $\mathfrak S$. In an attempt to introduce excision into the study of the skein algebra, the second author  \cite{Le:TDEC} introduce the notion of {\em stated skein algebra}, denoted in this paper by  $\cS(\fS)$, whose definition involves tangles properly embedded into $\mathfrak S \times (0,1)$. These tangles can have end-points only  on {\em boundary edges} of $\mathfrak S$, which are open intervals connected components of the boundary.
 For details see Section \ref{sec.def}.
 
 

A key result about stated skein algebras is that they behave well under cutting along an ideal arc. Here an {\em ideal arc} is a proper embedding $c: (0,1) \hookrightarrow \mathfrak S$ (so that its end points are the punctures). 
Cutting $\mathfrak S$ along $c$ one gets a 2-manifold $\mathfrak S'$ whose boundary contains two open intervals $a$ and $b$ so that one can recover $\mathfrak S$ from $\mathfrak S'$ by gluing $a$ and $b$ together, see Figure \ref{fig:cut}.

\FIGc{cut}{Cutting $\mathfrak S$ along ideal arc $c$ to get $\mathfrak S'$, which might be disconnected}{3cm}
Then \cite[Theorem 1]{Le:TDEC} (see 
the splitting Theorem \ref{thm.1a} below)  says that  there is a natural injection of algebras 
 \begin{equation}   \theta_c: \mathscr S(\mathfrak S)\hookrightarrow \mathscr S(\mathfrak S'),  \label{eq.rho0}
 \end{equation} 
given by a simple state sum. The extension from $\mathring {\cS}(\mathfrak S)$ to $\cS(\fS)$ is unique (or canonical) if one wants the splitting theorem and a consistency requirement to hold.
 
 \def\cS(\cB){\mathscr S(\mathcal B)}
 \defU_{q^2}(\mathfrak{sl}_2){U_{q^2}(\mathfrak{sl}_2)}
 The paper is a systematic study of the stated skein algebra $\cS(\fS)$. Let us now list the main results of the paper.
 
 \subsection{Bigon and quantum $\mathrm{SL}_2(\mathbb C)$ coordinate ring} The quantized enveloping algebra $U_{q^2}(\mathfrak{sl}_2)$ and its Hopf dual ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, known as the quantum coordinate ring of the Lie group $\mathrm{SL}_2(\mathbb C)$, play an important role in many branches of mathematics, see \cite{Kassel,MajidFoundation}. These algebras are usually defined by rather complicated presentations which are hard to comprehend.
 
A first consequence of the splitting theorem is that the quantum coordinate ring ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ can be described by simple geometric terms, namely, it is naturally isomorphic to the stated skein algebra of the bigon $\mathcal B$, which is the standard disk without two points on its boundary, see Figure \ref{fig:bigon10}.

\FIGc{bigon10}{Left: bigon. Right: splitting the bigon along the dashed ideal arc}{3cm}
By splitting the bigon along an ideal arc $c$ (which is the dashed arc in Figure \ref{fig:bigon10}) we get a homomorphism $\Delta:=\theta_c$,
$$ \Delta: \cS(\cB) \to \cS(\cB)\otimes \cS(\cB),$$
which turns out to be compatible with the product and makes $\cS(\cB)$ a bialgebra. Moreover, we will define using topological terms the counit, antipode and co-$R$-matrix which turns $\cS(\cB)$ into a \red{``dual quasitriangular'' (see  \cite{MajidFoundation} Section 2.2) a.k.a. ``cobraided'' (see \cite{Kassel}, Section VIII.5)} Hopf algebra, and will prove the following.

\begin{thm}[Theorems \ref{teo:SL2} and \ref{teo:cobraid}] The \red{dual quasitriangular} Hopf algebra $\cS(\cB)$ is isomorphic in a natural way to the quantum coordinate ring ${\mathcal O}_{q^2}(\mathrm{SL}(2))$.
\label{thm.1}
\end{thm}


This result allows to use skein theoretical techniques to study ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. We will show that many complicated algebraic objects and facts  concerning the quantum groups ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ and $U_{q^2}(\mathfrak{sl}_2)$ have  simple transparent picture interpretations. For example, the above mentioned co-$R$-matrix has a very simple geometric picture description, see Theorem~\ref{teo:cobraid}. 
Another example is given by the reconstruction of Kashiwara's crystal basis, see Proposition~\ref{prop:kashiwara}. One can even ``import'' in ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ natural skein theoretical objects: in Subsection \ref{sub:joneswenzl} we define and provide some properties of the Jones-Wenzl idempotents in ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. 

\subsection{Lift of the Reshetikhin-Turaev invariant}
Suppose $T$ is a tangle diagram in the bigon whose boundary $\partial T$ is in $\partial \mathcal B$ and the boundary points are labeled by signs $\pm$. The Reshetikhin-Turaev  operator invariant theory \cite{RT} assigns to $T$ a scalar $Z(T)\in \mathbb Q(q^{1/2})$, see Section \ref{sec.WT}. On the other hand, such a labeled tangle $T$  defines an element in our skein algebra $\cS(\cB)$. We have the following result which shows that our ``invariant'', which is $T$ considered as an element of $\mathscr S(\mathcal B)$, is a lift of the Reshetikhin-Turaev invariant.
\begin{thm} [Theorem \ref{teo:cat}] One has $\epsilon(T) = Z(T)$, where $\epsilon: \cS(\cB)\to \mathbb Q[q^{\pm 1/2}]$ is the counit.
\end{thm}  
It would be interesting to understand this lift of the Reshetikhin-Turaev invariant in terms of categorification.

\subsection{Skein algebras as comodule over ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. Hochshild cohomology} One important consequence of the identification of the bigon algebra with ${\mathcal O}_{q^2}(\mathrm{SL}(2))$  is that for every boundary edge $e$ of a surface $\mathfrak S$, the skein algebra $\cS(\fS)$ has  a  right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule structure
$$ \Delta_e : \cS(\fS) \to \cS(\fS) \otimes \cS(\cB).$$
This map $\Delta_e$ is the splitting homomorphism \eqref{eq.rho0} applied to the an ideal arc parallel to $e$ which cuts off an ideal bigon from $\mathfrak S$ whose right edge is $e$, see Figure \ref{fig:copro}. 
Similarly identifying the left edge of $\mathcal B$ to $e$  we get a left ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule structure on $\cS(\fS)$.

\FIGc{copro}{Geometric definition of the coaction: splitting the bigon along the dashed ideal arc}{3cm}

Using the comodule structure one can refine the splitting theorem by identifying the image of the splitting homomorphism, as follows. Let us cut $\mathfrak S$ along an ideal arc $c$ to get $\mathfrak S'$ as in Figure \ref{fig:cut}. Then $\mathscr S(\mathfrak S')$ has a right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-module structure coming from edge $a$ and a left ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-module structure coming from edge $b$. Thus $\mathscr S(\mathfrak S')$ is a ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-bicomodule, and hence there is defined the Hochshild cohomology $HH^0(\mathscr S(\mathfrak S'))$, for details see Section \ref{sec.comodule}.

\begin{thm}[Theorem \ref{teo:cotensor}] \label{thm.Hoch}
Under the splitting homomorphism the skein algebra $\cS(\fS)$ embeds isomorphically into the Hochshild cohomology $HH^0(\mathscr S(\mathfrak S'))$. In particular, when $c$ cuts $\mathfrak S$ into two surfaces $\mathfrak S_1$ and $\mathfrak S_2$, the splitting homomorphism  maps $\cS(\fS)$ isomorphically onto the cotensor product of $\mathscr S(\mathfrak S_1)$ and $\mathscr S(\mathfrak S_2)$.   
\end{thm}

  \subsection{Skein algebra $\cS(\fS)$ as module over $U_{q^2}(\mathfrak{sl}_2)$} 
Since the Hopf algebra $U_{q^2}(\mathfrak{sl}_2)$ is the Hopf dual of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, then after tensoring with ${\BQ(q^{1/2})}$ each right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule is automatically a left $U_{q^2}(\mathfrak{sl}_2)$-module. Thus each boundary edge $e$ of $\mathfrak S$ gives $\cS(\fS)$ a left $U_{q^2}(\mathfrak{sl}_2)$-module structure. Note that finite-dimensional $U_{q^2}(\mathfrak{sl}_2)$-modules are well-understood as they are quantum deformations of   modules over the Lie algebra $\mathfrak{sl}_2(\mathbb C)$.

\begin{thm} [Part of Theorem \ref{teo:module}] Over the field $\mathbb Q(q^{1/2})$, \red{for every boundary edge} the $U_{q^2}(\mathfrak{sl}_2)$-module $\cS(\fS)$ is integrable, i.e. it is the direct sum of finite-dimensional irreducible $U_{q^2}(\mathfrak{sl}_2)$-modules.
\end{thm}
Actually Theorem \ref{teo:module} is much stronger: it provides an explicit decomposition and contains much more information about the decompositions as it deals also with the decomposition over Lusztig's integral version of $U_{q^2}(\mathfrak{sl}_2)$.

Using this result we also prove a dual version of Theorem \ref{thm.Hoch} which, with the notation of the theorem, shows that $HH_0({\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S'))={\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)$ (see Theorem \ref{r.Hoch2}). 

\subsection{Braided tensor product} The co-$R$-matrix makes the category of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-co\-mo\-du\-les a braided category  and  in general given two algebras in that category (which are then ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-co\-mo\-dule algebras)  their tensor product can be endowed with the structure of an algebra  by using appropriately the braiding: this is  the {\em braided tensor product} of the algebras, see \cite{MajidFoundation}. 
 \red{In Section \ref{sec:braidedtensor}, we generalise this notion to that of ``self-braided tensor product'' which applies to a comodule algebra having two commuting comodule structures.

Suppose $\underline{\mathfrak S}$ is obtained by identifying two edges of a (possibly disconnected) surface $\mathfrak S$ with two distinct edges of an ideal triangle as in Figure \ref{fig:brtens-new}. 
\FIGc{brtens-new}{Gluing $\mathfrak S$ to two distinct edges of an ideal triangle to get $\underline{\mathfrak S}$.} {3cm}
Then $\mathscr S(\mathfrak S)$  has two natural commuting structures of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra, and we have the following:
\begin{thm}[Theorem \ref{teo:braidedtensor}] As a ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra $\cS(\underline{\mathfrak S})$ is canonically isomorphic to the self-braided tensor product of $\mathscr S(\mathfrak S)$. In particular, if $\mathfrak S=\mathfrak S'\sqcup \mathfrak S''$ and the two edges belong to $\mathfrak S'$ and $\mathfrak S''$ respectively then $\cS(\underline{\mathfrak S})$ is canonically isomorphic to the braided tensor product of $\mathscr S(\mathfrak S_1)$ and  $\mathscr S(\mathfrak S_2)$.
\end{thm}
}


Through this theorem we easily compute the skein algebra of all ``polygons'', ``punctured bigons'', and ``punctured monogons'' in Subsection \ref{sub:monogons}. It is remarkable that the skein algebras of the latter turn out to be bialgebra objects in the category of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodules and that their structure morphism have natural topological interpretation. In particular the punctured monogon yields the ``transmutation'' of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. 

\subsection{Modular operad} 

The splitting homomorphism allows to put the theory of stated skein algebras of surfaces in the framework  of operad theory. We define  the notion of geometric non-symmetric modular operad in Section \ref{sub:cooperad} and prove the following.

\begin{thm}[Precise statement given by  Theorem \ref{teo:NSmodoperad}] The stated skein algebra of surfaces gives rise to a non-symmetric modular operad in a category of bimodules over $U_{q^2}(\mathfrak{sl}_2)$.
\end{thm}


To be more specific while leaving the details for Section \ref{sub:cooperad}, let us recall that, according to Markl (\cite{Mar}) a ``Non-symmetric modular operad in a monoidal category $Cat$'' is a monoidal functor $NSO:\mathsf{MultiCyc}\to Cat$, where $\mathsf{MultiCyc}$ is a suitable category of ``multicyclic sets''.  
In Section  \ref{sub:cooperad} we re-cast Markl's definition, by defining a category $\mathsf{TopMultiCyc}$ whose objects are punctured surfaces $\mathfrak S$ and whose morphisms are finite sets of ideal arcs (describing a way of cutting the surfaces). From this point of view, we then show in Theorem \ref{teo:NSmodoperad} that stated skein algebras provide a symmetric monoidal functor from this category into a suitable category of modules and bimodules over copies of $U_{q^2}(\mathfrak{sl}_2)$, thus providing a topological example of a NS modular operad. 



\def\overline {\cS}(\fS){\overline {\mathscr S}(\mathfrak S)}
\def{\mathcal I}^{\mathrm{bad}}{{\mathcal I}^{\mathrm{bad}}}
\subsection{Reduced stated skein algebra, quantum torus, and quantum trace map} The stated skein algebra $\cS(\fS)$ has a quotient $\overline {\cS}(\fS)= \cS(\fS)/{\mathcal I}^{\mathrm{bad}}$, called the {\em reduced stated skein algebra}, whose algebraic structure is much simpler as it can be embedded into the so called quantum tori. Here ${\mathcal I}^{\mathrm{bad}}$ is the ideal generated by elements, called bad arcs, described in Figure \ref{fig:badarc0} and is explained in Section \ref{sec:reduced}.

\FIGc{badarc0}{A bad arc.} {2cm}


We will show  that the ordinary skein algebra $\mathring {\cS}(\mathfrak S)$ still embeds into $\overline {\cS}(\fS)$ and hence we can use $\overline {\cS}(\fS)$ to study $\mathring {\cS}(\mathfrak S)$. Most importantly, the splitting theorem still holds for $\overline {\cS}(\fS)$.
 
\begin{thm}[Theorem  \ref{teo:rsplit}] If $\mathfrak S'$ is the result of cutting $\mathfrak S$ along an ideal arc $c$, then the splitting homomorphism $\theta_c$ descends to an algebra embedding
 $$ \bar \theta_c: \overline {\cS}(\fS) \hookrightarrow \overline {\mathscr S}(\mathfrak S').$$
\end{thm} 
The non-trivial fact here is that $\bar\theta _c$ is injective.
  
 Except for a few simple surfaces, we can always cut $\mathfrak S$ along ideal arcs so that the result is a collection of ideal triangles $T_1, \dots, T_k$. It follows that there is an embedding
  \begin{equation} 
 \Theta: \overline {\cS}(\fS) \hookrightarrow \bigotimes_{i=1}^k \overline {\mathscr S} (T_i). \label{eq.rhoall} 
  \end{equation} 
 
The important thing with the reduced version is that for an ideal triangle $T$, unlike the full fledged $\mathscr S(T)$, the reduced stated skein algebra $\overline {\mathscr S}(T)$ is a {\em quantum torus} in three variables:

\begin{thm}[Theorem \ref{teo:redtri}] \label{thm.tri}
The reduced stated skein algebra $\overline {\mathscr S}(T)$ of an ideal triangle has presentation
$$ \overline {\mathscr S}(T) = \mathcal R\langle \alpha^{\pm 1}, \beta ^{\pm 1}, \gamma^{\pm 1}\rangle  / (\beta\alpha = q\alpha\beta, \gamma\beta = q \beta\gamma, \alpha\gamma=q \gamma\alpha).$$
\end{thm}
Moreover, the reduced stated skein algebra of the bigon is naturally isomorphic to the algebra $\mathcal R[x^{\pm 1}]$ of Laurent polynomial in one variable, see Proposition \ref{r.rbigon}.

Consequently, the map $\Theta$ of \eqref{eq.rhoall} embeds the reduced stated skein algebra $\overline {\cS}(\fS)$ into a quantum torus in $3k$ variables.
Geometrically the  variables $\alpha,\beta,\gamma$ in Theorem \ref{thm.tri} come from the corner arcs  of the ideal triangle. There is a similar quantum torus $\mathbb T'(T)$ in 3 variables corresponding to the edges of $T$, and a simple change of variables gives us an embedding $\overline {\mathscr S}(T) \hookrightarrow \mathbb T'(T)$. Combining with $\Theta$ of \eqref{eq.rhoall} we get an algebra embedding 
$$
\tr_q: \overline {\cS}(\fS) \overset {\Theta}\hookrightarrow \bigotimes_{i=1}^k \overline{\mathscr S}(T_i)  \hookrightarrow \bigotimes_{i=1}^k \mathbb T(T_i).
$$

There is a subalgebra $\mathcal Y$ of $\bigotimes_{i=1}^k \mathbb T(T_i)$, known as the Chekhov-Fock algebra associated to the triangulation. 
\red{ The famous quantum trace map of Bonahon and Wong \cite{BW} is an algebra homomorphism $\widehat \tr_q: \widehat\mathscr S(\mathfrak S) \to \mathcal Y$, where $\widehat \mathscr S(\mathfrak S)$ is a coarser version of the stated skein algebra which surjects onto 
 $\mathscr S(\mathfrak S)$, see Section \ref{sub:statedskeinalgebra}. 

\begin{thm} [See Theorem \ref{thm.qtrace}] The image of $\tr_q$ is in $\mathcal Y$. Thus $\tr_q$ restricts to an algebra embedding  $\tr_q: \overline {\cS}(\fS) \hookrightarrow \mathcal Y$, and   the quantum trace map of Bonahon and Wong is the composition $\widehat \mathscr S(\mathfrak S)\twoheadrightarrow  \overline {\cS}(\fS)\overset {\tr_q} {\hookrightarrow} \mathcal Y.$
\end{thm}
}


The existence of the quantum trace map (for $\mathring {\cS}(\mathfrak S)$) was conjectured by Chekhov and Fock \cite{CF2}, and was established  by Bonahon and Wong \cite{BW}. It is called the quantum trace map since when $q=1$ it becomes a formula expressing the trace of a curve under the holonomy representation of the hyperbolic metric in terms of the shear coordinates of the Teichm\"uller space.
The second author \cite{Le:QT} gave another proof of the existence of the quantum trace map based on the Muller skein algebra, which is actually a subspace of the state skein algebra $\cS(\fS)$. The above approach using the reduced stated  skein algebra  offers another proof, and also determines the kernel of the original quantum trace map $\widehat \tr_q$.



\subsection{Classical limit}
The last section explores the natural question of ``what is the classical limit of $\cS(\fS)$?'' In the case of the standard skein algebra $\mathring {\cS}(\mathfrak S)$ it is known \cite{Bullock,PS1} (see also \cite{CM}) that when the quantum parameter $q$ is $-1$ and the ground ring is $\mathbb C$ then $\mathring {\cS}(\mathfrak S)$ is isomorphic as an algebra to the coordinate ring the $\mathrm{SL}_2(\mathbb{C})$-character variety of $\mathfrak S$ and that in general the algebras at $q$ and $-q$ are isomorphic via the choice of a spin structure on $\mathfrak S$ (\cite{Barrett}). Note that our stated skein algebra is not commutative when $q=-1$ though it is commutative when $q=1$. 

We introduce the variety $tw(\mathfrak S)$ of  ``twisted  $\mathrm{SL}_2(\mathbb{C})$-bundles'' over $\mathfrak S$, which, roughly speaking, are flat $\mathrm{SL}_2(\mathbb{C})$-bundles over the unit tangent bundle $U\mathfrak S$  of $\mathfrak S$ with holonomy $-Id$ around the fibers of $\pi:U\mathfrak S\to \mathfrak S$ and \red{are equipped} with trivializations along the edges of $\mathfrak S$, but which we reformulate in terms of groupoid representations. To deal with the non-oriented nature of the  arcs of the stated skein algebra we have to use a trick smoothing the arcs at their end-points so that one can compose arcs. 
\begin{thm}[Theorem \ref{teo:classicaliso}] \label{thm.classic}
 When $q=1$ and the ground ring is $\mathbb C$ the stated skein algebra $\cS(\fS)$ is naturally isomorphic to the coordinate ring of $tw(\mathfrak S)$.
\end{thm}

 In classical terms, the splitting theorem becomes an instance of a van-Kampen like theorem for groupoid representations.  
 

Theorem \ref{teo:classicaliso} highlights a relation between $\cS(\fS)$ and the coordinate ring of the character variety of $\mathfrak S$. The study of quantizations of such rings has been performed with different techniques (based on Hopf algebras and lattice gauge theory) by  Alekseev-Grosse-Schomerus (\cite{AGS}), Buffenoir-Roche \cite{BR}, Fock-Rosly (\cite{FR}) and, later, via skein theoretical approaches by Bullock-Frohman-Kania-Bartoszynska (\cite{BFK}). 
The relation of our work with these previous ones is still to be clarified, although it seems that one of the main differences between our approach and some of the above cited ones, is that we allow for ``observables with boundary'' and, as explained in the preceding paragraph, this endows the algebras we work with rich algebraic structures which in particular make computations much easier. 


\subsection{Related results}

While the authors were completing the present work,  D. Ben-Zvi, A. Brochier and D. Jordan \cite{BBJ} constructed a theory of quantum character variety for general Hopf algebras, based on completely  different techniques. Part of the results of this paper could probably be recasted in that theory, though we don't know the precise relation between the two theories. The substantial difference of the techniques used makes these works complementary. K. Habiro informed us that his  ``quantum fundamental group theory'' also 
gives an alternative approach to the theory of quantum character variety.

When the authors presented their works at conferences, Korinman informed us that he in joint work 
A. Quesney obtained results similar to Theorem \ref{thm.Hoch} and Theorem \ref{thm.classic}, see their recent preprint \cite{KQ}.



{\bf Acknowledgements.} The authors would like to thank F. Bonahon, R. Kashaev, A. Sikora,  V. Turaev, and D. Thurston for helpful discussions.  
Both authors were partially supported by the CIMI (Centre International de Math\'ematiques et d'Informatique) Excellence program during the Thematic Semester on Invariants in low-dimensional geometry and topology held in spring 2017. The second author is partially support by an NSF grant.

The authors presented the results of this paper in the form of talks or mini-courses at many conferences, including  ``Thematic School on Quantum Topology and Geometry'' (University of Toulouse, May 2017), ``Algebraic Structures in Topology and Geometry'' (Riederalp, Switzerland, January 2018), ``TQFTs and categorification'' (Cargese, March 2018), ``Volume Conjecture in Tokyo'' (University of Tokyo, August 2018), ``Categorification and beyond'' (Vienna, January 2019),  Topology mini-courses (university of Geneva, May 2019), ``New developments in quantum topology'' (Berkeley June 2019), ``Expansions, Lie algebras and invariants'' (Montreal July 2019) and would like to thank the organizers for the opportunities to present their work.



\section{Stated skein algebras} \label{sec.def}
We will present the basics of the theory of stated skein algebras: definitions, bases of skein algebras, the splitting homomorphism,  filtrations and gradings. New results involve Proposition \ref{r.inversion} describing the inversion homomorphism and Proposition \ref{r.grbinom} giving the exact value of the splitting homomorphism in the associated graded algebra.
\subsection{Notations}
Throughout the paper let
$\mathbb Z$ be the set of integers, $\mathbb N$ be the set of non-negative integers, $\mathbb C$ be  the set of complex numbers.
The ground ring $\mathcal R$  is a commutative ring with unit 1,  containing a distinguished invertible element $q^{1/2}$.
 For a finite set $X$ we denote by $|X|$ the number of elements of $X$.
 
 \def\overset \bullet ={\overset \bullet =}
 We will write $x \overset \bullet = y$ if there is $k\in \mathbb Z$ such that $x = q^{k} y$.

\def\mathfrak T{\mathfrak T}
\subsection{Punctured bordered surface}\label{sub:puncturedsurfaces} By a {\em punctured bordered surface} $\mathfrak S$ we mean a  surface of the form $\mathfrak S = \overline{\fS} \setminus \mathcal P$, where $\overline{\fS}$ is 
 a compact oriented surface  with
(possibly empty) boundary $\partial \bfS$, and $\mathcal P$ is a finite non empty set such that every connected component of the boundary $\partial \bfS$ has at least one point in $\mathcal P$.  We don't require $\mathfrak S $ be to connected. It is easy to see that $\overline{\fS}$ is uniquely determined by $\mathfrak S$. Throughout this section we fix a  punctured bordered surface $\mathfrak S$.

An {\em ideal arc} on $\mathfrak S$ is an immersion $a: [0,1] \to \overline{\fS}$ such that $a(0),a(1)\in \mathcal P$ and the restriction of $a$ onto $(0,1)$ is an embedding into $\mathfrak S$. 
Isotopies of ideal arcs are considered in the class of ideal arcs. 


A connected component of $\partial \fS$ is called a {\em boundary edge} of $\mathfrak S$ (or simply an edge), which is an ideal arc.
 





\begin{remark} The fact that each connected component of $\partial \mathfrak S$ is an open interval is not a serious restriction as for the purpose of the constructions of this paper a point-less boundary component is treated as a puncture; so that in the end the only excluded surfaces are closed ones without punctures.
\end{remark}


\subsection{Ordinary skein algebra}  Let $M=\mathfrak S \times (0,1)$. For a point $(z,t)\in \mathfrak S \times (0,1)$ its {\em height} is $t$. A vector at
 $(z,t)$ is called {\em vertical} if it is a positive vector of $z \times (0,1)$. {\em A framing} of a 
 1-dimensional submanifold $\alpha$ of $M=\mathfrak S \times (0,1)$ is 
 a continuous choice of a vector transverse to $\alpha$ at each point of $\alpha$.


 A {\em framed link} in $\mathfrak S\times (0,1)$ is a closed 1-dimensional unoriented submanifold $\alpha$  equipped with a framing.  The empty set, by convention, is considered a framed link. 
 
 A link diagram on $\mathfrak S$ determines an isotopy class of framed links in $\mathfrak S \times (0,1)$, where the framing is vertical everywhere. Every isotopy class of framed links in $\mathfrak S \times (0,1)$ is presented by a  link diagram.



The {\em skein module} $\mathring {\cS}(\mathfrak S)$, first introduced  by Przytycki \cite{Prz} and Turaev \cite{Turaev0}, is defined to be the $\mathcal R$-module generated by the isotopy classes of framed unoriented links in $\mathfrak S \times (0,1)$ modulo the Kauffman relations
\begin{align}
\label{eq.skein01}   \raisebox{-8pt}{\incl{.8 cm}{cross}}  \ &= \ q  \raisebox{-8pt}{\incl{.8 cm}{resoP}}  + q^{-1}   \raisebox{-8pt}{\incl{.8 cm}{resoN}} \\
\label{eq.loop01}    \raisebox{-8pt}{\incl{.8 cm}{trivloop}} \  &=\  (-q^2 -q^{-2})\raisebox{-8pt}{\incl{.8 cm}{empty}}
 \end{align}
We use the following convention about pictures in these identities, as well as in other identities in this paper. Each  shaded part is a  part of $\mathfrak S$, with a link diagram on it.
Relation \eqref{eq.skein01} says that if  link diagrams $D_1, D_2$, and $ D_3$ are identical everywhere except for a small disk in which $D_1,D_2, D_3$ are like in respectively the first, the second, and the third shaded areas, then $[D_1] = q[D_2] + q^{-1} [D_3]$ in the skein module $\mathring {\cS}(\mathfrak S)$. Here $[D_i]$ is the isotopy class of links determined by $D_i$. The other relation is interpreted similarly.

For two framed links $\alpha_1$ and $\alpha_2$ the product $\alpha_1 \alpha_2$  is defined as the result of stacking $\alpha_1$ above $\alpha_2$. That is, first isotope $\alpha_1$ and $\alpha_2$ so that $\alpha_1 \subset \mathfrak S \times (1/2,1)$ and $\alpha_2 \subset \mathfrak S \times (0, 1/2)$. Then $\alpha_1 \alpha_2= \alpha_1 \cup \alpha_2$.
 It is easy to see that this gives rise to a well defined product and hence an $\mathcal R$-algebra structure on $\mathring {\cS}(\mathfrak S)$.
 


\subsection{Tangles and order}\label{sub:tangle} In order to include the boundary of $\mathfrak S$ into the picture, we will replace framed links by more general objects called $\partial M$-tangles. Recall that $M= \mathfrak S \times (0,1)$ and its boundary is $\partial M = \partial \fS \times (0,1)$.

In this paper, a {\em $\partial M$-tangle} is
an unoriented,
 framed, compact,  properly embedded 1-dimensional submanifold $\alpha \subset M=\mathfrak S \times (0,1)$ such that:
 \begin{itemize}
 \item  at every point of $\partial \alpha=\alpha \cap \partial M$ the framing is {\em vertical}, and
\item  for any boundary edge $b$, the points of $\partial_b(\alpha):=\partial \alpha \cap (b \times (0,1))$  have distinct~heights.
 \end{itemize}


For a $\partial M$-tangle $\alpha$ define a partial order on $\partial \alpha $ by: $x>y$ if there is a boundary edge $b$ such that $x, y \in b \times (0,1)$ and
 $x$ has greater height. If $x>y$ and there is no $z$ such that $x>z>y$, then we say
$x$ and $y$ are {\em consecutive}. 

{\em Isotopies of  $\partial M$-tangles} are considered  in the class of $\partial M$-tangles. \red{It should be noted that isotopies of $\partial M$-tangles preserve the height order.}
The empty set, by convention, is a $\partial \fS$-tangle which is isotopic only to itself. 


As usual, $\partial M$-tangles are depicted by their diagrams on $\mathfrak S$, as follows.
Every $\partial \fS$-tangle is isotopic to one with vertical framing.
Suppose a vertically framed $\partial M$-tangle $\alpha$ is in general position with respect to
the standard projection $\pi: \mathfrak S \times (0,1) \to \mathfrak S$, i.e.  the restriction $\pi |_{\alpha}:\alpha \to \mathfrak S$ is an immersion with transverse  double points as the only possible singularities and there are no double points on the boundary of $\mathfrak S$. 
Then $D=\pi (\alpha)$, together with 
\begin{itemize}
\item  the over/underpassing information at every double point, and 
\item  the linear order on $\pi(\alpha) \cap b$ for each boundary edge $b$ induced from the height order
\end{itemize} 
is called a {\em  $\partial M$-tangle  diagram}, or simply a tangle diagram on $\mathfrak S$.
{\em Isotopies} of  $\partial M$-tangle diagrams are  ambient isotopies in $\mathfrak S$.

Clearly the $\partial M$-tangle diagram of a $\partial M$-tangle $\alpha$ determines the isotopy class of $\alpha$.
 When there is no confusion, we identify a $\partial M$-tangle diagram with its isotopy class of $\partial M$-tangles.

\def{\mathfrak o}{{\mathfrak o}}
 Let ${\mathfrak o}$ be an {\em orientation} of $\partial \fS$,   which on a boundary edge may or may not be equal to the orientation inherited from $\mathfrak S$. A $\partial M$-tangle diagram $D$ is {\em ${\mathfrak o}$-ordered} if for each boundary edge $b$ the order of $\partial D$ on $b$ is  increasing when one goes along $b$ in  the direction of ${\mathfrak o}$. It is clear that every $\partial M$-tangle, after an isotopy, can be presented by an  ${\mathfrak o}$-ordered $\partial M$-tangle diagram.
 If ${\mathfrak o}$ is  the orientation coming from $\mathfrak S$, the ${\mathfrak o}$-order is called the {\em positive order}.



\def{\mathfrak o}{{\mathfrak o}}
\def\mathring{\fS}{\mathring {\mathfrak S}}

\subsection{Stated skein algebra}\label{sub:statedskeinalgebra}

A {\em state} on a finite set $X$ is a map $s: X \to \{\pm\}$. We write $\# s= |X|$.
A {\em stated $\partial M$-tangle }  (respectively {\em a stated $\partial M$-tangle diagram}) is a $\partial M$-tangle (respectively {\em a  $\partial M$-tangle diagram})  equipped with a {\em state} on its set of boundary points.


The {\em  stated skein algebra}  $\cS(\mathfrak S)$ is  the $\mathcal R$-module freely spanned
 by isotopy classes of stated $\partial M$-tangles modulo the {\em defining relations}, which are the old  skein relation~\eqref{eq.skein} and the trivial loop relation~\eqref{eq.loop}, and the new boundary relations~\eqref{eq.arcs} and~\eqref{eq.order}:
\begin{align}
\label{eq.skein}   \raisebox{-8pt}{\incl{.8 cm}{cross}}  \ &= \ q  \raisebox{-8pt}{\incl{.8 cm}{resoP}}  + q^{-1}   \raisebox{-8pt}{\incl{.8 cm}{resoN}} \\
\label{eq.loop}    \raisebox{-8pt}{\incl{.8 cm}{trivloop}} \  &=\  (-q^2 -q^{-2})\raisebox{-8pt}{\incl{.8 cm}{empty}}\\
\label{eq.arcs} \raisebox{-8pt}{\incl{.8 cm}{left_up}}\  & =\  q^{-1/2} \raisebox{-8pt}{\incl{.8 cm}{emptys}}\ , \qquad \raisebox{-8pt}{\incl{.8 cm}{left_upPP}}\ =0, \quad \  \raisebox{-8pt}{\incl{.8 cm}{left_upNN}} \ = 0   \\
 \label{eq.order}     \raisebox{-8pt}{\incl{.8 cm}{reord1}} \ &=\  q^2   \raisebox{-8pt}{\incl{.8 cm}{reord2}}  \ +\  q^{-1/2}   \raisebox{-8pt}{\incl{.8 cm}{reord3}} 
 \end{align}
Here each   shaded part is a  part of $\mathfrak S$, with a stated $\partial M$-tangle diagram on it.
Each arrowed line is part of a boundary edge, and the order on that part is indicated by the arrow and the points on that part are consecutive in the height order. The order of other end points away from the picture can be arbitrary and are not determined by the arrows of the picture. On the right hand side of the first identity of \eqref{eq.arcs}, the arrow does not play any role; it is there only because the left hand side has an arrow.



Again for two $\partial M$-tangles $\alpha_1$ and $\alpha_2$ the product $\alpha_1 \alpha_2$  is defined as the result of stacking $\alpha_1$ above $\alpha_2$. The product makes $\cS(\mathfrak S)$ an $\mathcal R$-algebra. In \cite{Le:TDEC} it is proved that if $\mathcal R$ is a domain then $\cS(\fS)$  does not have non-trivial zero-divisors, \red{a fact known earlier for the case when $\mathfrak S$ has no boundary \cite{PS2}.}


If   $\mathfrak S_1$ and $\mathfrak S_2$ are two punctured bordered  surfaces, then
there is a natural isomorphism
$$
\cS (\mathfrak S_1 \sqcup \mathfrak S_2) \cong \cS (\mathfrak S_1) \otimes_\mathcal R
\cS (\mathfrak S_2).
$$



Since the interior $\mathring{\fS}$ of $\mathfrak S$ does not have boundary, we have $
\mathscr S(\mathring{\fS}) = \mathring {\cS}(\mathfrak S).$

\def\cS^{\mathrm{+}}(\fS){\mathscr S^{\mathrm{+}}(\mathfrak S)}
The subalgebra $\cS^{\mathrm{+}}(\fS)$ spanned by $\partial M$-tangles whose  states  are all $+$ is naturally isomorphic to the skein algebra defined by Muller \cite{Muller}, see \cite{Le:TDEC,LP}. \red{If in the definition of $\mathscr S(\mathfrak S)$ we use only two relations \eqref{eq.skein} and \eqref{eq.loop}, we get a coarser version $\widehat{\mathscr S}(\mathfrak S)$ which was defined by Bonahon and Wong \cite{BW}.}

\begin{remark} \label{rem.hS}  Relations \eqref{eq.arcs} already appeared in \cite{BW}. Relation \eqref{eq.order} appeared  in \cite{Le:TDEC} where the stated skein algebra was introduced.
\end{remark}

\def\overset \star \longrightarrow{\overset \star \longrightarrow}
\def\raisebox{-8pt}{\incl{.8 cm}{leftvep}}{\raisebox{-8pt}{\incl{.8 cm}{leftvep}}}

\subsection{Consequences of defining relations} 



Define $C^\nu_{\nu'}$ for $\nu, \nu'\in \{\pm \}$ by
 \begin{equation} 
\label{eq.Cve}
C^+_+ = C^-_- = 0, \quad C^+_-= q^{-1/2}, \quad C^-_+ = -q^{-5/2}.
 \end{equation} 
In the next lemma we have the values of all the trivial arcs.
\begin{lemma}[Lemma 2.3 of \cite{Le:TDEC}] \label{r.arcs}
In $\cS(\mathfrak S)$ one has
\begin{align}
\label{eq.kink} -q^{-3}   \raisebox{-8pt}{\incl{.8 cm}{kinkp}}  \ &= \   \raisebox{-8pt}{\incl{.8 cm}{kinkzero}} \  = \ -q^3  \raisebox{-8pt}{\incl{.8 cm}{kinkn}} \\
\label{eq.arcs1} \raisebox{-8pt}{\incl{.8 cm}{leftve}}\   &=\  C^\nu _{\nu'}  \raisebox{-8pt}{\incl{.8 cm}{emptys}}\\
\label{eq.arcs2} \raisebox{-8pt}{\incl{.8 cm}{left_ve_dl}} \ & = \ \raisebox{-8pt}{\incl{.8 cm}{left_ve_d}}\   =\  - q^{3} C^{\nu'} _{\nu}  \raisebox{-8pt}{\incl{.8 cm}{emptys}}
\end{align}
\end{lemma}

The next lemma describes how a skein behaves when the order of two consecutive boundary points is switched.


\begin{lemma}[Height exchange move, Lemma 2.4 of \cite{Le:TDEC}]\label{r.refl}
 (a) One has
\begin{align}
\label{eq.reor1}
  \raisebox{-8pt}{\incl{.8 cm}{reord1z}}  \  = \ q^{-1} \,    \raisebox{-8pt}{\incl{.8 cm}{reord1a}}  , \quad   \raisebox{-8pt}{\incl{.8 cm}{reord6z}}  \  &= \ q^{-1} \,   \raisebox{-8pt}{\incl{.8 cm}{reord6a}}  , \quad   \raisebox{-8pt}{\incl{.8 cm}{reord1pn}}  = q \,   \raisebox{-8pt}{\incl{.8 cm}{reord2pn}}  \\
\label{eq.reor2}
q^{\frac 32}   \raisebox{-8pt}{\incl{.8 cm}{reordpn}}   - q^{-\frac 32}    \raisebox{-8pt}{\incl{.8 cm}{reord1}}   &= (q^2 -q^{-2})   \raisebox{-8pt}{\incl{.8 cm}{reord3}} .
\end{align}

(b) Consequently, if $q=1$ or $q=-1$, then for all $\nu, \nu'\in \{\pm \}$,
 \begin{equation} 
\label{eq.sign}
   \raisebox{-8pt}{\incl{.8 cm}{reord1all}}  =
 q\,    \raisebox{-8pt}{\incl{.8 cm}{reord1allp}} .
  \end{equation} 

\end{lemma}


\begin{remark} Because of relation  \eqref{eq.sign}, in general  $\cS(\mathfrak S)$ is not commutative when $q=-1$. This should be contrasted with the case of the usual skein algebra   $\mathring {\cS}(\mathfrak S)$, which is
  commutative and is canonically equal to the $\mathrm{SL}_2(\mathbb C)$ character variety of $\pi_1(\mathfrak S)$ if $\mathcal R=\mathbb C$ and $q=-1$ (assuming $\mathfrak S$ is connected), see \cite{Bullock,PS1}.
\end{remark}

\def\mathrm{id}{\mathrm{id}}
\def\mathring{\fS}{\mathring{\mathfrak S}}
\def\chi{\chi}

 \def\mathcal L{\mathcal L}
 \def\tilde \chi{\tilde \chi}

\subsection{Reflection anti-involution}  \label{sec.refl} 
\begin{proposition}[Reflection anti-involution, Proposition 2.7 in \cite{Le:TDEC}]   \label{r.reflection} \red{Suppose $\mathcal R=\mathbb Z[q^{\pm 1/2}]$. There exists a unique $\mathbb Z$-linear map $\chi: \cS(\mathfrak S) \to \cS(\mathfrak S)$, such that

\begin{itemize}
\item  $\chi(q^{1/2})= q^{-1/2}$, 
\item $\chi$ is an anti-automorphism, i.e. for any $x,y \in \cS(\mathfrak S)$,
$$\chi(x+y)= \chi(x) + \chi(y), \quad \chi(xy) = \chi(y) \chi(x),$$
\item if $\alpha$ is a stated $\partial M$-tangle diagram then $\chi(\alpha)$ is the result of switching all the crossings of $\alpha$ and reversing the linear order on each boundary edge.
\end{itemize} 
}
 \end{proposition}
Clearly $\chi^2=\mathrm{id}$. We call $\chi$ the reflection anti-involution.

\def\mathrm{inv}{\mathrm{inv}}
\def\mathrm{id}{\mathrm{id}}
\defe_r{e_r}
\defe_l{e_l}
\def\overline{\inv}{\overline{\mathrm{inv}}}

\subsection{Inversion along an edge}  \label{sec.invers}



\red{
\begin{proposition}
\label{r.inversion}  Let  $e$ be a boundary edge of a punctured bordered surface $\mathfrak S$ and  $f:\{\pm \} \to \mathcal R$ be a function such that $f(+) f(-)= - q^{-3}$.

There exists a unique $\mathcal R$-linear homomorphism $\mathrm{inv}_{e,f}: \cS(\mathfrak S) \to \cS(\mathfrak S)$ such that if $\alpha$ is a stated $\partial \mathfrak S$-tangle diagram with a state $s$ and with positive order on $e$,
then 
 \begin{equation}  
\mathrm{inv}_{e,f}(\alpha)=  \left( \prod_{x \in (\alpha \cap e)} f(s(x))  \right)  \alpha',
\label{eq.def10}
 \end{equation}  where $\alpha'$ is the same $\alpha$ except that the height order of $\alpha'$ on $e$ is given by the negative direction of $e$ and the state of $\alpha'$ on $e$ is obtained from that of $\alpha$ by switching $\nu\in \{\pm \}$ to $-\nu$ at every boundary points in $\alpha \cap e$.

If $e'$ is another boundary edge and $f'(+) f'(-)= -q^{-3}$, then 
 \begin{equation}  
\mathrm{inv}_{e,f}  \circ \mathrm{inv}_{e',f' } = \mathrm{inv}_{e'.f'} \circ \mathrm{inv}_{e,f}.
\label{eq.com5}
 \end{equation}  
\end{proposition}


\def\widetilde{\inv}{\widetilde{\mathrm{inv}}}
\def\widetilde{\Ss}{\widetilde{\cS}}
\begin{proof}  Let $T$ be the set of isotopy classes of stated, positively ordered $\partial \fS$-tangle diagrams. Since $T$ spans $\cS(\mathfrak S)$, the  uniqueness of $\mathrm{inv}_{e,f}$ is clear. 

Let $\widetilde{\Ss}$ be the $\mathcal R$-module freely span by $T$, and $\widetilde{\inv}_{e,f}: \cS'\to \cS(\mathfrak S)$ be the 
 $\mathcal R$-linear map defined  by \eqref{eq.def10}. To show that  $\widetilde{\inv}_{e,f}$ descends to a map $\mathrm{inv}_{e,f}: \cS(\mathfrak S)\to \cS(\mathfrak S)$ one needs to prove $\widetilde{\inv}_{e,f}$ is invariant under isotopy in $M:=\mathfrak S \times (0,1)$ and under the moves generated by the defining relations \eqref{eq.skein}-\eqref{eq.order}. More precisely, we have to show that  $\widetilde{\inv}_{e,f}(\alpha) = \widetilde{\inv}_{e,f}(\alpha)$ for any $\alpha,\alpha'\in T$   whenever 
\begin{itemize}
\item[(i)] $\alpha$ and $\alpha'$ are isotopic as $\partial M$-tangles, or
\item[(ii)] $\alpha$ and $\alpha'$ are respectively the left hand side and the right hand side of the defining relations \eqref{eq.skein}-\eqref{eq.order}.
\end{itemize}

It is known that $\alpha$ and $\alpha'$ are isotopic as $\partial M$-tangles if and only if they are related by a sequence of the 3 framed Reidemeister moves of \cite[Section 1.2]{Oh}. 
The invariance under the 3 framed Reidemeister moves follows from the invariance under the defining relations \eqref{eq.skein} and \eqref{eq.loop}, see \cite{Kauffman}. Clearly $\widetilde{\inv}_{e,f}$ is invariant under the moves generated by the  defining relations \eqref{eq.skein} and \eqref{eq.loop}. There remains relations \eqref{eq.arcs} and \eqref{eq.order}.

Let us consider \eqref{eq.arcs}.  Using the definition, $f(+)f(-)=q^{-3}$, and then \eqref{eq.arcs2}, we have:



$$\mathrm{inv}_{e,f}\left(\raisebox{-8pt}{\incl{.8 cm}{left_up}}\right)=f(+)f(-)  \raisebox{-8pt}{\incl{.8 cm}{leftmp}}  =-q^{-3}  \raisebox{-8pt}{\incl{.8 cm}{leftmp}}  =-q^{-3}(-q^3)C_-^+ = q^{-1/2},$$
which proves the first identity of \eqref{eq.arcs}. The other two identities of \eqref{eq.arcs} are trivial.

Let us consider \eqref{eq.order}. By definition and Lemma \ref{r.refl},
 \begin{equation}  \mathrm{inv}_{e,f}\left(  \raisebox{-8pt}{\incl{.8 cm}{reord1}} \right)=f(+)f(-)  \raisebox{-8pt}{\incl{.8 cm}{reord1pn}} =(-q^{-3})  ( q \,   \raisebox{-8pt}{\incl{.8 cm}{reord2pn}} )= -q^{-2}   \raisebox{-8pt}{\incl{.8 cm}{reord2pn}} .
\label{eq.u2}
 \end{equation} 
\begin{align}\mathrm{inv}_{e,f}\left(q^2  \raisebox{-8pt}{\incl{.8 cm}{reord2}} +q^{\frac{-1}{2}}  \raisebox{-8pt}{\incl{.8 cm}{reord3}} \right) & =q^2(-q^{-3})  \raisebox{-8pt}{\incl{.8 cm}{reordpn}} +q^{-\frac{1}{2}}  \raisebox{-8pt}{\incl{.8 cm}{reord3}}  \notag\\
&=-q^{-1} \left( q^{-3}   \raisebox{-8pt}{\incl{.8 cm}{reord1}} + q^{-\frac{3}{2}}(q^2-q^{-2})  \raisebox{-8pt}{\incl{.8 cm}{reord3}}  \right)+q^{-\frac{1}{2}}  \raisebox{-8pt}{\incl{.8 cm}{reord3}}   \notag
\\
&=-q^{-4}  \raisebox{-8pt}{\incl{.8 cm}{reord1}} +q^{-\frac{9}{2}}  \raisebox{-8pt}{\incl{.8 cm}{reord3}} , \label{eq.u3}
\end{align}
and the right hand sides of \eqref{eq.u2} and \eqref{eq.u3} are equal due to \eqref{eq.order}.

Identity \eqref{eq.com5} follows immediately from the definitions.
\end{proof}







There are two important cases for us. Define
 \begin{equation}  \mathrm{inv}_e:= \mathrm{inv}_{e,C}, \quad \text{and} \ \overline{\inv}_e:= \mathrm{inv}_{e,\bar C},
 \end{equation} 
where  \begin{equation}  
C(+)= \bar C (-) = -q^{-5/2}, \quad C(-) = \bar C(+) = q^{-1/2}.
 \end{equation} 

Note that $C(\nu) = C^{-\nu}_{ \nu}$ and $\bar C(\nu) = C(-\nu)$ for  $\nu\in \{\pm \}$. 
For a stated tangle diagram $\alpha$ with a state $s$ on the boundary edge $e$ define 
 \begin{equation}  
 C_e(\alpha) = \prod_{x\in \alpha \cap  e} C(s(x))= \prod_{x\in \alpha \cap  e} C^{-s(x)}_{s(x)}.
 \label{eq.Ce}
  \end{equation}  
If $\alpha$ has positive order on $e$ then, with $\alpha'$  defined as in Proposition \ref{r.inversion}, one has
 \begin{equation} \label{eq:invC} 
\mathrm{inv}_e(\alpha) = C_e(\alpha) \alpha',
 \end{equation} 


\begin{remark} The definition \eqref{eq.def10} works only for stated $\partial \fS$-tangle diagrams with positive order on $e$. If the order is not positive, the formula will be different.

In general $\mathrm{inv}_{e,f}$ is not an algebra homomorphism.
\end{remark}

}
\subsection{Basis of stated skein module} \label{sec.basis0}


{ A $\partial M$-tangle diagram $D$} is {\em simple} if it has neither double point nor
trivial component. Here a closed component of $D$ is {\em trivial} if it bounds a disk in $\mathfrak S$,
 and an arc component of $\alpha$ is {\em trivial} if it can be homotoped relative to its boundary  to a subset of a boundary edge.
 By convention, the empty set is considered as a simple stated $\partial M$-tangle diagram with 0 components.


Define an order on $\{ \pm\}$ so that the sign $-$ is less than the sign $+$. If $X$ is a partially ordered set, then a state $s: X \to \{\pm\}$ is {\em increasing} if $s$ is an increasing function, i.e. $f(x)  \le f(y)$ whenever $x \le y$.



\def\mathrm{inv}{\mathrm{nd}}

\def\tilde B{\tilde B}
 Choose an orientation  ${\mathfrak o}$  of
$\partial \fS$.
Let  $B(\mathfrak S;{\mathfrak o})$ be the set of
 of all isotopy classes of increasingly stated, ${\mathfrak o}$-ordered simple $\partial M$-tangle diagrams. From the defining relations  it is easy to show that the set $B(\mathfrak S;{\mathfrak o})$ spans $\cS(\fS)$ over $\mathcal R$. 



\begin{theorem} [Theorem 2.8 in \cite{Le:TDEC} ]   \label{thm.basis1a}
 Suppose $\mathfrak S$ is a punctured bordered surface and ${\mathfrak o}$ is an orientation of $\partial \fS$.
Then $B(\mathfrak S;{\mathfrak o})$ is an $\mathcal R$-basis of $\cS(\mathfrak S)$.
  \end{theorem}
  \def\mathrm{dec}{\mathrm{dec}}
  
 \begin{remark} Theorem \ref{thm.basis1a} means that the coefficients given in the defining relations \eqref{eq.arcs} and \eqref{eq.order} are consistent in the sense that they do not lead to any more relations among the set $B(\mathfrak S;{\mathfrak o})$.
 \label{rem.cons}
 \end{remark}

\def\mathring B{\mathring B}

The subset $\mathring B(\mathfrak S;{\mathfrak o})\subset B(\mathfrak S;{\mathfrak o})$ consisting of $\alpha\in B(\mathfrak S;{\mathfrak o})$ having no arcs is a basis of the ordinary skein algebra $\mathring {\cS}(\mathfrak S)$. Similarly, the subset $B^{+}(\mathfrak S;{\mathfrak o})\subset B(\mathfrak S;{\mathfrak o})$ consisting of $\alpha\in B(\mathfrak S;{\mathfrak o})$ having only positive states is a basis of the Muller  skein algebra $\cS^{\mathrm{+}}(\fS)$, see \cite{Muller,Le:TDEC,LP}. Hence we have the following.
\begin{corollary} Both the ordinary skein algebra $\mathring {\cS}(\mathfrak S)$ and the Muller skein algebra $\cS^{\mathrm{+}}(\fS)$ are subalgebras of the stated skein algebra $\cS(\fS)$.  
\end{corollary}


 

\def{\mathfrak{A}}{{\mathfrak{A}}}
\subsection{Filtration and grading} \label{sec.filtration} Suppose $a$ is either an ideal arc or a simple closed curve on $\mathfrak S$ and $\alpha$ is a simple $\partial M$-tangle diagram on $\mathfrak S$. The geometric intersection index $I(a,\alpha)$ is
$$ I(a,\alpha) = \min |a \cap \alpha'|,$$
where the minimum is over all the simple $\partial M$-tangle diagrams $\alpha'$ isotopic to $\alpha$.

For a collection ${\mathfrak{A}}=\{ a_1, \dots, a_k\}$, where each $a_i$ is either an ideal arc or a simple closed curve, and $n\in \mathbb N$ let $F^{\mathfrak{A}}_n(\cS(\fS))$ be the $\mathcal R$-submodule of $\cS(\fS)$ spanned by all stated simple $\partial M$-diagrams $\alpha$ such that $\sum_{i=1}^k I(a_i, \alpha) \le n$. It is easy to see that the collection $\{F^{\mathfrak{A}}_n(\cS(\fS))\}_{n\in \mathbb N}$ forms a filtration of $\cS(\fS)$ compatible with the algebra structure, i.e. with $F_n= F^{\mathfrak{A}}_{n}(\cS(\fS))$ one has
$$ F_{n} \subset F_{n+1}, \ \bigcup_{n\in \mathbb N} F_n = \cS(\fS), \ F_n F_{n'} \subset F_{n+n'}.$$
One can define the associated graded algebra 
$\mathrm{Gr}^{{\mathfrak{A}}}(\cS(\mathfrak S))$:
 $$ \mathrm{Gr}^{{\mathfrak{A}}}(\cS(\mathfrak S))= \bigoplus_{n=0}^\infty  \mathrm{Gr}^{{\mathfrak{A}}}_n(\cS(\mathfrak S))\   \text{with } \mathrm{Gr}^{{\mathfrak{A}}}_n(\cS(\mathfrak S))= F_n/F_{n-1}\ \forall n\ge 1 \ \text{and}\  \mathrm{Gr}_0= F_0.$$ 

This type of filtration has been used extensively in the theory of the ordinary skein algebra, see e.g. \cite{Le:QT,FKL,LP,Marche}. 

 The following is a consequence of Theorem \ref{thm.basis1a}:
\begin{proposition}[Proposition 2.12 in \cite{Le:TDEC}]\label{r.basis2}  Let  ${\mathfrak o}$ be an orientation of the boundary of a punctured bordered surface $\mathfrak S$, and ${\mathfrak{A}}=\{a_1,\dots, a_k\}$ be a collection of boundary edges of $\mathfrak S$.\\
 (a) The set $\{ \alpha \in B(\mathfrak S;{\mathfrak o})\mid \sum_{i=1}^k I(\alpha, a_i)\le n\} $
is an $\mathcal R$-basis of $F^{\mathfrak{A}}_n(\cS(\mathfrak S))$.\\
(b) The set $\{ \alpha \in B(\mathfrak S;{\mathfrak o}) \mid \sum_{i=1}^k I(\alpha, a_i)= n\} $ is an $\mathcal R$-basis of $\mathrm{Gr}^{\mathfrak{A}}_n(\cS(\mathfrak S))$.\\
\end{proposition}




\def{\cE_\partial}{{\mathcal E_\partial}}
\def\mathrm{lt}{\mathrm{lt}}
For what concerns the grading, for each non-negative integer $m$ and a boundary edge $e$ let  $G^e_m$ be the $\mathcal R$-subspace of $\cS(\mathfrak S)$ spanned by stated $\partial M$-tangle diagrams  $\alpha$ with 
 $\delta_e(\alpha):= \sum_{u \in (\alpha \cap e)} s(u) =m,$ where $s$ is the state and 
  we identify $+$ with $+1$ and $-$ with $-1$.  
 
From the defining relations it is clear that $\cS(\mathfrak S)= \bigoplus_{m  \in \mathbb Z} G^e_m$ and $G^e_m G^e_{m'} \subset G^e_{m+m'}$. In other words,  $\cS(\mathfrak S)$ is a graded algebra with the grading $\{ G^e_m\}_{m\in \mathbb Z}$.

Also the following is a consequence of Theorem \ref{thm.basis1a}:
\begin{proposition}\label{r.basis3}
Let $\mathfrak S$ be a punctured bordered surface and ${\mathfrak o}$ be an orientation of $\partial \fS$.
 The set $\{ \alpha \in B(\mathfrak S;{\mathfrak o}) \mid \delta_e(\alpha)=m\} $ is an $\mathcal R$-basis of $G^e_{m}(\cS(\mathfrak S))$.

\end{proposition}

 
 
 
If ${\mathfrak o}'$ is another orientation of the boundary $\partial \fS$, the change from basis $B(\mathfrak S;{\mathfrak o})$ to $B(\mathfrak S;{\mathfrak o}')$ might be complicated. For the associated space $\mathrm{Gr}^{\mathfrak{A}}(\cS(\fS))$, the change of bases is simpler. 

Recall that $\alpha \overset \bullet = \alpha'$ means $\alpha = q^m \alpha'$ for some $m\in \mathbb Z$.

\begin{proposition} \label{r.orichange} Suppose $\alpha$ is stated tangle diagram on $\mathfrak S$ and $I(\alpha,e)=k$ where $e$ is a boundary edge. Let's alter $\alpha$ to get $\alpha'$ by changing the height order on $e$ and the states on $e$ such that $\delta_e(\alpha) = \delta_e(\alpha')$. Then  one has
  \begin{equation}  
\alpha \overset \bullet = \alpha'   \quad \text{ in $\mathrm{Gr}^e_k(\cS(\fS))$}\label{eq.orichange}.  \end{equation} 
\end{proposition}
\begin{proof} 

One can get $\alpha'$ from $\alpha$ by a sequence of moves, each is either (i) an exchange of the heights of two consecutive vertices on $e$, or (ii) an exchange of states of two consecutive vertices on $b$. We can assume that $\alpha'$ is the result of doing a move of type (i) or type (ii).

In case of move (i), the identities \eqref{eq.reor1} and \eqref{eq.reor2} prove \eqref{eq.orichange}.

In case of move (ii), the identity \eqref{eq.order} prove \eqref{eq.orichange}.
\end{proof}

 
\def\widetilde{\pr}{\widetilde{\mathrm{pr}}}
\def\tilde \al{\tilde \alpha}
\subsection{Splitting/Gluing punctured bordered surfaces}    \label{sec.31}
Suppose $a$ and $b$ are distinct boundary edges of a punctured bordered surface $\mathfrak S'$ which may not be connected. Let $\mathfrak S= \mathfrak S'/(a=b)$ be the result of gluing $a$ and $b$ together in such a way that the  orientation is compatible. The canonical projection $\mathrm{pr}: \mathfrak S' \to \mathfrak S$  induces a projection $\widetilde{\pr}: M=\mathfrak S' \times (0,1) \to M=\mathfrak S\times (0,1)$.
Let $c= \mathrm{pr}(a)=\mathrm{pr}(b)$. It is an interior ideal arc  of $\mathfrak S$.

Conversely if $c$ is an ideal arc in the interior of $\mathfrak S$, then there exists $\mathfrak S', a,b$ as above such that $\mathfrak S= \mathfrak S'/(a=b)$, with $c$ being the common image of $a$ and $b$. We say that $\mathfrak S'$ is the result of splitting $\mathfrak S$ along $c$.



 A $\partial M$-tangle  $\alpha\subset M=\mathfrak S \times (0,1)$,  is said to be {\em vertically transverse to $c$} if
 \begin{itemize}
 \item $\alpha$ is transverse  to $c \times (0,1)$,
 \item the points in $\partial_c\, \alpha:= \alpha \cap (c \times (0,1))$ have distinct heights, and have vertical framing.
 \end{itemize}
 Suppose $\alpha$ is a stated $\partial M$-tangle vertically transverse  to $c$. Then $\tilde \al:=\widetilde{\pr}^{-1}(\alpha)$ is a $\partial M'$-tangle
 which is stated at every boundary point except for newly created boundary points, which are points in  $\widetilde{\pr}^{-1} (\partial_c\, \alpha)$.
  {\em A lift} of $\alpha$ is a stated $\partial M'$-tangle $\beta$ which is $\tilde \al$ equipped with states on $\widetilde{\pr}^{-1} (\partial_c\, \alpha)$ such that if $x,y\in \widetilde{\pr}^{-1} (\partial_c\, \alpha)$ with $\widetilde{\pr}(x)=\widetilde{\pr}(y)$ then $x$ and $y$ have the same state. If $|\partial_c\, \alpha|=k$, then  $\alpha$ has $2^k$ lifts.


\begin{theorem}[Splitting Theorem, Theorem 3.1 in \cite{Le:TDEC}] \label{thm.1a} Suppose $c$ is an ideal arc in the interior of a  punctured bordered surface $\mathfrak S$ and $\mathfrak S'$ is the result of splitting $\mathfrak S$ along $c$.


(a)
There is a unique $\mathcal R$-algebra homomorphism
$ \theta_c: \cS(\mathfrak S) \to \cS(\mathfrak S')$, called the splitting homomorphism along $c$,
such that if $\alpha$ is a stated $\partial M$-tangle  vertically transverse  to $c$, then
 \begin{equation}  
\theta _c(\alpha)=\sum \beta, \label{eq.slit}
 \end{equation}  where the sum is over all lifts $\beta$ of $\alpha$.


(b) In addition, $\theta_c $ is injective.

(c) If $c_1$ and $c_2$ are two non-intersecting ideal arcs in the interior of $\mathfrak S$, then
$$ \theta_{c_1} \circ \theta_{c_2} = \theta_{c_2} \circ \theta_{c_1}.$$

\end{theorem}
\begin{remark} The coefficients of the right hand sides of the defining relations \eqref{eq.arcs} and \eqref{eq.order} were chosen so that one has the consistency (see Remark \ref{rem.cons}) and the splitting theorem. It can be shown that if one requires the consistency and the splitting theorem, then the coefficients are unique, up symmetries of a group isomorphic to $\mathbb Z/2 \times \mathbb Z/2$.
\end{remark}

\subsection{Splitting homomorphism and filtration} Fix an orientation ${\mathfrak o}$ of the boundary edges of $\partial \mathfrak S$. Let  $\mathfrak S'$ be the result of splitting $\mathfrak S$ along an ideal arc $c$, with $c$ being lifted to boundary edges $a$ and $b$ of $\mathfrak S'$. 
Choose an orientation of $c$ and lift this orientation to $a$ and $b$ which, together with ${\mathfrak o}$, gives an orientation ${\mathfrak o}'$ for $\mathfrak S'$.
Assume $D$ is a stated simple ${\mathfrak o}$-ordered $\partial M$-tangle diagram which is {\em taut with respect to $c$}, i.e. $|D\cap c|=I(D,c)$. 
For each each $i=0,1,\dots, m:=|D \cap c|$ let $(\tilde D,s_i)$ be the $\partial M'$-tangle diagram where $\tilde D= \mathrm{pr}^{-1}(D)$,  and the states on both $a$ and $b$ are ${\mathfrak o}'$-increasing and having exactly $i$  minus signs. Then each $(\tilde D, s_i)$ is in the  basis  of the free $\mathcal R$-module $\mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S'))$ described in Proposition \ref{r.basis2}.

For non-negative integers $n,i$ the quantum binomial coefficient is defined by
$$ \binom ni _q = \frac{\prod_{j=n-i+1}^n (1-q^j)}{\prod_{j=1}^i (1-q^j) }.$$



\begin{proposition}\label{r.grbinom} In $\mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S'))$ one has
 \begin{equation} 
\label{eq.split2} 
\theta_c(D) = \sum_{i=0}^m \binom{m}{i}_{q^4} (\tilde D, s_i).
 \end{equation} 
\end{proposition}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord1gram}}{\raisebox{-13pt}{\incl{1.3 cm}{reord1gram}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord2grbm}}{\raisebox{-13pt}{\incl{1.3 cm}{reord1grbm}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord2grb}}{\raisebox{-13pt}{\incl{1.3 cm}{reord2grb}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord2grbm}}{\raisebox{-13pt}{\incl{1.3 cm}{reord2grbm}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord9}}{\raisebox{-13pt}{\incl{1.3 cm}{reord9}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord9m}}{\raisebox{-13pt}{\incl{1.3 cm}{reord9m}}}
\begin{proof} For $s: D \cap c \to \{ \pm \}$ let $(\tilde D,s)$ be the stated ${\mathfrak o}'$-ordered $\mathfrak S'$-tangle diagram with state $s$ on $a$ and $b$.
By definition,
 \begin{equation}  
\theta(D) = \sum_{s: D \cap c \to \{ \pm \} }  (\tilde D, s) \quad \in \cS(\mathfrak S').
 \end{equation}  
Taking into account the filtration, from relations \eqref{eq.order} and \eqref{eq.reor1}, we see that in $\mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S'))$,
 \begin{equation}  \label{eq.swap} \raisebox{-12pt}{\incl{1.3 cm}{reord1gra}}  = q^2 \left( \raisebox{-13pt}{\incl{1.3 cm}{reord1gram}}\right), \quad  \raisebox{-13pt}{\incl{1.3 cm}{reord2grb}} = q^2 \, \left( \raisebox{-13pt}{\incl{1.3 cm}{reord2grbm}} \right).
 \end{equation} 
It follows that $\mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S'))$ we have
 \begin{equation}  
\label{eq.switch}
\raisebox{-13pt}{\incl{1.3 cm}{reord9}} \ =\ q^4 \left (  \raisebox{-13pt}{\incl{1.3 cm}{reord9m}} 
\right).
 \end{equation} 
Suppose $s: D \cap c \to \{\pm\}$ has $i$ minus values. 
For $k=1,\dots, i$ let $x_k$ be the number of plus states (of $s$) lying below the $k$-th minus state. By doing many switches, each changing  a pair of  consecutive $(-, +)$ to $(+,-)$, we can transform $s$ into $s_i$. The number of switches is $x_1 + \dots + x_i$. Hence from \eqref{eq.switch} we see that 
$$ (\tilde D,s) = q^{4(x_1+ \dots x_i)} (\tilde D, s_i).$$
Taking the sum over all $s: D \cap c \to \{\pm\}$ with  $i$ minus values, we get
  \begin{equation}   \label{eq.fg1}
\theta(D) = \sum_{i=0}^m \left( \sum_{0\le x_1 \le \dots \le x_i \le m-i} q^{4( x_1 + \dots + x_i)}\right) \, (\tilde D, s_i) \quad \text{in} \ \mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S')).
 \end{equation} 
By induction on $i$ one can easily prove that
 \begin{equation} 
 \sum_{0\le x_1 \le \dots \le x_i \le n} q^{4( x_1 + \dots + x_i)} =\binom {n+i}i_{q^4},
 \end{equation} 
from which and \eqref{eq.fg1} we get \eqref{eq.split2}.
\end{proof}


\subsection{The category of punctured bordered surfaces and the functor $\cS$.} \label{sec.cat1}


A {\em morphism} from  one bordered punctured surface $\mathfrak S$ to another one $\mathfrak S'$ is an isotopy  class of orientation-preserving embeddings from $\mathfrak S$ to $\mathfrak S'$. Here we  assume that the embeddings map a boundary edge of $\mathfrak S$ into (but not necessarily onto) a boundary edge of $\mathfrak S'$.

Very often we identify an embedding $f: \mathfrak S\hookrightarrow \mathfrak S'$ with its isotopy class. 


\def\mathrm{inv}{\mathrm{inv}}
\def\mathrm{id}{\mathrm{id}}
\defe_r{e_r}
\defe_l{e_l}


Suppose $f: \mathfrak S \to \mathfrak S'$ is an embedding representing a morphism from $\mathfrak S$ to $\mathfrak S'$. Define an $\mathcal R$-linear homomorphism $f_*: \cS(\mathfrak S)\to \cS(\mathfrak S')$ such that if $\alpha$ is a stated tangle diagram on $\mathfrak S$ with positive order then $f_*(\alpha)$ is given by the  stated tangle diagram $f(\alpha)$, also with positive order.
 It is clear that $f_*$ is an $\mathcal R$-linear homomorphism, and it does  not change under isotopy of $f$. 

In general $f_*$ is not an $\mathcal R$-algebra homomorphism. However, if every edge of $\mathfrak S'$ contains the image of at most one edge of $\mathfrak S$, then $f_*$ is an $\mathcal R$-algebra homomorphism.



\begin{example} {\em A bigon } is the standard closed disk in the plane with two points on its boundary removed. Suppose $a\subset \mathfrak S$ is an arc whose two end points are in distinct boundary edges $e_1$ and $e_2$, where 
\end{example}



\begin{example} Let $e$ be a boundary edge of $\mathfrak S$ and $\mathfrak S'= \mathfrak S \setminus \{v\}$, where $v \in e$. The embedding $\iota: \mathfrak S' \hookrightarrow \mathfrak S$ induces an $\mathcal R$-linear homomorphism $\iota_*: \mathscr S(\mathfrak S') \to \cS(\fS)$ which is surjective but not injective in general.
 
 
 Suppose $e'\subset e$ is one of the two boundary edges of $\mathfrak S'$ which is part of $e$. There is a diffeomorphism $g: \mathfrak S\to \mathfrak S' \setminus \{e'\}$ which is unique up to isotopy. Thus, we have a morphism $f: \mathfrak S \to \mathfrak S'$, which is the composition
 $$ \mathfrak S\overset g \longrightarrow  \mathfrak S' \setminus \{e'\} \hookrightarrow \mathfrak S'.$$
The morphism $f$ induces an injective (but not surjective) algebra morphism $f_*: \cS(\fS) \hookrightarrow \mathscr S(\mathfrak S')$. 
\end{example}


\def{\vec \mu}{{\vec \mu}}
\def{\vec\nu}{{\vec\nu}}
\def{\vec \eta}{{\vec \eta}}



\section{Hopf algebra structure of the bigon and ${\mathcal O}_{q^2}(\mathrm{SL}(2))$} \label{sec:bigon}

We will define using geometric terms a  \red{dual quasitriangular (a.k.a. cobraided)} Hopf algebra structure on the stated skein algebra $\mathscr S(\mathcal B)$ of the bigon $\mathcal B$ and then show that it is naturally isomorphic to the \red{dual quasitriangular} Hopf algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. We also show simple pictures of the canonical basis of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, and discuss the Jones-Wenzl idempotents in $\mathscr S(\mathcal B)$. In this section $\mathcal R=\mathbb Z[q^{\pm 1/2}]$ unless otherwise stated.


\def\raisebox{-13pt}{\incl{1.3 cm}{monogon}}{\raisebox{-13pt}{\incl{1.3 cm}{monogon}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{monogona}}{\raisebox{-13pt}{\incl{1.3 cm}{monogona}}}
\subsection{Monogon and Bigon}\label{sub:monogon} Let $D$ be the standard disk
$$ D = \{ (x,y) \in \mathrm{BR}^2 \mid x^2 + y^2 \le 1\}$$
and $v_1=(0,-1)$ and $v_2 = (0,1)$ are two points on the circle $\partial D$. The punctured bordered surface $\mathcal M= D\setminus \{v_1\}$ is called the {\em monogon}, and 
 $\mathcal B= D\setminus \{v_1, v_2\}$ is called the {\em bigon}. Let $e_l, e_r$ be the two  boundary edges of $\mathcal B$ as depicted in Figure \ref{fig:bigon0}. For ${\vec \mu}=(\mu_1, \dots, \mu_k)$ and ${\vec \eta}=(\eta_1,\dots,\eta_k)$ in $\{\pm\}^k$ let $\alpha_{{\vec \eta}{\vec \mu}}\in \cS(\mathfrak B)$ be the element presented by $k$ parallel arcs as in Figure  \ref{fig:bigon0}, with $(\eta_1,\dots,\eta_k)$ being the states on $e_l$ in increasing order and $(\mu_1, \dots, \mu_k)$ being the states on $e_r$ in increasing order.

\FIGc{bigon0}{Monogon, bigon with its edges $e_l$ and $e_r$, elements $\alpha_{+-}$ and  $\alpha_{{\vec \eta}{\vec \mu}}$. Note that for $\alpha_{{\vec \eta}{\vec \mu}}$ the height order is indicated by the arrows.}{2.6cm}
We have $\cS(\mathcal M)=\mathcal R$. 
\red{Moreover, one has



 \begin{equation}  \raisebox{-13pt}{\incl{1.3 cm}{monogon}} =  \raisebox{-13pt}{\incl{1.3 cm}{monogona}}
\label{eq.mon0}
 \end{equation} 
Here the circle enclosing $x$ and two vertical lines attaching to it stand for a stated $\partial \fS$-tangle diagram. The proof follows by using the skein relation \eqref{eq.skein}, then the loop relation \eqref{eq.loop}, and finally the arc relation \eqref{eq.arcs} to reduce $x$ to a scalar.
}



We study the algebra $\cS(\mathcal B)$ in this section.
\def\mathrm{rot}{\mathrm{rot}}
 Let $\mathrm{rot}: \mathcal B\to \mathcal B$ be the rotation (of the plane containing $\mathcal B$) by $180^o$ about the center of $\mathcal B$, which is a self-diffeomorphism  of $\mathcal B$ and induces an $\mathcal R$-algebra involution
  \begin{equation}  
 \mathrm{rot}_*: \cS(\mathcal B) \to \cS(\mathcal B).
 \label{def.rot}
  \end{equation} 


\subsection{Coproduct}
Suppose $e$ is a boundary edge of a punctured bordered surface  $\mathfrak S$. Let $\mathfrak S'$ be the result of cutting out of $\mathfrak S$ a bigon $\mathcal B$ whose right edge $e_r$ is identified with $e$.
Since $\mathfrak S'$ is canonically isomorphic to $\mathfrak S$ in the category of punctured bordered surfaces, we will identify $\cS(\mathfrak S)$ with $\cS(\mathfrak S')$.
 The splitting homomorphism gives  an injective algebra homomorphism 
 $$\cS(\mathfrak S')  \hookrightarrow \cS(\mathfrak S\sqcup \mathfrak B) \equiv  \cS(\mathfrak S) \otimes _\mathcal R \cS(\mathcal B).$$ Since we identify $\cS(\mathfrak S)$ with $\cS(\mathfrak S')$, this map becomes an $\mathcal R$-algebra homomorphism 
 \begin{equation}  \label{eq.comodule}
  \Delta_e: \cS(\mathfrak S)   \hookrightarrow \cS(\mathfrak S) \otimes _\mathcal R \cS(\mathcal B). \end{equation} 
  \FIGc{split1}{The coaction $\Delta_e$.}{2.5cm}

Suppose $x\in B(\mathfrak S, {\mathfrak o})$ is a basis element, where ${\mathfrak o}$ is a given orientation of $\partial \mathfrak S$. Assume the state of $x$ on $e$ is ${\vec \mu}$, then we have (see Figure \ref{fig:split1}):
 \begin{equation} 
\Delta_e(x) = \sum_{{\vec \eta}  \in S_{x\cap e}} x_{\vec \eta} \otimes\,  \alpha_{{\vec \eta}{\vec \mu}}, \label{eq.coact}
 \end{equation}  
where $S_{x \cap e}$ is the set of all states of $x\cap e$ and $x_{\vec \eta}$ is $x$ with the state on $e$ switched to ${\vec \eta}$. 



  
  
  
  
  
In particular, when $\mathfrak S=\mathcal B$ and $e=e_r$, we get an $\mathcal R$-algebra homomorphism $\Delta= \Delta_{e_r}$,
 \begin{equation}  
\Delta: \cS(\mathcal B) \to \cS(\mathcal B) \otimes_ R \cS(\mathcal B).
 \end{equation} 

Theorem \ref{thm.1a}(c) implies that  $\Delta$ is coassociative, i.e.
 \begin{equation}  
(\Delta \otimes \mathrm{id}) \Delta = (\mathrm{id} \otimes \Delta ) \Delta.
 \end{equation} 

Applying \eqref{eq.coact} to $x=\alpha_{\nu\mu}$ with $\nu,\mu\in \{\pm\}$, we get
 \begin{equation}  
\label{eq.coproduct1}
\Delta(\alpha_{\nu\mu} )= \sum _{\eta\in \{\pm \}} \alpha_{\nu\eta} \otimes \alpha_{\eta \mu}.
 \end{equation} 
\subsection{Presentation of $\cS(\mathcal B)$} A presentation of the algebra $\cS(\mathcal B)$ was given in \cite{Le:TDEC}. We give here a presentation of $\cS(\mathcal B)$ in a form which is suitable for us. Recall that $C(\eta)= C^{\bar \eta}_{ \eta}$ for $\eta\in \{\pm \}$ were defined by \eqref{eq.Cve}. We form the following matrix

 \begin{equation}   C:= \begin{pmatrix}
C^+_+ & C^+_- \\ C^-_+ & C^-_-
\end{pmatrix} = \begin{pmatrix}
0 & q^{-1/2} \\ -q^{-5/2} & 0
\end{pmatrix}
 \end{equation}  




\def\raisebox{-18pt}{\incl{1.5 cm}{antipode}}{\raisebox{-18pt}{\incl{1.5 cm}{antipode}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{ap2}}{\raisebox{-18pt}{\incl{1.5 cm}{ap2}}}




\begin{lemma}\label{lem:relations}
The $\mathcal R$-algebra $\cS(\mathfrak B)$ is generated by $\{\alpha_{\nu,\mu} \mid \nu,\mu\in \{\pm\}\}$ with the following relations: 
\begin{align}
C &= A^t C A   \label{eq.rel1a}\\
C&= A C A^t, \label{eq.rel2a}
\end{align}
where $A^t$ is the transpose of $A$ and
$$ A := \begin{pmatrix}
\alpha_{++} & \alpha_{+-} \\ \alpha_{-+} & \alpha_{--}
\end{pmatrix}.
$$





\end{lemma}
\begin{proof} Explicitly, the relations \eqref{eq.rel1a} and  \eqref{eq.rel2a} are respectively
\begin{align}
C^{\nu}_{\mu}\cdot 1& = \sum_{\eta\in \{ \pm \}} C(\bar\eta) \alpha_{\eta \nu} \alpha_{\bar\eta \mu}= C^{+}_-\alpha_{+\nu}\alpha_{-\mu}+C^{-}_+\alpha_{-\nu}\alpha_{+\mu} \qquad \forall \nu,\mu\in \{\pm\}\label{eq.relations1}\\
C^{\nu}_{\mu}\cdot 1&=  \sum_{\eta\in \{ \pm \}} C(\bar \eta) \alpha_{\nu \eta } \alpha_{\mu\bar\eta }= C^{+}_-\alpha_{\nu+}\alpha_{\mu-}+C^{-}_+\alpha_{\nu-}\alpha_{\mu+}\qquad \forall \nu,\mu\in \{\pm\}\label{eq.relations2}.
\end{align}


Let $e$ be the only boundary edge of the monogon $\mathcal M$. Because $\cS(\mathcal M)= \mathcal R$ and $\mathcal R \otimes \cS(\mathcal B)= \cS(\mathcal B)$, the $\mathcal R$-algebra map $\Delta_e: \cS(\mathcal M) \to \cS(\mathcal M) \otimes_{\mathcal R} \cS(\mathcal B)$ is an $\mathcal R$-algebra map $\Delta_e: \mathcal R \to \cS(\mathcal B)$. As any $\mathcal R$-linear map, we must have $\Delta_e(c)= c \cdot 1$, where $1$ is the unit of $\cS(\mathcal B)$. Apply $\Delta_e$ to the simple arc in the monogon whose endpoints are stated by $\nu$ and $\mu$ and we get a 
 proof of \eqref{eq.relations1} as follows:
$$ C^\nu_\mu= \raisebox{-18pt}{\incl{1.5 cm}{antipode}} \overset {\Delta_e} \longrightarrow \sum_{\eta, \eta'\in \{\pm \}} \raisebox{-18pt}{\incl{1.5 cm}{ap2}}=  \sum_{\eta\in \{ \pm \}} C(\bar\eta) \alpha_{\eta \nu} \alpha_{\bar\eta \mu}.$$
Equation \eqref{eq.relations2} is obtained from Equation \eqref{eq.relations1} by applying the map $\mathrm{rot}_*$ of \eqref{def.rot}.

Using  Theorem \ref{thm.basis1a} one sees that the set
 \begin{equation}   B=  \{ \alpha_{++}^h\alpha_{-+}^k\alpha_{--}^l    \mid h,k,l\in \mathbb N\} \cup \{ \alpha_{++}^h\alpha_{+-}^k\alpha_{--}^l \mid h,k,l\in \mathbb{N}, k \ge 1\}
\label{eq.basis}
 \end{equation} 
is an $\mathcal R$-basis of $\cS(\mathcal B)$. In particular, $\cS(\mathcal B)$ is generated by $\alpha_{\nu\mu}$ with $\nu,\mu\in \{\pm \}$.


Using these relations it is easy to check that any monomial in the $\alpha_{\nu\mu}$ can be expressed as an $\mathcal R$-linear combinations of   $B$. The proposition follows.
\end{proof}



\subsection{Counit} 
 The embedding $\iota: \mathcal B \hookrightarrow \mathcal M$ gives rise to an $\mathcal R$-linear map $\iota_*: \cS(\mathcal B) \to \cS(\mathcal M)=\mathcal R$. Define $\epsilon: \cS(\mathcal B) \to \mathcal R$ as the composition $\epsilon= \iota_* \circ \mathrm{inv}_{e_r}$, 
$$ \epsilon: \cS(\mathcal B) \overset {\mathrm{inv}_{e_r}} \longrightarrow \cS(\mathcal B) \overset {\iota_*} \longrightarrow \cS(\mathcal M)=\mathcal R,$$
where $\mathrm{inv}_{e_r}$ is defined in Section \ref{sec.invers}.
Explicitly, if $\alpha$ is a  stated $\partial \mathcal B$-tangle diagram as in Figure \ref{fig:counit}, then
 \begin{equation}   \epsilon(\alpha) = C_{e_r}(\alpha) \, \alpha',
\label{eq.counit}
 \end{equation} 
where $\alpha'$ is described in Figure \ref{fig:counit} and  $C_{e_r}(\alpha)$ is defined by \eqref{eq.Ce}.

\FIGc{counit}{How to obtain $\alpha'$ and $\alpha''$ from $\alpha$ in the definition of counit and antipode. Height order  is  indicated by the arrows on the boundary edges. Then $\alpha'$ is the same $\alpha$, but considered as a tangle diagram in $\mathcal M$ with  its states on the edge $e_r$ switched from $\nu$ to $\bar \nu =-\nu$. And $\alpha''$ is obtained from $\alpha$ by a rotation of $180^o$, and switching all the states $\nu$ to $\bar \nu$.
 }{4cm}

Using \eqref{eq.counit} and the values of $C(\eta)$, one can check that 
 \begin{equation} 
\label{eq.counit1} 
\epsilon(\alpha_{\nu\mu}) = \delta_{\nu\mu}: = \begin{cases} 1 \quad &\text{if} \ \nu=\mu \\
0 &\text{if} \ \nu\neq \mu \end{cases}.
 \end{equation} 




\def\raisebox{-18pt}{\incl{1.5 cm}{counit3}}{\raisebox{-18pt}{\incl{1.5 cm}{counit3}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{counit4}}{\raisebox{-18pt}{\incl{1.5 cm}{counit4}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{counit5}}{\raisebox{-18pt}{\incl{1.5 cm}{counit5}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{counitx}}{\raisebox{-18pt}{\incl{1.5 cm}{counitx}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{counity}}{\raisebox{-18pt}{\incl{1.5 cm}{counity}}}


\begin{proposition} The algebra $\cS(\mathcal B)$ is a bialgebra with  counit $\epsilon$ and coproduct $\Delta$.



\end{proposition}

\begin{proof} We already saw that $\Delta$ is an algebra homomorphism and is associative.
It remains to show that $\epsilon$ is an algebra homomorphism, and 
 \begin{equation} 
\label{eq.coco}
(\epsilon \otimes \mathrm{id} ) \circ \Delta(x) =x =  (\mathrm{id} \otimes \epsilon  ) \circ \Delta(x).
 \end{equation} 
Let $x, y\in \cS(\mathcal B)$ be presented by  tangle diagrams schematically depicted as in Figure \ref{fig:counit2}. 
\FIGc{counit2}{Elements $x,y\in \cS(\mathcal B)$. Each horizontal strand stands for several horizontal lines which are tangled in the two small disks.}{1.6cm}

The following shows that $\epsilon(xy)= \epsilon(x)\epsilon(y)$, i.e. $\epsilon$ is an algebra homomorphism:
$$ \epsilon(xy)=  \epsilon\left(  \raisebox{-18pt}{\incl{1.5 cm}{counit3}}  \right) = 
C_{e_r}(x)\, C_{e_r}(y) \raisebox{-18pt}{\incl{1.5 cm}{counit4}} 
= C_{e_r}(x)\, C_{e_r}(y) \raisebox{-18pt}{\incl{1.5 cm}{counity}} \, \raisebox{-18pt}{\incl{1.5 cm}{counitx}} \, 
= \epsilon(y) \epsilon(x). $$
Here we use equality \eqref{eq.mon0} in the third identity.


As both $\Delta$ and $\epsilon$ are algebra homomorphisms, one only needs to check \eqref{eq.coco} for the generators $x=\alpha_{\nu\mu}$ with $\nu,\mu\in \{\pm \}$. Using \eqref{eq.coproduct1} and \eqref{eq.counit1}, we have
$$ (\epsilon \otimes \mathrm{id} ) \circ \Delta(\alpha_{\nu\mu}) =  (\epsilon \otimes \mathrm{id} )  \sum_\eta \alpha_{\nu\eta} \otimes \alpha_{\eta\mu} = \alpha_{\nu\mu},$$
which proves the first identity of \eqref{eq.coco}. The other identity is proved similarly.
\end{proof}

\subsection{Antipode} \label{sec:antipode}
 Define 
$ S: \cS(\mathcal B) \to \cS(\mathcal B)$, \text{by} $S:= \mathrm{rot}_* \circ ( \mathrm{inv}_{e_r} \circ (\overline{\inv} _{e_l})^{-1}),$ where $\mathrm{inv}$ and $\overline{\inv}$ are defined in Subsection \ref{sec.invers}.
Explicitly, if $\alpha$ is a  stated $\partial \mathcal B$-tangle diagram as in Figure \ref{fig:counit}, then
 \begin{equation}   S(\alpha) = \frac{C_{e_r}(\alpha) }{ C_{e_l}(\alpha)} \, \alpha'',
\label{eq.antipode}
 \end{equation} 
where $\alpha''$ is described in Figure \ref{fig:counit}. In particular, we have
\begin{equation}
S(\alpha_{\nu\mu}) = \frac{C( \mu)}{C( \nu)} \alpha_{\bar \mu \bar \nu} \label{eq.ap1}.
\end{equation}
Explicitly,
 \begin{equation}  
S(\alpha_{++}) = \alpha_{--}, \ S(\alpha_{--})= \alpha_{++}, \ S(\alpha_{+-}) = -q^{2}\alpha_{+-}, \ S(\alpha_{-+}) = -q^{-2} \alpha_{-+}.
 \end{equation} 


\begin{proposition}
The map $S$ is an antipode of the bialgebra $\cS(\mathcal B)$, making $\cS(\mathcal B)$ a Hopf algebra.
\end{proposition}
\begin{proof}
From the definition \eqref{eq.antipode} one  sees that $S$ is an anti-homomorphism, i.e.
$$S(xy)= S(y) S(x).$$
It remains to check the following property of an antipode:
 \begin{equation} 
\label{eq.ap}
\sum  S(x') x'' = \epsilon(x) 1 = \sum  x' S(x'') ,
 \end{equation} 
where we use the Sweedler's notation for the coproduct $\Delta x = \sum x' \otimes x''$.
Since $S$ is an anti-homomorphism and $\epsilon$ is an algebra homomorphism, it is enough to check \eqref{eq.ap} for generators $x= \alpha_{\nu\mu}$. In that case, using  \eqref{eq.coproduct1} we have
$ \Delta(x)=  \Delta(\alpha_{\nu\mu})=\sum_\eta \alpha_{\nu\eta} \otimes \alpha_{\eta\mu}$, and
\begin{align*}
 \sum S(x') x''&= \sum_{\eta\in \{\pm \}}  S(\alpha_{ \nu \eta})  \alpha_{\eta\mu}\\
& = \sum_{\eta\in \{\pm \}} \frac{C(\eta)}{C(\nu)} \alpha_{\bar \eta \bar \nu}  \alpha_{\eta\mu} \quad \text{by  \eqref{eq.ap1}}\\
&= \frac{C^{\bar \nu}_ \mu \cdot 1 }{C(\nu)} \quad \text{by  \eqref{eq.relations1}}\\
&= \delta_{\nu\mu} \cdot 1 = \epsilon(\alpha_{\nu\mu}) \cdot 1 \quad \text{by definition of $C(\nu)$ and  \eqref{eq.counit1}},
\end{align*}
which proves the first identity of \eqref{eq.ap1}. The second identity of \eqref{eq.ap1} is proved similarly.
\end{proof}





\subsection{Quantum algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$}
Let us recall the definition of the  quantum coordinate ring ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ of $\mathrm{SL}_2(\mathbb C)$, which is the Hopf dual of the quantum group
$U_{q^2}(\mathfrak{sl}_2)$. See \cite{MajidFoundation}.
\begin{definition}[${\mathcal O}_{q^2}(\mathrm{SL}(2))$]
The Hopf algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ is the $\mathcal R$-algebra generated by $a,b,c,d$ with 
relations 
\begin{align}  ca& =q^2ac, \ db=q^2bd, \ ba=q^2ab,\ dc=q^2cd, \label{eq.rel1} \\
 bc& =cb,  \ ad-q^{-2}bc=1  \ {\rm and} \  da - q^2cb=1 \label{eq.rel2}.
\end{align}
Its coproduct structure is given by
 $$\Delta(a)=a\otimes a+b\otimes c,\qquad \Delta(b)=a\otimes b+b\otimes d,
\qquad \Delta(c)=c\otimes a+d\otimes c, \qquad\Delta(d)=c\otimes b+d\otimes d.$$ 
Its counit is defined as $\epsilon(a)=\epsilon(d)=1,\epsilon(b)=\epsilon(c)=0$
 and its antipode is defined by $S(a)=d,S(d)=a,S(b)=-q^2 b,S(c)=-q^{-2} c$.
\end{definition}
\begin{theorem}\label{teo:SL2}
There exists a Hopf algebra isomorphism $\phi: \cS(\mathcal B) \to {\mathcal O}_{q^2}(\mathrm{SL}(2))$
given on the generators by 
 \begin{equation}  \phi(\alpha_{+,+})=a,\qquad \phi(\alpha_{+,-})=b,\qquad\phi(\alpha_{-,+})=c,\qquad\phi(\alpha_{-,-})=d.
\label{eq.def1}
 \end{equation} 
Furthermore, 
\red{
under the identification of $\cS(\mathcal B)$ with $ {\mathcal O}_{q^2}(\mathrm{SL}(2))$ via the isomorphism $\phi$, the involution $\mathrm{rot}_*: \cS(\mathcal B)\to \cS(\mathcal B)$,  given by the rotation of $180^{\circ}$ around the center of the bigon (see \eqref{def.rot}), becomes the $\mathcal R$-algebra involution $r:{\mathcal O}_{q^2}(\mathrm{SL}(2))\to {\mathcal O}_{q^2}(\mathrm{SL}(2))$ given by
 $r(a)=a,r(b)=c,r(c)=b, r(d)=d$. Moreover, $r$ is a co-algebra antimorphism, i.e. 
 $$(r\otimes r) \circ \Delta^{op}=\Delta\circ r.$$  
 }
\end{theorem}
\begin{proof}\red{By Lemma \ref{lem:relations}, the $\mathcal R$-algebra $\cS(\mathcal B)$ is generated by $\alpha_{\pm\pm}$ with relations \eqref{eq.rel1a} and \eqref{eq.rel2a}. Under the assignment $\phi$ given 
on generators $\alpha_{\pm\pm}$
by \eqref{eq.def1}, 
the matrix relations \eqref{eq.rel1a} and \eqref{eq.rel2a} become respectively
\begin{align}  ca&= q^2 ac ,\  db= q^2 bd,\  ad- q^{-2} cb=1,\  da -q^2 bc=1 \label{eq.rel1as} \\
ba&= q^2 ab,\  dc= q^2 cd,\  ad- q^{-2} bc=1,\ da - q^2 cb=1 \label{eq.rel1bs}
\end{align}
Each of these identities is a consequence of the relations in \eqref{eq.rel1} and \eqref{eq.rel2}. Conversely, all the relations in \eqref{eq.rel1} and \eqref{eq.rel2}, except for $bc=cb$, are among the identities  \eqref{eq.rel1as} and \eqref{eq.rel1bs}. The remaining relation $bc=cb$ is obtained by taking the difference between the last identity of \eqref{eq.rel1as} and the last identity of \eqref{eq.rel1bs}. Hence $\phi$ is an $\mathcal R$-algebra isomorphism.
}


To check that $\phi$ is a Hopf algebra isomorphism it is sufficient to check this on the level of generators where it is straightforward. 

The last statement is a direct verification.
\end{proof}



\subsection{Geometric depiction of co-$R$-matrix, a lift of the co-$R$-matrix} The Hopf algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ is \red{\em ``dual quasitriangular'' (see  \cite{MajidFoundation} Section 2.2) or ``cobraided'' (see e.g. \cite{Kassel}, Section VIII.5)} , i.e. it has a co-$R$-matrix with the help of which one can make the category of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-modules a braided category. Formally, a {\em co-$R$-matrix}  is a bilinear form 
$$ \rho : {\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to \mathcal R$$ such that there exists another bilinear form $\bar \rho: 
{\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to \mathcal R$ (the ``inverse" of $\rho$)
satisfying for any $x,y,z\in U$,
\begin{align}
\sum \rho (x' \otimes y') \bar \rho (x'' \otimes y'')&= \sum \bar \rho (x' \otimes y') \rho (x'' \otimes y'')= \epsilon (x) \epsilon(y) \\
\sum \rho (x''\otimes y'') y'x'  &= \sum \rho (x'\otimes y') x'' y''     \label{eq.rflip}\\
\rho (xy \otimes z)& = \sum \rho (x' \otimes z') \rho  (y'' \otimes z'') \epsilon(x'') \epsilon (y')  
\label{eq.cobraid3}\\
\rho (x \otimes y z)& = \sum \rho  (x' \otimes z') \rho (x'' \otimes y'') \epsilon(z'') \epsilon (y') 
\label{eq.cobraid4}
\end{align}
Here we use Sweedler's notation for the coproduct.
Relations \eqref{eq.cobraid3} and \eqref{eq.cobraid4} show that $\rho$ is totally determined by  its values at a set of generators of the algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, and the values $\rho$ at a set of generators are given by (see \cite{Kassel})
 \begin{equation}  
\rho \begin{pmatrix}
a\otimes a & b \otimes b & a\otimes b & b \otimes a \\
c\otimes c & d \otimes d & c \otimes d & d \otimes c\\
a\otimes c & b \otimes d & a \otimes d & b \otimes c\\
c\otimes a & d \otimes b & c \otimes b & d \otimes a
\end{pmatrix} = 
\begin{pmatrix}
q & 0 & 0 & 0 \\
0 & q & 0 & 0\\
0 & 0 & q^{-1} & q - q^{-3}\\
0 & 0 & 0 & q^{-1}
\end{pmatrix}   \label{eq.cobraid0}
 \end{equation} 
 
 
 
\def\letterx{  \raisebox{-9pt}{\incl{.9 cm}{x}} } 
\def  \raisebox{-9pt}{\incl{.9 cm}{y}} {  \raisebox{-9pt}{\incl{.9 cm}{y}} }
\def  \raisebox{-9pt}{\incl{.9 cm}{xy}} {  \raisebox{-9pt}{\incl{.9 cm}{xy}} }
\def  \raisebox{-9pt}{\incl{.9 cm}{xybar}} {  \raisebox{-9pt}{\incl{.9 cm}{xybar}} }
\def  \raisebox{-9pt}{\incl{.9 cm}{yxbar}} {  \raisebox{-9pt}{\incl{.9 cm}{yxbar}} }
\def\letterxyz{  \raisebox{-10pt}{\incl{1 cm}{xyz}} } 
\def\xyzp{  \raisebox{-10pt}{\incl{1 cm}{xyzp}} } 
\def\xyzpp{  \raisebox{-10pt}{\incl{1 cm}{xyzpp}} } 
\def  \raisebox{-10pt}{\incl{1 cm}{bc}} {  \raisebox{-10pt}{\incl{1 cm}{bc}} }
\def  \raisebox{-10pt}{\incl{1 cm}{bcp}} {  \raisebox{-10pt}{\incl{1 cm}{bcp}} }
\def  \raisebox{-10pt}{\incl{1 cm}{bcpp}} {  \raisebox{-10pt}{\incl{1 cm}{bcpp}} }
\def\partial \cB{\partial \mathcal B}
 
 \begin{theorem}\label{teo:cobraid} Under the identification of $\mathscr S(\mathcal B)$ and ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ via the isomorphism $\phi$,
 the co-$R$-matrix $\rho$ and its inverse $\bar \rho$  have the following geometric description
 \begin{align}
 \rho \left (\letterx  \otimes   \raisebox{-9pt}{\incl{.9 cm}{y}}  \right) & = \epsilon \left(    \raisebox{-9pt}{\incl{.9 cm}{xy}}  \right)  \label{eq.cobraid} 
 \\
  \bar \rho \left (\letterx  \otimes   \raisebox{-9pt}{\incl{.9 cm}{y}}  \right) & = \epsilon \left(    \raisebox{-9pt}{\incl{.9 cm}{xybar}}  \right). \label{eq.cobraid2}
\end{align}   
 \red{Here a circle enclosing $x$ and two lines adjacent to the circle stand for a stated $\partial \cB$-tangle diagram, also denoted by $x$. The left hand side of \eqref{eq.cobraid} stands for $\rho(x\otimes y)$. }
 \end{theorem}
 \begin{proof}
 Let $\rho'$ be the map defined by the r.h.s. of \eqref{eq.cobraid}: we will show that $\rho'=\rho$. For this it is enough to show that $\rho'$ satisfies \eqref{eq.cobraid3}, \eqref{eq.cobraid4}, and the initial values identity \eqref{eq.cobraid0}, all with $\rho$ replaced by $\rho'$. 
We have, \red{where a line labeled by, say $x$, stands for the stated $\partial \cB$-tangle diagram $x$},
$$\rho'(xy \otimes z)= \epsilon \left(\letterxyz   \right)$$
Split the bigon by the vertical middle ideal arc, then use the fact that $\epsilon(u) =\sum \epsilon(u') \epsilon(u'')$ (in any Hopf algebra) where $\Delta(u)= \sum u' \otimes u''$, we have
\begin{align*}
&= \sum \epsilon \left(\xyzp   \right) \epsilon \left(\xyzpp   \right)   \\
&= \sum \rho  (x' \otimes z') \rho  (y'' \otimes z'') \epsilon(x'') \epsilon (y'). 
\end{align*}
This proves \eqref{eq.cobraid3} for $\rho'$. The proof of \eqref{eq.cobraid4} is similar.

To check \eqref{eq.cobraid0} we have to check 16 identities, all of which are easy. For example, the most difficult one is the identity of the $(3,4)$ entries:
\begin{align*}
\rho'(b\otimes c) &= \epsilon \left(   \raisebox{-10pt}{\incl{1 cm}{bc}}  \right) = q \, \epsilon \left(   \raisebox{-10pt}{\incl{1 cm}{bcp}}  \right) + q^{-1} \, \epsilon \left(   \raisebox{-10pt}{\incl{1 cm}{bcpp}}  \right)  \\
&= q - q^{-3} \qquad \text{by \eqref{eq.counit1} and \eqref{eq.arcs2}}. \ 
\end{align*}
 This proves \eqref{eq.cobraid0} for  the $(3,4)$ entries. Identity \eqref{eq.cobraid0} for  other entries are similar.
 \end{proof}
 
\begin{remark}\label{rem:rhoprime} \red{The bilinear form $ \rho':  {\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to \mathcal R$ defined by
 \begin{equation}  
 \rho'(x \otimes y) := \bar \rho(y \otimes x) =  \epsilon \left(    \raisebox{-9pt}{\incl{.9 cm}{yxbar}}  \right) \label{eq.coR2}
 \end{equation} 
gives a new co-$R$-matrix for ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, which is the mirror reflection of $\rho$.}
\end{remark}

\subsection{The Jones-Wenzl idempotents as elements of the bigon algebra}\label{sub:joneswenzl}
\red{
In this subsection we will work over the ring $\mathcal R^{loc}$ obtained by localizing $\mathcal R$ over the multiplicative set generated by $\{[n]=\frac{q^{2n}-q^{-2n}}{q^2-q^{-2}}, n\geq 1\}$.
Recall that the $n^{th}$ Temperely-Lieb algebra $T_n$ (see e.g. \cite{Tu:Book}) is the $\mathcal R^{loc}$-algebra generated by non-stated simple $(n,n)$-tangle diagrams in $\mathfrak B$ modulo isotopy (rel to the boundary) and relation \eqref{eq.loop}. The product is obtained by concatenating horizontally. 
\begin{figure}[hbtp!]
 \includegraphics[width=2cm]{Temperley1-new.eps} \includegraphics[width=2cm]{Temperley2-new.eps}
\caption{On the left the unit of $T_5$. On the right an element 
of $T_5$.}\label{fig:temperely}
\end{figure}

A $\mathcal R^{loc}$-basis of $T_n$ is given by simple $(n,n)$-tangle diagrams without closed components; 
define $\epsilon:T_n\to \mathcal R^{loc}$ be the dual of the element $1$ with respect to this basis. 
The $n^{th}$ Jones-Wenzl idempotent is an element $JW_n\in T_n$ defined by recursion as explained in Figure \ref{fig:joneswenzl}.
\begin{figure}[hbtp!]
\raisebox{-1.3cm}{\includegraphics[width=2cm]{JonesWenzlleft-new.eps}}\ =\ \raisebox{-1.3cm}{\includegraphics[width=2cm]{JonesWenzlright1-new.eps}}$+\frac{[n-1]}{[n]}$ \raisebox{-1.3cm}{\includegraphics[width=2cm]{JonesWenzlright2-new.eps}}
\caption{The recursion relation for $JW_n\in T_n$. By definition $JW_1=1\in T_1$.}\label{fig:joneswenzl}
\end{figure}

The following is the key property of the $JW_n$, see e.g. \cite{Tu:Book}.
\begin{proposition}\label{prop:joneswenzlproperties} One has $\epsilon(JW_n)= 1$. 
For all $x\in T_n$, 
it holds $JW_n  x=x JW_n=\epsilon(x)JW_n$. In particular $JW_n^2=JW_n$.
\end{proposition}
For a simple $(n,n)$-tangle diagram $x\in T_n$ and $\vec{\mu_l},\vec{\mu_r} \in \{\pm \}^n$ let $x(\vec{\mu_l},\vec{\mu_r})$ be the stated $\partial \cB$-tangle diagram which is $x$ with states $\vec{\mu_l}$ on $e_l$ and states $\vec{\mu_r}$ on $e_r$, and the height order on each of $e_l$ and $e_r$ is from bottom to top. By linearity, for  $y\in T_n$, we define  $y(\vec{\mu_l},\vec{\mu_r})$. This is well-defined since \eqref{eq.loop} is part of the defining relations of stated skein algebra. Thus, if $y$ is trivial $(n,n)$-tangle diagram, then $y({\vec \eta}, {\vec \mu})$ is the element $\alpha_{{\vec \eta} {\vec \mu}}$ described in Figure \ref{fig:bigon8}.
\begin{example}\label{ex:joneswenzl} If all the components of ${\vec \eta}$ are the same and all the components of ${\vec \mu}$ are the same, then 
$JW_n({\vec \eta}, {\vec \mu})= \alpha_{{\vec \eta} {\vec \mu}}$.
 Indeed $JW_n$ is equal to trivial $(n,n)$-tangle diagram plus the linear combination of diagrams each contains an arc whose endpoints are both in $e_l$ or in $e_r$; such an arc is 0 by \eqref{eq.arcs}.
\end{example}
\begin{proposition}\label{prop:joneswenzl} For ${\vec \mu}\in \{\pm\}^n$ let $o({\vec \mu})$  be obtained by reordering increasingly the states of ${\vec \mu}$ and $no(\vec{\mu})$ is the minimal number of exchanges needed to do so. Then
\begin{align} JW(\vec{\mu_l},\vec{\mu_r}) &=q^{2\ no(\vec{\mu_l})+2\ no(\vec{\mu_r})} JW(o(\vec{\mu_l}),o(\vec{\mu_r})) \\
\Delta(JW(\vec{\mu_l},\vec{\mu_r}))&=\sum_{j=0}^n \binom{n}{j}_{q^4} JW(\vec{\mu_l},\vec{\eta_j})\otimes JW(\vec{\eta_j},\vec{\mu_r}),
\end{align}
where $\vec{\eta_j}$ is the increasing state containing $j$ signs $+$ and $n-j$ signs $-$.
\end{proposition}


}


\begin{proof}
Observe that if one exchanges a sign $-$ and a $+$ which are not in the increasing order along $e_r$ then by \eqref{eq.order} one gets $q^2$ times the reordered term and $q^{\frac{1}{2}}$ times a term killed by $JW_n$. Since a similar argument (using Lemma \ref{r.refl}) shows that each reordering along $e_l$ multiplies $JW$ by $q^2$,  the first statement follows. 
The second statement is a consequence of the fact that $JW_n^2=JW$ in $T_n$  and Proposition \ref{r.grbinom}. 
\end{proof}






\defB_{\mathrm{can} }{B_{\mathrm{can} }}
\subsection{Kashiwara's basis for ${\mathcal O}_{q^2}(\mathrm{SL}(2))$}
\red{
 We will see that the celebrated Kashiwara canonical basis of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, see \cite{Ka}, is the geometrically defined basis $B(\mathcal B,{\mathfrak o}_+)$ of Theorem \ref{thm.basis1a}, up to powers of $q$. Here ${\mathfrak o}_+$ is the positive orientation of the boundary $\partial \cB$ of the bigon $\mathcal B$.

\FIGc{bigon8}{Elements $\beta_{{\vec \eta} {\vec \mu}}$ (left) and $\beta'_{{\vec \eta} {\vec \mu}}$ (right) with ${\vec \eta}=(-,+,+)$ and ${\vec \mu}=(--+)$; the difference is the direction of the left edge.}{2cm}

First recall $B(\mathcal B,{\mathfrak o}_+)$. For sequences ${\vec \eta},{\vec \mu} \in \{\pm \}^n$
 let $\beta_{{\vec \eta},{\vec \mu}}$ be the stated $\partial \cB$-tangle diagram consisting of $n$ horizontal arcs and stated by ${\vec \eta}$ on the left edge and ${\vec \mu}$ on the right edge, with height order given by ${\mathfrak o}_+$; see 
 Figure \ref{fig:bigon8}. 
Then 
 $$ B(\mathcal B,{\mathfrak o}_+)= \{ \beta_{{\vec \eta},{\vec \mu}} \mid {\vec \eta}, {\vec \mu}  \text{ are increasing}\}.$$
Let $\beta'_{{\vec \eta},{\vec \mu}}$ be the same $\beta_{{\vec \eta},{\vec \mu}}$ with reverse height order on the left edge, see Figure \ref{fig:bigon8}. Define
$$ B_{\mathrm{can} }:= \{ \beta'_{{\vec \eta},{\vec \mu}} \mid  \beta_{{\vec \eta},{\vec \mu}} \in B(\mathcal B;{\mathfrak o}_+) \}
=\{ \alpha_{{\vec \eta},{\vec \mu}} \mid {\vec \eta} \text{ is decreasing}, {\vec \nu} \text{ is increasing}.\}
 .$$
 Here $\alpha_{{\vec \eta},{\vec \mu}}$ is defined in Figure \ref{fig:bigon0}.
 
From Lemma \ref{r.refl} which deals with height exchange, one can easily show that
 \begin{equation}  
\beta'_{{\vec \eta},{\vec \mu}} = q^{h({\vec \eta})} \beta_{{\vec \eta},{\vec \mu}}, \ h({\vec \eta}):= \frac{1}{2}(n_+ n_- + n_+ + n_- -n_+^2 - n_-^2  )
 \end{equation} 
where $n_+$ (respectively $n_-$) is the number of $+$ (respectively $-$) in the sequence ${\vec \eta}$. It follows that $B_{\mathrm{can} }$ is also an $\mathcal R$-basis of $\cS(\mathcal B)$.
}





\red{
\begin{proposition}\label{prop:kashiwara}

Via the isomorphism of Theorem \ref{teo:SL2}, the basis $B_{\mathrm{can} }$ coincides with the canonical basis defined by Kashiwara  \cite[Proposition 9.1.1]{Ka}. Both bases $B_{\mathrm{can} }$ and $B(\mathcal B;{\mathfrak o}_+)$ are positive with respect to the product and to the coproduct, i.e. for $B= B_{\mathrm{can} }$ or $B(\mathcal B;{\mathfrak o}_+)$ and $\alpha,\beta \in B$ one has
$$ \alpha \beta\in \mathbb{N}[q^{\pm1}]\cdot B $$
$$ \Delta(\alpha)\in \mathbb{N}[q^{\pm1}]\cdot B\otimes B.$$
\end{proposition} 
}
\begin{proof}
The first statement is an observation directly following Theorem \ref{teo:SL2}: in \cite[Proposition 9.1.1]{Ka} the basis is $\{c^la^mb^n, l,m,n\geq 0\}\sqcup \{c^ld^mb^n, l,n\geq 0, m>0\}$.
\red{
As $B(\mathcal B;{\mathfrak o}_+)$ is equal to $B_{\mathrm{can} }$ up to powers of $q$, one needs only to prove the second statement for $B_{\mathrm{can} }$.
}
For positivity of multiplication, it is sufficient to check it on pairs of generators: there are then $16$ cases. 
All of them are straightforward; we provide some instances among the most complicated cases  where the right hand sides are in  $\mathbb{N}[q^{\pm1}]\cdotB_{\mathrm{can} }$:
 $$\alpha_{+-}\cdot \alpha_{-+}=\alpha_{-+}\cdot \alpha_{+-}, \alpha_{+-}\cdot \alpha_{--}=q^{-2}\alpha_{--}\cdot \alpha_{+-}, \alpha_{--}\cdot \alpha_{-+}=q^{2}\alpha_{-+}\cdot \alpha_{--}$$ $$\alpha_{+-}\cdot \alpha_{++}=q^2\alpha_{++}\cdot \alpha_{+-}, \alpha_{++}\cdot \alpha_{-+}=q^{-2}\alpha_{-+}\cdot \alpha_{++}, \alpha_{++}\cdot \alpha_{-+}=q^{-2}\alpha_{-+}\cdot \alpha_{++}.$$

Once positivity is known for multiplication, the statement for comultiplication can be checked on generators where it is straightforward. 
\end{proof}

\begin{remark} A direct proof of positivity using pictures is also easy and left to the reader.
\end{remark}

\section{Comodule structures, co-tensor products and braided tensor products}\label{sec.comodule}

\def\Delta_e{\Delta_e}
\def\null _e\Delta{\null _e\Delta}
\def{\text{-bal}}{{\text{-bal}}}




In this section we show that given any edge of $\mathfrak S$ the skein algebra $\cS(\fS)$ has a natural structure of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra. We show how to decompose this comodule into finite dimensional comodules. We then identify the image of the splitting homomorphism using the Hochshild cohomology, and give a dual result using Hochshild homology. When $\mathfrak S$ is the result of gluing two surfaces $\mathfrak S_1$ and $\mathfrak S_2$ to two edges of an ideal triangle, we show that the skein algebra $\cS(\fS)$ is canonically isomorphic to the braided tensor product of $\mathscr S(\mathfrak S_1)$ and $\mathscr S(\mathfrak S_2)$. In this section $\mathcal R=\mathbb Z[q^{\pm 1/2}]$.


\subsection{Comodule}\label{sub:comodule} Suppose  $e$ is a boundary edge of a  punctured bordered surface $\mathfrak S$. Recall that by cutting out of $\mathfrak S$ a bigon $\mathfrak B$ whose right edge is $e$ and canonically identifying $\mathfrak S\setminus int(\mathfrak B)$ with $\mathfrak S$, we get an $\mathcal R$-linear map
$$ \Delta_e: \cS(\mathfrak S) \to \cS(\mathfrak S) \otimes \cS(\mathfrak B),$$
see Figure \ref{fig:split1}.
Similarly cutting out of $\mathfrak S$ a bigon $\mathfrak B$ whose left edge is $e$ and canonically identifying $\mathfrak S\setminus int(\mathfrak B)$ with $\mathfrak S$, we get an $\mathcal R$-linear algebra homomorphism
$$ \null _e\Delta: \cS(\mathfrak S)\to \cS(\mathfrak B \sqcup \mathfrak S) \equiv   \cS(\mathfrak B) \otimes \cS(\mathfrak S).$$
 
 
 
 \begin{proposition}\label{prop:comodule} (a) The map $\Delta_e: \cS(\mathfrak S) \to  \cS(\mathfrak S) \otimes \cS(\mathfrak B)$ gives $\cS(\mathfrak S)$ a right comodule-algebra structure over the Hopf algebra $\cS(\mathfrak B)$. Similarly $\null _e\Delta$ gives gives $\cS(\mathfrak S)$ a left comodule-algebra structure over the Hopf algebra $\cS(\mathfrak B)$. 
 
 (b) It holds $\null _e\Delta=\mathrm{fl} \circ (\mathrm{Id}_{\cS(\mathfrak S)}\otimes \mathrm{rot}_*)\circ \Delta_e$ where $\mathrm{fl} (x\otimes y)=y\otimes x$ and $\mathrm{rot}_*:\cS(\mathfrak B)\to \cS(\mathfrak B)$ is the algebra involution defined by \eqref{def.rot}.

(c)  If $e_1,e_2$ are two distinct boundary edges, the coactions on the two  edges commute, i.e.  $$(\Delta_{e_2}\otimes \mathrm{id})\circ \Delta_{e_1}=\red{(\mathrm{fl}\otimes \mathrm{id})\circ}(\Delta_{e_1}\otimes \mathrm{id})\circ \Delta_{e_2}.$$
\end{proposition}

 
 

\begin{proof} (a) The associativity of $\Delta_e$ follows from the
the commutativity  of the splitting maps of theorem \ref{thm.1a}(c). Applying $(\mathrm{id} \otimes \epsilon)$ to Equation \eqref{eq.coact} and using the value of $\epsilon(\alpha_{{\vec \eta}{\vec \mu}})$ from~\eqref{eq.counit1}, we get that 
$$ (\mathrm{id} \otimes \epsilon) \Delta_e(x) = x_{\vec \mu}=x, \quad \forall x \in B(\mathfrak S,{\mathfrak o}).$$
Hence $\Delta_e$ gives $\cS(\mathfrak S)$ the structure of a right $\cS(\mathfrak B)$-comodule.

Recall that $\cS(\mathfrak S)$ is a comodule-algebra over the bialgebra $\cS(\mathfrak B)$, see e.g. \cite[Proposition III.7.2]{Kassel}, if and only if the map $ \Delta_e: \cS(\mathfrak S) \to \cS(\mathfrak S) \otimes \cS(\mathfrak B)$ is an algebra homomorphism. The last fact follows easily from the definition of $\Delta_e$.

(b) Observe that $(\mathrm{rot}_*\otimes \mathrm{rot}_*)\circ \Delta^{op}=\Delta\circ \mathrm{rot}_*$. 

(c) is clear from the definition.
\end{proof}
By identifying $\cS(\cB)$ with ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ using Theorem \ref{teo:SL2}, the above proposition also provides $\cS(\fS)$ with the structure of a ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule. 
More in general, we will use the following terminology:
\begin{definition}[Surfaces with indexed boundary]\label{defi:indexed}
A punctured bordered surface $\mathfrak S$ has \emph{indexed boundary} if its boundary edges are partitioned into two ordered sets (the left and right ones, with indices $L$ and $R$ respectively): $e^L_1,\ldots e^L_n, e^R_1,\ldots e^R_m$.
\end{definition}

If $\mathfrak S$ has indexed boundary then $\cS(\mathfrak S)$  is naturally endowed with a structure of $$({\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes n},{\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes m})-{\rm bicomodule}$$ by the left coaction $\Delta^L:\cS(\mathfrak S)\to {\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes n}\otimes \cS(\mathfrak S)$ defined by 
$$\Delta^L:=
(\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}^{\otimes n-1}\otimes \eDD{e^L_n})\circ (\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}^{\otimes n-2}\otimes \eDD{e^L_{n-1}})\circ \cdots \circ (\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}\otimes \eDD{e^L_2})\circ \eDD{e^L_1}$$ and the right coaction 
$$\Delta^R:=(\Delta_{e^R_1}\otimes\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}^{\otimes m-1} )\circ (\Delta_{e^R_2}\otimes\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}^{\otimes m-2} )\circ \cdots \circ (\Delta_{e^R_{m-1}}\otimes\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))} )\circ \Delta_{e^R_1}.$$ 

Furthermore notice that $\cS(\mathfrak S)$ is not only a bicomodule but a bicomodule-algebra as each of the above maps $\Delta_{e^R_i}$ or $\eDD{e^L_j}$ are also morphisms of algebras. 


\subsection{Quantum group $U_{q^2}(\mathfrak{sl}_2)$} \label{sub:module}
Recall that the quantized enveloping algebra $U_{q^2}(\mathfrak{sl}_2)$ is the Hopf algebra generated over the field $\mathbb{Q}(q^{1/2})$ by $K^{\pm1},E,F$ with relations \begin{equation}\label{eq:uqprod}
KE=q^4 EK,\quad KF=q^{-4}FK,\quad [E,F]=\frac{K-K^{-1}}{q^2-q^{-2}}.\end{equation}
The coproduct and the antipode are given by 
\begin{align}
\label{eq:uqcoprod}
\Delta(K)=K\otimes K,\quad \Delta(E)=1\otimes E+E\otimes K, \quad \Delta(F)=K^{-1}\otimes F+F\otimes 1\\
S(K)=K^{-1},\ S(E)=-EK^{-1}, S(F)=-KF.
\end{align}
  
We emphasize that $U_{q^2}(\mathfrak{sl}_2)$ is defined over the field $\mathbb Q(q^{1/2})$. There is an integral version $U^L_{q^2}(\mathfrak{sl}_2)$, defined by Lusztig \cite{Lusztig}, which is the $\mathcal R$-subalgebra of $U_{q^2}(\mathfrak{sl}_2)$ generated by $K^{\pm1}$ and the divided powers  $E^{(n)}:=\frac{E^n}{[n]!},F^{(n)}:=\frac{F^n}{[n]!}$. Here $[n]! = \prod_{i=1}^n (q^{2i} - q^{-2i}) /(q^2 - q^{-2})$.



One has a non degenerate Hopf pairing  
 \begin{equation}  \langle \cdot, \cdot \rangle: U_{q^2}(\mathfrak{sl}_2)\otimes_\mathcal R {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to {\BQ(q^{1/2})}.
\label{eq.form1}
 \end{equation} 
This is a Hopf duality since it satisfies (with Sweedler's coproduct notation)
 \begin{equation}  
\langle x, y_1 y_2 \rangle = \sum \langle x', y_1 \rangle \langle x'', y_2 \rangle,  \quad \langle x_1 x_2, y\rangle = \sum \langle x_1, y' \rangle \langle x_2, y'' \rangle
 \end{equation} 
The values of the form on generators are given by
\begin{align}
 \left \langle K, \begin{pmatrix}
 a & b \\ c & d
 \end{pmatrix}  \right \rangle= \begin{pmatrix}
 q^2 & 0 \\ 0 & q^{-2}
 \end{pmatrix}, \ \left \langle E, \begin{pmatrix}
 a & b \\ c & d
 \end{pmatrix}  \right \rangle= \begin{pmatrix}
 0 & 1 \\ 0 & 0
 \end{pmatrix}, \ \left \langle F, \begin{pmatrix}
 a & b \\ c & d
 \end{pmatrix}  \right \rangle= \begin{pmatrix}
 0 & 0 \\ 1 & 0
 \end{pmatrix}.
\end{align}



 


\begin{lemma}
\label{lem:integralpairing} The form \eqref{eq.form1} on $U^L_{q^2}(\mathfrak{sl}_2)$ is integral, i.e. it restricts to a map
$$  U^L_{q^2}(\mathfrak{sl}_2)\otimes_\mathcal R {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to \mathcal R= \mathbb Z[q^{\pm1/2}]  .$$

\end{lemma}
\begin{proof} It is enough to check that $\langle E^{(n)},x\rangle, \langle F^{(n)},x\rangle \in \mathcal R$ for $n\geq 1$ and $  x\in {\mathcal O}_{q^2}(\mathrm{SL}(2))$. 
Since $\Delta(E^{(n)})=\sum_{i=0}^{n} q^{2i(n-i)}E^{(i)}\otimes E^{(n-i)}K^i  $ it is sufficient to check the statement for the evaluations of $ E^{(i)}$ and $K^j$ on $a,b,c,d$ where this is a straightforward computation. Similarly for $F^{(n)}$. 
\end{proof}

\red{Recall that the rotation by $180^\circ$ of the bigon induces the involution $r:{\mathcal O}_{q^2}(\mathrm{SL}(2))\to {\mathcal O}_{q^2}(\mathrm{SL}(2))$, see Theorem \ref{teo:SL2}. Let $r^*:U_{q^2}(\mathfrak{sl}_2)\to U_{q^2}(\mathfrak{sl}_2)$ be the adjoint of the map $r$. We will show that $r^*$ is equal to the map $\rho$ of Lusztig's book \cite[Chapter 19]{Lusztig}, which is used in the study of canonical bases of quantum groups. 



Let $U_{q^2}(\mathfrak{sl}_2)-Mod$ (respectively $Mod-U_{q^2}(\mathfrak{sl}_2)$) be the monoidal category of left (respectively right) $U_{q^2}(\mathfrak{sl}_2)$-modules.
}
\begin{lemma}[Left and right modules]\label{lem:LRfunctors}


(a) The map  $r^*$ is an algebra antimorphism involution and a coalgebra morphism, i.e. for $x,y\in U_{q^2}(\mathfrak{sl}_2)$  one has $$(r^*)^2(x)=x\qquad r^*(xy)=r^*(y)r^*(x), \quad \Delta(r^*(x))=(r^*\otimes r^*)\circ \Delta(x).$$

Explicitly, the value of $r^*$ on the generators is 
 \begin{equation}  r^*(E)=q^2KF,\qquad  r^*(K)=K,\qquad r^*(F)=q^{-2}EK^{-1}.
\label{eq.rr}
 \end{equation} 

(b) The map $r^*$ induces monoidal functors $$LR:U_{q^2}(\mathfrak{sl}_2)-Mod\to Mod-U_{q^2}(\mathfrak{sl}_2), {\rm and}\ RL:Mod-U_{q^2}(\mathfrak{sl}_2)\to U_{q^2}(\mathfrak{sl}_2)-Mod$$ which are inverse to each other as follows: for each left (resp. right) module $M$
 the module $LR(M)$ (resp. $RL(M)$) is the right (resp. left) module whose underlying vector space is $M$ and on which the action of $x\in  U_{q^2}(\mathfrak{sl}_2)$ 
 is given by, with on $\alpha \in M$,
  $$ \alpha\cdot x:=r^*(x)\cdot \alpha \quad (resp.\ \  x\cdot \alpha:= \alpha\cdot r^*(x) ).$$


\end{lemma}

\begin{remark} Formula \eqref{eq.rr} shows that $r^*$ is equal to $\rho$ of \cite[Chapter 19]{Lusztig}.
\end{remark}
\begin{proof}
(a) Since $r$ is a algebra involution and a co-algebra antimorphism by  Theorem \ref{teo:SL2} and the Hopf pairing is non-degenerate,  its dual $r^*$ is an algebra antimorphism involution and a coalgebra morphism.



It is sufficient to compute $r^*$ on the generators where one can verify the values provided in the statement.
For instance:$$\langle r^*(E),a\rangle=\langle E,a\rangle=0=\langle q^2 KF,a\rangle=\langle q^2K\otimes F,a\otimes a+c\otimes b\rangle$$
$$\langle r^*(E),b\rangle=\langle E,c\rangle=0=\langle q^2 KF,b\rangle=\langle q^2K\otimes F,a\otimes b+b\otimes d\rangle$$
$$\langle r^*(E),c\rangle=\langle E,b\rangle=1=\langle q^2 KF,c\rangle=\langle q^2K\otimes F,c\otimes a+d\otimes c\rangle$$
$$\langle r^*(E),d\rangle=\langle E,d\rangle=0=\langle q^2 KF,d\rangle=\langle q^2K\otimes F,c\otimes b+d\otimes d\rangle$$

The verification for the pairings with $a,b,c,d$ for $r^*(F)$ and $r^*(K)$ are similar. 


(b) $LR$ and $RL$ are functors as $r^*:U_{q^2}(\mathfrak{sl}_2)\to U_{q^2}(\mathfrak{sl}_2)$ is an algebra antimorphism; they are inverse to each other as $r^*$ is an involution. Monoidality is a consequence of the fact that $r^*$ is a coalgebra morphism. 
\end{proof}
\subsection{Module structure of $\cS(\mathfrak S)$.}\label{sub:modulestructure} As usual, the Hopf duality implies that 
every right (resp. left) ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule $V$  has a natural structure of a left (resp. right) $U_{q^2}(\mathfrak{sl}_2)$-module, via the following construction. For $a \in U_{q^2}(\mathfrak{sl}_2)$ and $v \in V$, one has
 \begin{equation}   a \cdot v:= \sum \langle a, b' \rangle v', \quad \text{where}\quad \Delta_r(v) = \sum v' \otimes b'.
\label{eq.dual}
 \end{equation} 

To be precise, we have to replace $V$ by $V\otimes_\mathcal R {\BQ(q^{1/2})}$, since $U_{q^2}(\mathfrak{sl}_2)$ is defined over ${\BQ(q^{1/2})}$.

 
 \def\SS \ot_\cR \Qq{\cS(\fS) \otimes_\mathcal R {\BQ(q^{1/2})}}
 
 
In particular, for an edge $e$ of $\mathfrak S$ the right comodule structure $\null _e\Delta: \cS(\fS) \to  \cS(\fS) \otimes \cS(\cB)$ gives $\SS \ot_\cR \Qq$ a left module structure over $U_{q^2}(\mathfrak{sl}_2)$, and we want to understand this module structure.

 
 Fix an orientation ${\mathfrak o}$ of the boundary $\partial \fS$. Recall that $B(\mathfrak S;{\mathfrak o})$ is an $\mathcal R$-basis of $\cS(\mathfrak S)$. For each edge $e$ let $B_{e,d}(\mathfrak S;{\mathfrak o}) \subset B(\mathfrak S;{\mathfrak o})$ be the set of all $\alpha \in B(\mathfrak S;{\mathfrak o})$ such that $|\alpha\cap e|=d$ and all the states on $\alpha \cap e$ are signs $+$. Let
$B_e(\mathfrak S;{\mathfrak o}) = \cup _{d=0}^\infty B_{e,d}(\mathfrak S;{\mathfrak o})$. 
For $\alpha\in B_{e,d}(\mathfrak S;{\mathfrak o})$ and $\vec{\eta}\in \{\pm\}^d$, let $\alpha(\vec{\eta})$ be the same $\alpha$ except for the states of $e\cap \alpha$ which are given by $s(x_i)= \eta_i$, where $x_1, \dots, x_d$ are the points of $\alpha\cap e$ listed in decreasing order. In particular let $\alpha_j:=\alpha(+,+,\cdots ,+,-,-, \dots,-)$ where the number of $-$ is $j$. For example, $\alpha=\alpha_0$.
 \begin{lemma}[Module structures of $\cS(\mathfrak S)$ along an edge $e$]\label{lem:uqmodule}
The left action of $U_{q^2}(\mathfrak{sl}_2)$ on $\SS \ot_\cR \Qq$, dual to $\null _e\Delta$,  is: 
$$K_{left}(\alpha_j)=q^{2(d-2j)}\alpha_j$$
$$E_{left}(\alpha_0)=0,\ {\rm and}\ E_{left}(\alpha_j)=[j]_{q^2}\alpha_{j-1} \mod F^e_{d-1}$$
$$F_{left}(\alpha_d)=0,\ {\rm and} \ F_{left}(\alpha_j)=[d-j]_{q^2}\alpha_{j+1} \mod  F^e_{d-1}$$
where  $F^e_{d-1}= F^e_{d-1}(\SS \ot_\cR \Qq)$ is the ${\BQ(q^{1/2})}$-span of elements $\beta\in B(\mathfrak S;{\mathfrak o})$ with $|\beta \cap e| < d$. 
The right action, dual to $\Delta_e$, is given by the left action of $r^*(K),r^*(E),r^*(F)$ (see Lemma \ref{lem:integralpairing}). 


\end{lemma}
\begin{proof} \red{
By \eqref{eq.coact},  $\Delta(\alpha(\vec{\eta}))=\sum_{\vec{\epsilon} \in \{\pm\}^d} \alpha(\vec{\epsilon}) \otimes \alpha_{\vec{\epsilon}\vec{\eta}}$ where  $\alpha_{\vec{\epsilon}\vec{\eta}}$ is defined in Figure \ref{fig:bigon0}. If we define inductively $\Delta^{[d]} = (\Delta\otimes\mathrm{id}^{\otimes (d-2)} )\circ\Delta^{[d-1]}$ for $d\ge 3$, with $\Delta^{[2]} = \Delta$, then
\begin{align}
  \Delta^{[d]} (K)&= K^{\otimes d},\\
 \Delta^{[d]} (E)&= \sum_{j=1}^d 1^{\otimes (j-1)} \otimes E \otimes K^{\otimes  (d-j)},  \label{eq.DE} \\
 \Delta^{[d]} (F)&= \sum_{j=1}^d (K^{-1}) ^{\otimes j} \otimes F \otimes 1^{\otimes d-j-1}  \label{eq.DF}.
\end{align}
Applying these} to  compute the Hopf pairing of $K,E,F$ with $\alpha_{\vec{\epsilon}\vec{\eta}}$ we get
$$K_{left}(\alpha(\vec{\eta}))=q^{2\sum \eta_i}\alpha(\vec{\eta}),$$ 
$$E_{left}(\alpha(\vec{\eta}))=\sum_{j=1}^d (\delta_{\eta_j,-}) q^{2\sum_{k=j+1}^d \eta_k}\alpha(\eta_1,\cdots ,\eta_{j-1}, +, \eta_{j+1},\cdots, \eta_d),$$
$$F_{left}(\alpha(\vec{\eta}))=\sum_{j=1}^d (\delta_{\eta_j,+}) q^{-2\sum_{k=1}^{j-1} \eta_k}\alpha(\eta_1,\cdots ,\eta_{j-1},-,\eta_{j+1},\cdots ,\eta_d).$$
Now the main claim is a direct computation using relation \eqref{eq.order}.
\end{proof}






Let  $\mathfrak S$ have indexed boundary $\partial \mathfrak S=\{e^L_1,\ldots e^L_m, e^R_1,\ldots e^R_n\}$ as explained in Subsection \ref{sub:comodule}. The Hopf duality gives $\SS \ot_\cR \Qq$ an  algebra bimodule structure over $(U_{q^2}(\mathfrak{sl}_2)^{\otimes n},U_{q^2}(\mathfrak{sl}_2)^{\otimes m})$. (Notice the inversion between left and right when passing to modules). 

For each $\vec m\in \mathbb{N}^m$ and $\vec n\in \mathbb{N}^n$, let $B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$ be defined as:
$$B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})=\left(\bigcap_{i=1}^m B_{e_i^L,m_i}(\mathfrak S;{\mathfrak o})\right)\cap \left(\bigcap_{j=1}^n B_{e_j^R,n_j}(\mathfrak S;{\mathfrak o})\right).$$
Let also, for each $\vec{j}\leq \vec{m}$ and $\vec{h}\leq \vec{n}$ (component-wise) and each $\alpha\in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$ let $\alpha_{\vec{j},\vec{h}}\in B(\mathfrak S;{\mathfrak o})$ be the skein identical to $\alpha$ but for its state which is increasing and contains $\vec{j}$ (resp. $\vec{h}$) signs $-$ on the left (resp. right) edges. 


\begin{theorem}\label{teo:module} Suppose that $\mathfrak S$ has indexed boundary $\partial \mathfrak S=\{e^L_1,\ldots e^L_n, e^R_1,\ldots e^R_m\}$.

(a) For each $\vec m\in \mathbb{N}^m$ and $\vec n\in \mathbb{N}^n$ and each $\alpha \in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$, 
 the $ (U_{q^2}(\mathfrak{sl}_2)^{\otimes n},U_{q^2}(\mathfrak{sl}_2)^{\otimes m})$-bimodule generated by $\alpha$ (namely $U_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha \cdot U_{q^2}(\mathfrak{sl}_2)^{\otimes m}$) is irreducible and isomorphic to $V^L_{n_1}\otimes\cdots \otimes V^L_{n_n}\otimes V^R_{m_1}\otimes\cdots \otimes V^R_{m_m}$, where $V^L_k$ (resp. $V^R_k$) is the irreducible left (resp. right) module on $U_{q^2}(\mathfrak{sl}_2)$ with highest weight $k$. 

(b) As $ (U_{q^2}(\mathfrak{sl}_2)^{\otimes n},U_{q^2}(\mathfrak{sl}_2)^{\otimes m})$-bimodules, we have
 \begin{equation}  
\SS \ot_\cR \Qq = \bigoplus U_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha\cdot U_{q^2}(\mathfrak{sl}_2)^{\otimes m}.
 \end{equation} 
where the sum is taken over all $\vec{m}\in \mathbb{N}^m,\vec{n}\in \mathbb{N}^n$, and all $\alpha\in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$.
In particular, the bimodule $\cS(\mathfrak S)$ is a direct sum of finite dimensional bimodules over $ (U_{q^2}(\mathfrak{sl}_2)^{\otimes n},U_{q^2}(\mathfrak{sl}_2)^{\otimes m})$.

(c) Furthermore the bimodule structure restricts to that of a $ (U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n},U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m})$-bimodule (where $U^L_{q^2}(\mathfrak{sl}_2)$ is the integral version of $U_{q^2}(\mathfrak{sl}_2)$) and a decomposition similar to the above one holds:
 \begin{equation}  
\cS(\mathfrak S) = \bigoplus \foo_{\vec{j}\leq \vec{m},\vec{h}\leq \vec{n}} \left( U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha_{\vec j,\vec{h}}\cdot U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m}\right)
 \end{equation} 
where the direct sum is taken over all $\vec{m}\in \mathbb{N}^m,\vec{n}\in \mathbb{N}^n$ and all $\alpha\in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$, and the $\foo_{\vec{j},\vec{h}}$ symbol stands for the non direct sum.
 
\end{theorem}



\begin{proof} 

(a) Fix $m_i, n_j$ and $\alpha$ as in the statement and let $JW(\alpha)$ be the skein obtained by inserting a $JW_{m_i}$ near $e^L_i$ and a $JW_{n_j}$ near $e^R_j$ for all $i,j$. By Example \ref{ex:joneswenzl} it is clear that $\alpha=JW(\alpha)$ and by Lemma \ref{lem:uqmodule} that it is a highest weight vector of weight $q^{2m_i}$ for the action of the $i^{th}$-copy of $U_{q^2}(\mathfrak{sl}_2)$ for each $i\leq m$; similarly it is a highest weight vector of weight $q^{2n_j}$ for the right action of the $j^{th}$-copy of $U_{q^2}(\mathfrak{sl}_2)$.  Furthermore, by Lemma \ref{lem:uqmodule} and the fact that the $m^{th}$-Jones Wenzl projector kills the self-returns, the orbit of $\alpha$ is exactly the span of the vectors $JW(\alpha_{\vec j,\vec{h}})$ with $\vec j\leq \vec m$ and $\vec h\leq \vec n$. 

(b)
It is straightforward from $a)$ and from Theorem \ref{thm.basis1a}.

(c) If a left (resp. right) $U_{q^2}(\mathfrak{sl}_2)$-module weight $M$ (over ${\BQ(q^{1/2})}$) has a basis formed by weight vectors over which the action of $E^{(r)}, F^{(r)},r\geq 1$ has coefficients in $\mathcal R$, then $M$ restricts to a $U^L_{q^2}(\mathfrak{sl}_2)$-module; 
 we claim that  the basis $B(\mathfrak S;{\mathfrak o})$ of $\cS(\mathfrak S)$ has this property. Indeed since the structure of module is induced by the right (resp. left) comodule structure on each edge and the Hopf pairing between $U_{q^2}(\mathfrak{sl}_2)$ and ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, and since the comodule structure is integral in the basis $B(\mathfrak S;{\mathfrak o})$, it is sufficient to observe that the Hopf pairing between $U_{q^2}(\mathfrak{sl}_2)$ and ${\mathcal O}_{q^2}(\mathrm{SL}(2))=\cS(\mathfrak B)$ extends to a $\mathcal R$-bilinear Hopf pairing between $U^L_{q^{2}}(\mathfrak{sl}_2)$ in the basis $B(\mathfrak B,{\mathfrak o})$: this is the content of point $(1)$ of Lemma \ref{lem:integralpairing}. 

To prove that the direct sum decomposition still holds,
let 
 $$B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o}):=\{\alpha\in B(\mathfrak S;{\mathfrak o})|\# (\alpha\cap e^L_i)\leq m_i ,\# (\alpha\cap e^R_j)\leq n_j, \forall i\leq m, \forall j\leq n \}\setminus B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o}).$$ 
 
To prove the claim, we will show that for each $\alpha \in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$, the following holds:
$$\left(\mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})\right)\bigcap \left(\foo_{\vec{j}\leq \vec{m},\vec{h}\leq \vec{n}}\left( U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha_{\vec j,\vec{h}}\cdot U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m}\right)\right)=\{0\}.$$


We start by remarking that if $\alpha\in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$, then $\alpha=JW(\alpha)$ and so, over ${\BQ(q^{1/2})}$, its orbit is a direct summand of $\cS(\mathfrak S)$ and thus it has trivial intersection with the $\mathcal R$-span of $B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$: 
$$\left(\mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})\right)\bigcap \left( U_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha\cdot U_{q^2}(\mathfrak{sl}_2)^{\otimes m}\right)=\{0\}.$$


Furthermore, by the point (b), given $\vec{j}\leq \vec{m},\vec{h}\leq \vec{n}$,  there exist $c(\vec{j},\vec{h})\in \mathcal R\setminus 0$ and $\ell(\vec{j},\vec{h})\in \mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$ such that $c(\vec{j},\vec{h}) \alpha_{\vec{j},\vec{h}}+\ell(\vec{j},\vec{h})$ is in the orbit of $\alpha$: 
$$c(\vec{j},\vec{h}) \alpha_{\vec{j},\vec{h}}+\ell(\vec{j},\vec{h})\in U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha\cdot U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m}.$$ 


Now suppose that for some $l_i\in U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m}$ and $r_i\in  U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n}$ and some $\vec{j}_i,\vec{h}_i$ it holds $$\sum_{i} l_i\cdot \alpha_{\vec{j}_i,\vec{h}_i}\cdot r_i\in \mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})\setminus \{0\}.$$
Then, multiplying by $\prod_{i} c(\vec{j}_i,\vec{h}_i)$ (which gives a non-zero vector as $\cS(\mathfrak S)$ is free as a $\mathcal R$-module) we also get that 
$\sum_{i} l_i \cdot \alpha\cdot r_i \in \mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})\setminus \{0\}$,
which as already argued is impossible. 

\end{proof}

 \begin{example}\label{ex:bigonright}
Let $\mathfrak B$ be the bigon whose edges $e_l$ and $e_r$ are declared to be respectively of type $L$ and $R$. Then by Theorem \ref{teo:SL2}, $\cS(\mathfrak B)$ is the right and left module $U_{q^2}(\mathfrak{sl}_2)$-module ${\mathcal O}_{q^2}(\mathrm{SL}(2))$: the left action is induced by the right comodule structure coming from $e_r^R$ and the right action from $e_l^L$. 
If we let $\mathfrak B^R$ be the bigon where both $e_l$ and $e_r$ are declared to be of type R (right), then $\cS(\mathfrak B^R)$ is a left $(U_{q^2}(\mathfrak{sl}_2))^{\otimes 2}$-module; the action of $x\otimes y$ on a skein $b\in \cS(\mathfrak B^R)$ is given by 
$$(x\otimes y) \cdot b=x\cdot b\cdot r^*(y)$$ where $r^*(y)$ is the algebra antimorphism provided in Lemma \ref{lem:LRfunctors} and the left and right actions are those on $\cS(\mathfrak B)$ described above. 
\end{example}


\subsection{Co-tensor product} Suppose  $U$ is a coalgebra over a ground ring $\mathcal R$. Assume 
$M$ is a left $U$-comodule with coaction  $\Delta_M:M\to U\otimes_{\mathcal R} M$, and $N$ a right $U$-comodule with coaction $\Delta_N:N\to N\otimes_R U$. 
Then the cotensor product $N \Box _U M $  is
$$N\Box_U M:=\{v\in N\otimes M \mid (\Delta_N\otimes \mathrm{id}_M)(v)=(\mathrm{id}_N\otimes \Delta_M)(v)\}.$$

Cotensor product is a special case of the following notion of Hochshild cohomology. 
Assume $V$ is a $\mathcal R$-module with a left $U$-coaction and a right $U$-coaction:
$$ \Delta_r: V \to V \otimes U, \quad _l\Delta: V \to U \otimes V .$$
The 0-th Hochshild cohomology of $V$ is defined by
$$ HH^0(V)= \{ x\in V \mid \Delta_r(x) =  \mathrm{fl}(\null_l\Delta(x)),$$
where $\mathrm{fl}: V \otimes U\to U \otimes V$ is the flip $\mathrm{fl}(x\otimes y) = y \otimes x$.

With $M$ and $N$ as above, define a left $U$-coaction and a right $U$ coaction on $N \otimes_R M$ by
\begin{align*}
\Delta_r &: N \otimes_R M \to N \otimes_R M \otimes_R U, \quad \Delta_r(n \otimes m) = \sum n' \otimes m \otimes u' \ \text{if}\  \Delta_N(n) = \sum n' \otimes u' \\
\null_l\Delta &: N \otimes_R M \to  U \otimes_R N \otimes_R M, \quad \null_l\Delta (n \otimes m) = \sum u'' \otimes n \otimes m''  \ \text{if}\  \Delta_M(m) = \sum u'' \otimes m''.
\end{align*}

Then the cotensor product $N\Box_U M= HH^0(N\otimes_{\mathcal R} M)$.



\subsection{Splitting as co-tensor product and Hochshild cohomology}



\def\null _c\D{\null _c\Delta}
\def\D_c{\Delta_c}
\def\null _l\D{\null _l\Delta}
\def\D_r{\Delta_r}

Suppose $c_1, c_2$ are distinct boundary edges of a punctured bordered surface $\mathfrak S'$ and $\mathfrak S= \mathfrak S'/(c_1=c_2)$, with $c\subset \mathfrak S$ being the common image of $c_1$ and  $c_2$.  The splitting homomorphism gives an embedding 
$\theta_c: \cS(\mathfrak S) \hookrightarrow \cS(\mathfrak S') $ and  we will make precise the image of $\theta_c$. 

 
 
 
 
 \FIGc{split2}{(a) The middle shaded part is the bigon, while the left and the right shaded parts are part of $\mathfrak S'$. Gluing $c_1=e_l$ gives the right coaction $\D_r$ and gluing $e_r=c_2$ gives the left coaction $\null _l\D$.
 (b) Element $\null  x _{{\vec\nu}{\vec \mu}}\in \cS(\mathfrak S')$. The horizontal lines are part of $x$. Note the order of indices.}{2.6cm}

\begin{theorem}\label{teo:cotensor} 
Suppose $c_1, c_2$ are distinct boundary edges of a punctured bordered surface $\mathfrak S'$ and $\mathfrak S= \mathfrak S'/(c_1=c_2)$. The splitting homomorphism  
 \begin{equation}   \theta_c: \cS(\mathfrak S) \hookrightarrow \cS(\mathfrak S') \label{eq.split6}.
 \end{equation} 
maps $\cS(\fS)$ isomorphically onto the Hochshild cohomology $HH^0(\mathscr S(\mathfrak S'))$, which is a $\mathscr S(\mathcal B)$-bimodule via the left coaction $\null _l\D:= \null_{c_2}\Delta$ and the right coaction $\D_r:= \Delta_{c_1}$ (see Figure \ref{fig:split2}(a)).


In particular, if $c_1$ is a boundary edge of $\mathfrak S'_1$ and $c_2$ is a boundary edge of $\mathfrak S'_2$ which is disjoint from $\mathfrak S'_1$, and $\mathfrak S=(\mathfrak S'_1 \sqcup \mathfrak S'_2)/(c_1=c_2)$,  then $\theta_c$ maps $\cS(\mathfrak S)$ isomorphically onto
the cotensor product of $\cS(\mathfrak S'_1)$ and $\cS(\mathfrak S'_2)$ over $\cS(\mathfrak B)$.
\end{theorem}




\def\mathrm{coef}{\mathrm{coef}}
\def{\vec \tau}{{\vec \tau}}
\begin{proof} Let us identify $\cS(\fS)$ with its image under $\theta_c$.
 From the splitting formula \eqref{eq.slit} it is easy to see that $\cS(\mathfrak S)\subset HH^0(\cS(\mathfrak S'))$. Let us prove the converse inclusion.
Assume  $0\neq v \in HH^0(\cS(\mathfrak S'))$.  By definition, this means
 \begin{equation}  
\D_r(v) - \mathrm{fl}(\null _l\D(v))=0.
 \end{equation} 


Choose an orientation ${\mathfrak o}$ of $\partial \fS$ and an orientation of $c$. Then ${\mathfrak o}$ and the orientation of $c_1$ and $c_2$ induced from $c$ give an orientation ${\mathfrak o}'$ of $\partial \fS'$. 
Recall that  $B(\mathfrak S';{\mathfrak o}')$ is a free $\mathcal R$-basis of $\cS(\mathfrak S')$. Let $\tilde B(\mathfrak S';{\mathfrak o}')$ be the set of all
isotopy classes $x$ of ${\mathfrak o}'$-ordered $\partial M'$-tangle diagrams which are increasingly stated on every boundary edge except for $c_1$ and $c_2$. 
If ${\vec \mu}$ is a state of $x \cap c_1$ and ${\vec\nu}$ is a state of $x\cap c_2$, let $x _{{\vec\nu}{\vec \mu}}$ be the  stated ${\mathfrak o}'$-ordered $\partial M'$-tangle
 diagram whose states on $x \cap c_1$ and $x \cap c_2$ are respectively ${\vec \mu}$ and ${\vec\nu}$. See Figure \ref{fig:split2}(b). 
If ${\vec \mu}$ and ${\vec\nu}$ are increasing, then $x _{{\vec\nu}{\vec \mu}} \in B(\mathfrak S', {\mathfrak o}')$ is a basis element. For each $i=1,2$ let $S_{x\cap c_i}$ and $S_{x \cap c_i}^\uparrow$ be respectively the set of all states and the set of all increasing states of $x \cap c_i$. Then
$$ B(\mathfrak S',{\mathfrak o}') = \{ x_{{\vec\nu}{\vec \mu}} \mid x \in \tilde B(\mathfrak S', {\mathfrak o}'), {\vec \mu} \in S_{x \cap c_1}^\uparrow, {\vec\nu} \in S_{x \cap c_2}^\uparrow \}.$$
Using the above  $\mathcal R$-basis $B(\mathfrak S';{\mathfrak o}')$ of $\cS(\mathfrak S')$, we can present $v\in  \cS(\mathfrak S')$ in the form
 \begin{equation}  v=\sum_{x\in X(v)}\,  \sum_{  {\vec \mu} \in S_{x \cap c_1}^\uparrow }\,  \sum_{  {\vec\nu} \in S_{x \cap c_2}^\uparrow } \, \mathrm{coef}(v, x_{{\vec\nu}{\vec \mu}})\, \, x_{{\vec\nu}{\vec \mu}},
\label{eq.v}
 \end{equation} 
where $X\subset \tilde B(\mathfrak S';{\mathfrak o}')$ is a minimal finite set, so that for each $x\in X$, there are ${\vec \mu}, {\vec\nu}$ such that  the coefficient  $\mathrm{coef}(v, x_{{\vec\nu}{\vec \mu}})$ is non-zero.

Let $m(v)=\max\{ |x \cap c_1|, |x\cap c_2|,  x\in X(v)\}$. We show by induction on $m(v)$ that $v \in \cS(\mathfrak S)$.

For $i=1,2$ let $X_i(v)= \{ x\in X(v) , |x \cap  c_i| = m\}$.   If $x\in X_1(v)\cap X_2(v)$, then $|x\cap c_1|=|x \cap c_2|= m(v)$, and there is an element $\bar x\in \mathfrak B(\mathfrak S,{\mathfrak o})$ such that $x$ has coefficient non-zero in the result of splitting $\bar x$ along $c$. From the definition of the splitting map we have
 \begin{equation}  
\mathrm{coef}(\theta(\bar x), x_{{\vec \tau}\btau})= 1, \label{eq.max}
 \end{equation} 
where ${\vec \tau}= (+)^m$ is the state consisting of $m$ plus signs. Let 
$$v' = v - \sum _{x\in X_1(v) \cap X_2(v)} \mathrm{coef}(v, x_{{\vec \tau} {\vec \tau}} ) \, \theta(\bar x).$$ 
If $m(v') < m(v)$ then  we are done by induction. Assume that $m(v')=m(v)$. One of $X_1(v'), X_2(v')$ is not empty, and
without loss of generality assume $X_2(v') \neq \emptyset$. Formula \eqref{eq.v} for $v'$ has the form
 \begin{equation}  
v'=\sum_{x\in X(v')}\,  \sum_{  {\vec \mu} \in S_{x \cap c_1}^\uparrow }\,  \sum_{  {\vec\nu} \in S_{x \cap c_2}^\uparrow } \, \mathrm{coef}(v', x_{{\vec\nu}{\vec \mu}})\, \, x_{{\vec\nu}{\vec \mu}},
\label{eq.vp}
 \end{equation} 
and because of \eqref{eq.max} we can assume that there is no $x_{\tau\tau}$ on the right hand side of \eqref{eq.vp}.

Let $p^{c_2}_m:  \cS(\mathfrak S') \to \cS(\mathfrak S')$ be
 the projection onto the homogeneous part $G^{c_2}_m(\cS(\mathfrak S'))$,  and $p^{e_r}_m: \cS(\mathfrak B) \to \cS(\mathfrak B)$ be the projection onto the homogeneous part $G^{e_r}_m(\cS(\mathfrak B))$, see the end of Section \ref{sec.filtration}. Explicitly, for $x\in X(v')$ we have
 \begin{equation} 
p^{c_2}_m (x_{{\vec\nu}{\vec \mu}})= \begin{cases} 0 \quad &\text{if} \ {\vec\nu} \neq {\vec \tau} \\
x_{{\vec \tau} {\vec \mu}} & \text{if} \ {\vec\nu} = \tau,
\end{cases} \quad p^{e_r}_m (\alpha_{{\vec\nu}{\vec \mu}})= \begin{cases} 0 \quad &\text{if} \ {\vec \mu} \neq \tau \\
\alpha_{{\vec\nu}{\vec \tau}}  & \text{if} \ {\vec \mu} = {\vec \tau}.
\end{cases}
 \end{equation} 


From Formula \eqref{eq.coact} for the coaction, we have, for $x\in X(v')$ and $({\vec\nu},{\vec \mu}) \neq ({\vec \tau},{\vec \tau})$, 
\begin{align}
\label{eq.sp1}x _{{\vec\nu}{\vec \mu}} & \overset{\D_r}{\longrightarrow}  \sum _{{\vec \eta}\in  S_{x \cap c_1}}  x _{{\vec\nu}{\vec \eta}}  \otimes  \alpha _{{\vec \eta}{\vec \mu}}  \overset{p^{c_2}_m \otimes p^{e_r}_m}{\longrightarrow} 0 \\ 
\label{eq.sp2}x _{{\vec\nu}{\vec \mu}} & \overset{\null _l\D}{\longrightarrow} \sum _{{\vec \eta}\in  S_{x \cap c_2}}  \alpha _{{\vec\nu}{\vec \eta}} \otimes   x _{{\vec \eta}{\vec \mu}} \overset{\mathrm{fl}}{\longrightarrow} \sum _{\vec \eta}   x _{{\vec \eta}{\vec \mu}}  \otimes  \alpha _{{\vec\nu}{\vec \eta}} \overset{p^{c_2}_m \otimes p^{e_r}_m}{\longrightarrow} \begin{cases}   0 \ &\text{ if } \ x \not \in X_2(v') \\
x_{{\vec \tau} {\vec \mu}} \otimes \alpha _{{\vec\nu}{\vec \tau}}  \ &\text{ if } \ x \in X_2(v'). \end{cases}
\end{align}
It follows that
$$ 0= (p^{c_2}_m \otimes p^{e_r}_m )(\mathrm{fl} (\null _l\D (v')) - \D_r(v'))=  \sum_{x\in X_2(v')} \sum_{  {\vec \mu} \in S_{x \cap c_1}^\uparrow }\,  \sum_{  {\vec\nu} \in S_{x \cap c_2}^\uparrow } \, \mathrm{coef}(v', x_{{\vec\nu}{\vec \mu}})\,  \, x_{{\vec \tau} {\vec \mu}} \otimes \alpha _{{\vec\nu}{\vec \tau}}.$$
As the right hand side is a linear combination of elements of a basis, all the coefficients 
$v$ there are 0. This means $X_2(v')=\emptyset$, a contradiction. Thus $m(v') < m(v)$ and we are done.
\end{proof}

\begin{remark}\label{rem:cotensor}
Theorem \ref{teo:cotensor} holds also if we change the base ring to $\mathbb{C}$ by evaluating $q$ to a non-zero complex number. 
\end{remark}
\def\cS(\fS') \ot_\cR \Qq{\mathscr S(\mathfrak S') \otimes_\mathcal R {\BQ(q^{1/2})}}
Using the above result together with Theorem \ref{teo:module} we can deduce a similar result for $U_{q^2}(\mathfrak{sl}_2)$-modules.
Recall that for a bi-module $V$ over a ${\BQ(q^{1/2})}$-algebra $U$ the 0-homology group is
$$ HH_0(V) = V/{\BQ(q^{1/2})}{\text - span}\langle  a \cdot v - v \cdot a \mid a \in U, v \in V\rangle.$$


\begin{theorem}\label{r.Hoch2}
Suppose $c_1, c_2$ are distinct boundary edges of a punctured bordered surface $\mathfrak S'$ and $\mathfrak S= \mathfrak S'/(c_1=c_2)$, with $c$ being the common image of $c_1$ and $c_2$. Then the composition
 \begin{equation}   \SS \ot_\cR \Qq \overset{\theta_c} \longrightarrow  \mathscr S(\mathfrak S') \otimes_R {\BQ(q^{1/2})} \to HH_0(\mathscr S(\mathfrak S') \otimes_R {\BQ(q^{1/2})})
\label{eq.iso6}
 \end{equation} 
is an isomorphism of ${\BQ(q^{1/2})}$-vector spaces. Here $\cS(\fS') \ot_\cR \Qq$ is a $U_{q^2}(\mathfrak{sl}_2)$-bimodule via the dual actions of $\Delta_{c_1}$ and $\eDD{c_2}$.



In particular, if $\mathfrak S'= \mathfrak S_1 \sqcup \mathfrak S_2$ with $c_1 \subset \mathfrak S_1$ and $c_2 \subset \mathfrak S_2$, then the map in \eqref{eq.iso6} is an isomorphism between  $\SS \ot_\cR \Qq$ and  $(\mathscr S(\mathfrak S_1) \otimes_R {\BQ(q^{1/2})}) \otimes_{U_{q^2}(\mathfrak{sl}_2)} (\mathscr S(\mathfrak S_2) \otimes_R {\BQ(q^{1/2})})$. 
\end{theorem}


\begin{proof}{

The decomposition of $\mathscr S(\mathfrak S') \otimes_R {\BQ(q^{1/2})}$ given by part (b) of Theorem \ref{teo:module} shows that it is sufficient to prove that if $V^R_{m_2}$ (resp. $V^L_{m_1}$) is the irreducible $m_2+1$-dimensional (resp. $m_1+1$-dimensional) right (resp. left) $U_{q^2}(\mathfrak{sl}_2)$-module, then the composition of natural map
 \begin{equation}   HH^0(V^L_{m_1}\otimes V^R_{m_2}) \hookrightarrow V^L_{m_1}\otimes V^R_{m_2}\twoheadrightarrow 
 HH_0( V^L_{m_1}\otimes V^R_{m_2})
 \end{equation} 
is an isomorphism of vector spaces. We will see that this follows from the fact that every finite-dimensional $U_{q^2}(\mathfrak{sl}_2)$-module $V$ is equivalent to its dual $V^*$.

First observe that since the pairing between ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ and $U_{q^2}(\mathfrak{sl}_2)$ is non degenerate, $HH^0(V^L_{m_1}\otimes V^R_{m_2})$ can be equivalently defined as 
$$HH^0(V^L_{m_1}\otimes V^R_{m_2})=\{v\otimes w\in V^L_{m_1}\otimes V^R_{m_2}| x\cdot v\otimes w=v\otimes w\cdot x,\ \forall x\in U_{q^2}(\mathfrak{sl}_2)\}.$$
Then using the isomorphism between $V^R_{m_2}$ and $(V^L_{m_2})^*$ we have :
$$HH^0(V^L_{m_1}\otimes V^R_{m_2})=Hom_{U_{q^2}(\mathfrak{sl}_2)}(V^L_{m_2},V^L_{m_1})=\delta_{m_1,m_2} {\BQ(q^{1/2})}$$
by Schur's lemma.

Now let's take the dual of the above equation and get: 
 \begin{equation}   (HH_0( V^L_{m_1}\otimes V^R_{m_2}))^*\hookrightarrow 
  (V^R_{m_2})^*\otimes (V^L_{m_1})^*\twoheadrightarrow (HH^0(V^L_{m_1}\otimes V^R_{m_2}))^*
  \end{equation} 
 where the first arrow maps an element of $(HH_0( V^L_{m_1}\otimes V^R_{m_2}))^*$ to some $f\in (V^L_{m_1}\otimes V^R_{m_2})^*$ such that $f(x \cdot v\otimes w)=f(v\otimes w\cdot x)$ for all $x\in U_{q^2}(\mathfrak{sl}_2)$ and $v\otimes w\in V^L_{m_1}\otimes V^R_{m_2}$.  Using again the isomorphism between $(V^R_{m_2})^*$ and $V^L_{m_2}$ we have that the image of $(HH_0( V^L_{m_1}\otimes V^R_{m_2}))^*$ in $V^L_{m_2}\otimes (V^L_{m_1})^*$ is $Hom_{U_{q^2}(\mathfrak{sl}_2)}(V^L_{m_1},V^L_{m_2})=\delta_{m_1,m_2}{\BQ(q^{1/2})}$ by Schur's lemma. 
 
 To conclude, observe that if $m_1=m_2$ then the image of the inclusion $HH^0(V^L_{m_1}\otimes V^R_{m_1}) \hookrightarrow V^L_{m_1}\otimes V^R_{m_1}\simeq V^L_{m_1}\otimes (V^L_{m_1})^*=Hom(V^L_{m_1},V^L_{m_1})$ is given by the multiples of the identity map. But the kernel of the projection $V^L_{m_1}\otimes V^R_{m_1}\twoheadrightarrow HH_0(V^L_{m_1}\otimes V^R_{m_1})$ is the sub vector space of $Hom(V^L_{m_1},V^L_{m_1})$ spanned by the matrices of the form $xM-Mx$ where $x$ represents the action of an element of $U_{q^2}(\mathfrak{sl}_2)$ and $M\in Hom(V^L_{m_1},V^L_{m_1})$; thus it is contained the set of matrices with zero trace and so the projection of $HH^0(V^L_{m_1}\otimes V^R_{m_1})$ in $HH_0(V^L_{m_1}\otimes V^R_{m_1})$ is nonzero. 


}   
\end{proof}
\begin{remark}
By the splitting theorem and Proposition \ref{r.Hoch2}, $\cS(\mathfrak S)$ is both a submodule and a quotient module of $\cS(\mathfrak S')$.
\end{remark}


\begin{example}\label{ex:bigonR}
Clearly, if in Theorem \ref{r.Hoch2} $c_1=e_i^R$ and $c_2=e_j^L$ belong to two distinct connected components of $\mathfrak S'$, then one can restate the $HH_0$ simply as a tensor product over a copy of $U_{q^2}(\mathfrak{sl}_2)$ acting on the left on the skein algebra of one component and on the right on the other.

In particular, if $\mathfrak S$ is obtained by glueing a bigon $\mathfrak B$ along its right edge to a left edge of $\mathfrak S'$ then $\cS(\mathfrak S)=\cS(\mathfrak S')\otimes_{U_{q^2}(\mathfrak{sl}_2)} \cS(\mathfrak B)$ is isomorphic to $\cS(\mathfrak S')$ as it can be seen  directly by Theorem \ref{thm.1a}.
 
If $\mathfrak B^R$ is the bigon whose edges are both declared to be of type $R$ (right), then $\cS(\mathfrak B^R)$ is a left module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes 2}$ (see Example \ref{ex:bigonright}). Then glueing $\mathfrak B^R$ to $\mathfrak S'$ along one edge of type $L$, shows that 
$$\cS(\mathfrak S)=\cS(\mathfrak S')\otimes _{U_{q^2}(\mathfrak{sl}_2)} \cS(\mathfrak B^R).$$
The resulting surface $\mathfrak S$ is still homeomorphic to $\mathfrak S'$ but the edge on which the glueing has been performed has been transformed from an edge of type $L$ to one of type $R$. This corresponds to applying Lemma \ref{lem:LRfunctors} to the module structure coming from that edge. 
\end{example}
\begin{remark}\label{rem:glueingcommutes}
If $c'_1,c'_2$ are two other edges of $\partial \mathfrak S'$ (and then of $\partial \mathfrak S$), \eqref{eq.iso6} is an isomorphism of $U_{q^2}(\mathfrak{sl}_2)$-modules for the structure associated to $c'_1$ and $c'_2$. Furthermore the theorem can be applied independently to glue also $c'_1$ and $c'_2$ and the final isomorphism between $\cS(\mathfrak S'/(c_1=c_2,c'_1=c'_2))\otimes {\BQ(q^{1/2})}$ and  $HH^0(\cS(\mathfrak S')\otimes {\BQ(q^{1/2})})$ (with respect to the $U_{q^2}(\mathfrak{sl}_2)^{\otimes 2}$-bimodule structure) does not depend on the order in which the glueing was performed.
\end{remark}



\def\underline{\ot}{\underline{\otimes}}
\def{ _1\Delta }{{ _1\Delta }}
\def \cSs(\fS){ \cS(\mathfrak S)}
\def\ufS{\underline{\mathfrak S}} 
\def\underline \ast{\underline \ast}
\subsection{Braided tensor product} 


Let $U$ be a dual quasitriangular Hopf algebra. 
Assume $A$ is an algebra admitting two right $U$-comodule-algebra structures $\Delta_1:A\to A\otimes U$ and $\Delta_2:A\to A\otimes U$ which commute, i.e.
 \begin{equation}  (\Delta_1\otimes \mathrm{Id}_U)\circ \Delta_2 =(\mathrm{Id}_A \otimes \mathrm{fl} )\circ(\Delta_2\otimes \mathrm{Id}_U)\circ \Delta_1 
\label{eq.D12}
 \end{equation} 
where $\mathrm{fl} :U\otimes U\to U\otimes U$ is the flip operator. Denote the common operator of \eqref{eq.D12} by $\Delta_{12}$. 

 
Observe that since $\Delta_1$ and $\Delta_2$ commute,  $A$ can be endowed with a right $U$-comodule structure $\underline{ \Delta} :=\Delta_1 \underline \ast \Delta_2: A \to A \otimes U$ defined by
 \begin{equation}  
\underline{ \Delta} (x) = \sum x' \otimes u_1 u_2 \ \text{if} \ \Delta_{12}(x) = \sum x'\otimes u_1 \otimes u_2.
 \end{equation} 



However $\underline{ \Delta} : A \to A \otimes U$ is not an algebra homomorphism, i.e. $A$ is not a right $U$-comodule algebra with respect to $\underline{ \Delta} $, even though it is a right $U$-comodule algebra with respect to each of  $\Delta_1$ and $\Delta_2$. So we define a new product. For $x,y\in A$ let
 \begin{equation}  \label{eq:selfproduct}
 x\underline \ast y = \sum x' y' \rho(u \otimes v) \ \text{if} \ 
\Delta_2 (x) =\sum x' \otimes u,  
\Delta_1(y) =\sum y' \otimes v.
 \end{equation} 
 It is easy to check that $\underline \ast$ gives $A$ a new associative product, and we call $A$ with this new product  the \emph{self braided product} of $\Delta_1$ and $\Delta_2$ and denote it $\underline{\ot} A$.
 
 

\begin{lemma} 
With respect to the product $\underline \ast$ and the right $U$-comodule given by $\underline{ \Delta} =\Delta_1 \underline \ast \Delta_2$, the algebra $A$ is a right $U$-comodule-algebra. 
\end{lemma}
\begin{proof} We have to show that for $x,y\in A$ one has 
 \begin{equation}  \underline{ \Delta}  (x\underline \ast y)= \underline{ \Delta} (x)\underline \ast\,  \underline{ \Delta}  (y).  \label{eq.uw1}
 \end{equation} 
Let us now  write $\Delta_{12}(x)$ and $\Delta_{12}(y)$ as
\begin{align*}
\Delta_{12}(x)= \sum x' \otimes u_1 \otimes u \in A \otimes U \otimes U \\
\Delta_{12}(y)= \sum y' \otimes v  \otimes v_2 \in A \otimes U \otimes U.
\end{align*}
 Using  the commutativity of $\Delta_1$ and $\Delta_2$ and a simple calculation, we obtain
\begin{align}
 \underline{ \Delta} (x\underline \ast y) &= \sum \rho(u''\otimes v'') \, x' y'  \otimes u_1   v'u'    v_2      \label{eq.eq1}\\
 \underline{ \Delta} (x)\underline \ast\,  \underline{ \Delta}  (y)  &= \sum  \rho(u'\otimes v') \, x' y'  \otimes u_1   u'' v''     v_2   \label{eq.eq2} ,
\end{align}
where $\Delta(u)= \sum u' \otimes u'', \Delta(v) = v' \otimes v''$ are coproducts in $U$.
The right hand sides of \eqref{eq.eq1} and \eqref{eq.eq2} are equal thanks to \eqref{eq.rflip}. This proves \eqref{eq.uw1}. For those who are familiar with graphical calculations in Hopf algebras,
we provide a graphical proof in Figure \ref{fig:selftensorproductcompatible}.
\end{proof}
\begin{figure}[htpb]
\raisebox{1cm}{$\underline{ \Delta} (\cdot \underline \ast \cdot)=$}
\includegraphics[width=1.9cm]{selftensorproduct1-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=1.9cm]{selftensorproduct2-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=1.9cm]{selftensorproduct3-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=2.08cm]{selftensorproduct4-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=2cm]{selftensorproduct5-eps-converted-to.pdf}\raisebox{1cm}{=}\\\

\raisebox{1cm}{=}\includegraphics[width=1.7cm]{selftensorproduct6-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=1.7cm]{selftensorproduct7-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=1.7cm]{selftensorproduct8-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=2cm]{selftensorproduct9-eps-converted-to.pdf}\raisebox{1cm}{$=\underline{ \Delta} (\cdot) *\underline{ \Delta} (\cdot)$}
\caption{The proof of the compatibility of $\underline{ \Delta} $ and $\underline \ast$. The diagrams are to be read from bottom to top, the thick (resp. thin) strands are $A$-colored (resp. $U$-colored), the crossings are flips, the white (resp. gray) solid dots represent $\Delta_1$ (resp. $\Delta_2$), the rectangle represents the co-$R$-matrix $\rho$, the black (resp. white) triangle is the product (resp. coproduct) of $U$, the thick trivalent vertex is the initial product in $A$. The equalities follow in order from: compatibility of $\Delta_i$ with the product of $A$, $\Delta_1$ commutes with of $\Delta_2$, coassociativity of $\Delta_i$, associativity of the product in $U$, equation \eqref{eq.rflip},  coassociativity of $\Delta_i$, $\Delta_1$ commutes with $\Delta_2$, associativity of the product in $U$.
}\label{fig:selftensorproductcompatible}
\end{figure}



\begin{example}[Braided tensor product]
The first  example of the above structure is the well-known {\em braided tensor product of two right comodule-algebras}, which we describe in details for the reader's convenience.
Suppose $A_1, A_2 $ are right comodule-algebras over a dual quasitriangular  Hopf algebra $U$. The tensor product 
$A=A_1 \otimes_{\mathcal R} A_2$ has two commuting right $U$-comodule structures. Namely  $\Delta_1=(\mathrm{Id}_{A_1}\otimes \mathrm{fl} )\circ (\Delta_{A_1}\otimes \mathrm{Id}_{A_2})$ and $\Delta_2=\mathrm{Id}_{A_1 }\otimes \Delta_{A_2}$. 




By the above construction, $A$ has  the structure of a right $U$-comodule algebra, with the coaction $\underline{ \Delta} = \Delta_1 \underline \ast \Delta_2$ and the product $\underline \ast$. Explicitly, for $x\in A_1$ and $y\in A_2$, the coaction is
$$\underline{ \Delta}  (x\otimes y)= \sum (x' \otimes y') \otimes uv \ \text{if} \ \Delta_{A_1}(x)= \sum x' \otimes u, \Delta_{A_2}(y)= \sum y' \otimes v. $$

Let us now describe the product $\underline \ast$. 
Identify $A_1$ with $A_1 \otimes \{1\}$ and $A_2$ with $\{1\} \otimes A_2$ (as subsets of $A_1\otimes_{\mathcal R}A_2)$.  Then the new product \eqref{eq:selfproduct} is given by
 \begin{equation}   \label{eq.brprod}
x\underline \ast y = \begin{cases} xy \qquad &\text{if } \ x, y \in A_1 \ \text{or } \ x, y \in A_2 \\
x \otimes y &\text{if } \ x \in A_1 , y \in A_2 \\
\sum \rho(u\otimes v)(y' \otimes  x')
&
\text{if } \ x \in A_2, y \in A_1, 
\end{cases} 
 \end{equation} 
where $\Delta_{A_2}(x)= \sum x'\otimes u,\Delta_{A_1}(y)= \sum y'\otimes$,   and $\rho$ is the co-$R$-matrix.


The algebra $A_1 \otimes_{\mathcal R}A_2$ with this new product is called the {\em braided tensor product} of $A_1$ and $A_2$, and is denoted by $A_1 \underline{\ot}_U A_2$.
For details see \cite{MajidFoundation}.

\end{example}





\begin{example}[Transmutation]  \label{ex.trans}
Assume that $U$ is a dual quasitriangular Hopf algebra and let $A=U$.  Then $\Delta_2:= \Delta: A \to A\otimes U$ gives $A$ a right $U$-comodule algebra structure. To get another right $U$-comodule structure one converts the standard left comodule structure to a right one by
 \begin{equation}  \Delta_1(x) := \sum x' \otimes S(u) \ \text{if} \ \Delta(x) = \sum u \otimes x'.
 \end{equation} 

However $\Delta_1$ is not compatible with the algebra structure of $A$. One can twist the product of $A$ using the co-$R$-matrix $\rho$ of $U$ to make both $\Delta_1$ and $\Delta_2$ right comodule algebras as follows.
 Define a new product on $A$ using the common value of \eqref{eq.rflip}, i.e.
  \begin{equation}   x \odot y = \sum \rho (x'\otimes y') x'' y'',\ \text {if} \ \Delta(x) =\sum x' \otimes x'', \Delta(y) = \sum y' \otimes y''.
 \label{eq.newprod}
  \end{equation} 
It is easy to check that this gives $A$ a new product, with which both $\Delta_1$ and $\Delta_2$ give $A$  right $U$-comodule algebra structures. Besides, $\Delta_1$ and $\Delta_2$ commute.


Our construction now gives $A$ a right $U$-comodule algebra structure whose coaction $\underline{ \Delta} =\Delta_1\underline \ast \Delta_2$ and whose product $\underline \ast$ are given by
\begin{align}
\underline{ \Delta} (x) &= \sum x'' \otimes S(x') x''' \ \text{if}\  (\Delta\otimes \mathrm{Id}_U)\circ \Delta(x) = \sum x'\otimes x'' \otimes x'''
\label{eq.coact2}\\
x \underline \ast y&= \sum   x'' y'' \rho( S(x' x''') \otimes S( y')  )\  \text{if}\  \Delta(y) = \sum y'\otimes y''.\label{eq.transmprod}
\end{align} 
It turns out that the coaction \eqref{eq.coact2} is exactly the {\em right coadjoint action}, see \cite[Example 1.6.14]{MajidFoundation} and the product $\underline \ast$ is 
 exactly the {\em covariantized product} of \cite[Example 1.6.14]{MajidFoundation}. The algebra $A$, with this 
new product $\underline \ast$ and the original coproduct $\Delta$,  is known as the {\em transmutation} of $A$, and is a {\em braided group} in the braided category of $U$-comodules, see~\cite{MajidFoundation}.

\end{example}




\subsection{Attaching an ideal triangle is a braided tensor product} \label{sec:braidedtensor}
Suppose $e, e_1, e_2$ are oriented edges of an ideal triangle $\mathcal P_3$  as depicted in Figure \ref{fig:brtensor0}.
\FIGc{brtensor0}{Left: Ideal triangle $\mathcal P_3$. Middle: Glueing $\mathfrak S$ and $\mathcal P_3$ by $a_1=e_1$ and $a_2=e_2$ to get $\ufS$. Right: tangle diagram $x\in \cS(\mathfrak S)$ and its image $f(x)\in \cS(\ufS)$}{2.8cm}



Let $\mathfrak S$ be a (possibly disconnected) punctured bordered surface, with two boundary edges $a_1,a_2 \subset \partial\mathfrak S$. Define $\underline{\mathfrak S} = (\mathfrak S \sqcup \mathcal P_3)/(e_1=a_1, e_2= a_2)$, see Figure \ref{fig:brtensor0}. (A special case is when $\mathfrak S=\mathfrak S_1\sqcup \mathfrak S_2$ and $a_1\subset \mathfrak S',a_2\subset \mathfrak S''$.)
For $i=1,2$ the algebra $ \cSs(\fS)$ has a right comodule algebra structure $\Delta_i:= \Delta_{a_i}: \cS(\mathfrak S) \to  \cSs(\fS)\otimes {\mathcal O}_{q^2}(\mathrm{SL}(2))$. 
The two coactions $\Delta_1$ and $\Delta_2$ commute, see Lemma \ref{prop:comodule}. Hence we can define the self braided tensor product $\underline{\ot} \cS(\mathfrak S)$ of $\Delta_1$ and $\Delta_2$, which gives $ \cSs(\fS)$ a new right comodule algebra structure over ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. On the other hand, $\Delta_e: \cS(\underline{\mathfrak S}) \to \cS(\underline{\mathfrak S}) \otimes {\mathcal O}_{q^2}(\mathrm{SL}(2))$ gives $\cS(\underline{\mathfrak S})$ a right comodule algebra structure over ${\mathcal O}_{q^2}(\mathrm{SL}(2))$.

\begin{theorem}\label{teo:braidedtensor}
The right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra $\cS(\underline{\mathfrak S})$ is naturally isomorphic to the self braided tensor product $\underline{\ot} \cS(\mathfrak S)$, defined with the co-$R$-matrix $\rho'$ of \eqref{eq.coR2}.

In particular when $\mathfrak S=\mathfrak S_1\sqcup \mathfrak S_2$ and $a_1\subset  \mathfrak S_1,a_2\subset \mathfrak S_2$, the right comodule algebra $\cS(\underline{\mathfrak S})$ over ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ is naturally isomorphic to the braided tensor product $\cS(\mathfrak S_1) \underline{\ot} \cS(\mathfrak S_2)$.
\end{theorem}

\def  \raisebox{-13pt}{\incl{1.3 cm}{brtensor1}} {  \raisebox{-13pt}{\incl{1.3 cm}{brtensor1}} }
\def  \raisebox{-15pt}{\incl{1.5 cm}{brtensor2}} {  \raisebox{-15pt}{\incl{1.5 cm}{brtensor2}} }
\def  \raisebox{-13pt}{\incl{1.3 cm}{brtensor3}} {  \raisebox{-13pt}{\incl{1.3 cm}{brtensor3}} }
\def  \raisebox{-8pt}{\incl{.8 cm}{brtfour}} {  \raisebox{-8pt}{\incl{.8 cm}{brtfour}} }
\def  \raisebox{-13pt}{\incl{1.3 cm}{brtensor1-new}} {  \raisebox{-13pt}{\incl{1.3 cm}{brtensor1-new}} }
\def  \raisebox{-15pt}{\incl{1.5 cm}{brtensor2-new}} {  \raisebox{-15pt}{\incl{1.5 cm}{brtensor2-new}} }
\def  \raisebox{-13pt}{\incl{1.3 cm}{brtensor3-new}} {  \raisebox{-13pt}{\incl{1.3 cm}{brtensor3-new}} }
\def  \raisebox{-8pt}{\incl{.8 cm}{brtensor4-new}} {  \raisebox{-8pt}{\incl{.8 cm}{brtensor4-new}} }



\begin{proof}  Let ${\mathfrak o}_+$ be the positive orientation of the boundaries of $\mathfrak S$ and $\ufS$.  In the proof all tangle diagrams will have positive height order.

For a stated $\partial \fS$-tangle diagram $x$ let $f(x)$ be the stated $\partial \ufS$-tangle diagram obtained from $x$ by extending the strands ending on {$a_1\sqcup a_2$} until they end on $e$, with order on $e$ given by its positive direction,
see  Figure \ref{fig:brtensor0}. We require that $f(x)$ has no crossing inside $\mathcal P_3$ and this makes $f(x)$ unique up to isotopy. Since $f$ clearly preserves the defining relations of a stated skein algebra, we can extend it to an $\mathcal R$-linear map $f:\cS(\mathfrak S)\to \cS(\underline{\mathfrak S})$.


Recall that $\underline{\ot} \cS(\mathfrak S)$ is the same $ \cSs(\fS)$ with a new product $\underline \ast$ given by \eqref{eq:selfproduct}.

\begin{lemma}The map $f: \underline{\ot} \cS(\mathfrak S) \to \cS(\ufS)$ is an algebra homomorphism.
\end{lemma}
\begin{proof} 
Let $x,y$ be stated $\partial \fS$-tangle diagrams.

\FIGc{brtensorxy-new}{$xy,f(xy)$, and $f(x) f(y)$}{2.5cm}
We present $xy, f(xy), f(x)f(y)$ schematically as in Figure \ref{fig:brtensorxy-new}. By splitting along the dashed line in the picture of $f(x)f(y)$ and using the counit property which says $u = \sum u' \varepsilon(u'')$, we get, with $\Delta_2(x) = \sum x'\otimes u$ and $\Delta_1(y) = \sum y'\otimes v$,
\begin{align*}
f(x) f(y)
&= \sum   \raisebox{-13pt}{\incl{1.3 cm}{brtensor3-new}}  \ \otimes \  \varepsilon\left(   \raisebox{-8pt}{\incl{.8 cm}{brtensor4-new}}  \right) 
\\
&= \sum \,  f {( {x'  y'})\rho' (u \otimes  v)},
 \qquad \text{using co-$R$-matrix $\rho'$ of  \eqref{eq.coR2}} \\
&= f(x\underline \ast y)  \qquad \text{by   \eqref{eq:selfproduct}}.
\end{align*}
Thus $f$ is an algebra homomorphism.
\end{proof}

It remains to show that $f$ is an $\mathcal R$-linear isomorphism.
For $l\in \mathbb N$ let $F_l(\cS(\mathfrak S))= F_l^{a_1, a_2}(\cS(\mathfrak S)) $ and $F_l(\cS(\ufS))= F_l^{a_1, a_2}(\cS(\ufS)) $ be the filtrations defined in Subsection \ref{sec.filtration}. In other words, $F_l(\cS(\mathfrak S))$ is
the ${\mathcal R}$-submodule spanned by stated tangle diagrams $\alpha$ such that $I(\alpha, a_1)+ I(\alpha,a_2) \le l$, and similarly  for $F_l(\cS(\underline{\mathfrak S}))$.
Denote by $\mathrm{Gr}_*$ the corresponding graded $\mathcal R$-modules.
It is clear that $f$ preserves the filtrations $F_l$. It is enough to show that $\mathrm{Gr}(f)$ is a bijection. 


Let $B_{m,n}$ be the set of isotopy classes of simple $\partial \fS$-tangle diagrams $\alpha$ such that $I(\alpha, a_1)=m, I(\alpha, a_2)=n$ and $\alpha$ is increasingly stated on each boundary edge, except for $a_1$ and $a_2$ where it is not stated.
 Then 
\begin{align}
\mathrm{Gr}_l (\cS(\mathfrak S)) &= \bigoplus _{ m+n=l, \ x\in B_{m,n}} V(x)\\
\mathrm{Gr}_l (\cS(\mathfrak S)) &= \bigoplus _{ m+n=l, \ x\in B_{m,n}} W(x).
\end{align}
Here $V(x)$ is the $\mathcal R$-submodule of $\mathrm{Gr}_l (\cS(\mathfrak S))$ spanned by $\alpha\in B(\mathfrak S;{\mathfrak o}_+)$ such that $\alpha=x$ if we forget the states on $a_1\cup a_2$, and $W(x)$ is the $\mathcal R$-submodule of $\mathrm{Gr}_l (\cS(\underline{\mathfrak S}))$ spanned by
$z\in B(\underline{\mathfrak S};{\mathfrak o}_+)$ such that $z\cap \mathfrak S= x$. It is enough to show that $\mathrm{Gr}(f)$ is an isomorphism from $V(x)$ to $W(x)$ for $x\in B_{m,n}$. 

Note that both $V(x)$ and $W(x)$ are free $\mathcal R$-modules, and both have rank
$ (m+1)(n+1)$.
Indeed there are $m+1$ increasing states on $x\cap a_1$ and $n+1$ increasing states on $x\cap a_2$ and these can be chosen independently, thus $\mathrm{rk}_{\mathcal R}(V(x))=(m+1)(n+1)$. For what concerns $W(x)$, observe that if  $z\in B(\underline{\mathfrak S};{\mathfrak o}_+)$ such that $z\cap \mathfrak S= x$ then $z\cap \mathcal P_3$ consists of  $k$ arcs (for some $k\in [0,\min(m,n)]$) connecting $ e_1$ and $ e_2$, $m-k$ arcs connecting $ e_1$ and $ e$, and finally $n-k$ arcs connecting $ e_2$ and $ e$; furthermore $z\cap e$ is increasingly stated so that there are exactly $(m+n-2k+1)$ such $z$.
 Thus we have:
$$\mathrm{rk}_{\mathcal R}(W(x))=
\sum_{k=0}^{min(m,n)}(m+n-2k+1)=(m+1)(n+1).$$
The reordering relation \eqref{eq.order} implies the relation in Figure \ref{fig:brten6-new}, which converts arcs connecting $e_1$ and $e_2$ to arcs with one end in $e$.  This shows that $\mathrm{Gr}(f): V(x) \to W(x)$ is surjective.
\FIGc{brten6-new}{}{1.7cm}

 Since both $V(x)$ and $ W(x)$ are free $\mathcal R$-modules having the same rank, we conclude that $\mathrm{Gr}(f): V(x) \to W(x)$ is an isomorphism. This completes the proof of the theorem.
\end{proof}


\subsection{Examples: Polygons, punctured bigons, and punctured monogons} \label{sub:monogons}


\begin{example}[Polygon] \label{polygons}
The {\em polygon $\mathcal P_n$ }is the standard  disc with $n$ punctures on its boundary removed.
Note that the  triangle $\mathcal P_3$ is the result of attaching an ideal triangle to two bigons. By Theorem \ref{teo:braidedtensor} we have 
 \begin{equation}   \mathscr S(\mathcal P_3) \cong {\mathcal O}_{q^2}(\mathrm{SL}(2))\underline \otimes_{{\mathcal O}_{q^2}(\mathrm{SL}(2))} {\mathcal O}_{q^2}(\mathrm{SL}(2)),
 \end{equation} 
where each copy of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ is a right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra via the coproduct. Consequently, $\mathscr S(\mathcal P_3) \cong {\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes_\mathcal R {\mathcal O}_{q^2}(\mathrm{SL}(2))$ as $\mathcal R$-modules, and its algebra structure is described by \eqref{eq.brprod}. From here one can get a presentation of $\mathscr S(\mathcal P_3)$. In \cite{Le:TDEC}, a presentation of $\mathscr S(\mathcal P_3)$ was obtained by brute force calculation.

The $n$-gon $\mathcal P_n$ is the result of attaching an ideal triangle to the disjoint union of $\mathcal P_{n-1}$ and the bigon. By induction, we obtain
\begin{corollary}\label{cor:polygons} One has
$$\cS(\mathcal P_n)\cong {\mathcal O}_{q^2}(\mathrm{SL}(2))\underline{\ot}\cdots \underline{\ot} {\mathcal O}_{q^2}(\mathrm{SL}(2)),$$
 where there are $(n-1)$ copies of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$.
 \end{corollary}
 
 \end{example}
 




\def\mathrm{sw}{\mathrm{sw}}
\def\mathrm{ro}{\mathrm{ro}}
\begin{example}[Punctured bigons] Let $\mathfrak B_n$ be the bigon $\mathfrak B$ with $n$ interior punctures removed. 
For example 
$\mathfrak B_0=\mathfrak B$. Like in the case of $\mathfrak B$, we will show that $\cS(\mathfrak B_n)$ has a natural structure of a Hopf alagebra where all the operations can be defined geometrically. Recall that we  denote $e_l$ and $e_r$ the left and right boundary edges of $\mathfrak B$.
\FIGc{bigonn}{The embedding of the 4-punctured bigon $\mathfrak B_4$ into $\mathfrak B_8$ and the splitting homomorphism. The composition gives the coproduct.}{2cm}

  
Let $\iota:\mathfrak B_n\hookrightarrow \mathfrak B_{2n}$ be the inclusion identifying $\mathfrak B_n$ with the complement of $n$ closed disjoint arcs, each  connecting two punctures of  the $2n$-punctures of $\mathfrak B_{2n}$; See Figure \ref{fig:bigonn}. Let  $\Delta:\cS(\mathfrak B_n)\to \cS(\mathfrak B_n)\otimes\cS(\mathfrak B_n)$ be the map induced by $\iota$ and then splitting along the vertical arc connecting the two boundary ideal vertices of $\mathfrak B_{2n}$ and identifying the two halves with $\mathfrak B_n$. 

Let also $\epsilon:\cS(\mathfrak B_n)\to \mathcal R$ be the map obtained by including $\mathfrak B_n$ in $\mathfrak B_0=\mathfrak B$ and then applying $\epsilon :\cS(\mathfrak B)\to \mathcal R$. 

Finally  define $S:\cS(\mathfrak B_n)\to \cS(\mathfrak B_n)$ as the $\mathcal R$-linear map whose value on a stated tangle  $\alpha$ in $\mathfrak B_n \times (-1,1)$ is obtained by first switching all the states $\eta$ to $-\eta$ and all the framing vectors $v$ to $-v$, then rotating $\alpha$ by $180^\circ$ around the axis passing through the two boundary ideal vertices and finally multiplying the result by $(\sqrt{- 1}\,  q)^{(\delta_{e_l}(\alpha)-\delta_{e_r}(\alpha))}$ (where $\delta_{e}(\alpha)$ was defined in Subsection \ref{sec.filtration} as the sum of the states on $\alpha\cap e$). It is easily checked that all the defining relations \eqref{eq.skein}-\eqref{eq.order} are preserved so that $S$ is well-defined. 

\begin{proposition}\label{lem:Bnstandardhopf}

 For each $n\geq0$ the skein algebra $\cS(\mathfrak B_n)$, endowed with $\Delta,\epsilon,S$, is a Hopf algebra.


\end{proposition}
\begin{proof} From the definition of the splitting homomorphism it is clear that $\Delta$ is an algebra homomorphism. The
coassociativity of $\Delta$ is a direct consequence of the fact that applying twice $\iota$ induces the same morphism as the identification of $\mathfrak B_n$ with the complement of $n$ disjoint arcs in $\mathfrak B_{3n}$ each containing 3 punctures as depicted here:
$$\raisebox{-1cm}{\incl{2cm}{bigonnn}}
$$
The map $\epsilon$ is a morphism of algebras by its definition; to verify that $(\epsilon\otimes \mathrm{Id})\circ \Delta=\mathrm{Id}$ observe that if in Figure \ref{fig:bigonn} we fill the left punctures then we obtain the initial $\mathfrak B_n$.

That $S$ is an antimorphism is a consequence of the fact the revolution by $180^\circ$ about the 
the axis connecting the two boundary vertices reverses the height order in $\mathfrak B_n \times (-1,1)$.

We are left to prove  that  
 \begin{equation}  (S\otimes \mathrm{Id}) \circ \Delta=(\mathrm{Id}\otimes S) \circ \Delta=\epsilon, 
\label{eq.SS}
 \end{equation}  and since $S$ is an antimorphism, it is enough to check this identity on a set of generators. From relation \eqref{eq.order} we get that the set of  horizontal arcs, with all possible states, generates $\cS(\mathfrak B_n)$.
If $\alpha_{\eta\mu}$ is a horizontal arc with state $\eta$ on the left and state $\mu$ on the right, then the definition gives
$$S(\alpha_{\eta{\eta}})=\alpha_{\overline{\eta}\, \overline{\eta}}\  {\ \rm and\ }\  S(\alpha_{{\eta}\overline{\eta}})=-q^{2\eta}\alpha_{{\eta}\overline{\eta}},$$ so that on $\mathfrak B_0=\mathfrak B$, $S$ coincides with the antipode defined in \eqref{eq.ap1}. Now Identity \eqref{eq.SS} for $\alpha_{\eta\mu}$ follows from the same identity for the antipode in $\cS(\mathfrak B)={\mathcal O}_{q^2}(\mathrm{SL}(2))$.
\end{proof}
\begin{remark} (a) Since $\mathfrak B_n$ is the result of attaching $2n$ ideal triangles to $n+1$ bigons, Theorem \ref{teo:braidedtensor} can be used to show that as $\mathcal R$-algebras $\cS(\mathfrak B_n) \cong {\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes (n+1)} $ where the tensor product is over $\mathcal R$ and the algebra structure  of ${\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes (n+1)}$ is the unique one determined by:

(i) the subset $A_i= 1^{\otimes (i-1)}\otimes_\mathcal R {\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes_\mathcal R 1^{\otimes (n+1-i)}\subset {\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes (n+1)}$ is isomorphic to  ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ as  $\mathcal R$-algebras for each $i=1,\dots, n+1$, and 

(ii) for $a\in A_i$ and $b\in A_j$ with $i< j$, one has $ab= a\otimes b$ and
\begin{align}
ba  = \sum  \bar \rho'(b'\otimes a') \rho'(b'''\otimes a''')  a'' b'' 
\end{align}
where $\rho'$ is the co-R-matrix defined by \eqref{eq.coR2} and  $\bar \rho'$ is its inverse.

(b) For the  case  $n=1$, Proposition  \ref{lem:Bnstandardhopf} and a presentation of $\cS(\mathfrak B_1)$ were also independently obtained in \cite{Ko} via a direct calculation. 

\end{remark}


\end{example} 

\begin{example}[Punctured monogons] Let ${\mathcal M}_n$  be the monogon ${\mathcal M}$ with  $n$ punctures in its interior removed, see  Figure \ref{fig:monogonsbraided}. Let  $\underline{ \Delta} :\cS({\mathcal M}_n)\to \cS({\mathcal M}_n)\otimes \cS(\mathfrak B)$ be the right $\cS(\mathfrak B)$-comodule algebra structure induced by the only boundary edge of ${\mathcal M}_n$.
 
 
Similarly $\cS(\mathfrak B_n)$ has two commuting right comodule-algebra structures over $\cS(\mathfrak B)$ induced by $e_l$ and $e_r$, let $\Delta_1$ be the one induced $e_l$ and $\Delta_2$ be the one induced by $e_r$. 




Like in the bigon case, let $\iota:{\mathcal M}_n\hookrightarrow {\mathcal M}_{2n}$ be the inclusion identifying ${\mathcal M}_n$ with the complement of $n$  disjoint arcs, each  connecting two punctures of ${\mathcal M}_{2n}$. Observe that ${\mathcal M}_{2n}$ is the result of attaching an ideal triangle to two copies of ${\mathcal M}_n$, see Figure \ref{fig:monogonsbraided}.
By Theorem \ref{teo:braidedtensor} we have isomorphism of algebras $\cS({\mathcal M}_{2n})=\cS({\mathcal M}_n)\underline{\ot}\cS({\mathcal M}_n)$.
 Let  $\Delta:\cS({\mathcal M}_n)\hookrightarrow \cS({\mathcal M}_{2n})=\cS({\mathcal M}_n)\underline{\ot}\cS({\mathcal M}_n)$ be the map induced by $\iota_*$ and this isomorphism. 
\begin{figure}
$\iota:\raisebox{-1cm}{\includegraphics[width=2cm]{braidedmonogon1-eps-converted-to.pdf}}\hookrightarrow\raisebox{-1cm}{\includegraphics[width=2cm]{braidedmonogon2-eps-converted-to.pdf}}\simeq  \raisebox{-1cm}{\includegraphics[width=2cm]{braidedmonogon4-eps-converted-to.pdf}}$
\caption{
The inclusion $\iota:{\mathcal M}_4\hookrightarrow {\mathcal M}_8$ and the decomposition of ${\mathcal M}_{8}$ in a triangle and two copies of ${\mathcal M}_4$ used to fix the isomorphism $\cS({\mathcal M}_8)=\cS({\mathcal M}_4)\underline{\ot}\cS({\mathcal M}_4)$.}\label{fig:monogonsbraided}
\end{figure}

\begin{proposition}
(a) For each $n\geq 0$ the algebra $\cS({\mathcal M}_n)$ endowed with the map $\Delta$ and the map $\epsilon:\cS({\mathcal M}_n)\to \cS({\mathcal M}_0)=\mathcal R$ induced by inclusion is a bialgebra object in the category of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodules (i.e. its product, coproduct, unit and counit are morphisms of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodules). 

(b) 
The ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ comodule-algebra $\cS({\mathcal M}_n)$ is isomorphic to the self braided tensor product $\underline{\ot} \cS(\mathfrak B_{n-1})$.
In particular $\cS({\mathcal M}_1)$ is isomorphic as a Hopf algebra to $BSL_q(2)$,  the ``transmutation'' of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, or ``braided version'' or ``covariant version'' of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ (see \cite{MajidFoundation} Examples 4.3.4 and 10.3.3). 
\end{proposition}
\begin{proof}
(a) The inclusion $\iota$ induces an injective  algebra  homomorphism  $\iota_*:\cS({\mathcal M}_n)\hookrightarrow \cS({\mathcal M}_{2n})=\cS({\mathcal M}_n)\underline{\ot}\cS({\mathcal M}_n)$. As in the case of bigons, the coassociativity follows from the fact that applying twice $\iota$ induces the same morphism as the identification of ${\mathcal M}_n$ with the complement of $n$ disjoint arcs in ${\mathcal M}_{3n}$ each containing 3 punctures as depicted here:
$$\raisebox{-1cm}{\includegraphics{braidedmonogon1-eps-converted-to.pdf}}\hookrightarrow\raisebox{-1cm}{\includegraphics{braidedmonogon2-eps-converted-to.pdf}}  \hookrightarrow\raisebox{-1cm}{\includegraphics{braidedmonogon3-eps-converted-to.pdf}}.$$
The map $\epsilon$ is a morphism of comodule-algebras by its definition; to verify that $(\epsilon\otimes \mathrm{Id})\circ \Delta=\mathrm{Id}$ observe that if in Figure \ref{fig:monogonsbraided} we fill the left punctures then we obtain the initial ${\mathcal M}_n$. 
The last fact to verify is that $\Delta$ is a morphism of comodules, i.e. denoting $\underline{ \Delta} :\cS({\mathcal M}_n)\to \cS({\mathcal M}_n)\otimes \cS(\mathfrak B)$ the right comodule structure, that $$(\Delta\otimes \mathrm{Id})\circ \underline{ \Delta} =(\mathrm{Id}\otimes \mathrm{Id}\otimes m)(\mathrm{Id}\otimes \mathrm{fl}\otimes\mathrm{Id})\circ(\underline{ \Delta} \otimes \underline{ \Delta} )\circ\Delta,$$ where $m:\cS(\mathfrak B)\otimes \cS(\mathfrak B)\to \cS(\mathfrak B)$ is the multiplication and $\mathrm{fl}$ is the flip. 
Since $\Delta$ is a morphism of algebras, it is sufficient to check this on generators of ${\mathcal M}_n$. For this we refer to Figure \ref{fig:deltamonogon}, where we depict the case $n=1$ but the proof is similar for other $n$. Letting $\alpha(x,y)\in B({\mathcal M}_n,{\mathfrak o})$ be the generator represented by a horizontal arc whose states are $y,x\in \{\pm\}$ depicted in the figure, the equality in the figure shows that we have: $$\Delta(\alpha(x,y))=q^{\frac{1}{2}}\alpha(+,y)\underline{\ot} \alpha(x,-)-q^{\frac{5}{2}}\alpha(-,y)\underline{\ot}\alpha(x,+).$$ Also, from the definition of $\underline{ \Delta} $ one computes $\underline{ \Delta} (\alpha(x,y))=\sum_{\epsilon,\eta} \alpha(\eta,\epsilon)\otimes (\alpha_{\eta x}\alpha_{\eta y})$ where $\alpha_{xy}$ denote the standard generators of $\cS(\mathfrak B)$.
Now the verification is a straightforward computation.
\begin{figure}
$\raisebox{-1.0cm}{\put(57,55){$x$}\put(-7,55){$y$}\includegraphics[width=2cm]{productbraidedcoproduct1-eps-converted-to.pdf}}=\ \ \ \ -q^{\frac{5}{2}}\raisebox{-1.0cm}{\put(57,55){$x$}\put(-7,55){$y$}\put(15,-6){$-$}\put(35,-6){$+$}\includegraphics[width=2cm]{productbraidedcoproduct2-eps-converted-to.pdf}}+ q^{\frac{1}{2}}\raisebox{-1.0cm}{\put(57,55){$x$}\put(-7,55){$y$}\put(15,-6){$+$}\put(35,-6){$-$}\includegraphics[width=2cm]{productbraidedcoproduct2-eps-converted-to.pdf}}.$
\caption{Re-expressing $\Delta(\alpha(x,y))$ as a braided tensor product. The equality is a consequence of \eqref{eq.order}.}\label{fig:deltamonogon}
\end{figure}



\def{\underline A}{{\underline A}}
\def{\overset \cdot -}{{\overset \cdot -}}
\def\underline S{\underline S}
(b) As ${\mathcal M}_n$ is obtained by attaching an ideal triangle to $\mathfrak B_{n-1}$, the claim follows from Theorem \ref{teo:braidedtensor}.
The isomorphism of $\cS({\mathcal M}_1)$ with $BSL_q(2)$ then follows from Example \ref{ex.trans}. Let us make explicit the isomorphism.

Let $T:\cS(\mathfrak B)\to \cS({\mathcal M}_1)$ be the $\mathcal R$-linear isomorphism obtained on a skein $a$ by embedding $\mathrm{rot}_*(\overline{\mathrm{inv}}_{e_l}^{-1}(a))$ (see Subsection \ref{sec.invers}) 
in the monogon through the embedding depicted in Figure \ref{fig:monogons} (a) and finally extending the strands of $\mathrm{rot}_*(\overline{\mathrm{inv}}_{e_l}^{-1}(a))$ until they hit the boundary of ${\mathcal M}_1$ (i.e. by applying the map $f$ defined in the proof of Theorem \ref{teo:braidedtensor}). We claim that pulling back through $T$ the coaction of $\cS({\mathcal M}_1)$ we get the right adjoint coaction on ${\mathcal O}_{q^2}(\mathrm{SL}(2))=\cS(\mathfrak B)$ and pulling back the product  $*$ on $\cS({\mathcal M}_1)$ we get the product $\underline \ast$ on $BSL_q(2)$ defined in Example \ref{ex.trans}:
$$\Delta^{coad}=(T^{-1}\otimes Id)\circ \underline{ \Delta} \circ T \qquad {\rm and} \qquad
\underline \ast=T^{-1}\circ(\cdot *\cdot)\circ (T\otimes T).$$  

\begin{figure}
\raisebox{1cm}{(a)}\includegraphics[width=2cm]{braidedmonogons-new-embedding-eps-converted-to.pdf}\raisebox{1cm}{\ \ (b)}\raisebox{1cm}{\ $\underline{ \Delta} \Bigg($}\includegraphics[width=2cm]{braidedmonogons-new-delta-eps-converted-to.pdf}\raisebox{1cm}{$\Bigg)=\ $}\includegraphics[width=2cm]{braidedmonogons-new-coaction1-eps-converted-to.pdf}\raisebox{1cm}{$\ \otimes\ $}\includegraphics[width=1cm]{braidedmonogons-new-coaction2-eps-converted-to.pdf} 
\caption{(a) The $\mathcal R$-linear map $T$ embeds $\mathfrak B$ into ${\mathcal M}_1$ as shown, after applying the map $\overline{\mathrm{inv}}_{e_l}^{-1}$ and rotating by $\pi$. (b) The right coaction of $\cS(\mathfrak B)$ on $\cS({\mathcal M}_1)$ is obtained by cutting on the dotted arc; in the figure, a skein $x=T(a)$ is cut in three parts by the dotted arc, the mid one is $T(a_{(2)})$ while the rightmost and leftmost are respectively $S(a_{(1)})$ and $a_{(3)}$ so that their product in the bigon cut out by the dotted curve is $S(a_{(1)})a_{(3)}$. This shows that the pullback of $\underline{ \Delta} $ is the adjoint coaction.}\label{fig:monogons}
\end{figure}
Using the definitions of $T$, of the antipode on $\cS(\mathfrak B)$ \eqref{eq.antipode} and of $\underline{ \Delta} $, one verifies directly that $(T^{-1}\otimes Id)\circ \underline{ \Delta} \circ T(x)=x''\otimes S(x')x'''$ for any $x\in {\mathcal O}_{q^2}(\mathrm{SL}(2))=\cS(\mathfrak B)$ (see Figure \ref{fig:monogons} (b)). 
Then since $*$ and $\underline{ \Delta} $ are compatible it is sufficient to check that the pullback of $*$ equals $\underline \ast$ on the generators of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$; this is a straightforward computation. 
A graphical explanation is as follows. Observe that if $x=T(a),y=T(b)$, then $x*y=(T(a*b))_{(1)}\epsilon((T(a*b))_{(2)})$ (this holds in general comodule algebras), so that we have:
\begin{center}
\includegraphics[width=2cm]{braidedmonogons-new-product-eps-converted-to.pdf}\raisebox{1cm}{$\ =\ $}\includegraphics[width=2cm]{braidedmonogons-new-productdelta-eps-converted-to.pdf}\raisebox{1cm}{$\cdot \epsilon\Bigg($}\includegraphics[width=1cm]{braidedmonogons-new-productcutbigon-eps-converted-to.pdf} \raisebox{1cm}{$\Bigg)$}
\end{center}
and that the right hand side equals $$T(a_{(2)}\cdot b_{(2)}) \rho' (S(a_{(1)}) a_{(3)} \otimes S(b_{(1)}))\epsilon(b_{(3)})=T(a_{(2)}\cdot b_{(2)}) \rho' (S(a_{(1)}) a_{(3)} \otimes S(b_{(1)}))$$ where $\rho'$ was defined in \eqref{eq.coR2}. This proves that $\underline \ast=T^{-1}\circ(\cdot *\cdot)\circ (T\otimes T)$.
\end{proof}



\end{example}
\section{A lift of the Reshetikhin-Turaev operator invariant} \label{sec.WT}
In this section we show that a Reshetikhin-Turaev operator invariant of tangles can be lifted to an invariant with values in ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. In this section $\mathcal R=\mathbb Z[q^{\pm 1/2}]$.

\def\tilde V{\tilde V}
\def\partial_r{\partial_r}
\def\partial _l{\partial _l}



\subsection{Category of non-directed ribbon graphs} We will present the category of {\em non-directed ribbon graphs} \cite{Tu:Book}, also known as {\em framed tangles} \cite{Oh}, in the form convenient for us.

 The bigon is canonically isomorphic (in the category of punctured bordered surface) to the square $S= [0,1] \times (0,1)$.
Under the isomorphism $e_l$ and  $e_r$ are mapped respectively to $\{0\}\times (0,1)$ and $\{1\} \times (0,1)$, and abusing notation we also denote $\{0\}\times (0,1)$ and $\{1\} \times (0,1)$ respectively $e_l$ and $e_r$. We identify $S$ with $S \times \{0\}$ in $M:=S \times (-1,1)$. We have $\partial M = \partial S \times (-1,1) = (e_l \cup e_r) \times (-1,1)$.

\FIGc{tangle}{Left: Square $S=[0,1] \times (0,1)$, with edges $e_l$ and $e_r$. Middle: tensor product $\beta\otimes \beta'$. Right: composition $\beta \circ \beta'$, which can be defined only when $|\partial_r\beta|=|\partial _l\beta'|$ .}{2.5cm}

Recall that in the definition of a $\partial M$-tangle we require the boundary points over \red{any} boundary edge have distinct heights (see Subsection \ref{sub:tangle}).
If we change this requirement to: all boundary points are in $\partial S$ (in particular they all have the same height) we get the notion of a {\em $\partial S$-tangle}. Formally, a {\em $\partial S$-tangle} is a framed compact 1-dimensional unoriented manifold $\beta$ properly embedded in $M=S \times (-1,1)$ such that $\partial \beta$ has height 0, i.e.  $\partial \beta \subset \partial S =e_l \cup e_r$, and the framing at every boundary point of $\beta$ is vertical. Let $\partial_r \beta= \beta\cap e_r$ and $\partial _l\beta = \beta \cap e_l$.
Two $\partial S$-tangles are {\em $\partial S$-isotopic} if they are isotopic in the class of $\partial S$-tangles. If $|\partial_r\beta|=k$ and $|\partial _l\beta|=l$, then our notion of a  $\partial S$-tangle is the notion of  a non-directed ribbon $(k,l)$-graph without coupons in \cite{Tu:Book}.

After an isotopy we can bring $\beta$ to a generic position (with respect to the projection from $S \times (-1,1)$ onto $S$) and make the framing vertical everywhere\red{. The} projection of $\beta$ together with the over/under information at every crossing, is called a $\partial S$-tangle diagram of $\beta$. The isotopy class of $\beta$ is totally determined by any of its diagrams. 

The {\em non-directed ribbon graph category} is the category whose set of objects is $\mathbb N$ and a morphism from $k$ to $l$ is an isotopy class of {\em $\partial S$-tangle} $\beta$ such that $|\partial_r\beta|=k$ and $|\partial _l\beta|= l$, with the usual composition (see Figure \ref{fig:tangle}). If the tangles are oriented, then one would get the usual ribbon tangle category.


If $\beta, \beta'$ are two $\partial S$-tangles, define their tensor product $ \beta \otimes \beta'$ as the result of putting $\beta$ above $\beta'$ as in Figure \ref{fig:tangle}.
Under the tensor product and the composition, morphisms of the non-directed ribbon tangle category are generated by the five {\em elementary $\partial S$-tangles} depicted in Figure \ref{fig:eletangles}. 

\FIGc{eletangles}{Five elementary tangles}{1.5cm}



\def  \raisebox{-7pt}{\incl{.7 cm}{cap}} {  \raisebox{-7pt}{\incl{.7 cm}{cap}} }
\def  \raisebox{-7pt}{\incl{.7 cm}{cup}} {  \raisebox{-7pt}{\incl{.7 cm}{cup}} }
\def  \raisebox{-7pt}{\incl{.7 cm}{Xp}} {  \raisebox{-7pt}{\incl{.7 cm}{Xp}} }
\def  \raisebox{-7pt}{\incl{.7 cm}{Xn}} {  \raisebox{-7pt}{\incl{.7 cm}{Xn}} }


 From the ribbon category of finite-dimensional modules over the quantum group $U_{q^2}(\mathfrak{sl}_2)$ we get the Reshetikhin-Turaev operator invariant of $\partial S$-tangles, see \cite{Tu:Book}.
  Let us describe this operator invariant in a special case. Let $V$ be the free $\mathcal R$-module with basis $g_+, g_-$. The above mentioned operator invariant is the unique 
 functor $Z$ from the non-directed ribbon tangle category to the category of $\mathcal R$-modules preserving the tensor product such that $Z(n) = V^{\otimes n}$ and the values of the elementary tangles are given by
\begin{align}
Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cap}}   \right) &: V^{\otimes 2} \to R, \   g_+ \otimes g_-  \to  q^{-\frac 12}, \ g_- \otimes g_+ \to  -q^{-\frac 52}, \ g_+ \otimes g_+ \to 0, \  g_- \otimes g_- \to 0  \label{eq.cap}\\
Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cup}}   \right) &: R\to V^{\otimes 2},    1 \to  -q^{\frac 52} \, (g_+ \otimes g_- )+ q^{\frac 12}\,  (g_- \otimes g_+)  \label{eq.cup}\\
Z \left(  \raisebox{-7pt}{\incl{.7 cm}{Xp}}   \right)&: V^{\otimes 2} \to V^{\otimes 2},\   Z \left(  \raisebox{-7pt}{\incl{.7 cm}{Xp}}   \right) = q\, \mathrm{id} + q^{-1} \left(  Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cup}}   \right) \circ Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cap}}   \right)\right),  \label{eq.Xp}\\
Z \left(  \raisebox{-7pt}{\incl{.7 cm}{Xn}}   \right)&: V^{\otimes 2} \to V^{\otimes 2},\   Z \left(  \raisebox{-7pt}{\incl{.7 cm}{Xp}}   \right) = q^{-1}\, \mathrm{id} + q \left(  Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cup}}   \right) \circ Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cap}}   \right)\right), \label{eq.Xn}
\end{align}
see \cite{Co}.  Here our $g_\pm$ are related to the basis vectors  $g_{\frac 12}$ in \cite{Co} by
\begin{align*}
 g_+= -\sqrt{-1} \,  q^{-3/2} g_{\frac 12}, \quad 
g_-= g_{-\frac 12}.
\end{align*}


\def{\vec \nu}{{\vec \nu}}
\def{\vec \mu}{{\vec \mu}}

Thus if $\beta$ is a $\partial S$-tangle with $|\partial _l\beta|=l$ and $|\partial_r\beta|=k$ then $Z(\beta)$ is an $\mathcal R$-linear map  $V^{\otimes k} \to V^{\otimes l}$ which depends only on the isotopy class of $\beta$. 
 
For ${\vec \nu}=(\nu_1,\dots,\nu_l)\in \{\pm \}^l$ and ${\vec \mu} =(\mu_1,\dots,\mu_k) \in \{\pm \}^k$ we can define the matrix entry $ _{\vec \nu} Z(\beta) _{\vec \mu}\in R$ such that
 \begin{equation}  
Z(\beta) (g_{\mu_1} \otimes \dots \otimes g_{\mu_k} )= \sum_{{\vec \nu} \in \{\pm \}^l}(\null  _{\vec \nu} Z(\beta) _{\vec \mu})\,  g_{\nu_1} \otimes \dots \otimes g_{\nu_l}.
 \end{equation} 




\begin{remark} In fact $V$ and all its tensor powers are  modules over the quantum group $U_{q^2}(\mathfrak{sl}_2)$, and all the operators $Z(\beta)$ are $U_{q^2}(\mathfrak{sl}_2)$-morphisms. But we don't need the structure of $U_{q^2}(\mathfrak{sl}_2)$-modules here. 
When $k=l=0$, we have $Z(\beta)\in R$, which is equal to the Kauffman bracket polynomial of $\beta$.

\end{remark}

\subsection{From $\partial M$-tangles to $\partial S$-tangles} Suppose $\gamma$ is a $\partial M$-tangle. We can  $\partial M$-isotope $\gamma$ so that its diagram $D$   has the height order on $e_l$ and $e_r$ determined by the arrows in Figure \ref{fig:tangle2}. This diagram determines a unique class of $\partial S$-tangle, denoted by $\bar \gamma$. Note that the arrows of $e_r$, $e_l$ are irrelevant for $\bar \gamma$. It is easy to see that the map $\gamma\to \bar \gamma$ is a bijection from the set of $\partial M$-isotopy classes of $\partial M$-tangles to the set of $\partial S$-isotopy classes of $\partial S$-tangles.

\FIGc{tangle2}{Direction of boundary edges, used to determine the height order}{2cm}

Suppose $|\gamma\cap e_l|=l$ and $|\gamma\cap e_r|=k$, and  ${\vec \nu}=(\nu_1,\dots,\nu_l)\in \{\pm \}^l$ and ${\vec \mu} =(\mu_1,\dots,\mu_k) \in \{\pm \}^k$. Let $_{\vec \nu} \gamma _{\vec \mu}$ be the stated $\partial M$-tangle \red{ whose underlying tangle} is $\gamma$ and whose states on $\gamma \cap e_l$ (respectively on $\gamma \cap e_r$) from top to bottom by the height order are $\nu_1,\dots, \nu_l$ (respectively $\mu_1,\dots, \mu_k$).
\begin{theorem} \label{teo:cat}
Assume the above notation. Consider $_{\vec \nu} \gamma _{\vec \mu}$ as an element of $\cS(\mathcal B)$. Then
 \begin{equation}   \epsilon \left ( _{\vec \nu} \gamma _{\vec \mu}   \right)\  =\ _{\vec \nu} Z(\bar \gamma) _{\vec \mu}. 
\label{eq.cat} \end{equation} 
\end{theorem}
Thus we see that the tangle invariant of  $_{\vec \nu} \gamma _{\vec \mu}$ with values in $\cS(\mathcal B)$ is stronger than the Reshetikhin-Turaev operator invariant. 

\begin{proof} Suppose $\gamma_1, \gamma_2$ are $\partial M$-tangles. 
Since $\overline{\gamma_1 \gamma_2}= \bar \gamma_1 \otimes \bar \gamma_2$, if \eqref{eq.cat} is true for $\gamma = \gamma_1$ and $\gamma=\gamma_2$, it is true for $\gamma= \gamma_1 \gamma_2$.

\def{\vec \eta}{{\vec \eta}}

Now suppose $\gamma_1, \gamma_2$ are obtained by splitting a $\partial M$-tangle $\beta$  along an ideal edge. By the splitting formula \eqref{eq.coproduct1} and the definition of $\Delta$, 
$$ \Delta(\null  _{\vec \nu} \beta _{\vec \mu}) = \sum_{{\vec \eta}}   \null _{\vec \nu} (\gamma_1)_{\vec \eta} \, \null _{\vec \eta} (\gamma_2) _{\vec \mu}. $$
Applying $\epsilon \otimes \mathrm{id}$ to the above, we get
$$ \null  _{\vec \nu} \beta _{\vec \mu} = \sum_{{\vec \eta}}  \epsilon( \null _{\vec \nu} (\gamma_1)_{\vec \eta}) \, \null _{\vec \eta} (\gamma_2) _{\vec \mu}.$$
Applying $\epsilon$ to the above, we get
$$ \epsilon(\null  _{\vec \nu} \beta _{\vec \mu} ) = \sum_{{\vec \eta}}  \epsilon( \null _{\vec \nu} (\gamma_1)_{\vec \eta}) \, \epsilon(\null _{\vec \eta} (\gamma_2) _{\vec \mu}),$$ 
which shows that if \eqref{eq.cat} holds for $\gamma=\gamma_1$ and $\gamma=\gamma_2$ then it holds for $\beta=\gamma_1 \circ \gamma_2$.

Thus it is enough to check \eqref{eq.cat} for the elementary tangles, for which  \eqref{eq.cat} follows from the explicit formulas \eqref{eq.cap}--\eqref{eq.Xn}.
\end{proof}




\subsection{A $1+1$-TQFT}

\def\mathsf{SetABim}{\mathsf{SetABim}}
\def\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}{\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}}

Let $\mathrm{Cob}_{1,1}$ be the symmetric monoidal category whose:

\noindent{\bf Objects} are numbered disjoint unions of open unoriented segments.\\
{\bf Morphisms} are diffeomorphism classes of punctured bordered surfaces $\mathfrak S$ with indexed boundary. Explicitly if $\partial \mathfrak S=e_1^L,\cdots ,e^L_m, e^R_1,\cdots, e^R_n$ then $\mathfrak S\in Mor(e_1^L\sqcup \cdots \sqcup e^L_m,e^R_1\sqcup \cdots \sqcup e^R_n)$ and the composition of morphisms is given by the glueing of marked surfaces explained above (associativity of compositions is ensured by the fact that we consider diffeomorphism classes of surfaces). In particular the identity morphism of $e_1\sqcup\cdots \sqcup e_n$ is a disjoint union of $n$ copies of $\mathfrak B$.\\
{\bf Tensor product} is the disjoint union, where the components of $(e_1\sqcup \cdots \sqcup e_n)\sqcup (e'_1\sqcup \cdots \sqcup e'_m)$ are ordered as $e_1\sqcup \cdots e_n\sqcup e'_1=e_{n+1}\sqcup e'_m=e_{m+n}$.

In order to define the target category of our TQFT functor, let us fix some notation. 
Given a finite set $C$, we will then denote by $U_{q^2}(\mathfrak{sl}_2)^{\otimes C}$ the algebra obtained as the tensor product $\bigotimes_{c\in C} U_{q^2}(\mathfrak{sl}_2)$ where each copy of $U_{q^2}(\mathfrak{sl}_2)$ in the tensor product is indexed by a distinct element of $C$.

\begin{definition}[$\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$]\label{def:NSCatBim}
Let $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ be the category whose objects are pairs $(C,[M])$ where $C$ is a finite set, $M$ is a right module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes C}$ which is a direct sum of finite dimensional modules and $[M]$ is its isomorphism class. A morphism from $(C,[M])$ to $(C',[M'])$ in $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ is the \emph{isomorphism class} of a bimodule $B$ over $(U_{q^2}(\mathfrak{sl}_2)^{\otimes C},U_{q^2}(\mathfrak{sl}_2)^{\otimes C'})$ which is a direct sum of finite dimensional bimodules and such that $[M\otimes_{U_{q^2}(\mathfrak{sl}_2)^{\otimes C}} B]=[M']$. The composition of $[B]:(C,[M])\to (C',[M'])$ and $[B']:(C',[M'])\to (C'',[M''])$ is $[B\otimes_{U_{q^2}(\mathfrak{sl}_2)^{\otimes C'}}B']$ (the composition is associative as we consider bimodules up to isomorphisms).  The monoidal structure on $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ is given by $(C,[M])\otimes (C',[M']):=(C\cup C',[M\otimes_{\mathcal R} M'])$ and its symmetry is given by exchanging $(C,[M])$ and $(C',[M'])$. 
\end{definition}

Then let $\cS:\mathrm{Cob}_{1,1}\to \mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ be defined as $$\cS(e_1\sqcup \cdots \sqcup e_n)=(C=\{e_1,\ldots e_n\},[{\BQ(q^{1/2})}\otimes_\mathcal R\cS(\mathfrak B)^{\otimes C}])$$ and for a punctured bordered surface $\mathfrak S$ whose boundary is \red{a union of} $C=\{e_1^L,\ldots ,e^L_n\}$ and $C'=\{e_1^R,\ldots ,e^R_m\}$ let $\cS(\mathfrak S)$ be the isomorphism class of the $(U_{q^2}(\mathfrak{sl}_2)^{\otimes C},U_{q^2}(\mathfrak{sl}_2)^{\otimes C'})$-bimodule ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)$.
\begin{theorem}[Skein algebra as a TQFT]\label{teo:skeintqft}
The functor $\cS$ is a symmetric monoidal functor into $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$.
\end{theorem}
\begin{proof}
By point b) of Theorem \ref{teo:module} it holds ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS( \mathfrak B)=\bigoplus_{i\geq 0} V^L_i\otimes V^R_i$ where $V^L_i$ (resp. $V^R_i$) is the irreducible $i+1$-dimensional left (resp. right) module over $U_{q^2}(\mathfrak{sl}_2)$. 
Then, arguing exactly as in the proof of Theorem \ref{r.Hoch2} one sees that for each $j\geq 0$ it holds $$[V^R_j\otimes_{U_{q^2}(\mathfrak{sl}_2)}({\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak B))]=[V^R_j].$$  Then ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak B)$ represents the identity morphism $(\{e\},[M])\to (\{e\},[M])$ (for any edge $e$) if restricted to finite dimensional right $U_{q^2}(\mathfrak{sl}_2)$-modules (which are all direct sums of $V^R_j$'s). 
Let $\mathfrak S'$ and $\mathfrak S''$  be two bordered punctured surfaces with boundaries indexed so that $\partial^L\mathfrak S'
=\{e_1,\ldots ,e_n\}=\partial^R\mathfrak S''$ and let $\mathfrak S$ be the surface obtained by glueing $\mathfrak S'$ and $\mathfrak S''$ by identifying the corresponding edges of $\partial^L \mathfrak S'$ and $\partial^R\mathfrak S''$ via an orientation reversing diffeomorphism. Then $\cS(\mathfrak S')$ (resp. $\cS(\mathfrak S'')$) is a right (resp. left) module over $U_{q^2}(\mathfrak{sl}_2)^{\partial^L\mathfrak S'}$ (resp. over $U_{q^2}(\mathfrak{sl}_2)^{\partial^R\mathfrak S''=\partial^L\mathfrak S'}$). To conclude, a repeated application of Theorem \ref{r.Hoch2} shows that the following holds up to isomorphism:
$$\cS(\mathfrak S)=\cS(\mathfrak S')\otimes_{U_{q^2}(\mathfrak{sl}_2)^{\otimes \partial^L\mathfrak S'}} \cS(\mathfrak S).$$  \end{proof}
  
 \begin{remark}
 The previous construction can be improved by passing to the setting of $2$-categories in order to consider objects no longer up to isomorphisms. This requires to consider marked surfaces and bimodules and will be dealt with in another work.  
 \end{remark} 

\def\overline{B}{\overline{B}}
\def\bar\theta{\bar\theta}
\def\partial \mathring {\Sigma}{\partial \mathring {\Sigma}}
\section{A non-symmetric modular operad} \label{sub:cooperad}


In this section we show that stated skein algebras provide an example of ``non symmetric geometric modular operad''. Such objects were defined by Markl (\cite{Mar}) as a generalisation of ``modular operads'' initially defined by Geztler and Kapranov (\cite{GK}). Given a monoidal category $C$, Markl defined a NS modular operad in $C$ as a monoidal functor $NSO:\mathsf{MultiCyc}\to C$ where $\mathsf{MultiCyc}$ is a suitable category of $\mathsf{MultiCyc}$ \red{``multicyclic sets''}. 
In this section we rephrase Markl's definition in the case of a suitable category of punctured bordered surfaces $\mathsf{TopMultiCyc}$; then we define a NS geometric modular operad as a monoidal functor $NSO:\mathsf{TopMultiCyc}\to C$. Finally we re-interpret skein algebras as an example of an NS geometric modular operad with values in $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ (see Definition \ref{def:NSCatBim}). 

\subsection{The category of topological multicyclic sets $\mathsf{TopMultiCyc}$.} 
In this section all surfaces will be oriented and all homeomorphisms will preserve the orientation. 

A \emph{cutting system} in a bordered punctured surface $\mathfrak S$ is a finite linearly ordered set ${\bf \alpha}$ of pairwise disjoint ideal oriented arcs $\alpha_1,\cdots ,\alpha_k\subset \mathfrak S$ (see Subsection \ref{sub:puncturedsurfaces}); a homeomorphism of cutting systems $\alpha$ and $\beta$ in $\mathfrak S$ is a homeomorphism $\phi:\mathfrak S\to \mathfrak S$ such that $\phi({\bf \alpha})={\bf \beta}$ so that it preserves the ordering and the orientations of the arcs. 
Cutting along all the arcs of a cutting system ${\bf \alpha}$ produces a bordered punctured surface $\mathsf{cut}_{{\bf \alpha}}(\mathfrak S)$ whose homeomorphism class depends only on the homeomorphism class of ${\bf \alpha}$. We will say that a cutting system ${\bf \alpha}$ is \emph{disconnecting}  if each arc in ${\bf \alpha}$ disconnects $\mathfrak S$. 

If the connected components of $\mathfrak S$ are linearly ordered then one can order the connected components of $\mathsf{cut}_{\bf \alpha}(\mathfrak S)$ as follows. Since $\mathsf{cut}_{\bf \alpha}(\mathfrak S)=\mathsf{cut}_{\alpha_k}\left( \mathsf{cut}_{\alpha_{k-1}}\left( \cdots\mathsf{cut}_{\alpha_1} (\mathfrak S)\right)\right),$ it is sufficient to define how to do it for  of the cut along a single ideal arc $\alpha$. 
If $\alpha$ does not disconnect, then there is a natural bijection between the components of $\mathfrak S$ and $\mathsf{cut}_{\alpha}(\mathfrak S)$ which induces the ordering on those of the latter surface. If $\alpha$ disconnects $\mathfrak S$, since both $\alpha$ and $\mathfrak S$ are oriented there is a well defined notion of the connected component of $\mathsf{cut}_{\alpha}(\mathfrak S)$ ``lying at the left'' and ``at the right of $\alpha$'' we then order them so that left precedes right and they are in the same position in the global ordering of the components of $\mathfrak S$ as the component they come from.

\begin{definition}[$\mathsf{TopMultiCyc},\mathsf{TopForest}$]
Let $\mathsf{TopMultiCyc}$ be the category whose objects are homeomorphism classes of punctured bordered surface whose connected components are linearly ordered, and where a morphism $\mathfrak S' \to \mathfrak S$ is a homeomorphism class of a cutting system $\alpha$ in $\mathfrak S$ such that $\mathsf{cut}_{\alpha}(\mathfrak S)$ is homeomorphic to $\mathfrak S'$.
The category $\mathsf{TopForest}$ is the subcategory whose objects are disjoint unions of polygons (see Example \ref{polygons}) and whose morphisms are those represented by disconnecting cutting systems. 
\end{definition}
If $\phi:\mathfrak S'\to \mathsf{cut}_{\alpha}(\mathfrak S)$ and $\psi:\mathfrak S\to \mathsf{cut}_{\beta}(\mathfrak S'')$ are homeomorphisms, then the composition of the morphisms associated to $\alpha$  and $\beta$ is the homeomorphism class of $\psi(\alpha)\sqcup \beta\subset \mathfrak S''$ where the numbering of the arcs of $\psi(\alpha)$ is lower than those of $\beta$. 
The identity morphism is represented by the class of the empty cutting system and it is straightforward to check that the composition is associative, so that the above are indeed categories. 

Both $\mathsf{TopMultiCyc}$ and $\mathsf{TopForest}$ are symmetric monoidal categories. Indeed the tensor product of $\mathfrak S'=\mathfrak S'_1\sqcup \cdots \sqcup\mathfrak S'_k$ and $\mathfrak S=\mathfrak S_1\sqcup \cdots \sqcup \mathfrak S_h$ (where $\mathfrak S'_i,\mathfrak S_j$ are connected for all $i,j$ and the linear order of the components is increasing from left to right) is defined as $$\mathfrak S'\otimes \mathfrak S:=\mathfrak S'_1 \sqcup \cdots \mathfrak S'_k\sqcup \mathfrak S_1\sqcup \cdots \sqcup \mathfrak S_h.$$
On the level of morphisms, if $\alpha\subset \mathfrak S_1$ and $\beta\subset \mathfrak S_2$ are two cutting systems then $\alpha\otimes \beta=\alpha\sqcup \beta$ where the linear order of the arcs of $\alpha$ is lower than that of the arcs in $\beta$. 
The symmetry is given by exchanging the components, so with the above notations $s(\mathfrak S'\otimes \mathfrak S)=\mathfrak S\otimes \mathfrak S'$ and $s(\alpha\otimes \beta)=\beta\otimes \alpha$. 


 The following definition is a reformulation of Markl's \cite{Mar} (Definition 4.1) in the context of punctured bordered surfaces:
\begin{definition}[NS Modular Operads]
Let $C$ be a symmetric monoidal category.
A $NS$ (non symmetric) geometric modular operad in $C$ is a symmetric monoidal functor $$O:\mathsf{TopMultiCyc}\to C.$$
A $NS$ cyclic operad in $C$ is a symmetric monoidal functor $O:\mathsf{TopForest}\to C$.
\end{definition} 

\subsection{NS geometric modular operads from skein algebras}
Recall that if $\mathfrak B$ is the bigon with one edge of type ``left'' and one of type ``right'', then $\cS(\mathfrak B)={\mathcal O}_{q^2}(\mathrm{SL}(2))$ as a $(U_{q^2}(\mathfrak{sl}_2),U_{q^2}(\mathfrak{sl}_2))$-bimodule.  Let also $\mathfrak B^R$ be the bigon whose edges are declared to be both of type $R$ (right edges) then $\cS(\mathfrak B^R)$ is the left module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes 2}$ whose underlying space is ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ and on which the action of $x\otimes y\in U_{q^2}(\mathfrak{sl}_2)^{\otimes 2}$ is given by $x\otimes y\cdot b=x\cdot b\cdot r^*(y)$ (see Example \ref{ex:bigonright}). 



\begin{theorem}[Skein algebras as non symmetric operads]\label{teo:NSmodoperad}
There is a geometric NS-modular operad $NSO$ in $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ defined on an object $\mathfrak S$ of $\mathsf{TopMultiCyc}$ as $$NSO(\mathfrak S)=(\mathsf{Edges}(\mathfrak S),[{\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)])$$ where $\mathfrak S$ is the surface whose edges are all indexed to be of type L (left) and where we see ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)$ as a right module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes  \mathsf{Edges}({\bf \mathfrak S})}$ as explained in Subsection \ref{sub:modulestructure}.


If $\phi:{\mathfrak S'}\to { \mathfrak S}$ is a morphism associated to a cutting system $\alpha$, then let $$NSO(\phi)=[{\BQ(q^{1/2})}\otimes \cS(\mathfrak B)^{\otimes \mathsf{Edges}(\mathfrak S)}\otimes \cS(\mathfrak B^R)^{\otimes \alpha}]$$
where $\cS(\mathfrak B^R)^{\otimes \alpha}$ is the skein algebra of a disjoint union of one copy of $\mathfrak B^r$ per arc $\alpha_i\in \alpha$ whose boundary edges correspond to the edges of $\partial \mathfrak S'$ lying respectively at the left and at the right of $\alpha_i$. 
\end{theorem}
\begin{proof}
First of all observe that the functor is well defined as all surfaces are seen up to orientation preserving diffeomorphism and all modules and bimodules in $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ are seen up to isomorphism. 
Then we observe that the skein algebra of a disjoint union of $n$ bigons $${\BQ(q^{1/2})}\otimes_\mathcal R \cS(\sqcup_{j=1}^n \mathfrak B_j)={\BQ(q^{1/2})}\otimes_\mathcal R\cS(\mathfrak B)^{\otimes n}={\BQ(q^{1/2})}\otimes_\mathcal R{\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes n}$$ is the identity of $(\{1,2,\cdots ,n\},[M])$ (where $i$ is the left edge of the $i^{th}$-bigon) for any right module $M$ which is a direct sum of finite dimensional modules over $U_{q^2}(\mathfrak{sl}_2)^{\otimes n}$. Indeed $M$ is a direct sum of modules of the form $W\otimes V^R_{j}$ where $V^R_j$ is the $j+1$-dimensional irrep of $U_{q^2}(\mathfrak{sl}_2)$ and $W$ is a right module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes n-1}$ which is itself a tensor product of finite dimensional modules. As proved in Theorem \ref{teo:module} $\cS(\mathfrak B)={\mathcal O}_{q^2}(\mathrm{SL}(2))=\bigoplus_{i} V^L_i\otimes V^R_i$ so that by the same arguments as in the proof of Theorem \ref{r.Hoch2} it holds:
$$[W\otimes V^R_{j}  \otimes_{U_{q^2}(\mathfrak{sl}_2)_{n}} \left( \bigoplus_i V^L_i\otimes V^R_i\right)]=\bigoplus_i[W\otimes \left(V^R_{j}  \otimes_{U_{q^2}(\mathfrak{sl}_2)} V^L_{i}\right)\otimes V^R_{i} ]=[W\otimes V^R_{j} ].$$
This shows that tensoring over $U_{q^2}(\mathfrak{sl}_2)$ with a single copy of ${\BQ(q^{1/2})}\otimes_\mathcal R \cS(\mathfrak B)$ provides the identity morphism; by Remark \ref{rem:glueingcommutes} repeating this along all the boundary edges one gets that tensoring with ${\BQ(q^{1/2})}\otimes_\mathcal R{\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes n}$ is the identity of $(\{1,2,\cdots ,n\},[M])$ for any $M$ decomposing into a direct sum of finite dimensional modules.

Now we prove that if $i,j$ are two distinct boundary edges of a (possibly disconnected) surface $\mathfrak S'$, then
\begin{equation}\label{eq:glueingbigon}
[\cS(\mathfrak S')\otimes_{U_{q^2}(\mathfrak{sl}_2)^{\{i,j\}}}\cS(\mathcal B^R)]=[\cS(\mathfrak S)]
\end{equation}
where $\cS(\mathcal B^R)$ is seen as left module over $U_{q^2}(\mathfrak{sl}_2)^{\{i,j\}}$ and $\mathfrak S$ is the surface obtained by glueing the edges $i,j$ by an orientation reversing homeomorphism. 
Indeed by Remark \ref{rem:glueingcommutes} and Example \ref{ex:bigonR} to glue $\mathfrak B^R$ along $i$ and $j$, one can first glue $\mathfrak S'$ and $\mathfrak B^R$ along $i$ thus obtaining the surface $\mathfrak S'$ whose edge $i$ has been changed to type $R$ (see Example \ref{ex:bigonR}) and then operating a self-glueing along $i$ and $j$ on this surface. 
By Theorem \ref{r.Hoch2} the overall result is ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)$.
Then if $\alpha$ is a cutting system given by $c$ arcs, by  Remark \ref{rem:glueingcommutes} applying $c$ times \eqref{eq:glueingbigon} we get that tensoring with ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak B^R)^{\otimes \alpha}$ is performing the glueing inverting the cut associated to the cutting system $\alpha$.   

\end{proof}


\section{Reduced skein algebra}\label{sec:reduced} We show that the stated skein algebra $\cS(\fS)$ has a nice quotient $\overline {\cS}(\fS)$, called the {\em reduced stated skein algebra}, which can be embedded in a quantum torus. This quotient is still big enough to contain the ordinary skein algebra and the Muller skein algebra. Unlike the case of the full fledged version $\cS(\fS)$, when $\mathfrak S$ is an ideal triangle, the reduced version $\overline {\cS}(\fS)$ is a quantum torus. The construction of the quantum trace map follows immediately from the splitting theorem for the reduced stated skein algebra. 

Throughout we fix a  punctured bordered  surface $\mathfrak S = \overline{\fS} \setminus \mathcal P$ and we will denote $\cS=\cS(\mathfrak S)$.

\subsection{Definition}

A non-trivial arc $\alpha\subset \mathfrak S$, which is the closed interval $[0,1]$ properly embedded in $\mathfrak S$ \red{ not homotopic relative its endpoints to a subset of the boundary $\partial \fS$}, is called a {\em corner arc} 
 if  it is as that depicted in Figure \ref{fig:badarc3}(a), i.e. it cuts off from $\mathfrak S$ a triangle with one ideal vertex. Such an ideal vertex is said to be surrounded by the corner arc $\alpha$. 
 
 A {\em bad arc} is a stated corner arc whose states 
  are as in the figure Figure \ref{fig:badarc3}, i.e. they are $-$ followed by $+$ if we go along the arc counterclockwise around a surrounded vertex.
\FIGc{badarc3}{(a) a bad arc (b) the splitting of a bad arc}{2.5cm} 
The reduced stated skein algebra $\overline{\mathscr S}(\mathfrak S)$ is defined to be  the quotient of \red{$\cS(\mathfrak S)$} by the 2-sided  ideal ${\mathcal I}^{\mathrm{bad}}$ generated by bad arcs. 







 
 \def{\bar \theta}{{\bar \theta}}
 \subsection{Basis}
Let  ${\mathfrak o}_+$ be the orientation of $\partial \mathfrak S$ induced by that of $\mathfrak S$, i.e. every boundary edge has positive orientation.
Then $B:=B(\mathfrak S;{\mathfrak o}_+)$ is an $\mathcal R$-basis of $\cS(\fS)$.  Let $\overline{B}=\overline{B}(\mathfrak S)\subset B$  be the subset consisting of all elements in $B$ which contain no bad arc.
 \begin{theorem} \label{teo:redbasis}
  The set $\overline{B}$ is a free $\mathcal R$-basis of the $\mathcal R$-module $\overline{\mathscr S}(\mathfrak S)$.
 \end{theorem} 

\begin{proof}  Let $A\subset \cS$ be the $\mathcal R$-span of $\overline{B}$ and $A'\subset \cS$ be the $\mathcal R$-span of $B \setminus \overline{B}$. One has $\cS = A \oplus A'$. Let us prove that the ideal ${\mathcal I}^{\mathrm{bad}}$ is equal to $A'$. 

 Proof that $A'\subset {\mathcal I}^{\mathrm{bad}}$. Let $\gamma\in (B \setminus \overline{B})$, i.e. $\gamma$ contains a bad arc. We have to show that $\gamma\in {\mathcal I}^{\mathrm{bad}}$. If an arc in $\gamma$ (at some corner) is bad, then the positive orientation and  increasing  states imply that all the arcs closer to the vertex of that corner are bad, see Figure~\ref{fig:badarc2}. 
\FIGc{badarc2}{If the outer arc is bad, then all inner arcs are bad, too.}{1.5cm}



Thus we assume that $\gamma$ has a bad arc which is an inner most arc, see Figure~\ref{fig:move1}(b).

\FIGc{move1}{(a) The product $\alpha\beta$, here $\alpha$ (in red) is a bad arc, (b) an element $\gamma\in B$ which has a bad  innermost arc (in red). }{3cm}

We have the relations in Figure \ref{fig:rel5}, which are part of Lemma~\ref{r.refl}.
\FIGc{rel5}{Moving endpoint with negative state (left) and positive state (right)}{2.3cm}
The first relation allows us to move the end of the red arc with state $-$ (in $\gamma$) up until we get the diagram in Figure~\ref{fig:move1}(a), which is of the form $\alpha\beta$, where $\alpha$ is a bad arc. The result is that $\gamma \overset \bullet =\alpha \beta$. Thus, $\gamma \in {\mathcal I}^{\mathrm{bad}}$.

 Proof that ${\mathcal I}^{\mathrm{bad}} \subset A'$. We have to show that  $\alpha \beta, \beta \alpha \in A'$ for any bad arc $\alpha$ and any $\beta \in B$. 

The product $\alpha\beta$: In this case, $\alpha \beta$ is presented as in Figure \ref{fig:move1}(a). We already saw that $\alpha \beta \overset \bullet = \gamma$, where $\gamma$ is as in Figure \ref{fig:move1}(b). Since $\gamma\in A'$, we see that $\alpha\beta \in A'$.

\FIGc{move2}{(a) Product $\beta\alpha$, where $\alpha$ is a bad arc (in red), (b) the diagram $\gamma$}{2.5cm}

The product $\beta \alpha$: In this case, $\beta \alpha$ is presented as in Figure \ref{fig:move2}(a). Using the 2nd relation in Figure \ref{fig:rel5}, we get that $\beta\alpha \overset \bullet =  \gamma$, where $\gamma$ is as in Figure \ref{fig:move2}(b). Since $\gamma\in A'$, we see that $\alpha\beta \in A'$.



Thus, ${\mathcal I}^{\mathrm{bad}} =A'$. Hence as $\mathcal R$-modules, $\overline{\mathscr S}(\mathfrak S)=\cS/J \cong A$, which has $\overline{B}$ as an $\mathcal R$-basis. 
\end{proof}            
 \def\bar B{\bar B}
\begin{remark} Positive order is used substantially in the proof. For other orientation of $\partial \fS$, the set similar to $\bar B$ might not be the basis of $\overline {\cS}(\fS)$.
\end{remark}

\begin{corollary} The ordinary skein algebra $\mathring {\cS}(\mathfrak S)$ and the Muller skein algebra $\cS^{\mathrm{+}}(\fS)$ embed naturally into the reduced skein algebra $\overline {\cS}(\fS)$.
\end{corollary}
\begin{proof} Clearly the standard basis of the ordinary skein algebra and the standard basis of the Muller skein algebra (where all the states are $+$) are subsets of the basis $\bar B$ of $\overline {\cS}(\fS)$.
\end{proof}

\subsection{Corner elements} 
\begin{proposition}\label{r.corner} Let $u$ be a stated corner arc with both states positive  and $v$ be the same arc  with both  states negative. Then $uv=vu=1$ in $\overline {\cS}(\fS)$.
\end{proposition}
\begin{proof} In $\overline {\cS}(\fS)$ we have 
$$ vu=   \raisebox{-12pt}{\incl{1.3 cm}{corner}} \ = \ q^2 \,  \raisebox{-12pt}{\incl{1.3 cm}{corner2}}  + q^{-1/2}\,   \raisebox{-12pt}{\incl{1.3 cm}{corner3}} \ = \ q^{-1/2}\,   \raisebox{-12pt}{\incl{1.3 cm}{corner3}}  \, = 1,$$
where the second identity follows from \eqref{eq.order} and  the last follows from \eqref{eq.arcs2}. Similarly,
$$ uv =   \raisebox{-12pt}{\incl{1.3 cm}{cornerp}} \ = \ q^{-2} \,  \raisebox{-12pt}{\incl{1.3 cm}{corner2p}}  - q^{-5/2}\,   \raisebox{-12pt}{\incl{1.3 cm}{corner3p}} \ = \ q^{-5/2}\,   \raisebox{-12pt}{\incl{1.3 cm}{corner3p}}  \, = 1,$$
where the second identity follows from \eqref{eq.order} and  the last follows  from \eqref{eq.arcs2}.
\end{proof}
\subsection{Filtration}

For a finite collection ${\mathfrak{A}}$ of ideal arcs or simple closed loops let $F^{\mathfrak{A}}_n(\overline {\cS}(\fS))$ be the $\mathcal R$-submodule of $\overline {\cS}(\fS)$ spanned by stated tangle diagrams $\alpha$ such that $\sum_{a\in {\mathfrak{A}}} I(a, \alpha) \le n$. Then $(F^{\mathfrak{A}}_n(\overline {\cS}(\fS)))_{n=0}^\infty$ is a filtration of $\overline {\cS}(\fS)$ compatible with the algebra 
structure. Denote by $\mathrm{Gr}^{\mathfrak{A}}(\overline {\cS}(\fS))$ the associated graded algebra:
$$ \mathrm{Gr}^{\mathfrak{A}}(\overline {\cS}(\fS)) = \bigoplus_{n=0}^\infty \mathrm{Gr}^{\mathfrak{A}}_n(\overline {\cS}(\fS)), \ \red{ \text{where}\ } \mathrm{Gr}^{\mathfrak{A}}_n(\overline {\cS}(\fS)) = F^{\mathfrak{A}}_n(\overline {\cS}(\fS))/F^{\mathfrak{A}}_{n-1}(\overline {\cS}(\fS)).$$

From Theorem \ref{teo:redbasis} we have the following analog of Proposition \ref{r.basis2}.
\begin{proposition}\label{r.basis2a} Suppose ${\mathfrak{A}}$ is a collection of boundary edges of $\mathfrak S$.

(a) The set $\{\alpha \in \bar B \mid \sum_{a\in {\mathfrak{A}}} I(\alpha, a) \le n\}$ is an $\mathcal R$-basis of $F^{\mathfrak{A}}_n(\overline {\cS}(\fS))$.

(b) The set $\{\alpha \in \bar B \mid \sum_{a\in {\mathfrak{A}}} I(\alpha, a) = n\}$ is an $\mathcal R$-basis of $\mathrm{Gr}^{\mathfrak{A}}_n(\overline {\cS}(\fS))$.
\end{proposition}

\subsection{Splitting theorem}
 \begin{theorem} \label{teo:rsplit}
Suppose  $\mathfrak S'$ is the result of splitting $\mathfrak S$ along an interior ideal arc $a$. The splitting algebra embedding
$\theta_a: \cS(\fS) \hookrightarrow \mathscr S(\mathfrak S')$
descends to an algebra embedding
 \begin{equation}   \bar\theta_a: \overline{\mathscr S}(\mathfrak S) \to \overline{\mathscr S}(\mathfrak S').
\label{eq.bth}
 \end{equation} 


Besides, if $a$ and $b$ are two disjoint ideal arcs in the interior of $\mathfrak S$, then 
 \begin{equation}  {\bar \theta}_a \circ {\bar \theta}_{b} = {\bar \theta}_{b} \circ {\bar \theta}_a 
\label{eq.com7}
 \end{equation} 
\end{theorem}     
    
 \def{a'}{{a'}}
 \def\aR{{a''}} 
 \def\mathrm{TL}{\mathrm{TL}}
\def\mathrm{BL}{\mathrm{BL}}
\def\mathrm{TR}{\mathrm{TR}}
\def\mathrm{BR}{\mathrm{BR}}
\def{S'_L}{{S'_L}}
\def{S'_R}{{S'_R}}
\def\tilde{\tal}{\tilde{\tilde \al}}
\def\tilde{\tilde{\beta}}{\tilde{\tilde{\beta}}}
\defD_L{D_L}
\defP_R{P_R}
\def\PL{P_L}  
   
    \begin{proof}
    Suppose $\alpha\subset \mathfrak S$ is a bad arc. The geometric intersection $I(\alpha,a)$ is 0 or 1. In the first case $\theta_a(\alpha)=\alpha$ is also a bad arc in $\mathfrak S'$.  In the second case the splitting of $\alpha$, given in Figure~\ref{fig:badarc3}(b), has a bad arc for both values of  $\nu\in \{\pm\}$. It follows that $\theta_a({\mathcal I}^{\mathrm{bad}}) \subset {\mathcal I}^{\mathrm{bad}}$. Hence $\theta_a$ descends to an algebra homomorphism ${\bar \theta}_a:  \overline {\cS}(\fS) \to \overline{\mathscr S}(\mathfrak S')$ and we also have~\eqref{eq.com7}.


It remains to show that ${\bar \theta}_a$ is injective. Let $0\neq x\in \overline{\mathscr S}(\mathfrak S) $. We have to show that ${\bar \theta}_a(x) \neq0$. 
Since $\bar B(\mathfrak S)$ is an $\mathcal R$-basis, there is a non-empty finite set $S \subset \bar B(\mathfrak S)$ such that
 \begin{equation}  
x = \sum_{\alpha\in S} c_\alpha \alpha, \quad 0 \neq c_\alpha \in \mathcal R.
 \end{equation}  
Let $k=\max_{\alpha\in S} I(\alpha, a)$. Then $S':=\{ \alpha\in S \mid I(\alpha,a)=k\}$ is non-empty.

Let $\mathrm{pr}:\mathfrak S'\to \mathfrak S$ be the projection and  ${a'},\aR \subset \mathfrak S'$ be the boundary edges which are  $\mathrm{pr}^{-1}(a)$. To simplify the notations we write $F^{\mathfrak{A}}_n$ and $\mathrm{Gr}^{\mathfrak{A}}_n$ for respectively $F^{\mathfrak{A}}_n(\overline{\mathscr S}(\mathfrak S')) $ and $\mathrm{Gr}^{\mathfrak{A}}_n(\overline{\mathscr S}(\mathfrak S'))$.
From the formula of the splitting homomorphism, for every $\alpha\in S$,
$$ {\bar \theta}_a(\alpha) \in F^{a'}_k \cap F^\aR_k \subset  F_{2k}^{\{{a'},\aR\}}.$$
Let $ P:  F_{2k}^{\{{a'},\aR\}} \twoheadrightarrow\mathrm{Gr}_{2k}^{\{{a'},\aR\}}$ be the canonical projection.
Clearly if $ \alpha\in S\setminus S'$ then $P(\alpha)=0$. We consider  Case 1 and Case 2 below.
\\
{\bf Case 1:} {\em   There exists $\beta\in S$ such that $P({\bar \theta}_a(\beta))\neq0$.}

\FIGc{split7}{The split surface $\mathfrak S'$, with orientations ${\mathfrak o}'$ on $\partial \fS'$. The top left, top right, bottom left, and bottom right corners are marked respectively $TL, TR, BL, BR$.} {2.5cm}

Choose an orientation of $a$ such that the induced orientation on $\aR$ is positive. Then the induced orientation on ${a'}$ is negative, see Figure \ref{fig:split7}. Let ${\mathfrak o}'$ be the orientation of $\partial \fS'$ which is positive everywhere except for the edge $a'$ where it is negative. For $\alpha\in S'$ its lift $\tilde \al=\mathrm{pr}^{-1}(\alpha)$ is a {\em partially stated tangle diagram}: it is stated everywhere except for endpoints on ${a'}\cap \aR$, and the endpoints on each of ${a'}$ and $\aR$ are ordered by ${\mathfrak o}'$. Let $\tilde \al^+$ be the same $\tilde \al$ except that the order on ${a'}$ (and hence on all edges) is given by the positive orientation.

For $ 0\le j\le k$ let
$s_j(\tilde \al)$ (respectively $s_j(\tilde \al^+))$ be the stated tangle diagram  which is  $\tilde \al$ (respectively $\tilde \al^+$) where  the states on each of ${a'}$ and $\aR$ are increasing and having exactly $j$ minus signs. Then $s_j(\tilde \al^+)$ is either equal to $0$ in $\overline{\mathscr S}(\mathfrak S')$ or belongs to the basis set $\bar B(\mathfrak S')$.
\def\tilde{\beta}{\tilde{\beta}}

By Proposition \ref{r.grbinom} and then Proposition \ref{r.orichange} we have, for some $f(\alpha,j) \in \mathbb Z$, 
 \begin{equation}  
P({\bar \theta}_a(\alpha)) = \sum_{j=0}^k  \binom kj_{q^4} \, s_j (\tilde \al) =  \sum_{j=0}^k  \binom kj_{q^4} q^{f(\alpha,j)}s_j(\tilde \al^+). \label{eq.lu1}
 \end{equation} 
Since  $P({\bar \theta}_a(\beta))\neq0$,  there is $l$ such that $s_l(\tilde{\beta}^+)\neq 0$ in $\overline{\mathscr S}(\mathfrak S')$ and hence $s_l(\tilde{\beta}^+)\in  \bar B(\mathfrak S')$.

Using \eqref{eq.lu1} we have
 \begin{equation}  
P ({\bar \theta}_a((x))= \sum_{\alpha\in S'} \sum_{j=0}^k \binom kj_{q^4} q^{f(\alpha,j)} \, c_\alpha\, s_j(\tilde \al^+).
\label{eq.lu2}
 \end{equation} 

As  $\alpha \in S'$ can be recovered from $\tilde \al$, if $\alpha\neq \beta$  then the two partially stated diagrams $\tilde \al$ and $\tilde{\beta}$  are not isotopic.
 It follows that  $s_l(\tilde{\beta}^+)\neq s_{j}(\tilde \al^+)$ for all $j$ and all $\alpha \neq \beta$. It is also clear that $s_j(\widetilde \theta  ^+) \neq s_l(\widetilde \theta  ^+)$ for $j \neq l$.
 Hence the right hand side of \eqref{eq.lu2} is not 0, since the basis element $s_l(\tilde{\beta}^+)$ has non-zero coefficient, and all other elements $s_j(\tilde \al^+)$ is either 0 or a basis element different from $s_l(\tilde{\beta}^+)$. Thus $P ({\bar \theta}_a((x))\neq 0$ and consequently ${\bar \theta}_a(x)\neq 0$. This completes the proof in Case 1.
 
 

\noindent {\bf Case 2:} {\em  For all $\alpha\in S$ we have $P({\bar \theta}_a(\alpha))=0$.} Identity \eqref{eq.lu1} shows that $s_j(\tilde \al^+)=0$ for all $0\le j\le k$ and all $\alpha\in S'$.

Incident with ${a'}$ there are two corners, the top left corner and the bottom left corner. 
 Similarly, incident with $\aR$ there are the top right corner and the bottom right corner, see Figure \ref{fig:split7}. A corner arc of $\tilde \al$ at one of these four corners has  one end stated and one end not stated, and it is called a {\em negative (respectively positive)} corner arc if this only state is negative (respectively positive).


For $\alpha\in S'$ and $\nu\in \{\pm\}$ let  $\mathrm{TL}_\nu(\alpha)$  be the number of top left corner arcs  whose only state  is $\nu$. Define $\mathrm{TR}_\pm(\alpha), \mathrm{BL}_\pm(\alpha), \mathrm{BR}\pm(\alpha)$ similarly.


\begin{lemma} Suppose $\alpha\in S'$. One of the following two mutually exclusive cases happens:\\
 (i)  $\mathrm{TL}_-(\alpha) >0$ and $\mathrm{BL}_+(\alpha) >0$, or \\
 (ii) $\mathrm{BR}_-(\alpha) >0$ and $\mathrm{BR}_+(\alpha) >0$. \label{r.lu77}
\end{lemma}
\begin{proof} Since $s_0(\tilde \al^+)$ is 0 in $\overline{\mathscr S}(\mathfrak S')$, it has a bad arc. This implies either $\mathrm{TL}_-(\alpha) >0$ or $\mathrm{BR}_-(\alpha) >0$.

Assume $\mathrm{TL}_-(\alpha) >0$. Since $\alpha$ does not have a bad arc, we conclude that $\mathrm{TR}_+(\alpha)=0$. Then from $s_k(\tilde \al^+)=0$ we see that $\mathrm{BR}_+(\alpha) >0$. Again since $\alpha$ does not have a bad arc, we conclude that $\mathrm{BR}_-(\alpha) =0$. Thus we have case (i) but not case (ii).

Assume $\mathrm{BR}_-(\alpha) >0$. Since $\alpha$ does not have a bad arc, we conclude that $\mathrm{BL}_+(\alpha)=0$. Then from $s_0(\tilde \al^+)=0$ we see that $\mathrm{TR}_+(\alpha) >0$. Again since $\alpha$ does not have a bad arc, we conclude that $\mathrm{BL}_-(\alpha) =0$. Thus we have case (ii) but not case (i).
\end{proof}
The cases (i) and (ii) of Lemma \ref{r.lu77} partition  $S'= {S'_L} \sqcup {S'_R}$, where
$$ {S'_L}=\{\alpha\in S' \mid \mathrm{TL}_-(\alpha)\, \mathrm{BL}_+(\alpha)  >0 \}, \quad  {S'_R}=\{\alpha\in S' \mid \mathrm{BR}_-(\alpha)\, \mathrm{BR}_+(\alpha) >0 \}.$$

\begin{lemma} If $\alpha\in {S'_L}$ then ${\bar \theta}_a(\alpha)=0$ in $\mathrm{Gr}^{a'}_k$. Similarly, if $\alpha\in {S'_R}$ then ${\bar \theta}_a(\alpha)=0$ in  $\mathrm{Gr}^\aR_k$.
\label{r.lu9}
\end{lemma}
\begin{proof} Suppose $\alpha\in {S'_L}$. For  ${\vec\nu}=(\nu_1,\dots, \nu_k)$ the stated tangle diagram $(\tilde \al,{\vec\nu})$ is defined to be $\tilde \al$ with states on both ${a'}$ and $\aR$ are sequence ${\vec\nu}$ listed from top to bottom.
By definition,
 \begin{equation}  
{\bar \theta}_a (\alpha) = \sum_{{\vec\nu}\in \{\pm \}^k} (\tilde \al, {\vec\nu})\label{eq.lu3a}.
 \end{equation} 
Let $(\tilde \al^+, {\vec\nu})_L$ be 
$\tilde \al^+$ whose states on $\aR$ is given by ${\vec\nu}$ but whose state on ${a'}$ is given by a permutation of ${\vec\nu}$ such that the states are increasing on ${a'}$. 
By Proposition \ref{r.orichange} 
 \begin{equation}  (\tilde \al, {\vec\nu})\overset \bullet =  (\tilde \al^+, {\vec\nu})_L  \quad \text{in } \mathrm{Gr}^{a'}_k \label{eq.lu6a}.
 \end{equation} 
If ${\vec\nu}$ has at least one negative sign then $(\tilde \al^+, {\vec\nu})_L$ has a bad arc in the bottom left corner (because $BL_+(\alpha) >0$) and hence is equal to 0 in $\overline{\mathscr S}(\mathfrak S')$. If ${\vec\nu}$ has at least one positive sign  then $(\tilde \al^+, {\vec\nu})_L$ has a bad arc in the top left corner (because $TL_-(\alpha) >0$) and hence is equal to 0 in $\overline{\mathscr S}(\mathfrak S')$. Thus we always have $(\tilde \al^+, {\vec\nu})_L=0$ in $\overline{\mathscr S}(\mathfrak S')$. From \eqref{eq.lu6a} and \eqref{eq.lu3a} we conclude that ${\bar \theta}_a (\alpha)=0$ in $\mathrm{Gr}^{a'}_k$.

The other case follows from the above case by noticing that if one rotates the Figure~\ref{fig:split7} by $180^\circ$, then the top left corner becomes the bottom right corner.
\end{proof}




As $\emptyset \neq S'= {S'_L} \sqcup {S'_R}$, one of ${S'_L}$ and ${S'_R}$ is non-empty. Without loss of generality we can assume that ${S'_L}$ is not empty.

Let $d = \min \{ \mathrm{TL}_-(\alpha) \mid {\alpha \in {S'_L}}\}$ and $S'' =\{ \alpha \in {S'_L} \mid \mathrm{TL}_-(\alpha) =d \}$. Then $S''\neq \emptyset$.
 
 Let $P_+: \overline{\mathscr S}(\mathfrak S') \to \overline{\mathscr S}(\mathfrak S')$ be the $\mathcal R$-linear map defined on basis elements $\gamma\in \bar B(\mathfrak S')$ by 
 $$ P_+(\gamma) =   \begin{cases}  \gamma \quad & \text{if} \ I(\gamma,{a'})=d, I(\gamma, \aR)=k,\  \text{all states on ${a'}$ are $+$}  \\
0 & \text{otherwise.}\end{cases} 
 $$
 
For $\alpha\in S''$ let $\tilde{\tal}$ be the stated tangle diagram obtained from $\tilde \al^+$ by first removing the $d$ negative top left corner arcs  then providing states on ${a'}$ and $\aR$ so that all states on ${a'}$ are $+$ and the states on $\aR$ are increasing and having exactly $d$ negative signs. Since $\mathrm{BR}_-(\alpha)=0$, we see that $\tilde{\tal}$ is an element of the basis $\bar B(\mathfrak S')$. As $\alpha$ can be recovered from $\tilde{\tal}$, the map $\alpha \to \tilde{\tal}$ from $S''$ to $\bar B(\mathfrak S')$ is injective.

 
Let $u$ be a top left corner arc whose both states are $+$.
\begin{lemma} For $\alpha\in S$ one has
 \begin{equation}  P_+({\bar \theta}_a(\alpha)\, u^d) = \begin{cases} q^{-(k-d)(k-d-1)/2 }\,   \tilde{\tal} \quad &\text{if} \ \alpha \in S''\\
0 & \text {if} \ \alpha \not\in S''.\end{cases}  \label{eq.lu5}
 \end{equation}  
\label{r.lu1}
\end{lemma}
\begin{proof} One has $S = ({S'_R} \sqcup {S'_L}) \sqcup (S \setminus S')$. If $\alpha\in (S\setminus S')$ then $I(\alpha, a) <k$ and hence $P^+({\bar \theta}_a(\alpha)) =0$.

If $\alpha\in {S'_R}$ then by Lemma \ref{r.lu9} one has ${\bar \theta}_a(\alpha)=0$ in $\mathrm{Gr}^\aR_k$ which means ${\bar \theta}_a(\alpha)$ is a linear combination of elements $\gamma\in \bar B$ with $I(\gamma,\aR) <k$. It follows that $P_+({\bar \theta}_a(\alpha))=0$.

It remains to consider the case $\alpha\in {S'_L}= S'' \sqcup ({S'_L} \setminus S'')$.
From \eqref{eq.lu3a},
 \begin{equation} 
P_+(\theta_a (\alpha) u^d ) = \sum_{{\vec\nu}\in \{\pm \}^k} P_+((\tilde \al, {\vec\nu})\, u^d).  \label{eq.lu3b}
 \end{equation} 
Recall that for $\beta\in \bar B(\mathfrak S')$ one defines $\delta_{a'}(\beta)$ as the sum of all the states of $\beta \cap {a'}$. From the definition, if $\delta_{a'}(\beta) \neq k-d$ then $P^+(\beta)=0$.
If ${\vec\nu}$ has $m$ negative signs where $m>d$ then 
$$ \delta_{a'}((\tilde \al, {\vec\nu}) \, u^d)=  k -2m +d < k-d,$$ 
and hence $P_+((\tilde \al, {\vec\nu}) \, u^d)=0$. Thus we can assume that in the sum in \eqref{eq.lu3b}, the number of negative signs in ${\vec\nu}$ is $\le d$.

 Assume that $\mathrm{TL}_-(\alpha)=m$. Note that the $m$ negative top left corner arcs of $\tilde \al$ are below any other components of $\tilde \al$.  Hence the number of the first $m$ components of ${\vec\nu}$ must be negative since otherwise one of the $m$ top left corner arcs is bad and $(\tilde \al,{\vec\nu})= 0$ in $\overline{\mathscr S}(\mathfrak S')$.
We conclude that if  $TL_-(\alpha) >d$ (that is, if $\alpha \in {S'_L}\setminus S''$), then
 \begin{equation}  P_+(\theta_a (\alpha) u^d ) =0 . \label{eq.lu7}
 \end{equation} 
Moreover, if $TL_-(\alpha)=d$ (that is, $\alpha \in S''$), then 
 \begin{equation} 
P_+(\theta_a (\alpha) u^d ) = P_+((\tilde \al, {\vec\nu}_d)\, u^d), \label{eq.lu4}
 \end{equation} 
where ${\vec\nu}_d\in \{\pm \}^k$ is the sequence whose first $d$ components are $-$ and all other components are $+$. The $d$ negative top left  corner arcs of $(\tilde \al,{\vec\nu}_d)$ are all $v$, the corner edge with negative states on both ends.  Hence we have
$ (\tilde \al, {\vec\nu})= \tilde{\tal}' v^d$, where $\tilde{\tal}'$ is the same as $\tilde{\tal}$ except that the order on ${a'}$ is negative. Using the height exchange move between positive states, see Equation \eqref{eq.reor1},  and relation $vu=1$ we get that
$$P_+((\tilde \al, {\vec\nu}_d)\, u^d) =  q^{-(k-d)(k-d-1)/2 }\tilde{\tal}, $$
which proves \eqref{eq.lu5} and completes the proof of the lemma.
\end{proof}
Let us continue the proof of the theorem for Case 2. From Lemma \ref{r.lu1} we have
$$ P_+({\bar \theta}_a(x) u^d ) = \sum_{\alpha\in S''} c_\alpha q^{-(k-d)(k-d-1)/2 } \tilde{\tal},$$
which is non-zero since $\{\tilde{\tal}\}$ are distinct elements of the basis $\bar B(\mathfrak S')$. The theorem is proved.
    \end{proof}
    
                                                                                                   
\subsection{The bigon} The elements $\alpha_{\mu\nu}\in\mathscr S(\mathcal B)$ are defined in Section \ref{sec:bigon}.
 \begin{proposition} \label{r.rbigon} Let $\mathcal B$ be the bigon.  There is an algebra isomorphism 
 $\overline{\mathscr S}(\mathcal B)\cong \mathcal R[x^{\pm 1}]$ given by
 $\alpha_{++}\to  x , \ \alpha_{--} \to x ^{-1}, \ \alpha_{+-} \to 0, \  \alpha_{-+}\to 0$.
 
                                                                                                  
\end{proposition}     
\begin{proof} A presentation of the algebra $\cS(\mathfrak B)\cong {\mathcal O}_{q^2}(\mathrm{SL}(2))$ is given by Theorem \ref{teo:SL2},  with generators $a=\alpha_{++}, b=\alpha_{--}, c= \alpha_{-+}, d= \alpha_{--}$ and relations \eqref{eq.rel1} and \eqref{eq.rel2}.  
The only bad arcs in $\mathcal B$ are $\alpha_{-+}=c$ and $\alpha_{+-}=b$. Thus $\overline{\mathscr S}(\mathcal B)= \mathscr S(\mathcal B) /{\mathcal I}^{\mathrm{bad}}$ has a presentation like that of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, with additional relations $b=c=0$. From the quantum determinant relation in \eqref{eq.rel2} we get $ad=1$ in $\overline{\mathscr S}(\mathcal B)$. 

On the other hand it is easy to check that the relations $b=c=0$ and $ad=1$ imply all other relations in \eqref{eq.rel1} and \eqref{eq.rel2}. Hence
$$ \overline{\mathscr S}(\mathcal B) \cong \mathcal R\langle a,b,c,d\rangle /(ad=1, b=c=0) \cong \mathcal R[a^{\pm1}].$$
\end{proof}                                                                                              


\subsection{The triangle} 
Let $\mathcal P_3$ be the ideal triangle, with boundary edges $a,b,c$ as in Figure~\ref{fig:triangle}. 
Let $\alpha, \beta,\gamma$ be the corner arcs which are opposite respectively to  $a, b$ and $c$. For $\mu,\nu\in \{\pm \}$ and $\xi\in \{\alpha, \beta,\gamma\}$ let $\xi(\mu\nu)$ be the arc $\xi$ with states $\mu$ and $\nu$ on the end points such that $\nu$ follows $\mu$ along $\xi$ counter-clockwise (with respect to the vertex surrounded by $\xi$). 

\FIGc{triangle}{Edges $a,b,c$ opposite to corner arcs $\alpha, \beta,\gamma$}{2.5cm}


For an anti-symmetric $n\times n$ matrix $A = (a_{ij})_{i,j=1}^n$ the {\em quantum torus} associated to $A$ is the algebra with presentation
$$  \mathcal R \langle x_i^{\pm 1}, i= 1, \dots n\rangle  /( x_i x_j = q^{a_{ij}} x_j x_i).$$
For basic properties of quantum tori see for example \cite[Section 2]{Le:QT}.

To the triangle $\mathcal P_3$ we associate the quantum torus $\mathbb T$ with presentation
$$\mathbb T := \mathcal R \langle \alpha^{\pm 1}, \beta^{\pm 1}, \gamma^{\pm 1} \rangle /( q\alpha \beta  =  \beta \alpha, q\beta \gamma =  \gamma\beta, q\gamma \alpha =  \gamma \alpha).
$$

\def\cS(\P_3){\mathscr S(\mathcal P_3)}
\def\bcS(\P_3){\overline{\mathscr S}(\mathcal P_3)}
The cyclic group $\mathbb Z/3= \langle \tau \mid \tau^3=1\rangle$ acts by algebra automorphisms on each of the algebras $\mathscr S(\mathcal P_3)$, $\overline{\mathscr S}(\mathcal P_3)$, and $\mathbb T$ as follows. In short  $\tau$ is rotation $\tau$  by $2\pi/3$ counterclockwise about the center of the triangle. This rotation induces the algebra automorphism $\tau$ of $\cS(\P_3)$; it also induces the algebra automorphism $\tau$ of $\bcS(\P_3)$. On $\mathbb T$ and  $\tau$ is given by
\begin{align*}
\tau(\alpha) =\beta,\ \tau(\beta) =\gamma, \  \tau(\gamma) = \alpha.
\end{align*} 


\begin{theorem} \label{teo:redtri}
The reduced skein algebra $\overline{\mathscr S}(\mathcal P_3)$ of the ideal  triangle is isomorphic to the quantum torus $\mathbb T$. The isomorphism is $\mathbb Z/3$-equivariant and given by 
 \begin{equation}   \alpha(++) \to \alpha, \quad \alpha(+-) \to q^{-\frac{1}{2}}\gamma \beta, \quad \alpha(-+) \to 0, \quad \alpha(--) \to \alpha^{-1}.
\label{eq.iso66}
 \end{equation} 
\end{theorem}   
\begin{proof}
By \cite[Theorem 4.6]{Le:TDEC} the algebra  $\cS(\mathcal P_3)$ is generated by $$X=\{ \alpha({\nu,\nu')},\beta({\nu,\nu'}), \gamma({\nu,\nu'})  \mid \nu, \nu'\in \{\pm \}\}$$ subject to the following relations and their images under $\tau$ and $\tau^2$:
\begin{align}
\label{rel1} \beta(\mu,\nu)\, \alpha(\mu',\nu')& = q \alpha(\nu, \nu') \,  \beta(\mu,\mu') -q^2 C^{\nu}_{\mu'} \, \gamma(\nu', \mu)
\\
\label{rel2} \alpha(-,\nu)\, \alpha(+,\nu')& = q^2 \alpha(+,\nu) \,\alpha(-,\nu') - q^{5/2} C^\nu_{\nu'}
\\
\label{rel2b} \alpha(\nu,-)\, \alpha(\nu',+)& = q^2 \alpha(\nu,+) \,\alpha(\nu',-) - q^{5/2} C^\nu_{\nu'}
\\
\label{rel3} \alpha(-,\nu)\, \beta(\nu',+)& = q^2 \alpha(+,\nu)\, \beta(\nu',-) - q^{5/2} \gamma(\nu,\nu')
\\
\label{rel4} \alpha(\nu,-)\, \gamma(+, \nu')& = q^2 \alpha(\nu,+)\, \gamma(-,\nu') + q^{-1/2} \beta(\nu',\nu).
\end{align}
As the only bad arcs are $\alpha(-,+), \beta(-,+),\gamma(-,+)$, the quotient $\bcS(\P_3)$ is obtained by adding the relations $\alpha(-,+)= \beta(-,+)=\gamma(-,+)=0$, and from this presentation one can check that the map given by \eqref{eq.iso66} and its images under the action of $\mathbb Z/3$ is an isomorphism.

Here is an alternative, more geometric proof. 
First in $\bcS(\P_3)$  we have 
 \begin{equation}   \alpha(++) \, \alpha(--) =1 , \quad  \beta(++)\, \alpha(++) = q\,  \alpha(++)\,  \beta(++), \label{eq.rel55}  \end{equation} 
and all its images under $\mathbb Z/3$. In fact the first identity follows from Proposition \ref{r.corner} and the second follows from the height exchange identity \eqref{eq.reor1}.
It follows that the $\mathbb Z/3$-equivariant map $f: \mathbb T \to \bcS(\P_3)$ given by
$$ f(\alpha)= \alpha(++),\ f(\alpha^{-1})= \alpha(--), \ \text{and images under $\mathbb Z/3$},$$
gives a well-defined algebra homomorphism, as all the defining relations of $\mathbb T$ are preserved under $f$. In $\bcS(\P_3)$ we have
 \begin{equation}  
\gamma(+-) = q^{-1/2}\, \beta(++)\,  \gamma(--),
 \end{equation} 
which follows from the identity in Figure \ref{fig:brten6-new} (where the left hand arc is stated to become $\alpha(+-)$). Thus all elements in the generator set  $X$ are in the image of $f$. This shows that $f$ is surjective. 

Let us show $f$ is injective. The set $\{ \alpha^k \beta^m \gamma^n \mid k,m,n,\in \mathbb Z\}$ is an $\mathcal R$-basis of $\mathbb T$. Assume that there is a finite set $S\subset \mathbb Z^3$ such that
 \begin{equation}   f\left (\sum_{(k,m,n) \in S} c_{k,m,n} \alpha^k \beta^m \gamma^n\right) =0, \ c_{k,m,n} \in \mathcal R.
\label{eq.lu20}
 \end{equation} 
 Multiplying the identity \eqref{eq.lu20} on the left by $f(\alpha^{k'} \beta^{m'} \gamma^{n'})$ with large $k', m', n'$ and using the $q$-commutations between $\alpha, \beta,\gamma$ we can assume that $k,m,n > 0$ in \eqref{eq.lu20}. For each $(k,m,n)\in \mathbb N^3$ let $z(k,m,n)$ be the stated  simple tangle diagram consisting of $k$ arcs parallel to $\alpha$, $m$ arcs parallel to $\beta$, and $n$ arcs parallel to $\gamma$, with all state positive. Note that $z(k,m,n) \in \bar B(\mathcal P_3)$.
Clearly the map $z:\mathbb N^3 \to \bar B(\mathcal P_3)$ is injective. 
As the diagram of $f(\alpha^k \beta^m \gamma^n)$ can be obtained from $z(k,m,n)$ by a sequence of height change moves of positively stated endpoints, the first identity of \eqref{eq.reor1} shows that 
$$ f(\alpha^k \beta^m \gamma^n)= q^{g(k,m,n)}\,  z(k,m,n)$$
for some $g(k,m,n) \in \mathbb Z$. From \eqref{eq.lu2} we get
$$ \sum_{(k,m,n) \in S} c_{k,m,n} q ^{g(k,m,n)}\,  z(k,m,n) =0.$$
As $z(k,m,n)$ are distinct elements of the basis $\bar B(\mathcal P_3)$, this forces all $c_{k,m,n}=0$. Hence $f$ is injective.

\end{proof}                                                                                                                      
\def\faces{\mathrm{\mathcal F(\mathcal E)}} 
                                      
\subsection{The quantum trace map}  \label{sec.rTrace} Assume that $\mathfrak S$ is {\em triangulable}, i.e. $\mathfrak S$   is  not one of the following: a monogon, a bigon, a sphere with one or two punctures. 
{\em A triangulation} $\mathcal E$ of $\mathfrak S$ is a collection consisting of all boundary edges and several ideal arcs in the interior of $\mathfrak S$ such that\\
(i) no two arcs in $\mathcal E$ intersect and no two are isotopic, and\\
(ii) if $a$ is an ideal arc not intersecting any ideal arc in $\mathcal E$ then $a$ is isotopic to one in $\mathcal E$.

It is known that if $\mathfrak S$ is triangulable, then by splitting $\mathfrak S$ along all interior ideal arcs in $\mathcal E$ we get a collection $\faces$ of ideal triangles.
By the splitting theorem, we get an algebra embedding of $\overline{\mathscr S}(\mathfrak S)$ into a quantum torus
$$ \Theta: \overline{\mathscr S}(\mathfrak S) \to \bigotimes_{\faces} \mathbb T.$$

In addition to the quantum torus $\mathbb T$ we associate the quantum torus $\mathbb T'$ to the standard ideal triangle $\mathcal P_3$:
\begin{align}
 \mathbb T' : = \mathcal R \langle a^{\pm 1}, b^{\pm 1}, c^{\pm 1} \rangle /( qab  =  ba, qbc =  cb, qca =   ac).
\end{align}
One should think of $a,b,c$ as the edges opposite to $\alpha,\beta,\gamma$, see Figure \ref{fig:triangle}. 

\def\cS(\P_3){\mathscr S(\mathcal P_3)}
\def\bcS(\P_3){\overline{\mathscr S}(\mathcal P_3)}
The cyclic group $\mathbb Z/3= \langle \tau \mid \tau^3=1\rangle$ acts by algebra automorphisms on  $\mathbb T'$  by
\begin{align*}
\tau(a) =b, \ \tau(b) =c, \ \tau(c) = a.
\end{align*} 


There is a $\mathbb Z/3$-equivariant algebra embedding 
$\mathbb T \hookrightarrow \mathbb T'$, defined by
$$ \alpha \to q^{1/2} bc , \quad \beta \hookrightarrow q^{1/2} ca , \quad \gamma \to q^{1/2} ab.$$



Consider  the composition $\tr_q$ given by
$$ \tr_q: \overline{\mathscr S}(\mathfrak S) \overset \Theta \hookrightarrow  \bigotimes_{{\faces}} \mathbb T \hookrightarrow \bigotimes_{{\faces}} \mathbb T'.$$


On the collection of all edges of all the triangles in $\faces$ define the equivalence relation \red{such that} $a' \cong a''$ if \red{$a'$ and $a''$} are glued together in the triangulation. Then the set of equivalence classes is canonically isomorphic to $\mathcal E$.
Let $\mathcal Y(\mathcal E)$ be the subalgebra of $\bigotimes_{\faces} \mathbb T'$ generated by all $a'\otimes a''$ with $a\cong a'$ and all boundary edges (each boundary edge is equivalent only to itself). It is easy to see that the image of $\tr_q$ is in $\mathcal Y(\mathcal E)$. Thus, $\tr_q$ restricts to
$$ \tr_q: \overline{\mathscr S}(\mathfrak S) \to \mathcal Y(\mathcal E).$$
 The algebra  $\mathcal Y(\mathcal E)$ is a quantum torus, known as the Chekhov-Fock algebra associated to a triangulation $\mathcal E$ of $\mathfrak S$, see \cite{BW,CF,Le:TDEC}.
 \red{ 
 The quantum trace map of Bonahon and Wong is an algebra homomorphism $\widehat \tr_q: \widehat \mathscr S(\mathfrak S)\to \mathcal Y(\mathcal E)$, where $\widehat \mathscr S(\mathfrak S)$ is the coarser version of $\mathscr S(\mathfrak S)$ defined using only \eqref{eq.skein} and \eqref{eq.loop}, see Subsection \ref{sub:statedskeinalgebra}. 


\begin{theorem}\label{thm.qtrace} 
If $\mathcal E$ is a triangulation of $\mathfrak S$ then the algebra embedding 
$ \tr_q: \overline{\mathscr S}(\mathfrak S) \hookrightarrow \mathcal Y(\mathcal E)$ is a refinement of the 
the quantum trace map of Bonahon and Wong  in the sense that $\widehat \tr_q$ is the composition $ \widehat \mathscr S(\mathfrak S) \twoheadrightarrow \overline{\mathscr S}(\mathfrak S) \overset {\tr_q} \hookrightarrow \mathcal Y.$
\end{theorem} 
\begin{proof}  In \cite{Le:TDEC} an algebra homomorphism $\varkappa_\mathcal E: \mathscr S(\mathfrak S) \to \mathcal Y(\mathcal E)$ is defined as the composition
$$ \cS(\fS) \hookrightarrow  \bigotimes_{{\faces}} \mathscr S( \mathcal P_3 )  \hookrightarrow \bigotimes_{{\faces}} \mathbb T',$$
where the map from $\mathscr S(\mathcal P_3)$ to $\mathbb T'$  is exactly the composition $\mathscr S(\mathcal P_3) \to \overline{\mathscr S}(\mathcal P_3)\to \mathbb T'$. It follows that $\varkappa_\mathcal E$ is the composition $\mathscr S(\mathfrak S) \twoheadrightarrow \overline{\mathscr S}(\mathfrak S) \overset {\tr_q} \hookrightarrow \mathcal Y$. In \cite{Le:TDEC} it is proved that $\widehat \tr_q$ is the composition $ \widehat \mathscr S(\mathfrak S) \twoheadrightarrow \mathscr S(\mathfrak S)  \overset {\varkappa_\mathcal E} \to \mathcal Y$. Hence  $\widehat \tr_q$ is also the composition $ \widehat \mathscr S(\mathfrak S) \twoheadrightarrow \overline{\mathscr S}(\mathfrak S)  \overset {\tr_q} \hookrightarrow \mathcal Y$.
\end{proof}

Besides giving another proof of the existence of the quantum trace map, Theorem \ref{thm.qtrace} shows that the kernel of $\widehat\tr_q$ is the ideal generated by relations \eqref{eq.arcs}, \eqref{eq.order}, and the ideal $\mathcal I^{\mathrm{bad}}$.
}
  

\subsection{Co/module structure for $\overline{\mathscr S}(\mathfrak S)$}     The Hopf algebra structure of $\mathscr S(\mathcal B)$ descends to a Hopf algebra of $\overline{\mathscr S}(\mathcal B)$. We identify $\overline{\mathscr S}(\mathcal B)\equiv \mathcal R[x^{\pm 1}]$ using the isomorphism of  Proposition \ref{r.rbigon}.  Then  $\Delta(x) = x \otimes x$ and $\epsilon (x)=1$.
                    
Arguing exactly as in Subsection \ref{sub:comodule}, one sees that for each surface $\mathfrak S$ and each edge $e$ of $\mathfrak S$, the algebra $\overline{\mathscr S}(\mathfrak S)$ has both a left and a right $\mathcal R[x^{\pm1}]$-comodule algebra structure (which is equivalent to a $\mathbb{Z}$-valued grading counting the number of $+$ and $-$ states of each skein along $e$): 
\begin{proposition}\label{prop:reducedcomodule} (a) The map $\Delta_e: \overline{\mathscr S}(\mathfrak S) \to  \overline{\mathscr S}(\mathfrak S) \otimes \overline{\mathscr S}(\mathcal B)$ gives $\overline{\mathscr S}(\mathfrak S)$ a right comodule-algebra structure over the Hopf algebra $\mathcal R[x^{\pm1}]$. Similarly $\null _e\Delta$ gives gives $\overline{\mathscr S}(\mathfrak S)$ a left comodule-algebra structure over the Hopf algebra $\mathcal R[x^{\pm1}]$. 
 
(b)  If $e_1,e_2$ are two distinct boundary edges, the coactions on the two edges commute, i.e.  for instance $$(\Delta_{e_2}\otimes \mathrm{id})\circ \Delta_{e_1}=(\Delta_{e_1}\otimes \mathrm{id})\circ \Delta_{e_2}.$$
\end{proposition}

In the reduced setting, though, Theorem \ref{teo:cotensor} does no longer hold:
indeed, with the notation in there, if $\beta\in \overline{B}(\mathfrak S)$ is a basis element intersecting a cutting edge exactly once, then its image $\theta(\beta)$ under the cutting morphism is $\theta(\beta)=\beta'_{++}+\beta'_{--}$ where $\beta'_{++},\beta'_{--}\in \overline{B}(\mathfrak S')$ are identical except for their states on $\beta'\cap (c_1\cup c_2)$. But it is not difficult to check that $\beta'_{++}$ is balanced: $$\Delta_{c_1}(\beta'_{++})=\beta'_{++}\otimes \alpha_{++}+\beta'_{+-}\otimes \alpha_{-+}=\beta'_{++}\otimes \alpha_{++}={}_{c_2}\Delta(\beta'_{++})$$ because the class of $\alpha_{-+}=\alpha_{+-}=0\in \red{\cS(\mathfrak B)}$, still $\beta'_{++}$ is not in the image of $\theta$. 

                                                      
  \def\mathbb O{\mathbb O}
\def\OOe{\sqrt{\mathbb O_e}}                                                      
\section{The classical case: twisted bundles}
In this section we will suppose that $\mathfrak S$ is a connected, oriented surface with a non-empty set of boundary edges and let ${\mathfrak o}$ be the positive orientation of $\partial \mathfrak S$ i.e. that induced by the orientation of $\mathfrak S$. We will prove that if $q^{\frac{1}{2}}=1$ then $\cS(\mathfrak S)$ is isomorphic to the algebra of regular functions on the affine variety of ``twisted bundles'' on $\mathfrak S$. \red{A} similar result for the case when $\partial \mathfrak S=\emptyset$ is well known (see for instance \cite{Thurston}). 

Fix an arbitrary  Riemannian metric and let $U\mathfrak S$ be the unit tangent bundle over $\mathfrak S$, with the canonical projection
 $\pi:U\mathfrak S\to \mathfrak S$.
A point in $U\mathfrak S$ is  a pair $(p,v)$,  where $p\in \mathfrak S$, $v\in T_p\mathfrak S, \|v\|=1$. For each immersion $\alpha:[0,1]\to \mathfrak S$ its {\em canonical lift} is \red{the} path $(\alpha(t),\frac{\dot{\alpha}(t)}{\| \dot{\alpha}(t))\|})$ in $U\mathfrak S$. In particular, since each edge $e$ of $\partial \mathfrak S$ is oriented by ${\mathfrak o}$, it has a canonical lift $\widetilde{e}\subset \partial U\mathfrak S$; we will denote $\widetilde{\partial \mathfrak S}:=\cup_{e\subset \partial \mathfrak S} \tilde{e}$.  If we let $-e$ be the edge oriented in the opposite way, then we get a different lift which we will denote $(-e)^\sim $. Let  $-\widetilde{\partial \mathfrak S}=\cup_{e\subset \partial \mathfrak S} (-e)^\sim$ and $\pm \widetilde{\partial \mathfrak S}=\widetilde{\partial \mathfrak S}\cup -\widetilde{\partial \mathfrak S}$.


 For a point $x\in \mathfrak S$ the fiber $\mathbb O=\pi^{-1} (x)$ is a circle, and we will orient it  according to the orientation of $\mathfrak S$. It is clear that the \red{free} homotopy class of $\mathbb O$ does not depend on $x$. 
 
 For each boundary edge $e$ choose a point $x\in e$.  
 Let $v\in T_x(e)$ be the unit tangent vector with orientation ${\mathfrak o}$. Then both $(x,v)$ and $(x,-v)$ are in $\pi^{-1}(x)$, and the half circle of $\pi^{-1}(x)$ going from $(x,v)$ to $(x,-v)$ in the positive direction is denoted by $\OOe$. The exact position of $x$ on $e$ will not be important in what follows. 

\begin{definition}[Fundamental Groupoids]
Let $X$ be a path connected topological space and $\{E_i\}_{i\in I}$ disjoint contractible subspaces of $X$.  The fundamental groupoid $\pi_1(X,\{E_i\}_{i\in I})$ is the groupoid (i.e. a category with invertible morphisms) whose objects are $\{E_i, i\in I\}$ and whose morphisms are the homotopy classes of oriented paths in $X$ with endpoints in $\cup_{i\in I} E_i$.
A morphism of groupoids if a functor of the corresponding categories. 
\end{definition}
Recall that a group is a groupoid with only one object.
\begin{lemma}[Extension of morphisms]\label{lem:extend}
With the above notation, let $E\subset X$ be a contractible subspace disjoint from $\cup_{i\in I} E_i$. Then given a morphism $\rho:\pi_1(X,\{E_i\}_{i\in I})\to G$ for some group $G$, an oriented path $\gamma$ connecting some $E_i$ to $E$, and an arbitrary $g\in G$ there is a unique extension $\rho':\pi_1(X,\{E_i\}_{i\in I}\cup \{E\})\to G$ of $\rho$ such that  $\rho'(\gamma)=g$ and  $\rho'(\alpha)=\rho(\alpha)$ for all $\alpha\in Mor(E_i,E_j)$ for some $i,j$. 
\end{lemma}
\red{
\begin{proof}
We sketch a proof. Let $\beta$ be a homotopy class of an oriented path connecting $E$ to some $E_j$; write $\beta=(\beta\circ \gamma)\circ \gamma^{-1}$. Observe that $\beta\circ \gamma\in Mor(E_i,E_j)$ thus $\rho$ is defined on it; hence define $\rho'(\beta)=\rho(\beta\circ \gamma)\cdot g^{-1}$. Similarly if $\beta$ is a path connecting $E_j$ to $E$ define $\rho'(\beta)=g\cdot \rho(\gamma^{-1}\circ \beta)$. Finally if $\beta$ is an endomorphism of $E$ define $\rho'(\beta)=g\cdot \rho(\gamma\circ \beta\circ \gamma^{-1})\cdot g^{-1}$. We leave to the reader to verify that this is indeed a functor with the required properties. 
\end{proof}
}

We shall be interested in two particular groupoids:  $\pi_1(\mathfrak S,\partial \mathfrak S)$ and $\pi_1(U\mathfrak S, \widetilde{\partial \mathfrak S})$. Note that $\pi:(U\mathfrak S,\widetilde{\partial \mathfrak S})\to (\mathfrak S,\partial \mathfrak S)$ induces a surjective morphism $\pi_*$ of groupoids. 

\begin{definition}[\red{Flat twisted $\mathrm{SL}_2(\mathbb{C})$-bundle}]\label{def:twbundle}
A \red{flat twisted $\mathrm{SL}_2(\mathbb{C})$-bundle} \red{(``twisted bundle'' in what follows to keep notation short)} on $\mathfrak S$ is a morphism $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb{C})$ such that $\rho(\mathbb O)=-Id$.
\end{definition}
By Lemma \ref{lem:extend} we extend $\rho$ to a morphism (with the same notation) $\rho:\pi_1(U\mathfrak S;\pm \widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb{C})$ such that for every boundary edge $e$,
\begin{equation}\label{eq:OO}
\rho(\OOe)=\left(\begin{array}{cc}
0 & -1\\
1 & 0\end{array}\right).
\end{equation}
Since $\mathfrak S$ is not a closed surface, its fundamental group $\pi_1(\mathfrak S)$ is a free group.
\begin{lemma} \label{lem:twistedbundles}
Suppose that $\partial \mathfrak S\neq \emptyset$. Then the set $tw(\mathfrak S)$ of twisted bundles on $\mathfrak S$ is the affine algebraic variety $\mathrm{SL}_2(\mathbb{C})^{n+k}$ where $$n=-1+\#\{e\subset \partial \mathfrak S\}\ {\rm and}\ k=\mathrm{rank}(\pi_1(\mathfrak S)).$$ 
In particular the algebra $\chi(\mathfrak S)$ of its regular functions is generated by the matrix entries of each of the copies of $\mathrm{SL}_2(\mathbb{C})$.  
\end{lemma}
\begin{proof}
\red{Since $U\mathfrak S$ is trivial, the fundamental groupoids $\pi_1(\mathfrak S;\partial \mathfrak S)$ and $\pi_1(U\mathfrak S,\widetilde{\partial \mathfrak S})$ are isomorphic. More explicitly,} we claim that there are non canonical injective morphisms of fundamental groupoids $s_*:\pi_1(\mathfrak S;\partial \mathfrak S)\to \pi_1(U\mathfrak S,\widetilde{\partial \mathfrak S})$.
To build one, pick any \red{non-zero} vector field on $\mathfrak S$ which is positively tangent to the edges of $\partial \mathfrak S$: it exists because we are not prescribing its behavior near the (non compact) cusps. This trivializes $U\mathfrak S$ as $\mathfrak S\times S^{1}$; let $s:\mathfrak S\to \mathfrak S\times\{1\}$ be a section of $\pi:U\mathfrak S\to \mathfrak S$. 

\red{The above isomorphism allows to provide an isomorphism from the set of twisted bundles to morphisms from $\pi_1(\mathfrak S;\partial \mathfrak S) \to \mathrm{SL}_2(\mathbb C)$. Indeed} to each twisted bundle $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb C)$ we associate $\rho': \pi_1(\mathfrak S;\partial \mathfrak S) \to \mathrm{SL}_2(\mathbb C)$ defined as $\rho'=\rho\circ s_*$ . Reciprocally given $\rho':\pi_1(\mathfrak S;\partial \mathfrak S) \to \mathrm{SL}_2(\mathbb C)$ we extend it to $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb C)$ by setting $\rho(\mathbb O)=-Id$ and $\rho|_{\pi_1(\mathfrak S\times\{1\})}=\rho'.$

\red{To conclude we now argue that the set of morphisms $\rho': \pi_1(\mathfrak S;\partial \mathfrak S) \to \mathrm{SL}_2(\mathbb C)$ is in bijection with $\mathrm{SL}_2(\mathbb{C})^{n+k}$. Indeed} fix a set of immersed smooth paths $\alpha_1,\ldots ,\alpha_n\subset \mathfrak S$ connecting a fixed edge $e_0\subset \partial \mathfrak S$ to each other edge of $\partial \mathfrak S$ as well as a set of paths whose endpoints are in $e_0$ representing generators $g_1,\ldots , g_k$ of $\pi_1(\mathfrak S;e_0)$ (which is free because $\partial \mathfrak S\neq \emptyset)$. \red{Since the fundamental group of $\mathfrak S$ is free, the list of values $(\rho'(\alpha_1),\ldots, \rho'(\alpha_n),\rho'(g_1)\ldots, \rho'(g_k))\in \mathrm{SL}_2(\mathbb{C})^{n+k}$} provides the sought non canonical \red{bijection.}
\end{proof}
\begin{example}\label{ex:twpolygon}
Let $\mathcal P_n$ be the $n$-polygon with vertices numbered in the orientation sense from $0$ to $n-1$; then $tw(\mathcal P_n)=\mathrm{SL}_2(\mathbb{C})^{n-1}$ where the $n-1$ matrices are given by the holonomies of the diagonals connecting the edge $v_0v_1$ to each other edge. Then $\chi(\mathcal P_n)= O(SL_2)^{\otimes n-1}$ and in particular $\chi(\mathfrak B)=O(SL_2)$ and $\chi(\mathcal P_3)=O(SL_2)\otimes O(SL_2)$ (where by ``equal'' we mean ``non-canonically isomorphic to'').
\end{example}
\begin{remark} The notion of \red{flat twisted $\mathrm{SL}_2(\mathbb{C})$-bundle} is closely related to the one considered in \cite{Thurston}.
\end{remark}
\subsection{Trace functions for non oriented curves} We will identify the states of a stated tangles with \red{vectors} in $\mathbb C^2$ as follows:
 $$+:=\left(\begin{array}{c}1\\0\end{array}\right), -:=\left(\begin{array}{c}0\\1\end{array}\right).$$
 If $\vec{x},\vec{y}\in \mathbb{C}^2$ let $\det(\vec{x}|\vec{y})$ denote the determinant of the matrix whose first column is $\vec{x}$ and second is $\vec{y}$. 

We will say an immersion  $a:[0,1]\to \mathfrak S$ is in {\em good position} if $a(0), a(1) \in\partial \mathfrak S$ 
and the tangent vectors $\dot a(0), \dot a(1)$ \red{are positively tangent to $\partial \mathfrak S$.}

An immersion  $\alpha:[0,1]\to \mathfrak S$ is {\em transversal} if $\alpha(0), \alpha(1) \in \partial \fS$ and $\alpha$ is transversal to $\partial \fS$ at $0$ and $1$. One can bring such a transversal 
  $\alpha$ to an arc  $a$ in good position by an isotopy (relative $0$ and $1$) in a small neighborhood of $\alpha(0)$ and $\alpha(1)$.  The canonical lift of $a$ will be denoted by $\hat \alpha$ and is called the {\em good lift} of $\alpha$. Note that the homotopy class of $\hat \alpha$ is uniquely determined by $\alpha$, and we will consider $\hat \alpha$ as an element of $\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})$.
Note that the good lift of the inverse path  $\alpha^{-1}$, defined by $\alpha^{-1}(t)=\alpha(1-t)$,  is not the inverse of $\hat \alpha$, since before    lifting one has to isotope $\alpha^{-1}$ to \red{a} good position. 
\def\mathrm{sign}{\mathrm{sign}}

A {\em stated transversal immersion} is a transversal immersion whose end points are stated~$\{\pm\}$.
\begin{definition}[Trace]\label{def:traces} Let $\rho$ be a twisted bundle on $\mathfrak S$. 

Assume $\alpha:[0,1]\to \mathfrak S$ is a stated transversal immersion with state  $\varepsilon$ at $\alpha(0)$ and $\eta$ at $\alpha(1)$.  Define the trace of $\alpha$ by
 $$\tr(\alpha):=\det(\eta| \rho(\hat {\alpha})\cdot \epsilon).$$
 
Assume $\beta:[0,1]\to \mathfrak S$ is an immersed closed curve (i.e. $\beta(0)=\beta(1)$ and $\beta$ has the same tangent at $0$ and $1$). Define the trace  of $\beta$ by
$$   \tr(\beta)=\tr(\rho(\widetilde {\beta'})),$$
where $\beta'$ is any smooth closed curve isotopic to $\beta$ such that $\beta'(0)\in \partial \fS$.
\end{definition}
In the first case if $\alpha'$ is homotopic to $\alpha$ through stated transversal immersions and has the same states as $\alpha$ then $\tr(\alpha')=\tr(\alpha)$ (indeed the homotopy lifts to a homotopy of $\widehat{\alpha}$ and $\widehat{\alpha'}$). 
In the second case it is easy to see that $\tr(\beta)$ does not depend on the choice of $\beta'$, as the images under $\rho$ of any two such $\beta'$ are conjugate in $\mathrm{SL}_2(\mathbb C)$ and hence have the same trace.
\begin{example}\label{ex:traces}
Let $\alpha:[0,1]\to \mathfrak S$ be a stated transversal immersion with state  $\varepsilon$ at $\alpha(0)$ and $\eta$ at $\alpha(1)$.
$${\rm If}\ \rho(\hat{\alpha})=\left(\begin{array}{cc}a & b \\ c & d\end{array}\right), {\rm then} \tr(\alpha)=\det(\eta,\rho(\alpha)\cdot\epsilon) =
\begin{tabular}{c|cc}
$\eta\backslash \epsilon $& + & -\\
\hline
+ & c & d\\
- & -a & -b\\
\end{tabular}.$$
\red{We} remark that the matrix on the right, expressing the values of the traces for an immersed transverse stated arc $\alpha$ is $\rho(\sqrt{\mathbb O}^{-1})\rho(\hat{\alpha})$ (see Equation \eqref{eq:OO}). 
\end{example}
\begin{remark}  The notion of trace here is similar to the one introduced in \cite{MS}, where trace is defined only for oriented arcs. The novelty here is the good lift, which is used to define traces for unoriented arcs and the use of twisted bundles as representations of fundamental groupoids.
\end{remark}


When $\alpha$ is stated, we provide $\alpha^{-1}$ with states so that the state of  $\alpha^{-1}(t)$ is equal to the state of $\alpha(1-t)$ for $t=0,1$.
\begin{lemma}\label{lem:lifts} Suppose $\rho$ is a twisted bundle on $\mathfrak S$.
(a) Let $\alpha$ be a stated transversal immersion.  One has
$$\rho (\widehat{\alpha^{-1}})=- \rho (\hat{\alpha})^{-1}.$$ 
 As a consequence, $\tr(\alpha)=\tr(\alpha^{-1})$.
 
 (b) Let $\beta:[0,1]\to \mathfrak S$ be an immersed closed curve such that $\beta(0)\in \partial \fS$. Then
  $$\rho (\widetilde{\beta})^{-1}=\rho (\widetilde{\beta^{-1}}).$$ 
  
 As a consequence, if $\gamma$ is any immersed closed curve then $\tr(\gamma) = \tr(\gamma^{-1})$.
\end{lemma}
\begin{proof} (a). A direct inspection shows that the homotopy class of the closed simple loop in $U\mathfrak S$ given by the concatenation $\widehat{\alpha^{-1}}\circ \hat{\alpha}$ is $\mathbb O$ (see the left hand side of Figure \ref{fig:lift}). 
The first equality follows as by definition $\rho$ is a functor such that $\rho(\mathbb O)=-Id$. 

To prove that $\tr(\alpha)=\tr(\alpha^{-1})$, 

we compute the traces using the notation and content of Example \ref{ex:traces}:
$${\rm If}\ \rho(\widehat{\alpha^{-1}})=-\rho(\hat{\alpha})^{-1}=\left(\begin{array}{cc}-d & b \\ c & -a\end{array}\right), {\rm then} \tr(\alpha)=\det(\eta',\rho(\alpha)\cdot\epsilon') =
\begin{tabular}{c|cc}
$\eta'\backslash \epsilon' $& + & -\\
\hline
+ & c & -a\\
- & d & -b\\
\end{tabular}.$$
But since the state at $\alpha^{-1}(0)$ is $\eta$ and that at $\alpha^{-1}(1)$ is $\epsilon$, we get the claim in this case by directly comparing with the transpose of the matrix of values provided in Example \ref{ex:traces}. 

(b). 
Observe that if $\beta$ is the black curve depicted in the r.h.s. of Figure \ref{fig:lift}, then $\beta^{-1}$ is regularly homotopic to the dotted curve $\beta'$ in the same picture. By construction $\dot{\beta'}(0)=\dot{\beta}(0)$ and $\beta'\circ \beta$ is regularly homotopic to an eight-shaped immersed curve in a disc. 
Then $\widetilde{\beta^{-1}}$ is homotopic to $\tilde{\beta'}$ in $U\mathfrak S$ and it holds $\rho(\tilde{\beta'}\circ \tilde{\beta})=Id$, thus $\rho(\widetilde{\beta^{-1}})=\rho(\tilde{\beta})^{-1}$.
The last statement now follows because $\rho(\tilde{\beta})\in \mathrm{SL}_2(\mathbb C)$ so that $\tr(\rho(\tilde{\beta}))=\tr(\rho(\tilde{\beta})^{-1})$. 

\end{proof}
\begin{figure}
\includegraphics[width=4.2cm]{goodlifts1-eps-converted-to.pdf}\qquad \includegraphics[width=4cm]{goodlifts2-eps-converted-to.pdf}
\caption{On the left the unoriented horizontal arc can be lifted to $U\mathfrak S$ in two different ways (dotted), depending on the choice of an orientation; their composition is homotopic in $U\mathfrak S$ to $\mathbb O$.  On the right we exhibit a smooth oriented curve $\beta$ (solid) and a curve $\beta'$ (dotted) which is regularly homotopic to $\beta^{-1}$ . The composition of the two is a nullhomotopic $8$-shaped loop in $U\mathfrak S$.}\label{fig:lift}
\end{figure}
Suppose $\alpha=\cup \alpha_i$, where each $\alpha_i$ is either a stated transversal non-oriented arc or a non-oriented immersed closed curved. Define
$$\tr(\alpha):=\prod_{i} \tr(\alpha_i).$$

\begin{lemma}\label{lem:classicalbigon}
If $q^{\frac{1}{2}}=1$ the map $\tr:\cS(\mathfrak B)\to \chi(\mathfrak B)$ sending a stated skein to its trace is an isomorphism of algebras. The same  holds for $\tr:\cS(\mathcal P_n)\to \chi(\mathcal P_n)$ for every $n\geq 2$. 
\end{lemma}
\begin{proof}
Applying Theorem \ref{teo:SL2} at $q^{\frac{1}{2}}=1$ we get an explicit algebra isomorphism $\phi:\cS(\mathfrak B)\to O(SL_2)$; by Example \ref{ex:twpolygon}, we know that $\chi(\mathfrak B)$ is isomorphic to $O(SL_2)$. Furthermore, by  Example \ref{ex:traces}, the map $\tr$ is an algebra isomorphism. 
One argues similarly for $\mathcal P_n$: applying Corollary \ref{cor:polygons} at $q^{\frac{1}{2}}=1$ we get an explicit algebra isomorphism $\phi:\cS(\mathcal P_n)\to O(SL_2)^{\otimes n-1}$; by the proof of Corollary \ref{cor:polygons} a system of algebra generators of $\cS(\mathcal P_n)$ is easily seen to be the arcs connecting the edge $e_0$ to each other edge and stated arbitrarily. By Example \ref{ex:traces}, the map $\tr$ on these generators provides a system of generators of $O(SL_2)^{\otimes n-1}$ which by Example \ref{ex:twpolygon} is isomorphic to $\chi(\mathcal P_n)$. 
\end{proof}
\subsection{Splitting theorem for trace functions}

In all this subsection, let $c\subset \mathfrak S$ be an ideal arc oriented arbitrarily, let $\mathfrak S'$ be the result of cutting $\mathfrak S$ along $c$ and let $\mathrm{pr}:\mathfrak S'\to \mathfrak S$ be the projection and $\widetilde{\pr}:U\mathfrak S'\to U\mathfrak S$ the projection induced on the unit tangent bundles.  Let $\mathrm{pr}^{-1}(c)=c_1\cup c_2\subset \partial \mathfrak S'$ so that $c_1$ has the positive orientation and $c_2$ the negative one with respect to the orientation induced by that of $\mathfrak S'$ on the boundary. 
For each $c_i$ let $\widetilde{c_i}\subset U\mathfrak S'$ be its canonical lift and $(-c_i)^{\sim}$ the canonical lift of $-c_i$. Similarly let $\widetilde{c}$ be the canonical lift of $c$ in $U\mathfrak S$ and $(-c)^{\sim}$ be the canonical lift of $-c$.


\begin{lemma}\label{lem:decomposition}
Each $[\alpha]\in \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})$ can be written as a composition $[\alpha_k]\circ [\alpha_{k-1}]\circ \cdots \circ [\alpha_1]$ of homotopy classes of immersed paths $\alpha_i:[0,1]\to U\mathfrak S$ such that $\alpha_i(\{0,1\})\subset \widetilde{\partial \mathfrak S}\cup \tilde{c}$ and $\alpha_i\cap \pi^{-1}(c)=\partial \alpha_i\cap \widetilde{c}$. 
Such a decomposition is unique up to insertion/deletions of compositions  $[\alpha']\circ [\alpha'^{-1}]$ for $[\alpha']\in \pi_1(U\mathfrak S;\widetilde{c})$ and replacement of $[\alpha_{j}]$ by $[\alpha'''_{j}]\circ [\alpha''_j]\circ[\alpha'_j]$ for some $[\alpha'_j],[\alpha'''_j]\in \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S}\cup \widetilde{c})$ and $[\alpha_j'']\in  \pi_1(U\mathfrak S;\widetilde{c})$ such that $[\alpha_j]=[\alpha'''_{j}]\circ [\alpha''_j]\circ[\alpha'_j]$ (or reciprocally).
\end{lemma}
\begin{proof}
Observe that $\pi^{-1}(c)\subset U\mathfrak S$ is homeomorphic to an annulus $A=\mathbb{R}\times S^1$ so that $\widetilde{c}=\mathbb{R}\times\{1\}.$ Represent the class $[\alpha]$ by a smooth curve $\alpha:[0,1]\to U\mathfrak S$ so that it is transverse to $A$; then homotope it so that it intersects $A$ exactly along $\widetilde{c}$: this provides an instance of the claimed splitting. If $\alpha':([0,1],\{0,1\})\to (U\mathfrak S,\widetilde{\partial \mathfrak S})$ is another smooth representative of the same class intersecting $A$ exactly along $\widetilde{c}$, let $h(t,s):[0,1]\times [0,1]\to U\mathfrak S$ be a smooth homotopy between $\alpha$ and $\alpha'$ which is transverse to $A$. Then $h^{-1}(A)$ is a disjoint union of arcs and circles embedded in $[0,1]\times [0,1]$ with boundary in $[0,1]\times \{0,1\}$ containing a finite number of maxima and minima with respect to the height function given by the second coordinate $s$. Pick a finite number of heights $s_0=0<s_1<\ldots <s_n=1$ so that each strip $[0,1]\times [s_i,s_{i+1}]$ contains at most one maximum or minimum of the diagram of $h^{-1}(A)$.  
Each immersed path $\alpha_{s_i}(t):=h(t,s_i):[0,1]\to U\mathfrak S$ intersects $A$ transversally a finite number of times and we can then modify $h$ locally around $h^{-1}(A)\cap ([0,1]\times \{s_i\})$ without inserting new maxima and minima so that $\alpha_{s_i}(t)$ intersects $A$ only along $\widetilde{c}$. 
Then the homotopies $h|_{[s_i,s_{i+1}]}$ transform the immersed path $\alpha_{s_i}$ into $\alpha_{s_{i+1}}$ by the moves described in the thesis: passing through a minimum replaces a smooth curve $\alpha$ with a composition $\alpha'\circ \alpha''\circ \alpha'''$ were all of $\alpha,\alpha',\alpha'',\alpha'''$ intersect $A$ only along $\widetilde{c}$ and in their boundary; passing through a maximum has the converse effect. Finally a strip containing no maxima and minima corresponds to a finite number of moves consisting in rewriting $\alpha\circ \alpha'$ with $\alpha\circ \beta\circ \beta^{-1}\circ \alpha'$ where $\beta\in \pi_1(U\mathfrak S;\widetilde{c})$ is the homotopy class represented by the restriction of $h$ to a ``vertical arc'' of $h^{-1}(A)\cap [0,1]\times [s_i,s_{i+1}]$ (i.e. an arc joining $[0,1]\times \{s_i\}$ and $[0,1]\times \{s_{i+1}\}$). 
\end{proof}

If $\rho':\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'})\to \mathrm{SL}_2(\mathbb C)$ is a twisted bundle, then by Lemma \ref{lem:extend} we can extend it to a twisted bundle $\rho'':\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})\to \mathrm{SL}_2(\mathbb C)$ by setting $\rho''(\sqrt{\mathbb O_{c_2}})=\left(\begin{array}{cc} 0 & -1\\ 1 & 0\end{array}\right)$ where $\sqrt{\mathbb O_{c_2}}$ is the path connecting $\widetilde{c_2}$ and $(-c_2)^{\sim}$ by following in the positive direction the fiber $\pi^{-1}(x)$ for some $x\in c_2$. 
\begin{proposition} \label{prop:algebrainjection}
There is a surjective map $i^*:tw(\mathfrak S')\to tw(\mathfrak S)$ defined as follows. 
Given $\alpha\in \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})$, decompose it as $\alpha=\alpha_k\circ \alpha_{k-1}\circ \cdots \circ \alpha_1$ where each $\alpha_i\in \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S}\cup \widetilde{c})$ intersects $\pi^{-1}(c)$ at most in its endpoints and exactly along $\widetilde{c}$ (such a decomposition exists by Lemma \ref{lem:decomposition}). 
Then for each $\rho'\in tw(\mathfrak S')$ let 
$$i^*(\rho')(\alpha)=\rho''(\alpha'_k)\rho''(\alpha'_{k-1})\cdots \rho''(\alpha'_1)$$ where $\alpha'_i=\widetilde{\pr}^{-1}(\alpha_i)$ is the lift of $\alpha_i$ to $\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})$.
Passing to the algebras $\chi(\mathfrak S)$ and $\chi(\mathfrak S')$ of regular functions on the algebraic varieties $tw(\mathfrak S)$ and $tw(\mathfrak S')$, $i^*$ induces an injective algebra morphism $i:\chi(\mathfrak S)\hookrightarrow \chi(\mathfrak S')$ which we will call the ``cutting morphism'' associated to $c$.
\end{proposition}
\begin{proof}
By Lemma \ref{lem:decomposition} to check that $i^*$ is well defined it is sufficient to check that for each $\alpha$ the choice of the decomposition does not affect the result of $i^*(\rho')(\alpha)$. But this is evident if we make an exchange $\alpha_2\circ \alpha_1\leftrightarrow \alpha_2\circ \alpha'\circ \alpha'^{-1}\circ \alpha_1$ or $\alpha \leftrightarrow \alpha'\circ \alpha''\circ \alpha'''$ as in the statement of Lemma \ref{lem:decomposition} because $\rho'$ is a functor.   

To prove surjectivity observe that by Lemma \ref{lem:extend} we can extend any morphism $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb{C})$ to $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S}\cup \widetilde{c}\cup (-c)^{\sim})\to \mathrm{SL}_2(\mathbb{C})$ setting in particular $$\rho(\sqrt{\mathbb O_c})=\left(\begin{array}{cc} 0 & -1 \\ 1 & 0\end{array}\right).$$
Then if $\alpha'\in \pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})$ define $\rho': \pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})\to \mathrm{SL}_2(\mathbb C)$ by $\rho'(\alpha')=\rho(\widetilde{\pr}_*(\alpha'))$ where  $\widetilde{\pr}_*:\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})\to \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S}\cup (-c)^{\sim})$ is the morphism induced by the continuous map $\widetilde{\pr}:U\mathfrak S'\to U\mathfrak S$. Then letting $\overline{\rho}'$ be the restriction of $\rho'$ to $\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'})$ we have that by construction $\rho=i^*(\overline{\rho}')$. 
Surjectivity of $i^*$ implies the injectivity of $i$.
\end{proof}

The following proposition tells us that the trace functions behave exactly as the skeins under cutting along an ideal arc (see Theorem \ref{thm.1a}).
 Suppose $\alpha$ is a stated transverse smooth simple curve intersecting transversally $c$. Then $\alpha':=\mathrm{pr}^{-1}(\alpha)$ is a transverse smooth simple curve 
 which is stated at every boundary point except for newly created boundary points, which are points in $\mathrm{pr}^{-1} (c)\cap \alpha'=(c_1\cup c_2)\cap \alpha'$.
  {\em A lift in $\mathfrak S'$} of $\alpha$ is a stated transverse smooth simple curve $\beta$ in $\mathfrak S'$ which is $\alpha'$ equipped with states on $\mathrm{pr}^{-1} (c\cap \alpha)$ such that if $x,y\in \mathrm{pr}^{-1} (c\cap \alpha)$ with $\mathrm{pr}(x)=\mathrm{pr}(y)$ then $x$ and $y$ have the same state. If $|c\cap \alpha|=k$, then  $\alpha$ has $2^k$ lifts in $\mathfrak S'$.

\begin{proposition}[Cutting trace functions]\label{prop:cuttrace}
Let $\alpha$ be a stated transverse smooth simple curve intersecting transversally $c$. Then
\begin{equation}\label{eq:cuttrace}
i(\tr(\alpha))=\sum \tr(\beta)
\end{equation}
 where the sum is taken on all the lifts in $\mathfrak S'$ of $\alpha$ (i.e. as in Theorem \ref{thm.1a}). Furthermore if $c'\subset \mathfrak S$ is another ideal arc disjoint from $c$ and $i'$ is the associated cutting morphism, it holds $i'\circ i=i\circ i'$.
\end{proposition}
\begin{proof}
Since by Proposition \ref{prop:algebrainjection} we already know that $i$ is a well defined injective algebra morphism, it is sufficient to check the statement for a system of stated transverse smooth curves $\{\gamma_i\in I\}$ which generate $\chi(\mathfrak S)$ as an algebra. By the proof of Lemma \ref{lem:twistedbundles}, we can choose a finite system of such $\gamma_i$ such that $|\gamma_i\cap c|\leq 2, \forall i$. 
Let $\alpha\in \{\gamma_i, i\in I\}$ be represented by a smooth immersion $\alpha:[0,1]\to \mathfrak S$ intersecting transversally $c$ with states $st(\alpha(0))=\epsilon, st(\alpha(1))=\eta$; if $|\alpha\cap c|=0$ the statement is true. 
If $|\alpha\cap c|=1$ then $\alpha=\alpha_2\circ \alpha_1$ where $\alpha_i$ are transverse smooth simple curves with $\alpha_1(1)=\alpha_2(0)\in c$ and are partially stated by $st(\alpha_1(0))=\epsilon, st(\alpha_2(1))=\eta$. Furthermore, up to switching $\alpha$ to $\alpha^{-1}$ we can suppose $(\dot{\alpha}_1(1),\dot{c})$ form a positive basis of $\mathfrak S$.   
\begin{figure}
\includegraphics[width=5cm]{goodlifts3-eps-converted-to.pdf}\qquad \includegraphics[width=5cm]{goodlifts4-eps-converted-to.pdf}
\caption{On the l.h.s. the curve $\alpha$ (horizontal, solid) intersects once $c$ (vertical, solid). The dotted curve is regularly homotopic to $\alpha$ and is cut by $c$ into $\alpha_2\circ  \sqrt{\mathbb O}^{-1}$ and $\alpha_1$ where $\alpha_i$ are in good position in $\mathfrak S'$.   On the r.h.s. $\alpha$ intersects twice $c$ with opposite orientations. The dotted curve is regularly homotopic to $\alpha$ and is cut by $c$ in $\alpha_3$, $\sqrt{\mathbb O}^{-1}\circ \alpha_2\circ \sqrt{\mathbb O}^{-1}$ and $\alpha_1$, where $\alpha_i$ are in good position in $U\mathfrak S'$.  }\label{fig:cuttrace}
\end{figure}

Let then $A_i$ (resp. $A$) be the $2\times 2$ matrix expressing the values of $\tr(\alpha_i)$ (resp. $\tr(\alpha)$) with states in $\{\pm\}$ as in Example \ref{ex:traces}; then, as remarked in the example $A_i=\rho(\sqrt{\mathbb O_c})^{-1}\rho(\widehat{\alpha_i})$ (resp. $A=\rho(\sqrt{\mathbb O_c})^{-1}\rho(\widehat{\alpha})$) so that Equation \eqref{eq:cuttrace} rewrites in this case as $A=A_2\cdot A_1$.

Now since the orientation induced by $\mathrm{pr}^{-1}(c)$ is negative on $c_2$ then in $U\mathfrak S$ the good lift $\hat{\alpha}$ of $\alpha$ is homotopic to $\widetilde{\pr}(\widehat{\alpha_2})\circ \sqrt{\mathbb O_c}^{-1}\circ \widetilde{\pr}(\widehat{\alpha_1})$ where $\alpha_i$ are depicted in the left hand side of Figure \ref{fig:cuttrace}, therefore $$A=\rho(\sqrt{\mathbb O_c})^{-1}\rho(\widehat{\alpha})=\rho(\sqrt{\mathbb O_c})^{-1}\rho(\widehat{\alpha_2})\circ \rho(\sqrt{\mathbb O_c})^{-1}\circ \rho(\widehat{\alpha_1})=A_2\cdot A_1$$
and the claim is proved. 

Suppose now that $|\alpha\cap c|=2$ where $\alpha$ is a stated smooth immersion transverse to $c$; by the proof of Lemma \ref{lem:twistedbundles} we can suppose that the sign of the intersections of $\alpha$ and $c$ is opposite and we can split $\alpha$ as $\alpha_3\circ \alpha_2\circ \alpha_1$ where $\alpha_i$ are transverse smooth immersions with $\alpha_1(1)=\alpha_2(0),\alpha_2(1)=\alpha_3(0)$ and partially stated so that $st(\alpha_1(0))=\epsilon$ and $st(\alpha_3(1))=\eta$. Furthermore, up to switching $\alpha$ and $\alpha^{-1}$ we can suppose that $(\dot{\alpha}_1(1),\dot{c})$ form a positive basis of $\mathfrak S$.

As above let $A_i=\rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha_i})$ and $A=\rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha})$ and Equation \eqref{eq:cuttrace} is equivalent to $A=A_3\cdot A_2\cdot A_1$. 
Then again, as shown in the right hand side of Figure \ref{fig:cuttrace}, $\alpha$ is regularly homotopic in $U\mathfrak S$ to $\widetilde{\pr}(\widehat{\alpha_3})\circ \sqrt{\mathbb O_c}^{-1}\circ \widetilde{\pr}(\widehat{\alpha_2})\circ \sqrt{\mathbb O_c}^{-1}\circ \widetilde{\pr}(\widehat{\alpha_1})$. Therefore we have:
$$A=\rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha})=\rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha_3})\cdot \rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha_2})\cdot \rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha_1})=A_3\cdot A_2\cdot A_1$$
and the thesis follows. 
\end{proof}

\subsection{The classical limit of stated skein algebras}

\begin{theorem}\label{teo:classicaliso}  Suppose $q^{1/2}=1$. The map sending a skein to its trace induces an algebra isomorphism $$\tr:\cS(\mathfrak S)\to \chi(\mathfrak S).$$
\end{theorem}
\begin{proof} We first claim that the relations $\eqref{eq.skein},\eqref{eq.loop},\eqref{eq.arcs},\eqref{eq.order}$ with $q^{\frac{1}{2}}=1$ are satisfied by the trace functions.
By Lemma \ref{lem:classicalbigon} the claim is true for bigons. 
But by Proposition \ref{prop:algebrainjection} cutting induces an injective algebra map, thus to verify local relations we can verify them in a bigon containing the disc where the relations are depicted: this proves the claim in general. 

The algebra isomorphism is proved as follows: 
pick an ideal triangulation of $\mathfrak S$ and apply to each edge of the triangulation Proposition \ref{prop:cuttrace} on the side of $\chi(\mathfrak S)$ and Theorem \ref{thm.1a} on $\cS(\mathfrak S)$. We get the following diagram of algebra morphisms of which the horizontal lines are injective and which is commutative by Proposition \ref{prop:cuttrace} and Theorem \ref{thm.1a}: 
 \begin{equation} 
\label{eq.dia3}
 \begin{CD} \cS(\mathfrak S)  @> \hookrightarrow  >>  \bigotimes_{i}\cS(T_i)\\
 @V
 \tr    VV  @V V \tr   V    \\
  \chi(\mathfrak S)    @> \hookrightarrow  >>   \bigotimes_i \chi(T_i) .
\end{CD}
 \end{equation} 

Since by Lemma \ref{lem:classicalbigon} the right vertical arrow is an isomorphism we conclude. 

\end{proof}

\section{Introduction}
This paper is devoted to study the notion of stated skein algebra of surfaces introduced by the second author in \cite{Le:TDEC} in order to reinterpret in skein theoretical terms the construction of the quantum trace by Bonahon and Wong \cite{BW} as well as incorporating Muller's version of skein algebra \cite{Muller}. 
Although the definition of the stated skein module applies to $3$-manifolds, this paper is entirely devoted to the case of surfaces: a forthcoming paper will describe how this fits in the framework of an extended topological field theory in dimensions $1,2,3$. 
Indeed the case of surfaces is sufficiently rich in algebraic and geometrical terms to deserve a separate treatment and we will now outline the results of this paper. 
 
 
 \subsection{Skein algebras} Let $\mathcal R= \mathbb Z[q^{\pm 1/2}]$ be the ring of Laurent polynomials in a variable $q^{1/2}$.
 Suppose $\mathfrak S$ is the result of removing a finite number of points, called {\em punctures}, from a compact oriented 2-dimensional manifold with possibly non-empty boundary. 
 The ordinary skein algebra $\mathring {\cS}(\mathfrak S)$, introduced by Przytycki~\cite{Prz} and Turaev~\cite{Turaev}, is defined to be the $\mathcal R$-module generated by isotopy classes of framed unoriented links in $\mathfrak S \times (0,1)$  modulo the Kauffman relations \cite{Kauffman}
\begin{align}
\label{eq.skein0}   \raisebox{-8pt}{\incl{.8 cm}{cross}}  \ &= \ q  \raisebox{-8pt}{\incl{.8 cm}{resoP}}  + q^{-1}   \raisebox{-8pt}{\incl{.8 cm}{resoN}} \\
\label{eq.loop0}    \raisebox{-8pt}{\incl{.8 cm}{trivloop}} \  &=\  (-q^2 -q^{-2})\raisebox{-8pt}{\incl{.8 cm}{empty}}.
 \end{align}
The product of two links $\alpha_1$ and $\alpha_2$ is the result of stacking $\alpha_1$ above $\alpha_2$.  The skein algebra  has played an important role in low-dimensional topology and quantum topology and it serves as a bridge between classical topology and quantum topology. The skein module has connections to the $\mathrm{SL}_2(\mathbb C)$-character variety \cite{Bullock,PS1}, the quantum group of $\mathrm{SL}_2(\mathbb C)$, the Witten-Reshetikhin-Turaev topological quantum field theory \cite{BHMV}, the quantum Teichm\"uller spaces \cite{CF,Kashaev,BW,Le:QT}, and the quantum cluster algebra theory \cite{Muller}.
 
 In the definition of the skein algebra $\mathring {\cS}(\mathfrak S)$ the boundary $\partial \fS$ does not play any role, and we have $\mathring {\cS}(\mathfrak S) = \mathring {\cS}(\mathring {\mathfrak S})$, where $\mathring {\mathfrak S}$ is the interior of $\mathfrak S$. In an attempt to introduce excision into the study of the skein algebra, the second author  \cite{Le:TDEC} introduce the notion of {\em stated skein algebra}, denoted in this paper by  $\cS(\fS)$, whose definition involves tangles properly embedded into $\mathfrak S \times (0,1)$. These tangles can have end-points only  on {\em boundary edges} of $\mathfrak S$, which are open intervals connected components of the boundary.
 For details see Section \ref{sec.def}.
 
 

A key result about stated skein algebras is that they behave well under cutting along an ideal arc. Here an {\em ideal arc} is a proper embedding $c: (0,1) \hookrightarrow \mathfrak S$ (so that its end points are the punctures). 
Cutting $\mathfrak S$ along $c$ one gets a 2-manifold $\mathfrak S'$ whose boundary contains two open intervals $a$ and $b$ so that one can recover $\mathfrak S$ from $\mathfrak S'$ by gluing $a$ and $b$ together, see Figure \ref{fig:cut}.

\FIGc{cut}{Cutting $\mathfrak S$ along ideal arc $c$ to get $\mathfrak S'$, which might be disconnected}{3cm}
Then \cite[Theorem 1]{Le:TDEC} (see 
the splitting Theorem \ref{thm.1a} below)  says that  there is a natural injection of algebras 
 \begin{equation}   \theta_c: \mathscr S(\mathfrak S)\hookrightarrow \mathscr S(\mathfrak S'),  \label{eq.rho0}
 \end{equation} 
given by a simple state sum. The extension from $\mathring {\cS}(\mathfrak S)$ to $\cS(\fS)$ is unique (or canonical) if one wants the splitting theorem and a consistency requirement to hold.
 
 \def\cS(\cB){\mathscr S(\mathcal B)}
 \defU_{q^2}(\mathfrak{sl}_2){U_{q^2}(\mathfrak{sl}_2)}
 The paper is a systematic study of the stated skein algebra $\cS(\fS)$. Let us now list the main results of the paper.
 
 \subsection{Bigon and quantum $\mathrm{SL}_2(\mathbb C)$ coordinate ring} The quantized enveloping algebra $U_{q^2}(\mathfrak{sl}_2)$ and its Hopf dual ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, known as the quantum coordinate ring of the Lie group $\mathrm{SL}_2(\mathbb C)$, play an important role in many branches of mathematics, see \cite{Kassel,MajidFoundation}. These algebras are usually defined by rather complicated presentations which are hard to comprehend.
 
A first consequence of the splitting theorem is that the quantum coordinate ring ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ can be described by simple geometric terms, namely, it is naturally isomorphic to the stated skein algebra of the bigon $\mathcal B$, which is the standard disk without two points on its boundary, see Figure \ref{fig:bigon10}.

\FIGc{bigon10}{Left: bigon. Right: splitting the bigon along the dashed ideal arc}{3cm}
By splitting the bigon along an ideal arc $c$ (which is the dashed arc in Figure \ref{fig:bigon10}) we get a homomorphism $\Delta:=\theta_c$,
$$ \Delta: \cS(\cB) \to \cS(\cB)\otimes \cS(\cB),$$
which turns out to be compatible with the product and makes $\cS(\cB)$ a bialgebra. Moreover, we will define using topological terms the counit, antipode and co-$R$-matrix which turns $\cS(\cB)$ into a \red{``dual quasitriangular'' (see  \cite{MajidFoundation} Section 2.2) a.k.a. ``cobraided'' (see \cite{Kassel}, Section VIII.5)} Hopf algebra, and will prove the following.

\begin{thm}[Theorems \ref{teo:SL2} and \ref{teo:cobraid}] The \red{dual quasitriangular} Hopf algebra $\cS(\cB)$ is isomorphic in a natural way to the quantum coordinate ring ${\mathcal O}_{q^2}(\mathrm{SL}(2))$.
\label{thm.1}
\end{thm}


This result allows to use skein theoretical techniques to study ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. We will show that many complicated algebraic objects and facts  concerning the quantum groups ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ and $U_{q^2}(\mathfrak{sl}_2)$ have  simple transparent picture interpretations. For example, the above mentioned co-$R$-matrix has a very simple geometric picture description, see Theorem~\ref{teo:cobraid}. 
Another example is given by the reconstruction of Kashiwara's crystal basis, see Proposition~\ref{prop:kashiwara}. One can even ``import'' in ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ natural skein theoretical objects: in Subsection \ref{sub:joneswenzl} we define and provide some properties of the Jones-Wenzl idempotents in ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. 

\subsection{Lift of the Reshetikhin-Turaev invariant}
Suppose $T$ is a tangle diagram in the bigon whose boundary $\partial T$ is in $\partial \mathcal B$ and the boundary points are labeled by signs $\pm$. The Reshetikhin-Turaev  operator invariant theory \cite{RT} assigns to $T$ a scalar $Z(T)\in \mathbb Q(q^{1/2})$, see Section \ref{sec.WT}. On the other hand, such a labeled tangle $T$  defines an element in our skein algebra $\cS(\cB)$. We have the following result which shows that our ``invariant'', which is $T$ considered as an element of $\mathscr S(\mathcal B)$, is a lift of the Reshetikhin-Turaev invariant.
\begin{thm} [Theorem \ref{teo:cat}] One has $\epsilon(T) = Z(T)$, where $\epsilon: \cS(\cB)\to \mathbb Q[q^{\pm 1/2}]$ is the counit.
\end{thm}  
It would be interesting to understand this lift of the Reshetikhin-Turaev invariant in terms of categorification.

\subsection{Skein algebras as comodule over ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. Hochshild cohomology} One important consequence of the identification of the bigon algebra with ${\mathcal O}_{q^2}(\mathrm{SL}(2))$  is that for every boundary edge $e$ of a surface $\mathfrak S$, the skein algebra $\cS(\fS)$ has  a  right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule structure
$$ \Delta_e : \cS(\fS) \to \cS(\fS) \otimes \cS(\cB).$$
This map $\Delta_e$ is the splitting homomorphism \eqref{eq.rho0} applied to the an ideal arc parallel to $e$ which cuts off an ideal bigon from $\mathfrak S$ whose right edge is $e$, see Figure \ref{fig:copro}. 
Similarly identifying the left edge of $\mathcal B$ to $e$  we get a left ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule structure on $\cS(\fS)$.

\FIGc{copro}{Geometric definition of the coaction: splitting the bigon along the dashed ideal arc}{3cm}

Using the comodule structure one can refine the splitting theorem by identifying the image of the splitting homomorphism, as follows. Let us cut $\mathfrak S$ along an ideal arc $c$ to get $\mathfrak S'$ as in Figure \ref{fig:cut}. Then $\mathscr S(\mathfrak S')$ has a right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-module structure coming from edge $a$ and a left ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-module structure coming from edge $b$. Thus $\mathscr S(\mathfrak S')$ is a ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-bicomodule, and hence there is defined the Hochshild cohomology $HH^0(\mathscr S(\mathfrak S'))$, for details see Section \ref{sec.comodule}.

\begin{thm}[Theorem \ref{teo:cotensor}] \label{thm.Hoch}
Under the splitting homomorphism the skein algebra $\cS(\fS)$ embeds isomorphically into the Hochshild cohomology $HH^0(\mathscr S(\mathfrak S'))$. In particular, when $c$ cuts $\mathfrak S$ into two surfaces $\mathfrak S_1$ and $\mathfrak S_2$, the splitting homomorphism  maps $\cS(\fS)$ isomorphically onto the cotensor product of $\mathscr S(\mathfrak S_1)$ and $\mathscr S(\mathfrak S_2)$.   
\end{thm}

  \subsection{Skein algebra $\cS(\fS)$ as module over $U_{q^2}(\mathfrak{sl}_2)$} 
Since the Hopf algebra $U_{q^2}(\mathfrak{sl}_2)$ is the Hopf dual of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, then after tensoring with ${\BQ(q^{1/2})}$ each right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule is automatically a left $U_{q^2}(\mathfrak{sl}_2)$-module. Thus each boundary edge $e$ of $\mathfrak S$ gives $\cS(\fS)$ a left $U_{q^2}(\mathfrak{sl}_2)$-module structure. Note that finite-dimensional $U_{q^2}(\mathfrak{sl}_2)$-modules are well-understood as they are quantum deformations of   modules over the Lie algebra $\mathfrak{sl}_2(\mathbb C)$.

\begin{thm} [Part of Theorem \ref{teo:module}] Over the field $\mathbb Q(q^{1/2})$, \red{for every boundary edge} the $U_{q^2}(\mathfrak{sl}_2)$-module $\cS(\fS)$ is integrable, i.e. it is the direct sum of finite-dimensional irreducible $U_{q^2}(\mathfrak{sl}_2)$-modules.
\end{thm}
Actually Theorem \ref{teo:module} is much stronger: it provides an explicit decomposition and contains much more information about the decompositions as it deals also with the decomposition over Lusztig's integral version of $U_{q^2}(\mathfrak{sl}_2)$.

Using this result we also prove a dual version of Theorem \ref{thm.Hoch} which, with the notation of the theorem, shows that $HH_0({\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S'))={\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)$ (see Theorem \ref{r.Hoch2}). 

\subsection{Braided tensor product} The co-$R$-matrix makes the category of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-co\-mo\-du\-les a braided category  and  in general given two algebras in that category (which are then ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-co\-mo\-dule algebras)  their tensor product can be endowed with the structure of an algebra  by using appropriately the braiding: this is  the {\em braided tensor product} of the algebras, see \cite{MajidFoundation}. 
 \red{In Section \ref{sec:braidedtensor}, we generalise this notion to that of ``self-braided tensor product'' which applies to a comodule algebra having two commuting comodule structures.

Suppose $\underline{\mathfrak S}$ is obtained by identifying two edges of a (possibly disconnected) surface $\mathfrak S$ with two distinct edges of an ideal triangle as in Figure \ref{fig:brtens-new}. 
\FIGc{brtens-new}{Gluing $\mathfrak S$ to two distinct edges of an ideal triangle to get $\underline{\mathfrak S}$.} {3cm}
Then $\mathscr S(\mathfrak S)$  has two natural commuting structures of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra, and we have the following:
\begin{thm}[Theorem \ref{teo:braidedtensor}] As a ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra $\cS(\underline{\mathfrak S})$ is canonically isomorphic to the self-braided tensor product of $\mathscr S(\mathfrak S)$. In particular, if $\mathfrak S=\mathfrak S'\sqcup \mathfrak S''$ and the two edges belong to $\mathfrak S'$ and $\mathfrak S''$ respectively then $\cS(\underline{\mathfrak S})$ is canonically isomorphic to the braided tensor product of $\mathscr S(\mathfrak S_1)$ and  $\mathscr S(\mathfrak S_2)$.
\end{thm}
}


Through this theorem we easily compute the skein algebra of all ``polygons'', ``punctured bigons'', and ``punctured monogons'' in Subsection \ref{sub:monogons}. It is remarkable that the skein algebras of the latter turn out to be bialgebra objects in the category of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodules and that their structure morphism have natural topological interpretation. In particular the punctured monogon yields the ``transmutation'' of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. 

\subsection{Modular operad} 

The splitting homomorphism allows to put the theory of stated skein algebras of surfaces in the framework  of operad theory. We define  the notion of geometric non-symmetric modular operad in Section \ref{sub:cooperad} and prove the following.

\begin{thm}[Precise statement given by  Theorem \ref{teo:NSmodoperad}] The stated skein algebra of surfaces gives rise to a non-symmetric modular operad in a category of bimodules over $U_{q^2}(\mathfrak{sl}_2)$.
\end{thm}


To be more specific while leaving the details for Section \ref{sub:cooperad}, let us recall that, according to Markl (\cite{Mar}) a ``Non-symmetric modular operad in a monoidal category $Cat$'' is a monoidal functor $NSO:\mathsf{MultiCyc}\to Cat$, where $\mathsf{MultiCyc}$ is a suitable category of ``multicyclic sets''.  
In Section  \ref{sub:cooperad} we re-cast Markl's definition, by defining a category $\mathsf{TopMultiCyc}$ whose objects are punctured surfaces $\mathfrak S$ and whose morphisms are finite sets of ideal arcs (describing a way of cutting the surfaces). From this point of view, we then show in Theorem \ref{teo:NSmodoperad} that stated skein algebras provide a symmetric monoidal functor from this category into a suitable category of modules and bimodules over copies of $U_{q^2}(\mathfrak{sl}_2)$, thus providing a topological example of a NS modular operad. 



\def\overline {\cS}(\fS){\overline {\mathscr S}(\mathfrak S)}
\def{\mathcal I}^{\mathrm{bad}}{{\mathcal I}^{\mathrm{bad}}}
\subsection{Reduced stated skein algebra, quantum torus, and quantum trace map} The stated skein algebra $\cS(\fS)$ has a quotient $\overline {\cS}(\fS)= \cS(\fS)/{\mathcal I}^{\mathrm{bad}}$, called the {\em reduced stated skein algebra}, whose algebraic structure is much simpler as it can be embedded into the so called quantum tori. Here ${\mathcal I}^{\mathrm{bad}}$ is the ideal generated by elements, called bad arcs, described in Figure \ref{fig:badarc0} and is explained in Section \ref{sec:reduced}.

\FIGc{badarc0}{A bad arc.} {2cm}


We will show  that the ordinary skein algebra $\mathring {\cS}(\mathfrak S)$ still embeds into $\overline {\cS}(\fS)$ and hence we can use $\overline {\cS}(\fS)$ to study $\mathring {\cS}(\mathfrak S)$. Most importantly, the splitting theorem still holds for $\overline {\cS}(\fS)$.
 
\begin{thm}[Theorem  \ref{teo:rsplit}] If $\mathfrak S'$ is the result of cutting $\mathfrak S$ along an ideal arc $c$, then the splitting homomorphism $\theta_c$ descends to an algebra embedding
 $$ \bar \theta_c: \overline {\cS}(\fS) \hookrightarrow \overline {\mathscr S}(\mathfrak S').$$
\end{thm} 
The non-trivial fact here is that $\bar\theta _c$ is injective.
  
 Except for a few simple surfaces, we can always cut $\mathfrak S$ along ideal arcs so that the result is a collection of ideal triangles $T_1, \dots, T_k$. It follows that there is an embedding
  \begin{equation} 
 \Theta: \overline {\cS}(\fS) \hookrightarrow \bigotimes_{i=1}^k \overline {\mathscr S} (T_i). \label{eq.rhoall} 
  \end{equation} 
 
The important thing with the reduced version is that for an ideal triangle $T$, unlike the full fledged $\mathscr S(T)$, the reduced stated skein algebra $\overline {\mathscr S}(T)$ is a {\em quantum torus} in three variables:

\begin{thm}[Theorem \ref{teo:redtri}] \label{thm.tri}
The reduced stated skein algebra $\overline {\mathscr S}(T)$ of an ideal triangle has presentation
$$ \overline {\mathscr S}(T) = \mathcal R\langle \alpha^{\pm 1}, \beta ^{\pm 1}, \gamma^{\pm 1}\rangle  / (\beta\alpha = q\alpha\beta, \gamma\beta = q \beta\gamma, \alpha\gamma=q \gamma\alpha).$$
\end{thm}
Moreover, the reduced stated skein algebra of the bigon is naturally isomorphic to the algebra $\mathcal R[x^{\pm 1}]$ of Laurent polynomial in one variable, see Proposition \ref{r.rbigon}.

Consequently, the map $\Theta$ of \eqref{eq.rhoall} embeds the reduced stated skein algebra $\overline {\cS}(\fS)$ into a quantum torus in $3k$ variables.
Geometrically the  variables $\alpha,\beta,\gamma$ in Theorem \ref{thm.tri} come from the corner arcs  of the ideal triangle. There is a similar quantum torus $\mathbb T'(T)$ in 3 variables corresponding to the edges of $T$, and a simple change of variables gives us an embedding $\overline {\mathscr S}(T) \hookrightarrow \mathbb T'(T)$. Combining with $\Theta$ of \eqref{eq.rhoall} we get an algebra embedding 
$$
\tr_q: \overline {\cS}(\fS) \overset {\Theta}\hookrightarrow \bigotimes_{i=1}^k \overline{\mathscr S}(T_i)  \hookrightarrow \bigotimes_{i=1}^k \mathbb T(T_i).
$$

There is a subalgebra $\mathcal Y$ of $\bigotimes_{i=1}^k \mathbb T(T_i)$, known as the Chekhov-Fock algebra associated to the triangulation. 
\red{ The famous quantum trace map of Bonahon and Wong \cite{BW} is an algebra homomorphism $\widehat \tr_q: \widehat\mathscr S(\mathfrak S) \to \mathcal Y$, where $\widehat \mathscr S(\mathfrak S)$ is a coarser version of the stated skein algebra which surjects onto 
 $\mathscr S(\mathfrak S)$, see Section \ref{sub:statedskeinalgebra}. 

\begin{thm} [See Theorem \ref{thm.qtrace}] The image of $\tr_q$ is in $\mathcal Y$. Thus $\tr_q$ restricts to an algebra embedding  $\tr_q: \overline {\cS}(\fS) \hookrightarrow \mathcal Y$, and   the quantum trace map of Bonahon and Wong is the composition $\widehat \mathscr S(\mathfrak S)\twoheadrightarrow  \overline {\cS}(\fS)\overset {\tr_q} {\hookrightarrow} \mathcal Y.$
\end{thm}
}


The existence of the quantum trace map (for $\mathring {\cS}(\mathfrak S)$) was conjectured by Chekhov and Fock \cite{CF2}, and was established  by Bonahon and Wong \cite{BW}. It is called the quantum trace map since when $q=1$ it becomes a formula expressing the trace of a curve under the holonomy representation of the hyperbolic metric in terms of the shear coordinates of the Teichm\"uller space.
The second author \cite{Le:QT} gave another proof of the existence of the quantum trace map based on the Muller skein algebra, which is actually a subspace of the state skein algebra $\cS(\fS)$. The above approach using the reduced stated  skein algebra  offers another proof, and also determines the kernel of the original quantum trace map $\widehat \tr_q$.



\subsection{Classical limit}
The last section explores the natural question of ``what is the classical limit of $\cS(\fS)$?'' In the case of the standard skein algebra $\mathring {\cS}(\mathfrak S)$ it is known \cite{Bullock,PS1} (see also \cite{CM}) that when the quantum parameter $q$ is $-1$ and the ground ring is $\mathbb C$ then $\mathring {\cS}(\mathfrak S)$ is isomorphic as an algebra to the coordinate ring the $\mathrm{SL}_2(\mathbb{C})$-character variety of $\mathfrak S$ and that in general the algebras at $q$ and $-q$ are isomorphic via the choice of a spin structure on $\mathfrak S$ (\cite{Barrett}). Note that our stated skein algebra is not commutative when $q=-1$ though it is commutative when $q=1$. 

We introduce the variety $tw(\mathfrak S)$ of  ``twisted  $\mathrm{SL}_2(\mathbb{C})$-bundles'' over $\mathfrak S$, which, roughly speaking, are flat $\mathrm{SL}_2(\mathbb{C})$-bundles over the unit tangent bundle $U\mathfrak S$  of $\mathfrak S$ with holonomy $-Id$ around the fibers of $\pi:U\mathfrak S\to \mathfrak S$ and \red{are equipped} with trivializations along the edges of $\mathfrak S$, but which we reformulate in terms of groupoid representations. To deal with the non-oriented nature of the  arcs of the stated skein algebra we have to use a trick smoothing the arcs at their end-points so that one can compose arcs. 
\begin{thm}[Theorem \ref{teo:classicaliso}] \label{thm.classic}
 When $q=1$ and the ground ring is $\mathbb C$ the stated skein algebra $\cS(\fS)$ is naturally isomorphic to the coordinate ring of $tw(\mathfrak S)$.
\end{thm}

 In classical terms, the splitting theorem becomes an instance of a van-Kampen like theorem for groupoid representations.  
 

Theorem \ref{teo:classicaliso} highlights a relation between $\cS(\fS)$ and the coordinate ring of the character variety of $\mathfrak S$. The study of quantizations of such rings has been performed with different techniques (based on Hopf algebras and lattice gauge theory) by  Alekseev-Grosse-Schomerus (\cite{AGS}), Buffenoir-Roche \cite{BR}, Fock-Rosly (\cite{FR}) and, later, via skein theoretical approaches by Bullock-Frohman-Kania-Bartoszynska (\cite{BFK}). 
The relation of our work with these previous ones is still to be clarified, although it seems that one of the main differences between our approach and some of the above cited ones, is that we allow for ``observables with boundary'' and, as explained in the preceding paragraph, this endows the algebras we work with rich algebraic structures which in particular make computations much easier. 


\subsection{Related results}

While the authors were completing the present work,  D. Ben-Zvi, A. Brochier and D. Jordan \cite{BBJ} constructed a theory of quantum character variety for general Hopf algebras, based on completely  different techniques. Part of the results of this paper could probably be recasted in that theory, though we don't know the precise relation between the two theories. The substantial difference of the techniques used makes these works complementary. K. Habiro informed us that his  ``quantum fundamental group theory'' also 
gives an alternative approach to the theory of quantum character variety.

When the authors presented their works at conferences, Korinman informed us that he in joint work 
A. Quesney obtained results similar to Theorem \ref{thm.Hoch} and Theorem \ref{thm.classic}, see their recent preprint \cite{KQ}.



{\bf Acknowledgements.} The authors would like to thank F. Bonahon, R. Kashaev, A. Sikora,  V. Turaev, and D. Thurston for helpful discussions.  
Both authors were partially supported by the CIMI (Centre International de Math\'ematiques et d'Informatique) Excellence program during the Thematic Semester on Invariants in low-dimensional geometry and topology held in spring 2017. The second author is partially support by an NSF grant.

The authors presented the results of this paper in the form of talks or mini-courses at many conferences, including  ``Thematic School on Quantum Topology and Geometry'' (University of Toulouse, May 2017), ``Algebraic Structures in Topology and Geometry'' (Riederalp, Switzerland, January 2018), ``TQFTs and categorification'' (Cargese, March 2018), ``Volume Conjecture in Tokyo'' (University of Tokyo, August 2018), ``Categorification and beyond'' (Vienna, January 2019),  Topology mini-courses (university of Geneva, May 2019), ``New developments in quantum topology'' (Berkeley June 2019), ``Expansions, Lie algebras and invariants'' (Montreal July 2019) and would like to thank the organizers for the opportunities to present their work.



\section{Stated skein algebras} \label{sec.def}
We will present the basics of the theory of stated skein algebras: definitions, bases of skein algebras, the splitting homomorphism,  filtrations and gradings. New results involve Proposition \ref{r.inversion} describing the inversion homomorphism and Proposition \ref{r.grbinom} giving the exact value of the splitting homomorphism in the associated graded algebra.
\subsection{Notations}
Throughout the paper let
$\mathbb Z$ be the set of integers, $\mathbb N$ be the set of non-negative integers, $\mathbb C$ be  the set of complex numbers.
The ground ring $\mathcal R$  is a commutative ring with unit 1,  containing a distinguished invertible element $q^{1/2}$.
 For a finite set $X$ we denote by $|X|$ the number of elements of $X$.
 
 \def\overset \bullet ={\overset \bullet =}
 We will write $x \overset \bullet = y$ if there is $k\in \mathbb Z$ such that $x = q^{k} y$.

\def\mathfrak T{\mathfrak T}
\subsection{Punctured bordered surface}\label{sub:puncturedsurfaces} By a {\em punctured bordered surface} $\mathfrak S$ we mean a  surface of the form $\mathfrak S = \overline{\fS} \setminus \mathcal P$, where $\overline{\fS}$ is 
 a compact oriented surface  with
(possibly empty) boundary $\partial \bfS$, and $\mathcal P$ is a finite non empty set such that every connected component of the boundary $\partial \bfS$ has at least one point in $\mathcal P$.  We don't require $\mathfrak S $ be to connected. It is easy to see that $\overline{\fS}$ is uniquely determined by $\mathfrak S$. Throughout this section we fix a  punctured bordered surface $\mathfrak S$.

An {\em ideal arc} on $\mathfrak S$ is an immersion $a: [0,1] \to \overline{\fS}$ such that $a(0),a(1)\in \mathcal P$ and the restriction of $a$ onto $(0,1)$ is an embedding into $\mathfrak S$. 
Isotopies of ideal arcs are considered in the class of ideal arcs. 


A connected component of $\partial \fS$ is called a {\em boundary edge} of $\mathfrak S$ (or simply an edge), which is an ideal arc.
 





\begin{remark} The fact that each connected component of $\partial \mathfrak S$ is an open interval is not a serious restriction as for the purpose of the constructions of this paper a point-less boundary component is treated as a puncture; so that in the end the only excluded surfaces are closed ones without punctures.
\end{remark}


\subsection{Ordinary skein algebra}  Let $M=\mathfrak S \times (0,1)$. For a point $(z,t)\in \mathfrak S \times (0,1)$ its {\em height} is $t$. A vector at
 $(z,t)$ is called {\em vertical} if it is a positive vector of $z \times (0,1)$. {\em A framing} of a 
 1-dimensional submanifold $\alpha$ of $M=\mathfrak S \times (0,1)$ is 
 a continuous choice of a vector transverse to $\alpha$ at each point of $\alpha$.


 A {\em framed link} in $\mathfrak S\times (0,1)$ is a closed 1-dimensional unoriented submanifold $\alpha$  equipped with a framing.  The empty set, by convention, is considered a framed link. 
 
 A link diagram on $\mathfrak S$ determines an isotopy class of framed links in $\mathfrak S \times (0,1)$, where the framing is vertical everywhere. Every isotopy class of framed links in $\mathfrak S \times (0,1)$ is presented by a  link diagram.



The {\em skein module} $\mathring {\cS}(\mathfrak S)$, first introduced  by Przytycki \cite{Prz} and Turaev \cite{Turaev0}, is defined to be the $\mathcal R$-module generated by the isotopy classes of framed unoriented links in $\mathfrak S \times (0,1)$ modulo the Kauffman relations
\begin{align}
\label{eq.skein01}   \raisebox{-8pt}{\incl{.8 cm}{cross}}  \ &= \ q  \raisebox{-8pt}{\incl{.8 cm}{resoP}}  + q^{-1}   \raisebox{-8pt}{\incl{.8 cm}{resoN}} \\
\label{eq.loop01}    \raisebox{-8pt}{\incl{.8 cm}{trivloop}} \  &=\  (-q^2 -q^{-2})\raisebox{-8pt}{\incl{.8 cm}{empty}}
 \end{align}
We use the following convention about pictures in these identities, as well as in other identities in this paper. Each  shaded part is a  part of $\mathfrak S$, with a link diagram on it.
Relation \eqref{eq.skein01} says that if  link diagrams $D_1, D_2$, and $ D_3$ are identical everywhere except for a small disk in which $D_1,D_2, D_3$ are like in respectively the first, the second, and the third shaded areas, then $[D_1] = q[D_2] + q^{-1} [D_3]$ in the skein module $\mathring {\cS}(\mathfrak S)$. Here $[D_i]$ is the isotopy class of links determined by $D_i$. The other relation is interpreted similarly.

For two framed links $\alpha_1$ and $\alpha_2$ the product $\alpha_1 \alpha_2$  is defined as the result of stacking $\alpha_1$ above $\alpha_2$. That is, first isotope $\alpha_1$ and $\alpha_2$ so that $\alpha_1 \subset \mathfrak S \times (1/2,1)$ and $\alpha_2 \subset \mathfrak S \times (0, 1/2)$. Then $\alpha_1 \alpha_2= \alpha_1 \cup \alpha_2$.
 It is easy to see that this gives rise to a well defined product and hence an $\mathcal R$-algebra structure on $\mathring {\cS}(\mathfrak S)$.
 


\subsection{Tangles and order}\label{sub:tangle} In order to include the boundary of $\mathfrak S$ into the picture, we will replace framed links by more general objects called $\partial M$-tangles. Recall that $M= \mathfrak S \times (0,1)$ and its boundary is $\partial M = \partial \fS \times (0,1)$.

In this paper, a {\em $\partial M$-tangle} is
an unoriented,
 framed, compact,  properly embedded 1-dimensional submanifold $\alpha \subset M=\mathfrak S \times (0,1)$ such that:
 \begin{itemize}
 \item  at every point of $\partial \alpha=\alpha \cap \partial M$ the framing is {\em vertical}, and
\item  for any boundary edge $b$, the points of $\partial_b(\alpha):=\partial \alpha \cap (b \times (0,1))$  have distinct~heights.
 \end{itemize}


For a $\partial M$-tangle $\alpha$ define a partial order on $\partial \alpha $ by: $x>y$ if there is a boundary edge $b$ such that $x, y \in b \times (0,1)$ and
 $x$ has greater height. If $x>y$ and there is no $z$ such that $x>z>y$, then we say
$x$ and $y$ are {\em consecutive}. 

{\em Isotopies of  $\partial M$-tangles} are considered  in the class of $\partial M$-tangles. \red{It should be noted that isotopies of $\partial M$-tangles preserve the height order.}
The empty set, by convention, is a $\partial \fS$-tangle which is isotopic only to itself. 


As usual, $\partial M$-tangles are depicted by their diagrams on $\mathfrak S$, as follows.
Every $\partial \fS$-tangle is isotopic to one with vertical framing.
Suppose a vertically framed $\partial M$-tangle $\alpha$ is in general position with respect to
the standard projection $\pi: \mathfrak S \times (0,1) \to \mathfrak S$, i.e.  the restriction $\pi |_{\alpha}:\alpha \to \mathfrak S$ is an immersion with transverse  double points as the only possible singularities and there are no double points on the boundary of $\mathfrak S$. 
Then $D=\pi (\alpha)$, together with 
\begin{itemize}
\item  the over/underpassing information at every double point, and 
\item  the linear order on $\pi(\alpha) \cap b$ for each boundary edge $b$ induced from the height order
\end{itemize} 
is called a {\em  $\partial M$-tangle  diagram}, or simply a tangle diagram on $\mathfrak S$.
{\em Isotopies} of  $\partial M$-tangle diagrams are  ambient isotopies in $\mathfrak S$.

Clearly the $\partial M$-tangle diagram of a $\partial M$-tangle $\alpha$ determines the isotopy class of $\alpha$.
 When there is no confusion, we identify a $\partial M$-tangle diagram with its isotopy class of $\partial M$-tangles.

\def{\mathfrak o}{{\mathfrak o}}
 Let ${\mathfrak o}$ be an {\em orientation} of $\partial \fS$,   which on a boundary edge may or may not be equal to the orientation inherited from $\mathfrak S$. A $\partial M$-tangle diagram $D$ is {\em ${\mathfrak o}$-ordered} if for each boundary edge $b$ the order of $\partial D$ on $b$ is  increasing when one goes along $b$ in  the direction of ${\mathfrak o}$. It is clear that every $\partial M$-tangle, after an isotopy, can be presented by an  ${\mathfrak o}$-ordered $\partial M$-tangle diagram.
 If ${\mathfrak o}$ is  the orientation coming from $\mathfrak S$, the ${\mathfrak o}$-order is called the {\em positive order}.



\def{\mathfrak o}{{\mathfrak o}}
\def\mathring{\fS}{\mathring {\mathfrak S}}

\subsection{Stated skein algebra}\label{sub:statedskeinalgebra}

A {\em state} on a finite set $X$ is a map $s: X \to \{\pm\}$. We write $\# s= |X|$.
A {\em stated $\partial M$-tangle }  (respectively {\em a stated $\partial M$-tangle diagram}) is a $\partial M$-tangle (respectively {\em a  $\partial M$-tangle diagram})  equipped with a {\em state} on its set of boundary points.


The {\em  stated skein algebra}  $\cS(\mathfrak S)$ is  the $\mathcal R$-module freely spanned
 by isotopy classes of stated $\partial M$-tangles modulo the {\em defining relations}, which are the old  skein relation~\eqref{eq.skein} and the trivial loop relation~\eqref{eq.loop}, and the new boundary relations~\eqref{eq.arcs} and~\eqref{eq.order}:
\begin{align}
\label{eq.skein}   \raisebox{-8pt}{\incl{.8 cm}{cross}}  \ &= \ q  \raisebox{-8pt}{\incl{.8 cm}{resoP}}  + q^{-1}   \raisebox{-8pt}{\incl{.8 cm}{resoN}} \\
\label{eq.loop}    \raisebox{-8pt}{\incl{.8 cm}{trivloop}} \  &=\  (-q^2 -q^{-2})\raisebox{-8pt}{\incl{.8 cm}{empty}}\\
\label{eq.arcs} \raisebox{-8pt}{\incl{.8 cm}{left_up}}\  & =\  q^{-1/2} \raisebox{-8pt}{\incl{.8 cm}{emptys}}\ , \qquad \raisebox{-8pt}{\incl{.8 cm}{left_upPP}}\ =0, \quad \  \raisebox{-8pt}{\incl{.8 cm}{left_upNN}} \ = 0   \\
 \label{eq.order}     \raisebox{-8pt}{\incl{.8 cm}{reord1}} \ &=\  q^2   \raisebox{-8pt}{\incl{.8 cm}{reord2}}  \ +\  q^{-1/2}   \raisebox{-8pt}{\incl{.8 cm}{reord3}} 
 \end{align}
Here each   shaded part is a  part of $\mathfrak S$, with a stated $\partial M$-tangle diagram on it.
Each arrowed line is part of a boundary edge, and the order on that part is indicated by the arrow and the points on that part are consecutive in the height order. The order of other end points away from the picture can be arbitrary and are not determined by the arrows of the picture. On the right hand side of the first identity of \eqref{eq.arcs}, the arrow does not play any role; it is there only because the left hand side has an arrow.



Again for two $\partial M$-tangles $\alpha_1$ and $\alpha_2$ the product $\alpha_1 \alpha_2$  is defined as the result of stacking $\alpha_1$ above $\alpha_2$. The product makes $\cS(\mathfrak S)$ an $\mathcal R$-algebra. In \cite{Le:TDEC} it is proved that if $\mathcal R$ is a domain then $\cS(\fS)$  does not have non-trivial zero-divisors, \red{a fact known earlier for the case when $\mathfrak S$ has no boundary \cite{PS2}.}


If   $\mathfrak S_1$ and $\mathfrak S_2$ are two punctured bordered  surfaces, then
there is a natural isomorphism
$$
\cS (\mathfrak S_1 \sqcup \mathfrak S_2) \cong \cS (\mathfrak S_1) \otimes_\mathcal R
\cS (\mathfrak S_2).
$$



Since the interior $\mathring{\fS}$ of $\mathfrak S$ does not have boundary, we have $
\mathscr S(\mathring{\fS}) = \mathring {\cS}(\mathfrak S).$

\def\cS^{\mathrm{+}}(\fS){\mathscr S^{\mathrm{+}}(\mathfrak S)}
The subalgebra $\cS^{\mathrm{+}}(\fS)$ spanned by $\partial M$-tangles whose  states  are all $+$ is naturally isomorphic to the skein algebra defined by Muller \cite{Muller}, see \cite{Le:TDEC,LP}. \red{If in the definition of $\mathscr S(\mathfrak S)$ we use only two relations \eqref{eq.skein} and \eqref{eq.loop}, we get a coarser version $\widehat{\mathscr S}(\mathfrak S)$ which was defined by Bonahon and Wong \cite{BW}.}

\begin{remark} \label{rem.hS}  Relations \eqref{eq.arcs} already appeared in \cite{BW}. Relation \eqref{eq.order} appeared  in \cite{Le:TDEC} where the stated skein algebra was introduced.
\end{remark}

\def\overset \star \longrightarrow{\overset \star \longrightarrow}
\def\raisebox{-8pt}{\incl{.8 cm}{leftvep}}{\raisebox{-8pt}{\incl{.8 cm}{leftvep}}}

\subsection{Consequences of defining relations} 



Define $C^\nu_{\nu'}$ for $\nu, \nu'\in \{\pm \}$ by
 \begin{equation} 
\label{eq.Cve}
C^+_+ = C^-_- = 0, \quad C^+_-= q^{-1/2}, \quad C^-_+ = -q^{-5/2}.
 \end{equation} 
In the next lemma we have the values of all the trivial arcs.
\begin{lemma}[Lemma 2.3 of \cite{Le:TDEC}] \label{r.arcs}
In $\cS(\mathfrak S)$ one has
\begin{align}
\label{eq.kink} -q^{-3}   \raisebox{-8pt}{\incl{.8 cm}{kinkp}}  \ &= \   \raisebox{-8pt}{\incl{.8 cm}{kinkzero}} \  = \ -q^3  \raisebox{-8pt}{\incl{.8 cm}{kinkn}} \\
\label{eq.arcs1} \raisebox{-8pt}{\incl{.8 cm}{leftve}}\   &=\  C^\nu _{\nu'}  \raisebox{-8pt}{\incl{.8 cm}{emptys}}\\
\label{eq.arcs2} \raisebox{-8pt}{\incl{.8 cm}{left_ve_dl}} \ & = \ \raisebox{-8pt}{\incl{.8 cm}{left_ve_d}}\   =\  - q^{3} C^{\nu'} _{\nu}  \raisebox{-8pt}{\incl{.8 cm}{emptys}}
\end{align}
\end{lemma}

The next lemma describes how a skein behaves when the order of two consecutive boundary points is switched.


\begin{lemma}[Height exchange move, Lemma 2.4 of \cite{Le:TDEC}]\label{r.refl}
 (a) One has
\begin{align}
\label{eq.reor1}
  \raisebox{-8pt}{\incl{.8 cm}{reord1z}}  \  = \ q^{-1} \,    \raisebox{-8pt}{\incl{.8 cm}{reord1a}}  , \quad   \raisebox{-8pt}{\incl{.8 cm}{reord6z}}  \  &= \ q^{-1} \,   \raisebox{-8pt}{\incl{.8 cm}{reord6a}}  , \quad   \raisebox{-8pt}{\incl{.8 cm}{reord1pn}}  = q \,   \raisebox{-8pt}{\incl{.8 cm}{reord2pn}}  \\
\label{eq.reor2}
q^{\frac 32}   \raisebox{-8pt}{\incl{.8 cm}{reordpn}}   - q^{-\frac 32}    \raisebox{-8pt}{\incl{.8 cm}{reord1}}   &= (q^2 -q^{-2})   \raisebox{-8pt}{\incl{.8 cm}{reord3}} .
\end{align}

(b) Consequently, if $q=1$ or $q=-1$, then for all $\nu, \nu'\in \{\pm \}$,
 \begin{equation} 
\label{eq.sign}
   \raisebox{-8pt}{\incl{.8 cm}{reord1all}}  =
 q\,    \raisebox{-8pt}{\incl{.8 cm}{reord1allp}} .
  \end{equation} 

\end{lemma}


\begin{remark} Because of relation  \eqref{eq.sign}, in general  $\cS(\mathfrak S)$ is not commutative when $q=-1$. This should be contrasted with the case of the usual skein algebra   $\mathring {\cS}(\mathfrak S)$, which is
  commutative and is canonically equal to the $\mathrm{SL}_2(\mathbb C)$ character variety of $\pi_1(\mathfrak S)$ if $\mathcal R=\mathbb C$ and $q=-1$ (assuming $\mathfrak S$ is connected), see \cite{Bullock,PS1}.
\end{remark}

\def\mathrm{id}{\mathrm{id}}
\def\mathring{\fS}{\mathring{\mathfrak S}}
\def\chi{\chi}

 \def\mathcal L{\mathcal L}
 \def\tilde \chi{\tilde \chi}

\subsection{Reflection anti-involution}  \label{sec.refl} 
\begin{proposition}[Reflection anti-involution, Proposition 2.7 in \cite{Le:TDEC}]   \label{r.reflection} \red{Suppose $\mathcal R=\mathbb Z[q^{\pm 1/2}]$. There exists a unique $\mathbb Z$-linear map $\chi: \cS(\mathfrak S) \to \cS(\mathfrak S)$, such that

\begin{itemize}
\item  $\chi(q^{1/2})= q^{-1/2}$, 
\item $\chi$ is an anti-automorphism, i.e. for any $x,y \in \cS(\mathfrak S)$,
$$\chi(x+y)= \chi(x) + \chi(y), \quad \chi(xy) = \chi(y) \chi(x),$$
\item if $\alpha$ is a stated $\partial M$-tangle diagram then $\chi(\alpha)$ is the result of switching all the crossings of $\alpha$ and reversing the linear order on each boundary edge.
\end{itemize} 
}
 \end{proposition}
Clearly $\chi^2=\mathrm{id}$. We call $\chi$ the reflection anti-involution.

\def\mathrm{inv}{\mathrm{inv}}
\def\mathrm{id}{\mathrm{id}}
\defe_r{e_r}
\defe_l{e_l}
\def\overline{\inv}{\overline{\mathrm{inv}}}

\subsection{Inversion along an edge}  \label{sec.invers}



\red{
\begin{proposition}
\label{r.inversion}  Let  $e$ be a boundary edge of a punctured bordered surface $\mathfrak S$ and  $f:\{\pm \} \to \mathcal R$ be a function such that $f(+) f(-)= - q^{-3}$.

There exists a unique $\mathcal R$-linear homomorphism $\mathrm{inv}_{e,f}: \cS(\mathfrak S) \to \cS(\mathfrak S)$ such that if $\alpha$ is a stated $\partial \mathfrak S$-tangle diagram with a state $s$ and with positive order on $e$,
then 
 \begin{equation}  
\mathrm{inv}_{e,f}(\alpha)=  \left( \prod_{x \in (\alpha \cap e)} f(s(x))  \right)  \alpha',
\label{eq.def10}
 \end{equation}  where $\alpha'$ is the same $\alpha$ except that the height order of $\alpha'$ on $e$ is given by the negative direction of $e$ and the state of $\alpha'$ on $e$ is obtained from that of $\alpha$ by switching $\nu\in \{\pm \}$ to $-\nu$ at every boundary points in $\alpha \cap e$.

If $e'$ is another boundary edge and $f'(+) f'(-)= -q^{-3}$, then 
 \begin{equation}  
\mathrm{inv}_{e,f}  \circ \mathrm{inv}_{e',f' } = \mathrm{inv}_{e'.f'} \circ \mathrm{inv}_{e,f}.
\label{eq.com5}
 \end{equation}  
\end{proposition}


\def\widetilde{\inv}{\widetilde{\mathrm{inv}}}
\def\widetilde{\Ss}{\widetilde{\cS}}
\begin{proof}  Let $T$ be the set of isotopy classes of stated, positively ordered $\partial \fS$-tangle diagrams. Since $T$ spans $\cS(\mathfrak S)$, the  uniqueness of $\mathrm{inv}_{e,f}$ is clear. 

Let $\widetilde{\Ss}$ be the $\mathcal R$-module freely span by $T$, and $\widetilde{\inv}_{e,f}: \cS'\to \cS(\mathfrak S)$ be the 
 $\mathcal R$-linear map defined  by \eqref{eq.def10}. To show that  $\widetilde{\inv}_{e,f}$ descends to a map $\mathrm{inv}_{e,f}: \cS(\mathfrak S)\to \cS(\mathfrak S)$ one needs to prove $\widetilde{\inv}_{e,f}$ is invariant under isotopy in $M:=\mathfrak S \times (0,1)$ and under the moves generated by the defining relations \eqref{eq.skein}-\eqref{eq.order}. More precisely, we have to show that  $\widetilde{\inv}_{e,f}(\alpha) = \widetilde{\inv}_{e,f}(\alpha)$ for any $\alpha,\alpha'\in T$   whenever 
\begin{itemize}
\item[(i)] $\alpha$ and $\alpha'$ are isotopic as $\partial M$-tangles, or
\item[(ii)] $\alpha$ and $\alpha'$ are respectively the left hand side and the right hand side of the defining relations \eqref{eq.skein}-\eqref{eq.order}.
\end{itemize}

It is known that $\alpha$ and $\alpha'$ are isotopic as $\partial M$-tangles if and only if they are related by a sequence of the 3 framed Reidemeister moves of \cite[Section 1.2]{Oh}. 
The invariance under the 3 framed Reidemeister moves follows from the invariance under the defining relations \eqref{eq.skein} and \eqref{eq.loop}, see \cite{Kauffman}. Clearly $\widetilde{\inv}_{e,f}$ is invariant under the moves generated by the  defining relations \eqref{eq.skein} and \eqref{eq.loop}. There remains relations \eqref{eq.arcs} and \eqref{eq.order}.

Let us consider \eqref{eq.arcs}.  Using the definition, $f(+)f(-)=q^{-3}$, and then \eqref{eq.arcs2}, we have:



$$\mathrm{inv}_{e,f}\left(\raisebox{-8pt}{\incl{.8 cm}{left_up}}\right)=f(+)f(-)  \raisebox{-8pt}{\incl{.8 cm}{leftmp}}  =-q^{-3}  \raisebox{-8pt}{\incl{.8 cm}{leftmp}}  =-q^{-3}(-q^3)C_-^+ = q^{-1/2},$$
which proves the first identity of \eqref{eq.arcs}. The other two identities of \eqref{eq.arcs} are trivial.

Let us consider \eqref{eq.order}. By definition and Lemma \ref{r.refl},
 \begin{equation}  \mathrm{inv}_{e,f}\left(  \raisebox{-8pt}{\incl{.8 cm}{reord1}} \right)=f(+)f(-)  \raisebox{-8pt}{\incl{.8 cm}{reord1pn}} =(-q^{-3})  ( q \,   \raisebox{-8pt}{\incl{.8 cm}{reord2pn}} )= -q^{-2}   \raisebox{-8pt}{\incl{.8 cm}{reord2pn}} .
\label{eq.u2}
 \end{equation} 
\begin{align}\mathrm{inv}_{e,f}\left(q^2  \raisebox{-8pt}{\incl{.8 cm}{reord2}} +q^{\frac{-1}{2}}  \raisebox{-8pt}{\incl{.8 cm}{reord3}} \right) & =q^2(-q^{-3})  \raisebox{-8pt}{\incl{.8 cm}{reordpn}} +q^{-\frac{1}{2}}  \raisebox{-8pt}{\incl{.8 cm}{reord3}}  \notag\\
&=-q^{-1} \left( q^{-3}   \raisebox{-8pt}{\incl{.8 cm}{reord1}} + q^{-\frac{3}{2}}(q^2-q^{-2})  \raisebox{-8pt}{\incl{.8 cm}{reord3}}  \right)+q^{-\frac{1}{2}}  \raisebox{-8pt}{\incl{.8 cm}{reord3}}   \notag
\\
&=-q^{-4}  \raisebox{-8pt}{\incl{.8 cm}{reord1}} +q^{-\frac{9}{2}}  \raisebox{-8pt}{\incl{.8 cm}{reord3}} , \label{eq.u3}
\end{align}
and the right hand sides of \eqref{eq.u2} and \eqref{eq.u3} are equal due to \eqref{eq.order}.

Identity \eqref{eq.com5} follows immediately from the definitions.
\end{proof}







There are two important cases for us. Define
 \begin{equation}  \mathrm{inv}_e:= \mathrm{inv}_{e,C}, \quad \text{and} \ \overline{\inv}_e:= \mathrm{inv}_{e,\bar C},
 \end{equation} 
where  \begin{equation}  
C(+)= \bar C (-) = -q^{-5/2}, \quad C(-) = \bar C(+) = q^{-1/2}.
 \end{equation} 

Note that $C(\nu) = C^{-\nu}_{ \nu}$ and $\bar C(\nu) = C(-\nu)$ for  $\nu\in \{\pm \}$. 
For a stated tangle diagram $\alpha$ with a state $s$ on the boundary edge $e$ define 
 \begin{equation}  
 C_e(\alpha) = \prod_{x\in \alpha \cap  e} C(s(x))= \prod_{x\in \alpha \cap  e} C^{-s(x)}_{s(x)}.
 \label{eq.Ce}
  \end{equation}  
If $\alpha$ has positive order on $e$ then, with $\alpha'$  defined as in Proposition \ref{r.inversion}, one has
 \begin{equation} \label{eq:invC} 
\mathrm{inv}_e(\alpha) = C_e(\alpha) \alpha',
 \end{equation} 


\begin{remark} The definition \eqref{eq.def10} works only for stated $\partial \fS$-tangle diagrams with positive order on $e$. If the order is not positive, the formula will be different.

In general $\mathrm{inv}_{e,f}$ is not an algebra homomorphism.
\end{remark}

}
\subsection{Basis of stated skein module} \label{sec.basis0}


{ A $\partial M$-tangle diagram $D$} is {\em simple} if it has neither double point nor
trivial component. Here a closed component of $D$ is {\em trivial} if it bounds a disk in $\mathfrak S$,
 and an arc component of $\alpha$ is {\em trivial} if it can be homotoped relative to its boundary  to a subset of a boundary edge.
 By convention, the empty set is considered as a simple stated $\partial M$-tangle diagram with 0 components.


Define an order on $\{ \pm\}$ so that the sign $-$ is less than the sign $+$. If $X$ is a partially ordered set, then a state $s: X \to \{\pm\}$ is {\em increasing} if $s$ is an increasing function, i.e. $f(x)  \le f(y)$ whenever $x \le y$.



\def\mathrm{inv}{\mathrm{nd}}

\def\tilde B{\tilde B}
 Choose an orientation  ${\mathfrak o}$  of
$\partial \fS$.
Let  $B(\mathfrak S;{\mathfrak o})$ be the set of
 of all isotopy classes of increasingly stated, ${\mathfrak o}$-ordered simple $\partial M$-tangle diagrams. From the defining relations  it is easy to show that the set $B(\mathfrak S;{\mathfrak o})$ spans $\cS(\fS)$ over $\mathcal R$. 



\begin{theorem} [Theorem 2.8 in \cite{Le:TDEC} ]   \label{thm.basis1a}
 Suppose $\mathfrak S$ is a punctured bordered surface and ${\mathfrak o}$ is an orientation of $\partial \fS$.
Then $B(\mathfrak S;{\mathfrak o})$ is an $\mathcal R$-basis of $\cS(\mathfrak S)$.
  \end{theorem}
  \def\mathrm{dec}{\mathrm{dec}}
  
 \begin{remark} Theorem \ref{thm.basis1a} means that the coefficients given in the defining relations \eqref{eq.arcs} and \eqref{eq.order} are consistent in the sense that they do not lead to any more relations among the set $B(\mathfrak S;{\mathfrak o})$.
 \label{rem.cons}
 \end{remark}

\def\mathring B{\mathring B}

The subset $\mathring B(\mathfrak S;{\mathfrak o})\subset B(\mathfrak S;{\mathfrak o})$ consisting of $\alpha\in B(\mathfrak S;{\mathfrak o})$ having no arcs is a basis of the ordinary skein algebra $\mathring {\cS}(\mathfrak S)$. Similarly, the subset $B^{+}(\mathfrak S;{\mathfrak o})\subset B(\mathfrak S;{\mathfrak o})$ consisting of $\alpha\in B(\mathfrak S;{\mathfrak o})$ having only positive states is a basis of the Muller  skein algebra $\cS^{\mathrm{+}}(\fS)$, see \cite{Muller,Le:TDEC,LP}. Hence we have the following.
\begin{corollary} Both the ordinary skein algebra $\mathring {\cS}(\mathfrak S)$ and the Muller skein algebra $\cS^{\mathrm{+}}(\fS)$ are subalgebras of the stated skein algebra $\cS(\fS)$.  
\end{corollary}


 

\def{\mathfrak{A}}{{\mathfrak{A}}}
\subsection{Filtration and grading} \label{sec.filtration} Suppose $a$ is either an ideal arc or a simple closed curve on $\mathfrak S$ and $\alpha$ is a simple $\partial M$-tangle diagram on $\mathfrak S$. The geometric intersection index $I(a,\alpha)$ is
$$ I(a,\alpha) = \min |a \cap \alpha'|,$$
where the minimum is over all the simple $\partial M$-tangle diagrams $\alpha'$ isotopic to $\alpha$.

For a collection ${\mathfrak{A}}=\{ a_1, \dots, a_k\}$, where each $a_i$ is either an ideal arc or a simple closed curve, and $n\in \mathbb N$ let $F^{\mathfrak{A}}_n(\cS(\fS))$ be the $\mathcal R$-submodule of $\cS(\fS)$ spanned by all stated simple $\partial M$-diagrams $\alpha$ such that $\sum_{i=1}^k I(a_i, \alpha) \le n$. It is easy to see that the collection $\{F^{\mathfrak{A}}_n(\cS(\fS))\}_{n\in \mathbb N}$ forms a filtration of $\cS(\fS)$ compatible with the algebra structure, i.e. with $F_n= F^{\mathfrak{A}}_{n}(\cS(\fS))$ one has
$$ F_{n} \subset F_{n+1}, \ \bigcup_{n\in \mathbb N} F_n = \cS(\fS), \ F_n F_{n'} \subset F_{n+n'}.$$
One can define the associated graded algebra 
$\mathrm{Gr}^{{\mathfrak{A}}}(\cS(\mathfrak S))$:
 $$ \mathrm{Gr}^{{\mathfrak{A}}}(\cS(\mathfrak S))= \bigoplus_{n=0}^\infty  \mathrm{Gr}^{{\mathfrak{A}}}_n(\cS(\mathfrak S))\   \text{with } \mathrm{Gr}^{{\mathfrak{A}}}_n(\cS(\mathfrak S))= F_n/F_{n-1}\ \forall n\ge 1 \ \text{and}\  \mathrm{Gr}_0= F_0.$$ 

This type of filtration has been used extensively in the theory of the ordinary skein algebra, see e.g. \cite{Le:QT,FKL,LP,Marche}. 

 The following is a consequence of Theorem \ref{thm.basis1a}:
\begin{proposition}[Proposition 2.12 in \cite{Le:TDEC}]\label{r.basis2}  Let  ${\mathfrak o}$ be an orientation of the boundary of a punctured bordered surface $\mathfrak S$, and ${\mathfrak{A}}=\{a_1,\dots, a_k\}$ be a collection of boundary edges of $\mathfrak S$.\\
 (a) The set $\{ \alpha \in B(\mathfrak S;{\mathfrak o})\mid \sum_{i=1}^k I(\alpha, a_i)\le n\} $
is an $\mathcal R$-basis of $F^{\mathfrak{A}}_n(\cS(\mathfrak S))$.\\
(b) The set $\{ \alpha \in B(\mathfrak S;{\mathfrak o}) \mid \sum_{i=1}^k I(\alpha, a_i)= n\} $ is an $\mathcal R$-basis of $\mathrm{Gr}^{\mathfrak{A}}_n(\cS(\mathfrak S))$.\\
\end{proposition}




\def{\cE_\partial}{{\mathcal E_\partial}}
\def\mathrm{lt}{\mathrm{lt}}
For what concerns the grading, for each non-negative integer $m$ and a boundary edge $e$ let  $G^e_m$ be the $\mathcal R$-subspace of $\cS(\mathfrak S)$ spanned by stated $\partial M$-tangle diagrams  $\alpha$ with 
 $\delta_e(\alpha):= \sum_{u \in (\alpha \cap e)} s(u) =m,$ where $s$ is the state and 
  we identify $+$ with $+1$ and $-$ with $-1$.  
 
From the defining relations it is clear that $\cS(\mathfrak S)= \bigoplus_{m  \in \mathbb Z} G^e_m$ and $G^e_m G^e_{m'} \subset G^e_{m+m'}$. In other words,  $\cS(\mathfrak S)$ is a graded algebra with the grading $\{ G^e_m\}_{m\in \mathbb Z}$.

Also the following is a consequence of Theorem \ref{thm.basis1a}:
\begin{proposition}\label{r.basis3}
Let $\mathfrak S$ be a punctured bordered surface and ${\mathfrak o}$ be an orientation of $\partial \fS$.
 The set $\{ \alpha \in B(\mathfrak S;{\mathfrak o}) \mid \delta_e(\alpha)=m\} $ is an $\mathcal R$-basis of $G^e_{m}(\cS(\mathfrak S))$.

\end{proposition}

 
 
 
If ${\mathfrak o}'$ is another orientation of the boundary $\partial \fS$, the change from basis $B(\mathfrak S;{\mathfrak o})$ to $B(\mathfrak S;{\mathfrak o}')$ might be complicated. For the associated space $\mathrm{Gr}^{\mathfrak{A}}(\cS(\fS))$, the change of bases is simpler. 

Recall that $\alpha \overset \bullet = \alpha'$ means $\alpha = q^m \alpha'$ for some $m\in \mathbb Z$.

\begin{proposition} \label{r.orichange} Suppose $\alpha$ is stated tangle diagram on $\mathfrak S$ and $I(\alpha,e)=k$ where $e$ is a boundary edge. Let's alter $\alpha$ to get $\alpha'$ by changing the height order on $e$ and the states on $e$ such that $\delta_e(\alpha) = \delta_e(\alpha')$. Then  one has
  \begin{equation}  
\alpha \overset \bullet = \alpha'   \quad \text{ in $\mathrm{Gr}^e_k(\cS(\fS))$}\label{eq.orichange}.  \end{equation} 
\end{proposition}
\begin{proof} 

One can get $\alpha'$ from $\alpha$ by a sequence of moves, each is either (i) an exchange of the heights of two consecutive vertices on $e$, or (ii) an exchange of states of two consecutive vertices on $b$. We can assume that $\alpha'$ is the result of doing a move of type (i) or type (ii).

In case of move (i), the identities \eqref{eq.reor1} and \eqref{eq.reor2} prove \eqref{eq.orichange}.

In case of move (ii), the identity \eqref{eq.order} prove \eqref{eq.orichange}.
\end{proof}

 
\def\widetilde{\pr}{\widetilde{\mathrm{pr}}}
\def\tilde \al{\tilde \alpha}
\subsection{Splitting/Gluing punctured bordered surfaces}    \label{sec.31}
Suppose $a$ and $b$ are distinct boundary edges of a punctured bordered surface $\mathfrak S'$ which may not be connected. Let $\mathfrak S= \mathfrak S'/(a=b)$ be the result of gluing $a$ and $b$ together in such a way that the  orientation is compatible. The canonical projection $\mathrm{pr}: \mathfrak S' \to \mathfrak S$  induces a projection $\widetilde{\pr}: M=\mathfrak S' \times (0,1) \to M=\mathfrak S\times (0,1)$.
Let $c= \mathrm{pr}(a)=\mathrm{pr}(b)$. It is an interior ideal arc  of $\mathfrak S$.

Conversely if $c$ is an ideal arc in the interior of $\mathfrak S$, then there exists $\mathfrak S', a,b$ as above such that $\mathfrak S= \mathfrak S'/(a=b)$, with $c$ being the common image of $a$ and $b$. We say that $\mathfrak S'$ is the result of splitting $\mathfrak S$ along $c$.



 A $\partial M$-tangle  $\alpha\subset M=\mathfrak S \times (0,1)$,  is said to be {\em vertically transverse to $c$} if
 \begin{itemize}
 \item $\alpha$ is transverse  to $c \times (0,1)$,
 \item the points in $\partial_c\, \alpha:= \alpha \cap (c \times (0,1))$ have distinct heights, and have vertical framing.
 \end{itemize}
 Suppose $\alpha$ is a stated $\partial M$-tangle vertically transverse  to $c$. Then $\tilde \al:=\widetilde{\pr}^{-1}(\alpha)$ is a $\partial M'$-tangle
 which is stated at every boundary point except for newly created boundary points, which are points in  $\widetilde{\pr}^{-1} (\partial_c\, \alpha)$.
  {\em A lift} of $\alpha$ is a stated $\partial M'$-tangle $\beta$ which is $\tilde \al$ equipped with states on $\widetilde{\pr}^{-1} (\partial_c\, \alpha)$ such that if $x,y\in \widetilde{\pr}^{-1} (\partial_c\, \alpha)$ with $\widetilde{\pr}(x)=\widetilde{\pr}(y)$ then $x$ and $y$ have the same state. If $|\partial_c\, \alpha|=k$, then  $\alpha$ has $2^k$ lifts.


\begin{theorem}[Splitting Theorem, Theorem 3.1 in \cite{Le:TDEC}] \label{thm.1a} Suppose $c$ is an ideal arc in the interior of a  punctured bordered surface $\mathfrak S$ and $\mathfrak S'$ is the result of splitting $\mathfrak S$ along $c$.


(a)
There is a unique $\mathcal R$-algebra homomorphism
$ \theta_c: \cS(\mathfrak S) \to \cS(\mathfrak S')$, called the splitting homomorphism along $c$,
such that if $\alpha$ is a stated $\partial M$-tangle  vertically transverse  to $c$, then
 \begin{equation}  
\theta _c(\alpha)=\sum \beta, \label{eq.slit}
 \end{equation}  where the sum is over all lifts $\beta$ of $\alpha$.


(b) In addition, $\theta_c $ is injective.

(c) If $c_1$ and $c_2$ are two non-intersecting ideal arcs in the interior of $\mathfrak S$, then
$$ \theta_{c_1} \circ \theta_{c_2} = \theta_{c_2} \circ \theta_{c_1}.$$

\end{theorem}
\begin{remark} The coefficients of the right hand sides of the defining relations \eqref{eq.arcs} and \eqref{eq.order} were chosen so that one has the consistency (see Remark \ref{rem.cons}) and the splitting theorem. It can be shown that if one requires the consistency and the splitting theorem, then the coefficients are unique, up symmetries of a group isomorphic to $\mathbb Z/2 \times \mathbb Z/2$.
\end{remark}

\subsection{Splitting homomorphism and filtration} Fix an orientation ${\mathfrak o}$ of the boundary edges of $\partial \mathfrak S$. Let  $\mathfrak S'$ be the result of splitting $\mathfrak S$ along an ideal arc $c$, with $c$ being lifted to boundary edges $a$ and $b$ of $\mathfrak S'$. 
Choose an orientation of $c$ and lift this orientation to $a$ and $b$ which, together with ${\mathfrak o}$, gives an orientation ${\mathfrak o}'$ for $\mathfrak S'$.
Assume $D$ is a stated simple ${\mathfrak o}$-ordered $\partial M$-tangle diagram which is {\em taut with respect to $c$}, i.e. $|D\cap c|=I(D,c)$. 
For each each $i=0,1,\dots, m:=|D \cap c|$ let $(\tilde D,s_i)$ be the $\partial M'$-tangle diagram where $\tilde D= \mathrm{pr}^{-1}(D)$,  and the states on both $a$ and $b$ are ${\mathfrak o}'$-increasing and having exactly $i$  minus signs. Then each $(\tilde D, s_i)$ is in the  basis  of the free $\mathcal R$-module $\mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S'))$ described in Proposition \ref{r.basis2}.

For non-negative integers $n,i$ the quantum binomial coefficient is defined by
$$ \binom ni _q = \frac{\prod_{j=n-i+1}^n (1-q^j)}{\prod_{j=1}^i (1-q^j) }.$$



\begin{proposition}\label{r.grbinom} In $\mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S'))$ one has
 \begin{equation} 
\label{eq.split2} 
\theta_c(D) = \sum_{i=0}^m \binom{m}{i}_{q^4} (\tilde D, s_i).
 \end{equation} 
\end{proposition}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord1gram}}{\raisebox{-13pt}{\incl{1.3 cm}{reord1gram}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord2grbm}}{\raisebox{-13pt}{\incl{1.3 cm}{reord1grbm}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord2grb}}{\raisebox{-13pt}{\incl{1.3 cm}{reord2grb}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord2grbm}}{\raisebox{-13pt}{\incl{1.3 cm}{reord2grbm}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord9}}{\raisebox{-13pt}{\incl{1.3 cm}{reord9}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{reord9m}}{\raisebox{-13pt}{\incl{1.3 cm}{reord9m}}}
\begin{proof} For $s: D \cap c \to \{ \pm \}$ let $(\tilde D,s)$ be the stated ${\mathfrak o}'$-ordered $\mathfrak S'$-tangle diagram with state $s$ on $a$ and $b$.
By definition,
 \begin{equation}  
\theta(D) = \sum_{s: D \cap c \to \{ \pm \} }  (\tilde D, s) \quad \in \cS(\mathfrak S').
 \end{equation}  
Taking into account the filtration, from relations \eqref{eq.order} and \eqref{eq.reor1}, we see that in $\mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S'))$,
 \begin{equation}  \label{eq.swap} \raisebox{-12pt}{\incl{1.3 cm}{reord1gra}}  = q^2 \left( \raisebox{-13pt}{\incl{1.3 cm}{reord1gram}}\right), \quad  \raisebox{-13pt}{\incl{1.3 cm}{reord2grb}} = q^2 \, \left( \raisebox{-13pt}{\incl{1.3 cm}{reord2grbm}} \right).
 \end{equation} 
It follows that $\mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S'))$ we have
 \begin{equation}  
\label{eq.switch}
\raisebox{-13pt}{\incl{1.3 cm}{reord9}} \ =\ q^4 \left (  \raisebox{-13pt}{\incl{1.3 cm}{reord9m}} 
\right).
 \end{equation} 
Suppose $s: D \cap c \to \{\pm\}$ has $i$ minus values. 
For $k=1,\dots, i$ let $x_k$ be the number of plus states (of $s$) lying below the $k$-th minus state. By doing many switches, each changing  a pair of  consecutive $(-, +)$ to $(+,-)$, we can transform $s$ into $s_i$. The number of switches is $x_1 + \dots + x_i$. Hence from \eqref{eq.switch} we see that 
$$ (\tilde D,s) = q^{4(x_1+ \dots x_i)} (\tilde D, s_i).$$
Taking the sum over all $s: D \cap c \to \{\pm\}$ with  $i$ minus values, we get
  \begin{equation}   \label{eq.fg1}
\theta(D) = \sum_{i=0}^m \left( \sum_{0\le x_1 \le \dots \le x_i \le m-i} q^{4( x_1 + \dots + x_i)}\right) \, (\tilde D, s_i) \quad \text{in} \ \mathrm{Gr}^{\{a,b\}}_{2m}(\cS(\mathfrak S')).
 \end{equation} 
By induction on $i$ one can easily prove that
 \begin{equation} 
 \sum_{0\le x_1 \le \dots \le x_i \le n} q^{4( x_1 + \dots + x_i)} =\binom {n+i}i_{q^4},
 \end{equation} 
from which and \eqref{eq.fg1} we get \eqref{eq.split2}.
\end{proof}


\subsection{The category of punctured bordered surfaces and the functor $\cS$.} \label{sec.cat1}


A {\em morphism} from  one bordered punctured surface $\mathfrak S$ to another one $\mathfrak S'$ is an isotopy  class of orientation-preserving embeddings from $\mathfrak S$ to $\mathfrak S'$. Here we  assume that the embeddings map a boundary edge of $\mathfrak S$ into (but not necessarily onto) a boundary edge of $\mathfrak S'$.

Very often we identify an embedding $f: \mathfrak S\hookrightarrow \mathfrak S'$ with its isotopy class. 


\def\mathrm{inv}{\mathrm{inv}}
\def\mathrm{id}{\mathrm{id}}
\defe_r{e_r}
\defe_l{e_l}


Suppose $f: \mathfrak S \to \mathfrak S'$ is an embedding representing a morphism from $\mathfrak S$ to $\mathfrak S'$. Define an $\mathcal R$-linear homomorphism $f_*: \cS(\mathfrak S)\to \cS(\mathfrak S')$ such that if $\alpha$ is a stated tangle diagram on $\mathfrak S$ with positive order then $f_*(\alpha)$ is given by the  stated tangle diagram $f(\alpha)$, also with positive order.
 It is clear that $f_*$ is an $\mathcal R$-linear homomorphism, and it does  not change under isotopy of $f$. 

In general $f_*$ is not an $\mathcal R$-algebra homomorphism. However, if every edge of $\mathfrak S'$ contains the image of at most one edge of $\mathfrak S$, then $f_*$ is an $\mathcal R$-algebra homomorphism.



\begin{example} {\em A bigon } is the standard closed disk in the plane with two points on its boundary removed. Suppose $a\subset \mathfrak S$ is an arc whose two end points are in distinct boundary edges $e_1$ and $e_2$, where 
\end{example}



\begin{example} Let $e$ be a boundary edge of $\mathfrak S$ and $\mathfrak S'= \mathfrak S \setminus \{v\}$, where $v \in e$. The embedding $\iota: \mathfrak S' \hookrightarrow \mathfrak S$ induces an $\mathcal R$-linear homomorphism $\iota_*: \mathscr S(\mathfrak S') \to \cS(\fS)$ which is surjective but not injective in general.
 
 
 Suppose $e'\subset e$ is one of the two boundary edges of $\mathfrak S'$ which is part of $e$. There is a diffeomorphism $g: \mathfrak S\to \mathfrak S' \setminus \{e'\}$ which is unique up to isotopy. Thus, we have a morphism $f: \mathfrak S \to \mathfrak S'$, which is the composition
 $$ \mathfrak S\overset g \longrightarrow  \mathfrak S' \setminus \{e'\} \hookrightarrow \mathfrak S'.$$
The morphism $f$ induces an injective (but not surjective) algebra morphism $f_*: \cS(\fS) \hookrightarrow \mathscr S(\mathfrak S')$. 
\end{example}


\def{\vec \mu}{{\vec \mu}}
\def{\vec\nu}{{\vec\nu}}
\def{\vec \eta}{{\vec \eta}}



\section{Hopf algebra structure of the bigon and ${\mathcal O}_{q^2}(\mathrm{SL}(2))$} \label{sec:bigon}

We will define using geometric terms a  \red{dual quasitriangular (a.k.a. cobraided)} Hopf algebra structure on the stated skein algebra $\mathscr S(\mathcal B)$ of the bigon $\mathcal B$ and then show that it is naturally isomorphic to the \red{dual quasitriangular} Hopf algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. We also show simple pictures of the canonical basis of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, and discuss the Jones-Wenzl idempotents in $\mathscr S(\mathcal B)$. In this section $\mathcal R=\mathbb Z[q^{\pm 1/2}]$ unless otherwise stated.


\def\raisebox{-13pt}{\incl{1.3 cm}{monogon}}{\raisebox{-13pt}{\incl{1.3 cm}{monogon}}}
\def\raisebox{-13pt}{\incl{1.3 cm}{monogona}}{\raisebox{-13pt}{\incl{1.3 cm}{monogona}}}
\subsection{Monogon and Bigon}\label{sub:monogon} Let $D$ be the standard disk
$$ D = \{ (x,y) \in \mathrm{BR}^2 \mid x^2 + y^2 \le 1\}$$
and $v_1=(0,-1)$ and $v_2 = (0,1)$ are two points on the circle $\partial D$. The punctured bordered surface $\mathcal M= D\setminus \{v_1\}$ is called the {\em monogon}, and 
 $\mathcal B= D\setminus \{v_1, v_2\}$ is called the {\em bigon}. Let $e_l, e_r$ be the two  boundary edges of $\mathcal B$ as depicted in Figure \ref{fig:bigon0}. For ${\vec \mu}=(\mu_1, \dots, \mu_k)$ and ${\vec \eta}=(\eta_1,\dots,\eta_k)$ in $\{\pm\}^k$ let $\alpha_{{\vec \eta}{\vec \mu}}\in \cS(\mathfrak B)$ be the element presented by $k$ parallel arcs as in Figure  \ref{fig:bigon0}, with $(\eta_1,\dots,\eta_k)$ being the states on $e_l$ in increasing order and $(\mu_1, \dots, \mu_k)$ being the states on $e_r$ in increasing order.

\FIGc{bigon0}{Monogon, bigon with its edges $e_l$ and $e_r$, elements $\alpha_{+-}$ and  $\alpha_{{\vec \eta}{\vec \mu}}$. Note that for $\alpha_{{\vec \eta}{\vec \mu}}$ the height order is indicated by the arrows.}{2.6cm}
We have $\cS(\mathcal M)=\mathcal R$. 
\red{Moreover, one has



 \begin{equation}  \raisebox{-13pt}{\incl{1.3 cm}{monogon}} =  \raisebox{-13pt}{\incl{1.3 cm}{monogona}}
\label{eq.mon0}
 \end{equation} 
Here the circle enclosing $x$ and two vertical lines attaching to it stand for a stated $\partial \fS$-tangle diagram. The proof follows by using the skein relation \eqref{eq.skein}, then the loop relation \eqref{eq.loop}, and finally the arc relation \eqref{eq.arcs} to reduce $x$ to a scalar.
}



We study the algebra $\cS(\mathcal B)$ in this section.
\def\mathrm{rot}{\mathrm{rot}}
 Let $\mathrm{rot}: \mathcal B\to \mathcal B$ be the rotation (of the plane containing $\mathcal B$) by $180^o$ about the center of $\mathcal B$, which is a self-diffeomorphism  of $\mathcal B$ and induces an $\mathcal R$-algebra involution
  \begin{equation}  
 \mathrm{rot}_*: \cS(\mathcal B) \to \cS(\mathcal B).
 \label{def.rot}
  \end{equation} 


\subsection{Coproduct}
Suppose $e$ is a boundary edge of a punctured bordered surface  $\mathfrak S$. Let $\mathfrak S'$ be the result of cutting out of $\mathfrak S$ a bigon $\mathcal B$ whose right edge $e_r$ is identified with $e$.
Since $\mathfrak S'$ is canonically isomorphic to $\mathfrak S$ in the category of punctured bordered surfaces, we will identify $\cS(\mathfrak S)$ with $\cS(\mathfrak S')$.
 The splitting homomorphism gives  an injective algebra homomorphism 
 $$\cS(\mathfrak S')  \hookrightarrow \cS(\mathfrak S\sqcup \mathfrak B) \equiv  \cS(\mathfrak S) \otimes _\mathcal R \cS(\mathcal B).$$ Since we identify $\cS(\mathfrak S)$ with $\cS(\mathfrak S')$, this map becomes an $\mathcal R$-algebra homomorphism 
 \begin{equation}  \label{eq.comodule}
  \Delta_e: \cS(\mathfrak S)   \hookrightarrow \cS(\mathfrak S) \otimes _\mathcal R \cS(\mathcal B). \end{equation} 
  \FIGc{split1}{The coaction $\Delta_e$.}{2.5cm}

Suppose $x\in B(\mathfrak S, {\mathfrak o})$ is a basis element, where ${\mathfrak o}$ is a given orientation of $\partial \mathfrak S$. Assume the state of $x$ on $e$ is ${\vec \mu}$, then we have (see Figure \ref{fig:split1}):
 \begin{equation} 
\Delta_e(x) = \sum_{{\vec \eta}  \in S_{x\cap e}} x_{\vec \eta} \otimes\,  \alpha_{{\vec \eta}{\vec \mu}}, \label{eq.coact}
 \end{equation}  
where $S_{x \cap e}$ is the set of all states of $x\cap e$ and $x_{\vec \eta}$ is $x$ with the state on $e$ switched to ${\vec \eta}$. 



  
  
  
  
  
In particular, when $\mathfrak S=\mathcal B$ and $e=e_r$, we get an $\mathcal R$-algebra homomorphism $\Delta= \Delta_{e_r}$,
 \begin{equation}  
\Delta: \cS(\mathcal B) \to \cS(\mathcal B) \otimes_ R \cS(\mathcal B).
 \end{equation} 

Theorem \ref{thm.1a}(c) implies that  $\Delta$ is coassociative, i.e.
 \begin{equation}  
(\Delta \otimes \mathrm{id}) \Delta = (\mathrm{id} \otimes \Delta ) \Delta.
 \end{equation} 

Applying \eqref{eq.coact} to $x=\alpha_{\nu\mu}$ with $\nu,\mu\in \{\pm\}$, we get
 \begin{equation}  
\label{eq.coproduct1}
\Delta(\alpha_{\nu\mu} )= \sum _{\eta\in \{\pm \}} \alpha_{\nu\eta} \otimes \alpha_{\eta \mu}.
 \end{equation} 
\subsection{Presentation of $\cS(\mathcal B)$} A presentation of the algebra $\cS(\mathcal B)$ was given in \cite{Le:TDEC}. We give here a presentation of $\cS(\mathcal B)$ in a form which is suitable for us. Recall that $C(\eta)= C^{\bar \eta}_{ \eta}$ for $\eta\in \{\pm \}$ were defined by \eqref{eq.Cve}. We form the following matrix

 \begin{equation}   C:= \begin{pmatrix}
C^+_+ & C^+_- \\ C^-_+ & C^-_-
\end{pmatrix} = \begin{pmatrix}
0 & q^{-1/2} \\ -q^{-5/2} & 0
\end{pmatrix}
 \end{equation}  




\def\raisebox{-18pt}{\incl{1.5 cm}{antipode}}{\raisebox{-18pt}{\incl{1.5 cm}{antipode}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{ap2}}{\raisebox{-18pt}{\incl{1.5 cm}{ap2}}}




\begin{lemma}\label{lem:relations}
The $\mathcal R$-algebra $\cS(\mathfrak B)$ is generated by $\{\alpha_{\nu,\mu} \mid \nu,\mu\in \{\pm\}\}$ with the following relations: 
\begin{align}
C &= A^t C A   \label{eq.rel1a}\\
C&= A C A^t, \label{eq.rel2a}
\end{align}
where $A^t$ is the transpose of $A$ and
$$ A := \begin{pmatrix}
\alpha_{++} & \alpha_{+-} \\ \alpha_{-+} & \alpha_{--}
\end{pmatrix}.
$$





\end{lemma}
\begin{proof} Explicitly, the relations \eqref{eq.rel1a} and  \eqref{eq.rel2a} are respectively
\begin{align}
C^{\nu}_{\mu}\cdot 1& = \sum_{\eta\in \{ \pm \}} C(\bar\eta) \alpha_{\eta \nu} \alpha_{\bar\eta \mu}= C^{+}_-\alpha_{+\nu}\alpha_{-\mu}+C^{-}_+\alpha_{-\nu}\alpha_{+\mu} \qquad \forall \nu,\mu\in \{\pm\}\label{eq.relations1}\\
C^{\nu}_{\mu}\cdot 1&=  \sum_{\eta\in \{ \pm \}} C(\bar \eta) \alpha_{\nu \eta } \alpha_{\mu\bar\eta }= C^{+}_-\alpha_{\nu+}\alpha_{\mu-}+C^{-}_+\alpha_{\nu-}\alpha_{\mu+}\qquad \forall \nu,\mu\in \{\pm\}\label{eq.relations2}.
\end{align}


Let $e$ be the only boundary edge of the monogon $\mathcal M$. Because $\cS(\mathcal M)= \mathcal R$ and $\mathcal R \otimes \cS(\mathcal B)= \cS(\mathcal B)$, the $\mathcal R$-algebra map $\Delta_e: \cS(\mathcal M) \to \cS(\mathcal M) \otimes_{\mathcal R} \cS(\mathcal B)$ is an $\mathcal R$-algebra map $\Delta_e: \mathcal R \to \cS(\mathcal B)$. As any $\mathcal R$-linear map, we must have $\Delta_e(c)= c \cdot 1$, where $1$ is the unit of $\cS(\mathcal B)$. Apply $\Delta_e$ to the simple arc in the monogon whose endpoints are stated by $\nu$ and $\mu$ and we get a 
 proof of \eqref{eq.relations1} as follows:
$$ C^\nu_\mu= \raisebox{-18pt}{\incl{1.5 cm}{antipode}} \overset {\Delta_e} \longrightarrow \sum_{\eta, \eta'\in \{\pm \}} \raisebox{-18pt}{\incl{1.5 cm}{ap2}}=  \sum_{\eta\in \{ \pm \}} C(\bar\eta) \alpha_{\eta \nu} \alpha_{\bar\eta \mu}.$$
Equation \eqref{eq.relations2} is obtained from Equation \eqref{eq.relations1} by applying the map $\mathrm{rot}_*$ of \eqref{def.rot}.

Using  Theorem \ref{thm.basis1a} one sees that the set
 \begin{equation}   B=  \{ \alpha_{++}^h\alpha_{-+}^k\alpha_{--}^l    \mid h,k,l\in \mathbb N\} \cup \{ \alpha_{++}^h\alpha_{+-}^k\alpha_{--}^l \mid h,k,l\in \mathbb{N}, k \ge 1\}
\label{eq.basis}
 \end{equation} 
is an $\mathcal R$-basis of $\cS(\mathcal B)$. In particular, $\cS(\mathcal B)$ is generated by $\alpha_{\nu\mu}$ with $\nu,\mu\in \{\pm \}$.


Using these relations it is easy to check that any monomial in the $\alpha_{\nu\mu}$ can be expressed as an $\mathcal R$-linear combinations of   $B$. The proposition follows.
\end{proof}



\subsection{Counit} 
 The embedding $\iota: \mathcal B \hookrightarrow \mathcal M$ gives rise to an $\mathcal R$-linear map $\iota_*: \cS(\mathcal B) \to \cS(\mathcal M)=\mathcal R$. Define $\epsilon: \cS(\mathcal B) \to \mathcal R$ as the composition $\epsilon= \iota_* \circ \mathrm{inv}_{e_r}$, 
$$ \epsilon: \cS(\mathcal B) \overset {\mathrm{inv}_{e_r}} \longrightarrow \cS(\mathcal B) \overset {\iota_*} \longrightarrow \cS(\mathcal M)=\mathcal R,$$
where $\mathrm{inv}_{e_r}$ is defined in Section \ref{sec.invers}.
Explicitly, if $\alpha$ is a  stated $\partial \mathcal B$-tangle diagram as in Figure \ref{fig:counit}, then
 \begin{equation}   \epsilon(\alpha) = C_{e_r}(\alpha) \, \alpha',
\label{eq.counit}
 \end{equation} 
where $\alpha'$ is described in Figure \ref{fig:counit} and  $C_{e_r}(\alpha)$ is defined by \eqref{eq.Ce}.

\FIGc{counit}{How to obtain $\alpha'$ and $\alpha''$ from $\alpha$ in the definition of counit and antipode. Height order  is  indicated by the arrows on the boundary edges. Then $\alpha'$ is the same $\alpha$, but considered as a tangle diagram in $\mathcal M$ with  its states on the edge $e_r$ switched from $\nu$ to $\bar \nu =-\nu$. And $\alpha''$ is obtained from $\alpha$ by a rotation of $180^o$, and switching all the states $\nu$ to $\bar \nu$.
 }{4cm}

Using \eqref{eq.counit} and the values of $C(\eta)$, one can check that 
 \begin{equation} 
\label{eq.counit1} 
\epsilon(\alpha_{\nu\mu}) = \delta_{\nu\mu}: = \begin{cases} 1 \quad &\text{if} \ \nu=\mu \\
0 &\text{if} \ \nu\neq \mu \end{cases}.
 \end{equation} 




\def\raisebox{-18pt}{\incl{1.5 cm}{counit3}}{\raisebox{-18pt}{\incl{1.5 cm}{counit3}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{counit4}}{\raisebox{-18pt}{\incl{1.5 cm}{counit4}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{counit5}}{\raisebox{-18pt}{\incl{1.5 cm}{counit5}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{counitx}}{\raisebox{-18pt}{\incl{1.5 cm}{counitx}}}
\def\raisebox{-18pt}{\incl{1.5 cm}{counity}}{\raisebox{-18pt}{\incl{1.5 cm}{counity}}}


\begin{proposition} The algebra $\cS(\mathcal B)$ is a bialgebra with  counit $\epsilon$ and coproduct $\Delta$.



\end{proposition}

\begin{proof} We already saw that $\Delta$ is an algebra homomorphism and is associative.
It remains to show that $\epsilon$ is an algebra homomorphism, and 
 \begin{equation} 
\label{eq.coco}
(\epsilon \otimes \mathrm{id} ) \circ \Delta(x) =x =  (\mathrm{id} \otimes \epsilon  ) \circ \Delta(x).
 \end{equation} 
Let $x, y\in \cS(\mathcal B)$ be presented by  tangle diagrams schematically depicted as in Figure \ref{fig:counit2}. 
\FIGc{counit2}{Elements $x,y\in \cS(\mathcal B)$. Each horizontal strand stands for several horizontal lines which are tangled in the two small disks.}{1.6cm}

The following shows that $\epsilon(xy)= \epsilon(x)\epsilon(y)$, i.e. $\epsilon$ is an algebra homomorphism:
$$ \epsilon(xy)=  \epsilon\left(  \raisebox{-18pt}{\incl{1.5 cm}{counit3}}  \right) = 
C_{e_r}(x)\, C_{e_r}(y) \raisebox{-18pt}{\incl{1.5 cm}{counit4}} 
= C_{e_r}(x)\, C_{e_r}(y) \raisebox{-18pt}{\incl{1.5 cm}{counity}} \, \raisebox{-18pt}{\incl{1.5 cm}{counitx}} \, 
= \epsilon(y) \epsilon(x). $$
Here we use equality \eqref{eq.mon0} in the third identity.


As both $\Delta$ and $\epsilon$ are algebra homomorphisms, one only needs to check \eqref{eq.coco} for the generators $x=\alpha_{\nu\mu}$ with $\nu,\mu\in \{\pm \}$. Using \eqref{eq.coproduct1} and \eqref{eq.counit1}, we have
$$ (\epsilon \otimes \mathrm{id} ) \circ \Delta(\alpha_{\nu\mu}) =  (\epsilon \otimes \mathrm{id} )  \sum_\eta \alpha_{\nu\eta} \otimes \alpha_{\eta\mu} = \alpha_{\nu\mu},$$
which proves the first identity of \eqref{eq.coco}. The other identity is proved similarly.
\end{proof}

\subsection{Antipode} \label{sec:antipode}
 Define 
$ S: \cS(\mathcal B) \to \cS(\mathcal B)$, \text{by} $S:= \mathrm{rot}_* \circ ( \mathrm{inv}_{e_r} \circ (\overline{\inv} _{e_l})^{-1}),$ where $\mathrm{inv}$ and $\overline{\inv}$ are defined in Subsection \ref{sec.invers}.
Explicitly, if $\alpha$ is a  stated $\partial \mathcal B$-tangle diagram as in Figure \ref{fig:counit}, then
 \begin{equation}   S(\alpha) = \frac{C_{e_r}(\alpha) }{ C_{e_l}(\alpha)} \, \alpha'',
\label{eq.antipode}
 \end{equation} 
where $\alpha''$ is described in Figure \ref{fig:counit}. In particular, we have
\begin{equation}
S(\alpha_{\nu\mu}) = \frac{C( \mu)}{C( \nu)} \alpha_{\bar \mu \bar \nu} \label{eq.ap1}.
\end{equation}
Explicitly,
 \begin{equation}  
S(\alpha_{++}) = \alpha_{--}, \ S(\alpha_{--})= \alpha_{++}, \ S(\alpha_{+-}) = -q^{2}\alpha_{+-}, \ S(\alpha_{-+}) = -q^{-2} \alpha_{-+}.
 \end{equation} 


\begin{proposition}
The map $S$ is an antipode of the bialgebra $\cS(\mathcal B)$, making $\cS(\mathcal B)$ a Hopf algebra.
\end{proposition}
\begin{proof}
From the definition \eqref{eq.antipode} one  sees that $S$ is an anti-homomorphism, i.e.
$$S(xy)= S(y) S(x).$$
It remains to check the following property of an antipode:
 \begin{equation} 
\label{eq.ap}
\sum  S(x') x'' = \epsilon(x) 1 = \sum  x' S(x'') ,
 \end{equation} 
where we use the Sweedler's notation for the coproduct $\Delta x = \sum x' \otimes x''$.
Since $S$ is an anti-homomorphism and $\epsilon$ is an algebra homomorphism, it is enough to check \eqref{eq.ap} for generators $x= \alpha_{\nu\mu}$. In that case, using  \eqref{eq.coproduct1} we have
$ \Delta(x)=  \Delta(\alpha_{\nu\mu})=\sum_\eta \alpha_{\nu\eta} \otimes \alpha_{\eta\mu}$, and
\begin{align*}
 \sum S(x') x''&= \sum_{\eta\in \{\pm \}}  S(\alpha_{ \nu \eta})  \alpha_{\eta\mu}\\
& = \sum_{\eta\in \{\pm \}} \frac{C(\eta)}{C(\nu)} \alpha_{\bar \eta \bar \nu}  \alpha_{\eta\mu} \quad \text{by  \eqref{eq.ap1}}\\
&= \frac{C^{\bar \nu}_ \mu \cdot 1 }{C(\nu)} \quad \text{by  \eqref{eq.relations1}}\\
&= \delta_{\nu\mu} \cdot 1 = \epsilon(\alpha_{\nu\mu}) \cdot 1 \quad \text{by definition of $C(\nu)$ and  \eqref{eq.counit1}},
\end{align*}
which proves the first identity of \eqref{eq.ap1}. The second identity of \eqref{eq.ap1} is proved similarly.
\end{proof}





\subsection{Quantum algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$}
Let us recall the definition of the  quantum coordinate ring ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ of $\mathrm{SL}_2(\mathbb C)$, which is the Hopf dual of the quantum group
$U_{q^2}(\mathfrak{sl}_2)$. See \cite{MajidFoundation}.
\begin{definition}[${\mathcal O}_{q^2}(\mathrm{SL}(2))$]
The Hopf algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ is the $\mathcal R$-algebra generated by $a,b,c,d$ with 
relations 
\begin{align}  ca& =q^2ac, \ db=q^2bd, \ ba=q^2ab,\ dc=q^2cd, \label{eq.rel1} \\
 bc& =cb,  \ ad-q^{-2}bc=1  \ {\rm and} \  da - q^2cb=1 \label{eq.rel2}.
\end{align}
Its coproduct structure is given by
 $$\Delta(a)=a\otimes a+b\otimes c,\qquad \Delta(b)=a\otimes b+b\otimes d,
\qquad \Delta(c)=c\otimes a+d\otimes c, \qquad\Delta(d)=c\otimes b+d\otimes d.$$ 
Its counit is defined as $\epsilon(a)=\epsilon(d)=1,\epsilon(b)=\epsilon(c)=0$
 and its antipode is defined by $S(a)=d,S(d)=a,S(b)=-q^2 b,S(c)=-q^{-2} c$.
\end{definition}
\begin{theorem}\label{teo:SL2}
There exists a Hopf algebra isomorphism $\phi: \cS(\mathcal B) \to {\mathcal O}_{q^2}(\mathrm{SL}(2))$
given on the generators by 
 \begin{equation}  \phi(\alpha_{+,+})=a,\qquad \phi(\alpha_{+,-})=b,\qquad\phi(\alpha_{-,+})=c,\qquad\phi(\alpha_{-,-})=d.
\label{eq.def1}
 \end{equation} 
Furthermore, 
\red{
under the identification of $\cS(\mathcal B)$ with $ {\mathcal O}_{q^2}(\mathrm{SL}(2))$ via the isomorphism $\phi$, the involution $\mathrm{rot}_*: \cS(\mathcal B)\to \cS(\mathcal B)$,  given by the rotation of $180^{\circ}$ around the center of the bigon (see \eqref{def.rot}), becomes the $\mathcal R$-algebra involution $r:{\mathcal O}_{q^2}(\mathrm{SL}(2))\to {\mathcal O}_{q^2}(\mathrm{SL}(2))$ given by
 $r(a)=a,r(b)=c,r(c)=b, r(d)=d$. Moreover, $r$ is a co-algebra antimorphism, i.e. 
 $$(r\otimes r) \circ \Delta^{op}=\Delta\circ r.$$  
 }
\end{theorem}
\begin{proof}\red{By Lemma \ref{lem:relations}, the $\mathcal R$-algebra $\cS(\mathcal B)$ is generated by $\alpha_{\pm\pm}$ with relations \eqref{eq.rel1a} and \eqref{eq.rel2a}. Under the assignment $\phi$ given 
on generators $\alpha_{\pm\pm}$
by \eqref{eq.def1}, 
the matrix relations \eqref{eq.rel1a} and \eqref{eq.rel2a} become respectively
\begin{align}  ca&= q^2 ac ,\  db= q^2 bd,\  ad- q^{-2} cb=1,\  da -q^2 bc=1 \label{eq.rel1as} \\
ba&= q^2 ab,\  dc= q^2 cd,\  ad- q^{-2} bc=1,\ da - q^2 cb=1 \label{eq.rel1bs}
\end{align}
Each of these identities is a consequence of the relations in \eqref{eq.rel1} and \eqref{eq.rel2}. Conversely, all the relations in \eqref{eq.rel1} and \eqref{eq.rel2}, except for $bc=cb$, are among the identities  \eqref{eq.rel1as} and \eqref{eq.rel1bs}. The remaining relation $bc=cb$ is obtained by taking the difference between the last identity of \eqref{eq.rel1as} and the last identity of \eqref{eq.rel1bs}. Hence $\phi$ is an $\mathcal R$-algebra isomorphism.
}


To check that $\phi$ is a Hopf algebra isomorphism it is sufficient to check this on the level of generators where it is straightforward. 

The last statement is a direct verification.
\end{proof}



\subsection{Geometric depiction of co-$R$-matrix, a lift of the co-$R$-matrix} The Hopf algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ is \red{\em ``dual quasitriangular'' (see  \cite{MajidFoundation} Section 2.2) or ``cobraided'' (see e.g. \cite{Kassel}, Section VIII.5)} , i.e. it has a co-$R$-matrix with the help of which one can make the category of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-modules a braided category. Formally, a {\em co-$R$-matrix}  is a bilinear form 
$$ \rho : {\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to \mathcal R$$ such that there exists another bilinear form $\bar \rho: 
{\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to \mathcal R$ (the ``inverse" of $\rho$)
satisfying for any $x,y,z\in U$,
\begin{align}
\sum \rho (x' \otimes y') \bar \rho (x'' \otimes y'')&= \sum \bar \rho (x' \otimes y') \rho (x'' \otimes y'')= \epsilon (x) \epsilon(y) \\
\sum \rho (x''\otimes y'') y'x'  &= \sum \rho (x'\otimes y') x'' y''     \label{eq.rflip}\\
\rho (xy \otimes z)& = \sum \rho (x' \otimes z') \rho  (y'' \otimes z'') \epsilon(x'') \epsilon (y')  
\label{eq.cobraid3}\\
\rho (x \otimes y z)& = \sum \rho  (x' \otimes z') \rho (x'' \otimes y'') \epsilon(z'') \epsilon (y') 
\label{eq.cobraid4}
\end{align}
Here we use Sweedler's notation for the coproduct.
Relations \eqref{eq.cobraid3} and \eqref{eq.cobraid4} show that $\rho$ is totally determined by  its values at a set of generators of the algebra ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, and the values $\rho$ at a set of generators are given by (see \cite{Kassel})
 \begin{equation}  
\rho \begin{pmatrix}
a\otimes a & b \otimes b & a\otimes b & b \otimes a \\
c\otimes c & d \otimes d & c \otimes d & d \otimes c\\
a\otimes c & b \otimes d & a \otimes d & b \otimes c\\
c\otimes a & d \otimes b & c \otimes b & d \otimes a
\end{pmatrix} = 
\begin{pmatrix}
q & 0 & 0 & 0 \\
0 & q & 0 & 0\\
0 & 0 & q^{-1} & q - q^{-3}\\
0 & 0 & 0 & q^{-1}
\end{pmatrix}   \label{eq.cobraid0}
 \end{equation} 
 
 
 
\def\letterx{  \raisebox{-9pt}{\incl{.9 cm}{x}} } 
\def  \raisebox{-9pt}{\incl{.9 cm}{y}} {  \raisebox{-9pt}{\incl{.9 cm}{y}} }
\def  \raisebox{-9pt}{\incl{.9 cm}{xy}} {  \raisebox{-9pt}{\incl{.9 cm}{xy}} }
\def  \raisebox{-9pt}{\incl{.9 cm}{xybar}} {  \raisebox{-9pt}{\incl{.9 cm}{xybar}} }
\def  \raisebox{-9pt}{\incl{.9 cm}{yxbar}} {  \raisebox{-9pt}{\incl{.9 cm}{yxbar}} }
\def\letterxyz{  \raisebox{-10pt}{\incl{1 cm}{xyz}} } 
\def\xyzp{  \raisebox{-10pt}{\incl{1 cm}{xyzp}} } 
\def\xyzpp{  \raisebox{-10pt}{\incl{1 cm}{xyzpp}} } 
\def  \raisebox{-10pt}{\incl{1 cm}{bc}} {  \raisebox{-10pt}{\incl{1 cm}{bc}} }
\def  \raisebox{-10pt}{\incl{1 cm}{bcp}} {  \raisebox{-10pt}{\incl{1 cm}{bcp}} }
\def  \raisebox{-10pt}{\incl{1 cm}{bcpp}} {  \raisebox{-10pt}{\incl{1 cm}{bcpp}} }
\def\partial \cB{\partial \mathcal B}
 
 \begin{theorem}\label{teo:cobraid} Under the identification of $\mathscr S(\mathcal B)$ and ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ via the isomorphism $\phi$,
 the co-$R$-matrix $\rho$ and its inverse $\bar \rho$  have the following geometric description
 \begin{align}
 \rho \left (\letterx  \otimes   \raisebox{-9pt}{\incl{.9 cm}{y}}  \right) & = \epsilon \left(    \raisebox{-9pt}{\incl{.9 cm}{xy}}  \right)  \label{eq.cobraid} 
 \\
  \bar \rho \left (\letterx  \otimes   \raisebox{-9pt}{\incl{.9 cm}{y}}  \right) & = \epsilon \left(    \raisebox{-9pt}{\incl{.9 cm}{xybar}}  \right). \label{eq.cobraid2}
\end{align}   
 \red{Here a circle enclosing $x$ and two lines adjacent to the circle stand for a stated $\partial \cB$-tangle diagram, also denoted by $x$. The left hand side of \eqref{eq.cobraid} stands for $\rho(x\otimes y)$. }
 \end{theorem}
 \begin{proof}
 Let $\rho'$ be the map defined by the r.h.s. of \eqref{eq.cobraid}: we will show that $\rho'=\rho$. For this it is enough to show that $\rho'$ satisfies \eqref{eq.cobraid3}, \eqref{eq.cobraid4}, and the initial values identity \eqref{eq.cobraid0}, all with $\rho$ replaced by $\rho'$. 
We have, \red{where a line labeled by, say $x$, stands for the stated $\partial \cB$-tangle diagram $x$},
$$\rho'(xy \otimes z)= \epsilon \left(\letterxyz   \right)$$
Split the bigon by the vertical middle ideal arc, then use the fact that $\epsilon(u) =\sum \epsilon(u') \epsilon(u'')$ (in any Hopf algebra) where $\Delta(u)= \sum u' \otimes u''$, we have
\begin{align*}
&= \sum \epsilon \left(\xyzp   \right) \epsilon \left(\xyzpp   \right)   \\
&= \sum \rho  (x' \otimes z') \rho  (y'' \otimes z'') \epsilon(x'') \epsilon (y'). 
\end{align*}
This proves \eqref{eq.cobraid3} for $\rho'$. The proof of \eqref{eq.cobraid4} is similar.

To check \eqref{eq.cobraid0} we have to check 16 identities, all of which are easy. For example, the most difficult one is the identity of the $(3,4)$ entries:
\begin{align*}
\rho'(b\otimes c) &= \epsilon \left(   \raisebox{-10pt}{\incl{1 cm}{bc}}  \right) = q \, \epsilon \left(   \raisebox{-10pt}{\incl{1 cm}{bcp}}  \right) + q^{-1} \, \epsilon \left(   \raisebox{-10pt}{\incl{1 cm}{bcpp}}  \right)  \\
&= q - q^{-3} \qquad \text{by \eqref{eq.counit1} and \eqref{eq.arcs2}}. \ 
\end{align*}
 This proves \eqref{eq.cobraid0} for  the $(3,4)$ entries. Identity \eqref{eq.cobraid0} for  other entries are similar.
 \end{proof}
 
\begin{remark}\label{rem:rhoprime} \red{The bilinear form $ \rho':  {\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to \mathcal R$ defined by
 \begin{equation}  
 \rho'(x \otimes y) := \bar \rho(y \otimes x) =  \epsilon \left(    \raisebox{-9pt}{\incl{.9 cm}{yxbar}}  \right) \label{eq.coR2}
 \end{equation} 
gives a new co-$R$-matrix for ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, which is the mirror reflection of $\rho$.}
\end{remark}

\subsection{The Jones-Wenzl idempotents as elements of the bigon algebra}\label{sub:joneswenzl}
\red{
In this subsection we will work over the ring $\mathcal R^{loc}$ obtained by localizing $\mathcal R$ over the multiplicative set generated by $\{[n]=\frac{q^{2n}-q^{-2n}}{q^2-q^{-2}}, n\geq 1\}$.
Recall that the $n^{th}$ Temperely-Lieb algebra $T_n$ (see e.g. \cite{Tu:Book}) is the $\mathcal R^{loc}$-algebra generated by non-stated simple $(n,n)$-tangle diagrams in $\mathfrak B$ modulo isotopy (rel to the boundary) and relation \eqref{eq.loop}. The product is obtained by concatenating horizontally. 
\begin{figure}[hbtp!]
 \includegraphics[width=2cm]{Temperley1-new.eps} \includegraphics[width=2cm]{Temperley2-new.eps}
\caption{On the left the unit of $T_5$. On the right an element 
of $T_5$.}\label{fig:temperely}
\end{figure}

A $\mathcal R^{loc}$-basis of $T_n$ is given by simple $(n,n)$-tangle diagrams without closed components; 
define $\epsilon:T_n\to \mathcal R^{loc}$ be the dual of the element $1$ with respect to this basis. 
The $n^{th}$ Jones-Wenzl idempotent is an element $JW_n\in T_n$ defined by recursion as explained in Figure \ref{fig:joneswenzl}.
\begin{figure}[hbtp!]
\raisebox{-1.3cm}{\includegraphics[width=2cm]{JonesWenzlleft-new.eps}}\ =\ \raisebox{-1.3cm}{\includegraphics[width=2cm]{JonesWenzlright1-new.eps}}$+\frac{[n-1]}{[n]}$ \raisebox{-1.3cm}{\includegraphics[width=2cm]{JonesWenzlright2-new.eps}}
\caption{The recursion relation for $JW_n\in T_n$. By definition $JW_1=1\in T_1$.}\label{fig:joneswenzl}
\end{figure}

The following is the key property of the $JW_n$, see e.g. \cite{Tu:Book}.
\begin{proposition}\label{prop:joneswenzlproperties} One has $\epsilon(JW_n)= 1$. 
For all $x\in T_n$, 
it holds $JW_n  x=x JW_n=\epsilon(x)JW_n$. In particular $JW_n^2=JW_n$.
\end{proposition}
For a simple $(n,n)$-tangle diagram $x\in T_n$ and $\vec{\mu_l},\vec{\mu_r} \in \{\pm \}^n$ let $x(\vec{\mu_l},\vec{\mu_r})$ be the stated $\partial \cB$-tangle diagram which is $x$ with states $\vec{\mu_l}$ on $e_l$ and states $\vec{\mu_r}$ on $e_r$, and the height order on each of $e_l$ and $e_r$ is from bottom to top. By linearity, for  $y\in T_n$, we define  $y(\vec{\mu_l},\vec{\mu_r})$. This is well-defined since \eqref{eq.loop} is part of the defining relations of stated skein algebra. Thus, if $y$ is trivial $(n,n)$-tangle diagram, then $y({\vec \eta}, {\vec \mu})$ is the element $\alpha_{{\vec \eta} {\vec \mu}}$ described in Figure \ref{fig:bigon8}.
\begin{example}\label{ex:joneswenzl} If all the components of ${\vec \eta}$ are the same and all the components of ${\vec \mu}$ are the same, then 
$JW_n({\vec \eta}, {\vec \mu})= \alpha_{{\vec \eta} {\vec \mu}}$.
 Indeed $JW_n$ is equal to trivial $(n,n)$-tangle diagram plus the linear combination of diagrams each contains an arc whose endpoints are both in $e_l$ or in $e_r$; such an arc is 0 by \eqref{eq.arcs}.
\end{example}
\begin{proposition}\label{prop:joneswenzl} For ${\vec \mu}\in \{\pm\}^n$ let $o({\vec \mu})$  be obtained by reordering increasingly the states of ${\vec \mu}$ and $no(\vec{\mu})$ is the minimal number of exchanges needed to do so. Then
\begin{align} JW(\vec{\mu_l},\vec{\mu_r}) &=q^{2\ no(\vec{\mu_l})+2\ no(\vec{\mu_r})} JW(o(\vec{\mu_l}),o(\vec{\mu_r})) \\
\Delta(JW(\vec{\mu_l},\vec{\mu_r}))&=\sum_{j=0}^n \binom{n}{j}_{q^4} JW(\vec{\mu_l},\vec{\eta_j})\otimes JW(\vec{\eta_j},\vec{\mu_r}),
\end{align}
where $\vec{\eta_j}$ is the increasing state containing $j$ signs $+$ and $n-j$ signs $-$.
\end{proposition}


}


\begin{proof}
Observe that if one exchanges a sign $-$ and a $+$ which are not in the increasing order along $e_r$ then by \eqref{eq.order} one gets $q^2$ times the reordered term and $q^{\frac{1}{2}}$ times a term killed by $JW_n$. Since a similar argument (using Lemma \ref{r.refl}) shows that each reordering along $e_l$ multiplies $JW$ by $q^2$,  the first statement follows. 
The second statement is a consequence of the fact that $JW_n^2=JW$ in $T_n$  and Proposition \ref{r.grbinom}. 
\end{proof}






\defB_{\mathrm{can} }{B_{\mathrm{can} }}
\subsection{Kashiwara's basis for ${\mathcal O}_{q^2}(\mathrm{SL}(2))$}
\red{
 We will see that the celebrated Kashiwara canonical basis of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, see \cite{Ka}, is the geometrically defined basis $B(\mathcal B,{\mathfrak o}_+)$ of Theorem \ref{thm.basis1a}, up to powers of $q$. Here ${\mathfrak o}_+$ is the positive orientation of the boundary $\partial \cB$ of the bigon $\mathcal B$.

\FIGc{bigon8}{Elements $\beta_{{\vec \eta} {\vec \mu}}$ (left) and $\beta'_{{\vec \eta} {\vec \mu}}$ (right) with ${\vec \eta}=(-,+,+)$ and ${\vec \mu}=(--+)$; the difference is the direction of the left edge.}{2cm}

First recall $B(\mathcal B,{\mathfrak o}_+)$. For sequences ${\vec \eta},{\vec \mu} \in \{\pm \}^n$
 let $\beta_{{\vec \eta},{\vec \mu}}$ be the stated $\partial \cB$-tangle diagram consisting of $n$ horizontal arcs and stated by ${\vec \eta}$ on the left edge and ${\vec \mu}$ on the right edge, with height order given by ${\mathfrak o}_+$; see 
 Figure \ref{fig:bigon8}. 
Then 
 $$ B(\mathcal B,{\mathfrak o}_+)= \{ \beta_{{\vec \eta},{\vec \mu}} \mid {\vec \eta}, {\vec \mu}  \text{ are increasing}\}.$$
Let $\beta'_{{\vec \eta},{\vec \mu}}$ be the same $\beta_{{\vec \eta},{\vec \mu}}$ with reverse height order on the left edge, see Figure \ref{fig:bigon8}. Define
$$ B_{\mathrm{can} }:= \{ \beta'_{{\vec \eta},{\vec \mu}} \mid  \beta_{{\vec \eta},{\vec \mu}} \in B(\mathcal B;{\mathfrak o}_+) \}
=\{ \alpha_{{\vec \eta},{\vec \mu}} \mid {\vec \eta} \text{ is decreasing}, {\vec \nu} \text{ is increasing}.\}
 .$$
 Here $\alpha_{{\vec \eta},{\vec \mu}}$ is defined in Figure \ref{fig:bigon0}.
 
From Lemma \ref{r.refl} which deals with height exchange, one can easily show that
 \begin{equation}  
\beta'_{{\vec \eta},{\vec \mu}} = q^{h({\vec \eta})} \beta_{{\vec \eta},{\vec \mu}}, \ h({\vec \eta}):= \frac{1}{2}(n_+ n_- + n_+ + n_- -n_+^2 - n_-^2  )
 \end{equation} 
where $n_+$ (respectively $n_-$) is the number of $+$ (respectively $-$) in the sequence ${\vec \eta}$. It follows that $B_{\mathrm{can} }$ is also an $\mathcal R$-basis of $\cS(\mathcal B)$.
}





\red{
\begin{proposition}\label{prop:kashiwara}

Via the isomorphism of Theorem \ref{teo:SL2}, the basis $B_{\mathrm{can} }$ coincides with the canonical basis defined by Kashiwara  \cite[Proposition 9.1.1]{Ka}. Both bases $B_{\mathrm{can} }$ and $B(\mathcal B;{\mathfrak o}_+)$ are positive with respect to the product and to the coproduct, i.e. for $B= B_{\mathrm{can} }$ or $B(\mathcal B;{\mathfrak o}_+)$ and $\alpha,\beta \in B$ one has
$$ \alpha \beta\in \mathbb{N}[q^{\pm1}]\cdot B $$
$$ \Delta(\alpha)\in \mathbb{N}[q^{\pm1}]\cdot B\otimes B.$$
\end{proposition} 
}
\begin{proof}
The first statement is an observation directly following Theorem \ref{teo:SL2}: in \cite[Proposition 9.1.1]{Ka} the basis is $\{c^la^mb^n, l,m,n\geq 0\}\sqcup \{c^ld^mb^n, l,n\geq 0, m>0\}$.
\red{
As $B(\mathcal B;{\mathfrak o}_+)$ is equal to $B_{\mathrm{can} }$ up to powers of $q$, one needs only to prove the second statement for $B_{\mathrm{can} }$.
}
For positivity of multiplication, it is sufficient to check it on pairs of generators: there are then $16$ cases. 
All of them are straightforward; we provide some instances among the most complicated cases  where the right hand sides are in  $\mathbb{N}[q^{\pm1}]\cdotB_{\mathrm{can} }$:
 $$\alpha_{+-}\cdot \alpha_{-+}=\alpha_{-+}\cdot \alpha_{+-}, \alpha_{+-}\cdot \alpha_{--}=q^{-2}\alpha_{--}\cdot \alpha_{+-}, \alpha_{--}\cdot \alpha_{-+}=q^{2}\alpha_{-+}\cdot \alpha_{--}$$ $$\alpha_{+-}\cdot \alpha_{++}=q^2\alpha_{++}\cdot \alpha_{+-}, \alpha_{++}\cdot \alpha_{-+}=q^{-2}\alpha_{-+}\cdot \alpha_{++}, \alpha_{++}\cdot \alpha_{-+}=q^{-2}\alpha_{-+}\cdot \alpha_{++}.$$

Once positivity is known for multiplication, the statement for comultiplication can be checked on generators where it is straightforward. 
\end{proof}

\begin{remark} A direct proof of positivity using pictures is also easy and left to the reader.
\end{remark}

\section{Comodule structures, co-tensor products and braided tensor products}\label{sec.comodule}

\def\Delta_e{\Delta_e}
\def\null _e\Delta{\null _e\Delta}
\def{\text{-bal}}{{\text{-bal}}}




In this section we show that given any edge of $\mathfrak S$ the skein algebra $\cS(\fS)$ has a natural structure of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra. We show how to decompose this comodule into finite dimensional comodules. We then identify the image of the splitting homomorphism using the Hochshild cohomology, and give a dual result using Hochshild homology. When $\mathfrak S$ is the result of gluing two surfaces $\mathfrak S_1$ and $\mathfrak S_2$ to two edges of an ideal triangle, we show that the skein algebra $\cS(\fS)$ is canonically isomorphic to the braided tensor product of $\mathscr S(\mathfrak S_1)$ and $\mathscr S(\mathfrak S_2)$. In this section $\mathcal R=\mathbb Z[q^{\pm 1/2}]$.


\subsection{Comodule}\label{sub:comodule} Suppose  $e$ is a boundary edge of a  punctured bordered surface $\mathfrak S$. Recall that by cutting out of $\mathfrak S$ a bigon $\mathfrak B$ whose right edge is $e$ and canonically identifying $\mathfrak S\setminus int(\mathfrak B)$ with $\mathfrak S$, we get an $\mathcal R$-linear map
$$ \Delta_e: \cS(\mathfrak S) \to \cS(\mathfrak S) \otimes \cS(\mathfrak B),$$
see Figure \ref{fig:split1}.
Similarly cutting out of $\mathfrak S$ a bigon $\mathfrak B$ whose left edge is $e$ and canonically identifying $\mathfrak S\setminus int(\mathfrak B)$ with $\mathfrak S$, we get an $\mathcal R$-linear algebra homomorphism
$$ \null _e\Delta: \cS(\mathfrak S)\to \cS(\mathfrak B \sqcup \mathfrak S) \equiv   \cS(\mathfrak B) \otimes \cS(\mathfrak S).$$
 
 
 
 \begin{proposition}\label{prop:comodule} (a) The map $\Delta_e: \cS(\mathfrak S) \to  \cS(\mathfrak S) \otimes \cS(\mathfrak B)$ gives $\cS(\mathfrak S)$ a right comodule-algebra structure over the Hopf algebra $\cS(\mathfrak B)$. Similarly $\null _e\Delta$ gives gives $\cS(\mathfrak S)$ a left comodule-algebra structure over the Hopf algebra $\cS(\mathfrak B)$. 
 
 (b) It holds $\null _e\Delta=\mathrm{fl} \circ (\mathrm{Id}_{\cS(\mathfrak S)}\otimes \mathrm{rot}_*)\circ \Delta_e$ where $\mathrm{fl} (x\otimes y)=y\otimes x$ and $\mathrm{rot}_*:\cS(\mathfrak B)\to \cS(\mathfrak B)$ is the algebra involution defined by \eqref{def.rot}.

(c)  If $e_1,e_2$ are two distinct boundary edges, the coactions on the two  edges commute, i.e.  $$(\Delta_{e_2}\otimes \mathrm{id})\circ \Delta_{e_1}=\red{(\mathrm{fl}\otimes \mathrm{id})\circ}(\Delta_{e_1}\otimes \mathrm{id})\circ \Delta_{e_2}.$$
\end{proposition}

 
 

\begin{proof} (a) The associativity of $\Delta_e$ follows from the
the commutativity  of the splitting maps of theorem \ref{thm.1a}(c). Applying $(\mathrm{id} \otimes \epsilon)$ to Equation \eqref{eq.coact} and using the value of $\epsilon(\alpha_{{\vec \eta}{\vec \mu}})$ from~\eqref{eq.counit1}, we get that 
$$ (\mathrm{id} \otimes \epsilon) \Delta_e(x) = x_{\vec \mu}=x, \quad \forall x \in B(\mathfrak S,{\mathfrak o}).$$
Hence $\Delta_e$ gives $\cS(\mathfrak S)$ the structure of a right $\cS(\mathfrak B)$-comodule.

Recall that $\cS(\mathfrak S)$ is a comodule-algebra over the bialgebra $\cS(\mathfrak B)$, see e.g. \cite[Proposition III.7.2]{Kassel}, if and only if the map $ \Delta_e: \cS(\mathfrak S) \to \cS(\mathfrak S) \otimes \cS(\mathfrak B)$ is an algebra homomorphism. The last fact follows easily from the definition of $\Delta_e$.

(b) Observe that $(\mathrm{rot}_*\otimes \mathrm{rot}_*)\circ \Delta^{op}=\Delta\circ \mathrm{rot}_*$. 

(c) is clear from the definition.
\end{proof}
By identifying $\cS(\cB)$ with ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ using Theorem \ref{teo:SL2}, the above proposition also provides $\cS(\fS)$ with the structure of a ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule. 
More in general, we will use the following terminology:
\begin{definition}[Surfaces with indexed boundary]\label{defi:indexed}
A punctured bordered surface $\mathfrak S$ has \emph{indexed boundary} if its boundary edges are partitioned into two ordered sets (the left and right ones, with indices $L$ and $R$ respectively): $e^L_1,\ldots e^L_n, e^R_1,\ldots e^R_m$.
\end{definition}

If $\mathfrak S$ has indexed boundary then $\cS(\mathfrak S)$  is naturally endowed with a structure of $$({\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes n},{\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes m})-{\rm bicomodule}$$ by the left coaction $\Delta^L:\cS(\mathfrak S)\to {\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes n}\otimes \cS(\mathfrak S)$ defined by 
$$\Delta^L:=
(\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}^{\otimes n-1}\otimes \eDD{e^L_n})\circ (\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}^{\otimes n-2}\otimes \eDD{e^L_{n-1}})\circ \cdots \circ (\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}\otimes \eDD{e^L_2})\circ \eDD{e^L_1}$$ and the right coaction 
$$\Delta^R:=(\Delta_{e^R_1}\otimes\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}^{\otimes m-1} )\circ (\Delta_{e^R_2}\otimes\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))}^{\otimes m-2} )\circ \cdots \circ (\Delta_{e^R_{m-1}}\otimes\mathrm{Id}_{{\mathcal O}_{q^2}(\mathrm{SL}(2))} )\circ \Delta_{e^R_1}.$$ 

Furthermore notice that $\cS(\mathfrak S)$ is not only a bicomodule but a bicomodule-algebra as each of the above maps $\Delta_{e^R_i}$ or $\eDD{e^L_j}$ are also morphisms of algebras. 


\subsection{Quantum group $U_{q^2}(\mathfrak{sl}_2)$} \label{sub:module}
Recall that the quantized enveloping algebra $U_{q^2}(\mathfrak{sl}_2)$ is the Hopf algebra generated over the field $\mathbb{Q}(q^{1/2})$ by $K^{\pm1},E,F$ with relations \begin{equation}\label{eq:uqprod}
KE=q^4 EK,\quad KF=q^{-4}FK,\quad [E,F]=\frac{K-K^{-1}}{q^2-q^{-2}}.\end{equation}
The coproduct and the antipode are given by 
\begin{align}
\label{eq:uqcoprod}
\Delta(K)=K\otimes K,\quad \Delta(E)=1\otimes E+E\otimes K, \quad \Delta(F)=K^{-1}\otimes F+F\otimes 1\\
S(K)=K^{-1},\ S(E)=-EK^{-1}, S(F)=-KF.
\end{align}
  
We emphasize that $U_{q^2}(\mathfrak{sl}_2)$ is defined over the field $\mathbb Q(q^{1/2})$. There is an integral version $U^L_{q^2}(\mathfrak{sl}_2)$, defined by Lusztig \cite{Lusztig}, which is the $\mathcal R$-subalgebra of $U_{q^2}(\mathfrak{sl}_2)$ generated by $K^{\pm1}$ and the divided powers  $E^{(n)}:=\frac{E^n}{[n]!},F^{(n)}:=\frac{F^n}{[n]!}$. Here $[n]! = \prod_{i=1}^n (q^{2i} - q^{-2i}) /(q^2 - q^{-2})$.



One has a non degenerate Hopf pairing  
 \begin{equation}  \langle \cdot, \cdot \rangle: U_{q^2}(\mathfrak{sl}_2)\otimes_\mathcal R {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to {\BQ(q^{1/2})}.
\label{eq.form1}
 \end{equation} 
This is a Hopf duality since it satisfies (with Sweedler's coproduct notation)
 \begin{equation}  
\langle x, y_1 y_2 \rangle = \sum \langle x', y_1 \rangle \langle x'', y_2 \rangle,  \quad \langle x_1 x_2, y\rangle = \sum \langle x_1, y' \rangle \langle x_2, y'' \rangle
 \end{equation} 
The values of the form on generators are given by
\begin{align}
 \left \langle K, \begin{pmatrix}
 a & b \\ c & d
 \end{pmatrix}  \right \rangle= \begin{pmatrix}
 q^2 & 0 \\ 0 & q^{-2}
 \end{pmatrix}, \ \left \langle E, \begin{pmatrix}
 a & b \\ c & d
 \end{pmatrix}  \right \rangle= \begin{pmatrix}
 0 & 1 \\ 0 & 0
 \end{pmatrix}, \ \left \langle F, \begin{pmatrix}
 a & b \\ c & d
 \end{pmatrix}  \right \rangle= \begin{pmatrix}
 0 & 0 \\ 1 & 0
 \end{pmatrix}.
\end{align}



 


\begin{lemma}
\label{lem:integralpairing} The form \eqref{eq.form1} on $U^L_{q^2}(\mathfrak{sl}_2)$ is integral, i.e. it restricts to a map
$$  U^L_{q^2}(\mathfrak{sl}_2)\otimes_\mathcal R {\mathcal O}_{q^2}(\mathrm{SL}(2)) \to \mathcal R= \mathbb Z[q^{\pm1/2}]  .$$

\end{lemma}
\begin{proof} It is enough to check that $\langle E^{(n)},x\rangle, \langle F^{(n)},x\rangle \in \mathcal R$ for $n\geq 1$ and $  x\in {\mathcal O}_{q^2}(\mathrm{SL}(2))$. 
Since $\Delta(E^{(n)})=\sum_{i=0}^{n} q^{2i(n-i)}E^{(i)}\otimes E^{(n-i)}K^i  $ it is sufficient to check the statement for the evaluations of $ E^{(i)}$ and $K^j$ on $a,b,c,d$ where this is a straightforward computation. Similarly for $F^{(n)}$. 
\end{proof}

\red{Recall that the rotation by $180^\circ$ of the bigon induces the involution $r:{\mathcal O}_{q^2}(\mathrm{SL}(2))\to {\mathcal O}_{q^2}(\mathrm{SL}(2))$, see Theorem \ref{teo:SL2}. Let $r^*:U_{q^2}(\mathfrak{sl}_2)\to U_{q^2}(\mathfrak{sl}_2)$ be the adjoint of the map $r$. We will show that $r^*$ is equal to the map $\rho$ of Lusztig's book \cite[Chapter 19]{Lusztig}, which is used in the study of canonical bases of quantum groups. 



Let $U_{q^2}(\mathfrak{sl}_2)-Mod$ (respectively $Mod-U_{q^2}(\mathfrak{sl}_2)$) be the monoidal category of left (respectively right) $U_{q^2}(\mathfrak{sl}_2)$-modules.
}
\begin{lemma}[Left and right modules]\label{lem:LRfunctors}


(a) The map  $r^*$ is an algebra antimorphism involution and a coalgebra morphism, i.e. for $x,y\in U_{q^2}(\mathfrak{sl}_2)$  one has $$(r^*)^2(x)=x\qquad r^*(xy)=r^*(y)r^*(x), \quad \Delta(r^*(x))=(r^*\otimes r^*)\circ \Delta(x).$$

Explicitly, the value of $r^*$ on the generators is 
 \begin{equation}  r^*(E)=q^2KF,\qquad  r^*(K)=K,\qquad r^*(F)=q^{-2}EK^{-1}.
\label{eq.rr}
 \end{equation} 

(b) The map $r^*$ induces monoidal functors $$LR:U_{q^2}(\mathfrak{sl}_2)-Mod\to Mod-U_{q^2}(\mathfrak{sl}_2), {\rm and}\ RL:Mod-U_{q^2}(\mathfrak{sl}_2)\to U_{q^2}(\mathfrak{sl}_2)-Mod$$ which are inverse to each other as follows: for each left (resp. right) module $M$
 the module $LR(M)$ (resp. $RL(M)$) is the right (resp. left) module whose underlying vector space is $M$ and on which the action of $x\in  U_{q^2}(\mathfrak{sl}_2)$ 
 is given by, with on $\alpha \in M$,
  $$ \alpha\cdot x:=r^*(x)\cdot \alpha \quad (resp.\ \  x\cdot \alpha:= \alpha\cdot r^*(x) ).$$


\end{lemma}

\begin{remark} Formula \eqref{eq.rr} shows that $r^*$ is equal to $\rho$ of \cite[Chapter 19]{Lusztig}.
\end{remark}
\begin{proof}
(a) Since $r$ is a algebra involution and a co-algebra antimorphism by  Theorem \ref{teo:SL2} and the Hopf pairing is non-degenerate,  its dual $r^*$ is an algebra antimorphism involution and a coalgebra morphism.



It is sufficient to compute $r^*$ on the generators where one can verify the values provided in the statement.
For instance:$$\langle r^*(E),a\rangle=\langle E,a\rangle=0=\langle q^2 KF,a\rangle=\langle q^2K\otimes F,a\otimes a+c\otimes b\rangle$$
$$\langle r^*(E),b\rangle=\langle E,c\rangle=0=\langle q^2 KF,b\rangle=\langle q^2K\otimes F,a\otimes b+b\otimes d\rangle$$
$$\langle r^*(E),c\rangle=\langle E,b\rangle=1=\langle q^2 KF,c\rangle=\langle q^2K\otimes F,c\otimes a+d\otimes c\rangle$$
$$\langle r^*(E),d\rangle=\langle E,d\rangle=0=\langle q^2 KF,d\rangle=\langle q^2K\otimes F,c\otimes b+d\otimes d\rangle$$

The verification for the pairings with $a,b,c,d$ for $r^*(F)$ and $r^*(K)$ are similar. 


(b) $LR$ and $RL$ are functors as $r^*:U_{q^2}(\mathfrak{sl}_2)\to U_{q^2}(\mathfrak{sl}_2)$ is an algebra antimorphism; they are inverse to each other as $r^*$ is an involution. Monoidality is a consequence of the fact that $r^*$ is a coalgebra morphism. 
\end{proof}
\subsection{Module structure of $\cS(\mathfrak S)$.}\label{sub:modulestructure} As usual, the Hopf duality implies that 
every right (resp. left) ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule $V$  has a natural structure of a left (resp. right) $U_{q^2}(\mathfrak{sl}_2)$-module, via the following construction. For $a \in U_{q^2}(\mathfrak{sl}_2)$ and $v \in V$, one has
 \begin{equation}   a \cdot v:= \sum \langle a, b' \rangle v', \quad \text{where}\quad \Delta_r(v) = \sum v' \otimes b'.
\label{eq.dual}
 \end{equation} 

To be precise, we have to replace $V$ by $V\otimes_\mathcal R {\BQ(q^{1/2})}$, since $U_{q^2}(\mathfrak{sl}_2)$ is defined over ${\BQ(q^{1/2})}$.

 
 \def\SS \ot_\cR \Qq{\cS(\fS) \otimes_\mathcal R {\BQ(q^{1/2})}}
 
 
In particular, for an edge $e$ of $\mathfrak S$ the right comodule structure $\null _e\Delta: \cS(\fS) \to  \cS(\fS) \otimes \cS(\cB)$ gives $\SS \ot_\cR \Qq$ a left module structure over $U_{q^2}(\mathfrak{sl}_2)$, and we want to understand this module structure.

 
 Fix an orientation ${\mathfrak o}$ of the boundary $\partial \fS$. Recall that $B(\mathfrak S;{\mathfrak o})$ is an $\mathcal R$-basis of $\cS(\mathfrak S)$. For each edge $e$ let $B_{e,d}(\mathfrak S;{\mathfrak o}) \subset B(\mathfrak S;{\mathfrak o})$ be the set of all $\alpha \in B(\mathfrak S;{\mathfrak o})$ such that $|\alpha\cap e|=d$ and all the states on $\alpha \cap e$ are signs $+$. Let
$B_e(\mathfrak S;{\mathfrak o}) = \cup _{d=0}^\infty B_{e,d}(\mathfrak S;{\mathfrak o})$. 
For $\alpha\in B_{e,d}(\mathfrak S;{\mathfrak o})$ and $\vec{\eta}\in \{\pm\}^d$, let $\alpha(\vec{\eta})$ be the same $\alpha$ except for the states of $e\cap \alpha$ which are given by $s(x_i)= \eta_i$, where $x_1, \dots, x_d$ are the points of $\alpha\cap e$ listed in decreasing order. In particular let $\alpha_j:=\alpha(+,+,\cdots ,+,-,-, \dots,-)$ where the number of $-$ is $j$. For example, $\alpha=\alpha_0$.
 \begin{lemma}[Module structures of $\cS(\mathfrak S)$ along an edge $e$]\label{lem:uqmodule}
The left action of $U_{q^2}(\mathfrak{sl}_2)$ on $\SS \ot_\cR \Qq$, dual to $\null _e\Delta$,  is: 
$$K_{left}(\alpha_j)=q^{2(d-2j)}\alpha_j$$
$$E_{left}(\alpha_0)=0,\ {\rm and}\ E_{left}(\alpha_j)=[j]_{q^2}\alpha_{j-1} \mod F^e_{d-1}$$
$$F_{left}(\alpha_d)=0,\ {\rm and} \ F_{left}(\alpha_j)=[d-j]_{q^2}\alpha_{j+1} \mod  F^e_{d-1}$$
where  $F^e_{d-1}= F^e_{d-1}(\SS \ot_\cR \Qq)$ is the ${\BQ(q^{1/2})}$-span of elements $\beta\in B(\mathfrak S;{\mathfrak o})$ with $|\beta \cap e| < d$. 
The right action, dual to $\Delta_e$, is given by the left action of $r^*(K),r^*(E),r^*(F)$ (see Lemma \ref{lem:integralpairing}). 


\end{lemma}
\begin{proof} \red{
By \eqref{eq.coact},  $\Delta(\alpha(\vec{\eta}))=\sum_{\vec{\epsilon} \in \{\pm\}^d} \alpha(\vec{\epsilon}) \otimes \alpha_{\vec{\epsilon}\vec{\eta}}$ where  $\alpha_{\vec{\epsilon}\vec{\eta}}$ is defined in Figure \ref{fig:bigon0}. If we define inductively $\Delta^{[d]} = (\Delta\otimes\mathrm{id}^{\otimes (d-2)} )\circ\Delta^{[d-1]}$ for $d\ge 3$, with $\Delta^{[2]} = \Delta$, then
\begin{align}
  \Delta^{[d]} (K)&= K^{\otimes d},\\
 \Delta^{[d]} (E)&= \sum_{j=1}^d 1^{\otimes (j-1)} \otimes E \otimes K^{\otimes  (d-j)},  \label{eq.DE} \\
 \Delta^{[d]} (F)&= \sum_{j=1}^d (K^{-1}) ^{\otimes j} \otimes F \otimes 1^{\otimes d-j-1}  \label{eq.DF}.
\end{align}
Applying these} to  compute the Hopf pairing of $K,E,F$ with $\alpha_{\vec{\epsilon}\vec{\eta}}$ we get
$$K_{left}(\alpha(\vec{\eta}))=q^{2\sum \eta_i}\alpha(\vec{\eta}),$$ 
$$E_{left}(\alpha(\vec{\eta}))=\sum_{j=1}^d (\delta_{\eta_j,-}) q^{2\sum_{k=j+1}^d \eta_k}\alpha(\eta_1,\cdots ,\eta_{j-1}, +, \eta_{j+1},\cdots, \eta_d),$$
$$F_{left}(\alpha(\vec{\eta}))=\sum_{j=1}^d (\delta_{\eta_j,+}) q^{-2\sum_{k=1}^{j-1} \eta_k}\alpha(\eta_1,\cdots ,\eta_{j-1},-,\eta_{j+1},\cdots ,\eta_d).$$
Now the main claim is a direct computation using relation \eqref{eq.order}.
\end{proof}






Let  $\mathfrak S$ have indexed boundary $\partial \mathfrak S=\{e^L_1,\ldots e^L_m, e^R_1,\ldots e^R_n\}$ as explained in Subsection \ref{sub:comodule}. The Hopf duality gives $\SS \ot_\cR \Qq$ an  algebra bimodule structure over $(U_{q^2}(\mathfrak{sl}_2)^{\otimes n},U_{q^2}(\mathfrak{sl}_2)^{\otimes m})$. (Notice the inversion between left and right when passing to modules). 

For each $\vec m\in \mathbb{N}^m$ and $\vec n\in \mathbb{N}^n$, let $B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$ be defined as:
$$B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})=\left(\bigcap_{i=1}^m B_{e_i^L,m_i}(\mathfrak S;{\mathfrak o})\right)\cap \left(\bigcap_{j=1}^n B_{e_j^R,n_j}(\mathfrak S;{\mathfrak o})\right).$$
Let also, for each $\vec{j}\leq \vec{m}$ and $\vec{h}\leq \vec{n}$ (component-wise) and each $\alpha\in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$ let $\alpha_{\vec{j},\vec{h}}\in B(\mathfrak S;{\mathfrak o})$ be the skein identical to $\alpha$ but for its state which is increasing and contains $\vec{j}$ (resp. $\vec{h}$) signs $-$ on the left (resp. right) edges. 


\begin{theorem}\label{teo:module} Suppose that $\mathfrak S$ has indexed boundary $\partial \mathfrak S=\{e^L_1,\ldots e^L_n, e^R_1,\ldots e^R_m\}$.

(a) For each $\vec m\in \mathbb{N}^m$ and $\vec n\in \mathbb{N}^n$ and each $\alpha \in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$, 
 the $ (U_{q^2}(\mathfrak{sl}_2)^{\otimes n},U_{q^2}(\mathfrak{sl}_2)^{\otimes m})$-bimodule generated by $\alpha$ (namely $U_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha \cdot U_{q^2}(\mathfrak{sl}_2)^{\otimes m}$) is irreducible and isomorphic to $V^L_{n_1}\otimes\cdots \otimes V^L_{n_n}\otimes V^R_{m_1}\otimes\cdots \otimes V^R_{m_m}$, where $V^L_k$ (resp. $V^R_k$) is the irreducible left (resp. right) module on $U_{q^2}(\mathfrak{sl}_2)$ with highest weight $k$. 

(b) As $ (U_{q^2}(\mathfrak{sl}_2)^{\otimes n},U_{q^2}(\mathfrak{sl}_2)^{\otimes m})$-bimodules, we have
 \begin{equation}  
\SS \ot_\cR \Qq = \bigoplus U_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha\cdot U_{q^2}(\mathfrak{sl}_2)^{\otimes m}.
 \end{equation} 
where the sum is taken over all $\vec{m}\in \mathbb{N}^m,\vec{n}\in \mathbb{N}^n$, and all $\alpha\in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$.
In particular, the bimodule $\cS(\mathfrak S)$ is a direct sum of finite dimensional bimodules over $ (U_{q^2}(\mathfrak{sl}_2)^{\otimes n},U_{q^2}(\mathfrak{sl}_2)^{\otimes m})$.

(c) Furthermore the bimodule structure restricts to that of a $ (U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n},U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m})$-bimodule (where $U^L_{q^2}(\mathfrak{sl}_2)$ is the integral version of $U_{q^2}(\mathfrak{sl}_2)$) and a decomposition similar to the above one holds:
 \begin{equation}  
\cS(\mathfrak S) = \bigoplus \foo_{\vec{j}\leq \vec{m},\vec{h}\leq \vec{n}} \left( U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha_{\vec j,\vec{h}}\cdot U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m}\right)
 \end{equation} 
where the direct sum is taken over all $\vec{m}\in \mathbb{N}^m,\vec{n}\in \mathbb{N}^n$ and all $\alpha\in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$, and the $\foo_{\vec{j},\vec{h}}$ symbol stands for the non direct sum.
 
\end{theorem}



\begin{proof} 

(a) Fix $m_i, n_j$ and $\alpha$ as in the statement and let $JW(\alpha)$ be the skein obtained by inserting a $JW_{m_i}$ near $e^L_i$ and a $JW_{n_j}$ near $e^R_j$ for all $i,j$. By Example \ref{ex:joneswenzl} it is clear that $\alpha=JW(\alpha)$ and by Lemma \ref{lem:uqmodule} that it is a highest weight vector of weight $q^{2m_i}$ for the action of the $i^{th}$-copy of $U_{q^2}(\mathfrak{sl}_2)$ for each $i\leq m$; similarly it is a highest weight vector of weight $q^{2n_j}$ for the right action of the $j^{th}$-copy of $U_{q^2}(\mathfrak{sl}_2)$.  Furthermore, by Lemma \ref{lem:uqmodule} and the fact that the $m^{th}$-Jones Wenzl projector kills the self-returns, the orbit of $\alpha$ is exactly the span of the vectors $JW(\alpha_{\vec j,\vec{h}})$ with $\vec j\leq \vec m$ and $\vec h\leq \vec n$. 

(b)
It is straightforward from $a)$ and from Theorem \ref{thm.basis1a}.

(c) If a left (resp. right) $U_{q^2}(\mathfrak{sl}_2)$-module weight $M$ (over ${\BQ(q^{1/2})}$) has a basis formed by weight vectors over which the action of $E^{(r)}, F^{(r)},r\geq 1$ has coefficients in $\mathcal R$, then $M$ restricts to a $U^L_{q^2}(\mathfrak{sl}_2)$-module; 
 we claim that  the basis $B(\mathfrak S;{\mathfrak o})$ of $\cS(\mathfrak S)$ has this property. Indeed since the structure of module is induced by the right (resp. left) comodule structure on each edge and the Hopf pairing between $U_{q^2}(\mathfrak{sl}_2)$ and ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, and since the comodule structure is integral in the basis $B(\mathfrak S;{\mathfrak o})$, it is sufficient to observe that the Hopf pairing between $U_{q^2}(\mathfrak{sl}_2)$ and ${\mathcal O}_{q^2}(\mathrm{SL}(2))=\cS(\mathfrak B)$ extends to a $\mathcal R$-bilinear Hopf pairing between $U^L_{q^{2}}(\mathfrak{sl}_2)$ in the basis $B(\mathfrak B,{\mathfrak o})$: this is the content of point $(1)$ of Lemma \ref{lem:integralpairing}. 

To prove that the direct sum decomposition still holds,
let 
 $$B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o}):=\{\alpha\in B(\mathfrak S;{\mathfrak o})|\# (\alpha\cap e^L_i)\leq m_i ,\# (\alpha\cap e^R_j)\leq n_j, \forall i\leq m, \forall j\leq n \}\setminus B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o}).$$ 
 
To prove the claim, we will show that for each $\alpha \in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$, the following holds:
$$\left(\mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})\right)\bigcap \left(\foo_{\vec{j}\leq \vec{m},\vec{h}\leq \vec{n}}\left( U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha_{\vec j,\vec{h}}\cdot U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m}\right)\right)=\{0\}.$$


We start by remarking that if $\alpha\in B_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$, then $\alpha=JW(\alpha)$ and so, over ${\BQ(q^{1/2})}$, its orbit is a direct summand of $\cS(\mathfrak S)$ and thus it has trivial intersection with the $\mathcal R$-span of $B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$: 
$$\left(\mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})\right)\bigcap \left( U_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha\cdot U_{q^2}(\mathfrak{sl}_2)^{\otimes m}\right)=\{0\}.$$


Furthermore, by the point (b), given $\vec{j}\leq \vec{m},\vec{h}\leq \vec{n}$,  there exist $c(\vec{j},\vec{h})\in \mathcal R\setminus 0$ and $\ell(\vec{j},\vec{h})\in \mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})$ such that $c(\vec{j},\vec{h}) \alpha_{\vec{j},\vec{h}}+\ell(\vec{j},\vec{h})$ is in the orbit of $\alpha$: 
$$c(\vec{j},\vec{h}) \alpha_{\vec{j},\vec{h}}+\ell(\vec{j},\vec{h})\in U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n}\cdot \alpha\cdot U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m}.$$ 


Now suppose that for some $l_i\in U^L_{q^2}(\mathfrak{sl}_2)^{\otimes m}$ and $r_i\in  U^L_{q^2}(\mathfrak{sl}_2)^{\otimes n}$ and some $\vec{j}_i,\vec{h}_i$ it holds $$\sum_{i} l_i\cdot \alpha_{\vec{j}_i,\vec{h}_i}\cdot r_i\in \mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})\setminus \{0\}.$$
Then, multiplying by $\prod_{i} c(\vec{j}_i,\vec{h}_i)$ (which gives a non-zero vector as $\cS(\mathfrak S)$ is free as a $\mathcal R$-module) we also get that 
$\sum_{i} l_i \cdot \alpha\cdot r_i \in \mathcal R\cdot B^{<}_{\vec{m},\vec{n}}(\mathfrak S;{\mathfrak o})\setminus \{0\}$,
which as already argued is impossible. 

\end{proof}

 \begin{example}\label{ex:bigonright}
Let $\mathfrak B$ be the bigon whose edges $e_l$ and $e_r$ are declared to be respectively of type $L$ and $R$. Then by Theorem \ref{teo:SL2}, $\cS(\mathfrak B)$ is the right and left module $U_{q^2}(\mathfrak{sl}_2)$-module ${\mathcal O}_{q^2}(\mathrm{SL}(2))$: the left action is induced by the right comodule structure coming from $e_r^R$ and the right action from $e_l^L$. 
If we let $\mathfrak B^R$ be the bigon where both $e_l$ and $e_r$ are declared to be of type R (right), then $\cS(\mathfrak B^R)$ is a left $(U_{q^2}(\mathfrak{sl}_2))^{\otimes 2}$-module; the action of $x\otimes y$ on a skein $b\in \cS(\mathfrak B^R)$ is given by 
$$(x\otimes y) \cdot b=x\cdot b\cdot r^*(y)$$ where $r^*(y)$ is the algebra antimorphism provided in Lemma \ref{lem:LRfunctors} and the left and right actions are those on $\cS(\mathfrak B)$ described above. 
\end{example}


\subsection{Co-tensor product} Suppose  $U$ is a coalgebra over a ground ring $\mathcal R$. Assume 
$M$ is a left $U$-comodule with coaction  $\Delta_M:M\to U\otimes_{\mathcal R} M$, and $N$ a right $U$-comodule with coaction $\Delta_N:N\to N\otimes_R U$. 
Then the cotensor product $N \Box _U M $  is
$$N\Box_U M:=\{v\in N\otimes M \mid (\Delta_N\otimes \mathrm{id}_M)(v)=(\mathrm{id}_N\otimes \Delta_M)(v)\}.$$

Cotensor product is a special case of the following notion of Hochshild cohomology. 
Assume $V$ is a $\mathcal R$-module with a left $U$-coaction and a right $U$-coaction:
$$ \Delta_r: V \to V \otimes U, \quad _l\Delta: V \to U \otimes V .$$
The 0-th Hochshild cohomology of $V$ is defined by
$$ HH^0(V)= \{ x\in V \mid \Delta_r(x) =  \mathrm{fl}(\null_l\Delta(x)),$$
where $\mathrm{fl}: V \otimes U\to U \otimes V$ is the flip $\mathrm{fl}(x\otimes y) = y \otimes x$.

With $M$ and $N$ as above, define a left $U$-coaction and a right $U$ coaction on $N \otimes_R M$ by
\begin{align*}
\Delta_r &: N \otimes_R M \to N \otimes_R M \otimes_R U, \quad \Delta_r(n \otimes m) = \sum n' \otimes m \otimes u' \ \text{if}\  \Delta_N(n) = \sum n' \otimes u' \\
\null_l\Delta &: N \otimes_R M \to  U \otimes_R N \otimes_R M, \quad \null_l\Delta (n \otimes m) = \sum u'' \otimes n \otimes m''  \ \text{if}\  \Delta_M(m) = \sum u'' \otimes m''.
\end{align*}

Then the cotensor product $N\Box_U M= HH^0(N\otimes_{\mathcal R} M)$.



\subsection{Splitting as co-tensor product and Hochshild cohomology}



\def\null _c\D{\null _c\Delta}
\def\D_c{\Delta_c}
\def\null _l\D{\null _l\Delta}
\def\D_r{\Delta_r}

Suppose $c_1, c_2$ are distinct boundary edges of a punctured bordered surface $\mathfrak S'$ and $\mathfrak S= \mathfrak S'/(c_1=c_2)$, with $c\subset \mathfrak S$ being the common image of $c_1$ and  $c_2$.  The splitting homomorphism gives an embedding 
$\theta_c: \cS(\mathfrak S) \hookrightarrow \cS(\mathfrak S') $ and  we will make precise the image of $\theta_c$. 

 
 
 
 
 \FIGc{split2}{(a) The middle shaded part is the bigon, while the left and the right shaded parts are part of $\mathfrak S'$. Gluing $c_1=e_l$ gives the right coaction $\D_r$ and gluing $e_r=c_2$ gives the left coaction $\null _l\D$.
 (b) Element $\null  x _{{\vec\nu}{\vec \mu}}\in \cS(\mathfrak S')$. The horizontal lines are part of $x$. Note the order of indices.}{2.6cm}

\begin{theorem}\label{teo:cotensor} 
Suppose $c_1, c_2$ are distinct boundary edges of a punctured bordered surface $\mathfrak S'$ and $\mathfrak S= \mathfrak S'/(c_1=c_2)$. The splitting homomorphism  
 \begin{equation}   \theta_c: \cS(\mathfrak S) \hookrightarrow \cS(\mathfrak S') \label{eq.split6}.
 \end{equation} 
maps $\cS(\fS)$ isomorphically onto the Hochshild cohomology $HH^0(\mathscr S(\mathfrak S'))$, which is a $\mathscr S(\mathcal B)$-bimodule via the left coaction $\null _l\D:= \null_{c_2}\Delta$ and the right coaction $\D_r:= \Delta_{c_1}$ (see Figure \ref{fig:split2}(a)).


In particular, if $c_1$ is a boundary edge of $\mathfrak S'_1$ and $c_2$ is a boundary edge of $\mathfrak S'_2$ which is disjoint from $\mathfrak S'_1$, and $\mathfrak S=(\mathfrak S'_1 \sqcup \mathfrak S'_2)/(c_1=c_2)$,  then $\theta_c$ maps $\cS(\mathfrak S)$ isomorphically onto
the cotensor product of $\cS(\mathfrak S'_1)$ and $\cS(\mathfrak S'_2)$ over $\cS(\mathfrak B)$.
\end{theorem}




\def\mathrm{coef}{\mathrm{coef}}
\def{\vec \tau}{{\vec \tau}}
\begin{proof} Let us identify $\cS(\fS)$ with its image under $\theta_c$.
 From the splitting formula \eqref{eq.slit} it is easy to see that $\cS(\mathfrak S)\subset HH^0(\cS(\mathfrak S'))$. Let us prove the converse inclusion.
Assume  $0\neq v \in HH^0(\cS(\mathfrak S'))$.  By definition, this means
 \begin{equation}  
\D_r(v) - \mathrm{fl}(\null _l\D(v))=0.
 \end{equation} 


Choose an orientation ${\mathfrak o}$ of $\partial \fS$ and an orientation of $c$. Then ${\mathfrak o}$ and the orientation of $c_1$ and $c_2$ induced from $c$ give an orientation ${\mathfrak o}'$ of $\partial \fS'$. 
Recall that  $B(\mathfrak S';{\mathfrak o}')$ is a free $\mathcal R$-basis of $\cS(\mathfrak S')$. Let $\tilde B(\mathfrak S';{\mathfrak o}')$ be the set of all
isotopy classes $x$ of ${\mathfrak o}'$-ordered $\partial M'$-tangle diagrams which are increasingly stated on every boundary edge except for $c_1$ and $c_2$. 
If ${\vec \mu}$ is a state of $x \cap c_1$ and ${\vec\nu}$ is a state of $x\cap c_2$, let $x _{{\vec\nu}{\vec \mu}}$ be the  stated ${\mathfrak o}'$-ordered $\partial M'$-tangle
 diagram whose states on $x \cap c_1$ and $x \cap c_2$ are respectively ${\vec \mu}$ and ${\vec\nu}$. See Figure \ref{fig:split2}(b). 
If ${\vec \mu}$ and ${\vec\nu}$ are increasing, then $x _{{\vec\nu}{\vec \mu}} \in B(\mathfrak S', {\mathfrak o}')$ is a basis element. For each $i=1,2$ let $S_{x\cap c_i}$ and $S_{x \cap c_i}^\uparrow$ be respectively the set of all states and the set of all increasing states of $x \cap c_i$. Then
$$ B(\mathfrak S',{\mathfrak o}') = \{ x_{{\vec\nu}{\vec \mu}} \mid x \in \tilde B(\mathfrak S', {\mathfrak o}'), {\vec \mu} \in S_{x \cap c_1}^\uparrow, {\vec\nu} \in S_{x \cap c_2}^\uparrow \}.$$
Using the above  $\mathcal R$-basis $B(\mathfrak S';{\mathfrak o}')$ of $\cS(\mathfrak S')$, we can present $v\in  \cS(\mathfrak S')$ in the form
 \begin{equation}  v=\sum_{x\in X(v)}\,  \sum_{  {\vec \mu} \in S_{x \cap c_1}^\uparrow }\,  \sum_{  {\vec\nu} \in S_{x \cap c_2}^\uparrow } \, \mathrm{coef}(v, x_{{\vec\nu}{\vec \mu}})\, \, x_{{\vec\nu}{\vec \mu}},
\label{eq.v}
 \end{equation} 
where $X\subset \tilde B(\mathfrak S';{\mathfrak o}')$ is a minimal finite set, so that for each $x\in X$, there are ${\vec \mu}, {\vec\nu}$ such that  the coefficient  $\mathrm{coef}(v, x_{{\vec\nu}{\vec \mu}})$ is non-zero.

Let $m(v)=\max\{ |x \cap c_1|, |x\cap c_2|,  x\in X(v)\}$. We show by induction on $m(v)$ that $v \in \cS(\mathfrak S)$.

For $i=1,2$ let $X_i(v)= \{ x\in X(v) , |x \cap  c_i| = m\}$.   If $x\in X_1(v)\cap X_2(v)$, then $|x\cap c_1|=|x \cap c_2|= m(v)$, and there is an element $\bar x\in \mathfrak B(\mathfrak S,{\mathfrak o})$ such that $x$ has coefficient non-zero in the result of splitting $\bar x$ along $c$. From the definition of the splitting map we have
 \begin{equation}  
\mathrm{coef}(\theta(\bar x), x_{{\vec \tau}\btau})= 1, \label{eq.max}
 \end{equation} 
where ${\vec \tau}= (+)^m$ is the state consisting of $m$ plus signs. Let 
$$v' = v - \sum _{x\in X_1(v) \cap X_2(v)} \mathrm{coef}(v, x_{{\vec \tau} {\vec \tau}} ) \, \theta(\bar x).$$ 
If $m(v') < m(v)$ then  we are done by induction. Assume that $m(v')=m(v)$. One of $X_1(v'), X_2(v')$ is not empty, and
without loss of generality assume $X_2(v') \neq \emptyset$. Formula \eqref{eq.v} for $v'$ has the form
 \begin{equation}  
v'=\sum_{x\in X(v')}\,  \sum_{  {\vec \mu} \in S_{x \cap c_1}^\uparrow }\,  \sum_{  {\vec\nu} \in S_{x \cap c_2}^\uparrow } \, \mathrm{coef}(v', x_{{\vec\nu}{\vec \mu}})\, \, x_{{\vec\nu}{\vec \mu}},
\label{eq.vp}
 \end{equation} 
and because of \eqref{eq.max} we can assume that there is no $x_{\tau\tau}$ on the right hand side of \eqref{eq.vp}.

Let $p^{c_2}_m:  \cS(\mathfrak S') \to \cS(\mathfrak S')$ be
 the projection onto the homogeneous part $G^{c_2}_m(\cS(\mathfrak S'))$,  and $p^{e_r}_m: \cS(\mathfrak B) \to \cS(\mathfrak B)$ be the projection onto the homogeneous part $G^{e_r}_m(\cS(\mathfrak B))$, see the end of Section \ref{sec.filtration}. Explicitly, for $x\in X(v')$ we have
 \begin{equation} 
p^{c_2}_m (x_{{\vec\nu}{\vec \mu}})= \begin{cases} 0 \quad &\text{if} \ {\vec\nu} \neq {\vec \tau} \\
x_{{\vec \tau} {\vec \mu}} & \text{if} \ {\vec\nu} = \tau,
\end{cases} \quad p^{e_r}_m (\alpha_{{\vec\nu}{\vec \mu}})= \begin{cases} 0 \quad &\text{if} \ {\vec \mu} \neq \tau \\
\alpha_{{\vec\nu}{\vec \tau}}  & \text{if} \ {\vec \mu} = {\vec \tau}.
\end{cases}
 \end{equation} 


From Formula \eqref{eq.coact} for the coaction, we have, for $x\in X(v')$ and $({\vec\nu},{\vec \mu}) \neq ({\vec \tau},{\vec \tau})$, 
\begin{align}
\label{eq.sp1}x _{{\vec\nu}{\vec \mu}} & \overset{\D_r}{\longrightarrow}  \sum _{{\vec \eta}\in  S_{x \cap c_1}}  x _{{\vec\nu}{\vec \eta}}  \otimes  \alpha _{{\vec \eta}{\vec \mu}}  \overset{p^{c_2}_m \otimes p^{e_r}_m}{\longrightarrow} 0 \\ 
\label{eq.sp2}x _{{\vec\nu}{\vec \mu}} & \overset{\null _l\D}{\longrightarrow} \sum _{{\vec \eta}\in  S_{x \cap c_2}}  \alpha _{{\vec\nu}{\vec \eta}} \otimes   x _{{\vec \eta}{\vec \mu}} \overset{\mathrm{fl}}{\longrightarrow} \sum _{\vec \eta}   x _{{\vec \eta}{\vec \mu}}  \otimes  \alpha _{{\vec\nu}{\vec \eta}} \overset{p^{c_2}_m \otimes p^{e_r}_m}{\longrightarrow} \begin{cases}   0 \ &\text{ if } \ x \not \in X_2(v') \\
x_{{\vec \tau} {\vec \mu}} \otimes \alpha _{{\vec\nu}{\vec \tau}}  \ &\text{ if } \ x \in X_2(v'). \end{cases}
\end{align}
It follows that
$$ 0= (p^{c_2}_m \otimes p^{e_r}_m )(\mathrm{fl} (\null _l\D (v')) - \D_r(v'))=  \sum_{x\in X_2(v')} \sum_{  {\vec \mu} \in S_{x \cap c_1}^\uparrow }\,  \sum_{  {\vec\nu} \in S_{x \cap c_2}^\uparrow } \, \mathrm{coef}(v', x_{{\vec\nu}{\vec \mu}})\,  \, x_{{\vec \tau} {\vec \mu}} \otimes \alpha _{{\vec\nu}{\vec \tau}}.$$
As the right hand side is a linear combination of elements of a basis, all the coefficients 
$v$ there are 0. This means $X_2(v')=\emptyset$, a contradiction. Thus $m(v') < m(v)$ and we are done.
\end{proof}

\begin{remark}\label{rem:cotensor}
Theorem \ref{teo:cotensor} holds also if we change the base ring to $\mathbb{C}$ by evaluating $q$ to a non-zero complex number. 
\end{remark}
\def\cS(\fS') \ot_\cR \Qq{\mathscr S(\mathfrak S') \otimes_\mathcal R {\BQ(q^{1/2})}}
Using the above result together with Theorem \ref{teo:module} we can deduce a similar result for $U_{q^2}(\mathfrak{sl}_2)$-modules.
Recall that for a bi-module $V$ over a ${\BQ(q^{1/2})}$-algebra $U$ the 0-homology group is
$$ HH_0(V) = V/{\BQ(q^{1/2})}{\text - span}\langle  a \cdot v - v \cdot a \mid a \in U, v \in V\rangle.$$


\begin{theorem}\label{r.Hoch2}
Suppose $c_1, c_2$ are distinct boundary edges of a punctured bordered surface $\mathfrak S'$ and $\mathfrak S= \mathfrak S'/(c_1=c_2)$, with $c$ being the common image of $c_1$ and $c_2$. Then the composition
 \begin{equation}   \SS \ot_\cR \Qq \overset{\theta_c} \longrightarrow  \mathscr S(\mathfrak S') \otimes_R {\BQ(q^{1/2})} \to HH_0(\mathscr S(\mathfrak S') \otimes_R {\BQ(q^{1/2})})
\label{eq.iso6}
 \end{equation} 
is an isomorphism of ${\BQ(q^{1/2})}$-vector spaces. Here $\cS(\fS') \ot_\cR \Qq$ is a $U_{q^2}(\mathfrak{sl}_2)$-bimodule via the dual actions of $\Delta_{c_1}$ and $\eDD{c_2}$.



In particular, if $\mathfrak S'= \mathfrak S_1 \sqcup \mathfrak S_2$ with $c_1 \subset \mathfrak S_1$ and $c_2 \subset \mathfrak S_2$, then the map in \eqref{eq.iso6} is an isomorphism between  $\SS \ot_\cR \Qq$ and  $(\mathscr S(\mathfrak S_1) \otimes_R {\BQ(q^{1/2})}) \otimes_{U_{q^2}(\mathfrak{sl}_2)} (\mathscr S(\mathfrak S_2) \otimes_R {\BQ(q^{1/2})})$. 
\end{theorem}


\begin{proof}{

The decomposition of $\mathscr S(\mathfrak S') \otimes_R {\BQ(q^{1/2})}$ given by part (b) of Theorem \ref{teo:module} shows that it is sufficient to prove that if $V^R_{m_2}$ (resp. $V^L_{m_1}$) is the irreducible $m_2+1$-dimensional (resp. $m_1+1$-dimensional) right (resp. left) $U_{q^2}(\mathfrak{sl}_2)$-module, then the composition of natural map
 \begin{equation}   HH^0(V^L_{m_1}\otimes V^R_{m_2}) \hookrightarrow V^L_{m_1}\otimes V^R_{m_2}\twoheadrightarrow 
 HH_0( V^L_{m_1}\otimes V^R_{m_2})
 \end{equation} 
is an isomorphism of vector spaces. We will see that this follows from the fact that every finite-dimensional $U_{q^2}(\mathfrak{sl}_2)$-module $V$ is equivalent to its dual $V^*$.

First observe that since the pairing between ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ and $U_{q^2}(\mathfrak{sl}_2)$ is non degenerate, $HH^0(V^L_{m_1}\otimes V^R_{m_2})$ can be equivalently defined as 
$$HH^0(V^L_{m_1}\otimes V^R_{m_2})=\{v\otimes w\in V^L_{m_1}\otimes V^R_{m_2}| x\cdot v\otimes w=v\otimes w\cdot x,\ \forall x\in U_{q^2}(\mathfrak{sl}_2)\}.$$
Then using the isomorphism between $V^R_{m_2}$ and $(V^L_{m_2})^*$ we have :
$$HH^0(V^L_{m_1}\otimes V^R_{m_2})=Hom_{U_{q^2}(\mathfrak{sl}_2)}(V^L_{m_2},V^L_{m_1})=\delta_{m_1,m_2} {\BQ(q^{1/2})}$$
by Schur's lemma.

Now let's take the dual of the above equation and get: 
 \begin{equation}   (HH_0( V^L_{m_1}\otimes V^R_{m_2}))^*\hookrightarrow 
  (V^R_{m_2})^*\otimes (V^L_{m_1})^*\twoheadrightarrow (HH^0(V^L_{m_1}\otimes V^R_{m_2}))^*
  \end{equation} 
 where the first arrow maps an element of $(HH_0( V^L_{m_1}\otimes V^R_{m_2}))^*$ to some $f\in (V^L_{m_1}\otimes V^R_{m_2})^*$ such that $f(x \cdot v\otimes w)=f(v\otimes w\cdot x)$ for all $x\in U_{q^2}(\mathfrak{sl}_2)$ and $v\otimes w\in V^L_{m_1}\otimes V^R_{m_2}$.  Using again the isomorphism between $(V^R_{m_2})^*$ and $V^L_{m_2}$ we have that the image of $(HH_0( V^L_{m_1}\otimes V^R_{m_2}))^*$ in $V^L_{m_2}\otimes (V^L_{m_1})^*$ is $Hom_{U_{q^2}(\mathfrak{sl}_2)}(V^L_{m_1},V^L_{m_2})=\delta_{m_1,m_2}{\BQ(q^{1/2})}$ by Schur's lemma. 
 
 To conclude, observe that if $m_1=m_2$ then the image of the inclusion $HH^0(V^L_{m_1}\otimes V^R_{m_1}) \hookrightarrow V^L_{m_1}\otimes V^R_{m_1}\simeq V^L_{m_1}\otimes (V^L_{m_1})^*=Hom(V^L_{m_1},V^L_{m_1})$ is given by the multiples of the identity map. But the kernel of the projection $V^L_{m_1}\otimes V^R_{m_1}\twoheadrightarrow HH_0(V^L_{m_1}\otimes V^R_{m_1})$ is the sub vector space of $Hom(V^L_{m_1},V^L_{m_1})$ spanned by the matrices of the form $xM-Mx$ where $x$ represents the action of an element of $U_{q^2}(\mathfrak{sl}_2)$ and $M\in Hom(V^L_{m_1},V^L_{m_1})$; thus it is contained the set of matrices with zero trace and so the projection of $HH^0(V^L_{m_1}\otimes V^R_{m_1})$ in $HH_0(V^L_{m_1}\otimes V^R_{m_1})$ is nonzero. 


}   
\end{proof}
\begin{remark}
By the splitting theorem and Proposition \ref{r.Hoch2}, $\cS(\mathfrak S)$ is both a submodule and a quotient module of $\cS(\mathfrak S')$.
\end{remark}


\begin{example}\label{ex:bigonR}
Clearly, if in Theorem \ref{r.Hoch2} $c_1=e_i^R$ and $c_2=e_j^L$ belong to two distinct connected components of $\mathfrak S'$, then one can restate the $HH_0$ simply as a tensor product over a copy of $U_{q^2}(\mathfrak{sl}_2)$ acting on the left on the skein algebra of one component and on the right on the other.

In particular, if $\mathfrak S$ is obtained by glueing a bigon $\mathfrak B$ along its right edge to a left edge of $\mathfrak S'$ then $\cS(\mathfrak S)=\cS(\mathfrak S')\otimes_{U_{q^2}(\mathfrak{sl}_2)} \cS(\mathfrak B)$ is isomorphic to $\cS(\mathfrak S')$ as it can be seen  directly by Theorem \ref{thm.1a}.
 
If $\mathfrak B^R$ is the bigon whose edges are both declared to be of type $R$ (right), then $\cS(\mathfrak B^R)$ is a left module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes 2}$ (see Example \ref{ex:bigonright}). Then glueing $\mathfrak B^R$ to $\mathfrak S'$ along one edge of type $L$, shows that 
$$\cS(\mathfrak S)=\cS(\mathfrak S')\otimes _{U_{q^2}(\mathfrak{sl}_2)} \cS(\mathfrak B^R).$$
The resulting surface $\mathfrak S$ is still homeomorphic to $\mathfrak S'$ but the edge on which the glueing has been performed has been transformed from an edge of type $L$ to one of type $R$. This corresponds to applying Lemma \ref{lem:LRfunctors} to the module structure coming from that edge. 
\end{example}
\begin{remark}\label{rem:glueingcommutes}
If $c'_1,c'_2$ are two other edges of $\partial \mathfrak S'$ (and then of $\partial \mathfrak S$), \eqref{eq.iso6} is an isomorphism of $U_{q^2}(\mathfrak{sl}_2)$-modules for the structure associated to $c'_1$ and $c'_2$. Furthermore the theorem can be applied independently to glue also $c'_1$ and $c'_2$ and the final isomorphism between $\cS(\mathfrak S'/(c_1=c_2,c'_1=c'_2))\otimes {\BQ(q^{1/2})}$ and  $HH^0(\cS(\mathfrak S')\otimes {\BQ(q^{1/2})})$ (with respect to the $U_{q^2}(\mathfrak{sl}_2)^{\otimes 2}$-bimodule structure) does not depend on the order in which the glueing was performed.
\end{remark}



\def\underline{\ot}{\underline{\otimes}}
\def{ _1\Delta }{{ _1\Delta }}
\def \cSs(\fS){ \cS(\mathfrak S)}
\def\ufS{\underline{\mathfrak S}} 
\def\underline \ast{\underline \ast}
\subsection{Braided tensor product} 


Let $U$ be a dual quasitriangular Hopf algebra. 
Assume $A$ is an algebra admitting two right $U$-comodule-algebra structures $\Delta_1:A\to A\otimes U$ and $\Delta_2:A\to A\otimes U$ which commute, i.e.
 \begin{equation}  (\Delta_1\otimes \mathrm{Id}_U)\circ \Delta_2 =(\mathrm{Id}_A \otimes \mathrm{fl} )\circ(\Delta_2\otimes \mathrm{Id}_U)\circ \Delta_1 
\label{eq.D12}
 \end{equation} 
where $\mathrm{fl} :U\otimes U\to U\otimes U$ is the flip operator. Denote the common operator of \eqref{eq.D12} by $\Delta_{12}$. 

 
Observe that since $\Delta_1$ and $\Delta_2$ commute,  $A$ can be endowed with a right $U$-comodule structure $\underline{ \Delta} :=\Delta_1 \underline \ast \Delta_2: A \to A \otimes U$ defined by
 \begin{equation}  
\underline{ \Delta} (x) = \sum x' \otimes u_1 u_2 \ \text{if} \ \Delta_{12}(x) = \sum x'\otimes u_1 \otimes u_2.
 \end{equation} 



However $\underline{ \Delta} : A \to A \otimes U$ is not an algebra homomorphism, i.e. $A$ is not a right $U$-comodule algebra with respect to $\underline{ \Delta} $, even though it is a right $U$-comodule algebra with respect to each of  $\Delta_1$ and $\Delta_2$. So we define a new product. For $x,y\in A$ let
 \begin{equation}  \label{eq:selfproduct}
 x\underline \ast y = \sum x' y' \rho(u \otimes v) \ \text{if} \ 
\Delta_2 (x) =\sum x' \otimes u,  
\Delta_1(y) =\sum y' \otimes v.
 \end{equation} 
 It is easy to check that $\underline \ast$ gives $A$ a new associative product, and we call $A$ with this new product  the \emph{self braided product} of $\Delta_1$ and $\Delta_2$ and denote it $\underline{\ot} A$.
 
 

\begin{lemma} 
With respect to the product $\underline \ast$ and the right $U$-comodule given by $\underline{ \Delta} =\Delta_1 \underline \ast \Delta_2$, the algebra $A$ is a right $U$-comodule-algebra. 
\end{lemma}
\begin{proof} We have to show that for $x,y\in A$ one has 
 \begin{equation}  \underline{ \Delta}  (x\underline \ast y)= \underline{ \Delta} (x)\underline \ast\,  \underline{ \Delta}  (y).  \label{eq.uw1}
 \end{equation} 
Let us now  write $\Delta_{12}(x)$ and $\Delta_{12}(y)$ as
\begin{align*}
\Delta_{12}(x)= \sum x' \otimes u_1 \otimes u \in A \otimes U \otimes U \\
\Delta_{12}(y)= \sum y' \otimes v  \otimes v_2 \in A \otimes U \otimes U.
\end{align*}
 Using  the commutativity of $\Delta_1$ and $\Delta_2$ and a simple calculation, we obtain
\begin{align}
 \underline{ \Delta} (x\underline \ast y) &= \sum \rho(u''\otimes v'') \, x' y'  \otimes u_1   v'u'    v_2      \label{eq.eq1}\\
 \underline{ \Delta} (x)\underline \ast\,  \underline{ \Delta}  (y)  &= \sum  \rho(u'\otimes v') \, x' y'  \otimes u_1   u'' v''     v_2   \label{eq.eq2} ,
\end{align}
where $\Delta(u)= \sum u' \otimes u'', \Delta(v) = v' \otimes v''$ are coproducts in $U$.
The right hand sides of \eqref{eq.eq1} and \eqref{eq.eq2} are equal thanks to \eqref{eq.rflip}. This proves \eqref{eq.uw1}. For those who are familiar with graphical calculations in Hopf algebras,
we provide a graphical proof in Figure \ref{fig:selftensorproductcompatible}.
\end{proof}
\begin{figure}[htpb]
\raisebox{1cm}{$\underline{ \Delta} (\cdot \underline \ast \cdot)=$}
\includegraphics[width=1.9cm]{selftensorproduct1-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=1.9cm]{selftensorproduct2-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=1.9cm]{selftensorproduct3-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=2.08cm]{selftensorproduct4-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=2cm]{selftensorproduct5-eps-converted-to.pdf}\raisebox{1cm}{=}\\\

\raisebox{1cm}{=}\includegraphics[width=1.7cm]{selftensorproduct6-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=1.7cm]{selftensorproduct7-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=1.7cm]{selftensorproduct8-eps-converted-to.pdf}\raisebox{1cm}{\ =}\includegraphics[width=2cm]{selftensorproduct9-eps-converted-to.pdf}\raisebox{1cm}{$=\underline{ \Delta} (\cdot) *\underline{ \Delta} (\cdot)$}
\caption{The proof of the compatibility of $\underline{ \Delta} $ and $\underline \ast$. The diagrams are to be read from bottom to top, the thick (resp. thin) strands are $A$-colored (resp. $U$-colored), the crossings are flips, the white (resp. gray) solid dots represent $\Delta_1$ (resp. $\Delta_2$), the rectangle represents the co-$R$-matrix $\rho$, the black (resp. white) triangle is the product (resp. coproduct) of $U$, the thick trivalent vertex is the initial product in $A$. The equalities follow in order from: compatibility of $\Delta_i$ with the product of $A$, $\Delta_1$ commutes with of $\Delta_2$, coassociativity of $\Delta_i$, associativity of the product in $U$, equation \eqref{eq.rflip},  coassociativity of $\Delta_i$, $\Delta_1$ commutes with $\Delta_2$, associativity of the product in $U$.
}\label{fig:selftensorproductcompatible}
\end{figure}



\begin{example}[Braided tensor product]
The first  example of the above structure is the well-known {\em braided tensor product of two right comodule-algebras}, which we describe in details for the reader's convenience.
Suppose $A_1, A_2 $ are right comodule-algebras over a dual quasitriangular  Hopf algebra $U$. The tensor product 
$A=A_1 \otimes_{\mathcal R} A_2$ has two commuting right $U$-comodule structures. Namely  $\Delta_1=(\mathrm{Id}_{A_1}\otimes \mathrm{fl} )\circ (\Delta_{A_1}\otimes \mathrm{Id}_{A_2})$ and $\Delta_2=\mathrm{Id}_{A_1 }\otimes \Delta_{A_2}$. 




By the above construction, $A$ has  the structure of a right $U$-comodule algebra, with the coaction $\underline{ \Delta} = \Delta_1 \underline \ast \Delta_2$ and the product $\underline \ast$. Explicitly, for $x\in A_1$ and $y\in A_2$, the coaction is
$$\underline{ \Delta}  (x\otimes y)= \sum (x' \otimes y') \otimes uv \ \text{if} \ \Delta_{A_1}(x)= \sum x' \otimes u, \Delta_{A_2}(y)= \sum y' \otimes v. $$

Let us now describe the product $\underline \ast$. 
Identify $A_1$ with $A_1 \otimes \{1\}$ and $A_2$ with $\{1\} \otimes A_2$ (as subsets of $A_1\otimes_{\mathcal R}A_2)$.  Then the new product \eqref{eq:selfproduct} is given by
 \begin{equation}   \label{eq.brprod}
x\underline \ast y = \begin{cases} xy \qquad &\text{if } \ x, y \in A_1 \ \text{or } \ x, y \in A_2 \\
x \otimes y &\text{if } \ x \in A_1 , y \in A_2 \\
\sum \rho(u\otimes v)(y' \otimes  x')
&
\text{if } \ x \in A_2, y \in A_1, 
\end{cases} 
 \end{equation} 
where $\Delta_{A_2}(x)= \sum x'\otimes u,\Delta_{A_1}(y)= \sum y'\otimes$,   and $\rho$ is the co-$R$-matrix.


The algebra $A_1 \otimes_{\mathcal R}A_2$ with this new product is called the {\em braided tensor product} of $A_1$ and $A_2$, and is denoted by $A_1 \underline{\ot}_U A_2$.
For details see \cite{MajidFoundation}.

\end{example}





\begin{example}[Transmutation]  \label{ex.trans}
Assume that $U$ is a dual quasitriangular Hopf algebra and let $A=U$.  Then $\Delta_2:= \Delta: A \to A\otimes U$ gives $A$ a right $U$-comodule algebra structure. To get another right $U$-comodule structure one converts the standard left comodule structure to a right one by
 \begin{equation}  \Delta_1(x) := \sum x' \otimes S(u) \ \text{if} \ \Delta(x) = \sum u \otimes x'.
 \end{equation} 

However $\Delta_1$ is not compatible with the algebra structure of $A$. One can twist the product of $A$ using the co-$R$-matrix $\rho$ of $U$ to make both $\Delta_1$ and $\Delta_2$ right comodule algebras as follows.
 Define a new product on $A$ using the common value of \eqref{eq.rflip}, i.e.
  \begin{equation}   x \odot y = \sum \rho (x'\otimes y') x'' y'',\ \text {if} \ \Delta(x) =\sum x' \otimes x'', \Delta(y) = \sum y' \otimes y''.
 \label{eq.newprod}
  \end{equation} 
It is easy to check that this gives $A$ a new product, with which both $\Delta_1$ and $\Delta_2$ give $A$  right $U$-comodule algebra structures. Besides, $\Delta_1$ and $\Delta_2$ commute.


Our construction now gives $A$ a right $U$-comodule algebra structure whose coaction $\underline{ \Delta} =\Delta_1\underline \ast \Delta_2$ and whose product $\underline \ast$ are given by
\begin{align}
\underline{ \Delta} (x) &= \sum x'' \otimes S(x') x''' \ \text{if}\  (\Delta\otimes \mathrm{Id}_U)\circ \Delta(x) = \sum x'\otimes x'' \otimes x'''
\label{eq.coact2}\\
x \underline \ast y&= \sum   x'' y'' \rho( S(x' x''') \otimes S( y')  )\  \text{if}\  \Delta(y) = \sum y'\otimes y''.\label{eq.transmprod}
\end{align} 
It turns out that the coaction \eqref{eq.coact2} is exactly the {\em right coadjoint action}, see \cite[Example 1.6.14]{MajidFoundation} and the product $\underline \ast$ is 
 exactly the {\em covariantized product} of \cite[Example 1.6.14]{MajidFoundation}. The algebra $A$, with this 
new product $\underline \ast$ and the original coproduct $\Delta$,  is known as the {\em transmutation} of $A$, and is a {\em braided group} in the braided category of $U$-comodules, see~\cite{MajidFoundation}.

\end{example}




\subsection{Attaching an ideal triangle is a braided tensor product} \label{sec:braidedtensor}
Suppose $e, e_1, e_2$ are oriented edges of an ideal triangle $\mathcal P_3$  as depicted in Figure \ref{fig:brtensor0}.
\FIGc{brtensor0}{Left: Ideal triangle $\mathcal P_3$. Middle: Glueing $\mathfrak S$ and $\mathcal P_3$ by $a_1=e_1$ and $a_2=e_2$ to get $\ufS$. Right: tangle diagram $x\in \cS(\mathfrak S)$ and its image $f(x)\in \cS(\ufS)$}{2.8cm}



Let $\mathfrak S$ be a (possibly disconnected) punctured bordered surface, with two boundary edges $a_1,a_2 \subset \partial\mathfrak S$. Define $\underline{\mathfrak S} = (\mathfrak S \sqcup \mathcal P_3)/(e_1=a_1, e_2= a_2)$, see Figure \ref{fig:brtensor0}. (A special case is when $\mathfrak S=\mathfrak S_1\sqcup \mathfrak S_2$ and $a_1\subset \mathfrak S',a_2\subset \mathfrak S''$.)
For $i=1,2$ the algebra $ \cSs(\fS)$ has a right comodule algebra structure $\Delta_i:= \Delta_{a_i}: \cS(\mathfrak S) \to  \cSs(\fS)\otimes {\mathcal O}_{q^2}(\mathrm{SL}(2))$. 
The two coactions $\Delta_1$ and $\Delta_2$ commute, see Lemma \ref{prop:comodule}. Hence we can define the self braided tensor product $\underline{\ot} \cS(\mathfrak S)$ of $\Delta_1$ and $\Delta_2$, which gives $ \cSs(\fS)$ a new right comodule algebra structure over ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. On the other hand, $\Delta_e: \cS(\underline{\mathfrak S}) \to \cS(\underline{\mathfrak S}) \otimes {\mathcal O}_{q^2}(\mathrm{SL}(2))$ gives $\cS(\underline{\mathfrak S})$ a right comodule algebra structure over ${\mathcal O}_{q^2}(\mathrm{SL}(2))$.

\begin{theorem}\label{teo:braidedtensor}
The right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra $\cS(\underline{\mathfrak S})$ is naturally isomorphic to the self braided tensor product $\underline{\ot} \cS(\mathfrak S)$, defined with the co-$R$-matrix $\rho'$ of \eqref{eq.coR2}.

In particular when $\mathfrak S=\mathfrak S_1\sqcup \mathfrak S_2$ and $a_1\subset  \mathfrak S_1,a_2\subset \mathfrak S_2$, the right comodule algebra $\cS(\underline{\mathfrak S})$ over ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ is naturally isomorphic to the braided tensor product $\cS(\mathfrak S_1) \underline{\ot} \cS(\mathfrak S_2)$.
\end{theorem}

\def  \raisebox{-13pt}{\incl{1.3 cm}{brtensor1}} {  \raisebox{-13pt}{\incl{1.3 cm}{brtensor1}} }
\def  \raisebox{-15pt}{\incl{1.5 cm}{brtensor2}} {  \raisebox{-15pt}{\incl{1.5 cm}{brtensor2}} }
\def  \raisebox{-13pt}{\incl{1.3 cm}{brtensor3}} {  \raisebox{-13pt}{\incl{1.3 cm}{brtensor3}} }
\def  \raisebox{-8pt}{\incl{.8 cm}{brtfour}} {  \raisebox{-8pt}{\incl{.8 cm}{brtfour}} }
\def  \raisebox{-13pt}{\incl{1.3 cm}{brtensor1-new}} {  \raisebox{-13pt}{\incl{1.3 cm}{brtensor1-new}} }
\def  \raisebox{-15pt}{\incl{1.5 cm}{brtensor2-new}} {  \raisebox{-15pt}{\incl{1.5 cm}{brtensor2-new}} }
\def  \raisebox{-13pt}{\incl{1.3 cm}{brtensor3-new}} {  \raisebox{-13pt}{\incl{1.3 cm}{brtensor3-new}} }
\def  \raisebox{-8pt}{\incl{.8 cm}{brtensor4-new}} {  \raisebox{-8pt}{\incl{.8 cm}{brtensor4-new}} }



\begin{proof}  Let ${\mathfrak o}_+$ be the positive orientation of the boundaries of $\mathfrak S$ and $\ufS$.  In the proof all tangle diagrams will have positive height order.

For a stated $\partial \fS$-tangle diagram $x$ let $f(x)$ be the stated $\partial \ufS$-tangle diagram obtained from $x$ by extending the strands ending on {$a_1\sqcup a_2$} until they end on $e$, with order on $e$ given by its positive direction,
see  Figure \ref{fig:brtensor0}. We require that $f(x)$ has no crossing inside $\mathcal P_3$ and this makes $f(x)$ unique up to isotopy. Since $f$ clearly preserves the defining relations of a stated skein algebra, we can extend it to an $\mathcal R$-linear map $f:\cS(\mathfrak S)\to \cS(\underline{\mathfrak S})$.


Recall that $\underline{\ot} \cS(\mathfrak S)$ is the same $ \cSs(\fS)$ with a new product $\underline \ast$ given by \eqref{eq:selfproduct}.

\begin{lemma}The map $f: \underline{\ot} \cS(\mathfrak S) \to \cS(\ufS)$ is an algebra homomorphism.
\end{lemma}
\begin{proof} 
Let $x,y$ be stated $\partial \fS$-tangle diagrams.

\FIGc{brtensorxy-new}{$xy,f(xy)$, and $f(x) f(y)$}{2.5cm}
We present $xy, f(xy), f(x)f(y)$ schematically as in Figure \ref{fig:brtensorxy-new}. By splitting along the dashed line in the picture of $f(x)f(y)$ and using the counit property which says $u = \sum u' \varepsilon(u'')$, we get, with $\Delta_2(x) = \sum x'\otimes u$ and $\Delta_1(y) = \sum y'\otimes v$,
\begin{align*}
f(x) f(y)
&= \sum   \raisebox{-13pt}{\incl{1.3 cm}{brtensor3-new}}  \ \otimes \  \varepsilon\left(   \raisebox{-8pt}{\incl{.8 cm}{brtensor4-new}}  \right) 
\\
&= \sum \,  f {( {x'  y'})\rho' (u \otimes  v)},
 \qquad \text{using co-$R$-matrix $\rho'$ of  \eqref{eq.coR2}} \\
&= f(x\underline \ast y)  \qquad \text{by   \eqref{eq:selfproduct}}.
\end{align*}
Thus $f$ is an algebra homomorphism.
\end{proof}

It remains to show that $f$ is an $\mathcal R$-linear isomorphism.
For $l\in \mathbb N$ let $F_l(\cS(\mathfrak S))= F_l^{a_1, a_2}(\cS(\mathfrak S)) $ and $F_l(\cS(\ufS))= F_l^{a_1, a_2}(\cS(\ufS)) $ be the filtrations defined in Subsection \ref{sec.filtration}. In other words, $F_l(\cS(\mathfrak S))$ is
the ${\mathcal R}$-submodule spanned by stated tangle diagrams $\alpha$ such that $I(\alpha, a_1)+ I(\alpha,a_2) \le l$, and similarly  for $F_l(\cS(\underline{\mathfrak S}))$.
Denote by $\mathrm{Gr}_*$ the corresponding graded $\mathcal R$-modules.
It is clear that $f$ preserves the filtrations $F_l$. It is enough to show that $\mathrm{Gr}(f)$ is a bijection. 


Let $B_{m,n}$ be the set of isotopy classes of simple $\partial \fS$-tangle diagrams $\alpha$ such that $I(\alpha, a_1)=m, I(\alpha, a_2)=n$ and $\alpha$ is increasingly stated on each boundary edge, except for $a_1$ and $a_2$ where it is not stated.
 Then 
\begin{align}
\mathrm{Gr}_l (\cS(\mathfrak S)) &= \bigoplus _{ m+n=l, \ x\in B_{m,n}} V(x)\\
\mathrm{Gr}_l (\cS(\mathfrak S)) &= \bigoplus _{ m+n=l, \ x\in B_{m,n}} W(x).
\end{align}
Here $V(x)$ is the $\mathcal R$-submodule of $\mathrm{Gr}_l (\cS(\mathfrak S))$ spanned by $\alpha\in B(\mathfrak S;{\mathfrak o}_+)$ such that $\alpha=x$ if we forget the states on $a_1\cup a_2$, and $W(x)$ is the $\mathcal R$-submodule of $\mathrm{Gr}_l (\cS(\underline{\mathfrak S}))$ spanned by
$z\in B(\underline{\mathfrak S};{\mathfrak o}_+)$ such that $z\cap \mathfrak S= x$. It is enough to show that $\mathrm{Gr}(f)$ is an isomorphism from $V(x)$ to $W(x)$ for $x\in B_{m,n}$. 

Note that both $V(x)$ and $W(x)$ are free $\mathcal R$-modules, and both have rank
$ (m+1)(n+1)$.
Indeed there are $m+1$ increasing states on $x\cap a_1$ and $n+1$ increasing states on $x\cap a_2$ and these can be chosen independently, thus $\mathrm{rk}_{\mathcal R}(V(x))=(m+1)(n+1)$. For what concerns $W(x)$, observe that if  $z\in B(\underline{\mathfrak S};{\mathfrak o}_+)$ such that $z\cap \mathfrak S= x$ then $z\cap \mathcal P_3$ consists of  $k$ arcs (for some $k\in [0,\min(m,n)]$) connecting $ e_1$ and $ e_2$, $m-k$ arcs connecting $ e_1$ and $ e$, and finally $n-k$ arcs connecting $ e_2$ and $ e$; furthermore $z\cap e$ is increasingly stated so that there are exactly $(m+n-2k+1)$ such $z$.
 Thus we have:
$$\mathrm{rk}_{\mathcal R}(W(x))=
\sum_{k=0}^{min(m,n)}(m+n-2k+1)=(m+1)(n+1).$$
The reordering relation \eqref{eq.order} implies the relation in Figure \ref{fig:brten6-new}, which converts arcs connecting $e_1$ and $e_2$ to arcs with one end in $e$.  This shows that $\mathrm{Gr}(f): V(x) \to W(x)$ is surjective.
\FIGc{brten6-new}{}{1.7cm}

 Since both $V(x)$ and $ W(x)$ are free $\mathcal R$-modules having the same rank, we conclude that $\mathrm{Gr}(f): V(x) \to W(x)$ is an isomorphism. This completes the proof of the theorem.
\end{proof}


\subsection{Examples: Polygons, punctured bigons, and punctured monogons} \label{sub:monogons}


\begin{example}[Polygon] \label{polygons}
The {\em polygon $\mathcal P_n$ }is the standard  disc with $n$ punctures on its boundary removed.
Note that the  triangle $\mathcal P_3$ is the result of attaching an ideal triangle to two bigons. By Theorem \ref{teo:braidedtensor} we have 
 \begin{equation}   \mathscr S(\mathcal P_3) \cong {\mathcal O}_{q^2}(\mathrm{SL}(2))\underline \otimes_{{\mathcal O}_{q^2}(\mathrm{SL}(2))} {\mathcal O}_{q^2}(\mathrm{SL}(2)),
 \end{equation} 
where each copy of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ is a right ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodule algebra via the coproduct. Consequently, $\mathscr S(\mathcal P_3) \cong {\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes_\mathcal R {\mathcal O}_{q^2}(\mathrm{SL}(2))$ as $\mathcal R$-modules, and its algebra structure is described by \eqref{eq.brprod}. From here one can get a presentation of $\mathscr S(\mathcal P_3)$. In \cite{Le:TDEC}, a presentation of $\mathscr S(\mathcal P_3)$ was obtained by brute force calculation.

The $n$-gon $\mathcal P_n$ is the result of attaching an ideal triangle to the disjoint union of $\mathcal P_{n-1}$ and the bigon. By induction, we obtain
\begin{corollary}\label{cor:polygons} One has
$$\cS(\mathcal P_n)\cong {\mathcal O}_{q^2}(\mathrm{SL}(2))\underline{\ot}\cdots \underline{\ot} {\mathcal O}_{q^2}(\mathrm{SL}(2)),$$
 where there are $(n-1)$ copies of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$.
 \end{corollary}
 
 \end{example}
 




\def\mathrm{sw}{\mathrm{sw}}
\def\mathrm{ro}{\mathrm{ro}}
\begin{example}[Punctured bigons] Let $\mathfrak B_n$ be the bigon $\mathfrak B$ with $n$ interior punctures removed. 
For example 
$\mathfrak B_0=\mathfrak B$. Like in the case of $\mathfrak B$, we will show that $\cS(\mathfrak B_n)$ has a natural structure of a Hopf alagebra where all the operations can be defined geometrically. Recall that we  denote $e_l$ and $e_r$ the left and right boundary edges of $\mathfrak B$.
\FIGc{bigonn}{The embedding of the 4-punctured bigon $\mathfrak B_4$ into $\mathfrak B_8$ and the splitting homomorphism. The composition gives the coproduct.}{2cm}

  
Let $\iota:\mathfrak B_n\hookrightarrow \mathfrak B_{2n}$ be the inclusion identifying $\mathfrak B_n$ with the complement of $n$ closed disjoint arcs, each  connecting two punctures of  the $2n$-punctures of $\mathfrak B_{2n}$; See Figure \ref{fig:bigonn}. Let  $\Delta:\cS(\mathfrak B_n)\to \cS(\mathfrak B_n)\otimes\cS(\mathfrak B_n)$ be the map induced by $\iota$ and then splitting along the vertical arc connecting the two boundary ideal vertices of $\mathfrak B_{2n}$ and identifying the two halves with $\mathfrak B_n$. 

Let also $\epsilon:\cS(\mathfrak B_n)\to \mathcal R$ be the map obtained by including $\mathfrak B_n$ in $\mathfrak B_0=\mathfrak B$ and then applying $\epsilon :\cS(\mathfrak B)\to \mathcal R$. 

Finally  define $S:\cS(\mathfrak B_n)\to \cS(\mathfrak B_n)$ as the $\mathcal R$-linear map whose value on a stated tangle  $\alpha$ in $\mathfrak B_n \times (-1,1)$ is obtained by first switching all the states $\eta$ to $-\eta$ and all the framing vectors $v$ to $-v$, then rotating $\alpha$ by $180^\circ$ around the axis passing through the two boundary ideal vertices and finally multiplying the result by $(\sqrt{- 1}\,  q)^{(\delta_{e_l}(\alpha)-\delta_{e_r}(\alpha))}$ (where $\delta_{e}(\alpha)$ was defined in Subsection \ref{sec.filtration} as the sum of the states on $\alpha\cap e$). It is easily checked that all the defining relations \eqref{eq.skein}-\eqref{eq.order} are preserved so that $S$ is well-defined. 

\begin{proposition}\label{lem:Bnstandardhopf}

 For each $n\geq0$ the skein algebra $\cS(\mathfrak B_n)$, endowed with $\Delta,\epsilon,S$, is a Hopf algebra.


\end{proposition}
\begin{proof} From the definition of the splitting homomorphism it is clear that $\Delta$ is an algebra homomorphism. The
coassociativity of $\Delta$ is a direct consequence of the fact that applying twice $\iota$ induces the same morphism as the identification of $\mathfrak B_n$ with the complement of $n$ disjoint arcs in $\mathfrak B_{3n}$ each containing 3 punctures as depicted here:
$$\raisebox{-1cm}{\incl{2cm}{bigonnn}}
$$
The map $\epsilon$ is a morphism of algebras by its definition; to verify that $(\epsilon\otimes \mathrm{Id})\circ \Delta=\mathrm{Id}$ observe that if in Figure \ref{fig:bigonn} we fill the left punctures then we obtain the initial $\mathfrak B_n$.

That $S$ is an antimorphism is a consequence of the fact the revolution by $180^\circ$ about the 
the axis connecting the two boundary vertices reverses the height order in $\mathfrak B_n \times (-1,1)$.

We are left to prove  that  
 \begin{equation}  (S\otimes \mathrm{Id}) \circ \Delta=(\mathrm{Id}\otimes S) \circ \Delta=\epsilon, 
\label{eq.SS}
 \end{equation}  and since $S$ is an antimorphism, it is enough to check this identity on a set of generators. From relation \eqref{eq.order} we get that the set of  horizontal arcs, with all possible states, generates $\cS(\mathfrak B_n)$.
If $\alpha_{\eta\mu}$ is a horizontal arc with state $\eta$ on the left and state $\mu$ on the right, then the definition gives
$$S(\alpha_{\eta{\eta}})=\alpha_{\overline{\eta}\, \overline{\eta}}\  {\ \rm and\ }\  S(\alpha_{{\eta}\overline{\eta}})=-q^{2\eta}\alpha_{{\eta}\overline{\eta}},$$ so that on $\mathfrak B_0=\mathfrak B$, $S$ coincides with the antipode defined in \eqref{eq.ap1}. Now Identity \eqref{eq.SS} for $\alpha_{\eta\mu}$ follows from the same identity for the antipode in $\cS(\mathfrak B)={\mathcal O}_{q^2}(\mathrm{SL}(2))$.
\end{proof}
\begin{remark} (a) Since $\mathfrak B_n$ is the result of attaching $2n$ ideal triangles to $n+1$ bigons, Theorem \ref{teo:braidedtensor} can be used to show that as $\mathcal R$-algebras $\cS(\mathfrak B_n) \cong {\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes (n+1)} $ where the tensor product is over $\mathcal R$ and the algebra structure  of ${\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes (n+1)}$ is the unique one determined by:

(i) the subset $A_i= 1^{\otimes (i-1)}\otimes_\mathcal R {\mathcal O}_{q^2}(\mathrm{SL}(2)) \otimes_\mathcal R 1^{\otimes (n+1-i)}\subset {\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes (n+1)}$ is isomorphic to  ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ as  $\mathcal R$-algebras for each $i=1,\dots, n+1$, and 

(ii) for $a\in A_i$ and $b\in A_j$ with $i< j$, one has $ab= a\otimes b$ and
\begin{align}
ba  = \sum  \bar \rho'(b'\otimes a') \rho'(b'''\otimes a''')  a'' b'' 
\end{align}
where $\rho'$ is the co-R-matrix defined by \eqref{eq.coR2} and  $\bar \rho'$ is its inverse.

(b) For the  case  $n=1$, Proposition  \ref{lem:Bnstandardhopf} and a presentation of $\cS(\mathfrak B_1)$ were also independently obtained in \cite{Ko} via a direct calculation. 

\end{remark}


\end{example} 

\begin{example}[Punctured monogons] Let ${\mathcal M}_n$  be the monogon ${\mathcal M}$ with  $n$ punctures in its interior removed, see  Figure \ref{fig:monogonsbraided}. Let  $\underline{ \Delta} :\cS({\mathcal M}_n)\to \cS({\mathcal M}_n)\otimes \cS(\mathfrak B)$ be the right $\cS(\mathfrak B)$-comodule algebra structure induced by the only boundary edge of ${\mathcal M}_n$.
 
 
Similarly $\cS(\mathfrak B_n)$ has two commuting right comodule-algebra structures over $\cS(\mathfrak B)$ induced by $e_l$ and $e_r$, let $\Delta_1$ be the one induced $e_l$ and $\Delta_2$ be the one induced by $e_r$. 




Like in the bigon case, let $\iota:{\mathcal M}_n\hookrightarrow {\mathcal M}_{2n}$ be the inclusion identifying ${\mathcal M}_n$ with the complement of $n$  disjoint arcs, each  connecting two punctures of ${\mathcal M}_{2n}$. Observe that ${\mathcal M}_{2n}$ is the result of attaching an ideal triangle to two copies of ${\mathcal M}_n$, see Figure \ref{fig:monogonsbraided}.
By Theorem \ref{teo:braidedtensor} we have isomorphism of algebras $\cS({\mathcal M}_{2n})=\cS({\mathcal M}_n)\underline{\ot}\cS({\mathcal M}_n)$.
 Let  $\Delta:\cS({\mathcal M}_n)\hookrightarrow \cS({\mathcal M}_{2n})=\cS({\mathcal M}_n)\underline{\ot}\cS({\mathcal M}_n)$ be the map induced by $\iota_*$ and this isomorphism. 
\begin{figure}
$\iota:\raisebox{-1cm}{\includegraphics[width=2cm]{braidedmonogon1-eps-converted-to.pdf}}\hookrightarrow\raisebox{-1cm}{\includegraphics[width=2cm]{braidedmonogon2-eps-converted-to.pdf}}\simeq  \raisebox{-1cm}{\includegraphics[width=2cm]{braidedmonogon4-eps-converted-to.pdf}}$
\caption{
The inclusion $\iota:{\mathcal M}_4\hookrightarrow {\mathcal M}_8$ and the decomposition of ${\mathcal M}_{8}$ in a triangle and two copies of ${\mathcal M}_4$ used to fix the isomorphism $\cS({\mathcal M}_8)=\cS({\mathcal M}_4)\underline{\ot}\cS({\mathcal M}_4)$.}\label{fig:monogonsbraided}
\end{figure}

\begin{proposition}
(a) For each $n\geq 0$ the algebra $\cS({\mathcal M}_n)$ endowed with the map $\Delta$ and the map $\epsilon:\cS({\mathcal M}_n)\to \cS({\mathcal M}_0)=\mathcal R$ induced by inclusion is a bialgebra object in the category of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodules (i.e. its product, coproduct, unit and counit are morphisms of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$-comodules). 

(b) 
The ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ comodule-algebra $\cS({\mathcal M}_n)$ is isomorphic to the self braided tensor product $\underline{\ot} \cS(\mathfrak B_{n-1})$.
In particular $\cS({\mathcal M}_1)$ is isomorphic as a Hopf algebra to $BSL_q(2)$,  the ``transmutation'' of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, or ``braided version'' or ``covariant version'' of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ (see \cite{MajidFoundation} Examples 4.3.4 and 10.3.3). 
\end{proposition}
\begin{proof}
(a) The inclusion $\iota$ induces an injective  algebra  homomorphism  $\iota_*:\cS({\mathcal M}_n)\hookrightarrow \cS({\mathcal M}_{2n})=\cS({\mathcal M}_n)\underline{\ot}\cS({\mathcal M}_n)$. As in the case of bigons, the coassociativity follows from the fact that applying twice $\iota$ induces the same morphism as the identification of ${\mathcal M}_n$ with the complement of $n$ disjoint arcs in ${\mathcal M}_{3n}$ each containing 3 punctures as depicted here:
$$\raisebox{-1cm}{\includegraphics{braidedmonogon1-eps-converted-to.pdf}}\hookrightarrow\raisebox{-1cm}{\includegraphics{braidedmonogon2-eps-converted-to.pdf}}  \hookrightarrow\raisebox{-1cm}{\includegraphics{braidedmonogon3-eps-converted-to.pdf}}.$$
The map $\epsilon$ is a morphism of comodule-algebras by its definition; to verify that $(\epsilon\otimes \mathrm{Id})\circ \Delta=\mathrm{Id}$ observe that if in Figure \ref{fig:monogonsbraided} we fill the left punctures then we obtain the initial ${\mathcal M}_n$. 
The last fact to verify is that $\Delta$ is a morphism of comodules, i.e. denoting $\underline{ \Delta} :\cS({\mathcal M}_n)\to \cS({\mathcal M}_n)\otimes \cS(\mathfrak B)$ the right comodule structure, that $$(\Delta\otimes \mathrm{Id})\circ \underline{ \Delta} =(\mathrm{Id}\otimes \mathrm{Id}\otimes m)(\mathrm{Id}\otimes \mathrm{fl}\otimes\mathrm{Id})\circ(\underline{ \Delta} \otimes \underline{ \Delta} )\circ\Delta,$$ where $m:\cS(\mathfrak B)\otimes \cS(\mathfrak B)\to \cS(\mathfrak B)$ is the multiplication and $\mathrm{fl}$ is the flip. 
Since $\Delta$ is a morphism of algebras, it is sufficient to check this on generators of ${\mathcal M}_n$. For this we refer to Figure \ref{fig:deltamonogon}, where we depict the case $n=1$ but the proof is similar for other $n$. Letting $\alpha(x,y)\in B({\mathcal M}_n,{\mathfrak o})$ be the generator represented by a horizontal arc whose states are $y,x\in \{\pm\}$ depicted in the figure, the equality in the figure shows that we have: $$\Delta(\alpha(x,y))=q^{\frac{1}{2}}\alpha(+,y)\underline{\ot} \alpha(x,-)-q^{\frac{5}{2}}\alpha(-,y)\underline{\ot}\alpha(x,+).$$ Also, from the definition of $\underline{ \Delta} $ one computes $\underline{ \Delta} (\alpha(x,y))=\sum_{\epsilon,\eta} \alpha(\eta,\epsilon)\otimes (\alpha_{\eta x}\alpha_{\eta y})$ where $\alpha_{xy}$ denote the standard generators of $\cS(\mathfrak B)$.
Now the verification is a straightforward computation.
\begin{figure}
$\raisebox{-1.0cm}{\put(57,55){$x$}\put(-7,55){$y$}\includegraphics[width=2cm]{productbraidedcoproduct1-eps-converted-to.pdf}}=\ \ \ \ -q^{\frac{5}{2}}\raisebox{-1.0cm}{\put(57,55){$x$}\put(-7,55){$y$}\put(15,-6){$-$}\put(35,-6){$+$}\includegraphics[width=2cm]{productbraidedcoproduct2-eps-converted-to.pdf}}+ q^{\frac{1}{2}}\raisebox{-1.0cm}{\put(57,55){$x$}\put(-7,55){$y$}\put(15,-6){$+$}\put(35,-6){$-$}\includegraphics[width=2cm]{productbraidedcoproduct2-eps-converted-to.pdf}}.$
\caption{Re-expressing $\Delta(\alpha(x,y))$ as a braided tensor product. The equality is a consequence of \eqref{eq.order}.}\label{fig:deltamonogon}
\end{figure}



\def{\underline A}{{\underline A}}
\def{\overset \cdot -}{{\overset \cdot -}}
\def\underline S{\underline S}
(b) As ${\mathcal M}_n$ is obtained by attaching an ideal triangle to $\mathfrak B_{n-1}$, the claim follows from Theorem \ref{teo:braidedtensor}.
The isomorphism of $\cS({\mathcal M}_1)$ with $BSL_q(2)$ then follows from Example \ref{ex.trans}. Let us make explicit the isomorphism.

Let $T:\cS(\mathfrak B)\to \cS({\mathcal M}_1)$ be the $\mathcal R$-linear isomorphism obtained on a skein $a$ by embedding $\mathrm{rot}_*(\overline{\mathrm{inv}}_{e_l}^{-1}(a))$ (see Subsection \ref{sec.invers}) 
in the monogon through the embedding depicted in Figure \ref{fig:monogons} (a) and finally extending the strands of $\mathrm{rot}_*(\overline{\mathrm{inv}}_{e_l}^{-1}(a))$ until they hit the boundary of ${\mathcal M}_1$ (i.e. by applying the map $f$ defined in the proof of Theorem \ref{teo:braidedtensor}). We claim that pulling back through $T$ the coaction of $\cS({\mathcal M}_1)$ we get the right adjoint coaction on ${\mathcal O}_{q^2}(\mathrm{SL}(2))=\cS(\mathfrak B)$ and pulling back the product  $*$ on $\cS({\mathcal M}_1)$ we get the product $\underline \ast$ on $BSL_q(2)$ defined in Example \ref{ex.trans}:
$$\Delta^{coad}=(T^{-1}\otimes Id)\circ \underline{ \Delta} \circ T \qquad {\rm and} \qquad
\underline \ast=T^{-1}\circ(\cdot *\cdot)\circ (T\otimes T).$$  

\begin{figure}
\raisebox{1cm}{(a)}\includegraphics[width=2cm]{braidedmonogons-new-embedding-eps-converted-to.pdf}\raisebox{1cm}{\ \ (b)}\raisebox{1cm}{\ $\underline{ \Delta} \Bigg($}\includegraphics[width=2cm]{braidedmonogons-new-delta-eps-converted-to.pdf}\raisebox{1cm}{$\Bigg)=\ $}\includegraphics[width=2cm]{braidedmonogons-new-coaction1-eps-converted-to.pdf}\raisebox{1cm}{$\ \otimes\ $}\includegraphics[width=1cm]{braidedmonogons-new-coaction2-eps-converted-to.pdf} 
\caption{(a) The $\mathcal R$-linear map $T$ embeds $\mathfrak B$ into ${\mathcal M}_1$ as shown, after applying the map $\overline{\mathrm{inv}}_{e_l}^{-1}$ and rotating by $\pi$. (b) The right coaction of $\cS(\mathfrak B)$ on $\cS({\mathcal M}_1)$ is obtained by cutting on the dotted arc; in the figure, a skein $x=T(a)$ is cut in three parts by the dotted arc, the mid one is $T(a_{(2)})$ while the rightmost and leftmost are respectively $S(a_{(1)})$ and $a_{(3)}$ so that their product in the bigon cut out by the dotted curve is $S(a_{(1)})a_{(3)}$. This shows that the pullback of $\underline{ \Delta} $ is the adjoint coaction.}\label{fig:monogons}
\end{figure}
Using the definitions of $T$, of the antipode on $\cS(\mathfrak B)$ \eqref{eq.antipode} and of $\underline{ \Delta} $, one verifies directly that $(T^{-1}\otimes Id)\circ \underline{ \Delta} \circ T(x)=x''\otimes S(x')x'''$ for any $x\in {\mathcal O}_{q^2}(\mathrm{SL}(2))=\cS(\mathfrak B)$ (see Figure \ref{fig:monogons} (b)). 
Then since $*$ and $\underline{ \Delta} $ are compatible it is sufficient to check that the pullback of $*$ equals $\underline \ast$ on the generators of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$; this is a straightforward computation. 
A graphical explanation is as follows. Observe that if $x=T(a),y=T(b)$, then $x*y=(T(a*b))_{(1)}\epsilon((T(a*b))_{(2)})$ (this holds in general comodule algebras), so that we have:
\begin{center}
\includegraphics[width=2cm]{braidedmonogons-new-product-eps-converted-to.pdf}\raisebox{1cm}{$\ =\ $}\includegraphics[width=2cm]{braidedmonogons-new-productdelta-eps-converted-to.pdf}\raisebox{1cm}{$\cdot \epsilon\Bigg($}\includegraphics[width=1cm]{braidedmonogons-new-productcutbigon-eps-converted-to.pdf} \raisebox{1cm}{$\Bigg)$}
\end{center}
and that the right hand side equals $$T(a_{(2)}\cdot b_{(2)}) \rho' (S(a_{(1)}) a_{(3)} \otimes S(b_{(1)}))\epsilon(b_{(3)})=T(a_{(2)}\cdot b_{(2)}) \rho' (S(a_{(1)}) a_{(3)} \otimes S(b_{(1)}))$$ where $\rho'$ was defined in \eqref{eq.coR2}. This proves that $\underline \ast=T^{-1}\circ(\cdot *\cdot)\circ (T\otimes T)$.
\end{proof}



\end{example}
\section{A lift of the Reshetikhin-Turaev operator invariant} \label{sec.WT}
In this section we show that a Reshetikhin-Turaev operator invariant of tangles can be lifted to an invariant with values in ${\mathcal O}_{q^2}(\mathrm{SL}(2))$. In this section $\mathcal R=\mathbb Z[q^{\pm 1/2}]$.

\def\tilde V{\tilde V}
\def\partial_r{\partial_r}
\def\partial _l{\partial _l}



\subsection{Category of non-directed ribbon graphs} We will present the category of {\em non-directed ribbon graphs} \cite{Tu:Book}, also known as {\em framed tangles} \cite{Oh}, in the form convenient for us.

 The bigon is canonically isomorphic (in the category of punctured bordered surface) to the square $S= [0,1] \times (0,1)$.
Under the isomorphism $e_l$ and  $e_r$ are mapped respectively to $\{0\}\times (0,1)$ and $\{1\} \times (0,1)$, and abusing notation we also denote $\{0\}\times (0,1)$ and $\{1\} \times (0,1)$ respectively $e_l$ and $e_r$. We identify $S$ with $S \times \{0\}$ in $M:=S \times (-1,1)$. We have $\partial M = \partial S \times (-1,1) = (e_l \cup e_r) \times (-1,1)$.

\FIGc{tangle}{Left: Square $S=[0,1] \times (0,1)$, with edges $e_l$ and $e_r$. Middle: tensor product $\beta\otimes \beta'$. Right: composition $\beta \circ \beta'$, which can be defined only when $|\partial_r\beta|=|\partial _l\beta'|$ .}{2.5cm}

Recall that in the definition of a $\partial M$-tangle we require the boundary points over \red{any} boundary edge have distinct heights (see Subsection \ref{sub:tangle}).
If we change this requirement to: all boundary points are in $\partial S$ (in particular they all have the same height) we get the notion of a {\em $\partial S$-tangle}. Formally, a {\em $\partial S$-tangle} is a framed compact 1-dimensional unoriented manifold $\beta$ properly embedded in $M=S \times (-1,1)$ such that $\partial \beta$ has height 0, i.e.  $\partial \beta \subset \partial S =e_l \cup e_r$, and the framing at every boundary point of $\beta$ is vertical. Let $\partial_r \beta= \beta\cap e_r$ and $\partial _l\beta = \beta \cap e_l$.
Two $\partial S$-tangles are {\em $\partial S$-isotopic} if they are isotopic in the class of $\partial S$-tangles. If $|\partial_r\beta|=k$ and $|\partial _l\beta|=l$, then our notion of a  $\partial S$-tangle is the notion of  a non-directed ribbon $(k,l)$-graph without coupons in \cite{Tu:Book}.

After an isotopy we can bring $\beta$ to a generic position (with respect to the projection from $S \times (-1,1)$ onto $S$) and make the framing vertical everywhere\red{. The} projection of $\beta$ together with the over/under information at every crossing, is called a $\partial S$-tangle diagram of $\beta$. The isotopy class of $\beta$ is totally determined by any of its diagrams. 

The {\em non-directed ribbon graph category} is the category whose set of objects is $\mathbb N$ and a morphism from $k$ to $l$ is an isotopy class of {\em $\partial S$-tangle} $\beta$ such that $|\partial_r\beta|=k$ and $|\partial _l\beta|= l$, with the usual composition (see Figure \ref{fig:tangle}). If the tangles are oriented, then one would get the usual ribbon tangle category.


If $\beta, \beta'$ are two $\partial S$-tangles, define their tensor product $ \beta \otimes \beta'$ as the result of putting $\beta$ above $\beta'$ as in Figure \ref{fig:tangle}.
Under the tensor product and the composition, morphisms of the non-directed ribbon tangle category are generated by the five {\em elementary $\partial S$-tangles} depicted in Figure \ref{fig:eletangles}. 

\FIGc{eletangles}{Five elementary tangles}{1.5cm}



\def  \raisebox{-7pt}{\incl{.7 cm}{cap}} {  \raisebox{-7pt}{\incl{.7 cm}{cap}} }
\def  \raisebox{-7pt}{\incl{.7 cm}{cup}} {  \raisebox{-7pt}{\incl{.7 cm}{cup}} }
\def  \raisebox{-7pt}{\incl{.7 cm}{Xp}} {  \raisebox{-7pt}{\incl{.7 cm}{Xp}} }
\def  \raisebox{-7pt}{\incl{.7 cm}{Xn}} {  \raisebox{-7pt}{\incl{.7 cm}{Xn}} }


 From the ribbon category of finite-dimensional modules over the quantum group $U_{q^2}(\mathfrak{sl}_2)$ we get the Reshetikhin-Turaev operator invariant of $\partial S$-tangles, see \cite{Tu:Book}.
  Let us describe this operator invariant in a special case. Let $V$ be the free $\mathcal R$-module with basis $g_+, g_-$. The above mentioned operator invariant is the unique 
 functor $Z$ from the non-directed ribbon tangle category to the category of $\mathcal R$-modules preserving the tensor product such that $Z(n) = V^{\otimes n}$ and the values of the elementary tangles are given by
\begin{align}
Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cap}}   \right) &: V^{\otimes 2} \to R, \   g_+ \otimes g_-  \to  q^{-\frac 12}, \ g_- \otimes g_+ \to  -q^{-\frac 52}, \ g_+ \otimes g_+ \to 0, \  g_- \otimes g_- \to 0  \label{eq.cap}\\
Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cup}}   \right) &: R\to V^{\otimes 2},    1 \to  -q^{\frac 52} \, (g_+ \otimes g_- )+ q^{\frac 12}\,  (g_- \otimes g_+)  \label{eq.cup}\\
Z \left(  \raisebox{-7pt}{\incl{.7 cm}{Xp}}   \right)&: V^{\otimes 2} \to V^{\otimes 2},\   Z \left(  \raisebox{-7pt}{\incl{.7 cm}{Xp}}   \right) = q\, \mathrm{id} + q^{-1} \left(  Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cup}}   \right) \circ Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cap}}   \right)\right),  \label{eq.Xp}\\
Z \left(  \raisebox{-7pt}{\incl{.7 cm}{Xn}}   \right)&: V^{\otimes 2} \to V^{\otimes 2},\   Z \left(  \raisebox{-7pt}{\incl{.7 cm}{Xp}}   \right) = q^{-1}\, \mathrm{id} + q \left(  Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cup}}   \right) \circ Z \left(  \raisebox{-7pt}{\incl{.7 cm}{cap}}   \right)\right), \label{eq.Xn}
\end{align}
see \cite{Co}.  Here our $g_\pm$ are related to the basis vectors  $g_{\frac 12}$ in \cite{Co} by
\begin{align*}
 g_+= -\sqrt{-1} \,  q^{-3/2} g_{\frac 12}, \quad 
g_-= g_{-\frac 12}.
\end{align*}


\def{\vec \nu}{{\vec \nu}}
\def{\vec \mu}{{\vec \mu}}

Thus if $\beta$ is a $\partial S$-tangle with $|\partial _l\beta|=l$ and $|\partial_r\beta|=k$ then $Z(\beta)$ is an $\mathcal R$-linear map  $V^{\otimes k} \to V^{\otimes l}$ which depends only on the isotopy class of $\beta$. 
 
For ${\vec \nu}=(\nu_1,\dots,\nu_l)\in \{\pm \}^l$ and ${\vec \mu} =(\mu_1,\dots,\mu_k) \in \{\pm \}^k$ we can define the matrix entry $ _{\vec \nu} Z(\beta) _{\vec \mu}\in R$ such that
 \begin{equation}  
Z(\beta) (g_{\mu_1} \otimes \dots \otimes g_{\mu_k} )= \sum_{{\vec \nu} \in \{\pm \}^l}(\null  _{\vec \nu} Z(\beta) _{\vec \mu})\,  g_{\nu_1} \otimes \dots \otimes g_{\nu_l}.
 \end{equation} 




\begin{remark} In fact $V$ and all its tensor powers are  modules over the quantum group $U_{q^2}(\mathfrak{sl}_2)$, and all the operators $Z(\beta)$ are $U_{q^2}(\mathfrak{sl}_2)$-morphisms. But we don't need the structure of $U_{q^2}(\mathfrak{sl}_2)$-modules here. 
When $k=l=0$, we have $Z(\beta)\in R$, which is equal to the Kauffman bracket polynomial of $\beta$.

\end{remark}

\subsection{From $\partial M$-tangles to $\partial S$-tangles} Suppose $\gamma$ is a $\partial M$-tangle. We can  $\partial M$-isotope $\gamma$ so that its diagram $D$   has the height order on $e_l$ and $e_r$ determined by the arrows in Figure \ref{fig:tangle2}. This diagram determines a unique class of $\partial S$-tangle, denoted by $\bar \gamma$. Note that the arrows of $e_r$, $e_l$ are irrelevant for $\bar \gamma$. It is easy to see that the map $\gamma\to \bar \gamma$ is a bijection from the set of $\partial M$-isotopy classes of $\partial M$-tangles to the set of $\partial S$-isotopy classes of $\partial S$-tangles.

\FIGc{tangle2}{Direction of boundary edges, used to determine the height order}{2cm}

Suppose $|\gamma\cap e_l|=l$ and $|\gamma\cap e_r|=k$, and  ${\vec \nu}=(\nu_1,\dots,\nu_l)\in \{\pm \}^l$ and ${\vec \mu} =(\mu_1,\dots,\mu_k) \in \{\pm \}^k$. Let $_{\vec \nu} \gamma _{\vec \mu}$ be the stated $\partial M$-tangle \red{ whose underlying tangle} is $\gamma$ and whose states on $\gamma \cap e_l$ (respectively on $\gamma \cap e_r$) from top to bottom by the height order are $\nu_1,\dots, \nu_l$ (respectively $\mu_1,\dots, \mu_k$).
\begin{theorem} \label{teo:cat}
Assume the above notation. Consider $_{\vec \nu} \gamma _{\vec \mu}$ as an element of $\cS(\mathcal B)$. Then
 \begin{equation}   \epsilon \left ( _{\vec \nu} \gamma _{\vec \mu}   \right)\  =\ _{\vec \nu} Z(\bar \gamma) _{\vec \mu}. 
\label{eq.cat} \end{equation} 
\end{theorem}
Thus we see that the tangle invariant of  $_{\vec \nu} \gamma _{\vec \mu}$ with values in $\cS(\mathcal B)$ is stronger than the Reshetikhin-Turaev operator invariant. 

\begin{proof} Suppose $\gamma_1, \gamma_2$ are $\partial M$-tangles. 
Since $\overline{\gamma_1 \gamma_2}= \bar \gamma_1 \otimes \bar \gamma_2$, if \eqref{eq.cat} is true for $\gamma = \gamma_1$ and $\gamma=\gamma_2$, it is true for $\gamma= \gamma_1 \gamma_2$.

\def{\vec \eta}{{\vec \eta}}

Now suppose $\gamma_1, \gamma_2$ are obtained by splitting a $\partial M$-tangle $\beta$  along an ideal edge. By the splitting formula \eqref{eq.coproduct1} and the definition of $\Delta$, 
$$ \Delta(\null  _{\vec \nu} \beta _{\vec \mu}) = \sum_{{\vec \eta}}   \null _{\vec \nu} (\gamma_1)_{\vec \eta} \, \null _{\vec \eta} (\gamma_2) _{\vec \mu}. $$
Applying $\epsilon \otimes \mathrm{id}$ to the above, we get
$$ \null  _{\vec \nu} \beta _{\vec \mu} = \sum_{{\vec \eta}}  \epsilon( \null _{\vec \nu} (\gamma_1)_{\vec \eta}) \, \null _{\vec \eta} (\gamma_2) _{\vec \mu}.$$
Applying $\epsilon$ to the above, we get
$$ \epsilon(\null  _{\vec \nu} \beta _{\vec \mu} ) = \sum_{{\vec \eta}}  \epsilon( \null _{\vec \nu} (\gamma_1)_{\vec \eta}) \, \epsilon(\null _{\vec \eta} (\gamma_2) _{\vec \mu}),$$ 
which shows that if \eqref{eq.cat} holds for $\gamma=\gamma_1$ and $\gamma=\gamma_2$ then it holds for $\beta=\gamma_1 \circ \gamma_2$.

Thus it is enough to check \eqref{eq.cat} for the elementary tangles, for which  \eqref{eq.cat} follows from the explicit formulas \eqref{eq.cap}--\eqref{eq.Xn}.
\end{proof}




\subsection{A $1+1$-TQFT}

\def\mathsf{SetABim}{\mathsf{SetABim}}
\def\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}{\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}}

Let $\mathrm{Cob}_{1,1}$ be the symmetric monoidal category whose:

\noindent{\bf Objects} are numbered disjoint unions of open unoriented segments.\\
{\bf Morphisms} are diffeomorphism classes of punctured bordered surfaces $\mathfrak S$ with indexed boundary. Explicitly if $\partial \mathfrak S=e_1^L,\cdots ,e^L_m, e^R_1,\cdots, e^R_n$ then $\mathfrak S\in Mor(e_1^L\sqcup \cdots \sqcup e^L_m,e^R_1\sqcup \cdots \sqcup e^R_n)$ and the composition of morphisms is given by the glueing of marked surfaces explained above (associativity of compositions is ensured by the fact that we consider diffeomorphism classes of surfaces). In particular the identity morphism of $e_1\sqcup\cdots \sqcup e_n$ is a disjoint union of $n$ copies of $\mathfrak B$.\\
{\bf Tensor product} is the disjoint union, where the components of $(e_1\sqcup \cdots \sqcup e_n)\sqcup (e'_1\sqcup \cdots \sqcup e'_m)$ are ordered as $e_1\sqcup \cdots e_n\sqcup e'_1=e_{n+1}\sqcup e'_m=e_{m+n}$.

In order to define the target category of our TQFT functor, let us fix some notation. 
Given a finite set $C$, we will then denote by $U_{q^2}(\mathfrak{sl}_2)^{\otimes C}$ the algebra obtained as the tensor product $\bigotimes_{c\in C} U_{q^2}(\mathfrak{sl}_2)$ where each copy of $U_{q^2}(\mathfrak{sl}_2)$ in the tensor product is indexed by a distinct element of $C$.

\begin{definition}[$\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$]\label{def:NSCatBim}
Let $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ be the category whose objects are pairs $(C,[M])$ where $C$ is a finite set, $M$ is a right module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes C}$ which is a direct sum of finite dimensional modules and $[M]$ is its isomorphism class. A morphism from $(C,[M])$ to $(C',[M'])$ in $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ is the \emph{isomorphism class} of a bimodule $B$ over $(U_{q^2}(\mathfrak{sl}_2)^{\otimes C},U_{q^2}(\mathfrak{sl}_2)^{\otimes C'})$ which is a direct sum of finite dimensional bimodules and such that $[M\otimes_{U_{q^2}(\mathfrak{sl}_2)^{\otimes C}} B]=[M']$. The composition of $[B]:(C,[M])\to (C',[M'])$ and $[B']:(C',[M'])\to (C'',[M''])$ is $[B\otimes_{U_{q^2}(\mathfrak{sl}_2)^{\otimes C'}}B']$ (the composition is associative as we consider bimodules up to isomorphisms).  The monoidal structure on $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ is given by $(C,[M])\otimes (C',[M']):=(C\cup C',[M\otimes_{\mathcal R} M'])$ and its symmetry is given by exchanging $(C,[M])$ and $(C',[M'])$. 
\end{definition}

Then let $\cS:\mathrm{Cob}_{1,1}\to \mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ be defined as $$\cS(e_1\sqcup \cdots \sqcup e_n)=(C=\{e_1,\ldots e_n\},[{\BQ(q^{1/2})}\otimes_\mathcal R\cS(\mathfrak B)^{\otimes C}])$$ and for a punctured bordered surface $\mathfrak S$ whose boundary is \red{a union of} $C=\{e_1^L,\ldots ,e^L_n\}$ and $C'=\{e_1^R,\ldots ,e^R_m\}$ let $\cS(\mathfrak S)$ be the isomorphism class of the $(U_{q^2}(\mathfrak{sl}_2)^{\otimes C},U_{q^2}(\mathfrak{sl}_2)^{\otimes C'})$-bimodule ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)$.
\begin{theorem}[Skein algebra as a TQFT]\label{teo:skeintqft}
The functor $\cS$ is a symmetric monoidal functor into $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$.
\end{theorem}
\begin{proof}
By point b) of Theorem \ref{teo:module} it holds ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS( \mathfrak B)=\bigoplus_{i\geq 0} V^L_i\otimes V^R_i$ where $V^L_i$ (resp. $V^R_i$) is the irreducible $i+1$-dimensional left (resp. right) module over $U_{q^2}(\mathfrak{sl}_2)$. 
Then, arguing exactly as in the proof of Theorem \ref{r.Hoch2} one sees that for each $j\geq 0$ it holds $$[V^R_j\otimes_{U_{q^2}(\mathfrak{sl}_2)}({\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak B))]=[V^R_j].$$  Then ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak B)$ represents the identity morphism $(\{e\},[M])\to (\{e\},[M])$ (for any edge $e$) if restricted to finite dimensional right $U_{q^2}(\mathfrak{sl}_2)$-modules (which are all direct sums of $V^R_j$'s). 
Let $\mathfrak S'$ and $\mathfrak S''$  be two bordered punctured surfaces with boundaries indexed so that $\partial^L\mathfrak S'
=\{e_1,\ldots ,e_n\}=\partial^R\mathfrak S''$ and let $\mathfrak S$ be the surface obtained by glueing $\mathfrak S'$ and $\mathfrak S''$ by identifying the corresponding edges of $\partial^L \mathfrak S'$ and $\partial^R\mathfrak S''$ via an orientation reversing diffeomorphism. Then $\cS(\mathfrak S')$ (resp. $\cS(\mathfrak S'')$) is a right (resp. left) module over $U_{q^2}(\mathfrak{sl}_2)^{\partial^L\mathfrak S'}$ (resp. over $U_{q^2}(\mathfrak{sl}_2)^{\partial^R\mathfrak S''=\partial^L\mathfrak S'}$). To conclude, a repeated application of Theorem \ref{r.Hoch2} shows that the following holds up to isomorphism:
$$\cS(\mathfrak S)=\cS(\mathfrak S')\otimes_{U_{q^2}(\mathfrak{sl}_2)^{\otimes \partial^L\mathfrak S'}} \cS(\mathfrak S).$$  \end{proof}
  
 \begin{remark}
 The previous construction can be improved by passing to the setting of $2$-categories in order to consider objects no longer up to isomorphisms. This requires to consider marked surfaces and bimodules and will be dealt with in another work.  
 \end{remark} 

\def\overline{B}{\overline{B}}
\def\bar\theta{\bar\theta}
\def\partial \mathring {\Sigma}{\partial \mathring {\Sigma}}
\section{A non-symmetric modular operad} \label{sub:cooperad}


In this section we show that stated skein algebras provide an example of ``non symmetric geometric modular operad''. Such objects were defined by Markl (\cite{Mar}) as a generalisation of ``modular operads'' initially defined by Geztler and Kapranov (\cite{GK}). Given a monoidal category $C$, Markl defined a NS modular operad in $C$ as a monoidal functor $NSO:\mathsf{MultiCyc}\to C$ where $\mathsf{MultiCyc}$ is a suitable category of $\mathsf{MultiCyc}$ \red{``multicyclic sets''}. 
In this section we rephrase Markl's definition in the case of a suitable category of punctured bordered surfaces $\mathsf{TopMultiCyc}$; then we define a NS geometric modular operad as a monoidal functor $NSO:\mathsf{TopMultiCyc}\to C$. Finally we re-interpret skein algebras as an example of an NS geometric modular operad with values in $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ (see Definition \ref{def:NSCatBim}). 

\subsection{The category of topological multicyclic sets $\mathsf{TopMultiCyc}$.} 
In this section all surfaces will be oriented and all homeomorphisms will preserve the orientation. 

A \emph{cutting system} in a bordered punctured surface $\mathfrak S$ is a finite linearly ordered set ${\bf \alpha}$ of pairwise disjoint ideal oriented arcs $\alpha_1,\cdots ,\alpha_k\subset \mathfrak S$ (see Subsection \ref{sub:puncturedsurfaces}); a homeomorphism of cutting systems $\alpha$ and $\beta$ in $\mathfrak S$ is a homeomorphism $\phi:\mathfrak S\to \mathfrak S$ such that $\phi({\bf \alpha})={\bf \beta}$ so that it preserves the ordering and the orientations of the arcs. 
Cutting along all the arcs of a cutting system ${\bf \alpha}$ produces a bordered punctured surface $\mathsf{cut}_{{\bf \alpha}}(\mathfrak S)$ whose homeomorphism class depends only on the homeomorphism class of ${\bf \alpha}$. We will say that a cutting system ${\bf \alpha}$ is \emph{disconnecting}  if each arc in ${\bf \alpha}$ disconnects $\mathfrak S$. 

If the connected components of $\mathfrak S$ are linearly ordered then one can order the connected components of $\mathsf{cut}_{\bf \alpha}(\mathfrak S)$ as follows. Since $\mathsf{cut}_{\bf \alpha}(\mathfrak S)=\mathsf{cut}_{\alpha_k}\left( \mathsf{cut}_{\alpha_{k-1}}\left( \cdots\mathsf{cut}_{\alpha_1} (\mathfrak S)\right)\right),$ it is sufficient to define how to do it for  of the cut along a single ideal arc $\alpha$. 
If $\alpha$ does not disconnect, then there is a natural bijection between the components of $\mathfrak S$ and $\mathsf{cut}_{\alpha}(\mathfrak S)$ which induces the ordering on those of the latter surface. If $\alpha$ disconnects $\mathfrak S$, since both $\alpha$ and $\mathfrak S$ are oriented there is a well defined notion of the connected component of $\mathsf{cut}_{\alpha}(\mathfrak S)$ ``lying at the left'' and ``at the right of $\alpha$'' we then order them so that left precedes right and they are in the same position in the global ordering of the components of $\mathfrak S$ as the component they come from.

\begin{definition}[$\mathsf{TopMultiCyc},\mathsf{TopForest}$]
Let $\mathsf{TopMultiCyc}$ be the category whose objects are homeomorphism classes of punctured bordered surface whose connected components are linearly ordered, and where a morphism $\mathfrak S' \to \mathfrak S$ is a homeomorphism class of a cutting system $\alpha$ in $\mathfrak S$ such that $\mathsf{cut}_{\alpha}(\mathfrak S)$ is homeomorphic to $\mathfrak S'$.
The category $\mathsf{TopForest}$ is the subcategory whose objects are disjoint unions of polygons (see Example \ref{polygons}) and whose morphisms are those represented by disconnecting cutting systems. 
\end{definition}
If $\phi:\mathfrak S'\to \mathsf{cut}_{\alpha}(\mathfrak S)$ and $\psi:\mathfrak S\to \mathsf{cut}_{\beta}(\mathfrak S'')$ are homeomorphisms, then the composition of the morphisms associated to $\alpha$  and $\beta$ is the homeomorphism class of $\psi(\alpha)\sqcup \beta\subset \mathfrak S''$ where the numbering of the arcs of $\psi(\alpha)$ is lower than those of $\beta$. 
The identity morphism is represented by the class of the empty cutting system and it is straightforward to check that the composition is associative, so that the above are indeed categories. 

Both $\mathsf{TopMultiCyc}$ and $\mathsf{TopForest}$ are symmetric monoidal categories. Indeed the tensor product of $\mathfrak S'=\mathfrak S'_1\sqcup \cdots \sqcup\mathfrak S'_k$ and $\mathfrak S=\mathfrak S_1\sqcup \cdots \sqcup \mathfrak S_h$ (where $\mathfrak S'_i,\mathfrak S_j$ are connected for all $i,j$ and the linear order of the components is increasing from left to right) is defined as $$\mathfrak S'\otimes \mathfrak S:=\mathfrak S'_1 \sqcup \cdots \mathfrak S'_k\sqcup \mathfrak S_1\sqcup \cdots \sqcup \mathfrak S_h.$$
On the level of morphisms, if $\alpha\subset \mathfrak S_1$ and $\beta\subset \mathfrak S_2$ are two cutting systems then $\alpha\otimes \beta=\alpha\sqcup \beta$ where the linear order of the arcs of $\alpha$ is lower than that of the arcs in $\beta$. 
The symmetry is given by exchanging the components, so with the above notations $s(\mathfrak S'\otimes \mathfrak S)=\mathfrak S\otimes \mathfrak S'$ and $s(\alpha\otimes \beta)=\beta\otimes \alpha$. 


 The following definition is a reformulation of Markl's \cite{Mar} (Definition 4.1) in the context of punctured bordered surfaces:
\begin{definition}[NS Modular Operads]
Let $C$ be a symmetric monoidal category.
A $NS$ (non symmetric) geometric modular operad in $C$ is a symmetric monoidal functor $$O:\mathsf{TopMultiCyc}\to C.$$
A $NS$ cyclic operad in $C$ is a symmetric monoidal functor $O:\mathsf{TopForest}\to C$.
\end{definition} 

\subsection{NS geometric modular operads from skein algebras}
Recall that if $\mathfrak B$ is the bigon with one edge of type ``left'' and one of type ``right'', then $\cS(\mathfrak B)={\mathcal O}_{q^2}(\mathrm{SL}(2))$ as a $(U_{q^2}(\mathfrak{sl}_2),U_{q^2}(\mathfrak{sl}_2))$-bimodule.  Let also $\mathfrak B^R$ be the bigon whose edges are declared to be both of type $R$ (right edges) then $\cS(\mathfrak B^R)$ is the left module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes 2}$ whose underlying space is ${\mathcal O}_{q^2}(\mathrm{SL}(2))$ and on which the action of $x\otimes y\in U_{q^2}(\mathfrak{sl}_2)^{\otimes 2}$ is given by $x\otimes y\cdot b=x\cdot b\cdot r^*(y)$ (see Example \ref{ex:bigonright}). 



\begin{theorem}[Skein algebras as non symmetric operads]\label{teo:NSmodoperad}
There is a geometric NS-modular operad $NSO$ in $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ defined on an object $\mathfrak S$ of $\mathsf{TopMultiCyc}$ as $$NSO(\mathfrak S)=(\mathsf{Edges}(\mathfrak S),[{\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)])$$ where $\mathfrak S$ is the surface whose edges are all indexed to be of type L (left) and where we see ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)$ as a right module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes  \mathsf{Edges}({\bf \mathfrak S})}$ as explained in Subsection \ref{sub:modulestructure}.


If $\phi:{\mathfrak S'}\to { \mathfrak S}$ is a morphism associated to a cutting system $\alpha$, then let $$NSO(\phi)=[{\BQ(q^{1/2})}\otimes \cS(\mathfrak B)^{\otimes \mathsf{Edges}(\mathfrak S)}\otimes \cS(\mathfrak B^R)^{\otimes \alpha}]$$
where $\cS(\mathfrak B^R)^{\otimes \alpha}$ is the skein algebra of a disjoint union of one copy of $\mathfrak B^r$ per arc $\alpha_i\in \alpha$ whose boundary edges correspond to the edges of $\partial \mathfrak S'$ lying respectively at the left and at the right of $\alpha_i$. 
\end{theorem}
\begin{proof}
First of all observe that the functor is well defined as all surfaces are seen up to orientation preserving diffeomorphism and all modules and bimodules in $\mathsf{U_{q^2}(\mathfrak{sl}_2)\!-\!finBim}$ are seen up to isomorphism. 
Then we observe that the skein algebra of a disjoint union of $n$ bigons $${\BQ(q^{1/2})}\otimes_\mathcal R \cS(\sqcup_{j=1}^n \mathfrak B_j)={\BQ(q^{1/2})}\otimes_\mathcal R\cS(\mathfrak B)^{\otimes n}={\BQ(q^{1/2})}\otimes_\mathcal R{\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes n}$$ is the identity of $(\{1,2,\cdots ,n\},[M])$ (where $i$ is the left edge of the $i^{th}$-bigon) for any right module $M$ which is a direct sum of finite dimensional modules over $U_{q^2}(\mathfrak{sl}_2)^{\otimes n}$. Indeed $M$ is a direct sum of modules of the form $W\otimes V^R_{j}$ where $V^R_j$ is the $j+1$-dimensional irrep of $U_{q^2}(\mathfrak{sl}_2)$ and $W$ is a right module over $U_{q^2}(\mathfrak{sl}_2)^{\otimes n-1}$ which is itself a tensor product of finite dimensional modules. As proved in Theorem \ref{teo:module} $\cS(\mathfrak B)={\mathcal O}_{q^2}(\mathrm{SL}(2))=\bigoplus_{i} V^L_i\otimes V^R_i$ so that by the same arguments as in the proof of Theorem \ref{r.Hoch2} it holds:
$$[W\otimes V^R_{j}  \otimes_{U_{q^2}(\mathfrak{sl}_2)_{n}} \left( \bigoplus_i V^L_i\otimes V^R_i\right)]=\bigoplus_i[W\otimes \left(V^R_{j}  \otimes_{U_{q^2}(\mathfrak{sl}_2)} V^L_{i}\right)\otimes V^R_{i} ]=[W\otimes V^R_{j} ].$$
This shows that tensoring over $U_{q^2}(\mathfrak{sl}_2)$ with a single copy of ${\BQ(q^{1/2})}\otimes_\mathcal R \cS(\mathfrak B)$ provides the identity morphism; by Remark \ref{rem:glueingcommutes} repeating this along all the boundary edges one gets that tensoring with ${\BQ(q^{1/2})}\otimes_\mathcal R{\mathcal O}_{q^2}(\mathrm{SL}(2))^{\otimes n}$ is the identity of $(\{1,2,\cdots ,n\},[M])$ for any $M$ decomposing into a direct sum of finite dimensional modules.

Now we prove that if $i,j$ are two distinct boundary edges of a (possibly disconnected) surface $\mathfrak S'$, then
\begin{equation}\label{eq:glueingbigon}
[\cS(\mathfrak S')\otimes_{U_{q^2}(\mathfrak{sl}_2)^{\{i,j\}}}\cS(\mathcal B^R)]=[\cS(\mathfrak S)]
\end{equation}
where $\cS(\mathcal B^R)$ is seen as left module over $U_{q^2}(\mathfrak{sl}_2)^{\{i,j\}}$ and $\mathfrak S$ is the surface obtained by glueing the edges $i,j$ by an orientation reversing homeomorphism. 
Indeed by Remark \ref{rem:glueingcommutes} and Example \ref{ex:bigonR} to glue $\mathfrak B^R$ along $i$ and $j$, one can first glue $\mathfrak S'$ and $\mathfrak B^R$ along $i$ thus obtaining the surface $\mathfrak S'$ whose edge $i$ has been changed to type $R$ (see Example \ref{ex:bigonR}) and then operating a self-glueing along $i$ and $j$ on this surface. 
By Theorem \ref{r.Hoch2} the overall result is ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak S)$.
Then if $\alpha$ is a cutting system given by $c$ arcs, by  Remark \ref{rem:glueingcommutes} applying $c$ times \eqref{eq:glueingbigon} we get that tensoring with ${\BQ(q^{1/2})}\otimes_{\mathcal R}\cS(\mathfrak B^R)^{\otimes \alpha}$ is performing the glueing inverting the cut associated to the cutting system $\alpha$.   

\end{proof}


\section{Reduced skein algebra}\label{sec:reduced} We show that the stated skein algebra $\cS(\fS)$ has a nice quotient $\overline {\cS}(\fS)$, called the {\em reduced stated skein algebra}, which can be embedded in a quantum torus. This quotient is still big enough to contain the ordinary skein algebra and the Muller skein algebra. Unlike the case of the full fledged version $\cS(\fS)$, when $\mathfrak S$ is an ideal triangle, the reduced version $\overline {\cS}(\fS)$ is a quantum torus. The construction of the quantum trace map follows immediately from the splitting theorem for the reduced stated skein algebra. 

Throughout we fix a  punctured bordered  surface $\mathfrak S = \overline{\fS} \setminus \mathcal P$ and we will denote $\cS=\cS(\mathfrak S)$.

\subsection{Definition}

A non-trivial arc $\alpha\subset \mathfrak S$, which is the closed interval $[0,1]$ properly embedded in $\mathfrak S$ \red{ not homotopic relative its endpoints to a subset of the boundary $\partial \fS$}, is called a {\em corner arc} 
 if  it is as that depicted in Figure \ref{fig:badarc3}(a), i.e. it cuts off from $\mathfrak S$ a triangle with one ideal vertex. Such an ideal vertex is said to be surrounded by the corner arc $\alpha$. 
 
 A {\em bad arc} is a stated corner arc whose states 
  are as in the figure Figure \ref{fig:badarc3}, i.e. they are $-$ followed by $+$ if we go along the arc counterclockwise around a surrounded vertex.
\FIGc{badarc3}{(a) a bad arc (b) the splitting of a bad arc}{2.5cm} 
The reduced stated skein algebra $\overline{\mathscr S}(\mathfrak S)$ is defined to be  the quotient of \red{$\cS(\mathfrak S)$} by the 2-sided  ideal ${\mathcal I}^{\mathrm{bad}}$ generated by bad arcs. 







 
 \def{\bar \theta}{{\bar \theta}}
 \subsection{Basis}
Let  ${\mathfrak o}_+$ be the orientation of $\partial \mathfrak S$ induced by that of $\mathfrak S$, i.e. every boundary edge has positive orientation.
Then $B:=B(\mathfrak S;{\mathfrak o}_+)$ is an $\mathcal R$-basis of $\cS(\fS)$.  Let $\overline{B}=\overline{B}(\mathfrak S)\subset B$  be the subset consisting of all elements in $B$ which contain no bad arc.
 \begin{theorem} \label{teo:redbasis}
  The set $\overline{B}$ is a free $\mathcal R$-basis of the $\mathcal R$-module $\overline{\mathscr S}(\mathfrak S)$.
 \end{theorem} 

\begin{proof}  Let $A\subset \cS$ be the $\mathcal R$-span of $\overline{B}$ and $A'\subset \cS$ be the $\mathcal R$-span of $B \setminus \overline{B}$. One has $\cS = A \oplus A'$. Let us prove that the ideal ${\mathcal I}^{\mathrm{bad}}$ is equal to $A'$. 

 Proof that $A'\subset {\mathcal I}^{\mathrm{bad}}$. Let $\gamma\in (B \setminus \overline{B})$, i.e. $\gamma$ contains a bad arc. We have to show that $\gamma\in {\mathcal I}^{\mathrm{bad}}$. If an arc in $\gamma$ (at some corner) is bad, then the positive orientation and  increasing  states imply that all the arcs closer to the vertex of that corner are bad, see Figure~\ref{fig:badarc2}. 
\FIGc{badarc2}{If the outer arc is bad, then all inner arcs are bad, too.}{1.5cm}



Thus we assume that $\gamma$ has a bad arc which is an inner most arc, see Figure~\ref{fig:move1}(b).

\FIGc{move1}{(a) The product $\alpha\beta$, here $\alpha$ (in red) is a bad arc, (b) an element $\gamma\in B$ which has a bad  innermost arc (in red). }{3cm}

We have the relations in Figure \ref{fig:rel5}, which are part of Lemma~\ref{r.refl}.
\FIGc{rel5}{Moving endpoint with negative state (left) and positive state (right)}{2.3cm}
The first relation allows us to move the end of the red arc with state $-$ (in $\gamma$) up until we get the diagram in Figure~\ref{fig:move1}(a), which is of the form $\alpha\beta$, where $\alpha$ is a bad arc. The result is that $\gamma \overset \bullet =\alpha \beta$. Thus, $\gamma \in {\mathcal I}^{\mathrm{bad}}$.

 Proof that ${\mathcal I}^{\mathrm{bad}} \subset A'$. We have to show that  $\alpha \beta, \beta \alpha \in A'$ for any bad arc $\alpha$ and any $\beta \in B$. 

The product $\alpha\beta$: In this case, $\alpha \beta$ is presented as in Figure \ref{fig:move1}(a). We already saw that $\alpha \beta \overset \bullet = \gamma$, where $\gamma$ is as in Figure \ref{fig:move1}(b). Since $\gamma\in A'$, we see that $\alpha\beta \in A'$.

\FIGc{move2}{(a) Product $\beta\alpha$, where $\alpha$ is a bad arc (in red), (b) the diagram $\gamma$}{2.5cm}

The product $\beta \alpha$: In this case, $\beta \alpha$ is presented as in Figure \ref{fig:move2}(a). Using the 2nd relation in Figure \ref{fig:rel5}, we get that $\beta\alpha \overset \bullet =  \gamma$, where $\gamma$ is as in Figure \ref{fig:move2}(b). Since $\gamma\in A'$, we see that $\alpha\beta \in A'$.



Thus, ${\mathcal I}^{\mathrm{bad}} =A'$. Hence as $\mathcal R$-modules, $\overline{\mathscr S}(\mathfrak S)=\cS/J \cong A$, which has $\overline{B}$ as an $\mathcal R$-basis. 
\end{proof}            
 \def\bar B{\bar B}
\begin{remark} Positive order is used substantially in the proof. For other orientation of $\partial \fS$, the set similar to $\bar B$ might not be the basis of $\overline {\cS}(\fS)$.
\end{remark}

\begin{corollary} The ordinary skein algebra $\mathring {\cS}(\mathfrak S)$ and the Muller skein algebra $\cS^{\mathrm{+}}(\fS)$ embed naturally into the reduced skein algebra $\overline {\cS}(\fS)$.
\end{corollary}
\begin{proof} Clearly the standard basis of the ordinary skein algebra and the standard basis of the Muller skein algebra (where all the states are $+$) are subsets of the basis $\bar B$ of $\overline {\cS}(\fS)$.
\end{proof}

\subsection{Corner elements} 
\begin{proposition}\label{r.corner} Let $u$ be a stated corner arc with both states positive  and $v$ be the same arc  with both  states negative. Then $uv=vu=1$ in $\overline {\cS}(\fS)$.
\end{proposition}
\begin{proof} In $\overline {\cS}(\fS)$ we have 
$$ vu=   \raisebox{-12pt}{\incl{1.3 cm}{corner}} \ = \ q^2 \,  \raisebox{-12pt}{\incl{1.3 cm}{corner2}}  + q^{-1/2}\,   \raisebox{-12pt}{\incl{1.3 cm}{corner3}} \ = \ q^{-1/2}\,   \raisebox{-12pt}{\incl{1.3 cm}{corner3}}  \, = 1,$$
where the second identity follows from \eqref{eq.order} and  the last follows from \eqref{eq.arcs2}. Similarly,
$$ uv =   \raisebox{-12pt}{\incl{1.3 cm}{cornerp}} \ = \ q^{-2} \,  \raisebox{-12pt}{\incl{1.3 cm}{corner2p}}  - q^{-5/2}\,   \raisebox{-12pt}{\incl{1.3 cm}{corner3p}} \ = \ q^{-5/2}\,   \raisebox{-12pt}{\incl{1.3 cm}{corner3p}}  \, = 1,$$
where the second identity follows from \eqref{eq.order} and  the last follows  from \eqref{eq.arcs2}.
\end{proof}
\subsection{Filtration}

For a finite collection ${\mathfrak{A}}$ of ideal arcs or simple closed loops let $F^{\mathfrak{A}}_n(\overline {\cS}(\fS))$ be the $\mathcal R$-submodule of $\overline {\cS}(\fS)$ spanned by stated tangle diagrams $\alpha$ such that $\sum_{a\in {\mathfrak{A}}} I(a, \alpha) \le n$. Then $(F^{\mathfrak{A}}_n(\overline {\cS}(\fS)))_{n=0}^\infty$ is a filtration of $\overline {\cS}(\fS)$ compatible with the algebra 
structure. Denote by $\mathrm{Gr}^{\mathfrak{A}}(\overline {\cS}(\fS))$ the associated graded algebra:
$$ \mathrm{Gr}^{\mathfrak{A}}(\overline {\cS}(\fS)) = \bigoplus_{n=0}^\infty \mathrm{Gr}^{\mathfrak{A}}_n(\overline {\cS}(\fS)), \ \red{ \text{where}\ } \mathrm{Gr}^{\mathfrak{A}}_n(\overline {\cS}(\fS)) = F^{\mathfrak{A}}_n(\overline {\cS}(\fS))/F^{\mathfrak{A}}_{n-1}(\overline {\cS}(\fS)).$$

From Theorem \ref{teo:redbasis} we have the following analog of Proposition \ref{r.basis2}.
\begin{proposition}\label{r.basis2a} Suppose ${\mathfrak{A}}$ is a collection of boundary edges of $\mathfrak S$.

(a) The set $\{\alpha \in \bar B \mid \sum_{a\in {\mathfrak{A}}} I(\alpha, a) \le n\}$ is an $\mathcal R$-basis of $F^{\mathfrak{A}}_n(\overline {\cS}(\fS))$.

(b) The set $\{\alpha \in \bar B \mid \sum_{a\in {\mathfrak{A}}} I(\alpha, a) = n\}$ is an $\mathcal R$-basis of $\mathrm{Gr}^{\mathfrak{A}}_n(\overline {\cS}(\fS))$.
\end{proposition}

\subsection{Splitting theorem}
 \begin{theorem} \label{teo:rsplit}
Suppose  $\mathfrak S'$ is the result of splitting $\mathfrak S$ along an interior ideal arc $a$. The splitting algebra embedding
$\theta_a: \cS(\fS) \hookrightarrow \mathscr S(\mathfrak S')$
descends to an algebra embedding
 \begin{equation}   \bar\theta_a: \overline{\mathscr S}(\mathfrak S) \to \overline{\mathscr S}(\mathfrak S').
\label{eq.bth}
 \end{equation} 


Besides, if $a$ and $b$ are two disjoint ideal arcs in the interior of $\mathfrak S$, then 
 \begin{equation}  {\bar \theta}_a \circ {\bar \theta}_{b} = {\bar \theta}_{b} \circ {\bar \theta}_a 
\label{eq.com7}
 \end{equation} 
\end{theorem}     
    
 \def{a'}{{a'}}
 \def\aR{{a''}} 
 \def\mathrm{TL}{\mathrm{TL}}
\def\mathrm{BL}{\mathrm{BL}}
\def\mathrm{TR}{\mathrm{TR}}
\def\mathrm{BR}{\mathrm{BR}}
\def{S'_L}{{S'_L}}
\def{S'_R}{{S'_R}}
\def\tilde{\tal}{\tilde{\tilde \al}}
\def\tilde{\tilde{\beta}}{\tilde{\tilde{\beta}}}
\defD_L{D_L}
\defP_R{P_R}
\def\PL{P_L}  
   
    \begin{proof}
    Suppose $\alpha\subset \mathfrak S$ is a bad arc. The geometric intersection $I(\alpha,a)$ is 0 or 1. In the first case $\theta_a(\alpha)=\alpha$ is also a bad arc in $\mathfrak S'$.  In the second case the splitting of $\alpha$, given in Figure~\ref{fig:badarc3}(b), has a bad arc for both values of  $\nu\in \{\pm\}$. It follows that $\theta_a({\mathcal I}^{\mathrm{bad}}) \subset {\mathcal I}^{\mathrm{bad}}$. Hence $\theta_a$ descends to an algebra homomorphism ${\bar \theta}_a:  \overline {\cS}(\fS) \to \overline{\mathscr S}(\mathfrak S')$ and we also have~\eqref{eq.com7}.


It remains to show that ${\bar \theta}_a$ is injective. Let $0\neq x\in \overline{\mathscr S}(\mathfrak S) $. We have to show that ${\bar \theta}_a(x) \neq0$. 
Since $\bar B(\mathfrak S)$ is an $\mathcal R$-basis, there is a non-empty finite set $S \subset \bar B(\mathfrak S)$ such that
 \begin{equation}  
x = \sum_{\alpha\in S} c_\alpha \alpha, \quad 0 \neq c_\alpha \in \mathcal R.
 \end{equation}  
Let $k=\max_{\alpha\in S} I(\alpha, a)$. Then $S':=\{ \alpha\in S \mid I(\alpha,a)=k\}$ is non-empty.

Let $\mathrm{pr}:\mathfrak S'\to \mathfrak S$ be the projection and  ${a'},\aR \subset \mathfrak S'$ be the boundary edges which are  $\mathrm{pr}^{-1}(a)$. To simplify the notations we write $F^{\mathfrak{A}}_n$ and $\mathrm{Gr}^{\mathfrak{A}}_n$ for respectively $F^{\mathfrak{A}}_n(\overline{\mathscr S}(\mathfrak S')) $ and $\mathrm{Gr}^{\mathfrak{A}}_n(\overline{\mathscr S}(\mathfrak S'))$.
From the formula of the splitting homomorphism, for every $\alpha\in S$,
$$ {\bar \theta}_a(\alpha) \in F^{a'}_k \cap F^\aR_k \subset  F_{2k}^{\{{a'},\aR\}}.$$
Let $ P:  F_{2k}^{\{{a'},\aR\}} \twoheadrightarrow\mathrm{Gr}_{2k}^{\{{a'},\aR\}}$ be the canonical projection.
Clearly if $ \alpha\in S\setminus S'$ then $P(\alpha)=0$. We consider  Case 1 and Case 2 below.
\\
{\bf Case 1:} {\em   There exists $\beta\in S$ such that $P({\bar \theta}_a(\beta))\neq0$.}

\FIGc{split7}{The split surface $\mathfrak S'$, with orientations ${\mathfrak o}'$ on $\partial \fS'$. The top left, top right, bottom left, and bottom right corners are marked respectively $TL, TR, BL, BR$.} {2.5cm}

Choose an orientation of $a$ such that the induced orientation on $\aR$ is positive. Then the induced orientation on ${a'}$ is negative, see Figure \ref{fig:split7}. Let ${\mathfrak o}'$ be the orientation of $\partial \fS'$ which is positive everywhere except for the edge $a'$ where it is negative. For $\alpha\in S'$ its lift $\tilde \al=\mathrm{pr}^{-1}(\alpha)$ is a {\em partially stated tangle diagram}: it is stated everywhere except for endpoints on ${a'}\cap \aR$, and the endpoints on each of ${a'}$ and $\aR$ are ordered by ${\mathfrak o}'$. Let $\tilde \al^+$ be the same $\tilde \al$ except that the order on ${a'}$ (and hence on all edges) is given by the positive orientation.

For $ 0\le j\le k$ let
$s_j(\tilde \al)$ (respectively $s_j(\tilde \al^+))$ be the stated tangle diagram  which is  $\tilde \al$ (respectively $\tilde \al^+$) where  the states on each of ${a'}$ and $\aR$ are increasing and having exactly $j$ minus signs. Then $s_j(\tilde \al^+)$ is either equal to $0$ in $\overline{\mathscr S}(\mathfrak S')$ or belongs to the basis set $\bar B(\mathfrak S')$.
\def\tilde{\beta}{\tilde{\beta}}

By Proposition \ref{r.grbinom} and then Proposition \ref{r.orichange} we have, for some $f(\alpha,j) \in \mathbb Z$, 
 \begin{equation}  
P({\bar \theta}_a(\alpha)) = \sum_{j=0}^k  \binom kj_{q^4} \, s_j (\tilde \al) =  \sum_{j=0}^k  \binom kj_{q^4} q^{f(\alpha,j)}s_j(\tilde \al^+). \label{eq.lu1}
 \end{equation} 
Since  $P({\bar \theta}_a(\beta))\neq0$,  there is $l$ such that $s_l(\tilde{\beta}^+)\neq 0$ in $\overline{\mathscr S}(\mathfrak S')$ and hence $s_l(\tilde{\beta}^+)\in  \bar B(\mathfrak S')$.

Using \eqref{eq.lu1} we have
 \begin{equation}  
P ({\bar \theta}_a((x))= \sum_{\alpha\in S'} \sum_{j=0}^k \binom kj_{q^4} q^{f(\alpha,j)} \, c_\alpha\, s_j(\tilde \al^+).
\label{eq.lu2}
 \end{equation} 

As  $\alpha \in S'$ can be recovered from $\tilde \al$, if $\alpha\neq \beta$  then the two partially stated diagrams $\tilde \al$ and $\tilde{\beta}$  are not isotopic.
 It follows that  $s_l(\tilde{\beta}^+)\neq s_{j}(\tilde \al^+)$ for all $j$ and all $\alpha \neq \beta$. It is also clear that $s_j(\widetilde \theta  ^+) \neq s_l(\widetilde \theta  ^+)$ for $j \neq l$.
 Hence the right hand side of \eqref{eq.lu2} is not 0, since the basis element $s_l(\tilde{\beta}^+)$ has non-zero coefficient, and all other elements $s_j(\tilde \al^+)$ is either 0 or a basis element different from $s_l(\tilde{\beta}^+)$. Thus $P ({\bar \theta}_a((x))\neq 0$ and consequently ${\bar \theta}_a(x)\neq 0$. This completes the proof in Case 1.
 
 

\noindent {\bf Case 2:} {\em  For all $\alpha\in S$ we have $P({\bar \theta}_a(\alpha))=0$.} Identity \eqref{eq.lu1} shows that $s_j(\tilde \al^+)=0$ for all $0\le j\le k$ and all $\alpha\in S'$.

Incident with ${a'}$ there are two corners, the top left corner and the bottom left corner. 
 Similarly, incident with $\aR$ there are the top right corner and the bottom right corner, see Figure \ref{fig:split7}. A corner arc of $\tilde \al$ at one of these four corners has  one end stated and one end not stated, and it is called a {\em negative (respectively positive)} corner arc if this only state is negative (respectively positive).


For $\alpha\in S'$ and $\nu\in \{\pm\}$ let  $\mathrm{TL}_\nu(\alpha)$  be the number of top left corner arcs  whose only state  is $\nu$. Define $\mathrm{TR}_\pm(\alpha), \mathrm{BL}_\pm(\alpha), \mathrm{BR}\pm(\alpha)$ similarly.


\begin{lemma} Suppose $\alpha\in S'$. One of the following two mutually exclusive cases happens:\\
 (i)  $\mathrm{TL}_-(\alpha) >0$ and $\mathrm{BL}_+(\alpha) >0$, or \\
 (ii) $\mathrm{BR}_-(\alpha) >0$ and $\mathrm{BR}_+(\alpha) >0$. \label{r.lu77}
\end{lemma}
\begin{proof} Since $s_0(\tilde \al^+)$ is 0 in $\overline{\mathscr S}(\mathfrak S')$, it has a bad arc. This implies either $\mathrm{TL}_-(\alpha) >0$ or $\mathrm{BR}_-(\alpha) >0$.

Assume $\mathrm{TL}_-(\alpha) >0$. Since $\alpha$ does not have a bad arc, we conclude that $\mathrm{TR}_+(\alpha)=0$. Then from $s_k(\tilde \al^+)=0$ we see that $\mathrm{BR}_+(\alpha) >0$. Again since $\alpha$ does not have a bad arc, we conclude that $\mathrm{BR}_-(\alpha) =0$. Thus we have case (i) but not case (ii).

Assume $\mathrm{BR}_-(\alpha) >0$. Since $\alpha$ does not have a bad arc, we conclude that $\mathrm{BL}_+(\alpha)=0$. Then from $s_0(\tilde \al^+)=0$ we see that $\mathrm{TR}_+(\alpha) >0$. Again since $\alpha$ does not have a bad arc, we conclude that $\mathrm{BL}_-(\alpha) =0$. Thus we have case (ii) but not case (i).
\end{proof}
The cases (i) and (ii) of Lemma \ref{r.lu77} partition  $S'= {S'_L} \sqcup {S'_R}$, where
$$ {S'_L}=\{\alpha\in S' \mid \mathrm{TL}_-(\alpha)\, \mathrm{BL}_+(\alpha)  >0 \}, \quad  {S'_R}=\{\alpha\in S' \mid \mathrm{BR}_-(\alpha)\, \mathrm{BR}_+(\alpha) >0 \}.$$

\begin{lemma} If $\alpha\in {S'_L}$ then ${\bar \theta}_a(\alpha)=0$ in $\mathrm{Gr}^{a'}_k$. Similarly, if $\alpha\in {S'_R}$ then ${\bar \theta}_a(\alpha)=0$ in  $\mathrm{Gr}^\aR_k$.
\label{r.lu9}
\end{lemma}
\begin{proof} Suppose $\alpha\in {S'_L}$. For  ${\vec\nu}=(\nu_1,\dots, \nu_k)$ the stated tangle diagram $(\tilde \al,{\vec\nu})$ is defined to be $\tilde \al$ with states on both ${a'}$ and $\aR$ are sequence ${\vec\nu}$ listed from top to bottom.
By definition,
 \begin{equation}  
{\bar \theta}_a (\alpha) = \sum_{{\vec\nu}\in \{\pm \}^k} (\tilde \al, {\vec\nu})\label{eq.lu3a}.
 \end{equation} 
Let $(\tilde \al^+, {\vec\nu})_L$ be 
$\tilde \al^+$ whose states on $\aR$ is given by ${\vec\nu}$ but whose state on ${a'}$ is given by a permutation of ${\vec\nu}$ such that the states are increasing on ${a'}$. 
By Proposition \ref{r.orichange} 
 \begin{equation}  (\tilde \al, {\vec\nu})\overset \bullet =  (\tilde \al^+, {\vec\nu})_L  \quad \text{in } \mathrm{Gr}^{a'}_k \label{eq.lu6a}.
 \end{equation} 
If ${\vec\nu}$ has at least one negative sign then $(\tilde \al^+, {\vec\nu})_L$ has a bad arc in the bottom left corner (because $BL_+(\alpha) >0$) and hence is equal to 0 in $\overline{\mathscr S}(\mathfrak S')$. If ${\vec\nu}$ has at least one positive sign  then $(\tilde \al^+, {\vec\nu})_L$ has a bad arc in the top left corner (because $TL_-(\alpha) >0$) and hence is equal to 0 in $\overline{\mathscr S}(\mathfrak S')$. Thus we always have $(\tilde \al^+, {\vec\nu})_L=0$ in $\overline{\mathscr S}(\mathfrak S')$. From \eqref{eq.lu6a} and \eqref{eq.lu3a} we conclude that ${\bar \theta}_a (\alpha)=0$ in $\mathrm{Gr}^{a'}_k$.

The other case follows from the above case by noticing that if one rotates the Figure~\ref{fig:split7} by $180^\circ$, then the top left corner becomes the bottom right corner.
\end{proof}




As $\emptyset \neq S'= {S'_L} \sqcup {S'_R}$, one of ${S'_L}$ and ${S'_R}$ is non-empty. Without loss of generality we can assume that ${S'_L}$ is not empty.

Let $d = \min \{ \mathrm{TL}_-(\alpha) \mid {\alpha \in {S'_L}}\}$ and $S'' =\{ \alpha \in {S'_L} \mid \mathrm{TL}_-(\alpha) =d \}$. Then $S''\neq \emptyset$.
 
 Let $P_+: \overline{\mathscr S}(\mathfrak S') \to \overline{\mathscr S}(\mathfrak S')$ be the $\mathcal R$-linear map defined on basis elements $\gamma\in \bar B(\mathfrak S')$ by 
 $$ P_+(\gamma) =   \begin{cases}  \gamma \quad & \text{if} \ I(\gamma,{a'})=d, I(\gamma, \aR)=k,\  \text{all states on ${a'}$ are $+$}  \\
0 & \text{otherwise.}\end{cases} 
 $$
 
For $\alpha\in S''$ let $\tilde{\tal}$ be the stated tangle diagram obtained from $\tilde \al^+$ by first removing the $d$ negative top left corner arcs  then providing states on ${a'}$ and $\aR$ so that all states on ${a'}$ are $+$ and the states on $\aR$ are increasing and having exactly $d$ negative signs. Since $\mathrm{BR}_-(\alpha)=0$, we see that $\tilde{\tal}$ is an element of the basis $\bar B(\mathfrak S')$. As $\alpha$ can be recovered from $\tilde{\tal}$, the map $\alpha \to \tilde{\tal}$ from $S''$ to $\bar B(\mathfrak S')$ is injective.

 
Let $u$ be a top left corner arc whose both states are $+$.
\begin{lemma} For $\alpha\in S$ one has
 \begin{equation}  P_+({\bar \theta}_a(\alpha)\, u^d) = \begin{cases} q^{-(k-d)(k-d-1)/2 }\,   \tilde{\tal} \quad &\text{if} \ \alpha \in S''\\
0 & \text {if} \ \alpha \not\in S''.\end{cases}  \label{eq.lu5}
 \end{equation}  
\label{r.lu1}
\end{lemma}
\begin{proof} One has $S = ({S'_R} \sqcup {S'_L}) \sqcup (S \setminus S')$. If $\alpha\in (S\setminus S')$ then $I(\alpha, a) <k$ and hence $P^+({\bar \theta}_a(\alpha)) =0$.

If $\alpha\in {S'_R}$ then by Lemma \ref{r.lu9} one has ${\bar \theta}_a(\alpha)=0$ in $\mathrm{Gr}^\aR_k$ which means ${\bar \theta}_a(\alpha)$ is a linear combination of elements $\gamma\in \bar B$ with $I(\gamma,\aR) <k$. It follows that $P_+({\bar \theta}_a(\alpha))=0$.

It remains to consider the case $\alpha\in {S'_L}= S'' \sqcup ({S'_L} \setminus S'')$.
From \eqref{eq.lu3a},
 \begin{equation} 
P_+(\theta_a (\alpha) u^d ) = \sum_{{\vec\nu}\in \{\pm \}^k} P_+((\tilde \al, {\vec\nu})\, u^d).  \label{eq.lu3b}
 \end{equation} 
Recall that for $\beta\in \bar B(\mathfrak S')$ one defines $\delta_{a'}(\beta)$ as the sum of all the states of $\beta \cap {a'}$. From the definition, if $\delta_{a'}(\beta) \neq k-d$ then $P^+(\beta)=0$.
If ${\vec\nu}$ has $m$ negative signs where $m>d$ then 
$$ \delta_{a'}((\tilde \al, {\vec\nu}) \, u^d)=  k -2m +d < k-d,$$ 
and hence $P_+((\tilde \al, {\vec\nu}) \, u^d)=0$. Thus we can assume that in the sum in \eqref{eq.lu3b}, the number of negative signs in ${\vec\nu}$ is $\le d$.

 Assume that $\mathrm{TL}_-(\alpha)=m$. Note that the $m$ negative top left corner arcs of $\tilde \al$ are below any other components of $\tilde \al$.  Hence the number of the first $m$ components of ${\vec\nu}$ must be negative since otherwise one of the $m$ top left corner arcs is bad and $(\tilde \al,{\vec\nu})= 0$ in $\overline{\mathscr S}(\mathfrak S')$.
We conclude that if  $TL_-(\alpha) >d$ (that is, if $\alpha \in {S'_L}\setminus S''$), then
 \begin{equation}  P_+(\theta_a (\alpha) u^d ) =0 . \label{eq.lu7}
 \end{equation} 
Moreover, if $TL_-(\alpha)=d$ (that is, $\alpha \in S''$), then 
 \begin{equation} 
P_+(\theta_a (\alpha) u^d ) = P_+((\tilde \al, {\vec\nu}_d)\, u^d), \label{eq.lu4}
 \end{equation} 
where ${\vec\nu}_d\in \{\pm \}^k$ is the sequence whose first $d$ components are $-$ and all other components are $+$. The $d$ negative top left  corner arcs of $(\tilde \al,{\vec\nu}_d)$ are all $v$, the corner edge with negative states on both ends.  Hence we have
$ (\tilde \al, {\vec\nu})= \tilde{\tal}' v^d$, where $\tilde{\tal}'$ is the same as $\tilde{\tal}$ except that the order on ${a'}$ is negative. Using the height exchange move between positive states, see Equation \eqref{eq.reor1},  and relation $vu=1$ we get that
$$P_+((\tilde \al, {\vec\nu}_d)\, u^d) =  q^{-(k-d)(k-d-1)/2 }\tilde{\tal}, $$
which proves \eqref{eq.lu5} and completes the proof of the lemma.
\end{proof}
Let us continue the proof of the theorem for Case 2. From Lemma \ref{r.lu1} we have
$$ P_+({\bar \theta}_a(x) u^d ) = \sum_{\alpha\in S''} c_\alpha q^{-(k-d)(k-d-1)/2 } \tilde{\tal},$$
which is non-zero since $\{\tilde{\tal}\}$ are distinct elements of the basis $\bar B(\mathfrak S')$. The theorem is proved.
    \end{proof}
    
                                                                                                   
\subsection{The bigon} The elements $\alpha_{\mu\nu}\in\mathscr S(\mathcal B)$ are defined in Section \ref{sec:bigon}.
 \begin{proposition} \label{r.rbigon} Let $\mathcal B$ be the bigon.  There is an algebra isomorphism 
 $\overline{\mathscr S}(\mathcal B)\cong \mathcal R[x^{\pm 1}]$ given by
 $\alpha_{++}\to  x , \ \alpha_{--} \to x ^{-1}, \ \alpha_{+-} \to 0, \  \alpha_{-+}\to 0$.
 
                                                                                                  
\end{proposition}     
\begin{proof} A presentation of the algebra $\cS(\mathfrak B)\cong {\mathcal O}_{q^2}(\mathrm{SL}(2))$ is given by Theorem \ref{teo:SL2},  with generators $a=\alpha_{++}, b=\alpha_{--}, c= \alpha_{-+}, d= \alpha_{--}$ and relations \eqref{eq.rel1} and \eqref{eq.rel2}.  
The only bad arcs in $\mathcal B$ are $\alpha_{-+}=c$ and $\alpha_{+-}=b$. Thus $\overline{\mathscr S}(\mathcal B)= \mathscr S(\mathcal B) /{\mathcal I}^{\mathrm{bad}}$ has a presentation like that of ${\mathcal O}_{q^2}(\mathrm{SL}(2))$, with additional relations $b=c=0$. From the quantum determinant relation in \eqref{eq.rel2} we get $ad=1$ in $\overline{\mathscr S}(\mathcal B)$. 

On the other hand it is easy to check that the relations $b=c=0$ and $ad=1$ imply all other relations in \eqref{eq.rel1} and \eqref{eq.rel2}. Hence
$$ \overline{\mathscr S}(\mathcal B) \cong \mathcal R\langle a,b,c,d\rangle /(ad=1, b=c=0) \cong \mathcal R[a^{\pm1}].$$
\end{proof}                                                                                              


\subsection{The triangle} 
Let $\mathcal P_3$ be the ideal triangle, with boundary edges $a,b,c$ as in Figure~\ref{fig:triangle}. 
Let $\alpha, \beta,\gamma$ be the corner arcs which are opposite respectively to  $a, b$ and $c$. For $\mu,\nu\in \{\pm \}$ and $\xi\in \{\alpha, \beta,\gamma\}$ let $\xi(\mu\nu)$ be the arc $\xi$ with states $\mu$ and $\nu$ on the end points such that $\nu$ follows $\mu$ along $\xi$ counter-clockwise (with respect to the vertex surrounded by $\xi$). 

\FIGc{triangle}{Edges $a,b,c$ opposite to corner arcs $\alpha, \beta,\gamma$}{2.5cm}


For an anti-symmetric $n\times n$ matrix $A = (a_{ij})_{i,j=1}^n$ the {\em quantum torus} associated to $A$ is the algebra with presentation
$$  \mathcal R \langle x_i^{\pm 1}, i= 1, \dots n\rangle  /( x_i x_j = q^{a_{ij}} x_j x_i).$$
For basic properties of quantum tori see for example \cite[Section 2]{Le:QT}.

To the triangle $\mathcal P_3$ we associate the quantum torus $\mathbb T$ with presentation
$$\mathbb T := \mathcal R \langle \alpha^{\pm 1}, \beta^{\pm 1}, \gamma^{\pm 1} \rangle /( q\alpha \beta  =  \beta \alpha, q\beta \gamma =  \gamma\beta, q\gamma \alpha =  \gamma \alpha).
$$

\def\cS(\P_3){\mathscr S(\mathcal P_3)}
\def\bcS(\P_3){\overline{\mathscr S}(\mathcal P_3)}
The cyclic group $\mathbb Z/3= \langle \tau \mid \tau^3=1\rangle$ acts by algebra automorphisms on each of the algebras $\mathscr S(\mathcal P_3)$, $\overline{\mathscr S}(\mathcal P_3)$, and $\mathbb T$ as follows. In short  $\tau$ is rotation $\tau$  by $2\pi/3$ counterclockwise about the center of the triangle. This rotation induces the algebra automorphism $\tau$ of $\cS(\P_3)$; it also induces the algebra automorphism $\tau$ of $\bcS(\P_3)$. On $\mathbb T$ and  $\tau$ is given by
\begin{align*}
\tau(\alpha) =\beta,\ \tau(\beta) =\gamma, \  \tau(\gamma) = \alpha.
\end{align*} 


\begin{theorem} \label{teo:redtri}
The reduced skein algebra $\overline{\mathscr S}(\mathcal P_3)$ of the ideal  triangle is isomorphic to the quantum torus $\mathbb T$. The isomorphism is $\mathbb Z/3$-equivariant and given by 
 \begin{equation}   \alpha(++) \to \alpha, \quad \alpha(+-) \to q^{-\frac{1}{2}}\gamma \beta, \quad \alpha(-+) \to 0, \quad \alpha(--) \to \alpha^{-1}.
\label{eq.iso66}
 \end{equation} 
\end{theorem}   
\begin{proof}
By \cite[Theorem 4.6]{Le:TDEC} the algebra  $\cS(\mathcal P_3)$ is generated by $$X=\{ \alpha({\nu,\nu')},\beta({\nu,\nu'}), \gamma({\nu,\nu'})  \mid \nu, \nu'\in \{\pm \}\}$$ subject to the following relations and their images under $\tau$ and $\tau^2$:
\begin{align}
\label{rel1} \beta(\mu,\nu)\, \alpha(\mu',\nu')& = q \alpha(\nu, \nu') \,  \beta(\mu,\mu') -q^2 C^{\nu}_{\mu'} \, \gamma(\nu', \mu)
\\
\label{rel2} \alpha(-,\nu)\, \alpha(+,\nu')& = q^2 \alpha(+,\nu) \,\alpha(-,\nu') - q^{5/2} C^\nu_{\nu'}
\\
\label{rel2b} \alpha(\nu,-)\, \alpha(\nu',+)& = q^2 \alpha(\nu,+) \,\alpha(\nu',-) - q^{5/2} C^\nu_{\nu'}
\\
\label{rel3} \alpha(-,\nu)\, \beta(\nu',+)& = q^2 \alpha(+,\nu)\, \beta(\nu',-) - q^{5/2} \gamma(\nu,\nu')
\\
\label{rel4} \alpha(\nu,-)\, \gamma(+, \nu')& = q^2 \alpha(\nu,+)\, \gamma(-,\nu') + q^{-1/2} \beta(\nu',\nu).
\end{align}
As the only bad arcs are $\alpha(-,+), \beta(-,+),\gamma(-,+)$, the quotient $\bcS(\P_3)$ is obtained by adding the relations $\alpha(-,+)= \beta(-,+)=\gamma(-,+)=0$, and from this presentation one can check that the map given by \eqref{eq.iso66} and its images under the action of $\mathbb Z/3$ is an isomorphism.

Here is an alternative, more geometric proof. 
First in $\bcS(\P_3)$  we have 
 \begin{equation}   \alpha(++) \, \alpha(--) =1 , \quad  \beta(++)\, \alpha(++) = q\,  \alpha(++)\,  \beta(++), \label{eq.rel55}  \end{equation} 
and all its images under $\mathbb Z/3$. In fact the first identity follows from Proposition \ref{r.corner} and the second follows from the height exchange identity \eqref{eq.reor1}.
It follows that the $\mathbb Z/3$-equivariant map $f: \mathbb T \to \bcS(\P_3)$ given by
$$ f(\alpha)= \alpha(++),\ f(\alpha^{-1})= \alpha(--), \ \text{and images under $\mathbb Z/3$},$$
gives a well-defined algebra homomorphism, as all the defining relations of $\mathbb T$ are preserved under $f$. In $\bcS(\P_3)$ we have
 \begin{equation}  
\gamma(+-) = q^{-1/2}\, \beta(++)\,  \gamma(--),
 \end{equation} 
which follows from the identity in Figure \ref{fig:brten6-new} (where the left hand arc is stated to become $\alpha(+-)$). Thus all elements in the generator set  $X$ are in the image of $f$. This shows that $f$ is surjective. 

Let us show $f$ is injective. The set $\{ \alpha^k \beta^m \gamma^n \mid k,m,n,\in \mathbb Z\}$ is an $\mathcal R$-basis of $\mathbb T$. Assume that there is a finite set $S\subset \mathbb Z^3$ such that
 \begin{equation}   f\left (\sum_{(k,m,n) \in S} c_{k,m,n} \alpha^k \beta^m \gamma^n\right) =0, \ c_{k,m,n} \in \mathcal R.
\label{eq.lu20}
 \end{equation} 
 Multiplying the identity \eqref{eq.lu20} on the left by $f(\alpha^{k'} \beta^{m'} \gamma^{n'})$ with large $k', m', n'$ and using the $q$-commutations between $\alpha, \beta,\gamma$ we can assume that $k,m,n > 0$ in \eqref{eq.lu20}. For each $(k,m,n)\in \mathbb N^3$ let $z(k,m,n)$ be the stated  simple tangle diagram consisting of $k$ arcs parallel to $\alpha$, $m$ arcs parallel to $\beta$, and $n$ arcs parallel to $\gamma$, with all state positive. Note that $z(k,m,n) \in \bar B(\mathcal P_3)$.
Clearly the map $z:\mathbb N^3 \to \bar B(\mathcal P_3)$ is injective. 
As the diagram of $f(\alpha^k \beta^m \gamma^n)$ can be obtained from $z(k,m,n)$ by a sequence of height change moves of positively stated endpoints, the first identity of \eqref{eq.reor1} shows that 
$$ f(\alpha^k \beta^m \gamma^n)= q^{g(k,m,n)}\,  z(k,m,n)$$
for some $g(k,m,n) \in \mathbb Z$. From \eqref{eq.lu2} we get
$$ \sum_{(k,m,n) \in S} c_{k,m,n} q ^{g(k,m,n)}\,  z(k,m,n) =0.$$
As $z(k,m,n)$ are distinct elements of the basis $\bar B(\mathcal P_3)$, this forces all $c_{k,m,n}=0$. Hence $f$ is injective.

\end{proof}                                                                                                                      
\def\faces{\mathrm{\mathcal F(\mathcal E)}} 
                                      
\subsection{The quantum trace map}  \label{sec.rTrace} Assume that $\mathfrak S$ is {\em triangulable}, i.e. $\mathfrak S$   is  not one of the following: a monogon, a bigon, a sphere with one or two punctures. 
{\em A triangulation} $\mathcal E$ of $\mathfrak S$ is a collection consisting of all boundary edges and several ideal arcs in the interior of $\mathfrak S$ such that\\
(i) no two arcs in $\mathcal E$ intersect and no two are isotopic, and\\
(ii) if $a$ is an ideal arc not intersecting any ideal arc in $\mathcal E$ then $a$ is isotopic to one in $\mathcal E$.

It is known that if $\mathfrak S$ is triangulable, then by splitting $\mathfrak S$ along all interior ideal arcs in $\mathcal E$ we get a collection $\faces$ of ideal triangles.
By the splitting theorem, we get an algebra embedding of $\overline{\mathscr S}(\mathfrak S)$ into a quantum torus
$$ \Theta: \overline{\mathscr S}(\mathfrak S) \to \bigotimes_{\faces} \mathbb T.$$

In addition to the quantum torus $\mathbb T$ we associate the quantum torus $\mathbb T'$ to the standard ideal triangle $\mathcal P_3$:
\begin{align}
 \mathbb T' : = \mathcal R \langle a^{\pm 1}, b^{\pm 1}, c^{\pm 1} \rangle /( qab  =  ba, qbc =  cb, qca =   ac).
\end{align}
One should think of $a,b,c$ as the edges opposite to $\alpha,\beta,\gamma$, see Figure \ref{fig:triangle}. 

\def\cS(\P_3){\mathscr S(\mathcal P_3)}
\def\bcS(\P_3){\overline{\mathscr S}(\mathcal P_3)}
The cyclic group $\mathbb Z/3= \langle \tau \mid \tau^3=1\rangle$ acts by algebra automorphisms on  $\mathbb T'$  by
\begin{align*}
\tau(a) =b, \ \tau(b) =c, \ \tau(c) = a.
\end{align*} 


There is a $\mathbb Z/3$-equivariant algebra embedding 
$\mathbb T \hookrightarrow \mathbb T'$, defined by
$$ \alpha \to q^{1/2} bc , \quad \beta \hookrightarrow q^{1/2} ca , \quad \gamma \to q^{1/2} ab.$$



Consider  the composition $\tr_q$ given by
$$ \tr_q: \overline{\mathscr S}(\mathfrak S) \overset \Theta \hookrightarrow  \bigotimes_{{\faces}} \mathbb T \hookrightarrow \bigotimes_{{\faces}} \mathbb T'.$$


On the collection of all edges of all the triangles in $\faces$ define the equivalence relation \red{such that} $a' \cong a''$ if \red{$a'$ and $a''$} are glued together in the triangulation. Then the set of equivalence classes is canonically isomorphic to $\mathcal E$.
Let $\mathcal Y(\mathcal E)$ be the subalgebra of $\bigotimes_{\faces} \mathbb T'$ generated by all $a'\otimes a''$ with $a\cong a'$ and all boundary edges (each boundary edge is equivalent only to itself). It is easy to see that the image of $\tr_q$ is in $\mathcal Y(\mathcal E)$. Thus, $\tr_q$ restricts to
$$ \tr_q: \overline{\mathscr S}(\mathfrak S) \to \mathcal Y(\mathcal E).$$
 The algebra  $\mathcal Y(\mathcal E)$ is a quantum torus, known as the Chekhov-Fock algebra associated to a triangulation $\mathcal E$ of $\mathfrak S$, see \cite{BW,CF,Le:TDEC}.
 \red{ 
 The quantum trace map of Bonahon and Wong is an algebra homomorphism $\widehat \tr_q: \widehat \mathscr S(\mathfrak S)\to \mathcal Y(\mathcal E)$, where $\widehat \mathscr S(\mathfrak S)$ is the coarser version of $\mathscr S(\mathfrak S)$ defined using only \eqref{eq.skein} and \eqref{eq.loop}, see Subsection \ref{sub:statedskeinalgebra}. 


\begin{theorem}\label{thm.qtrace} 
If $\mathcal E$ is a triangulation of $\mathfrak S$ then the algebra embedding 
$ \tr_q: \overline{\mathscr S}(\mathfrak S) \hookrightarrow \mathcal Y(\mathcal E)$ is a refinement of the 
the quantum trace map of Bonahon and Wong  in the sense that $\widehat \tr_q$ is the composition $ \widehat \mathscr S(\mathfrak S) \twoheadrightarrow \overline{\mathscr S}(\mathfrak S) \overset {\tr_q} \hookrightarrow \mathcal Y.$
\end{theorem} 
\begin{proof}  In \cite{Le:TDEC} an algebra homomorphism $\varkappa_\mathcal E: \mathscr S(\mathfrak S) \to \mathcal Y(\mathcal E)$ is defined as the composition
$$ \cS(\fS) \hookrightarrow  \bigotimes_{{\faces}} \mathscr S( \mathcal P_3 )  \hookrightarrow \bigotimes_{{\faces}} \mathbb T',$$
where the map from $\mathscr S(\mathcal P_3)$ to $\mathbb T'$  is exactly the composition $\mathscr S(\mathcal P_3) \to \overline{\mathscr S}(\mathcal P_3)\to \mathbb T'$. It follows that $\varkappa_\mathcal E$ is the composition $\mathscr S(\mathfrak S) \twoheadrightarrow \overline{\mathscr S}(\mathfrak S) \overset {\tr_q} \hookrightarrow \mathcal Y$. In \cite{Le:TDEC} it is proved that $\widehat \tr_q$ is the composition $ \widehat \mathscr S(\mathfrak S) \twoheadrightarrow \mathscr S(\mathfrak S)  \overset {\varkappa_\mathcal E} \to \mathcal Y$. Hence  $\widehat \tr_q$ is also the composition $ \widehat \mathscr S(\mathfrak S) \twoheadrightarrow \overline{\mathscr S}(\mathfrak S)  \overset {\tr_q} \hookrightarrow \mathcal Y$.
\end{proof}

Besides giving another proof of the existence of the quantum trace map, Theorem \ref{thm.qtrace} shows that the kernel of $\widehat\tr_q$ is the ideal generated by relations \eqref{eq.arcs}, \eqref{eq.order}, and the ideal $\mathcal I^{\mathrm{bad}}$.
}
  

\subsection{Co/module structure for $\overline{\mathscr S}(\mathfrak S)$}     The Hopf algebra structure of $\mathscr S(\mathcal B)$ descends to a Hopf algebra of $\overline{\mathscr S}(\mathcal B)$. We identify $\overline{\mathscr S}(\mathcal B)\equiv \mathcal R[x^{\pm 1}]$ using the isomorphism of  Proposition \ref{r.rbigon}.  Then  $\Delta(x) = x \otimes x$ and $\epsilon (x)=1$.
                    
Arguing exactly as in Subsection \ref{sub:comodule}, one sees that for each surface $\mathfrak S$ and each edge $e$ of $\mathfrak S$, the algebra $\overline{\mathscr S}(\mathfrak S)$ has both a left and a right $\mathcal R[x^{\pm1}]$-comodule algebra structure (which is equivalent to a $\mathbb{Z}$-valued grading counting the number of $+$ and $-$ states of each skein along $e$): 
\begin{proposition}\label{prop:reducedcomodule} (a) The map $\Delta_e: \overline{\mathscr S}(\mathfrak S) \to  \overline{\mathscr S}(\mathfrak S) \otimes \overline{\mathscr S}(\mathcal B)$ gives $\overline{\mathscr S}(\mathfrak S)$ a right comodule-algebra structure over the Hopf algebra $\mathcal R[x^{\pm1}]$. Similarly $\null _e\Delta$ gives gives $\overline{\mathscr S}(\mathfrak S)$ a left comodule-algebra structure over the Hopf algebra $\mathcal R[x^{\pm1}]$. 
 
(b)  If $e_1,e_2$ are two distinct boundary edges, the coactions on the two edges commute, i.e.  for instance $$(\Delta_{e_2}\otimes \mathrm{id})\circ \Delta_{e_1}=(\Delta_{e_1}\otimes \mathrm{id})\circ \Delta_{e_2}.$$
\end{proposition}

In the reduced setting, though, Theorem \ref{teo:cotensor} does no longer hold:
indeed, with the notation in there, if $\beta\in \overline{B}(\mathfrak S)$ is a basis element intersecting a cutting edge exactly once, then its image $\theta(\beta)$ under the cutting morphism is $\theta(\beta)=\beta'_{++}+\beta'_{--}$ where $\beta'_{++},\beta'_{--}\in \overline{B}(\mathfrak S')$ are identical except for their states on $\beta'\cap (c_1\cup c_2)$. But it is not difficult to check that $\beta'_{++}$ is balanced: $$\Delta_{c_1}(\beta'_{++})=\beta'_{++}\otimes \alpha_{++}+\beta'_{+-}\otimes \alpha_{-+}=\beta'_{++}\otimes \alpha_{++}={}_{c_2}\Delta(\beta'_{++})$$ because the class of $\alpha_{-+}=\alpha_{+-}=0\in \red{\cS(\mathfrak B)}$, still $\beta'_{++}$ is not in the image of $\theta$. 

                                                      
  \def\mathbb O{\mathbb O}
\def\OOe{\sqrt{\mathbb O_e}}                                                      
\section{The classical case: twisted bundles}
In this section we will suppose that $\mathfrak S$ is a connected, oriented surface with a non-empty set of boundary edges and let ${\mathfrak o}$ be the positive orientation of $\partial \mathfrak S$ i.e. that induced by the orientation of $\mathfrak S$. We will prove that if $q^{\frac{1}{2}}=1$ then $\cS(\mathfrak S)$ is isomorphic to the algebra of regular functions on the affine variety of ``twisted bundles'' on $\mathfrak S$. \red{A} similar result for the case when $\partial \mathfrak S=\emptyset$ is well known (see for instance \cite{Thurston}). 

Fix an arbitrary  Riemannian metric and let $U\mathfrak S$ be the unit tangent bundle over $\mathfrak S$, with the canonical projection
 $\pi:U\mathfrak S\to \mathfrak S$.
A point in $U\mathfrak S$ is  a pair $(p,v)$,  where $p\in \mathfrak S$, $v\in T_p\mathfrak S, \|v\|=1$. For each immersion $\alpha:[0,1]\to \mathfrak S$ its {\em canonical lift} is \red{the} path $(\alpha(t),\frac{\dot{\alpha}(t)}{\| \dot{\alpha}(t))\|})$ in $U\mathfrak S$. In particular, since each edge $e$ of $\partial \mathfrak S$ is oriented by ${\mathfrak o}$, it has a canonical lift $\widetilde{e}\subset \partial U\mathfrak S$; we will denote $\widetilde{\partial \mathfrak S}:=\cup_{e\subset \partial \mathfrak S} \tilde{e}$.  If we let $-e$ be the edge oriented in the opposite way, then we get a different lift which we will denote $(-e)^\sim $. Let  $-\widetilde{\partial \mathfrak S}=\cup_{e\subset \partial \mathfrak S} (-e)^\sim$ and $\pm \widetilde{\partial \mathfrak S}=\widetilde{\partial \mathfrak S}\cup -\widetilde{\partial \mathfrak S}$.


 For a point $x\in \mathfrak S$ the fiber $\mathbb O=\pi^{-1} (x)$ is a circle, and we will orient it  according to the orientation of $\mathfrak S$. It is clear that the \red{free} homotopy class of $\mathbb O$ does not depend on $x$. 
 
 For each boundary edge $e$ choose a point $x\in e$.  
 Let $v\in T_x(e)$ be the unit tangent vector with orientation ${\mathfrak o}$. Then both $(x,v)$ and $(x,-v)$ are in $\pi^{-1}(x)$, and the half circle of $\pi^{-1}(x)$ going from $(x,v)$ to $(x,-v)$ in the positive direction is denoted by $\OOe$. The exact position of $x$ on $e$ will not be important in what follows. 

\begin{definition}[Fundamental Groupoids]
Let $X$ be a path connected topological space and $\{E_i\}_{i\in I}$ disjoint contractible subspaces of $X$.  The fundamental groupoid $\pi_1(X,\{E_i\}_{i\in I})$ is the groupoid (i.e. a category with invertible morphisms) whose objects are $\{E_i, i\in I\}$ and whose morphisms are the homotopy classes of oriented paths in $X$ with endpoints in $\cup_{i\in I} E_i$.
A morphism of groupoids if a functor of the corresponding categories. 
\end{definition}
Recall that a group is a groupoid with only one object.
\begin{lemma}[Extension of morphisms]\label{lem:extend}
With the above notation, let $E\subset X$ be a contractible subspace disjoint from $\cup_{i\in I} E_i$. Then given a morphism $\rho:\pi_1(X,\{E_i\}_{i\in I})\to G$ for some group $G$, an oriented path $\gamma$ connecting some $E_i$ to $E$, and an arbitrary $g\in G$ there is a unique extension $\rho':\pi_1(X,\{E_i\}_{i\in I}\cup \{E\})\to G$ of $\rho$ such that  $\rho'(\gamma)=g$ and  $\rho'(\alpha)=\rho(\alpha)$ for all $\alpha\in Mor(E_i,E_j)$ for some $i,j$. 
\end{lemma}
\red{
\begin{proof}
We sketch a proof. Let $\beta$ be a homotopy class of an oriented path connecting $E$ to some $E_j$; write $\beta=(\beta\circ \gamma)\circ \gamma^{-1}$. Observe that $\beta\circ \gamma\in Mor(E_i,E_j)$ thus $\rho$ is defined on it; hence define $\rho'(\beta)=\rho(\beta\circ \gamma)\cdot g^{-1}$. Similarly if $\beta$ is a path connecting $E_j$ to $E$ define $\rho'(\beta)=g\cdot \rho(\gamma^{-1}\circ \beta)$. Finally if $\beta$ is an endomorphism of $E$ define $\rho'(\beta)=g\cdot \rho(\gamma\circ \beta\circ \gamma^{-1})\cdot g^{-1}$. We leave to the reader to verify that this is indeed a functor with the required properties. 
\end{proof}
}

We shall be interested in two particular groupoids:  $\pi_1(\mathfrak S,\partial \mathfrak S)$ and $\pi_1(U\mathfrak S, \widetilde{\partial \mathfrak S})$. Note that $\pi:(U\mathfrak S,\widetilde{\partial \mathfrak S})\to (\mathfrak S,\partial \mathfrak S)$ induces a surjective morphism $\pi_*$ of groupoids. 

\begin{definition}[\red{Flat twisted $\mathrm{SL}_2(\mathbb{C})$-bundle}]\label{def:twbundle}
A \red{flat twisted $\mathrm{SL}_2(\mathbb{C})$-bundle} \red{(``twisted bundle'' in what follows to keep notation short)} on $\mathfrak S$ is a morphism $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb{C})$ such that $\rho(\mathbb O)=-Id$.
\end{definition}
By Lemma \ref{lem:extend} we extend $\rho$ to a morphism (with the same notation) $\rho:\pi_1(U\mathfrak S;\pm \widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb{C})$ such that for every boundary edge $e$,
\begin{equation}\label{eq:OO}
\rho(\OOe)=\left(\begin{array}{cc}
0 & -1\\
1 & 0\end{array}\right).
\end{equation}
Since $\mathfrak S$ is not a closed surface, its fundamental group $\pi_1(\mathfrak S)$ is a free group.
\begin{lemma} \label{lem:twistedbundles}
Suppose that $\partial \mathfrak S\neq \emptyset$. Then the set $tw(\mathfrak S)$ of twisted bundles on $\mathfrak S$ is the affine algebraic variety $\mathrm{SL}_2(\mathbb{C})^{n+k}$ where $$n=-1+\#\{e\subset \partial \mathfrak S\}\ {\rm and}\ k=\mathrm{rank}(\pi_1(\mathfrak S)).$$ 
In particular the algebra $\chi(\mathfrak S)$ of its regular functions is generated by the matrix entries of each of the copies of $\mathrm{SL}_2(\mathbb{C})$.  
\end{lemma}
\begin{proof}
\red{Since $U\mathfrak S$ is trivial, the fundamental groupoids $\pi_1(\mathfrak S;\partial \mathfrak S)$ and $\pi_1(U\mathfrak S,\widetilde{\partial \mathfrak S})$ are isomorphic. More explicitly,} we claim that there are non canonical injective morphisms of fundamental groupoids $s_*:\pi_1(\mathfrak S;\partial \mathfrak S)\to \pi_1(U\mathfrak S,\widetilde{\partial \mathfrak S})$.
To build one, pick any \red{non-zero} vector field on $\mathfrak S$ which is positively tangent to the edges of $\partial \mathfrak S$: it exists because we are not prescribing its behavior near the (non compact) cusps. This trivializes $U\mathfrak S$ as $\mathfrak S\times S^{1}$; let $s:\mathfrak S\to \mathfrak S\times\{1\}$ be a section of $\pi:U\mathfrak S\to \mathfrak S$. 

\red{The above isomorphism allows to provide an isomorphism from the set of twisted bundles to morphisms from $\pi_1(\mathfrak S;\partial \mathfrak S) \to \mathrm{SL}_2(\mathbb C)$. Indeed} to each twisted bundle $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb C)$ we associate $\rho': \pi_1(\mathfrak S;\partial \mathfrak S) \to \mathrm{SL}_2(\mathbb C)$ defined as $\rho'=\rho\circ s_*$ . Reciprocally given $\rho':\pi_1(\mathfrak S;\partial \mathfrak S) \to \mathrm{SL}_2(\mathbb C)$ we extend it to $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb C)$ by setting $\rho(\mathbb O)=-Id$ and $\rho|_{\pi_1(\mathfrak S\times\{1\})}=\rho'.$

\red{To conclude we now argue that the set of morphisms $\rho': \pi_1(\mathfrak S;\partial \mathfrak S) \to \mathrm{SL}_2(\mathbb C)$ is in bijection with $\mathrm{SL}_2(\mathbb{C})^{n+k}$. Indeed} fix a set of immersed smooth paths $\alpha_1,\ldots ,\alpha_n\subset \mathfrak S$ connecting a fixed edge $e_0\subset \partial \mathfrak S$ to each other edge of $\partial \mathfrak S$ as well as a set of paths whose endpoints are in $e_0$ representing generators $g_1,\ldots , g_k$ of $\pi_1(\mathfrak S;e_0)$ (which is free because $\partial \mathfrak S\neq \emptyset)$. \red{Since the fundamental group of $\mathfrak S$ is free, the list of values $(\rho'(\alpha_1),\ldots, \rho'(\alpha_n),\rho'(g_1)\ldots, \rho'(g_k))\in \mathrm{SL}_2(\mathbb{C})^{n+k}$} provides the sought non canonical \red{bijection.}
\end{proof}
\begin{example}\label{ex:twpolygon}
Let $\mathcal P_n$ be the $n$-polygon with vertices numbered in the orientation sense from $0$ to $n-1$; then $tw(\mathcal P_n)=\mathrm{SL}_2(\mathbb{C})^{n-1}$ where the $n-1$ matrices are given by the holonomies of the diagonals connecting the edge $v_0v_1$ to each other edge. Then $\chi(\mathcal P_n)= O(SL_2)^{\otimes n-1}$ and in particular $\chi(\mathfrak B)=O(SL_2)$ and $\chi(\mathcal P_3)=O(SL_2)\otimes O(SL_2)$ (where by ``equal'' we mean ``non-canonically isomorphic to'').
\end{example}
\begin{remark} The notion of \red{flat twisted $\mathrm{SL}_2(\mathbb{C})$-bundle} is closely related to the one considered in \cite{Thurston}.
\end{remark}
\subsection{Trace functions for non oriented curves} We will identify the states of a stated tangles with \red{vectors} in $\mathbb C^2$ as follows:
 $$+:=\left(\begin{array}{c}1\\0\end{array}\right), -:=\left(\begin{array}{c}0\\1\end{array}\right).$$
 If $\vec{x},\vec{y}\in \mathbb{C}^2$ let $\det(\vec{x}|\vec{y})$ denote the determinant of the matrix whose first column is $\vec{x}$ and second is $\vec{y}$. 

We will say an immersion  $a:[0,1]\to \mathfrak S$ is in {\em good position} if $a(0), a(1) \in\partial \mathfrak S$ 
and the tangent vectors $\dot a(0), \dot a(1)$ \red{are positively tangent to $\partial \mathfrak S$.}

An immersion  $\alpha:[0,1]\to \mathfrak S$ is {\em transversal} if $\alpha(0), \alpha(1) \in \partial \fS$ and $\alpha$ is transversal to $\partial \fS$ at $0$ and $1$. One can bring such a transversal 
  $\alpha$ to an arc  $a$ in good position by an isotopy (relative $0$ and $1$) in a small neighborhood of $\alpha(0)$ and $\alpha(1)$.  The canonical lift of $a$ will be denoted by $\hat \alpha$ and is called the {\em good lift} of $\alpha$. Note that the homotopy class of $\hat \alpha$ is uniquely determined by $\alpha$, and we will consider $\hat \alpha$ as an element of $\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})$.
Note that the good lift of the inverse path  $\alpha^{-1}$, defined by $\alpha^{-1}(t)=\alpha(1-t)$,  is not the inverse of $\hat \alpha$, since before    lifting one has to isotope $\alpha^{-1}$ to \red{a} good position. 
\def\mathrm{sign}{\mathrm{sign}}

A {\em stated transversal immersion} is a transversal immersion whose end points are stated~$\{\pm\}$.
\begin{definition}[Trace]\label{def:traces} Let $\rho$ be a twisted bundle on $\mathfrak S$. 

Assume $\alpha:[0,1]\to \mathfrak S$ is a stated transversal immersion with state  $\varepsilon$ at $\alpha(0)$ and $\eta$ at $\alpha(1)$.  Define the trace of $\alpha$ by
 $$\tr(\alpha):=\det(\eta| \rho(\hat {\alpha})\cdot \epsilon).$$
 
Assume $\beta:[0,1]\to \mathfrak S$ is an immersed closed curve (i.e. $\beta(0)=\beta(1)$ and $\beta$ has the same tangent at $0$ and $1$). Define the trace  of $\beta$ by
$$   \tr(\beta)=\tr(\rho(\widetilde {\beta'})),$$
where $\beta'$ is any smooth closed curve isotopic to $\beta$ such that $\beta'(0)\in \partial \fS$.
\end{definition}
In the first case if $\alpha'$ is homotopic to $\alpha$ through stated transversal immersions and has the same states as $\alpha$ then $\tr(\alpha')=\tr(\alpha)$ (indeed the homotopy lifts to a homotopy of $\widehat{\alpha}$ and $\widehat{\alpha'}$). 
In the second case it is easy to see that $\tr(\beta)$ does not depend on the choice of $\beta'$, as the images under $\rho$ of any two such $\beta'$ are conjugate in $\mathrm{SL}_2(\mathbb C)$ and hence have the same trace.
\begin{example}\label{ex:traces}
Let $\alpha:[0,1]\to \mathfrak S$ be a stated transversal immersion with state  $\varepsilon$ at $\alpha(0)$ and $\eta$ at $\alpha(1)$.
$${\rm If}\ \rho(\hat{\alpha})=\left(\begin{array}{cc}a & b \\ c & d\end{array}\right), {\rm then} \tr(\alpha)=\det(\eta,\rho(\alpha)\cdot\epsilon) =
\begin{tabular}{c|cc}
$\eta\backslash \epsilon $& + & -\\
\hline
+ & c & d\\
- & -a & -b\\
\end{tabular}.$$
\red{We} remark that the matrix on the right, expressing the values of the traces for an immersed transverse stated arc $\alpha$ is $\rho(\sqrt{\mathbb O}^{-1})\rho(\hat{\alpha})$ (see Equation \eqref{eq:OO}). 
\end{example}
\begin{remark}  The notion of trace here is similar to the one introduced in \cite{MS}, where trace is defined only for oriented arcs. The novelty here is the good lift, which is used to define traces for unoriented arcs and the use of twisted bundles as representations of fundamental groupoids.
\end{remark}


When $\alpha$ is stated, we provide $\alpha^{-1}$ with states so that the state of  $\alpha^{-1}(t)$ is equal to the state of $\alpha(1-t)$ for $t=0,1$.
\begin{lemma}\label{lem:lifts} Suppose $\rho$ is a twisted bundle on $\mathfrak S$.
(a) Let $\alpha$ be a stated transversal immersion.  One has
$$\rho (\widehat{\alpha^{-1}})=- \rho (\hat{\alpha})^{-1}.$$ 
 As a consequence, $\tr(\alpha)=\tr(\alpha^{-1})$.
 
 (b) Let $\beta:[0,1]\to \mathfrak S$ be an immersed closed curve such that $\beta(0)\in \partial \fS$. Then
  $$\rho (\widetilde{\beta})^{-1}=\rho (\widetilde{\beta^{-1}}).$$ 
  
 As a consequence, if $\gamma$ is any immersed closed curve then $\tr(\gamma) = \tr(\gamma^{-1})$.
\end{lemma}
\begin{proof} (a). A direct inspection shows that the homotopy class of the closed simple loop in $U\mathfrak S$ given by the concatenation $\widehat{\alpha^{-1}}\circ \hat{\alpha}$ is $\mathbb O$ (see the left hand side of Figure \ref{fig:lift}). 
The first equality follows as by definition $\rho$ is a functor such that $\rho(\mathbb O)=-Id$. 

To prove that $\tr(\alpha)=\tr(\alpha^{-1})$, 

we compute the traces using the notation and content of Example \ref{ex:traces}:
$${\rm If}\ \rho(\widehat{\alpha^{-1}})=-\rho(\hat{\alpha})^{-1}=\left(\begin{array}{cc}-d & b \\ c & -a\end{array}\right), {\rm then} \tr(\alpha)=\det(\eta',\rho(\alpha)\cdot\epsilon') =
\begin{tabular}{c|cc}
$\eta'\backslash \epsilon' $& + & -\\
\hline
+ & c & -a\\
- & d & -b\\
\end{tabular}.$$
But since the state at $\alpha^{-1}(0)$ is $\eta$ and that at $\alpha^{-1}(1)$ is $\epsilon$, we get the claim in this case by directly comparing with the transpose of the matrix of values provided in Example \ref{ex:traces}. 

(b). 
Observe that if $\beta$ is the black curve depicted in the r.h.s. of Figure \ref{fig:lift}, then $\beta^{-1}$ is regularly homotopic to the dotted curve $\beta'$ in the same picture. By construction $\dot{\beta'}(0)=\dot{\beta}(0)$ and $\beta'\circ \beta$ is regularly homotopic to an eight-shaped immersed curve in a disc. 
Then $\widetilde{\beta^{-1}}$ is homotopic to $\tilde{\beta'}$ in $U\mathfrak S$ and it holds $\rho(\tilde{\beta'}\circ \tilde{\beta})=Id$, thus $\rho(\widetilde{\beta^{-1}})=\rho(\tilde{\beta})^{-1}$.
The last statement now follows because $\rho(\tilde{\beta})\in \mathrm{SL}_2(\mathbb C)$ so that $\tr(\rho(\tilde{\beta}))=\tr(\rho(\tilde{\beta})^{-1})$. 

\end{proof}
\begin{figure}
\includegraphics[width=4.2cm]{goodlifts1-eps-converted-to.pdf}\qquad \includegraphics[width=4cm]{goodlifts2-eps-converted-to.pdf}
\caption{On the left the unoriented horizontal arc can be lifted to $U\mathfrak S$ in two different ways (dotted), depending on the choice of an orientation; their composition is homotopic in $U\mathfrak S$ to $\mathbb O$.  On the right we exhibit a smooth oriented curve $\beta$ (solid) and a curve $\beta'$ (dotted) which is regularly homotopic to $\beta^{-1}$ . The composition of the two is a nullhomotopic $8$-shaped loop in $U\mathfrak S$.}\label{fig:lift}
\end{figure}
Suppose $\alpha=\cup \alpha_i$, where each $\alpha_i$ is either a stated transversal non-oriented arc or a non-oriented immersed closed curved. Define
$$\tr(\alpha):=\prod_{i} \tr(\alpha_i).$$

\begin{lemma}\label{lem:classicalbigon}
If $q^{\frac{1}{2}}=1$ the map $\tr:\cS(\mathfrak B)\to \chi(\mathfrak B)$ sending a stated skein to its trace is an isomorphism of algebras. The same  holds for $\tr:\cS(\mathcal P_n)\to \chi(\mathcal P_n)$ for every $n\geq 2$. 
\end{lemma}
\begin{proof}
Applying Theorem \ref{teo:SL2} at $q^{\frac{1}{2}}=1$ we get an explicit algebra isomorphism $\phi:\cS(\mathfrak B)\to O(SL_2)$; by Example \ref{ex:twpolygon}, we know that $\chi(\mathfrak B)$ is isomorphic to $O(SL_2)$. Furthermore, by  Example \ref{ex:traces}, the map $\tr$ is an algebra isomorphism. 
One argues similarly for $\mathcal P_n$: applying Corollary \ref{cor:polygons} at $q^{\frac{1}{2}}=1$ we get an explicit algebra isomorphism $\phi:\cS(\mathcal P_n)\to O(SL_2)^{\otimes n-1}$; by the proof of Corollary \ref{cor:polygons} a system of algebra generators of $\cS(\mathcal P_n)$ is easily seen to be the arcs connecting the edge $e_0$ to each other edge and stated arbitrarily. By Example \ref{ex:traces}, the map $\tr$ on these generators provides a system of generators of $O(SL_2)^{\otimes n-1}$ which by Example \ref{ex:twpolygon} is isomorphic to $\chi(\mathcal P_n)$. 
\end{proof}
\subsection{Splitting theorem for trace functions}

In all this subsection, let $c\subset \mathfrak S$ be an ideal arc oriented arbitrarily, let $\mathfrak S'$ be the result of cutting $\mathfrak S$ along $c$ and let $\mathrm{pr}:\mathfrak S'\to \mathfrak S$ be the projection and $\widetilde{\pr}:U\mathfrak S'\to U\mathfrak S$ the projection induced on the unit tangent bundles.  Let $\mathrm{pr}^{-1}(c)=c_1\cup c_2\subset \partial \mathfrak S'$ so that $c_1$ has the positive orientation and $c_2$ the negative one with respect to the orientation induced by that of $\mathfrak S'$ on the boundary. 
For each $c_i$ let $\widetilde{c_i}\subset U\mathfrak S'$ be its canonical lift and $(-c_i)^{\sim}$ the canonical lift of $-c_i$. Similarly let $\widetilde{c}$ be the canonical lift of $c$ in $U\mathfrak S$ and $(-c)^{\sim}$ be the canonical lift of $-c$.


\begin{lemma}\label{lem:decomposition}
Each $[\alpha]\in \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})$ can be written as a composition $[\alpha_k]\circ [\alpha_{k-1}]\circ \cdots \circ [\alpha_1]$ of homotopy classes of immersed paths $\alpha_i:[0,1]\to U\mathfrak S$ such that $\alpha_i(\{0,1\})\subset \widetilde{\partial \mathfrak S}\cup \tilde{c}$ and $\alpha_i\cap \pi^{-1}(c)=\partial \alpha_i\cap \widetilde{c}$. 
Such a decomposition is unique up to insertion/deletions of compositions  $[\alpha']\circ [\alpha'^{-1}]$ for $[\alpha']\in \pi_1(U\mathfrak S;\widetilde{c})$ and replacement of $[\alpha_{j}]$ by $[\alpha'''_{j}]\circ [\alpha''_j]\circ[\alpha'_j]$ for some $[\alpha'_j],[\alpha'''_j]\in \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S}\cup \widetilde{c})$ and $[\alpha_j'']\in  \pi_1(U\mathfrak S;\widetilde{c})$ such that $[\alpha_j]=[\alpha'''_{j}]\circ [\alpha''_j]\circ[\alpha'_j]$ (or reciprocally).
\end{lemma}
\begin{proof}
Observe that $\pi^{-1}(c)\subset U\mathfrak S$ is homeomorphic to an annulus $A=\mathbb{R}\times S^1$ so that $\widetilde{c}=\mathbb{R}\times\{1\}.$ Represent the class $[\alpha]$ by a smooth curve $\alpha:[0,1]\to U\mathfrak S$ so that it is transverse to $A$; then homotope it so that it intersects $A$ exactly along $\widetilde{c}$: this provides an instance of the claimed splitting. If $\alpha':([0,1],\{0,1\})\to (U\mathfrak S,\widetilde{\partial \mathfrak S})$ is another smooth representative of the same class intersecting $A$ exactly along $\widetilde{c}$, let $h(t,s):[0,1]\times [0,1]\to U\mathfrak S$ be a smooth homotopy between $\alpha$ and $\alpha'$ which is transverse to $A$. Then $h^{-1}(A)$ is a disjoint union of arcs and circles embedded in $[0,1]\times [0,1]$ with boundary in $[0,1]\times \{0,1\}$ containing a finite number of maxima and minima with respect to the height function given by the second coordinate $s$. Pick a finite number of heights $s_0=0<s_1<\ldots <s_n=1$ so that each strip $[0,1]\times [s_i,s_{i+1}]$ contains at most one maximum or minimum of the diagram of $h^{-1}(A)$.  
Each immersed path $\alpha_{s_i}(t):=h(t,s_i):[0,1]\to U\mathfrak S$ intersects $A$ transversally a finite number of times and we can then modify $h$ locally around $h^{-1}(A)\cap ([0,1]\times \{s_i\})$ without inserting new maxima and minima so that $\alpha_{s_i}(t)$ intersects $A$ only along $\widetilde{c}$. 
Then the homotopies $h|_{[s_i,s_{i+1}]}$ transform the immersed path $\alpha_{s_i}$ into $\alpha_{s_{i+1}}$ by the moves described in the thesis: passing through a minimum replaces a smooth curve $\alpha$ with a composition $\alpha'\circ \alpha''\circ \alpha'''$ were all of $\alpha,\alpha',\alpha'',\alpha'''$ intersect $A$ only along $\widetilde{c}$ and in their boundary; passing through a maximum has the converse effect. Finally a strip containing no maxima and minima corresponds to a finite number of moves consisting in rewriting $\alpha\circ \alpha'$ with $\alpha\circ \beta\circ \beta^{-1}\circ \alpha'$ where $\beta\in \pi_1(U\mathfrak S;\widetilde{c})$ is the homotopy class represented by the restriction of $h$ to a ``vertical arc'' of $h^{-1}(A)\cap [0,1]\times [s_i,s_{i+1}]$ (i.e. an arc joining $[0,1]\times \{s_i\}$ and $[0,1]\times \{s_{i+1}\}$). 
\end{proof}

If $\rho':\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'})\to \mathrm{SL}_2(\mathbb C)$ is a twisted bundle, then by Lemma \ref{lem:extend} we can extend it to a twisted bundle $\rho'':\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})\to \mathrm{SL}_2(\mathbb C)$ by setting $\rho''(\sqrt{\mathbb O_{c_2}})=\left(\begin{array}{cc} 0 & -1\\ 1 & 0\end{array}\right)$ where $\sqrt{\mathbb O_{c_2}}$ is the path connecting $\widetilde{c_2}$ and $(-c_2)^{\sim}$ by following in the positive direction the fiber $\pi^{-1}(x)$ for some $x\in c_2$. 
\begin{proposition} \label{prop:algebrainjection}
There is a surjective map $i^*:tw(\mathfrak S')\to tw(\mathfrak S)$ defined as follows. 
Given $\alpha\in \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})$, decompose it as $\alpha=\alpha_k\circ \alpha_{k-1}\circ \cdots \circ \alpha_1$ where each $\alpha_i\in \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S}\cup \widetilde{c})$ intersects $\pi^{-1}(c)$ at most in its endpoints and exactly along $\widetilde{c}$ (such a decomposition exists by Lemma \ref{lem:decomposition}). 
Then for each $\rho'\in tw(\mathfrak S')$ let 
$$i^*(\rho')(\alpha)=\rho''(\alpha'_k)\rho''(\alpha'_{k-1})\cdots \rho''(\alpha'_1)$$ where $\alpha'_i=\widetilde{\pr}^{-1}(\alpha_i)$ is the lift of $\alpha_i$ to $\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})$.
Passing to the algebras $\chi(\mathfrak S)$ and $\chi(\mathfrak S')$ of regular functions on the algebraic varieties $tw(\mathfrak S)$ and $tw(\mathfrak S')$, $i^*$ induces an injective algebra morphism $i:\chi(\mathfrak S)\hookrightarrow \chi(\mathfrak S')$ which we will call the ``cutting morphism'' associated to $c$.
\end{proposition}
\begin{proof}
By Lemma \ref{lem:decomposition} to check that $i^*$ is well defined it is sufficient to check that for each $\alpha$ the choice of the decomposition does not affect the result of $i^*(\rho')(\alpha)$. But this is evident if we make an exchange $\alpha_2\circ \alpha_1\leftrightarrow \alpha_2\circ \alpha'\circ \alpha'^{-1}\circ \alpha_1$ or $\alpha \leftrightarrow \alpha'\circ \alpha''\circ \alpha'''$ as in the statement of Lemma \ref{lem:decomposition} because $\rho'$ is a functor.   

To prove surjectivity observe that by Lemma \ref{lem:extend} we can extend any morphism $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S})\to \mathrm{SL}_2(\mathbb{C})$ to $\rho:\pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S}\cup \widetilde{c}\cup (-c)^{\sim})\to \mathrm{SL}_2(\mathbb{C})$ setting in particular $$\rho(\sqrt{\mathbb O_c})=\left(\begin{array}{cc} 0 & -1 \\ 1 & 0\end{array}\right).$$
Then if $\alpha'\in \pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})$ define $\rho': \pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})\to \mathrm{SL}_2(\mathbb C)$ by $\rho'(\alpha')=\rho(\widetilde{\pr}_*(\alpha'))$ where  $\widetilde{\pr}_*:\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'}\cup (-c_2)^{\sim})\to \pi_1(U\mathfrak S;\widetilde{\partial \mathfrak S}\cup (-c)^{\sim})$ is the morphism induced by the continuous map $\widetilde{\pr}:U\mathfrak S'\to U\mathfrak S$. Then letting $\overline{\rho}'$ be the restriction of $\rho'$ to $\pi_1(U\mathfrak S';\widetilde{\partial \mathfrak S'})$ we have that by construction $\rho=i^*(\overline{\rho}')$. 
Surjectivity of $i^*$ implies the injectivity of $i$.
\end{proof}

The following proposition tells us that the trace functions behave exactly as the skeins under cutting along an ideal arc (see Theorem \ref{thm.1a}).
 Suppose $\alpha$ is a stated transverse smooth simple curve intersecting transversally $c$. Then $\alpha':=\mathrm{pr}^{-1}(\alpha)$ is a transverse smooth simple curve 
 which is stated at every boundary point except for newly created boundary points, which are points in $\mathrm{pr}^{-1} (c)\cap \alpha'=(c_1\cup c_2)\cap \alpha'$.
  {\em A lift in $\mathfrak S'$} of $\alpha$ is a stated transverse smooth simple curve $\beta$ in $\mathfrak S'$ which is $\alpha'$ equipped with states on $\mathrm{pr}^{-1} (c\cap \alpha)$ such that if $x,y\in \mathrm{pr}^{-1} (c\cap \alpha)$ with $\mathrm{pr}(x)=\mathrm{pr}(y)$ then $x$ and $y$ have the same state. If $|c\cap \alpha|=k$, then  $\alpha$ has $2^k$ lifts in $\mathfrak S'$.

\begin{proposition}[Cutting trace functions]\label{prop:cuttrace}
Let $\alpha$ be a stated transverse smooth simple curve intersecting transversally $c$. Then
\begin{equation}\label{eq:cuttrace}
i(\tr(\alpha))=\sum \tr(\beta)
\end{equation}
 where the sum is taken on all the lifts in $\mathfrak S'$ of $\alpha$ (i.e. as in Theorem \ref{thm.1a}). Furthermore if $c'\subset \mathfrak S$ is another ideal arc disjoint from $c$ and $i'$ is the associated cutting morphism, it holds $i'\circ i=i\circ i'$.
\end{proposition}
\begin{proof}
Since by Proposition \ref{prop:algebrainjection} we already know that $i$ is a well defined injective algebra morphism, it is sufficient to check the statement for a system of stated transverse smooth curves $\{\gamma_i\in I\}$ which generate $\chi(\mathfrak S)$ as an algebra. By the proof of Lemma \ref{lem:twistedbundles}, we can choose a finite system of such $\gamma_i$ such that $|\gamma_i\cap c|\leq 2, \forall i$. 
Let $\alpha\in \{\gamma_i, i\in I\}$ be represented by a smooth immersion $\alpha:[0,1]\to \mathfrak S$ intersecting transversally $c$ with states $st(\alpha(0))=\epsilon, st(\alpha(1))=\eta$; if $|\alpha\cap c|=0$ the statement is true. 
If $|\alpha\cap c|=1$ then $\alpha=\alpha_2\circ \alpha_1$ where $\alpha_i$ are transverse smooth simple curves with $\alpha_1(1)=\alpha_2(0)\in c$ and are partially stated by $st(\alpha_1(0))=\epsilon, st(\alpha_2(1))=\eta$. Furthermore, up to switching $\alpha$ to $\alpha^{-1}$ we can suppose $(\dot{\alpha}_1(1),\dot{c})$ form a positive basis of $\mathfrak S$.   
\begin{figure}
\includegraphics[width=5cm]{goodlifts3-eps-converted-to.pdf}\qquad \includegraphics[width=5cm]{goodlifts4-eps-converted-to.pdf}
\caption{On the l.h.s. the curve $\alpha$ (horizontal, solid) intersects once $c$ (vertical, solid). The dotted curve is regularly homotopic to $\alpha$ and is cut by $c$ into $\alpha_2\circ  \sqrt{\mathbb O}^{-1}$ and $\alpha_1$ where $\alpha_i$ are in good position in $\mathfrak S'$.   On the r.h.s. $\alpha$ intersects twice $c$ with opposite orientations. The dotted curve is regularly homotopic to $\alpha$ and is cut by $c$ in $\alpha_3$, $\sqrt{\mathbb O}^{-1}\circ \alpha_2\circ \sqrt{\mathbb O}^{-1}$ and $\alpha_1$, where $\alpha_i$ are in good position in $U\mathfrak S'$.  }\label{fig:cuttrace}
\end{figure}

Let then $A_i$ (resp. $A$) be the $2\times 2$ matrix expressing the values of $\tr(\alpha_i)$ (resp. $\tr(\alpha)$) with states in $\{\pm\}$ as in Example \ref{ex:traces}; then, as remarked in the example $A_i=\rho(\sqrt{\mathbb O_c})^{-1}\rho(\widehat{\alpha_i})$ (resp. $A=\rho(\sqrt{\mathbb O_c})^{-1}\rho(\widehat{\alpha})$) so that Equation \eqref{eq:cuttrace} rewrites in this case as $A=A_2\cdot A_1$.

Now since the orientation induced by $\mathrm{pr}^{-1}(c)$ is negative on $c_2$ then in $U\mathfrak S$ the good lift $\hat{\alpha}$ of $\alpha$ is homotopic to $\widetilde{\pr}(\widehat{\alpha_2})\circ \sqrt{\mathbb O_c}^{-1}\circ \widetilde{\pr}(\widehat{\alpha_1})$ where $\alpha_i$ are depicted in the left hand side of Figure \ref{fig:cuttrace}, therefore $$A=\rho(\sqrt{\mathbb O_c})^{-1}\rho(\widehat{\alpha})=\rho(\sqrt{\mathbb O_c})^{-1}\rho(\widehat{\alpha_2})\circ \rho(\sqrt{\mathbb O_c})^{-1}\circ \rho(\widehat{\alpha_1})=A_2\cdot A_1$$
and the claim is proved. 

Suppose now that $|\alpha\cap c|=2$ where $\alpha$ is a stated smooth immersion transverse to $c$; by the proof of Lemma \ref{lem:twistedbundles} we can suppose that the sign of the intersections of $\alpha$ and $c$ is opposite and we can split $\alpha$ as $\alpha_3\circ \alpha_2\circ \alpha_1$ where $\alpha_i$ are transverse smooth immersions with $\alpha_1(1)=\alpha_2(0),\alpha_2(1)=\alpha_3(0)$ and partially stated so that $st(\alpha_1(0))=\epsilon$ and $st(\alpha_3(1))=\eta$. Furthermore, up to switching $\alpha$ and $\alpha^{-1}$ we can suppose that $(\dot{\alpha}_1(1),\dot{c})$ form a positive basis of $\mathfrak S$.

As above let $A_i=\rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha_i})$ and $A=\rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha})$ and Equation \eqref{eq:cuttrace} is equivalent to $A=A_3\cdot A_2\cdot A_1$. 
Then again, as shown in the right hand side of Figure \ref{fig:cuttrace}, $\alpha$ is regularly homotopic in $U\mathfrak S$ to $\widetilde{\pr}(\widehat{\alpha_3})\circ \sqrt{\mathbb O_c}^{-1}\circ \widetilde{\pr}(\widehat{\alpha_2})\circ \sqrt{\mathbb O_c}^{-1}\circ \widetilde{\pr}(\widehat{\alpha_1})$. Therefore we have:
$$A=\rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha})=\rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha_3})\cdot \rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha_2})\cdot \rho(\mathbb O_c)^{-1}\cdot \rho(\widehat{\alpha_1})=A_3\cdot A_2\cdot A_1$$
and the thesis follows. 
\end{proof}

\subsection{The classical limit of stated skein algebras}

\begin{theorem}\label{teo:classicaliso}  Suppose $q^{1/2}=1$. The map sending a skein to its trace induces an algebra isomorphism $$\tr:\cS(\mathfrak S)\to \chi(\mathfrak S).$$
\end{theorem}
\begin{proof} We first claim that the relations $\eqref{eq.skein},\eqref{eq.loop},\eqref{eq.arcs},\eqref{eq.order}$ with $q^{\frac{1}{2}}=1$ are satisfied by the trace functions.
By Lemma \ref{lem:classicalbigon} the claim is true for bigons. 
But by Proposition \ref{prop:algebrainjection} cutting induces an injective algebra map, thus to verify local relations we can verify them in a bigon containing the disc where the relations are depicted: this proves the claim in general. 

The algebra isomorphism is proved as follows: 
pick an ideal triangulation of $\mathfrak S$ and apply to each edge of the triangulation Proposition \ref{prop:cuttrace} on the side of $\chi(\mathfrak S)$ and Theorem \ref{thm.1a} on $\cS(\mathfrak S)$. We get the following diagram of algebra morphisms of which the horizontal lines are injective and which is commutative by Proposition \ref{prop:cuttrace} and Theorem \ref{thm.1a}: 
 \begin{equation} 
\label{eq.dia3}
 \begin{CD} \cS(\mathfrak S)  @> \hookrightarrow  >>  \bigotimes_{i}\cS(T_i)\\
 @V
 \tr    VV  @V V \tr   V    \\
  \chi(\mathfrak S)    @> \hookrightarrow  >>   \bigotimes_i \chi(T_i) .
\end{CD}
 \end{equation} 

Since by Lemma \ref{lem:classicalbigon} the right vertical arrow is an isomorphism we conclude. 

\end{proof}
