text:
\tikzset{
	every picture/.append style={
		line cap=butt,
		line width=0.4pt
	}
}

\section{Gapped boundaries and higher algebras}\label{sec:Highercat}

\emph{In this section, we describe a higher categorical construction capturing the salient features of the gapped boundary excitations considered in the previous sections. We begin by reviewing the definitions of monoidal categories and bicategories before introducing the theory of module categories. For more details on such constructions, see for example \cite{etingof2016tensor,schommerpries2011classification,bartlett2009unitary,douglas2018fusion}. Building upon such notions, we then demonstrate the relation between gapped boundary excitations and bicategories of module categories. In particular we review that the bicategory $\mathsf{MOD}(\mathsf{Vec}^{\alpha}_{G})$ provides a convenient description of gapped  boundary excitations in (2+1)d Dijkgraaf-Witten theory \cite{kitaev2012models}, and show that} $\mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$ \emph{describes string-like bulk excitations terminating at the boundary in (3+1)d Dijkgraaf-Witten theory.
}

\subsection{Higher category theory}

We begin this section by first introducing \emph{higher category theory}. In order to motivate the ethos of higher category theory, it is illuminating to first consider the notion of \emph{categorification}. Generally, categorification refers to a collection of techniques in which statements about sets are translated into statements about categories. Let us consider a simple example. Given a pair of sets $X,Y$ and a triple of functions $f,g,h:X\rightarrow Y$, it is natural to pose relations between such functions in terms of equations. For instance, we may have $f=g$ and $g=h$ as functions from $X$ to $Y$, from which we can infer the relation $f=h$ by transitivity. In this setting, categorification is the process whereby each set $X$ is replaced by a category $\mc{C}_X$, and each function $f:X\rightarrow Y$ is sent to a functor $F_{f}:\mc{C}_{X}\rightarrow \mc{C}_{Y}$. Using the additional structure proper to categories, we have a choice about the way we lift the equations $f=g$ and $g=h$. We could either require the corresponding functors to be equal, i.e. $F_{f}=F_{g}$ and $F_{g}=F_{h}$ implying $F_{f}=F_{h}$, or alternatively, we could instead require only the existence of natural isomorphisms, i.e. $\eta_{fg}:F_{f}\xrightarrow{\sim} F_{g}$ and $\eta_{gh}:F_{g}\xrightarrow{\sim} F_{h}$. In the latter case, we use equations on the natural transformations in order to prescribe a natural transformation $\eta_{fh}=\eta_{fg}\circ\eta_{gh}:F_{f}\rightarrow F_{h}$ replacing transitivity.

Building upon the idea of categorification, let us now introduce \emph{bicategories}, which will form the model of higher category theory utilised in the following discussion. Given a (small) category $\mc{C}$, recall that we denote by ${\rm Hom}_\mc{C}(X,Y)$ the set of (1-)morphisms (hom-set) between the objects $X,Y\in {\rm Ob}(\mc{C})$. Roughly speaking, a bicategory is obtained by applying the categorification mechanism spelt out above to such sets of morphisms. More specifically, we replace ${\rm Hom}_{\mc{C}}(X,Y)$ with a category that we denote by $\mathsf{Hom}_\mc{C}(X,Y)$. The composition function $\circ:{\rm Hom}_\mc{C}(X,Y)\times {\rm Hom}_\mc{C}(Y,X)\rightarrow {\rm Hom}_\mc{C}(X,Z)$ is then replaced with a \emph{composition bifunctor} $\otimes:\mathsf{Hom}_\mc{C}(X,Y)\times \mathsf{Hom}_\mc{C}(Y,Z)\rightarrow \mathsf{Hom}_\mc{C}(X,Z)$. Moreover, equations between morphisms are replaced with natural transformations between functors together with equations defined for such natural transformations. With this idea in mind, we now define our notion of bicategory:
\begin{definition}[\emph{Bicategory}\label{def:bicategory}]
	A bicategory $\mc{B}\mathpzc{i}$ consists of:
	\begin{enumerate}[itemsep=0.4em,parsep=1pt,leftmargin=3em]
		\item[${\ssss \bullet}$] A set of objects ${\rm Ob}(\mc{B}\mathpzc{i})$.
		\item[${\ssss \bullet}$] For each pair of objects $X,Y\in {\rm Ob}(\mc{B}\mathpzc{i})$, a category $\mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Y)$, whose objects and morphisms are referred to as 1- and 2-morphisms, respectively. Given a 1-morphism $f\in \mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Y)$, $X =: {\rm s}(f)$ and $Y =: {\rm t}(f)$ are referred to as the `source' and the `target' objects of $f$, respectively. The composition of 2-morphisms in $\mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Y)$ is designated as the `vertical' composition.
		\item[${\ssss \bullet}$] For each triple of objects $X,Y,Z\in{\rm Ob}(\mc{B}\mathpzc{i})$, a binary functor $\otimes: \mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Y) \times \mathsf{Hom}_{\mc{B}\mathpzc{i}}(Y,Z) \to \mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Z)$ designated as the `horizontal' composition.
		\item[${\ssss \bullet}$] For each object $X\in{\rm Ob}(\mc{B}\mathpzc{i})$, a 1-morphism $\mathbbm 1_{X}\in {\rm Ob}(\mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,X))$, and for each
		morphism $f: X \to Y$, a pair of natural isomorphism $\ell_{f}:\mathbbm  1_{X}\otimes f\rightarrow f$ and $r_{Y}:f\otimes \mathbbm  1_{Y}\rightarrow f$ called the `left' and `right' unitors, respectively.
		\item[${\ssss \bullet}$] For each triple of composable 1-morphisms $f,g,h$, a natural isomorphism $\alpha_{f,g,h}:(f\otimes g)\otimes h\rightarrow f\otimes (g\otimes h)$ called the 1-associator.
	\end{enumerate}

	This data is subject to coherence relations encoded in the commutativity of the diagrams
	\begin{align*}
		\label{eq:pentagonbicat}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.6em, row sep=1.3em]
			\&\&|[alias=B]|((f\otimes g)\otimes h)\otimes k
			\\\\
			|[alias=AA]|(f\otimes(g\otimes h))\otimes k
			\&\&\&\&
			|[alias=CC]|(f\otimes g)\otimes (h\otimes k)
			\\\\
			|[alias=AAA]|f\otimes((g\otimes h)\otimes k)
			\&\&\&\&
			|[alias=CCC]|f\otimes (g\otimes (h\otimes k))

			\arrow[from=B,to=CC,"\alpha_{f\otimes g,h,k}", sloped]
			\arrow[from=CC,to=CCC,"\alpha_{f,g,h\otimes k}"]

			\arrow[from=B,to=AA,"\alpha_{f,g,h}\otimes{\rm id}_{k} ", sloped]
			\arrow[from=AA,to=AAA,"\alpha_{f,g\otimes h,k}"']
			\arrow[from=AAA,to=CCC,"{\rm id}_{f}\otimes \alpha_{g,h,k}"']
		\end{tikzcd}
	\end{align*}
	and
	\begin{align}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.6em, row sep=1.3em]
			|[alias=A]|(f\otimes \mathbbm 1_{{\rm t}(f)})\otimes g
			\&\&\&\&
			|[alias=C]|f\otimes (\mathbbm 1_{{\rm t}(f)} \otimes g)
			\\\\
			\&\&
			|[alias=BB]|f\otimes g

			\arrow[from=A,to=C,"\alpha_{f,\mathbbm 1_{{\rm t}(f)},g}"]
			\arrow[from=C,to=BB,"{\rm id}_{f}\otimes \ell_{g}"]

			\arrow[from=A,to=BB,"r_{f}\otimes {\rm id}_{g}"']
		\end{tikzcd}
	\end{align}
	for all composable 1-morphisms $f,g,h,k$, referred to as the pentagon and the triangle relations, respectively.
\end{definition}
\noindent
As in conventional category theory, it is customary to depict relations in a bicategory using diagrammatic calculus. Unlike the directed graph structure utilised in category theory, the diagrammatic presentation of bicategories is given in terms of so-called \emph{pasting diagrams} of the form
\begin{align}
	\begin{tikzcd}[ampersand replacement=\&]
		|[alias=A]|X  \!\!
		\&\&
		|[alias=B]| \phantom{X} \!\!\!\!\!\!\! Y

		\arrow[from=A,to=B,"f",bend left=40,""{name=X,below}]
		\arrow[from=A,to=B,"g"',bend right=40,""{name=Y,above}]
		\arrow[from=X,to=Y,Rightarrow,"F"]
	\end{tikzcd}
\end{align}
where $X,Y\in{\rm Ob}(\mc{B}\mathpzc{i})$ are objects, $f,g\in {\rm Ob}(\mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Y))$ are 1-morphisms and $F\in{\rm Hom}_{\mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Y)}(f,g)$ is a 2-morphism.
In this notation, horizontal and vertical compositions are depicted as
\begin{align*}
	\begin{tikzcd}[ampersand replacement=\&]
		|[alias=A]|X \!\!
		\&\&
		|[alias=B]| \phantom{X} \!\!\!\!\!\!\! Y
		\&\&
		|[alias=C]| \phantom{X} \!\!\!\!\!\!\! Z

		\arrow[from=A,to=B,"f",bend left=40,""{name=X,below}]
		\arrow[from=A,to=B,"g"',bend right=40,""{name=Y,above}]
		\arrow[from=X,to=Y,Rightarrow,"F"]

		\arrow[from=B,to=C,"f'",bend left=40,""{name=XX,below}]
		\arrow[from=B,to=C,"g'"',bend right=40,""{name=YY,above}]
		\arrow[from=XX,to=YY,Rightarrow,"F'"]
	\end{tikzcd}
	=
	\begin{tikzcd}[ampersand replacement=\&]
		|[alias=A]|X  \!\!
		\&\&
		|[alias=C]| \phantom{X} \!\!\!\!\!\!\! Z

		\arrow[from=A,to=C,"f\otimes f'",bend left=40,""{name=X,below}]
		\arrow[from=A,to=C,"g\otimes g'"',bend right=40,""{name=Y,above}]
		\arrow[from=X,to=Y,Rightarrow,"F\otimes F'"]
	\end{tikzcd}
	\q {\rm and} \q
	\begin{tikzcd}[ampersand replacement=\&]
		|[alias=A]|X \hspace{-0.36em} \&\& |[alias=B]| \phantom{X} \!\!\!\!\!\!\! Y

		\arrow[from=A,to=B,bend left=50,"f",""{name=U,below}]
		\arrow[from=A,to=B,""{name=V,above},""{name=W,below}]
		\arrow[from=A,to=B,bend right=50,"f''"',""{name=X,above}]
		\arrow[from=U,to=V,Rightarrow,"F"]
		\arrow[from=W,to=X,Rightarrow,"G"]
	\end{tikzcd}
	=
	\begin{tikzcd}[ampersand replacement=\&]
		|[alias=A]|X \!\!  \&\& |[alias=B]|  \phantom{X} \!\!\!\!\!\!\! Y

		\arrow[from=A,to=B,bend left=40,"f",""{name=U,below}]
		\arrow[from=A,to=B,bend right=40,"f''"',""{name=X,above}]
		\arrow[from=U,to=X,Rightarrow,"FG"]
	\end{tikzcd} ,
\end{align*}
respectively. Explicit examples of bicategories will be provided in sec.~\ref{sec:sAlg} and \ref{sec:MOD}

\subsection{Higher groupoid algebra $\mathsf{Vec}_{\mc G}^\alpha$}

We shall now apply the idea of categorification to groupoid algebras, yielding a notion of `higher groupoid algebra'. First, let us review the relation between monoids and categories. A \emph{monoid} is defined by a set $X$ equipped with a function $\cdot:X\times X\rightarrow X$ called the product, and a distinguished element $\mathbbm 1\in X$ called the unit, satisfying the relations $\mathbbm 1\cdot x=x=x\cdot \mathbbm 1$, $\forall \, x\in X$. Alternatively, a monoid can be defined as a (small) category $\mc{C}$ with a single object $\bul$ and ${\rm Hom}(\mc C) = {\rm Hom}_{\mc{C}}(\bul,\bul)$ such that the composition function $\circ:{\rm Hom}_{\mc{C}}(\bul,\bul)\times {\rm Hom}_{\mc{C}}(\bul,\bul)\rightarrow {\rm Hom}_{\mc{C}}(\bul,\bul)$ provides the monoid product on ${\rm Hom}_{\mc{C}}(\bul,\bul)$, and the identity morphism ${\rm id}_{\bul}$ provides the corresponding monoid unit. Using this presentation of a monoid as a one-object category, we recover upon categorification the notion of \emph{monoidal} category as a one-object bicategory: given a bicategory $\mc{B}\mathpzc{i}$ with a single object ${\rm Ob}(\mc{B}\mathpzc{i})=\{\bul\}$, the category of homorphisms $\mathsf{Hom}_{\mc{B}\mathpzc{i}}(\bul,\bul)$ defines a monoidal category equipped with a tensor product structure provided by the bifunctor $\otimes:\mathsf{Hom}_{\mc{B}\mathpzc{i}}(\bul,\bul)\times \mathsf{Hom}_{\mc{B}\mathpzc{i}}(\bul,\bul)\rightarrow \mathsf{Hom}_{\mc{B}}(\bul,\bul)$. In particular, the 1-associator in $\mc{B}\mathpzc{i}$ induces the (0-)associator in the monoidal category $\mathsf{Hom}_{\mc{B}\mathpzc{i}}(\bul,\bul)$.

Akin to the categorification of a monoid to a monoidal category, one can consider a categorification of an algebra over a field. Instead of presenting the general case, we shall restrict ourselves to the categorification of groupoid algebras. Recall that given a finite groupoid $\mc{G}$, the (complex) groupoid algebra $\mathbb{C}[\mc{G}]$ is the algebra defined over the vector space ${\rm Span}_{\mathbb{C}}\{ \ket{\fr g}\,|\, \forall \,  \fr g\in {\rm Hom}(\mc{G}) \}$ with algebra product $\ket{\fr g}\star \ket{\fr g'} := \delta_{{\rm t}(\fr g),{\rm s}(\fr g')}  \, \ket{\fr g \fr g'} $. One natural categorification of $\mathbb{C}[\mc{G}]$ is given by  replacing the complex field with the (symmetric) monoidal category $\mathsf{Vec}$ of finite dimensional complex-vector spaces, which yields the monoidal category of groupoid-graded vector spaces:
\begin{definition}[\emph{Category of $\mc{G}$-graded vector spaces}]\label{exmp:groupoidgradedvec}
	Let $\mc{G}$ be a finite groupoid. A $\mc{G}$-graded vector space is a vector space of the form $V = \bigoplus_{\fr g \in {{\rm Hom}(\mathcal G)}}V_{\fr g}$. We call a $\mc{G}$-graded vector space $V$ `homogeneous' of degree ${\fr g} \in {\rm Hom}(\mc{G})$ if $V_{\fr g'}$ is the zero vector space $\underline{0}$ for all $\fr g'\neq \fr g$.
	The monoidal category $\mathsf{Vec}_{\mc{G}}$ is then defined as the category whose objects are $\mathcal{G}$-graded complex-vector spaces, and morphisms are grading preserving linear maps. The tensor product is defined on homogeneous components $V_{\fr g}$ and $W_{\fr g'}$ according to
	\begin{align}
		V_{\fr g}\otimes W_{\fr g'}=
		\begin{cases}
			(V\otimes W)_{\fr g \fr g'}  &\text{if  ${\rm t}(\fr g)={\rm s}(\fr g')$}
			\\ \underline{0} &\text{otherwise}
		\end{cases}
	\end{align}
	with unit object $\mathbbm{1}=\bigoplus_{\fr g\in {\rm Hom}(\mc{G})}\delta_{{\rm id}_{\fr g}}$. There are $|{\rm Hom}(\mathcal G)|$ simple objects denoted by $\mathbb{C}_{\fr g}, \forall \, \fr g\in {\rm Hom}(\mathcal G)$.
	Every object is isomorphic to a direct sum of simple objects, making $\mathsf{Vec}_{\mc{G}}$ semi-simple.
	Finally, the associator is given by the canonical map
	\begin{align}
		{\rm id}_{\mathbb C_{\fr g \fr g'  \fr g''}  }:
		(U_{\fr g}\otimes V_{\fr g'})\otimes W_{\fr g''}
		\xrightarrow{\sim}
		U_{\fr g}\otimes (V_{\fr g'}\otimes W_{\fr g''})\; .
	\end{align}
\end{definition}
\noindent
Note that by choosing the groupoid to be the delooping of a finite group, we recover the more familiar fact that the category of $G$-graded vector spaces is a categorification of the notion of group algebra.
Analogously to the twisting of a groupoid algebra by a groupoid 2-cocycle, we can twist the associator of $\mathsf{Vec}_{\mc{G}}$ by a normalised groupoid $3$-cocycle $\alpha\in Z^{3}(\mc{G},\rU(1))$ so as to define the monoidal category $\mathsf{Vec}^{\alpha}_{\mc{G}}$, whereby the associator on simple objects is provided by
\begin{align}
	\alpha_{\mathbb{C}_{\fr g},\mathbb{C}_{\fr g'},\mathbb{C}_{\fr g''}}=\alpha(\fr g,\fr g',\fr g'')\cdot {\rm id}_{\mathbb{C}_{\fr g\fr g'\fr g''}}:
	(\mathbb{C}_{\fr g}\otimes\mathbb{C}_{\fr g'})\otimes\mathbb{C}_{\fr g''}
	\xrightarrow{\sim}
	\mathbb{C}_{\fr g}\otimes(\mathbb{C}_{\fr g'}\otimes\mathbb{C}_{\fr g''})\; .
\end{align}
The monoidal category $\mathsf{Vec}^{\alpha}_{\mc{G}}$ has the additional property of being a \emph{multi-fusion category}:
\begin{definition}[\emph{Multifusion category}]
	A category $\mc{C}$ is called multi-fusion if $\mc{C}$ is a finite semi-simple, $\mathbb C$-linear, abelian, rigid monoidal category such that tensor product $\otimes:\mc{C}\times\mc{C}\rightarrow\mc{C}$ is bilinear on morphisms. If additionally ${\rm Hom}_{\mc{C}}(\mathbbm{1},\mathbbm{1})\cong \mathbb C$ then we call $\mc{C}$ a fusion category.
\end{definition}
\noindent
We shall not expand on this definition here, but instead  refer the reader to the chapter 4 of \cite{etingof2016tensor}. Conceptually, the observation that $\mathsf{Vec}^{\alpha}_{\mc{G}}$ is a multi-fusion category plays a similar role to semi-simplicity in the theory of algebras. Recall that given a semi-simple algebra $A$, every module is isomorphic to a direct sum of simple modules. These simple modules can be found via the notion of \emph{primitive orthogonal idempotents}. An idempotent in an algebra $A$ is an element $e\in A$ such that $e\cdot e=e$, and a pair of idempotents $e,e'\in A$ are orthogonal if $e\cdot e'= \delta_{e,e'} \, e$. Such an idempotent is called primitive if it cannot be written as sum of non-trivial idempotents. Specifying a complete set of primitive orthogonal idempotents $\{e_{1},\ldots,e_{n}\}$ for $A$, we can define a simple right $A$-module $M_{i}=e_{i}\cdot A$, for each $i\in 1,\ldots,n$. In the following, we will review the notion of \emph{module category} over a multi-fusion category, categorifying the notion of module over a semi-simple algebra. In this setting the analogue of idempotent will be given by so called \emph{separable algebra objects}.

\subsection{Module categories}

In this part, we introduce the notions of \emph{module category} over multi-fusion category $\mc{C}$, and module category functors following closely \cite{etingof2016tensor}. These happen to be relevant notions to describe gapped boudaries and their excitations \cite{kitaev2012models}. However, as we explain below, we use in practice an equivalent description in terms of separable algebra objects. First, let us define a module category:

\begin{definition}[$\mc{C}$-Module category]
	Given a multi-fusion category $\mc{C}\equiv (\mc C, \otimes , \mathbbm 1, \ell, r, \alpha)$, a (left) $\mc{C}$-module category is defined by a triple $(\mc M , \odot, \dot{\alpha})$ consisting of a category $\mc M$, an action bifunctor $\odot:\mc{C}\times \mc{M}\rightarrow \mc{M}$ and a natural isomorphism
	\begin{align}
		\dot{\alpha}_{X,Y,M}:(X\otimes Y)\odot M\xrightarrow{\sim}X\odot (Y\odot M) \, ,
		\q \forall \,  X,Y\in {\rm Ob}(\mc{C})\;  {\rm and}\; M\in {\rm Ob}(\mc{M}) \, ,
	\end{align}
	referred to as the module associator, such that the diagram
	\begin{align}\label{eq:modcatpentagon}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.6em, row sep=1.3em]
			\&\&|[alias=B]|((X\otimes Y)\otimes Z)\odot M
			\\\\
			|[alias=AA]|(X\otimes(Y\otimes Z))\odot M
			\&\&\&\&
			|[alias=CC]|(X\otimes Y)\odot (Z\odot M)
			\\\\
			|[alias=AAA]|X\odot((Y\otimes Z)\odot M)
			\&\&\&\&
			|[alias=CCC]|X\odot (Y\odot (Z\odot M))

			\arrow[from=B,to=CC,"\!\! \dot{\alpha}_{X\otimes Y,Z,M}", sloped]
			\arrow[from=CC,to=CCC,"\dot{\alpha}_{X,Y,Z\odot M}"]

			\arrow[from=B,to=AA,"\alpha_{X,Y,Z}\otimes{\rm id}_{M} \; ", sloped]
			\arrow[from=AA,to=AAA,"\dot{\alpha}_{X,Y\otimes Z,M}"']
			\arrow[from=AAA,to=CCC,"{\rm id}_{X}\otimes \dot{\alpha}_{Y,Z,M}"']
		\end{tikzcd}
	\end{align}
	commutes for every $X,Y,Z\in {\rm Ob}(\mc{C})$ and $M\in {\rm Ob}(\mc{M})$. Additionally there is a \emph{unit isomorphism}
	$\ell_{M}:\mathbbm{1}\odot M\xrightarrow{\sim} M$,
	where $\mathbbm{1}$ is the tensor unit of $\mc{C}$,
	such that the following diagram commutes:
	\begin{align}\label{eq:modcattriangle}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.6em, row sep=1.3em]
			|[alias=A]|(X\otimes \mathbbm 1)\odot M
			\&\&\&\&
			|[alias=C]|X\otimes (\mathbbm 1\odot M)
			\\\\
			\&\&
			|[alias=BB]|X\odot M

			\arrow[from=A,to=C,"\dot{\alpha}_{X,\mathbbm 1,M}"]
			\arrow[from=C,to=BB,"{\rm id}_{X}\otimes \ell_{M}"]

			\arrow[from=A,to=BB,"r_{X}\otimes {\rm id}_{M}"']
		\end{tikzcd} \; ,
	\end{align}
	for all $X\in {\rm Ob}(\mc{C})$, $M\in {\rm Ob}(\mc{M})$.
\end{definition}
\noindent
Every module category can be decomposed into so-called \emph{indecomposable} module categories \cite{2001math.....11139O}:
\begin{definition}[Indecomposable module category]
	A $\mc{C}$-module category $\mc{M}$ is said to be `indecomposable' when $\mc{M}$ is not equivalent to a direct sum of non-zero $\mc{C}$-module categories.
\end{definition}

\noindent
Indecomposable module categories will turn out to be the relevant data to label gapped boundaries. To describe excitations, we further require the notion module category functors:

\begin{definition}[Module category functor]
	Given a multi-fusion category $\mc{C}$ and a pair $(\mc M_1, \mc M_2)$ of $\mc C$-module categories with module associators $\dot{\alpha}$ and $\ddot{\alpha}$, respectively, a $\mc C$-module functor is a pair $(F,s)$ where $F: \mc M_1 \to \mc M_2$ is a functor, and $s$ is natural isomorphism given by
	\begin{align}
		s_{X,M}:F(X\odot M)\rightarrow X\odot F(M) \, , \q \forall \, X \in {\rm Ob}(\mc C) \; {\rm and} \; M \in {\rm Ob}(\mc M_1) \; ,
	\end{align}
	such that the diagram
	\begin{align}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
			|[alias=A]|F(X\odot (Y\odot M))
			\&\&
			|[alias=B]|F((X\otimes Y)\odot M)
			\&\&
			|[alias=C]|(X\otimes Y)\odot F(M)
			\\
			\\
			|[alias=AA]|X\odot F(Y\odot M)
			\&\&
			\&\&
			|[alias=CC]|X\odot(Y\odot F(M))

			\arrow[from=B,to=A,"{F(\dot{\alpha}_{X,Y,M})}"']
			\arrow[from=A,to=AA,"{s_{X,Y\otimes M}}"']
			\arrow[from=AA,to=CC,"{{\rm id}_{X}\odot s_{Y,M}}"']

			\arrow[from=B,to=C,"{s_{X\otimes Y,M}}"]
			\arrow[from=C,to=CC,"{\ddot{\alpha}_{X,Y,F(M)}}"]
		\end{tikzcd}
	\end{align}
	commutes for every $X,Y \in {\rm Ob}(\mc{C})$ and $M\in {\rm Ob}(\mc{M})$.
\end{definition}
\noindent
We are almost ready to define a bicategory, the remaining ingredient is a notion of morphism for module functors:
\begin{definition}[Morphism of module functors]
	Given a multi-fusion category $\mc C$ and two $\mc C$-module functors $(F,s)$ and $(F',s')$, a morphism of module functors between $F$ and $F$' is a natural transformation  $\eta:F \to  F'$ such that the diagram
	\begin{align}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
			|[alias=A]|F(X\odot M)
			\&\&
			|[alias=B]|X\odot F(M)
			\\\\
			|[alias=AA]|F'(X\odot M)
			\&\&
			|[alias=BB]|X\odot F'(M)

			\arrow[from=A,to=B,"s_{X,M}"]
			\arrow[from=B,to=BB,"{\rm id}_{X}\odot\eta_{M}"]

			\arrow[from=A,to=AA,"\eta_{X\odot M}"']
			\arrow[from=AA,to=BB,"s'_{X,M}"]
		\end{tikzcd}
	\end{align}
commutes for every $X \in {\rm Ob}(\mc C)$ and $M \in {\rm Ob}(\mc M)$.
\end{definition}
\noindent
Putting everything together, we obtain the following definition of a bicategory of module categories

\begin{definition}[Bicategory of module categories]
	Given a multi-fusion category $\mc{C}$, we denote by $\mathsf{MOD}(\mc{C})$ the bicategory with objects, $\mc{C}$-module categories, 1-morphisms, $\mc{C}$-module functors, and 2-morphisms, $\mc{C}$-module natural transformations.
\end{definition}
\noindent
The remainder of this section is dedicated to providing a more practical formulation of this bicategory using the fact that for a multi-fusion category $\mc C$, every indecomposable $\mc{C}$-module category is equivalent to the \emph{category of module objects} for a separable algebra object in $\mc{C}$ \cite{etingof2016tensor}. Using this latter formulation, we shall then explain how the bicategory of module categories is indeed the relevant notion to describe gapped boundaries and their excitations in gauge models of topological phases.

\subsection{Algebra objects in $\mathsf{Vec}^{\alpha}_{\mc{G}}$\label{sec:algObj}}

Let us now present the notion of \emph{algebra objects} in the multi-fusion category $\mathsf{Vec}^{\alpha}_{\mc{G}}$ thought as a categorification of the groupoid algebra over $\mc{G}$. In the subsequent discussion, we will build upon this notion in order to define module categories over higher groupoid algebras as a categorification of modules over semi-simple algebras.

\begin{definition}[Algebra object]
	Given a multi-fusion category $\mc{C}\equiv (\mc C, \otimes , \mathbbm 1, \ell, r, \alpha)$, an (associative) algebra object in $\mc{C}$ is defined by a triple $(A,m,u)$ consisting of an object $A$ as well as morphisms $m:A\otimes A\rightarrow A$ and $u:\mathbbm{1}\rightarrow A$ in $\mc{C}$ referred to as multiplication and unit, respectively, such that the diagrams below commute:
	\begin{enumerate}[itemsep=0.4em,parsep=1pt,leftmargin=3em]
		\item[${\ssss \bullet}$] {\emph Associativity}:
		\begin{align}
			\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
				|[alias=A]|(A\otimes A)\otimes A \&\& |[alias=B]|A\otimes (A\otimes A) \&\& |[alias=C]| A\otimes A
				\\
				\\
				|[alias=AA]|A\otimes A \&\&\&\& |[alias=CC]|A

				\arrow[from=A,to=B,"\alpha"]
				\arrow[from=B,to=C,"{\rm id}_{A}\otimes m"]
				\arrow[from=AA,to=CC,"m"']
				\arrow[from=A,to=AA,"m\otimes {\rm id}_{A}"']
				\arrow[from=C,to=CC,"m"]
			\end{tikzcd},
		\end{align}
		\item[${\ssss \bullet}$] {\emph Unit}:
		\begin{align}
			\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
				|[alias=A]|A
				\&\&
				|[alias=B]|A\otimes \mathbbm{1}
				\&\&
				|[alias=C]| A\otimes A

				\\
				\\

				|[alias=AA]|\mathbbm{1}\otimes A
				\&\&
				|[alias=BB]|A\otimes A
				\&\&
				|[alias=CC]| A

				\arrow[from=A,to=B,"r^{-1}"]
				\arrow[from=B,to=C,"{\rm id}_{A}\otimes u"]
				\arrow[from=C,to=CC,"m"]

				\arrow[from=A,to=AA,"\ell ^{-1}"']
				\arrow[from=AA,to=BB,"u\otimes{\rm id}_{A}"']
				\arrow[from=BB,to=CC,"m"']

				\arrow[sha, from=A,to=CC,"{\rm id}_{A}",sloped]
			\end{tikzcd},
		\end{align}
	\end{enumerate}

	where $\alpha, \ell ,r $ refer to the associator, left unitor and right unitor for the monoidal structure of $\mc{C}$, respectively.
\end{definition}
\noindent
Given the above definition, an important observation is that algebra objects in the fusion category $\mathsf{Vec}$ correspond to associative, unital, finite-dimensional, complex algebras. Let us now consider algebra objects in $\mathsf{Vec}^{\alpha}_{\mc{G}}$. For each $(\mc{G},\alpha)$-subgroupoid $(\mc{A},\phi)$, as defined in sec.~\ref{sec:relatGr}, we construct an algebra object $\mc{A}_{\phi} \equiv (\bigoplus_{\fr{a}\in{\rm Hom}(\mc{A})}\mathbb{C}_{\fr{a}},m,u)$ with multiplication and unit defined according to
\begin{equation*}
	\begin{array}{ccccl}
		m & : & \mc{A}_\phi \otimes \mc{A}_\phi & \to & \mc{A}_\phi
		\\
		& : & {\fr a} \otimes {\fr a'} &\mapsto & \delta_{{\rm t}(\fr a),{\rm s}(\fr a')} \, \phi(\fr a, \fr a')\,  {\fr a \fr a '}
	\end{array}
	\q {\rm and} \q
	u(\mathbbm{1}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}):=\sum_{X\in {\rm Ob}(\mc{A}_\phi)}{\rm id}_{X} \; ,
\end{equation*}
respectively. In particular, we remark that the algebra object $\mc{A}_{\phi}$ in $\mathsf{Vec}^{\alpha}_{\mc{G}}$ corresponds to a generalisation of a twisted groupoid algebra over
$\mc{A}$, where the twisting by a 2-cocycle is instead given by the 2-cochain $\phi$. Since $\phi$ is not a groupoid 2-cocycle, algebra objects are not associative as conventional algebras, but instead are only associative within $\mathsf{Vec}^{\alpha}_{\mc{G}}$ due to the condition $d^{(2)}\phi=\alpha^{-1}{\sss |}_{\mc{A}}$. We leave it to the reader to check that every algebra object in $\mathsf{Vec}^{\alpha}_{\mc{G}}$ is in one-to-one correspondence with a $(\mc{G},\alpha)$-subgroupoid and $\mathsf{Vec}^{\alpha}_{\mc{G}}$ algebra objects.

Given an algebra object $A$ in a multi-fusion category $\mc{C}$, we are interested in modules over $A$ referred to as \emph{$A$-module objects}:
\begin{definition}[Right module object]
	Let $\mc{C}$ be a multi-fusion category and $A \equiv (A,m,u)$ an algebra object  in $\mc{C}$. A right module object over $A$ (or right $A$-module) consists of a pair $(M,p)$, with $M \in {\rm Ob}(\mc C)$  and $p:M\otimes A\rightarrow M \in {\rm Hom}(\mc C)$ such that the diagrams below commute:
	\begin{enumerate}[itemsep=0.4em,parsep=1pt,leftmargin=3em]
		\item[${\ssss \bullet}$] {\emph Compatibility}:
		\begin{align}
			\label{eq:compatibilityModuleObject}
			\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
				|[alias=A]|(M\otimes A)\otimes A
				\&\&
				\&\&
				|[alias=C]| M\otimes A

				\\
				\\

				|[alias=AA]| M\otimes(A\otimes A)
				\&\&
				|[alias=BB]| M\otimes A
				\&\&
				|[alias=CC]| M

				\arrow[from=A,to=C,"p\otimes {\rm id}_{A}"]
				\arrow[from=C,to=CC,"p"]

				\arrow[from=A,to=AA,"\alpha"']
				\arrow[from=AA,to=BB,"{\rm id}_{M}\otimes m"']
				\arrow[from=BB,to=CC,"p"']
			\end{tikzcd} ,
		\end{align}
		\item[${\ssss \bullet}$] {\emph Unit}:
		\begin{align}
			\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
				|[alias=A]|M
				\&\&
				|[alias=B]|M

				\\
				\\

				|[alias=AA]|M\otimes \mathbbm 1
				\&\&
				|[alias=BB]|M\otimes A

				\arrow[from=A,to=B,"{\rm id}_{M}"]
				\arrow[from=BB,to=B,"p"']

				\arrow[from=A,to=AA,"r^{-1}"']
				\arrow[from=AA,to=BB,"u"']
			\end{tikzcd} .
		\end{align}
	\end{enumerate}
\end{definition}
\noindent
Homorphisms between modules over a given algebra object are then defined in an obvious way:
\begin{definition}[Module object homomorphism] Given an algebra object $A$ in a multifusion category $\mc C$, let $(M_{1},p_{1})$ and  $(M_{2},p_{2})$ be two right $A$-modules. An $A$-homomorphism between  these $A$-modules is a morphism $f\in {\rm Hom}_{\mc{C}}(M_{1},M_{2})$ such that the diagram
	\begin{align}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
			|[alias=A]|M_{1}\otimes A
			\&\&
			|[alias=B]|M_{2}\otimes A

			\\
			\\

			|[alias=AA]|M_{1}
			\&\&
			|[alias=BB]|M_{2}

			\arrow[from=A,to=B,"f\otimes{\rm id}_{A}"]
			\arrow[from=B,to=BB,"p_{2}"]

			\arrow[from=A,to=AA,"p_{1}"']
			\arrow[from=AA,to=BB,"f"']
		\end{tikzcd}
	\end{align}
commutes.
\end{definition}
\noindent
It follows from the definition above that $A$-homomorphisms between a pair of $A$-module objects $(M_{1},p_{1})$ and $(M_{1},p_{1})$ in $\mc{C}$ define a subspace of ${\rm Hom}_{\mc{C}}(M_{1},M_{2})$, which is notated via ${\rm Hom}_{A}(M_{1},M_{2})$ in the following. Moreover, composing $A$-homomorphisms yields another $A$-homomorphism so that we can define a category of $A$-modules as follows:
\begin{definition}[Category of module objects]
	Given a multi-fusion category $\mc{C}$ and an algebra object $A=(A,m,u)$, we define the category $\mathsf{Mod}_{\mc{C}}(A)$ as the category with objects $A$-module objects in $\mc{C}$ and morphisms $A$-module homomorphisms.
\end{definition}
\noindent
In a similar vein, we can define a left $A$-module objects and left $A$-module homomorphisms. We leave it to the reader to derive the corresponding axioms. Combining both left and right modules over an algebra object yields the notion \emph{bimodule object}:
\begin{definition}[Bimodule object]
	Let $\mc C$ be a multi-fusion category and $(A,B)$ a pair of algebra objects in $\mc C$. We define an $(A,B)$-bimodule object in $\mc C$ as a triple $(M,p,q)$ such that $(M,p)$ is a right $B$-module object, $(M,q)$ is a left $A$-module object and the diagram	\begin{align}
		\label{eq:compatibilityBimoduleObject}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
			|[alias=A]|(A\otimes M)\otimes B
			\&\&
			\&\&
			|[alias=C]|M\otimes B

			\\
			\\

			|[alias=AA]|A\otimes (M\otimes B)
			\&\&
			|[alias=BB]|A\otimes M
			\&\&
			|[alias=CC]|M

			\arrow[from=A,to=C,"q\otimes{\rm id}_{B}"]
			\arrow[from=C,to=CC,"p"]

			\arrow[from=A,to=AA,"\alpha"']
			\arrow[from=AA,to=BB,"{\rm id}_{A}\otimes p"']
			\arrow[from=BB,to=CC,"q"']
		\end{tikzcd}.
	\end{align}
	commutes.
\end{definition}
\noindent
Noticing that the monoidal identity of any multi-fusion category $\mc{C}$ naturally defines an algebra object,  we can identify the $(\mathbbm{1},A)$-bimodule $(M,\ell_{M},p)$, for a given algebra object $A$, with the right $A$-module $(M,p)$, and similarly the $(A,\mathbbm{1})$-bimodule $(M,r_{M},q)$ with the left $A$-module $(M,q)$.

\begin{definition}[Bimodule object homomorphism]
	Let $(M_{1},p_{1},q_{1})$ and $(M_{2},p_{2},q_{2})$ be a pair of $(A,B)$-bimodule objects in a multi-fusion category $\mc{C}$. An $(A,B)$-homomorphism between these $(A,B)$-bimodules is a morphism $f\in{\rm Hom}_{\mc{C}}(M_{1},M_{2})$ such that $f:(M_{1},p_{1})\rightarrow (M_{2},p_{2})$ is a right $B$-module homomorphism, $f:(M_{1},q_{1})\rightarrow (M_{2},q_{2})$ is a left $A$-module homomorphism, and the following diagram commutes:
	\begin{align*}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.7em, row sep=1.3em]
			|[alias=X]|(A\otimes M_{1})\otimes B
			\&\&\&\&\&\&\&\&
			|[alias=Z]|M_{1}\otimes B
			\\
			\\

			\&\&|[alias=A]|(A\otimes M_{2})\otimes B
			\&\&
			\&\&
			|[alias=C]|M_{2}\otimes B

			\\[-0.5em]
			\\

			\&\&|[alias=AA]|A\otimes (M_{2}\otimes B)
			\&\&
			|[alias=BB]|A\otimes M_{2}
			\&\&
			|[alias=CC]|M_{2}

			\\
			\\
			|[alias=XX]|A\otimes (M_{1}\otimes B)
			\&\&\&\&
			|[alias=YY]|A\otimes M_{1}
			\&\&\&\&
			|[alias=ZZ]|M_{1}

			\arrow[from=A,to=C,"q_{2}\otimes{\rm id}_{B}"]
			\arrow[from=C,to=CC,"p_{2}"]

			\arrow[from=A,to=AA,"\alpha"']
			\arrow[from=AA,to=BB,"{\rm id}_{A}\otimes p_{2}"']
			\arrow[from=BB,to=CC,"q_{2}"']

			\arrow[from=X,to=Z,"q_{1}\otimes{\rm id}_{B}"]
			\arrow[from=Z,to=ZZ,"p_{1}"]

			\arrow[from=X,to=XX,"\alpha"']
			\arrow[from=XX,to=YY,"{\rm id}_{A}\otimes p_{1}"']
			\arrow[from=YY,to=ZZ,"q_{1}"']

			\arrow[from=X,to=A,"\;\; ({\rm id}_{A}\otimes f)\otimes{\rm id}_{B}", sloped]
			\arrow[from=XX,to=AA,"\;\; {\rm id}_{A}\otimes (f\otimes{\rm id}_{B})"',sloped]
			\arrow[from=YY,to=BB,"{\rm id}_{A}\otimes f",]
			\arrow[from=Z,to=C,"f\otimes {\rm id}_{B}"',sloped]
			\arrow[from=ZZ,to=CC,"f",sloped]

		\end{tikzcd}.
	\end{align*}
\end{definition}
\noindent
It follows from the definition that $(A,B)$-homomorphisms between a pair of $(A,B)$-bimodule object $(M_1,p_1,q_1)$ and $(M_2,p_2,q_2)$ in $\mc C$ define a subspace of ${\rm Hom}_{\mc C}(M_1,M_2)$, which will be denoted by ${\rm Hom}_{A,B}(M_1,M_2)$ in the following. Moreover, composing two $(A,B)$-homomorphisms yields another $(A,B)$-homomorphism so that we can define the following category of $(A,B)$-bimodules:
\begin{definition}[Category of bimodule objects]
	Given a multi-fusion category $\mc{C}$ and a pair of algebra objects $A$ and $B$, we define the category $\mathsf{Bimod}_{\mc{C}}(A,B)$ as the category with objects $(A,B)$-bimodules and morphisms $(A,B)$-bimodule homomorphisms.
\end{definition}
\noindent
Let us now go back to our example of interest, namely the higher groupoid algebras $\mathsf{Vec}^{\alpha}_{\mc{G}}$, and describe the corresponding bimodule objects. We consider a pair $(\mc{A},\phi)$, $(\mc{B},\psi)$ of $(\mc{G},\alpha)$-subgroupoids, and the corresponding algebra objects $\mc{A}_{\phi} \equiv (\bigoplus_{\fr{a}\in{\rm Hom}(\mc{A})}\mathbb{C}_{\fr{a}},m_\mc{A},u_\mc{A})$, and $\mc{B}_{\psi} \equiv (\bigoplus_{\fr{b}\in{\rm Hom}(\mc{B})}\mathbb{C}_{\fr{b}},m_\mc{B},u_\mc{B})$. Let $(M,p,q)$ be an $(\mc A_\phi, \mc B_\psi)$-bimodule in $\mathsf{Vec}^\alpha_\mc{G}$ such that $M = \bigoplus_{\fr g \in {\rm Hom}(\mc{G})}M_{\fr g}$, $p: M \otimes \mc{B}_\psi \to M$ and $q: \mc{A}_\phi \otimes M \to M$. Let us consider the $\mathsf{Vec}^{\alpha}_{\mc{G}}$ morphism $\qp \equiv q \circ ({\rm id}_\mc{A} \otimes p)$ such that
\begin{equation*}
	\begin{array}{ccccl}
		\qp & : & \mc{A}_\phi \otimes (M \otimes \mc{B}_\psi) & \to & M
		\\
		& : & \mathbb C_{\fr a} \otimes (M_\fr{g} \otimes \mathbb C_{\fr b}) &\mapsto &
		\delta_{{\rm t}(\fr a), {\rm s}(\fr g)} \, \delta_{{\rm s}(\fr b), {\rm t}(\fr g)} \, [M_\fr{g} \triangleright \qp \, (M_{\fr g}, \mathbb C_{\fr a}, \mathbb C_{\fr b})] \in M_{\fr a \fr g \fr b}
	\end{array}
\end{equation*}
where $\qp \, (M_{\fr g}, \mathbb C_{\fr a}, \mathbb C_{\fr b}) :M_{\fr{g}}\rightarrow M_{\fr{a}\fr{g}\fr{b}}$ is a linear map which includes a $\mc{G}$-grading shift. In virtue of the compatibility conditions satisfied by $p$ and $q$, the diagram
\begin{align}
	\label{eq:bimoduleVecG}
	\begin{tikzcd}[ampersand replacement=\&, column sep=2.2em, row sep=1.3em]
		|[alias=A]|\mc{A}_{\phi} \otimes((\mc{A}_{\phi} \otimes (M \otimes \mc{B}_{\psi}))\otimes \mc B_\psi)
		\&\&\&
		|[alias=B]|\mc{A}_{\phi} \otimes (M \otimes \mc{B}_\psi)

		\\
		\\

		|[alias=AA]|\mc{A}_{\phi} \otimes (M \otimes \mc{B}_\psi)
		\&\&\&
		|[alias=BB]|M

		\arrow[from=A,to=B,"{\rm id}_{\mc A}\otimes (\mathrlap{\hspace{1.5pt} p}q \; \otimes {\rm id}_{\mc B})"]
		\arrow[from=B,to=BB,"\mathrlap{\hspace{1.5pt} p}q \;"]

		\arrow[from=A,to=AA,"{}_{\mc A}m_{\mc B}"']
		\arrow[from=AA,to=BB,"\mathrlap{\hspace{1.5pt} p}q \;"']
	\end{tikzcd} ,
\end{align}
commutes, where ${}_{\mc A}m_{\mc B}$ decomposes as
\begin{align}
	{}_{\mc A}m_{\mc B} :
	\mc{A}_{\phi} \otimes((\mc{A}_{\phi} \otimes (M \otimes \mc{B}_\psi))\otimes \mc B_\psi)
	&\xrightarrow{{\rm id}_{\mc A}\otimes \alpha_{\mc A,M \otimes \mc{B},\mc B}}
	\mc{A}_{\phi} \otimes(\mc{A}_{\phi} \otimes ((M \otimes \mc{B}_\psi)\otimes \mc B_\psi))

	\nonumber\\
	&\xrightarrow{{\rm id_{A}}\otimes({\rm id_{A}}\otimes \alpha_{M,\mc B, \mc B})}
	\mc{A}_{\phi} \otimes(\mc{A}_{\phi} \otimes (M\otimes (\mc B_\psi \otimes \mc B_\psi)))

	\nonumber\\
	&\xrightarrow{{\rm id}_{\mc A}\otimes ({\rm id}_{\mc A}\otimes ({\rm id}_{M}\otimes m_{\mc B}))}
	\mc{A}_{\phi} \otimes(\mc{A}_{\phi} \otimes (M \otimes \mc{B}_\psi))

	\nonumber\\
	&\xrightarrow{\alpha^{-1}_{\mc A,A,M \otimes \mc{B}}}
	(\mc{A}_{\phi} \otimes \mc A_\phi)\otimes (M \otimes \mc{B}_\psi)

	\nonumber\\
	&\xrightarrow{m_{\mc A}\otimes {\rm id}_{M \otimes \mc{B}}}
	\mc{A}_{\phi} \otimes(M \otimes \mc{B}_\psi) \; .
\end{align}
Furthermore, it acts on non-zero basis vectors $(\fr a , \fr a', \fr b , \fr b') \in \mathbb{C}_{\mathfrak{a}} \times \mathbb C_{\fr a'} \times \mathbb C_{\fr b} \times \mathbb C_{\fr b'}$ and $v_{\fr g}\in M_{\fr g}$ as
\begin{align}\label{eq:bimodactioncompositon}
	{}_{\mc A}m_{\mc B} :
	\fr{a}' \otimes((\fr{a}\otimes (v_{\fr{g}}\otimes \fr{b}))\otimes \fr{b'})
	\mapsto
	\delta_{{\rm t}(\fr{a}'),{\rm s}(\fr{a})} \,
	\delta_{{\rm t}(\fr{b}),{\rm s}(\fr{b}')} \,
	\varpi_{\fr g}^{\mc A \mc B}(\fr a, \fr a' | \fr b , \fr b') \,
	[\fr{a'a}\otimes (v_{\fr{g}}\otimes \fr{bb'})]
\end{align}
for any set of $\fr{a}',\fr{a},\fr{g},\fr{b},\fr{b}'$ composable morphisms in $\mc{G}$,
where we introduced the cocycle data
\begin{equation}
	\varpi_{\fr g}^{\mc A \mc B}(\fr a, \fr a' | \fr b , \fr b')
	 :=
	 \frac{\alpha(\fr{a},\fr{gb},\fr{b}')\, \alpha(\fr{g},\fr{b},\fr{b}')}{\alpha(\fr{a}',\fr{a},\fr{gbb}')}\phi(\fr{a}',\fr{a})\psi(\fr{b},\fr{b}') \; .
\end{equation}
Writing
\begin{equation*}
	\begin{array}{ccccl}
		\qp & : & \mc{A}_\phi \otimes (M \otimes \mc{B}_\psi) & \to & M
		\\
		& : & \fr a  \otimes (v_\fr{g} \otimes  \fr b) &\mapsto &
		 v_\fr{g} \triangleright \qp \, (v_{\fr g},\fr a , \fr b)\in M_{\fr a \fr g \fr b}
	\end{array} \; ,
\end{equation*}
it follows from equation \eqref{eq:bimodactioncompositon} that $\qp \, (v_{\fr g},\fr a , \fr b) \in{\rm End}(M)$ satisfies the algebra
\begin{align}\label{eq:weakcompositionbimodaction}
	\qp \, (v_{\fr g},\fr a , \fr b)
	\triangleright
	\qp \, (v_{\fr g'},\fr a' , \fr b')
	=
	\delta_{{\rm t}(\fr{a}'),{\rm s}(\fr{a})} \,
	\delta_{{\rm t}(\fr{b}),{\rm s}(\fr{b}')} \,
	\delta_{\fr g',\fr a \fr g \fr b} \,
	\varpi_{\fr g}^{\mc A \mc B}(\fr a, \fr a' | \fr b , \fr b')
	\, \qp \, (v_{\fr g},\fr a '\fr a , \fr b \fr b')
\end{align}
for all $\fr{g},\fr{g'}\in {\rm Hom}_{\mc{G}}({\rm Ob}(\mc{A}),{\rm Ob}(\mc{B})) )$, ${\fr{a}}\in {\rm Hom}_{\mc{A}}(-,{\rm s}(\fr{g}))$, ${\fr{a}'}\in {\rm Hom}_{\mc{A}}(-,{\rm s}(\fr{g'}))$, ${\fr{b}}\in {\rm Hom}_{\mc{B}}({\rm t}(\fr{g}),-)$ and ${\fr{b'}}\in {\rm Hom}_{\mc{B}}({\rm t}(\fr{g'}),-)$. Such data can be concisely described by introducing the groupoid  $\widetilde{\mc{G}}_{{\mc A} \mc{B}}$ with object set ${\rm Hom}_{\mc{G}}({\rm Ob}(\mc A),{\rm Ob}(\mc B))$ and morphism set given by
\begin{align}
	\biGr{\fr g}{}{\fr a, \fr b}
	\fr{a}\fr{g}\fr{b}
	\equiv
	\biGr{\fr g}{}{\fr a, \fr b} \; ,
\end{align}
for all $\fr{g}\in {\rm Ob}(\widetilde{\mc{G}}_{\mc A \mc{B}})$, $\fr{a}\in {\rm Hom}_{\mc A}(-,{\rm s}(\fr{g}))$ and $\fr{b}\in {\rm Hom}_{\mc B}({\rm t}(\fr{g}),-)$.
Composition is defined by
\begin{equation}
	\biGr{\fr g}{}{\fr a, \fr b}
	\biGr{\fr{a}\fr{g}\fr{b}}{}{\fr a', \fr b'}
	\fr{a}'\fr{a}\fr{g}\fr{b}\fr{b}'
	=
	\biGr{\fr g}{}{\fr a' \fr a, \fr b \fr b'}
	\fr{a}'\fr{a}\fr{g}\fr{b}\fr{b}' \; ,
\end{equation}
for all composable pairs $(\fr{a}',\fr{a}) \in \mc A^2_{\rm comp.}$ and $(\fr{b},\fr{b}') \in \mc B^2_{\rm comp.}$.
Noting that $[\varpi^{\mc{A}\mc{B}}] \in H^{2}(\widetilde{\mc{G}}_{\mc{A} \mc{B}} ,\rU(1))$ defines a $\widetilde{\mc{G}}_{\mc{A} \mc{B}}$ 2-cocycle, $\qp$ can then be described via a weak functor
\begin{equation*}
	\begin{array}{ccccl}
		F_{\mathrlap{\hspace{1.5pt} p}q_{\, M}} & : & \widetilde{\mc{G}}_{\mc{A} \mc{B}} & \to & \mathsf{Vec}
		\\
		& : & \fr  g \in {\rm Ob}(\widetilde{\mc{G}}_{\mc{A} \mc{B}}) &\mapsto &
		M_{\fr g} \subset M
		\\
		& : & \biGr{\fr g}{}{\fr a, \fr b} \;  \in {\rm Hom}(\widetilde{\mc{G}}_{\mc{A} \mc{B}}) & \mapsto & \qp \, (v_{\fr g}, \fr a , \fr b):M_{\fr g} \to M_{\fr a \fr g \fr b}
	\end{array} \; ,
\end{equation*}
such that every isomorphism $\qp \, (v_{\fr g}, \fr a , \fr b)$ satisfies the composition relation \eqref{eq:weakcompositionbimodaction}. Using the equivalence between representations and modules of algebraic structures, we can thus view the pair $(M, F_{\mathrlap{\hspace{1.5pt} p}q_{\, M}})$ as a module over the twisted groupoid algebra $\mathbb{C}[\widetilde{\mc{G}}_{\mc{A} \mc{B}}]^{\varpi^\mc{AB}}$.
Considering the diagram
\begin{align}
	\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
		|[alias=A]|\mc A_\phi \otimes(M_{1}\otimes \mc B_\psi)
		\&\&\&
		|[alias=B]|\mc A_\phi \otimes (M_{2}\otimes \mc B_\psi)

		\\
		\\

		|[alias=AA]|M_{1}
		\&\&\&
		|[alias=BB]|M_{2}

		\arrow[from=A,to=B,"{\rm id}_{\mc A}\otimes (f\otimes {\rm id}_{\mc B})"]
		\arrow[from=B,to=BB,"\mathrlap{\hspace{1.5pt} p}q_{\;2}"]

		\arrow[from=A,to=AA,"\mathrlap{\hspace{1.5pt} p}q_{\; 1}"']
		\arrow[from=AA,to=BB,"f"']
	\end{tikzcd} ,
\end{align}
for a pair of $(\mc A_\phi, \mc B_\psi)$-bimodules $(M_{1},\qp_{\, 1}(-))$ and $(M_{2},\qp_{\, 2}(-))$,
we conclude that an $(\mc A_\phi, \mc B_\psi)$-bimodule homomorphism is defined via a natural transformation $f:\qp_1 \to \qp_2$, or equivalently, as an \emph{intertwiner} for representations of $\mathbb{C}[\widetilde{\mc{G}}_{\mc{A} \mc{B}}]^{\varpi^\mc{AB}}$. Putting everything together, we obtain the equivalence $\mathsf{Bimod}_{\mathsf{Vec}^\alpha_\mc{G}}(\mc{A}_\phi,\mc{B}_\psi) \simeq \mathsf{Mod}(\mathbb{C}[\widetilde{\mc{G}}_{\mc{A} \mc{B}}]^{\varpi^\mc{AB}})$.

\subsection{Bicategory of separable algebra objects in $\mathsf{Vec}^{\alpha}_{\mc{G}}$}\label{sec:sAlg}

Pursuing our construction, we shall now introduce a special class of algebra objects known as \emph{separable algebra objects}. We will then construct a bicategory whose objects are separable objects, and morphisms are bimodule objects between them. First, let us define what it means for an algebra object to be separable:

\begin{definition}[Separable algebra object]
	Let $\mc C$ be a multi-fusion category and $A \equiv (A,m,u)$ an algebra object in $\mc C$. The algebra object $A$ is said to be `separable' if the multiplication map $m: A\otimes A \to A$ admits a `section' map $\Delta: A \to A\otimes A$ such that
	\begin{align*}
		A\xrightarrow{\Delta}A\otimes A\xrightarrow{m}A=A\xrightarrow{{\rm id}_{A}}A \; ,
	\end{align*}
	as an $(A,A)$-bimodule homomorphism.
\end{definition}
\noindent
Let us now define a binary functor. Let $A,B,C$ be three separable algebra objects in a multi-fusion category $\mc{C}$, $M_{AB} \equiv (M_{AB},q_{A},p_{B}) \equiv (M_{AB} , \qp_{M_{AB}})$ an $(A,B)$-bimodule, and $M_{BC} \equiv (M_{BC},q_{B},p_{C}) \equiv (M_{BC}, \qp_{M_{BC}})$ a $(B,C)$-bimodule. Using this data, we want to construct an $(A,C)$-bimodule, which we shall notate via $(M_{AB} \otimes_B M_{BC} , \qp_{M_{AB}} \otimes_B \qp_{M_{BC}})$. First, let us define the morphism $\qp_{M_{AB}\otimes M_{BC}}: A\otimes ((M_{AB}\otimes M_{BC})\otimes C ) \to M_{AB}\otimes M_{BC}$ that decomposes as
\begin{align}
	\label{eq:bimodcompbimod}
	&A\otimes ((M_{AB}\otimes M_{BC})\otimes C )
	\xrightarrow{{\rm id}_{A}\otimes \alpha_{M_{AB},M_{BC},C}}
	A\otimes (M_{AB}\otimes (M_{BC}\otimes C ))
	\\
	\nn
	& \q \xrightarrow{\alpha^{-1}_{A,M_{AB},M_{BC}\otimes C}}
	(A\otimes M_{AB})\otimes (M_{BC}\otimes C )
	\xrightarrow{  ( \ell_{A \otimes M_{AB}}^{-1})\otimes {\rm id}_{M_{BC}\otimes C}}
	((A\otimes M_{AB})\otimes \mathbbm{1})\otimes (M_{BC}\otimes C )
	\\
	\nn
	& \q \xrightarrow{  ({\rm id}_{A\otimes M_{AB}}\otimes u_B)\otimes {\rm id}_{M_{BC}\otimes C}}
	((A\otimes M_{AB})\otimes B)\otimes (M_{BC}\otimes C )
	\\
	\nn
	& \q \xrightarrow{  ({\rm id}_{A\otimes M_{AB}}\otimes \Delta_B)\otimes {\rm id}_{M_{BC}\otimes C}}
	((A\otimes M_{AB})\otimes (B\otimes B))\otimes (M_{BC}\otimes C )
	\\
	\nn
	& \q \xrightarrow{\alpha^{-1}_{A\otimes M_{AB},B,B}\otimes {\rm id}_{M_{BC}\otimes C}}
	(((A\otimes M_{AB})\otimes B)\otimes B)\otimes (M_{BC}\otimes C )
	\\
	\nn
	& \q \xrightarrow{(\alpha_{A,M_{AB},B}\otimes {\rm id}_{B})\otimes {\rm id}_{M_{BC}\otimes C}}
	((A\otimes (M_{AB}\otimes B))\otimes B)\otimes (M_{BC}\otimes C )
	\\
	\nn
	& \q \xrightarrow{\alpha_{A\otimes (M_{AB}\otimes B),B,M_{BC}\otimes C}}
	(A\otimes (M_{AB}\otimes B))\otimes (B\otimes (M_{BC}\otimes C ))
	\xrightarrow{\mathrlap{\hspace{1.5pt} p}q_{\; M_{AB}} \otimes \mathrlap{\hspace{1.5pt} p}q_{\; M_{BC}}}
	M_{AB}\otimes M_{BC} \; .
\end{align}
Using this morphism, let us further define the endomorphism $e_{M_{AB} \otimes M_{BC}} : M_{AB} \otimes M_{BC} \to M_{AB} \otimes M_{BC}$ that decomposes as
\begin{align}
	\label{eq:seperabilityidempotent}
	M_{AB}\otimes M_{BC}
	&\xrightarrow{r^{-1}_{M_{AB}\otimes M_{BC}}}
	(M_{AB}\otimes M_{BC})\otimes \mathbbm{1}
	\xrightarrow{\ell^{-1}_{(M_{AB}\otimes M_{BC})\otimes \mathbbm{1}}}
	\mathbbm{1}\otimes((M_{AB}\otimes M_{BC})\otimes \mathbbm{1})
	\\
	\nn
	& \xrightarrow{u_{A}\otimes({\rm id}_{M_{AB}\otimes M_{BC}}\otimes u_{C})}
	A\otimes((M_{AB}\otimes M_{BC})\otimes C)
	\xrightarrow{\mathrlap{\hspace{1.5pt} p}q_{\; M_{AB} \otimes M_{BC}} }
	M_{AB}\otimes M_{BC} \; .
\end{align}
By the requirement that $\Delta : B \to B\otimes B$ is a $(B,B)$-bimodule section to the $(B,B)$-bimodule homomorphism $m : B\otimes B \to B$, together with the compatibility conditions spelt out above and the naturalness of the associator $\alpha$, we can show that $e_{M_{AB}\otimes M_{BC}}$ is an \emph{idempotent endomorphism} in $\mc{C}$, i.e. $e_{M_{AB} \otimes M_{BC}} \circ e_{M_{AB} \otimes M_{BC}} = e_{M_{AB} \otimes M_{BC}}$.
The requirement that the multi-fusion category $\mc C$ is abelian ensures that every idempotent is a \emph{split idempotent}:
\begin{definition}[Split idempotent]
	An idempotent $a \xrightarrow{e} a$ is called split when there exists an object $b$ and morphisms $a\xrightarrow{\mathsf s}b$, $b\xrightarrow{\mathsf r} a$ such that $b\xrightarrow{\mathsf r\circ \mathsf s}b=b\xrightarrow{{\rm id}_{b}}b$ and $a\xrightarrow{\mathsf s\circ \mathsf r}a=a\xrightarrow{e}a$.
\end{definition}
\noindent
We define the object $M_{AB}\otimes_{B}M_{BC}\in\mc{C}$ as a choice of splitting object for the idempotent $e_{M_{AB}\otimes M_{BC}}$ such that
$M_{AB}\otimes M_{BC}\xrightarrow{\mathsf s_{M_{AB} ,M_{BC}}}M_{AB}\otimes_{B} M_{BC}$ and
$M_{AB}\otimes_{B} M_{BC}\xrightarrow{\mathsf r_{M_{AB} , M_{BC}}}M_{AB}\otimes M_{BC}$,
where $\mathsf s_{M_{AB} , M_{BC}}\circ \mathsf r_{M_{AB} , M_{BC}}=e_{M_{AB}\otimes M_{BC}}$ and $\mathsf r_{M_{AB} , M_{BC}}\circ \mathsf s_{M_{AB} , M_{BC}}={\rm id}_{M_{AB}\otimes M_{BC}}$.
Crucially, a choice of splitting object is unique up to isomorphism, and independent of a choice of section up to isomorphism. Using this data, let us further define the following morphism:
\begin{align}
	 \qp_{M_{AB}} \otimes_B \qp_{M_{BC}}:=
	\mathsf r_{M_{AB}, M_{BC}}\circ
	( \qp_{M_{AB} \otimes M_{BC}})
	\circ
	\mathsf s_{M_{AB} ,M_{BC}} \; .
\end{align}
Putting everything together, we obtain that $(M_{AB} \otimes_B M_{BC} , \qp_{M_{AB}} \otimes_B \qp_{M_{BC}})$ defines an $(A,C)$-bimodule in $\mc{C}$. So we have obtained a way to define an $(A,C)$-bimodule out of an $(A,B)$- and a $(B,C)$-bimodule given three separable algebra objects $A,B,C$. This can expressed in terms of the bifunctor
\begin{align}
	\otimes_{B}:\mathsf{Bimod}_{\mc{C}}(A,B)
	\times
	\mathsf{Bimod}_{\mc{C}}(B,C)
	\rightarrow
	\mathsf{Bimod}_{\mc{C}}(A,C) \; ,
\end{align}
where objects $M_{AB}\in {\rm Ob}(\mathsf{Bimod}_{\mc{C}}(A,B))$ and $M_{BC}\in {\rm Ob}(\mathsf{Bimod}_{\mc{C}}(B,C))$ are mapped via
\begin{align}
	\otimes_{B}:M_{AB}\times M_{BC}\mapsto M_{AB}\otimes_{B} M_{BC} \; ,
\end{align}
and bimodule homomorphisms $f_{AB}\in {\rm Hom}(\mathsf{Bimod}_{\mc{C}}(A,B))$, $f_{BC}\in {\rm Hom}(\mathsf{Bimod}_{\mc{C}}(B,C))$ are sent to
\begin{align}
	\otimes_{B}:f_{AB}\times f_{BC}\mapsto f_{AB}\otimes_{B} f_{BC} :=\mathsf s_{M_{AB} , M_{BC}}\circ  (f_{AB}\otimes f_{BC}) \circ \mathsf r_{M_{AB} , M_{BC}} \; .
\end{align}
In order to obtain a bicategory, we are left to define a left unitor, a right unitor and an associator. Considering $A$ and $B$ as $(A,A)$- and $(B,B)$-bimodules, respectively, one can verify that for any $(A,B)$-bimodule $M_{AB}$
\begin{align}
	A\otimes_{A} M_{AB}\cong M_{AB}\cong M_{AB}\otimes_{B}B \; ,
\end{align}
as $(A,B)$-bimodule in $\mc{C}$. This property demonstrates that an algebra $A$ seen as an $(A,A)$-bimodule defines a notion a unit morphism for an algebra object $A$. The corresponding left unitor isomorphism, which is an $(A,B)$-bimodule, is defined via the maps
\begin{align*}
	A\otimes_{A}M_{AB}&\xrightarrow{\mathsf r_{A , M_{AB}}}A\otimes M_{AB} \xrightarrow{q_{A}}M_{AB}
\end{align*}
and
\begin{align*}
	M_{AB} & \xrightarrow{\ell^{-1}_{M_{AB}}}\mathbbm{1}\otimes M_{AB}
	\xrightarrow{\Delta\otimes{\rm id}_{M_{AB}}}(A\otimes A)\otimes M_{AB}
	\xrightarrow{\alpha_{A,A,M_{AB}}}A\otimes (A\otimes M_{AB})
	\\
	& \xrightarrow{{\rm id}_{A}\otimes q_{A}}A\otimes M_{AB}
	\xrightarrow{\mathsf s_{A , M_{AB}}}A\otimes_{A} M_{AB} \; ,
\end{align*}
which can be shown to satisfy the triangle relations. The right unitor can be defined in a similar fashion. Finally, for any quadruple of algebra objects $A,B,C,D$ and $(A,B)$-bimodule $M_{AB}$, $(B,C)$-bimodule $M_{BC}$ and $(C,D)$-bimodule $M_{CD}$, the morphism
\begin{align*}
	&(M_{AB}\otimes_{B} M_{BC})\otimes_{C}M_{CD}
	\xrightarrow{\mathsf r_{M_{AB}\otimes M_{BC} , M_{CD}}}
	(M_{AB}\otimes_{B} M_{BC})\otimes M_{CD}
	\\
	& \q \xrightarrow{\mathsf r_{M_{AB} , M_{BC}}\otimes {\rm id}_{M_{CD}} }
	(M_{AB}\otimes M_{BC})\otimes M_{CD}
	\xrightarrow{\alpha_{M_{AB},M_{BC},M_{BC}} }
	M_{AB}\otimes (M_{BC}\otimes M_{CD})
	\\
	& \q \xrightarrow{{\rm id}_{M_{AB}}\otimes \mathsf s_{M_{BC},M_{CD}} }
	M_{AB}\otimes (M_{BC}\otimes_{C}M_{CD})
	\xrightarrow{{\rm id}_{M_{AB}}\otimes \mathsf s_{M_{BC},M_{CD}} }
	M_{AB}\otimes_{B} (M_{BC}\otimes_{C}M_{CD})
\end{align*}
defines an isomorphism of $(A,D)$-bimodules in $\mc{C}$ satisfying the pentagon relation. Putting everything together, we obtain the following bicategory:

\begin{definition}[Bicategory of separable algebra objects]
	Given a multi-fusion $\mc{C}$, we notate via $\mathsf{sAlg}(\mc{C})$ the bicategory with objects, separable algebras objects in $\mc{C}$, and hom-category $\mathsf{Hom}_{\mathsf{sAlg}(\mc{C})}(A,B):=\mathsf{Bimod}_{\mc{C}}(A,B)$ for all separable algebra objects $A,B$ in $\mc{C}$. The composition bifunctor is provided by $\otimes_B:\mathsf{Bimod}_{\mc{C}}(A,B)\times \mathsf{Bimod}_{\mc{C}}(B,C)\rightarrow \mathsf{Bimod}_{\mc{C}}(A,C)$ as defined in this section.
\end{definition}

\bigskip \noindent
Let us now apply the definition above to the multi-fusion category $\mathsf{Vec}^{\alpha}_{\mc{G}}$. First of all, every algebra object in $\mathsf{Vec}^{\alpha}_{\mc{G}}$ can be shown to be separable. Indeed, given an algebra object $\mc A_\phi$ in $\mathsf{Vec}^{\alpha}_{\mc{G}}$, a choice of section $\Delta: \mc A_\phi \to \mc A_\phi\otimes \mc A_\phi$ is provided by the following map on basis elements:
\begin{align}
	\label{eq:section}
	\Delta: \fr{a} \mapsto
	\frac{1}{|{\rm Hom}_{\mc{A}}({\rm s}(\fr{a}),-)|}
	\sum_{\substack{\fr{a}_{1},\fr{a}_{2}\in {\rm Hom}(\mc A)\\ \fr{a}_{1}\fr{a}_{2}=\fr{a}}}
	\frac{1}{\phi(\fr{a}_{1},\fr{a}_{2})}
	\fr{a}_{1}\otimes \fr{a}_{2}\; .
\end{align}
Algebra objects equipped with the section defined above form  the objects of the bicategory $\mathsf{sAlg}(\mathsf{Vec}^\alpha_{\mc G})$. Let $A_\phi$, $B_\psi$, $C_\varphi$ be three objects in  $\mathsf{sAlg}(\mathsf{Vec}^\alpha_{\mc G})$, we consider the 1-morphisms   $M_{\mc A \mc B}\equiv(M_{\mc A \mc B},\qp_{M_{\mc{A}\mc{B}}})\in {\rm Ob}(\mathsf{Bimod}_{ \mathsf{Vec}^{\alpha}_{\mc{G}} }(\mc A_\phi, \mc B_\psi))$ and $M_{\mc B \mc C}\equiv(M_\mc{BC},\qp_{M_{\mc{B}\mc{C}}})\in {\rm Ob}(\mathsf{Bimod}_{ \mathsf{Vec}^{\alpha}_{\mc{G}} }(\mc B_\psi,\mc C_{\varphi}))$. Following \eqref{eq:bimodcompbimod}, the map $\qp_{M_{\mc{A}\mc{B}} \otimes M_\mc{BC}}$ acts on basis elements of $\mathbb C_{\fr a}\otimes (([M_\mc{AB}]_{\fr g_1} \otimes [M_\mc{BC}]_{\fr g_2}) \otimes \mathbb C_{\fr c})$ as

\begin{align*}
	\qp_{M_{\mc{A}\mc{B}} \otimes M_\mc{BC}} :
	\fr{a}\otimes ((v^{\mc A \mc B}_{\fr{g}_{1}}\otimes v^\mc{BC}_{\fr{g}_{2}})\otimes \fr{c})
	\mapsto \frac{1}{|{\rm Hom}(\mc{B})|}
	\! \sum_{\fr{b}\in {\rm Hom}(\mc{B})} \!
	& \frac{
		\alpha(\fr{g}_{1},\fr{g}_{2},\fr c) \, \alpha(\fr{a},\fr{g}_{1},\fr{b}) \, \alpha(\fr{ag}_{1}\fr{b},\fr{b}^{-1},\fr{g}_{2}\fr{c})
	}
	{
		\psi(\fr{b},\fr{b}^{-1}) \, \alpha(\fr{a},\fr{g}_{1},\fr{g}_{2}\fr{c}) \, \alpha(\fr{ag}_{1},\fr{b},\fr{b}^{-1})
	}
	\\
	&v^\mc{AB}_{\fr{g}_{1}}\triangleright \qp \, (v^\mc{AB}_{\fr g_1},\fr a , \fr b)
	\otimes
	v^\mc{BC}_{\fr{g}_{2}}\triangleright \qp \, (v^\mc{BC}_{\fr g_2},\fr b^{-1} , \fr c) \, .
\end{align*}
Applying the formula above to $\fr a = {\rm id}_{\rm s(\fr g_1)}$ and $\fr c = {\rm id}_{\rm t(\fr g_2)}$, we obtain that the map $\mathsf s_{M_\mc{AB} , M_\mc{BC}}:M_\mc{AB}\otimes M_\mc{BC}\rightarrow M_\mc{AB}\otimes_\mc{B} M_\mc{BC}$ acts on basis elements as
\begin{align*}
	\mathsf s_{M_\mc{AB}, M_\mc{BC}} :
	v^\mc{AB}_{\fr{g}_{1}} \otimes v^\mc{BC}_{\fr{g}_{2}}
	\mapsto
	\frac{1}{|{\rm Hom}(\mc{B})|}
	\sum_{\fr{b}\in {\rm Hom}(\mc{B})}
	&\frac{1}{\psi(\fr{b},\fr{b}^{-1})}
	\frac{
		\alpha(\fr{g}_{1}\fr{b},\fr{b}^{-1},\fr{g}_{2})
	}
	{
		\alpha(\fr{g}_{1},\fr{b},\fr{b}^{-1})
	}
	\\
	&v^\mc{AB}_{\fr{g}_{1}}\triangleright \qp \, (v^\mc{AB}_{\fr g_1},{\rm id}_{\rm s(\fr g_1)} , \fr b)
	\otimes
	v^\mc{BC}_{\fr{g}_{2}}\triangleright \qp \, (v^\mc{BC}_{\fr g_2},\fr b^{-1} , {\rm id}_{\rm t(\fr g_2)}) \; ,
\end{align*}
whereas $\mathsf r_{M_\mc{AB} , M_\mc{BC}}:M_\mc{AB}\otimes_{B} M_\mc{BC}\to M_\mc{AB} \otimes M_\mc{BC}$ is given by the inclusion. We can finally check that the binary functor simplifies such that
\begin{align}
	\qp_{M_{\mc{A}\mc{B}}}\otimes_{B} \qp_{M_{\mc{B}\mc{C}}}= \qp_{M_{\mc{A}\mc{B}} \otimes M_\mc{BC}} \; .
\end{align}
Left unitor, right unitor and associator can now be readily obtained. Finally, let us remark that the above bifunctor can be conveniently rephrased as a comultiplication map $\widetilde{\Delta}_B:\mathbb C[\widetilde{\mc{G}}_\mc{AC}]^{\varpi^\mc{AC}} \to  \mathbb C[\widetilde{\mc{G}}_\mc{AB}]^{\varpi^\mc{AB}} \otimes \mathbb C[\widetilde{\mc{G}}_\mc{BC}]^{\varpi^\mc{BC}} $
defined by
\begin{align}
	\widetilde{\Delta}_B\big( \big|\biGr{\fr g}{}{\fr a , \fr c} \big\ra \big)
	:= \frac{1}{|{\rm Hom}(\mc B)|}
	\!\!\!\!\!\!\! \sum_{\substack{
			\fr{g}_{1} \in {\rm Ob}(\widetilde{\mc G}_\mc{AB}) \\ \fr{g}_{2} \in {\rm Ob}(\widetilde{\mc G}_\mc{BC})
			\\
			\fr{g}_{1}\fr{g}_{2}=\fr{g}\\
			\fr{b} \in {\rm Hom}_\mc{B}(\rm t(\fr g_1), \rm t(\fr g_2))}
		} \!\!\!\!\!\!\!\!\!
	&\frac{
		\alpha(\fr{g}_{1},\fr{g}_{2},\fr{c}) \, \alpha(\fr{a},\fr{g}_{1},\fr{b}) \, \alpha(\fr{ag}_{1}\fr{b},\fr{b}^{-1},\fr{g}_{2}\fr{c})
	}
	{
		\psi(\fr b , \fr b^{-1}) \, \alpha(\fr{g},\fr{g}_{1},\fr{g}_{2}\fr{g}) \, \alpha(\fr{g}\fr{g}_{1},\fr{g},\fr{g}^{-1})
	}
	\big| \biGr{\fr g_1}{}{\fr a , \fr b} \big \ra \otimes | \biGr{\fr g_2}{}{\fr b^{-1} ,\fr c}\big \ra .
\end{align}

\subsection{Bicategory of $\mathsf{Vec}^{\alpha}_{\mc{G}}$-module categories}\label{sec:MOD}

We are now ready to describe the bicategory $\mathsf{MOD}(\mathsf{Vec}^\alpha_\mc{G})$ by spelling out equivalence with the bicategory $\mathsf{sAlg}(\mc{C})$ described above. In the following, we will describe how this is the relevant structure to describe boundary excitations in gauge models of topological phases.

Letting $\mc A_\phi$ be a (separable) algebra object in $\mathsf{Vec}^{\alpha}_{\mc{G}}$, the category $\mathsf{Mod}_{\mathsf{Vec}^\alpha_\mc{G}}(\mc A_\phi)$ of right $\mc A_\phi$-modules is a left module category for $\mathsf{Vec}^{\alpha}_{\mc{G}}$. Let us spell out this correspondence. The module functor
\begin{align}
	\odot:&
	\mathsf{Vec}^{\alpha}_{\mc{G}}
	\times\mathsf{Mod}_{\mathsf{Vec}^\alpha_\mc{G}}(\mc A_\phi)
	\rightarrow
	\mathsf{Mod}_{\mathsf{Vec}^\alpha_\mc{G}}(\mc A_\phi)
\end{align}
is defined on objects $V\in {\rm Ob}(\mathsf{Vec}^{\alpha}_{\mc{G}})$ and $(M_{\mc A},p_{\mc A})\in {\rm Ob}(\mathsf{Mod}_{\mathsf{Vec}^\alpha_\mc{G}}(\mc A_\phi)$ by
\begin{align}
	\odot: V\times M_{\mc A}\mapsto V\otimes M_{\mc A} \; ,
\end{align}
where $V\otimes M_{\mc A}\in {\rm Ob}(\mathsf{Mod}_{\mathsf{Vec}^\alpha_\mc{G}}(\mc A_\phi))$ is the $\mc A_\phi$-module with action defined by the following composition of morphisms in $\mathsf{Vec}^{\alpha}_{\mc{G}}$:
\begin{align}
	(V\otimes M_{\mc A})\otimes \mc A_\phi \xrightarrow{\alpha_{V,M_{\mc A},\mc A}}V\otimes (M_{\mc A}\otimes \mc A_\phi)\xrightarrow{{\rm id}_{V}\otimes p_{\mc A}}V\otimes M_{\mc A}\;.
\end{align}
The functor takes morphisms to their tensor product over the field $\mathbb{C}$. The module associator $\dot{\alpha}_{V,W,M}$ reduces to the associator in $\mathsf{Hom}^\alpha_\mc{G}$ such that for $V,W\in {\rm Ob}(\mathsf{Vec}^{\alpha}_{\mc{G}})$ one has
\begin{align}
	(V\otimes W)\otimes M_\mc{A} \xrightarrow{\alpha_{V,W,M_{\mc A}}} V\otimes (W\otimes M_{\mc A}) \; .
\end{align}
A $\mathsf{Vec}^{\alpha}_{\mc{G}}$-module category $\mathsf{Mod}_{\mathsf{Vec}^\alpha_\mc{G}}(\mc A_\phi)$ is then indecomposable if and only if the algebra object $\mc A_\phi$ is not isomorphic a direct sum of two non-trivial algebra objects \cite{etingof2016tensor}.

Let us now describe $\mathsf{Vec}^{\alpha}_{\mc{G}}$-module functors. Let $\mc A_\phi$ and $\mc B_\psi$ be any pair of algebra objects in $\mathsf{Vec}^{\alpha}_{\mc{G}}$, with $\mathsf{Mod}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}(\mc A_\phi)$ and $\mathsf{Mod}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}(\mc B_\psi)$ the corresponding category of module objects. To each $(\mc A_\phi , \mc B_\psi)$-bimodule object $M_{\mc A \mc B}$, we can define a  $\mathsf{Vec}^{\alpha}_{\mc{G}}$-module functor
\begin{align}
	-\otimes_{\mc A}M_{\mc A \mc B}:\mathsf{Mod}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}(\mc A_\phi)\rightarrow \mathsf{Mod}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}(\mc B_\psi) \; ,
\end{align}
which acts on objects $M_{\mc A}\in {\rm Ob}(\mathsf{Mod}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}(\mc A_\phi )) $ via the map
\begin{align}
	-\otimes_{\mc A}M_{\mc A \mc B}:M_{\mc A}\mapsto M_{\mc A}\otimes_{\mc A}M_{\mc A \mc B} \; ,
\end{align}
and sends morphisms $f \in {\rm Hom}(\mathsf{Mod}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}(\mc A_\phi))$ to $f \otimes {\rm id}_{M_{\mc A \mc B}}$. The natural isomorphism
\begin{align}
	s:
	(\mathsf{Vec}^{\alpha}_{\mc{G}}\otimes \mathsf{Mod}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}(\mc A_\phi))
	\otimes_{\mc A}
	\mathsf{Bimod}(\mc A_\phi,\mc B_\psi)
	\rightarrow
	\mathsf{Vec}^{\alpha}_{\mc{G}}\otimes (\mathsf{Mod}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}(\mc A_\phi)\otimes_{\mc A}\mathsf{Bimod}(\mc A_\phi,\mc B_\psi))
\end{align}
is given on objects $V \in {\rm Ob}(\mathsf{Vec}^{\alpha}_{\mc{G}})$ and $M_{\mc A}\in\mathsf{Mod}_{\mathsf{Vec}^{\alpha}_{\mc{G}}}(\mc A_\phi)$ via the associator $\alpha$ in $\mathsf{Vec}^{\alpha}_{\mc{G}}$ such that:
\begin{align}
	\nn
	s_{V,M_{\mc A}}:(V\otimes M_{\mc A})\otimes_{\mc A}M_{\mc A \mc B}&\xrightarrow{\mathsf{r}_{V\otimes M_{\mc A},M_{\mc A \mc B}}}(V\otimes M_{\mc A})\otimes M_{\mc A \mc B}
	\\
	\nn
	&\xrightarrow{\alpha_{V,M_{\mc A},M_{\mc A \mc B}}}V\otimes (M_{\mc A}\otimes M_{\mc A \mc B})
	\\&\xrightarrow{{\rm id}_{V}\otimes \mathsf{s}_{M_{\mc A},M_{\mc A \mc B}}}V\otimes (M_{\mc A}\otimes_{\mc A}M_{\mc A \mc B})\;.
\end{align}
In a similar vein, morphisms of $\mathsf{Vec}^{\alpha}_{\mc{G}}$-module functors are induced by natural transformations between bimodules. Together, this yields the desired equivalence:

\begin{proposition}\label{prop:MOD-sAlg}
	There exists an equivalence of bicategories between $\mathsf{sAlg}(\mathsf{Vec}^\alpha_\mc{G})$ and $\mathsf{MOD}(\mathsf{Vec}^\alpha_\mc{G})$ by sending separable algebra objects in $\mathsf{Vec}^\alpha_\mc{G}$ to their category of (right) modules in $\mathsf{Vec}^\alpha_\mc{G}$, bimodule objects $M_{\mc A \mc B}\in \mathsf{Hom}_{\mathsf{sAlg}(\mathsf{Vec}^\alpha_\mc{G})}(\mc A_\phi,\mc B_\psi)$ are sent to the $\mathsf{Vec}^\alpha_\mc{G}$-module functor $-\otimes_{\mc A} M_{\mc A \mc B}:\mathsf{Mod}_{\mathsf{Vec}^\alpha_\mc{G}}(\mc A)\rightarrow \mathsf{Mod}_{\mathsf{Vec}^\alpha_\mc{G}}(\mc B)$ and bimodule natural transformations are sent to morphisms of $\mathsf{Vec}^\alpha_\mc{G}$-module functors.
\end{proposition}

\subsection{Bicategory of boundary excitations in (2+1)d gauge models}\label{sec:bicatmodel2D}

Using the technology developed in this section, we are now ready to describe gapped boundaries and their excitations in (2+1)d gauge models of topological phases within the language of bicategories. More specifically, we shall define a bicategory $\mathsf{Bdry}_G^\alpha$ whose objects are given by gapped boundary conditions, 1-morphisms provide gapped boundary excitations, and 2-morphisms define fusion processes of gapped boundary excitations. We shall then demonstrate that $\mathsf{Bdry}_G^\alpha$ is equivalent, as a bicategory, to $\mathsf{MOD}(\mathsf{Vec}^{\alpha}_{G})$.

Let us begin with a brief review of the  results obtained in the first part of this manuscript within the tube algebra approach. Hamiltonian realisations of (2+1)d Dijkgraf-Witten theory are defined in terms of pairs $(G,\alpha)$, where $G$ is a finite group and $\alpha$ is a normalised 3-cocycle in $H^{3}(G,\rU(1))$. In sec.~\ref{sec:DW}, it was argued that gapped boundaries can be indexed by pairs $(A,\phi)$, where $A\subset G$ is a subgroup of $G$ and $\phi\in C^{2}(A,\rU(1))$ is a 2-cochain satisfying the condition $d^{(2)}\phi=\alpha^{-1}{\sss |}_{A}$. In sec.~\ref{sec:tube2D}, we showed that boundary excitations at the interface of two one-dimensional gapped boundaries labelled by $(A,\phi)$ and $(B,\psi)$, respectively, were classified via representations of the boundary tube algebra that is isomorphic to the  twisted groupoid algebra $\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi}$.

We now collect the previous results into a bicategory $\mathsf{Bdry}_G^\alpha$. The objects of $\mathsf{Bdry}_G^\alpha$ are given by the set of all gapped boundary conditions $\{(A,\phi)\}$. For each pair $(A,\phi)$, $(B,\psi)$ of gapped boundary conditions, we assign the hom-category
\begin{align}
	\mathsf{Hom}_{\mathsf{Bdry}_G^\alpha}((A,\phi),(B,\psi)):=\mathsf{Mod}(\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi})\; ,
\end{align}
where $\mathsf{Mod}(\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi})$ denotes the category of $\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi}$-modules and intertwiners. In this way, the 1-morphisms $\rho_{AB}\in {\rm Ob}(\mathsf{Hom}_{\mathsf{Bdry}_G^\alpha}((A,\phi),(B,\psi)))$ correspond to boundary excitations incident at the interface between gapped boudaries labelled by $(A,\phi)$ and $(B,\psi)$. The composition bifunctor
\begin{align}
	\otimes:
	\mathsf{Mod}(\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi})
	\times
	\mathsf{Mod}(\mathbb{C}[G_{BC}]^{\alpha}_{\psi \varphi})
	\rightarrow
	\mathsf{Mod}(\mathbb{C}[G_{AC}]^{\alpha}_{\phi \varphi})
\end{align}
is defined on 1-morphisms $\rho_{AB}\in {\rm Ob}(\mathsf{Mod}(\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi}))$ and $\rho_{BC}\in {\rm Ob}(\mathsf{Mod}(\mathbb{C}[G_{BC}]^{\alpha}_{\psi \varphi}))$ via
\begin{align}
	\otimes:\rho_{AB}\times\rho_{BC}\mapsto
	\rho_{AB}\otimes_{B} \rho_{BC}:=
	(\rho_{AB}\otimes \rho_{BC})\triangleright \Delta_{B}(\mathbbm{1}_{AC}) \; ,
\end{align}
as described in sec.~\ref{sec:comult}, and on 2-morphisms $f_{AB}:\rho_{AB}\rightarrow \rho_{AB}' \in {\rm Hom}(\mathsf{Mod}(\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi}))$, $f_{BC}:\rho_{BC}\rightarrow \rho_{BC}'\in {\rm Hom}(\mathsf{Mod}(\mathbb{C}[G_{BC}]^{\alpha}_{\psi \varphi}))$ via
\begin{align}
	\otimes: f_{AB} \times f_{BC} \mapsto ( f_{AB} \otimes_B f_{BC}
	:  \rho_{AB}\otimes_{B}\rho_{BC}\rightarrow \rho_{AB}'\otimes_{B}\rho_{BC}' ) \; ,
\end{align}
where the morphism on the r.h.s decomposes as
\begin{align}
	f_{AB}\otimes_{B}f_{BC}:\rho_{AB}\otimes_{B}\rho_{BC}
	\xhookrightarrow{}
	\rho_{AB}\otimes \rho_{BC}\xrightarrow{f_{AB}\otimes f_{BC}}\rho_{AB}'\otimes\rho_{BC}'\to \rho_{AB}'\otimes_{B}\rho_{BC}' \; .
\end{align}
In the sequence of linear maps above, the first arrow notates the injection of $\rho_{AB}\otimes_{B}\rho_{BC}$ into $\rho_{AB}\otimes \rho_{BC}$, and the last arrow notates the projection map
\begin{align}
	\rho_{AB}'\otimes \rho_{BC}'\mapsto (\rho_{AB}' \otimes \rho_{BC}') \triangleright \Delta_{B}(\mathbbm{1}_{AC})=\rho_{AB}' \otimes_{B}\rho_{BC}' \, .
\end{align}
Furthermore, a 2-morphism of the form $\zeta:\rho_{AB}\otimes_{B}\rho_{BC}\rightarrow \rho_{AC}\in {\rm Hom}(\mathsf{Mod}(\mathbb{C}[G_{AC}]^{\alpha}_{\phi \varphi}))$ is an intertwiner interpreted as describing the process of fusing a pair of boundary excitations at the interfaces of gapped boundaries labelled by $(A,\phi)$, $(B,\psi)$ and $(B,\psi)$, $(C,\varphi)$, respectively:
\begin{equation}
	\bdryInterfaceBis{0.9} \; .
\end{equation}
The identity morphism associated with the object $(A,\phi)$ is given by the regular module $\mathbb{C}[G_{AA}]^{\alpha}_{\phi \phi}\in {\rm Ob}(\mathsf{Mod}(\mathbb{C}[G_{AA}]^{\alpha}_{\phi \phi}))$ with left and right unitors the intertwiner isomorphisms
\begin{align}
	\ell:\mathbb{C}[G_{AA}]^{\alpha}_{\phi \phi}\otimes_{A} \rho_{AB}\xrightarrow{\sim}\rho_{AB}
	\; , \q
	r:\rho_{AB}\otimes_{B}\mathbb{C}[G_{BB}]^{\alpha}_{\psi \psi}\xrightarrow{\sim}\rho_{AB} \; ,
\end{align}
as described in sec.~\ref{sec:comult}. Finally, the 1-associator for a triple of 1-morphisms $\rho_{AB}\in {\rm Ob}(\mathsf{Mod}(\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi}))$, $\rho_{BC}\in {\rm Ob}(\mathsf{Mod}(\mathbb{C}[G_{BC}]^{\alpha}_{\psi \varphi}))$, $\rho_{CD}\in {\rm Ob}(\mathsf{Mod}(\mathbb{C}[G_{CD}]^{\alpha}_{\varphi\chi}))$  is given by the intertwiner isomorphism in ${\rm Hom}(\mathsf{Mod}(\mathbb{C}[G_{AD}]^{\alpha}_{\phi \chi}))$
\begin{align}
	\Phi^{\rho_{AB}\rho_{BC} \rho_{CD}}:(\rho_{AB}\otimes_{B}\rho_{BC})\otimes_{C} \rho_{CD}\rightarrow \rho_{AB}\otimes_{B}(\rho_{BC}\otimes_{C} \rho_{CD}) \; ,
\end{align}
as described explicitly in sec.~\ref{sec:comult}.\footnote{Recall that the derivations in sec.~\ref{sec:comult}, and more generally in sec.~\ref{sec:rep}, were carried out explicitly for the boundary tube algebra in (3+1)d. However, we explained that the (2+1)d boundary tube algebra, which is the one relevant here, is obtained as a limiting case.}  It follows from the results of the first part of this manuscript that such data satisfy the pentagon and triangle relations ensuring we do obtain a bicategory.

\bigskip \noindent
So we have recast our results obtained in the first part of this manuscript in terms of the boundary tube algebra and its representation theory as the bicategory $\mathsf{Bdry}_G^\alpha$. We shall now establish the following equivalence of bicategories:
\begin{align}
	\label{eq:bicatequivboundaryMOD}
	\mathsf{Bdry}_G^\alpha
	\simeq \mathsf{MOD}(\mathsf{Vec}^{\alpha}_{G}) \; .
\end{align}
More precisely, we shall establish the equivalence of the bicategories $\mathsf{Bdry}_G^\alpha\simeq \mathsf{sAlg}(\mathsf{Vec}^{\alpha}_{G})$, from which we can induce the equivalence above through prop.~\ref{prop:MOD-sAlg}, by noting equivalence of bicategories is \emph{transitive}. First, we need to introduce a notion of homomorphism between bicategories:
\begin{definition}[Strict homomorphism of bicategories\label{def:stricthomomoprphism}]
	Given a pair of bicategories $\mc{B}\mathpzc{i}$ and ${\mc{B}\mathpzc{i}}'$, a \emph{strict homomorphism} $\mc{F}:\mc{B}\mathpzc{i} \to {\mc{B}\mathpzc{i}}'$ of bicategories consists of
	\begin{enumerate}[itemsep=0.4em,parsep=1pt,leftmargin=3em]
		\item[${\ssss \bullet}$] a function $\mc{F}:{\rm Ob}(\mc{B}i)\rightarrow {\rm Ob}(\mc{B}i')$,
		\item[${\ssss \bullet}$] a family of functors $\mc{F}_{XY}:\mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Y) \to \mathsf{Hom}_{{\mc{B}\mathpzc{i}}'} (\mc{F}(X), \mc{F}(Y))$ referred to as \emph{hom-functors}, for each pair of objects $X,Y \in{\rm Ob}(\mc{B}\mathpzc{i})$,
	\end{enumerate}

	such that
	\begin{align*}
		\mc{F}_{X,Y}(f)\otimes \mc{F}_{Y,Z}(g)&=\mc{F}_{X,Z}(f\otimes g) &
		\mathbbm{1}^{{\mc{B}\mathpzc{i}}'}_{\mc{F}(X)}&=\mc{F}_{X,X}(\mathbbm{1}^{\mc{B}\mathpzc{i}}_{X})
		\\
		\mc{F}(\alpha^{\mc{B}\mathpzc{i}}_{f,g,h})&=\alpha^{{\mc{B}\mathpzc{i}}'}_{\mc{F}_{X,Y}(f),\mc{F}_{Y,Z}(g),\mc{F}_{Z,W}(h)}
		&
		\mc{F}(r^{\mc{B}\mathpzc{i}}_{X})=r^{{\mc{B}\mathpzc{i}}'}_{\mc{F}(X)} & \;\; , \;\;  \mc{F}(\ell^{\mc{B}\mathpzc{i}}_{X})=\ell^{{\mc{B}\mathpzc{i}}'}_{\mc{F}(X)}  \; ,
	\end{align*}
	for all objects $W,X,Y,Z\in {\rm Ob}(\mc{B}\mathpzc{i})$ and morphisms $f\in {\rm Ob}(\mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Y))$, $g\in {\rm Ob}(\mathsf{Hom}_{\mc{B}\mathpzc{i}}(Y,Z))$, $h\in {\rm Ob}(\mathsf{Hom}_{\mc{B}\mathpzc{i}}(Z,W))$.
\end{definition}
\noindent
Recall that a functor between categories defines an equivalence if and only if it  is \emph{full}, \emph{faithful} and essentially \emph{surjective}. In a similar vein, a sufficient condition for a strict homomorphism of bicategories $\mc{F}$ to define an equivalence of bicategories is that the map is surjective on objects, and the functors $\mc{F}_{X,Y}$ for all $X,Y\in {\rm Ob}(\mc{B}\mathpzc{i})$ define equivalences of the categories $\mathsf{Hom}_{\mc{B}\mathpzc{i}}(X,Y)\simeq \mathsf{Hom}_{{\mc{B}\mathpzc{i}}'}(\mc{F}(X),\mc{F}(Y))$.

Using this sufficient condition, let us now establish the equivalence of bicategories $\mc{F}:\mathsf{Bdry}_G^\alpha\xrightarrow{\simeq} \mathsf{sAlg}(\mathsf{Vec}^{\alpha}_{G})$. We begin by defining the function $\mc{F}:{\rm Ob}(\mathsf{Bdry}_G^\alpha)\rightarrow {\rm Ob}(\mathsf{sAlg}(\mathsf{Vec}^{\alpha}_{G}))$. It is given by sending each boundary condition $(A,\phi)$ to the corresponding separable algebra object $A_{\phi}$ in $\mathsf{Vec}^{\alpha}_{G}$. From the previous discussion, we know that both boundary conditions and separable algebra objects are indexed by subgroups of $G$ and 2-cochains satisfying the compatibility conditions with $\alpha$. It follows that the function $\mc{F}$ is a bijection, and thus surjective. The hom-functors are required to define the following equivalence of categories:
\begin{align*}
	\mathsf{Hom}_{\mathsf{Bdry}_G^\alpha}((A,\phi),(B,\psi))
	:=\mathsf{Mod}(\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi})
	\simeq
	\mathsf{Mod}(\mathbb{C}[\widetilde{G}_{AB}]^{\varpi^{AB}})
	=:
	\mathsf{Hom}_{\mathsf{sAlg}(\mathsf{Vec}^{\alpha}_{G})}(A_{\phi},B_{\psi}) \; ,
\end{align*}
where the groupoid $\widetilde G_{AB}$ and its 2-cocycle $\varpi^{AB}$ is obtained by applying the definition at the end of sec.~\ref{sec:algObj} to the delooping of $G$.
In order to establish this equivalence, it suffices to demonstrate the isomorphism of twisted groupoid algebras $\mathbb{C}[\widetilde{G}_{AB}]^{\varpi^{AB}} \simeq \mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi} \equiv \mathbb C[G_{AB}]^{\vartheta^{AB}}$, for all boundary conditions $(A,\phi)$ and $(B,\psi)$. The equivalence $\mathsf{Mod}(\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi}) \simeq \mathsf{Mod}(\mathbb{C}[\tilde{G}_{AB}]^{\varpi^{AB}})
$ of their module categories then follows by pre-composition.
Noting from the definition that both groupoids have the same dimension, the isomorphism is provided by the following map on basis elements:
\begin{align}
	\label{eq:isoGroupoid}
	\big| \biGr{ g}{}{ a,  b} \big\ra
	\mapsto
	\frac{\phi({a}^{-1},{a})}{\alpha(a^{-1},{a},{g}  b)}
	\big| \biGr{g}{a^{-1}}{b} \big\ra
	 \;, \q \forall \,
	\big| \biGr{ g}{}{ a,  b} \big\ra
	\in \mathbb{C}[\widetilde{G}_{AB}]^{\varpi^{AB}} \; .
\end{align}
Furthermore, one can check that such an isomorphism is compatible with the respective comultiplication maps through the following commuting diagram
\begin{align}
	\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
		|[alias=A]|\mathbb{C}[G_{AC}]^{\alpha}_{\phi \varphi}
		\&\&
		|[alias=B]|\mathbb{C}[G_{AB}]^{\alpha}_{\phi \psi}\otimes \mathbb{C}[G_{BC}]^{\alpha}_{\psi \varphi}
		\\
		\\
		|[alias=AA]|\mathbb{C}[\widetilde{G}_{AC}]^{\varpi^{AC}}
		\&\&
		|[alias=BB]|\mathbb{C}[\widetilde{G}_{AB}]^{\varpi^{AB}}\otimes \mathbb{C}[\widetilde{G}_{BC}]^{\varpi^{BC}}

		\arrow[from=A,to=B,"\Delta_{B}"]
		\arrow[<->,from=B,to=BB,"\simeq"]

		\arrow[<->,from=A,to=AA,"\simeq"']
		\arrow[from=AA,to=BB,"\widetilde{\Delta}_{B}"']
	\end{tikzcd} \; .
\end{align}
Commutativity is ensured by the relation
\begin{align*}
	&\frac{\phi(a^{-1},a)}{\alpha(a^{-1},a,g_{1}b)}
	\frac{\psi(b,b^{-1})}{\alpha(b,b^{-1},g_{2}c)}
	\frac{
		\alpha(g_{1},g_{2},c) \, \alpha(a,g_{1},b)\, \alpha(ag_{1}b,b^{-1},g_{2}c)
	}
	{
		\psi(b,b^{-1}) \, \alpha(a,g_{1},g_{2}c) \, \alpha(ag_{1},b,b^{-1})
	}
	\\
	& \q =
	\frac{\phi(a^{-1},a)}{\alpha(a^{-1},a,g_{1}g_{2}c)}
	\frac{
		\alpha(g_{1},g_{2},c) \, \alpha(a^{-1},ag_{1}b,b^{-1}g_{2}c)
	}{\alpha(g_{1},b,b^{-1}g_{2}c)} \; ,
\end{align*}
which follows from the cocycle relation
\begin{equation*}
	d^{(3)}\alpha(a^{-1},a,g_{1}b,b^{-1}g_{2}c) =1 \; , \q
	d^{(3)}\alpha(a^{-1},a,g_{1}g_{2}c)  =1 \; , \q
	d^{(3)}\alpha(ag_{1},b,b^{-1},g_{2}c)  =1 \; .
\end{equation*}
Since the composition functors in both bicategories are induced from the respective comultiplication maps, it can be verified that  such hom-functors satisfy the conditions of a strict homomorphism of bicategories, hence establishing the required equivalence of bicategories.

\subsection{Pseudo-algebra objects and gapped boundaries in (3+1)d gauge models}\label{sec:pseudoalgob}

In the previous discussion, we argued that, given a lattice Hamiltonian realisation of (2+1)d Dijkgraaf-Witten theory with input data $(G,\alpha)$, gapped boundary conditions are in bijection with algebra objects in the fusion category $\mathsf{Vec}^{\alpha}_{G}$. We shall now outline the analogue of this statement for lattice Hamiltonian realisations of (3+1)d Dijkgraaf-Witten theory.

Given a fixed input data $(G,\pi)$, where $G$ is a finite group and $\pi$ is normalized group 4-cocycle in $H^{4}(G,\rU(1))$, it has been argued that the relevant category theoretical structure is provided by the \emph{monoidal} bicategory $\mathsf{2Vec}^{\pi}_{G}$ of $G$-graded 2-vector spaces \cite{PhysRevB.96.045136, lan2017classification, delcamp2018gauge, Kong:2019brm, Bullivant:2019fmk, douglas2018fusion}. Let us begin by describing the salient features of the monoidal bicategory $\mathsf{2Vec}$ as a categorification of $\mathsf{Vec}$. There exist several definitions of this bicategory, see e.g. \cite{kapranov19942, Baez:2003fs, Lurie:2009keu}, in the following we shall consider $\mathsf{2Vec}$ as the bicategory of finite dimensional, semi-simple $\mathsf{Vec}$-module categories, $\mathsf{Vec}$-module functors and $\mathsf{Vec}$-module functor homomorphisms. As customary, objects of $\mathsf{2Vec}$ will be referred to as \emph{2-vector spaces}. There is a single \emph{simple} object provided by the $\mathsf{Vec}$-module category $\mathsf{Vec}$, which implies that for all objects $X\in {\rm Ob}(\mathsf{2Vec})$, there exists a $\mathsf{Vec}$-module equivalence $X\simeq \bigbplus_i  \mathsf{Vec}$. The monoidal structure of $\mathsf{2Vec}$ is defined on objects via the weak 2-functor
\begin{equation*}
	\begin{array}{ccccl}
	\btimes \! & : & \mathsf{2Vec}\times \mathsf{2Vec} & \to & \mathsf{2Vec}
	\\
	& : & X\times Y &\mapsto & 	X \btimes Y
	\end{array} \; ,
\end{equation*}
for all $X, Y \in {\rm Ob}(\mathsf{2Vec})$, where $\! \btimes \! $ denotes the \emph{Deligne} tensor product of abelian categories \cite{deligne2007categories}.
In particular, for a pair of 2-vector spaces $X$ and $Y$, the Deligne tensor product yields the category $X\btimes Y$, whose set of objects is ${\rm Ob}(X\btimes Y):={\rm Ob}(X)\times {\rm Ob}(Y)$ and set of morphisms given by ${\rm Hom}(X\btimes Y):={\rm Hom}(X)\otimes_{\mathbb{C}} {\rm Hom}(Y)$. The composition in ${\rm Hom}(X\btimes Y)$ is induced from the ones in ${\rm Hom}(X)$ and ${\rm Hom}(Y)$, accordingly. This monoidal structure is equipped with a \emph{pseudo-natural} adjoint equivalence of $\mathsf{Vec}$-module categories\footnote{Although we use a similar notation, the associator of the monoidal structure is not to be confused with the 1-associator natural isomorphism of the underlying bicategory.}
\begin{align}
	(X \btimes Y)\btimes Z \xrightarrow{\alpha_{X,Y,Z}} X\btimes (Y\btimes Z) \; ,
\end{align}
together with a  $\mathsf{Vec}$-module functor isomorphism $\pi$ known as the \emph{pentagonator}:
\begin{align}
	\begin{tikzcd}[ampersand replacement=\&, column sep=1.6em, row sep=1.3em]
		\&\&|[alias=B]|((X\btimes Y)\btimes Z)\btimes W
		\\\\
		|[alias=AA]|(X\btimes (Y \btimes Z)) \btimes W
		\&\&\&\&
		|[alias=CC]|(X\btimes Y) \btimes (Z \btimes W)
		\\\\
		|[alias=AAA]|X\btimes ((Y \btimes Z) \btimes W)
		\&\&\&\&|[alias=CCC]|X\btimes (Y \btimes ((Z \btimes W))

		\arrow[from=B,to=CC,"\;\; \alpha_{X\btimesFFt Y,Z,W}", sloped]
		\arrow[from=CC,to=CCC,"\alpha_{\alpha_{X,Y,Z\btimesFFt W}}"]

		\arrow[from=B,to=AA,"\alpha_{X,Y,Z}\btimesFt {\rm id}_{W} \;\; ", sloped]
		\arrow[from=AA,to=AAA,"\alpha_{X,Y\btimesFFt Z,W}"',""{name=X,right}]
		\arrow[from=AAA,to=CCC,"{\rm id}_{X}\btimesFt \alpha_{Y,Z,W}"']

		\arrow[Rightarrow,from=X,to=CC,"\pi_{X,Y,Z,W}", shorten <= 2ex, shorten >= 2ex, sloped]
	\end{tikzcd} \; .
\end{align}
Both $\alpha$ and $\pi$ can be shown to evaluate to the identity 1- and 2-morphisms, respectively. Note that the \emph{pseudo-naturality} of $\alpha$ specifies that for any triple of 2-vector spaces $X,Y,Z$ and $\mathsf{Vec}$-module functors $f_{X}:X\rightarrow X'$, $f_{Y}:Y\rightarrow Y'$ and $f_{Z}:Z\rightarrow Z'$ there exists a 2-isomorphism
\begin{align}
	\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
		|[alias=A]|(X\btimes Y)\btimes Z
		\&\&
		|[alias=B]|X\btimes (Y\btimes Z)
		\\\\
		|[alias=AA]|(X'\btimes Y')\btimes Z'
		\&\&
		|[alias=BB]|X'\btimes (Y'\btimes Z')

		\arrow[from=A,to=B,"\alpha_{X,Y,Z}"]
		\arrow[from=B,to=BB,"f_{X}\btimesFt (f_{Y}\btimesFt f_{Z})"]

		\arrow[from=A,to=AA,"(f_{X}\btimesFt f_{Y})\btimesFt f_{Z}"']
		\arrow[from=AA,to=BB,"\alpha_{X,Y,Z}"']

		\arrow[from=B,to=AA,Rightarrow,"\simeq", shorten <= 2ex, shorten >= 2ex, sloped]
	\end{tikzcd} \; .
\end{align}
Henceforth, we shall not draw arrows for such 2-isomorphisms but instead notate the 2-cell with the $\simeq$ symbol.

Akin to a monoidal category, the monoidal bicategory $\mathsf{2Vec}$ admits a monoidal unit $\mathbbm 1 \in{\rm Ob}(\mathsf{2Vec})$, which is  equipped with the $\mathsf{Vec}$-module category pseudo-natural adjoint equivalences
\begin{align}
	X\btimes \mathbbm 1 \xrightarrow{r_{X}} X \q {\rm and} \q  \mathbbm 1 \btimes X\xrightarrow{\ell_{X}}X \; ,
\end{align}
for all  $X \in {\rm Ob}(\mathsf{2Vec})$, together with $\mathsf{Vec}$-module functor isomorphisms $\tau_1, \tau_2, \tau_3$ referred to as \emph{triangulators}:
\begin{gather}
	\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
		|[alias=A]|(\mathbbm 1\btimes X)\btimes Y
		\&\&
		|[alias=B]|\mathbbm 1 \btimes (X\btimes Y)
		\\\\
		\&\&|[alias=BB]|X\btimes Y

		\arrow[from=A,to=B,"\alpha_{\mathbbm 1,X,Y}"]
		\arrow[from=B,to=BB,"\ell_{X\btimesFFt Y}"]
		\arrow[from=A,to=BB,"\ell_{X}\btimesFt {\rm id}_{Y}"',""{name=X,above}]

		\arrow[Rightarrow,from=B,to=X,"\tau_1"]
	\end{tikzcd}
	, \q
	\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
		|[alias=A]|(X\btimes \mathbbm 1)\btimes Y
		\&\&
		|[alias=B]|X\btimes (\mathbbm 1\btimes Y)
		\\\\
		\&\&|[alias=BB]|X\btimes Y

		\arrow[from=A,to=B,"\alpha_{X,\mathbbm 11,Y}"]
		\arrow[from=B,to=BB,"{\rm id}_X \btimesFt \ell_{Y}"]
		\arrow[from=A,to=BB,"r_{X}\btimesFt {\rm id}_{Y}"',""{name=X,above}]

		\arrow[Rightarrow,from=B,to=X,"\tau_2"]
	\end{tikzcd}
	,
	\\
	\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
		|[alias=A]|(X\btimes Y)\btimes \mathbbm 1
		\&\&
		|[alias=B]|X\btimes (Y\btimes \mathbbm 1)
		\\\\
		\&\&|[alias=BB]|X\btimes Y

		\arrow[from=A,to=B,"\alpha_{X,Y,\mathbbm 1}"]
		\arrow[from=B,to=BB,"{\rm id}_X \btimesFt r_{Y}"]
		\arrow[from=A,to=BB,"r_{X\btimesFFt Y}"',""{name=X,above}]

		\arrow[Rightarrow,from=B,to=X,"\tau_3"]
	\end{tikzcd} .
\end{gather}
These isomorphisms can be all be shown to evaluate to the identity 1- and 2-morphisms, respectively.
More generally, for an arbitrary monoidal bicategory, such data is subject to a series of coherence data which we shall not provide here, instead pointing the reader to e.g. \cite{kapranov19942, gurski2011loop,schommerpries2011classification}.

Having described the most notable features of $\mathsf{2Vec}$, we now describe the monoidal bicategory $\mathsf{2Vec}^{\pi}_{G}$, which is obtained following a process analogous to the lift of $\mathsf{Vec}$ to $\mathsf{Vec}^{\alpha}_{G}$. Let $G$ be a finite group and $\pi$ a normalised group 4-cocycle in $H^{4}(G,\rU(1))$. A $G$-graded 2-vector space is a 2-vector space of the form
$X=\bigbplus_{g\in G} X_{g}$. We call a $G$-graded 2-vector space \emph{homogeneous} of degree $g\in G$ if $X=X_{g}$. The monoidal bicategory $\mathsf{2Vec}^{\pi}_{G}$ is then defined as the bicategory whose objects  are given by $G$-graded 2-vector spaces, 1-morphisms are $G$-grading preserving $\mathsf{Vec}$-module functors, and 2-morphisms are $\mathsf{Vec}$-module functor homomorphisms. The simple objects of $\mathsf{2Vec}^{\pi}_{G}$ are given by the categories $\mathsf{Vec}_{g}$, for all $g\in G$, and every object is equivalent to a direct sum of simple objects. The monoidal structure of $\mathsf{2Vec}^{\pi}_{G}$ is given on homogeneous components via the weak 2-functor
\begin{align}
	\btimes \! : \mathsf{Vec}_{g}\times \mathsf{Vec}_{g'}\rightarrow \mathsf{Vec}_{gg'} \; ,
\end{align}
for all $g,g'\in G$. Since $\pi$ is a normalised representative of $[\pi]\in H^{4}(G,\rU(1))$, the adjoint equivalences
\begin{gather}
	(\mathsf{Vec}_{g}\btimes\mathsf{Vec}_{g'})\btimes\mathsf{Vec}_{g''}
	\xrightarrow{\alpha_{\mathsf{Vec}_{g},\mathsf{Vec}_{g'},\mathsf{Vec}_{g''}}}
	\mathsf{Vec}_{g}\btimes(\mathsf{Vec}_{g'}\btimes\mathsf{Vec}_{g''}) \; ,
	\\
	\mathsf{Vec}_{g}\btimes \mathsf{Vec}_{\mathbbm 1_{G}}\xrightarrow{r_{\mathsf{Vec}_{g}}} \mathsf{Vec}_{g},
	\; , \q
	\mathsf{Vec}_{\mathbbm 1_{G}}\btimes \mathsf{Vec}_{g}\xrightarrow{\ell_{\mathsf{Vec}_{g}}}\mathsf{Vec}_{g}
\end{gather}
are the identity 1-morphisms, the triangulators  $\tau_1,\tau_2,\tau_3$ are the identity 2-morphisms, whereas the pentagonator 2-isomorphism is given by $\pi_{\mathsf{Vec}_{g},\mathsf{Vec}_{g'},\mathsf{Vec}_{g''},\mathsf{Vec}_{g'''}}:=\pi(g,g',g'',g''') \cdot {\rm id}_{\mathsf{Vec}_{gg'g''g'''}}$ for all $g,g',g'',g'''\in G$. It is straightforward to verify that the requirement that $\pi$ is a 4-cocycle ensures the coherence relations for the pentagonator are satisfied.

Having defined the monoidal bicategory $\mathsf{2Vec}^{\pi}_{G}$, we shall now argue that gapped boundary conditions in (3+1)d gauge models of topological phases correspond to \emph{pseudo-algebra objects} \cite{LACK2000179} in $\mathsf{2Vec}^{\pi}_{G}$, categorifying the relation between algebra objects in $\mathsf{Vec}^{\alpha}_{G}$ and gapped boundaries in (2+1)d gauge models:
\begin{definition}[Pseudo-algebra object]
	Let $\mc{B}\mathpzc{i} \equiv (\mc{B}\mathpzc{i}, \btimes, \mathbbm 1,\alpha, r , \ell , \pi , \tau_1 , \tau_2 , \tau_3)$ be a monoidal bicategory. A pseudo-algebra object in $\mc{B}\mathpzc{i}$ is a sextuple $(A,m,u, \varsigma_m, \varsigma_r, \varsigma_\ell)$ consisting of an object $A\in {\rm Ob}(\mc{B}\mathpzc{i})$, a pair of 1-morphisms $m:A\btimes A \to A$, $u:\mathbbm{1} \to A$, and a triple of 2-isomorphisms $\varsigma_m, \varsigma_r,\varsigma_\ell$ defined according to
	\begin{gather*}
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
			|[alias=A]|(A\btimes A)\btimes A \&\& |[alias=B]|A\btimes (A\btimes A) \&\& |[alias=C]| A\btimes A
			\\
			\\
			|[alias=AA]|A\btimes A \&\&\&\& |[alias=CC]|A

			\arrow[from=A,to=B,"\alpha"]
			\arrow[from=B,to=C,"{\rm id}_{A}\btimesFt m"]
			\arrow[from=AA,to=CC,"m"']
			\arrow[from=A,to=AA,"m \btimesFt {\rm id}_{A}"']
			\arrow[from=C,to=CC,"m"]

			\arrow[from=C,to=AA,"\varsigma_m",Rightarrow, shorten <= 2ex, shorten >= 2ex]
		\end{tikzcd} \; ,
		\\
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
			|[alias=A]|A
			\&[-1em]\&
			|[alias=B]|A\btimes \mathbbm 1
			\&\&
			|[alias=C]|A\btimes A
			\&[-1em]\&
			|[alias=D]|A

			\arrow[from=A,to=B,"r^{-1}"]
			\arrow[from=B,to=C,"{\rm id}_A \btimesFt u",""{name=Y,below,xshift=0.1em}]
			\arrow[from=C,to=D,"m"]

			\arrow[from=A,to=D,bend right,"{\rm id}_A"',""{name=X,above,xshift=0.025em}]

			\arrow[from=Y,to=X,"\varsigma_r",Rightarrow, shorten <= 0.5ex, shorten >= 0.5ex]
		\end{tikzcd} \; , \q
		\begin{tikzcd}[ampersand replacement=\&, column sep=1.8em, row sep=1.3em]
			|[alias=A]|A
			\&[-1em]\&
			|[alias=B]|\mathbbm 1 \btimes A
			\&\&
			|[alias=C]|A\btimes A
			\&[-1em]\&
			|[alias=D]|A

			\arrow[from=A,to=B,"\ell^{-1}"]
			\arrow[from=B,to=C,"u \btimesFt {\rm id}_A",""{name=Y,below,xshift=0.1em}]
			\arrow[from=C,to=D,"m"]

			\arrow[from=A,to=D,bend right,"{\rm id}_A"',""{name=X,above, xshift=0.025em}]

			\arrow[from=Y,to=X,"\varsigma_\ell",Rightarrow,shorten <= 0.5ex, shorten >= 0.5ex]
		\end{tikzcd} \; ,
	\end{gather*}

	and subject to the following coherence relations:
	\begin{align*}
		\begin{tikzcd}[ampersand replacement=\&, column sep=2.7em, row sep=1.3em]
			|[alias=A]|((A\btimes A)\btimes A)\btimes A
			\&[-2.7em]\phantom{(A \btimes A)\btimes(A \btimes A)}\&[2.5em]
			|[alias=B]|(A\btimes A)\btimes A
			\&[0.4em] \phantom{A \btimes A}\&[-4em]
			|[alias=C]|A\btimes A
			\\\\
			|[alias=AA]|(A\btimes (A\btimes A))\btimes A
			\&\&
			|[alias=BB]|(A\btimes A)\btimes A
			\\[-0.65em]
			\&
			\phantom{(A\btimes A)\btimes(A\btimes A)}
			\&\&
			\phantom{A\btimes A}
			\&\&[-2em]
			|[alias=DDD]|A
			\\[-0.65em]
			|[alias=AAAA]|A\btimes ((A\btimes A)\btimes A)
			\&\&
			|[alias=BBBB]|A\btimes (A\btimes A)
			\\\\
			|[alias=AAAAA]|A\btimes (A\btimes (A\btimes A))
			\&\&
			|[alias=BBBBB]|A\btimes (A\btimes A)
			\&\&
			|[alias=CCCCC]|A\btimes A

			\arrow[from=A,to=B,"(m\btimesFt {\rm id}_A)\btimesFt {\rm id}_A"]
			\arrow[from=B,to=C,"m\btimesFt {\rm id}_A"]
			\arrow[from=C,to=DDD,"m"]

			\arrow[from=A,to=AA,"\alpha_{A,A,A}\btimesFt {\rm id}_A"']
			\arrow[from=AA,to=AAAA,"\alpha_{A,A\btimesFFt A,A}"']
			\arrow[from=AAAA,to=AAAAA,"{\rm id}_A\btimesFt \alpha_{A,A,A}"']
			\arrow[from=AAAA,to=BBBB,"({\rm id}_A\btimesFt {\rm id}_A)\btimesFt m"]
			\arrow[from=BBBBB,to=CCCCC,"{\rm id}_A\btimesFt m"']
			\arrow[from=CCCCC,to=DDD,"m"']

			\arrow[from=AA,to=BB,"(A\btimesFt m)\btimesFt {\rm id}_A"',""{name=X,above}]
			\arrow[from=AAAAA,to=BBBBB,"{\rm id}_A\btimesFt(m\btimesFt {\rm id}_A)"',""{name=Y,above}]
			\arrow[from=BB,to=BBBB,"\alpha_{A,A,A}"]

			\arrow[from=BB,to=C,"m\btimesFt {\rm id}_A", sloped]
			\arrow[from=BBBB,to=CCCCC,"{\rm id}_A\btimesFt m",sloped,""{name=W}]

			\arrow[from=AA,to=BBBB,Rightarrow,white,"{\color{black}\simeq}" description]
			\arrow[from=W,to=C,Rightarrow,"\varsigma_m",shorten <= 2ex, shorten >= 2ex]
			\arrow[from=X,to=B,Rightarrow,"\varsigma_m \btimesFt {\rm id}_A",sloped, shorten <= 2ex, shorten >= 2ex]
			\arrow[from=Y,to=BBBB,Rightarrow,"{\rm id}_A\btimesFt \varsigma_m",sloped,shorten <= 2ex, shorten >= 2ex]
		\end{tikzcd}
	\end{align*}
	is equal to
	\begin{align*}
		\begin{tikzcd}[ampersand replacement=\&, column sep=2.7em, row sep=1.3em]
			|[alias=A]|((A\btimes A)\btimes A)\btimes A
			\&[-2.7em]\&[2.5em]
			|[alias=B]|(A\btimes A)\btimes A
			\&[0.4em]\&[-4em]
			|[alias=C]|A\btimes A
			\\\\
			|[alias=AA]|(A\btimes (A\btimes A))\btimes A
			\&\&
			|[alias=CC]|A\btimes (A\btimes A)
			\\[-0.65em]
			\&
			|[alias=BBB]|(A\btimes A)\btimes(A\btimes A)
			\&\&
			|[alias=CCC]|A\btimes A
			\&\&[-2em]
			|[alias=DDD]|A
			\\[-0.65em]
			|[alias=AAAA]|A\btimes ((A\btimes A)\btimes A)
			\&\&
			|[alias=CCCC]|(A\btimes A)\btimes A
			\\\\
			|[alias=AAAAA]|A\btimes (A\btimes (A\btimes A))
			\&\&
			|[alias=BBBBB]|A\btimes (A\btimes A)
			\&\&
			|[alias=CCCCC]|A\btimes A

			\arrow[from=A,to=B,"(m\btimesFt {\rm id}_A)\btimesFt {\rm id}_A",""{name=Z,above}]
			\arrow[from=B,to=C,"m\btimesFt {\rm id}_A"]
			\arrow[from=C,to=DDD,"m"]

			\arrow[from=A,to=AA,"\alpha_{A,A,A}\btimesFt {\rm id}_A"']
			\arrow[from=AA,to=AAAA,"\alpha_{A,A\btimesFFt A,A}"',""{name=X}]
			\arrow[from=AAAA,to=AAAAA,"{\rm id}_A\btimesFt \alpha_{A,A,A}"']
			\arrow[from=BBBBB,to=CCCCC,"{\rm id}_A\btimesFt m"']
			\arrow[from=CCCCC,to=DDD,"m"']

			\arrow[from=AAAAA,to=BBBBB,"{\rm id}_A\btimesFt(m\btimesFt {\rm id}_A)"',""{name=Y,above}]

			\arrow[from=A,to=BBB,"\alpha_{A\btimesFt A,A,A}",sloped]
			\arrow[from=BBB,to=AAAAA,"\alpha_{A,A,A\btimesFt A}"',sloped]

			\arrow[from=BBB,to=CC,"\!\! m\btimesFt ({\rm id}_A\btimesFt {\rm id}_A)",sloped]
			\arrow[from=CC,to=CCC,"{\rm id}_A\btimesFt m",sloped,""{name=P}]
			\arrow[from=BBB,to=CCCC,"\!\! ({\rm id}_A\btimesFt {\rm id}_A)\btimesFt m"',sloped]
			\arrow[from=CCCC,to=CCC,"m\btimesFt {\rm id}_A"',sloped,""{name=Q}]
			\arrow[from=CCC,to=DDD,"m"]

			\arrow[from=B,to=CC,"\alpha_{A,A,A}"]
			\arrow[from=CCCC,to=BBBBB,"\alpha_{A,A,A}"]

			\arrow[from=CC,to=CCCC,Rightarrow,white,"{\color{black}\simeq}" description]

			\arrow[from=X,to=BBB,Rightarrow,"\pi", shorten <= 1ex, shorten >= 1ex]
			\arrow[from=Y,to=BBB,Rightarrow,white,"{\color{black}\simeq}" description]
			\arrow[from=Z,to=BBB,Rightarrow,white,"{\color{black}\simeq}" description]
			\arrow[from=P,to=C,Rightarrow,"\varsigma_m",shorten <= 2ex, shorten >= 2ex]
			\arrow[from=Q,to=CCCCC,Rightarrow,"\varsigma_m",shorten <= 3.2ex, shorten >= 2ex]
		\end{tikzcd}
	\end{align*}
	and
	\begin{align*}
		\begin{tikzcd}[ampersand replacement=\&, column sep=2.5em, row sep=1.6em]
			\&[-2em]\&|[alias=B]|(A\btimes \mathbbm 1)\btimes A
			\&\&|[alias=C]|(A\btimes A)\btimes A
			\&\&|[alias=D]|A\btimes A
			\\\\
			|[alias=AA]|A\btimes A
			\&\&\&\&\&\&\&\&[-2em]
			|[alias=EE]|A
			\\\\
			\&\&|[alias=BBB]|A\btimes (\mathbbm 1\btimes A)
			\&\&|[alias=CCC]|A\btimes (A\btimes A)
			\&\&|[alias=DDD]|A\btimes A

			\arrow[from=AA,to=B,"r^{-1}\btimesFt {\rm id}_A"]
			\arrow[from=B,to=C,"{(A\btimesFt u)\btimesFt {\rm id}_A}"]
			\arrow[from=C,to=D,"m\btimesFt {\rm id}_A"]
			\arrow[from=D,to=EE,"m"]

			\arrow[from=AA,to=BBB,"{\rm id}_A\btimesFt \ell^{-1}"']
			\arrow[from=BBB,to=CCC,"{{\rm id}_A\btimesFt (u\btimesFt {\rm id}_A)}"']
			\arrow[from=CCC,to=DDD,"{\rm id}_A\btimesFt m"']
			\arrow[from=DDD,to=EE,"m"']

			\arrow[from=AA,to=D,"{\rm id}_A\btimesFt {\rm id}_A"',sloped,shorten >= 1ex,""{name=XX,above}]
			\arrow[from=AA,to=EE,"m",""{name=X,above},""{name=Y,below}]
			\arrow[from=AA,to=DDD,"{\rm id}_A\btimesFt {\rm id}_A",sloped,shorten >= 1ex, ""{name=YY,below}]

			\arrow[Rightarrow,from=B,to=XX,"\hspace{-1.7em} \varsigma_r \btimesFt {\rm id}_A"', sloped]
			\arrow[Rightarrow,from=D,to=X,"{\color{black}\simeq}" description,white]
			\arrow[Rightarrow,from=Y,to=DDD,"{\color{black}\simeq}" description,white]
			\arrow[Rightarrow,from=BBB,to=YY,"\hspace{-2.2em} {\rm id}_A\btimesFt \varsigma_\ell^{-1}",sloped]
		\end{tikzcd}
	\end{align*}
	is equal to
	\begin{align*}
		\phantom{.}\begin{tikzcd}[ampersand replacement=\&, column sep=2.5em, row sep=1.6em]
			\&[-2em]\&|[alias=B]|(A\btimes \mathbbm 1)\btimes A
			\&\&|[alias=C]|(A\btimes A)\btimes A
			\&\&|[alias=D]|A\btimes A
			\\\\
			|[alias=AA]|A\btimes A
			\&\&\&\&\&\&\&\&[-2em]
			|[alias=EE]|A
			\\\\
			\&\&|[alias=BBB]|A\btimes (\mathbbm 1\btimes A)
			\&\&|[alias=CCC]|A\btimes (A\btimes A)
			\&\&|[alias=DDD]|A\btimes A

			\arrow[from=AA,to=B,"r^{-1}\btimesFt {\rm id}_A",sloped,""{name=X,below}]
			\arrow[from=B,to=C,"{({\rm id}_A\btimesFt u)\btimesFt {\rm id}_A}"]
			\arrow[from=C,to=D,"m\btimesFt {\rm id}_A"]
			\arrow[from=D,to=EE,"m",sloped]

			\arrow[from=AA,to=BBB,"{\rm id}_A\btimesFt \ell^{-1}"',sloped]
			\arrow[from=BBB,to=CCC,"{{\rm id}_A\btimesFt (u\btimesFt {\rm id}_A)}"']
			\arrow[from=CCC,to=DDD,"{\rm id}_A\btimesFt m"',""{name=Y,above}]
			\arrow[from=DDD,to=EE,"m"',sloped]

			\arrow[from=B,to=BBB,"\alpha_{A,\mathbbm 1,A}"]
			\arrow[from=C,to=CCC,"\alpha_{A,A,A}"']

			\arrow[from=BBB,to=X,"\tau_2",Rightarrow, shorten <= 2ex, shorten >= 2ex]
			\arrow[from=B,to=CCC,Rightarrow,white,"{\color{black}\simeq}" description]
			\arrow[from=Y,to=D,Rightarrow,"\varsigma_m", shorten <= 2ex, shorten >= 2ex]
		\end{tikzcd} .
	\end{align*}
\end{definition}

\noindent
Given the above definition, a first observation is that a pseudo-algebra object in $\mathsf{2Vec}$ corresponds to a finite-dimensional, semi-simple monoidal category. This relies in particular on the fact that semi-simple abelian categories always have a unique structure of semi-simple $\mathsf{Vec}$-module category \cite{neuchl1997representation}. Let us now apply this definition to $\mathsf{2Vec}^{\pi}_{G}$. For each pair $(A,\lambda)$, where $A\subset G$ is a subgroup and $\lambda\in C^{3}(A,\rU(1))$ is a 3-cochain satisfying the condition $d^{(3)}\lambda=\pi^{-1}{\sss |}_{A}$, we construct a pseudo-algebra object $\mathsf{Vec}_{A,\lambda} \equiv (\bigbplus_{a \in A}\mathsf{Vec}_a,m,u,\varsigma_m,\varsigma_r,\varsigma_\ell)$ such that: the multiplication
$m:\mathsf{Vec}_{A,\lambda}\btimes \mathsf{Vec}_{A,\lambda}\to \mathsf{Vec}_{A,\lambda}$ is given on homogeneous components via the functor $m_{\mathsf{Vec}_{a},\mathsf{Vec}_{a'}}:\mathsf{Vec}_{a}\btimes \mathsf{Vec}_{a'}\mapsto \mathsf{Vec}_{aa'}$ for all $a,a'\in A$, the unit map $u$ is defined in an obvious way, the 2-isomorphisms $\varsigma_r$ and $\varsigma_\ell$ are trivial, and the 2-isomorphism
\begin{align}
	\varsigma_m:\alpha_{\mathsf{Vec}_{A,\lambda},\mathsf{Vec}_{A,\lambda},\mathsf{Vec}_{A,\lambda}}\circ({\rm id}_{\mathsf{Vec}_{A,\lambda}}\circ m\btimes m)\Rightarrow (m\btimes{\rm id}_{\mathsf{Vec}_{A,\lambda}})\circ m
\end{align}
defines an associator for the product map $m$ that is determined by $\lambda$. This associator acts on homogenous components labelled by $a,a',a''\in A$ as
\begin{align*}
	\lambda_{a,a',a''}:\alpha_{\mathsf{Vec}_{a},\mathsf{Vec}_{a'},\mathsf{Vec}_{a''}}
	\!\! \circ ({\rm id}_{\mathsf{Vec}_{a}} \! \btimes m_{\mathsf{Vec}_{a'},\mathsf{Vec}_{a''}}) \! \circ m_{\mathsf{Vec}_{a},\mathsf{Vec}_{a'a''}}
	\! \Rightarrow
	(m_{\mathsf{Vec}_{a},\mathsf{Vec}_{a'}} \! \btimes {\rm id}_{\mathsf{Vec}_{a''}}) \! \circ  m_{\mathsf{Vec}_{aa'},\mathsf{Vec}_{a''}} .
\end{align*}
The condition $d^{(3)}\lambda=\pi^{-1}{\sss |}_{A}$ demonstrates that $\mathsf{Vec}_{A,\lambda}$ is not a monoidal category in the conventional sense since the associator $\lambda$ fails to satisfy the pentagon equation \eqref{eq:pentagonbicat}. Instead, the associator satisfies the following equation on homogeneous components labelled by $a,a',a'',a''' \in A$:
\begin{align}
	(\lambda_{a,a',a''}\btimes{\rm id}_{\mathsf{Vec}_{a'''}})
	\circ
	\lambda_{a,a'a'',a'''}
	\circ
	({\rm id}_{\mathsf{Vec}_{a}}\btimes \lambda_{a',a'',a'''})\circ\pi_{a,a',a'',a'''}
	=
	\lambda_{aa',a'',a'''}\circ \lambda_{a,a',a''a'''} \; .
\end{align}
In this way, we see that $\mathsf{Vec}_{A,\lambda}$ defines a monoidal category which is associative inside 2$\mathsf{Vec}^{\pi}_{G}$ but not as a conventional monoidal category. This result provides a categorification of the observation that an algebra object $A_{\phi}$ in $\mathsf{Vec}^{\alpha}_{G}$ defines a twisted groupoid algebra, which is associative inside $\mathsf{Vec}^{\alpha}_{G}$ but not as a conventional algebra.

\subsection{Bicategory of gapped boundary excitations in (3+1)d gauge models}\label{sec:gappedexcitationsbicat}

Mimicking the analysis carried out in sec.~\ref{sec:bicatmodel2D}, we shall now introduce a category theoretical formulation of gapped boundaries in (3+1)d gauge models and string-like excitations terminating at gapped boundaries, which we studied from a tube algebra point of view in sec.~\ref{sec:tube3D}. In particular, we shall define a bicategory  $\mathsf{2Bdry}_G^\pi$ that is analogous to $\mathsf{Bdry}_G^\alpha$. We shall then relate this construction to the work of Kong et al. in \cite{Kong:2019brm} arguing that $\mathsf{2Bdry}_G^\pi$ forms a full sub-bicategory of $\mc{Z}(\mathsf{2Vec}^{\pi}_{G})$, i.e. the \emph{centre} of $\mathsf{2Vec}^{\pi}_{G}$.

Let us begin with a brief review of the results obtained in the first part of this manuscript within the tube algebra approach. Hamiltonian realisations of (3+1)d Dijkgraaf-Witten theory are defined in terms of pairs $(G,\pi)$, where $G$ is a finite group and $\pi$ a normalised 4-cocycle in $H^4(G,\rU(1))$. In sec.~\ref{sec:bdryHam}, it was argued that gapped boundaries can be indexed by pairs $(A,\lambda)$, where $A \subset G$ is a subgroup of $G$ and $\lambda \in C^3(A,\rU(1))$ is a 3-cochain satisfying the condition $d^{(3)}\lambda = \pi^{-1}{\sss |}_A$. In the previous section, we explained that such data is in bijection with pseudo-algebra objects $\mathsf{Vec}_{A,\lambda}$ in $\mathsf{2Vec}^{\pi}_{G}$. Moreover, we showed in sec.~\ref{sec:tube3D} within the tube algebra approach that given a pair of two-dimensional gapped boundaries labelled by $(A,\lambda)$ and $(B,\mu)$, respectively, string-like excitations threading through the bulk from the former boundary to the latter were defined as modules of the twisted relative groupoid algebra $\mathbb{C}[\Lambda(G_{AB})]^{{\textsf{\scriptsize T}}(\pi)}_{{\textsf{\scriptsize T}}(\lambda){\textsf{\scriptsize T}}(\mu)}$, where $\Lambda(G_{AB}) \equiv \Lambda G_{\Lambda A \Lambda B}$ and ${\sfT}: Z^{\bullet}(G,\rU(1)) \to Z^{\bullet -1}(\Lambda  G, \rU(1))$.\footnote{Recall that $\Lambda G$ refers to the loop groupoid of the group $G$ treated as a one-object groupoid (see sec.~\ref{sec:tube3D}).} Via the introduction of a comultiplication map, we further described the concatenation of such string-like excitations in sec.~\ref{sec:rep}.

Let us now collect these results into a bicategory $\mathsf{2Bdry}_G^\pi$, in a way akin to the definition of $\mathsf{Bdry}_G^\alpha$. The objects of $\mathsf{2Bdry}_G^\pi$ are given by pairs $(\Lambda A,{\sfT}(\lambda))$ for every gapped boundary condition labelled by $(A,\lambda)$.
Given a pair of objects $(\Lambda A,{\sfT}(\lambda))$, $(\Lambda B,{\sfT}(\mu))$, we define the hom-category
\begin{align}
	\mathsf{Hom}_{\mathsf{2Bdry}_G^\pi}\big((\Lambda A,{\sfT}(\lambda)),(\Lambda B,{\sfT}(\mu))\big):=
	\mathsf{Mod}\big(\mathbb{C}[\Lambda(G_{AB})]^{{\ssfT}(\pi)}_{{\ssfT}(\lambda){\ssfT}(\mu)}\big) \; ,
\end{align}
where $\mathsf{Mod}(\mathbb{C}[\Lambda(G_{AB})]^{{\ssfT}(\pi)}_{{\ssfT}(\lambda){\ssfT}(\mu)})$ denotes the category of $\mathbb{C}[\Lambda(G_{AB})]^{{\ssfT}(\pi)}_{{\ssfT}(\lambda){\ssfT}(\mu)}$-modules and intertwiners. The composition functors, associator and unitors are given analogously to the construction of $\mathsf{Bdry}_G^\alpha$.

From this definition, we interpret the objects $(\Lambda A,{\sfT}(\lambda))$ of $\mathsf{2Bdry}_G^\pi$ as defining boundary conditions for the endpoints of a string-like excitation that terminates on a gapped boundary labelled by $(A,\lambda)$. An isomorphism class of objects in $\Lambda A$ specifies possible fluxes for a string-like excitation terminating on the boundary $(A,\lambda)$. This flux corresponds to the closed holonomy going along the non-contractible cycle perpendicular to the length of the string. Given a pair of objects $(\Lambda A,{\sfT}(\lambda))$, $(\Lambda B,{\sfT}(\mu))$ a 1-morphism $\rho_{AB}\in {\rm Ob}(\mathsf{Hom}_{\mathsf{2Bdry^\pi_G}}((A,\lambda),(B,\mu)))$ specifies a magnetic quantum number describing the gauge orbit of parallel transports along the length of the string---generically, such a parallel transport must be compatible with the possible boundary conditions for the endpoints of the string---as well as a charge quantum number decomposing the symmetries of the gauge action on the string. In this way, we view such strings as dyonic excitations. The bifunctor on 1-morphisms provides a notion of concatenation for a pair of string-like excitations that share a boundary endpoint, as described in sec.~\ref{sec:comult}. The 2-morphisms correspond to intertwiners, so that a 2-morphism of the form $\zeta: \rho_{AB}\otimes_B \rho_{BC} \to \rho_{AC}$ can be interpreted as implementing the renormalization of a pair of concatenated string-like excitations. Identity 1-morphisms and unitors are defined analoguously to $\mathsf{Bdry}_G^\alpha$. Similarly, the 1-associator for a triple of 1-morphisms $\rho_{AB}$, $\rho_{BC}$, $\rho_{CD}$ in the appropriate hom-categories is given by the intertwiner isomorphism $\Phi^{\rho_{AB}\rho_{BC} \rho_{CD}}:(\rho_{AB}\otimes_{B}\rho_{BC})\otimes_{C} \rho_{CD}\to \rho_{AB}\otimes_{B}(\rho_{BC}\otimes_{C} \rho_{CD})$, as described explicitly in sec.~\ref{sec:comult}.

\bigskip \noindent
It is well-known that, given a lattice Hamiltonian realisation of (2+1)d Dijkgraaf-Witten theory with input data $(G,\alpha)$, algebraic properties of the (bulk) anyonic excitations can be encoded into the \emph{centre} $\mc{Z}(\mathsf{Vec}^{\alpha}_{G})$ of the fusion category $\mathsf{Vec}^{\alpha}_{G}$, this centre being in particular a \emph{braided} monoidal category. The objects of $\mc{Z}(\mathsf{Vec}^{\alpha}_{G})$ are interpreted as the elementary excitations of the model, or anyons, and the morphisms implement space-time processes of such anyons. The monoidal structure describes the fusion and splitting processes of the excitations, whereas the braiding structure encodes their exchange statistics. Recently, Kong et al. studied in \cite{Kong:2019brm} the analogue of this result in (3+1)d. The relevant category theoretical structure in (3+1)d being the monoidal bicategory $\mathsf{2Vec}^{\pi}_{G}$, they computed the braided monoidal bicategory ${\mc{Z}}(\mathsf{2Vec}^{\pi}_{G})$ obtained as the categorified centre of $\mathsf{2Vec}^{\pi}_{G}$, arguing that such a bicategory should describe string-like excitations and their statistics in (3+1)d gauge models. More specifically,  they demonstrated that as a bicategory ${\mc{Z}}(\mathsf{2Vec}^{\pi}_{G})$ is equivalent to the bicategory $\mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$. Using this equivalence, they suggested that objects of ${\mc{Z}}(\mathsf{2Vec}^{\pi}_{G})$ could be interpreted as string-like topological excitations, 1-morphisms as particle-like topological excitations, and 2-morphisms as instantons. Relating this bicategory to the boundary tube algebra in (3+1)d, we shall argue that objects of ${\mc{Z}}(\mathsf{2Vec}^{\pi}_{G})$ should be interpreted as boundary conditions for the endpoints of a string-like excitation---such a boundary condition specifying in particular allowed fluxes for the excitation---the 1-morphisms as quantum numbers associated with string-like topological excitations that are constrained by a choice of endpoints boundary conditions, and 2-morphisms as implementing the renormalisation of concatenated string-like excitations.

In order to establish the interpretation spelt out above, we begin by showing that $\mathsf{2Bdry}_G^\pi$ is equivalent as a bicategory to a full sub-bicategory $\sfpartial \mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$ of $\mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$.
Our argument mirrors the equivalence of bicategories $\mathsf{Bdry}_G^\alpha\simeq \mathsf{MOD}(\mathsf{Vec}^{\alpha}_{G})$ established in sec.~\ref{sec:bicatmodel2D}. Utilising prop.~\ref{prop:MOD-sAlg}, we know that, up to equivalence, all $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$-module categories can be expressed as the category of module objects for an algebra object in $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$. Moreover, we established in sec.~\ref{sec:algObj} that all such algebra objects were indexed by $(\Lambda G, {\sfT}(\pi))$-subgroupoids, as defined in sec.~\ref{sec:relatGr}. Given the data $(A,\lambda)$ of gapped boundary condition in (3+1)d, we explained in sec.~\ref{sec:tube3D} that the loop groupoid $\Lambda A$ together with the groupoid 2-cochain ${\sfT}(\lambda)$ defines such a $(\Lambda G, {\sfT}(\pi))$-subgroupoid. Henceforth, we shall refer to groupoids of this form as $\sfpartial (\Lambda G, {\sfT}(\pi))$-subgroupoids. In this vein, we define the bicategory $\sfpartial\mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$ as the full sub-bicategory of $\mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$ whose objects are  $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$-module categories induced from $\sfpartial(\Lambda G,{\sfT}(\pi))$-subgroupoids, and hom-categories are the corresponding ones in $\mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$. Similarly, we define $\sfpartial\mathsf{sAlg}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$ as the full sub-bicategory of $\mathsf{sAlg}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$, whose objects are  algebra objects in $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$ of the form $\Lambda A_{{\ssfT}(\lambda)}$, and hom-categories are the corresponding categories of bimodule objects in $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$. Mimicking our proof of the equivalence $\mathsf{Bdry}_G^\alpha\simeq \mathsf{sAlg}(\mathsf{Vec}^{\alpha}_{G})$, we can show the equivalence between $\mathsf{2Bdry}_G^\pi$ and $\sfpartial\mathsf{sAlg}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$. This equivalence relies in particular on the isomorphism $\mathbb C[\Lambda(G_{AB})]^{{\ssfT}(\pi)}_{{\ssfT}(\lambda){\ssfT}(\mu)} \equiv \mathbb{C}[\Lambda G_{\Lambda A\Lambda B}]^{\vartheta^{\Lambda A \Lambda B}} \simeq \mathbb C[\widetilde{\Lambda G}_{\Lambda A \Lambda B}]^{\varpi^{\Lambda A \Lambda B}}$ of twisted relative groupoid algebras, which is realised by an obvious generalisation of \eqref{eq:isoGroupoid}. Utilising the proof of prop.~\ref{prop:MOD-sAlg}, it follows that $\partial\mathsf{sAlg}(\mathsf{Vec}^{\alpha}_{G})\simeq \partial\mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$, hence establishing the equivalence
\begin{align}
	\mathsf{2Bdry}_G^\pi\simeq \sfpartial \mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}) \; .
\end{align}
Let us now explain how we can generalise our approach so as to obtain the bicategory $\mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$, which we recall was shown to be equivalent to $\mathcal{Z}(\mathsf{2Vec}^\pi_G)$. When considering the boundary tube algebra for the (3+1)d gauge models in sec.~\ref{sec:tube3D}, we could have allowed for a larger spectrum of boundary colourings beyond the ones inherited from the gapped boundary conditions. More specifically, we could have considered $G$-colourings that are provided by morphisms in any $(\Lambda G,{\sfT}(\pi))$-subgroupoid $(\mathcal{X},\phi)$ such that $d^{(2)}\phi = {\sfT}(\pi){\sss |}_\mc X^{-1}$. Given a pair of  $(\Lambda G,{\sfT}(\pi))$-subgroupoids $(\mathcal{X},\phi)$ and $(\mathcal{Y},\psi)$, we could have then considered $G$-coloured graph-states of the form
\begin{align}
	\big| \biGr{\fr g}{\fr x}{\fr y} \big\ra \equiv
	\Bigg| \! \tubeThreeD{0.9}{0}{1}{g}{x}{y}{3} \Bigg\ra
	\equiv
	\Bigg| \tubeThreeDBeauty{1}{2} \Bigg\ra
\end{align}
where we borrowed the notation from sec.~\ref{sec:tube3D} and
\begin{equation*}
	\fr x = x_2 \xrightarrow{x_1}x_2^{x_1} \in {\rm Hom}(\mc X) \; , \q
	\fr y = y_2 \xrightarrow{y_1}y_2^{y_1} \in {\rm Hom}(\mc Y) \; , \q
	\biGr{\fr g}{\fr x}{\fr y}\; , \in {\rm Hom}(\Lambda G_{\mc X \mc Y}) \; ,
\end{equation*}
such that $\Lambda G_{\mc{X}\mc{Y}}$ denotes the relative groupoid over $\Lambda G$ defined by $\mc X$ and $\mc Y$.
In this setting, there exists a natural multiplication of such boundary tubes defining an algebra isomorphic to the twisted groupoid algebra $\mathbb{C}[\Lambda G_{\mc X \mc Y}]^{{\ssfT}(\pi)}_{\phi\psi}$. Letting $\mathsf{String}_G^\pi$ denote the bicategory defined in the same manner as $\mathsf{2Bdry}_G^\pi$ with objects all $(\Lambda G,{\sfT}(\pi))$-subgroupoids and hom-categories
\begin{align}
	\mathsf{Hom}_{\mathsf{String}_G^\pi}((\mc X,\phi),(\mc Y,\psi)):=\mathsf{Mod}(\mathbb{C}[\Lambda G_{\mc X \mc Y}]^{{\ssfT}(\pi)}_{\phi\psi}) \; ,
\end{align}
we obtain the following equivalence of bicategories:
\begin{align}
	\mathsf{String}_G^\pi\simeq \mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}) \; .
\end{align}
Utilising this equivalence of bicategories, together with the physical interpretation inherited from the tube algebra approach, we interpret the  $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$-module category $\mathsf{Mod}_{\mathsf{Vec}^{{\textsf{\tiny T}}(\pi)}_{\Lambda G}}(\mc X_{\phi})$ for a  $(\Lambda G,{\sfT}(\pi))$-subgroupoid $(\mc X,\phi)$ as the \emph{2-Hilbert space} \cite{baez1997higher} of boundary conditions that appear at the endpoint of a string-like (bulk) excitation. As before, 1-morphisms are naturally interpreted as the quantum numbers of string-like excitations.

The motivation for calling $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$-module categories $\mathsf{Mod}_{\mathsf{Vec}^{{\textsf{\tiny T}}(\pi)}_{\Lambda G}}(\mc X_{\phi})$ 2-Hilbert spaces is as follows. In finite-dimensional quantum mechanics, given a finite set $X$ of classical field configurations, the corresponding Hilbert space $\mc{H}[X]$ is given by the free vector space of functions $f:X\rightarrow\mathbb{C}$. Categorifying the set of classical field configurations to a groupoid $\mc{G}$, whose objects correspond to classical field configurations and morphisms, the symmetries of the field configurations. The category $[\mc{G},\mathsf{Vec}]^{\beta}$ of (weak) functors $F:\mc{G}\rightarrow \mathsf{Vec}$ for $[\beta]\in H^{2}(\mc{G},\rU(1))$ provides a natural categorification of $\mc{H}[X]$ which defines a finite 2-vector space (see sec.~\ref{sec:pseudoalgob}). The category $[\mc{G},\mathsf{Vec}]^{\beta}$ can then be shown to admit a categorification of the inner-product of finite Hilbert spaces given by the hom-functor
\begin{align}
	\langle -,-\rangle:([\mc{G},\mathsf{Vec}]^{\beta})^{\rm op}\boxtimes [\mc{G},\mathsf{Vec}]^{\beta}\rightarrow \mathsf{Vec} \; .
\end{align}
Recalling that $\mathsf{Mod}_{\mathsf{Vec}^{{\textsf{\tiny T}}(\pi)}_{\Lambda G}}(\mc X_{\phi})$ is defined by a category of weak functors from a groupoid to $\mathsf{Vec}$, the term 2-Hilbert space seems most appropriate.

\bigskip \noindent
We conclude this section by showing that, in general, objects in $\sfpartial\mathsf{MOD}(\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G})$ are not \emph{indecomposable} as $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$-module categories. For convenience, we shall focus on the limiting case where the group $G$ is \emph{abelian}, but our analysis can be extended to the non-abelian scenario.  Analogously to indecomposable modules over an algebra, an indecomposable module category is a module category which is not equivalent to the direct sum of non-zero module categories. Using the equivalence between $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$-module categories and the categories of module objects for a separable algebra object in $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$, we have that a   $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$-module category is indecomposable if only if the corresponding algebra object is not Morita equivalent to a direct sum of non-zero algebra objects. Given a (3+1)d gauge model with input data $(G,\pi)$, and a choice of gapped boundary condition $(A,\lambda)$, an algebra object $\Lambda A_{{\ssfT}(\lambda)}$ in  $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$ naturally decomposes as a direct sum via
\begin{align}
	\Lambda A_{{\ssfT}(\lambda)}=\bigoplus_{a\in A}(\Lambda A_a)_{{\ssfT}_a(\lambda)} \; ,
\end{align}
where $\Lambda A_{a}$ denotes the groupoid with unique object $a\in A$ and set of morphisms $\{a\xrightarrow{a'}a\}_{\forall \, a'\in A}$. The 2-cochain ${\sfT}_a(\lambda)\in C^{2}(\Lambda A^{a},\rU(1))$ is then given by the restriction of ${\sfT}(\lambda)\in C^{2}(\Lambda A,\rU(1))$ to $\Lambda A_{a}$. This decomposition yields
\begin{align}
	\mathsf{Mod}_{\mathsf{Vec}^{{\textsf{\tiny T}}(\pi)}_{\Lambda G}}(\Lambda A_{{\ssfT}(\lambda)})
	\simeq
	\bigoplus_{a\in A}
	\mathsf{Mod}_{\mathsf{Vec}^{{{\textsf{\tiny T}}}(\pi)}_{\Lambda G}}((\Lambda A_a)_{{\ssfT}_a(\lambda)})
\end{align}
as $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$-module categories, so that the category of module objects  is not indecomposable as a module category unless $A=\mathbbm 1_{G}$ is the trivial subgroup of $G$. Generically, for possibly non-abelian $G$ an indecomposable $\mathsf{Vec}^{{\ssfT}(\pi)}_{\Lambda G}$-module category can be specified by a triple $(\mc O,H,\phi)$ ,  where $\mc O$ denotes a conjugacy class of $G$, $H$ is a subgroup of the centralizer $Z_{o_1}\subseteq G$ for a representative $o_1 \in \mc O$, and $\phi\in C^{2}(H,\rU(1))$ is 2-cochain satisfying $d^{(2)}\phi={\sfT}(\pi){\sss |}_{H}$ \cite{Kong:2019brm}. The corresponding algebra object is then given by $(H_{o_1})_{\phi_{o_1}}$, where $H_{o_1}$ denotes the groupoid with unique object $o_1 \in \mc O$ and  hom-set $\{h:o_1 \to o_1 \}_{\forall \, h\in H}$ with composition given by multiplication in $H$, and the 2-cochain $\phi_{o_1}\in C^{2}(H_{o_1},\rU(1))$ is defined by the relation $\phi_{o_1}(h:o_1 \to o_1,h':o_1 \to o_1):=\phi(h,h')$ for all $h,h'\in H$.