%!TEX root = ../blob1.tex

\section{The blob complex}
\label{sec:blob-definition}

Let $X$ be an $n$-manifold.
Let $\cC$ be a fixed system of fields and local relations.
We'll assume it is enriched over \textbf{Vect}, and if it is not we can make it so by allowing finite
linear combinations of elements of $\cC(X; c)$, for fixed $c\in \cC(\bd X)$.

In this section we will usually suppress boundary conditions on $X$ from the notation, e.g. by writing $\lf(X)$ instead of $\lf(X; c)$.

We want to replace the quotient
\[
	A(X) \deq \lf(X) / U(X)
\]
of Definition \ref{defn:TQFT-invariant} with a resolution
\[
	\cdots \to \bc_2(X) \to \bc_1(X) \to \bc_0(X) .
\]

We will define $\bc_0(X)$, $\bc_1(X)$ and $\bc_2(X)$, then give the general case $\bc_k(X)$.   \todo{create a numbered definition for the general case}

We of course define $\bc_0(X) = \lf(X)$.
(If $X$ has nonempty boundary, instead define $\bc_0(X; c) = \lf(X; c)$.
We'll omit this sort of detail in the rest of this section.)
In other words, $\bc_0(X)$ is just the vector space of all fields on $X$.

We want the vector space $\bc_1(X)$ to capture `the space of all local relations that can be imposed on $\bc_0(X)$'.
Thus we say  a $1$-blob diagram consists of:
\begin{itemize}
\item An embedded closed ball (``blob") $B \sub X$.
\item A boundary condition $c \in \cC(\bdy B) = \cC(\bd(X \setmin B))$.
\item A field $r \in \cC(X \setmin B; c)$.
\item A local relation field $u \in U(B; c)$.
\end{itemize}
(See Figure \ref{blob1diagram}.) Since $c$ is implicitly determined by $u$ or $r$, we usually omit it from the notation.
\begin{figure}[t]\begin{equation*}
\mathfig{.6}{definition/single-blob}
\end{equation*}\caption{A 1-blob diagram.}\label{blob1diagram}\end{figure}
In order to get the linear structure correct, the actual definition is
\[
	\bc_1(X) \deq \bigoplus_B \bigoplus_c U(B; c) \otimes \lf(X \setmin B; c) .
\]
The first direct sum is indexed by all blobs $B\subset X$, and the second
by all boundary conditions $c \in \cC(\bd B)$.
Note that $\bc_1(X)$ is spanned by 1-blob diagrams $(B, u, r)$.

Define the boundary map $\bd : \bc_1(X) \to \bc_0(X)$ by 
\[ 
	(B, u, r) \mapsto u\bullet r, 
\]
where $u\bullet r$ denotes the field on $X$ obtained by gluing $u$ to $r$.
In other words $\bd : \bc_1(X) \to \bc_0(X)$ is given by
just erasing the blob from the picture
(but keeping the blob label $u$).

Note that directly from the definition we have
\begin{thm}
\label{thm:skein-modules}
The skein module $A(X)$ is naturally isomorphic to $\bc_0(X)/\bd(\bc_1(X))) = H_0(\bc_*(X))$.
\end{thm}
This also establishes the second 
half of Property \ref{property:contractibility}.

Next, we want the vector space $\bc_2(X)$ to capture `the space of all relations 
(redundancies, syzygies) among the 
local relations encoded in $\bc_1(X)$'.
A $2$-blob diagram, comes in one of two types, disjoint and nested.
A disjoint 2-blob diagram consists of
\begin{itemize}
\item A pair of closed balls (blobs) $B_1, B_2 \sub X$ with disjoint interiors.
\item A field $r \in \cC(X \setmin (B_1 \cup B_2); c_1, c_2)$
(where $c_i \in \cC(\bd B_i)$).
\item Local relation fields $u_i \in U(B_i; c_i)$, $i=1,2$.
\end{itemize}
(See Figure \ref{blob2ddiagram}.)
\begin{figure}[t]\begin{equation*}
\mathfig{.6}{definition/disjoint-blobs}
\end{equation*}\caption{A disjoint 2-blob diagram.}\label{blob2ddiagram}\end{figure}
We also identify $(B_1, B_2, u_1, u_2, r)$ with $-(B_2, B_1, u_2, u_1, r)$;
reversing the order of the blobs changes the sign.
Define $\bd(B_1, B_2, u_1, u_2, r) = 
(B_2, u_2, u_1\bullet r) - (B_1, u_1, u_2\bullet r) \in \bc_1(X)$.
In other words, the boundary of a disjoint 2-blob diagram
is the sum (with alternating signs)
of the two ways of erasing one of the blobs.
It's easy to check that $\bd^2 = 0$.

A nested 2-blob diagram consists of
\begin{itemize}
\item A pair of nested balls (blobs) $B_1 \subseteq B_2 \subseteq X$.
\item A field $r' \in \cC(B_2 \setminus B_1; c_1, c_2)$ 
(for some $c_1 \in \cC(\bdy B_1)$ and $c_2 \in \cC(\bdy B_2)$).
\item A field $r \in \cC(X \setminus B_2; c_2)$.
\item A local relation field $u \in U(B_1; c_1)$.
\end{itemize}
(See Figure \ref{blob2ndiagram}.)
\begin{figure}[t]\begin{equation*}
\mathfig{.6}{definition/nested-blobs}
\end{equation*}\caption{A nested 2-blob diagram.}\label{blob2ndiagram}\end{figure}
Define $\bd(B_1, B_2, u, r', r) = (B_2, u\bullet r', r) - (B_1, u, r' \bullet r)$.
As in the disjoint 2-blob case, the boundary of a nested 2-blob is the alternating
sum of the two ways of erasing one of the blobs.
When  we erase the inner blob, the outer blob inherits the label $u\bullet r'$.
It is again easy to check that $\bd^2 = 0$. Note that the requirement that
local relations are an ideal with respect to gluing guarantees that $u\bullet r' \in U(B_2)$.

As with the $1$-blob diagrams, in order to get the linear structure correct the actual definition is 
\begin{eqnarray*}
	\bc_2(X) & \deq &
	\left( 
		\bigoplus_{B_1, B_2\; \text{disjoint}} \bigoplus_{c_1, c_2}
			U(B_1; c_1) \otimes U(B_2; c_2) \otimes \lf(X\setmin (B_1\cup B_2); c_1, c_2)
	\right)  \bigoplus \\
	&& \quad\quad  \left( 
		\bigoplus_{B_1 \subset B_2} \bigoplus_{c_1, c_2}
			U(B_1; c_1) \otimes \lf(B_2 \setmin B_1; c_1) \tensor \cC(X \setminus B_2; c_2)
	\right) .
\end{eqnarray*}
For the disjoint blobs, reversing the ordering of $B_1$ and $B_2$ introduces a minus sign
(rather than a new, linearly independent, 2-blob diagram). 
\noop{
\nn{Hmm, I think we should be doing this for nested blobs too -- 
we shouldn't force the linear indexing of the blobs to have anything to do with 
the partial ordering by inclusion -- this is what happens below}
\nn{KW: I think adding that detail would only add distracting clutter, and the statement is true as written (in the sense that it yields a vector space isomorphic to the general def below}
}

\begin{defn}
An \emph{$n$-ball decomposition} of a topological space $X$ is 
finite collection of triples $\{(B_i, X_i, Y_i)\}_{i=1,\ldots, k}$ where $B_i$ is an $n$-ball, $X_i$ is some topological space, and $Y_i$ is pair of disjoint homeomorphic $n-1$-manifolds in the boundary of $X_{i-1}$ (for convenience, $X_0 = Y_1 = \eset$), such that $X_{i+1} = X_i \cup_{Y_i} B_i$ and $X = X_k \cup_{Y_k} B_k$.

Equivalently, we can define a ball decomposition inductively. A ball decomposition of $X$ is a topological space $X'$ along with a pair of disjoint homeomorphic $n-1$-manifolds $Y \subset \bdy X$, so $X = X' \bigcup_Y \selfarrow$, and $X'$ is either a disjoint union of balls, or a topological space equipped with a ball decomposition.
\end{defn}

Even though our definition of a system of fields only associates vector spaces to $n$-manifolds, we can easily extend this to any topological space admitting a ball decomposition.
\begin{defn}
Given an $n$-dimensional system of fields $\cF$, its extension to a topological space $X$ admitting an $n$-ball decomposition is \todo{}
\end{defn}
\todo{This is well defined}

Before describing the general case we should say more precisely what we mean by 
disjoint and nested blobs.
Two blobs are disjoint if they have disjoint interiors.
Nested blobs are allowed to have overlapping boundaries, or indeed to coincide.
Blob are allowed to meet $\bd X$.

However, we require of any collection of blobs $B_1,\ldots,B_k \subseteq X$ that
$X$ is decomposable along the union of the boundaries of the blobs.
\nn{need to say more here.  we want to be able to glue blob diagrams, but avoid pathological
behavior}
\nn{need to allow the case where $B\to X$ is not an embedding
on $\bd B$.  this is because any blob diagram on $X_{cut}$ should give rise to one on $X_{gl}$
and blobs are allowed to meet $\bd X$.
Also, the complement of the blobs (and regions between nested blobs) might not be manifolds.}

Now for the general case.
A $k$-blob diagram consists of
\begin{itemize}
\item A collection of blobs $B_i \sub X$, $i = 1, \ldots, k$.
For each $i$ and $j$, we require that either $B_i$ and $B_j$ have disjoint interiors or
$B_i \sub B_j$ or $B_j \sub B_i$.
(The case $B_i = B_j$ is allowed.
If $B_i \sub B_j$ the boundaries of $B_i$ and $B_j$ are allowed to intersect.)
If a blob has no other blobs strictly contained in it, we call it a twig blob.
\item Fields (boundary conditions) $c_i \in \cC(\bd B_i)$.
(These are implied by the data in the next bullets, so we usually
suppress them from the notation.)
The fields $c_i$ and $c_j$ must have identical restrictions to $\bd B_i \cap \bd B_j$
if the latter space is not empty.
\item A field $r \in \cC(X \setmin B^t; c^t)$,
where $B^t$ is the union of all the twig blobs and $c^t \in \cC(\bd B^t)$
is determined by the $c_i$'s.
$r$ is required to be splittable along the boundaries of all blobs, twigs or not. (This is equivalent to asking for a field on of the components of $X \setmin B^t$.)
\item For each twig blob $B_j$ a local relation field $u_j \in U(B_j; c_j)$,
where $c_j$ is the restriction of $c^t$ to $\bd B_j$.
If $B_i = B_j$ then $u_i = u_j$.
\end{itemize}
(See Figure \ref{blobkdiagram}.)
\begin{figure}[t]\begin{equation*}
\mathfig{.7}{definition/k-blobs}
\end{equation*}\caption{A $k$-blob diagram.}\label{blobkdiagram}\end{figure}

If two blob diagrams $D_1$ and $D_2$ 
differ only by a reordering of the blobs, then we identify
$D_1 = \pm D_2$, where the sign is the sign of the permutation relating $D_1$ and $D_2$.

Roughly, then, $\bc_k(X)$ is all finite linear combinations of $k$-blob diagrams.
As before, the official definition is in terms of direct sums
of tensor products:
\[
	\bc_k(X) \deq \bigoplus_{\overline{B}} \bigoplus_{\overline{c}}
		\left( \bigotimes_j U(B_j; c_j)\right) \otimes \lf(X \setmin B^t; c^t) .
\]
Here $\overline{B}$ runs over all configurations of blobs, satisfying the conditions above.
The index $\overline{c}$ runs over all boundary conditions, again as described above and $j$ runs over all indices of twig blobs.
The final $\lf(X \setmin B^t; c^t)$ must be interpreted as fields which are splittable along all of the blobs in $\overline{B}$.

The boundary map 
\[
	\bd : \bc_k(X) \to \bc_{k-1}(X)
\]
is defined as follows.
Let $b = (\{B_i\}, \{u_j\}, r)$ be a $k$-blob diagram.
Let $E_j(b)$ denote the result of erasing the $j$-th blob.
If $B_j$ is not a twig blob, this involves only decrementing
the indices of blobs $B_{j+1},\ldots,B_{k}$.
If $B_j$ is a twig blob, we have to assign new local relation labels
if removing $B_j$ creates new twig blobs. \todo{Have to say what happens when no new twig blobs are created}
If $B_l$ becomes a twig after removing $B_j$, then set $u_l = u_j\bullet r_l$,
where $r_l$ is the restriction of $r$ to $B_l \setmin B_j$.
Finally, define
\eq{
    \bd(b) = \sum_{j=1}^{k} (-1)^{j+1} E_j(b).
}
The $(-1)^{j+1}$ factors imply that the terms of $\bd^2(b)$ all cancel.
Thus we have a chain complex.

Note that Property \ref{property:functoriality}, that the blob complex is functorial with respect to homeomorphisms, is immediately obvious from the definition.
A homeomorphism acts in an obvious way on blobs and on fields.

We define the {\it support} of a blob diagram $b$, $\supp(b) \sub X$, 
to be the union of the blobs of $b$.
For $y \in \bc_*(X)$ with $y = \sum c_i b_i$ ($c_i$ a non-zero number, $b_i$ a blob diagram),
we define $\supp(y) \deq \bigcup_i \supp(b_i)$.

We note that blob diagrams in $X$ have a structure similar to that of a simplicial set,
but with simplices replaced by a more general class of combinatorial shapes.
Let $P$ be the minimal set of (isomorphisms classes of) polyhedra which is closed under products
and cones, and which contains the point.
We can associate an element $p(b)$ of $P$ to each blob diagram $b$ 
(equivalently, to each rooted tree) according to the following rules:
\begin{itemize}
\item $p(\emptyset) = pt$, where $\emptyset$ denotes a 0-blob diagram or empty tree;
\item $p(a \du b) = p(a) \times p(b)$, where $a \du b$ denotes the distant (non-overlapping) union 
of two blob diagrams (equivalently, join two trees at the roots); and
\item $p(\bar{b}) = \kone(p(b))$, where $\bar{b}$ is obtained from $b$ by adding an outer blob which 
encloses all the others (equivalently, add a new edge to the root, with the new vertex becoming the root).
\end{itemize}
For example, a diagram of $k$ strictly nested blobs corresponds to a $k$-simplex, while
a diagram of $k$ disjoint blobs corresponds to a $k$-cube.
(This correspondence works best if we think of each twig label $u_i$ as having the form
$x - s(e(x))$, where $x$ is an arbitrary field on $B_i$, $e: \cC(B_i) \to C$ is the evaluation map, 
and $s:C \to \cC(B_i)$ is some fixed section of $e$. \todo{This parenthetical remark mysteriously specialises to the category case})


