\section{Introduction}

In this paper we present a combinatorial model of a topological field theory on  cobordisms endowed with a cellular decomposition and a  local system $E$, where the fields are modelled on cellular cochains. The model is compatible with composition (concatentation) of cobordisms.  In the limit of a dense cellular decomposition (with mesh going to zero), our combinatorial model converges, in an appropriate sense (for details, see Section \ref{sss: cont limit}), to the topological $BF$ theory in Batalin-Vilkovisky formalism. Cellular cochains in this context
arise as a combinatorial replacement of differential forms -- the fields of the continuum model.

Quantization of this model is given by well-defined finite-dimensional integrals (which replace in this context the functional integral of quantum field theory). The model  is formulated in Batalin-Vilkovisky formalism (or rather its extension, ``BV-BFV formalism'' \cite{CMR,CMRpert}, for manifolds with boundary, which is compatible with gluing/cutting). The construction of quantization depends on a choice of retraction of cellular cochains onto cohomology (in particular, a choice of chain homotopy); this retraction represents the data of gauge-fixing in this context. The space of choices is contractible.

The result of quantization  is a cocycle (the partition function) in a certain cochain complex, constructed as a tensor product of a complex associated to the boundary (the space of states) and a complex associated to the ``bulk'' -- the cobordism itself (half-densities on the space of ``residual fields'' modelled on cellular cohomology). The partition function satisfies a gluing rule (a variant of Atiyah-Segal gluing axiom of quantum field theory)
with respect to concatenation of cobordisms and, when considered modulo coboundaries, is independent of the cellular decomposition of the cobordism.
The cocycle property of the partition function is a variant of the Batalin-Vilkovisky quantum master equation modified for the presence of boundary. Changing the choices involved in quantization changes the partition function by a coboundary.

We present both the abelian and the non-abelian versions of the model. In the abelian version, in the case of a closed manifold endowed with an acyclic local system,
the partition function  is the Reidemeister torsion. For a non-acyclic local system, one gets the Reidemeister torsion (which is, in this case, not a number, but an element of the determinant line of cellular cohomology, defined modulo sign), up to a factor depending on Betti numbers and containing a $\bmod\; 16$ complex phase.  

In the non-abelian case, the model depends on the choice of a unimodular Lie algebra $\mathfrak{g}$ of coefficients and the action of the model is constructed in terms of local unimodular $L_\infty$ algebras on $\mathfrak{g}$-valued cochains on closures of individual cells.\footnote{
In our presentation of this result (Theorem \ref{thm: cellBF}), the local unimodular $L_\infty$ algebras are packaged into generating functions -- the local building blocks $\bar{S}_e$ for the cellular action.
To be precise, the sum of building blocks $\bar{S}_{e'}$ over all cells $e'$ belonging to the closure of the given cell $e$ is the generating function for the operations (structure constants) of the local unimodular $L_\infty$ algebra assigned to $e$, in the sense of 
Section \ref{sec: uL_infty} and (\ref{BF_infty ansatz for S_cell}).
} These local unimodular $L_\infty$ algebras coincide with $\mathfrak{g}$ on $0$-cells and are constructed on higher-dimensional cells $e$ by induction in skeleta. Each step of this induction is an inductive construction in its own right where one starts with the algebra for the boundary of the cell $\partial e$ and extends it by a piece corresponding to the component of the cellular differential mapping $\partial e$ to $e$ and then continues to add higher operations to correct for the error in the coherence relations of the algebra.  This is an inductive  construction by obstruction theory which has a solution which is explicit once certain choice of local chain homotopies is made. Moreover, the space of choices involved is contractible and two different cellular actions are ``homotopic'' in the appropriate sense (i.e., related by a canonical BV transformation). Operations of the local unimodular $L_\infty$ algebras for cells are expressed in terms of nested commutators and traces in $\mathfrak{g}$ and certain interesting structure constants which can be made rational (with a good choice of local chain homotopies). E.g., for $1$-cells these constants are expressed in terms of Bernoulli numbers. 

The non-abelian partition functon for a closed manifold with cellular decomposition 
is expressed in terms of the Reidemeister torsion, the $\bmod\; 16$ phase together with a sum of Feynman diagrams encoding  the data of the induced unimodular $L_\infty$ algebra structure on the cohomology of the manifold. The classical $L_\infty$ part of this algebra contains the Massey brackets\footnote{Also known as Massey-Lie brackets.} on cohomology and is, in case of a simply connected manifold, a complete invariant of the rational homotopy type of the manifold. Also, this $L_\infty$ algebra yields
a deformation-theoretic description of the formal neighborhood of the (possibly, singular) point corresponding to the local system 
$E$ on the moduli space of
local systems (in non-abelian case $E$ is interpreted as a choice of background flat bundle around which the theory is perturbatively quantized). The quantum part of the partition function (corresponding to the ``unimodular'' or ``quantum'' operations of the algebraic structure  on cohomology) is related to the behavior of the Reidemeister torsion in the neighborhood of $E$ on the moduli space of local systems. In the case of a cobordism, we have a relative to the boundary version of this structure, compatible with concatenation of cobordisms. The space of states associated to a boundary component in the non-abelian case is the same as in the abelian case as a graded vector space but with a more complicated differential. The cohomology of this differential is the Chevalley-Eilenberg cohomology of the
$L_\infty$ algebra structure on the cohomology of the boundary and thus
 is an invariant of the rational homotopy type of the boundary.
 
The non-abelian actions assigned to CW complexes, when considered modulo canonical BV transformations, are compatible with local moves of CW complexes -- cellular aggregations (inverses of subdivisions) and Whitehead's elementary collapses (which, together with their inverses, elementary expansions, generate the simple-homotopy equivalence of CW complexes). Both moves -- an aggregation and a collapse are represented by
a fiber BV integral (a.k.a.  BV pushforward) along the corresponding fibration of fields on a bigger complex over fields on a smaller complex.  Expansions and  collapses are the more fundamental moves (aggregations can be decomposed as expansions and collapses) but generally do not preserve the property of CW complexes to correspond to manifolds. In fact, we consider two versions of the non-abelian theory: 
\begin{enumerate}[I]
\item The ``canonical" version -- Section \ref{sec: non-ab BF I}. Here the fields are a cochain and a chain of the same CW complex $X$ which is not required to be a manifold. The cellular actions are compatible with elementary collapses (Lemma \ref{lemma: collapse}) and the partition function, defined via BV pushforward to cohomology,  is simple-homotopy invariant (Proposition \ref{prop: non-ab BF I simple homotopy invariance}). Here one has a version of Mayer-Vietoris gluing formula for cellular actions (see (\ref{simpBF (vi)}) of Theorem \ref{thm: simpBF}), which  is not of Segal type, since one of the fields has ``wrong''  (covariant) functoriality.
\item The version on cobordisms (of a fixed dimension) -- Section \ref{sec: non-ab BF cobordism}, with Segal-type gluing formula w.r.t. concatenation of cobordisms. Here the fields are a pair of cochains of $X$ an the dual complex $X^\vee$, and $X$ is required to be a cellular decomposition of a cobordism. In this picture one does not have elementary expansions and collapses on the nose, but one has cellular aggregations, and one can prove the compatibility of the theory w.r.t. aggregations by temporarily passing to the canonical version and presenting the aggregation via expansions and collapses (Proposition \ref{prop: aggregations}, (\ref{prop 8.15 (iii)}) of Theorem \ref{prop 8.15}).
\end{enumerate}
One can regard the passage from more dense to more sparse cellular decompositions via BV pushforwards as a version of Wilson's renormalization group flow, passing from a higher energy effective theory to a lower energy effective theory.

The model presented in this paper is, on one side, an explicit example of the BV-BFV framework  for quantization of gauge theories in a way compatible with cutting-pasting of the spacetime manifolds, developed by the authors in \cite{CMR,CMRpert} (a short survey of the BV-BFV programme can be found in \cite{CMRsurvey}). On the other side, it is a development of the work \cite{SimpBF, DiscrBF} and provides a replacement for the path integral in a topological field theory by a coherent (w.r.t. aggregations) system of cellular models, in such a way that each of them can be used to calculate the partition function as a finite-dimensional integral (exactly, i.e., without having to pass to a limit of dense refinement).\footnote{
Besides casting the model into the BV-BFV setting, with cobordisms and Segal-like gluing,
some of the important advancements
over \cite{SimpBF,DiscrBF} are the following:
general ball CW complexes are allowed (as opposed to simplicial and cubic complexes); the new construction of the cellular action which is intrinsically finite-dimensional and in particular does not use regularized infinite-dimensional super-traces; a systematic, intrinsically finite-dimensional, treatment of the behavior w.r.t. moves of CW complexes -- elementary collapses and cellular aggregations; understanding the constant part of the partition function (leading to the contribution of the Reidemeister torsion and the $\bmod\,16$ phase); incorporating the twist by a  nontrivial local system.
} 

It is important to note two (related) features that set the cellular model apart from continuum field theories in the BV-BFV formalism and could be regarded as the artefacts of discretization:
\begin{itemize}
\item The polarization of the space of phase spaces (a.k.a. spaces of boundary fields) assigned to the boundaries is built into the theory on a cobordism already at the classical level,
via the convention for the Poincar\'e dual of the cellular decomposition (and thus is built into the definition of the space of classical fields (\ref{cell BF fields on a cobordism})).\footnote{In this paper we use the convention that the polarization is linked to the designation of boundaries as in/out. Thus we link out-boundaries to ``$A$-polarization'' and in-boundaries with ``$B$-polarization''. This convention is entirely optional. On the other hand, the link between polarization (\ref{polarization}) and the notion of the dual CW complex (Section \ref{sec: Lefschetz for cell decomp, cobordism}) is essential for the construction. } This is different from the usual situation \cite{CMRpert} where one chooses the polarization at a later stage, as a datum necessary for quantization.
\item The BV 2-form on the space of fields is degenerate in presence of the boundary, i.e., it is a ($-1$-shifted) pre-symplectic structure, rather than a symplectic one. However, once restricted to the subspace of fields satisfying an admissible boundary condition (as determined by polarization of boundary phase spaces), the BV 2-form becomes non-degenerate (and this property hinges on the link between the convention for the Poincar\'e dual complex and the polarization stressed above) and thus BV integrals make sense fiberwise, in the family over the over the space $\mathcal{B}_\partial$ parameterizing the admissible boundary conditions.
\end{itemize}

Throughout the paper we use the language of perturbative integrals (i.e., of stationary phase asymptotic formula for oscillating integrals) and we use the ``Planck constant'' $\hbar$ as the conventional bookkeeping formal parameter 
controlling the frequency of oscillations. However, one can always choose $\hbar$ to be a finite real number instead: by the virtue of the model at hand, we do not encounter series in $\hbar$ of zero convergence radius, as would be usual for stationary phase asymptotics (in fact, in $BF$ theory one does not encounter Feynman diagrams with more than one loop, so the typical power series in $\hbar$ we see in the paper truncate at the order $\mathcal{O}(\hbar^1)$).






\begin{comment}
\marginpar{Alberto's germ of intro v.2}
In this work we construct a nontrivial map from ball CW complexes modulo simple-homotopy equivalence to solutions of the MC equation in a BV algebra modulo gauge equivalences. Nontriviality is ensured by the condition that the map is a perturbation of the map associated to (a power of) the Reidemeister torsion.

The construction only depends on the choice of a unimodular Lie algebra and is presented in terms of universal coefficients. A representative of the map can be constructed inductively over cells of nondecreasing dimension, with the unimodular Lie algebra associated to the zero-dimensional cells, and choices can be made so as to get rational coefficients in this presentation.
This construction, to which we refer as the ``canonical $BF$ theory'' on ball complexes, satisfies gluing formulae of Mayer-Vietoris type. It
may be viewed as a discretized version of the AKSZ method known from BV topological field theories. 

The universal coefficients may also be used to define another version of the theory that 
lives on cellular decompositions of manifolds with boundary and which is compatible with cutting and gluing. It defines a topological field theory a la Atiyah—Segal which may be regarded as the discretized version of $BF$ theory.


{}From the physical point of view what we do is to construct an example of discrete topological field theory (corresponding to $BF$ theory in the continuum limit). A representative of the map in our construction corresponds to a gauge-fixed effective action and the Whitehead collapses induce renormalization group transformations a la Wilson. Note that in three dimensions, $BF$ theory with group $SO(2,1)$ is three-dimensional gravity, so our construction also constitutes the starting point for an alternative formulation of the Ponzano-Regge model; this construction additionally requires
a globalization of the result on the BV moduli space of critical points and an integration over it, which we do not discuss
in this paper.

Our construction relies on the BV formalism. Namely, the BV algebra in the target is the algebra of  functions on a finite-dimensional odd symplectic space consisting of chains and cochains on the ball CW complex at hand with values in the Lie algebra and its dual. The renormalization group operation corresponding to a Whitehead collapse is given by the fiber BV integral (a.k.a.\ BV pushforward).
The gluing operation, in the case of triangulations of manifolds with boundary, is given in terms of pairing of states and BV pushforward.
\marginpar{END of Alberto's intro}
\end{comment}

\subsection{Main results}

\subsubsection{Abelian cellular $BF$ theory on cobordisms (Sections \ref{sec: closed}--\ref{sec: quantum cell ab BF on mfd with bdry}) } \label{sec: intro main results abelian}
\begin{enumerate}[I.]
\item \textbf{Classical abelian $BF$ theory on a cobordism endowed with cellular decomposition.} 
For $M$ an $n$-dimensional cobordism  between closed $(n-1)$-manifolds $M_\mathrm{in}, M_\mathrm{out}$, endowed with a cellular decomposition $X$ and a coefficient local system (flat bundle) $E$ of rank $m$ with holonomies of determinant $\pm 1$ ($E$ plays the role of an external parameter -- the twist of the model), we construct (Section \ref{sec: classical cell ab BF on mfd with bdry}; the case of $M$ closed is considered as a warm-up in Section \ref{sec: classical closed}) a field theory in BV-BFV formalism with the following data.
\begin{itemize}
\item The space of fields assigned to the cobordism $(M,X)$ is
$\mathcal{F}=C^\bullet(X,E)[1]\oplus C^\bullet(X^\vee,E^*)[n-2]$. Here $X^\vee$ is the dual cellular decomposition to $X$ (see Section \ref{sec: reminder on Poincare duality} for details on the cellular dual  for a cellular decomposition of a cobordism).
\item The BV action is $S=\left\langle B,d_EA \right\rangle + \left\langle B,A \right\rangle_\mathrm{in} $ where $(A,B)\in \mathcal{F}$ is the cellular field.
\item The BV 2-form on fields is induced from chain level Poincar\'e duality.
\item The cohomological vector field $Q$ is the sum of lifts of cellular coboundary operators on CW complexes $X$ and $X^\vee$, twisted by the local system, to vector fields on the space of fields.
\item The boundary of $(M,X)$ gets assigned the space of boundary fields (or the ``phase space'') $\mathcal{F}_\partial=C^\bullet(X_\partial,E)[1]\oplus C^\bullet(X_\partial^\vee,E^*)[n-2]$ (naturally split into in-boundary-fields and out-boundary fields) which carries:
\begin{itemize}
\item A degree zero symplectic structure (induced from chain level Poincar\'e duality on the boundary), with a preferred primitive $1$-form $\alpha_\partial=\left\langle B,\delta A \right\rangle_\mathrm{out} - \left\langle \delta B, A \right\rangle_\mathrm{in}$ (i.e., it distinguishes between in- and out-boundaries). 
\item A natural projection of bulk fields onto boundary fields (pullback by the geometric inclusion of the boundary) $\pi: \mathcal{F}\rightarrow \mathcal{F}_\partial$. 
\item The cohomological vector field $Q_\partial$ on $\mathcal{F}_\partial$ which is constructed analogously to the bulk -- as a lift of the cellular coboundary operator (on the boundary of the cobordism). This vector field has a degree $1$ Hamiltonian $S_\partial=\left\langle B, dA \right\rangle_\partial$.
\end{itemize}
\end{itemize}
We prove that this set of data satisfies the structural relations of a classical BV-BFV theory \cite{CMR} -- Proposition \ref{lemma: i_Q=dS+alpha_bdry}. Concatenation of cobordisms here maps to fiber product of the corresponding BV-BFV packages -- Section \ref{sec: class gluing}.
\item \textbf{Quantization on a closed manifold.} In Section \ref{sec: quantization closed} we construct the finite-dimensional ``functional'' integral quantization of the abelian cellular theory on a closed $n$-manifold. The partition function $Z$ of the theory is defined as a BV pushforward (fiber BV integral) of the exponential of the cellular action from $\mathcal{F}$ to residual fields modelled on cohomology, $\mathcal{F}^\mathrm{res}=H^\bullet(M,E)[1]\oplus H^\bullet(M,E^*)[n-2]$. 

Gauge-fixing data for the BV pushforward -- the splitting of fields into residual fields plus the complement and a choice of a Lagrangian subspace in the complement -- is inferred from a choice of ``induction data'' or ``retraction'' (see Section \ref{sec: HPT}) of cellular cochains onto cohomology (i.e. a choice of cellular representatives of cohomology classes, a choice of a projection onto cohomology and a chain homotopy between the identity and projection to cohomology -- the latter plays the role of the propagator in the theory, cf. Remark \ref{rem: propagator, closed case}).

We compute the partition function (Proposition \ref{prop: Z closed})\footnote{Partition functions are defined up to sign for the purposes of this paper, so that we don't need to keep track of orientations on the spaces of fields and gauge-fixing Lagrangians.} to be
$$Z= \xi_\hbar^{H^\bullet}\cdot \tau(M,E) \quad \in \mathbb{C}\otimes \mathrm{Det}\, H^\bullet(M,E)/\{\pm 1\}$$
where: 
\begin{itemize}
\item $\tau(M,E)$ is the Reidemeister torsion,
\item $\xi_\hbar^{H^\bullet}$ is a complex coefficient depeneding on the Betti numbers of $M$ (twisted by the local system $E$): $\xi_\hbar^{H^\bullet}=\prod_{k=0}^n (\xi_\hbar^k)^{\dim H^k(M,E)}$ with 
$$\xi_\hbar^k = (2\pi \hbar)^{-\frac14+ \frac12 k (-1)^{k-1}} (e^{-\frac{\pi i}{2}}\hbar)^{\frac14+ \frac12 k (-1)^{k-1}} $$
\end{itemize}
In particular, $Z$ depends only on the topology of $M$ and not on the cellular decomposition $X$. Note that $Z$ contains, via the factor $\xi_\hbar^{H^\bullet}$, a $\bmod\,16$ complex phase. 

The mechanism that leads to the factor $\xi_\hbar^{H^\bullet}$ (discussed in detail in Section \ref{sec: normalization}) is that, in order to have a partition function independent of $X$, we need to scale the reference half-density on the space of fields (playing the role of the  ``functional integral measure'' in the context of cellular theory) in a particular way -- it differs from the standard cellular half-density by a product over cells $e$ of $X$ of local factors $(\xi_\hbar^{\dim e})^m$ depending only on dimensions of cells. This a baby version of renormalization in the cellular theory and it leads to a partition function containing the factor $\xi_\hbar^{H^\bullet}$.
\item \textbf{Quantization on a cobordism.} In Section \ref{sec: quantum cell ab BF on mfd with bdry}, we construct the quantum BV-BFV theory on a cobordism $M$ endowed with cellular decomposition $X$ by quantizing the classical cellular theory via BV pushforward to residual fields, in a family over $\mathcal{B}_\partial=C^\bullet(X_\mathrm{out},E)[1]\oplus C^\bullet(X^\vee_\mathrm{in},E^*)[n-2] = \mathcal{B}_\mathrm{out}\oplus \mathcal{B}_\mathrm{in}$ -- the base of a Lagrangian fibration $p:\mathcal{F}_\partial\rightarrow \mathcal{B}_\partial$ of the boundary phase space determining the quantization of the boundary. 

The resulting quantum theory is the following assignment:
\begin{itemize}
\item To the out-boundary, the theory assigns the space $\mathcal{H}_\mathrm{out}^{(A)}$ of half-densities on $\mathcal{B}_\mathrm{out}$ which is a cochain complex with the differential (the ``quantum BFV operator'', arising as the geometric quantization of the Hamiltonian for the boundary cohomological vector field) $\widehat{S}_\mathrm{out}=-i\hbar \left\langle d_E A_\mathrm{out} , \frac{\partial}{\partial A_\mathrm{out}} \right\rangle$. Likewise to the in-boundary, the theory assigns the space $\mathcal{H}_\mathrm{in}^{(B)}$ of half-densities on $\mathcal{B}_\mathrm{in}$ with the differential $\widehat{S}_\mathrm{in}=-i\hbar \left\langle d_E B_\mathrm{in} , \frac{\partial}{\partial B_\mathrm{in}} \right\rangle$.\footnote{Superscripts pertain to the polarization $p: \mathcal{F}_\partial\rightarrow\mathcal{B}_\partial$ (field $A$ fixed on the out-boundary and field $B$ fixed on the in-boundary) used to quantize the in/out-boundary.}
\item To the bulk (the cobordism itself), the theory assigns: 
\begin{itemize}
\item  The space of residual fields built out of cohomology relative to in/out boundary, $\mathcal{F}^\mathrm{res}=H^\bullet(M,M_\mathrm{out};E)[1]\oplus H^\bullet(M,M_\mathrm{in};E^*)[n-2]$.
\item The partition function 
$$Z=(\mu^\hbar_{\mathcal{B}_\partial})^{\frac12}\cdot \xi_\hbar^{H^\bullet}\cdot \tau(M,M_\mathrm{out};E)\cdot e^{\frac{i}{\hbar} (\left\langle B_\mathrm{res},A_\mathrm{out} \right\rangle_\mathrm{out} +\left\langle B_\mathrm{in}, A_\mathrm{res} \right\rangle_\mathrm{in}-\left\langle B_\mathrm{in} , \mathbf{K} A_\mathrm{out} \right\rangle_\mathrm{in})}$$
(see Proposition \ref{prop: Z}). The partiton function is an element of the space of states for the boundary tensored with half-densities of residual fields. Here the coefficient $\xi_\hbar^{H^\bullet}\in \mathbb{C}$ is as in closed case, but defined using Betti numbers for cohomology relative to the out-boundary; $(\mu^\hbar_{\mathcal{B}_\partial})^{\frac12}$ is an appropriately normalized half-density on $\mathcal{B}_\partial$; $\mathbf{K}$ is a the chain homotopy part of the retraction of cochains of $X$ relative to the out-boundary to the cohomology relative to the out-boundary (which, as in the closed case, plays the role of gauge-fixing data).
\end{itemize}
\end{itemize}

This data satisfies the following properties.
\begin{enumerate}[(i)]
\item\label{intro (i)} \textbf{Modified quantum master equation} ((\ref{prop: Z (ii)}) of Proposition \ref{prop: Z}): the partition function satisfies the quantum master equation modified by a boundary term:
$$\left(\frac{i}{\hbar}\widehat{S}_\partial-i\hbar \Delta_\mathrm{res}\right)Z=0$$
\item\label{intro (ii)} \textbf{Dependence on gauge-fixing choices} ((\ref{prop: Z (iii)}) of Proposition \ref{prop: Z}): change of the gauge-fixing data (the retraction of relative cochains onto cohomology) induces a change of partition function of the form
$$Z \mapsto Z+ \left(\frac{i}{\hbar}\widehat{S}_\partial-i\hbar \Delta_\mathrm{res}\right)(\cdots)$$
\item\label{intro (iii)} \textbf{Gluing property} (Proposition \ref{prop: gluing}): partition function on a concatentation of two cobordisms can be calculated from the partition function on the two constituent cobordisms by first pairing the states in the gluing interface, and then evaluating the BV pushforward to the residual fields for the glued cobordism.
\item\label{intro (iv)} \textbf{``Topological property''}: the partition function function considered modulo $\left(\frac{i}{\hbar}\widehat{S}_\partial-i\hbar \Delta_\mathrm{res}\right)$-exact terms is independent of changes of the cellular decomposition $X$ of the cobordism $M$, assuming that the cellular decomposition of the boundary is kept fixed.
\end{enumerate}
Here the first three properties
are the axioms of a quantum BV-BFV theory \cite{CMRpert,CMRsurvey}, and the last one is a manifestation of the quantum field theory being topological. 

The ``topological property''
can be improved by passing to the cohomology of the space of states (Section \ref{sec: reduced space of states}): this cohomology (the ``reduced space of states'') is independent of $X_\partial$ and the corresponding reduced partition function satisfies the BV-BFV axioms above and is completely independent of the cellular decomposition $X$ (i.e., one does not have to fix the decomposition of the boundary).


\end{enumerate}



\subsubsection{``Canonical'' non-abelian
$BF$ theory on CW complexes (Section \ref{sec: non-ab BF I})}
\begin{enumerate}[I.]
\item \textbf{Non-abelian cellular action: existence/uniqueness result.} Theorem \ref{thm: cellBF}: For $X$ a finite ball CW complex and $\mathfrak{g}$ a unimodular Lie algebra, we prove, in a constructive way, that there exists
a BV action $S_X$ on the space of fields modelled on cellular cochains and chains $\mathsf{F}_X=C^\bullet(X)\otimes\mathfrak{g}[1]\oplus C_\bullet(X)\otimes\mathfrak{g}^*[-2]$, satisfying the following properties:
\begin{itemize}
\item $S_X$ satisfies the Batalin-Vilkovisky quantum master equation $\frac12\{S_X,S_X\}-i\hbar\Delta S_X=0$ or, equivalently, $\Delta e^{\frac{i}{\hbar}S_X}=0$. Here $\{,\}$ and $\Delta$ are the odd-Poisson bracket and the BV Laplacian on functions on $\mathsf{F}_X$ induced from canonical pairing of cochains with chains.
\item The action $S_X$ has the form $S_X=\sum_{e\subset X}\bar{S}_e$. I.e., $S_X$
 is given as the sum over all cells $e$ of $X$ of certain local building blocks $\bar{S}_e$  depending only on the fields restricted to the closure $\bar{e}$ of the cell $e$. The local building blocks satisfy the following ansatz:
 \begin{multline*} 
\bar{S}_{e
=\sum_{n=1}^\infty\sum_{\Gamma_0}\sum_{e_1,\ldots,e_n\subset \bar{e}}\frac{1}{|\mathrm{Aut}(\Gamma_0)|} C^e_{\Gamma_0,e_1,\ldots,e_n}
\left\langle \mathsf{B}_{e},\mathrm{Jacobi}_{\,\Gamma_0}(\mathsf{A}_{e_1},\ldots,\mathsf{A}_{e_n})\right\rangle_\mathfrak{g}-\\
-i\hbar \sum_{n= 2}^\infty \sum_{\Gamma_1} 
\sum_{e_1,\ldots,e_n\subset \bar{e}}\frac{1}{|\mathrm{Aut}(\Gamma_1)|} C^e_{\Gamma_1,e_1,\ldots,e_n}
\mathrm{Jacobi}_{\,\Gamma_1}(\mathsf{A}_{e_1},\ldots,\mathsf{A}_{e_n})
\end{multline*}
Here $\mathsf{A}_{e},\mathsf{B}_e$ are the cochain and chain field (valued in $\mathfrak{g}$ and $\mathfrak{g}^*$, respectively), evaluated on the cell $e$. In the sum above, $\Gamma_0$ runs over binary rooted trees with $n$ leaves, which we decorate with the $n$-tuple of faces (of arbitrary codimension) $e_1,\ldots,e_n\subset \bar{e}$; likewise $\Gamma_1$ runs over oriented connected graphs with one cycle with $n$ incoming leaves and all internal vertices having incoming/outgoing valency $(2,1)$. $\mathrm{Jacobi}_\Gamma(\cdots)$ is, for $\Gamma=\Gamma_0$ a binary rooted tree, a nested commutator of elements of $\mathfrak{g}$, as prescribed by the tree combinatorics. For $\Gamma=\Gamma_1$ a 1-loop graph, it is the trace of an endomorphism of $\mathfrak{g}$ given as a nested commutator with one of the slots kept as the input of the endomorphism and other slots populated by fields $\mathsf{A}_{e_i}$. $C_{\Gamma,e_1,\ldots,e_n}^e$ are some structure constants (i.e. the theorem is that they can be constructed in such a way that the quantum master equation holds for $S_X$).
\item We have two ``initial conditions'':\footnote{The role of these two conditions is to exclude trivial solutions to quantum master equation, e.g. $S_X=0$, and also to have uniqueness up to homotopy
for solutions satisfying the stated properties.} 
\begin{itemize}
\item $S_X$ is given as the ``abelian (canonical) action'' $\left\langle \mathsf{B}_X, d \mathsf{A}_X \right\rangle$ plus higher order corrections in fields.
\item For $e$ a $0$-cell, the building block encodes the data of the Lie algebra structure on the space of coefficients $\mathfrak{g}$: $\bar{S}_e=\left\langle \mathsf{B}_e ,\frac12 [\mathsf{A}_e,\mathsf{A}_e]\right\rangle$.
\end{itemize}
\end{itemize}

This existence theorem is supplemented by a uniqueness up to homotopy statement (i.e. up to canonical transformations of solutions of the quantum master equation; in this case, the generator of the canonical transformation turns out to satisfy the same ansatz as $S_X$ above) -- Lemma \ref{lemma: cellBF well-definedness}.

The local building blocks $\bar{S}_e$ can be chosen universally, uniformly for all CW complexes $X$, so that they 
depend only on the combinatorics of the closure of the cell $e$ and not on the rest of the combinatorial data of $X$ (Remark \ref{rem: standard building blocks}).

Structure constants $C_{\Gamma,e_1,\ldots,e_n}^e$ occurring in the local building blocks can be chosen to be rational by making a good choice in the construction of the Theorem \ref{thm: cellBF}.

\item \textbf{Compatibility with local moves of CW complexes.} Cellular actions, when considered up to canonical BV transformations, are compatible with Whitehead elementary collapses of CW compexes and with cellular aggregations. I.e. if $X,Y$ are CW complexes and $X$ is an elementary collapse of $Y$, the BV pushforward of $S_Y$ from cellular fields on $Y$ to cellular fields on $X$ is a canonical transformation of $S_X$ (Lemma \ref{lemma: collapse}). Likewise, if $X$ is a cellular aggregation of $Y$ (i.e., $Y$ is a subdivision of $X$), the same holds (Proposition \ref{prop: aggregations}). 

As a corollary of compatibility of cellular actions with elementary collapses, the partition function, defined as the BV pushforward to cohomology (more precisely, to $\mathsf{F}^\mathrm{res}=H^\bullet(X)\otimes\mathfrak{g}[1]\oplus H_\bullet(X)\otimes \mathfrak{g}^*[-2]$), which is a $\Delta$-cocycle as a consequence of Theorem \ref{thm: cellBF},  is invariant under simple-homotopy equivalence of CW complexes if considered modulo $\Delta$-coboundaries (Proposition \ref{prop: non-ab BF I simple homotopy invariance}). 
\end{enumerate}

\subsubsection{Non-abelian cellular $BF$ theory in BV-BFV setting (Section \ref{sec: non-ab BF cobordism})}


We combine the results of Sections \ref{sec: classical cell ab BF on mfd with bdry}-\ref{sec: quantum cell ab BF on mfd with bdry} and Section \ref{sec: non-ab BF I} to construct cellular non-abelian $BF$ theory on $n$-cobordisms
in BV-BFV formalism. 
\begin{enumerate}[I.]
\item \textbf{Classical non-abelian theory on a cobordism (BV-BFV setting).} We fix a unimodular Lie algebra $\mathfrak{g}$ corresponding to a Lie group $G$. For $M$ an $n$-cobordism with a cellular decomposition $X$ and a $G$-local system $E$, we construct the space of fields $\mathcal{F}$, space of boundary fields $\mathcal{F}_\partial$,  the BV 2-form on $\mathcal{F}$, the symplectic form on $\mathcal{F}_\partial$ together with the primitive $\alpha_\partial$ exactly as in the abelian case.
The action $S$, cohomological vector field $Q$ and their boundary counterparts $S_\partial$, $Q_\partial$ are constructed in terms of the local building blocks $\bar{S}_e$ (or, equivalently, local unimodular $L_\infty$ algebras) assigned by the construction of Theorem \ref{thm: cellBF} to cells $e$ of $X$, see  (\ref{S cell non-ab}), (\ref{Q non-ab cob}), (\ref{S bdry non-ab}). Moreover, in this setting  the pullback map of bulk fields to the boundary is deformed to a nontrivial $L_\infty$ morphism (\ref{Pi^*}). This set of data satisfies the axioms of a classical BV-BFV theory (Proposition \ref{prop: non-ab class BV-BFV}).
\item \textbf{Quantization.} The quantization (Section \ref{sec: non-ab quantization cob}) is constructed along the same lines as in the abelian case -- as a geometric (canonical) quantization on the boundary and a finite-dimensional BV pushforward in the bulk. The resulting spaces of states assigned to the in/out-boundaries are same as in the abelian case as graded vector spaces but carry nontrivial differentials (\ref{Shat out}), (\ref{Shat in}) deforming the differentials arising in the abelian case. Residual fields on a cobordism are same as in the abelian case, while the partition function is more involved -- we develop the corresponding Feynman diagram expansion in Proposition \ref{prop: Z non-ab}. As in the abelian theory, this set of data satisfies the properties (i)--(iv) of Section \ref{sec: intro main results abelian} (modified quantum master equation, exact dependence on gauge-fixing choices, Segal's gluing property, independence on cellular decomposition) -- Theorem \ref{prop 8.15}.
\end{enumerate}


\subsection{Open questions/What is not in this paper}
\begin{enumerate}
\item Construction of more general cellular AKSZ theories: our construction of cellular non-abelian $BF$ action in Theorem \ref{thm: cellBF} develops the theory from its value on $0$-cells, by iterative extension to higher-dimensional cells. It would be very interesting to repeat the construction starting from the target data of a more general AKSZ theory assigned to a $0$-cell. It would be particularly interesting to construct cellular versions of Chern-Simons theory and $BF+B^3$ theory in dimension $3$. Chern-Simons theory has the added complication that one has to incorporate in the construction of the BV 2-form the Poincar\'e duality on a single cellular decomposition, without using the dual one.
\item Comparison of the cellular non-abelian $BF$ theory constructed here with non-perturbative answers in terms of the representation theory data of the structure  group  $G$: comparison with zero area limit of Yang-Mills theory in dimension $2$ and comparison with Ponzano-Regge state sum model (defined in terms of $6j$ symbols) in dimension $3$. Cellular $BF+B^3$ theory should be compared with Turaev-Viro state sum model (based on $q6j$ symbols for the quantum group corresponding to $G$).
\item In this paper we use, for the construction of quantization, special polarizations of phase spaces assigned to the boundary components of an $n$-manifold -- the ``$A$-polarization'' and ``$B$-polarization''. It would be interesting to consider more general polarizations and construct the corresponding version of Hitchin's connection (mimicking the situation in Chern-Simons theory), controlling the dependence of the quantum theory on an infinitesimal change of the polarization.
\item $Q$-exact renormalization flow along the poset of CW complexes, arising from the fact that the ``standard'' cellular action is sent by a BV pushforward along a cellular aggregation to an action on the aggregated complex which differs from the standard one by a canonical transformation (see \cite{PM_2005draft} for an example of an explicit computation). Keeping track of these canonical transformations should 
lead
to the picture of a ``$Q$-exact'' Wilsonian RG flow along cellular aggregations (and to the related notion of the combinatorial $Q$-exact stress-energy tensor). This picture is expected to be related to Igusa-Klein's higher Reidemeister torsion.
\item Observables supported on CW subcomplexes, possibly meeting the boundary.
\item
Gluing and cutting
with corners of codimension $\geq 2$, or the version for the (fully) extended cobordism category, in the sense of Baez-Dolan-Lurie.
\item Partition functions in this paper are constructed up to sign, so as not to deal with orientations of spaces of fields and gauge-fixing Lagrangians. It would be interesting to construct a sign-refined version of the theory.

\end{enumerate}

\begin{comment}
\begin{itemize}
\item Comparing to 2D YM and 3D Ponzano-Regge; extending to $BF+B^3$ and comparing to Turaev-Viro; extending to Chern-Simons (abelian - chain-level Poincare duality, then to non-abelian);
general cell AKSZ from value on a point?
\item Computing BV cohomology; is it a stronger invariant than $\pi_\bullet\otimes\mathbb{Q}$?
\item Non-$A/B$ polarizations, Hitchin's connection
\item $Q$-exact renormalization and higher Igusa-Klein torsions
\item Corners and Baez-Dolan-Lurie formalism
\item Observables (meeting the boundary) - Wilson $A$-loops and $B$-hypersurfaces (linking number in abelian case, Alexander-Conway polynomial in non-abelian (knot in $S^3$)).
\item Sign-refined torsion (Braverman-...), APS $\eta$-invariant.
\end{itemize}
\end{comment}

\subsection
Plan of the paper
}

In Sections \ref{sec: reminder on Poincare duality}, \ref{sec: reminder on cell local systems}
we recall and set up the conventions and notations for chain-level Poincar\'e duality for cellular decompositions of manifolds with boundary (Section \ref{sec: reminder on Poincare duality}) and local systems in this setting (Section \ref{sec: reminder on Poincare duality}). This sets the stage for the construction of the space of fields of the cellular model.

In Section \ref{sec: HPT} we recall the homological perturbation theory which later plays the crucial role for defining the gauge-fixing for the quantization.

In Section \ref{sec: closed} we construct the abelian cellular theory on a closed manifold endowed with a cellular decomposition. We first set up the classical theory (Section \ref{sec: classical closed}) and then construct the quantization (\ref{sec: quantization closed}).

In Section \ref{sec: classical cell ab BF on mfd with bdry} we construct the extension of the abelian cellular theory to cobordisms, in the BV-BFV setting, on the classical level. 

The quantization of the abelian model on cobordisms is constructed in Section \ref{sec: quantum cell ab BF on mfd with bdry}. In particular, we prove the gluing property of the partition functions in Section \ref{sec: quantum gluing}.

In Section \ref{sec: non-ab BF I} we construct the ``canonical version'' (i.e. with covariant $B$-field) of the non-abelian $BF$ theory on arbitrary (ball) CW complexes in BV formalism and establish the invariance of the theory (up to canonical transformations) under cellular aggregations and elementary collapses of CW complexes.

In Section \ref{sec: non-ab BF cobordism} we construct the non-abelian cellular $BF$ theory on cobordisms in BV-BFV setting and its quantization. We prove that the quantization satisfies the axioms of a quantum BV-BFV theory and is independent (modulo canonical transformations) of the cellular decomposition of the cobordism.


\subsection*{Acknowledgements}
We thank Nikolai Mnev for inspiring discussions, crucial to this work. 
P. M. thanks the University of Zurich and the Max Planck Institute of Mathematics in Bonn, where he was affiliated during different stages of this work, for providing the excellent research environment.

\section{Reminder: Poincar\'e duality for cellular decompositions of manifolds}
\label{sec: reminder on Poincare duality}

\subsection{Case of a closed manifold}\label{sec: Poincare duality, closed mfd}
Let $M$ be a compact oriented\footnote{This assumption is made for convenience and can be dropped, see Remark \ref{rem: orientability} below.} 
piecewise-linear\footnote{
Throughout this paper we will be working in the piecewise-linear category. One can replace PL manifolds with smooth manifolds everywhere, but then instead of gluing of manifolds along a common boundary, one should talk about cutting a manifold along a submanifold of codimension~$1$ or work with manifolds with collars in order to achieve the correct gluing of smooth structures.
} (PL) $n$-dimensional manifold without boundary, endowed with  a cellular decomposition $X$, which we assume to be a ball complex.\footnote{Recall that a ball complex is a CW complex where characteristic maps from standard open balls to open cells $\chi: \mathrm{int}(B^k) \xrightarrow{\sim} e\subset X$ extend to homeomorphisms of closed balls to corresponding closed cells $\bar\chi: B^k \xrightarrow{\sim} \bar{e}\subset X$.
} One can construct the {\it dual} cellular decomposition of $X^\vee$, uniquely defined up to PL homeomorphism,
such that:
\begin{itemize}
\item There is a bijection $\varkappa$ between $k$-cells of $X$ and $(n-k)$-cells of $X^\vee$. (One calls $\varkappa(e)$ the {\it dual cell} for $e$.)
\item For a cell $e$ of $X$, $\varkappa(e)\subset \mathrm{star}(e)\subset M$.\footnote{The standard terminology is that for a cell $e$ of any CW complex $X$, the {\it star} of $e$ is the subcomplex of $X$ consisting of all cells of $X$ containing $e$. The {\it link} of $e$ is the union of cells of $\mathrm{star}(e)$ which do not intersect $e$.}
\item $e$ intersects $\varkappa(e)$ transversally and at a unique point.
\end{itemize}
Choosing (arbitrarily) orientations of cells of $X$, we can infer the choice of orientations of cells of $X^\vee$ in such a way that the intersection pairing is $e\cdot \varkappa(e)=+1$. More generally, for $e_i$ running over $k$-cells of $X$, we have
$e_i\cdot \varkappa(e_j)=+\delta_{ij}$.

On the level of cellular chains, we have a non-degenerate intersection pairing
\begin{equation} \cdot:\quad C_k(X;\mathbb{Z})\otimes C_{n-k}(X^\vee;\mathbb{Z})\rightarrow \mathbb{Z} \label{intersection pairing closed}\end{equation}
which induces a {\it chain} isomorphism between cellular chains and cochains
\begin{equation} C_\bullet(X;\mathbb{Z}),\partial\quad \xrightarrow{\sim}\quad  C^{n-\bullet}(X^\vee;\mathbb{Z}),d \label{Poincare chains to cochains}\end{equation}
which in turn induces the Poincar\'e duality between homology and cohomology
$$\underbrace{H_\bullet(X;\mathbb{Z})}_{=H_\bullet(M;\mathbb{Z})}\xrightarrow{\sim} \underbrace{H^{n-\bullet}(X^\vee;\mathbb{Z})}_{=H^{n-\bullet}(M;\mathbb{Z})}$$

\begin{remark}\label{rem: barycentric subdiv}
One construction of the dual cellular decomposition $X^\vee$ is via the barycentric subdivision $\beta(X)$ of $X$ -- a simplicial complex, constructed combinatorially as the nerve of the partially ordered set of cells of $X$ (with ordering given by adjacency). The combinatorial simplex $\sigma=(e_0<\ldots < e_k)$ has dimension $k$ and can be geometrically realized as a simplex inside $e_k$ with vertices $\dot{e}_0,\ldots\dot{e}_k$, where $\dot{e}$ is some a priori fixed point in an open cell $e$ -- the {\it barycenter} of $e$. Next, one constructs $X^\vee$ out of $\beta(X)$ as follows. For $v$ a vertex ($0$-cell) of $X$, we set $\varkappa(v)$ to be the star of $v$ in $\beta(X)$. For $e$ a $k$-cell of $X$, we set
\begin{equation} \varkappa(e)=\bigcap_{v\in e} \mathrm{star}_{\beta(X)}(v)\quad \cap \mathrm{star}_X(e) \label{varkappa(e) via barycentric subdivision}\end{equation}
where the first intersection runs over vertices of $e$.
\end{remark}

\begin{remark}\label{rem: orientability} Orientability of $X$ is not required to define the complex $X^\vee$. However, global orientation is necessary to
define the intersection pairing between cells of $X$ and cells of $X^\vee$
in such a way that (\ref{Poincare chains to cochains}) becomes a chain map.
In a more general setup, we can allow $X$ to be possibly non-orientable. Denote by $\mathrm{Or}$ the orientation $\mathbb{Z}_2$-local system on $X$ (see Section \ref{sec: reminder on cell local systems} below for a reminder on cellular local systems); the role of orientation is played by a choice of a primitive element $\sigma\in H_n(X,\mathrm{Or};\mathbb{Z})$. Then (\ref{intersection pairing closed}) becomes $\cdot:C_k(X;\mathbb{Z})\otimes C_{n-k}(X^\vee,\mathrm{Or};\mathbb{Z})\rightarrow \mathbb{Z}$. (We twist one of the two factors by the $\mathrm{Or}$, it is unimportant which factor is twisted.) This pairing depends on the class $\sigma$. Likewise (\ref{Poincare chains to cochains}) becomes $C_\bullet(X;\mathbb{Z}),\partial\;\; \xrightarrow{\sim}\;\;  C^{n-\bullet}(X^\vee,\mathrm{Or};\mathbb{Z}),d$. This setup can be straightforwardly adapted to the setting of cellular complexes with boundary -- we always have to twist one side in Poincar\'e-Lefschetz duality by the orientation local system. However, for simplicity, in this paper we will always be assuming that $\mathrm{Or}$ is trivial and $X$ is oriented.
\end{remark}

\subsection{Case of a manifold with boundary}\label{sec: Lefschetz for cell decomp}
Let $M$ be a compact oriented
$n$-manifold with boundary $\partial M$. Assume that we have a cellular decomposition $X$ of $M$, which restricts on the boundary to a cellular decomposition $X_\partial$ of $\partial M$.

We can construct\footnote{We can again use the construction of Remark \ref{rem: barycentric subdiv}. Cells $\varkappa(e)$ are then defined exactly as in (\ref{varkappa(e) via barycentric subdivision}) and cells $\varkappa_\partial(e)$ for boundary cells $e\subset X_\partial$ are constructed as $\varkappa_\partial(e)=\overline{\varkappa(e)}\cap \partial M$.

} a new cellular decomposition $X^{\vee_+}$ of $M$ such that the following holds.
\begin{itemize}
\item For every $k$-cell $e$ of $X$ we have an $(n-k)$-cell $\varkappa(e)\subset \mathrm{star}_X(e)\subset M-\partial M$ of $X^{\vee_+}$.
\item For every $k$-cell $e$ of $X_\partial$, apart from the $(n-k)$-cell $\varkappa(e)$, $X^{\vee_+}$ contains an $(n-k-1)$-cell $\varkappa_\partial(e)\subset \partial M$ of the dual boundary complex $(X_\partial)^\vee$.
\item Cells of the form $\varkappa(e)$, $\varkappa_{\partial}(e)$ (for boundary cells $e$) exhaust the CW complex $X^{\vee_+}$.
\item For $e$ a cell of $X-X_\partial$, $e$ and $\varkappa(e)$ intersect transversally and at a single point. For $e$ a boundary cell of $X$, $e$ meets the closed cell $\overline{\varkappa(e)}$ at a single point.
\end{itemize}


\begin{figure}[!htbp]
\begin{center}
\input{disk_CW_Poincare_+_labels.pdftex_t}
\caption{A cellular decomposition $X$ of a closed 2-disk $M$ (drawn in solid lines), and the corresponding dual decomposition $X^{\vee_+}$ of a slightly larger disk $M_+$ (drawn in dashed lines).}
\end{center}
\end{figure}



Again, orientations of $X^{\vee_+}$ can be inferred from some chosen orientations of cells of $X$ in such a way that the intersection
is:
$$e_i\cdot\varkappa(e_j)=+\delta_{ij}$$
In case of $e_j$ being a boundary cell, we have to {\it regularize} the intersection, which we can do by regarding $X^{\vee_+}$ as a cellular decomposition of $M_+$ -- an extension of $M$ by attaching
a collar $\partial M\times [0,\epsilon]$ at the boundary $\partial M$. Then all intersections of cells of $X$ in $M\subset M_+$ and cells of $X^{\vee_+}$ in $M_+$ are transversal. Note that with this regularization, for $e_i$ any cell and $e_j$ a boundary cell of $X$, we have $$e_i\cdot \varkappa_\partial (e_j)=0$$

Intersection pairing defined as above induces a non-degenerate pairing between absolute and relative chains:
\begin{equation} \cdot:\quad C_k(X;\mathbb{Z})\otimes C_{n-k}(X^{\vee_+},X_\partial^\vee;\mathbb{Z})\rightarrow \mathbb{Z} \label{Lefschetz for chains +}\end{equation}
which in turn gives rise to a chain isomorphism between absolute chains and relative cochains
$$C_\bullet(X;\mathbb{Z}),\partial \quad\xrightarrow{\sim}\quad C^{n-\bullet}(X^{\vee_+},X_\partial^\vee;\mathbb{Z}),d$$
On the level of homology/cohomology, one obtains the usual Poincar\'e-Lefschetz duality
$$\underbrace{H_\bullet(X;\mathbb{Z})}_{\cong H_\bullet(M;\mathbb{Z})}\xrightarrow{\sim} \underbrace{H^{n-\bullet}(X^{\vee_+},X^\vee_\partial;\mathbb{Z})}_{\cong H^{n-\bullet}(M,\partial M;\mathbb{Z})}$$

Note that unlike the case of closed manifolds, where the operation $X\mapsto X^\vee$ is an involution on cellular decompositions, for manifolds with boundary $X^{\vee_+}$ always has more cells than $X$ and $X\mapsto X^{\vee_+}$ cannot be an involution.

We define $X^{\vee_-}$ as a CW subcomplex of $X^{\vee_+}$ obtained by removing the cells $\varkappa(e)$ and $\varkappa_\partial(e)$ for every boundary cell $e$ of $X$. Topologically, $X^{\vee_-}$ is $X^{\vee_+}$ with a collar near the boundary removed, i.e. the underlying topological space is $M_-\subset M \subset M_+$, where $M-M_-\simeq \partial M \times [-\epsilon,0]$. The counterpart of (\ref{Lefschetz for chains +}) is the non-degenerate intersection pairing
\begin{equation} \cdot:\quad C_k(X,X_\partial;\mathbb{Z})\otimes C_{n-k}(X^{\vee_-};\mathbb{Z})\rightarrow \mathbb{Z}  \label{Lefschetz for chains -}\end{equation}

\begin{figure}[!htbp]
\begin{center}
\input{disk_CW_Poincare_-_labels.pdftex_t}
\caption{A cellular decomposition $X$ of a closed 2-disk $M$ (drawn in solid lines) and the dual decomposition $X^{\vee_-}$ of a smaller disk $M_-$ (drawn in dotted lines).}
\end{center}
\end{figure}

\begin{definition} \label{def: product type}
We will say that a cellular decomposition $X$ of a manifold $M$ with boundary is
of \emph{product type}
near the boundary if, for any $k$-cell $e_\partial$ of $X_\partial$, there exists a unique $(k+1)$-cell $e$ of $X-X_\partial$ such that $e_\partial\subset \partial e$.\footnote{In other words, we are asking for the intersection of $X$ with a thin tubular neighborhood of the boundary to look like the product CW-complex $X_\partial\times [0,1]$ intersected with $X_\partial\times [0,\epsilon)$. Morally, even though there is no metric in our case, one should think of this property as an analog of the property of a Riemannian metric on a smooth manifold with boundary to be of product form near the boundary.}
\end{definition}

\begin{figure}[!htbp]
\begin{center}
\input{non_product_type_examples.pdftex_t}
\caption{Two examples of non-product type behavior of a cellular decomposition (in this case, of a 2-disk) near the boundary. Note the extra vertex on the boundary in the example on the left.}
\end{center}
\end{figure}


There is the obvious geometric inclusion of the boundary
$\iota_+: X^\vee_\partial\hookrightarrow X^{\vee_+}$. There is also a cellular map
$\iota_-: X_\partial^\vee \hookrightarrow X^{\vee_-}$ which sends $\varkappa_\partial(e)$ to $\partial\varkappa(e)\cap \partial M_-$ for any cell $e$ of $X_\partial$. Under the assumption that $X$ is of product type near the boundary, as defined above, $\iota_-$ is in fact an inclusion. In particular, in this case the boundary of the dual complex $X^{\vee_-}\cap \partial M_-$ is isomorphic, as a CW complex, to $X_\partial$.

As opposed to $X^{\vee_+}$, complex $X^{\vee_-}$ has {\it less} cells then $X$, and, in the
case of product type near the boundary, the ``double duals'' $(X^{\vee_+})^{\vee_-}$, $(X^{\vee_-})^{\vee_+}$ are isomorphic to $X$ as CW complexes.

Note also that $X^{\vee_+}$ is always of product type near the boundary.

\subsubsection{Cutting a closed manifold into two pieces}\label{sec: cutting a closed mfd}
Let $M$ be a closed manifold cut along a codimension $1$ submanifold $\Sigma$ into two parts -- manifolds with boundary $M_I$, $M_{II}$, with $\partial M_I=\partial M_{II}=\Sigma$. Let $X$ be a cellular decomposition of $M$ such that $X_\Sigma=\Sigma\cap X$ is a subcomplex of $X$. Denote $X_I$, $X_{II}$ the induced cellular decompositions of $M_I$, $M_{II}$. Then one has the obvious (pushout) relation:
$$X=X_I\cup_{X_\Sigma} X_{II}$$
\begin{comment}
diagram
$$
\begin{CD}
X_1 @>>> X \\
@AAA @AAA \\
X_I @>>> X_2
\end{CD}
$$
\end{comment}
For the dual decompositions, one has
$$X^\vee=X^{\vee_+}_I\cup_{X_\Sigma^\vee} X^{\vee_-}_{II}$$
assuming that $X_{II}$ is of product type near $X_\Sigma$, and
$$X^\vee=X^{\vee_-}_I\cup_{X_\Sigma^\vee} X^{\vee_+}_{II}$$
if $X_I$ is of product type near $X_\Sigma$. It can happen, of course, that $X$ is well-behaved on both sides of $X_\Sigma$, and then both formulae above hold.


\subsection{Case of a cobordism}\label{sec: Lefschetz for cell decomp, cobordism}
A more symmetric version of the construction of Section \ref{sec: Lefschetz for cell decomp} is as follows. Let $M$ be a compact oriented
manifold with boundary split into two disjoint parts $\partial M=M_\mathrm{in}\sqcup M_\mathrm{out}$.\footnote{By convention, we endow $M_\mathrm{out}$ with the orientation induced from the orientation of $M$, whereas $M_\mathrm{in}$ is endowed with orientation opposite to the one induced from $M$. Thus, as an oriented manifold the boundary splits as $\partial M=\overline{M_\mathrm{in}}\sqcup M_\mathrm{out}$ where the overline stands for orientation reversal.} 
(I.e. we color the boundary components of $M$ in two colors -- ``in'' and ``out''.)
We call this set of data a cobordism and denote it by $M_\mathrm{in}\cob{M} M_\mathrm{out}$. Let $X$ be a cellular decomposition of $M$ inducing decompositions $X_\mathrm{in}$, $X_\mathrm{out}$ of the in- and out-boundary, respectively.
When talking about a cobordism with a cellular decomposition, we always make the following assumption.
\begin{assumption}\label{assumption: X of product type near out-boundary}
$X$ is of product type near $M_\mathrm{out}$.
\end{assumption}
We make no assumption on the behavior of $X$ near $M_\mathrm{in}$. Then we define the dual CW complex as
$$X^\vee:=X^{\vee_+}-\left(\varkappa_\partial(X_\mathrm{out})\cup \varkappa(X_\mathrm{out})\right)$$
We think of $X$ on the l.h.s. as including the information about which boundary component is ``in'' and which is ``out''. The underlying manifold $\widetilde M$ of $X^\vee$ is $M$ with a collar at $M_\mathrm{in}$ adjoined and a collar at $M_\mathrm{out}$ removed; we also regard $\widetilde M$ as having the
in/out coloring of boundary opposite to that of $M$.\footnote{Observe that $X^\vee$ is automatically of product type near the in-boundary of $M$, i.e. near the out-boundary of $\widetilde M$.}

Note that if $\partial M=M_\mathrm{in}$, then $X^\vee=X^{\vee_+}$. If $\partial M=M_\mathrm{out}$, then $X^\vee=X^{\vee_-}$.
For the numbers of cells (= ranks of chain groups), we have
$$\mathrm{rk}\; C_k(X^\vee)=\mathrm{rk}\; C_k(X)+\mathrm{rk}\; C_k(X_\mathrm{in})-\mathrm{rk}\; C_k(X_\mathrm{out})$$
Also note that $(X^\vee)^\vee=X$, thus in this formalism taking dual is again an involution.

One has a non-degenerate intersection pairing
\begin{equation} \cdot:\quad C_k(X,X_\mathrm{out};\mathbb{Z})\otimes C_{n-k}(X^\vee,X^\vee_\mathrm{in};\mathbb{Z})\rightarrow \mathbb{Z} \label{Lefschetz for chains mixed}\end{equation}
which gives the chain isomorphism
$$C_\bullet(X,X_\mathrm{out};\mathbb{Z}),\partial\quad \xrightarrow{\sim}\quad  C^{n-\bullet}(X^\vee,X^\vee_\mathrm{in};\mathbb{Z}),d$$
and the Poincar\'e-Lefschetz duality between homology and cohomology
$$\underbrace{H_\bullet(X,X_\mathrm{out};\mathbb{Z})}_{=H_\bullet(M,M_\mathrm{out};\mathbb{Z})} \xrightarrow{\sim}  \underbrace{H^{n-\bullet}(X^\vee,X^\vee_\mathrm{in};\mathbb{Z})}_{=H^{n-\bullet}(M,M_\mathrm{in};\mathbb{Z})}$$

\section{Reminder: cellular local systems}\label{sec: reminder on cell local systems}

Let $X$ be a CW complex and $G$ a Lie group
\begin{definition}
We define a $G$-local system on $X$ as a pair $(\mathcal{E},\rho)$ consisting of a functor $\mathcal{E}$ from the
partially ordered set of cells of $X$ (by incidence)
to the category $G\rightrightarrows \ast$ with single object and with $\mathrm{Hom}(\ast,\ast)=G$, and a linear representation $\rho:\,G\rightarrow \mathrm{Aut}(V)$ with $V$ a
 finite-dimensional vector space.
\end{definition}

One can twist cellular chains of $X$ by $\mathcal{E}$ as follows. As vector spaces, we set $C_k(X,\mathcal{E})=V\otimes C_k(X;\mathbb{Z})$. Assume all cells of $X$ are oriented (in an arbitrary way). If for a $k$-cell $e$ we have $\partial e=\sum_j \epsilon_j\; e_j$ with $\epsilon_j$ coefficients of the boundary map (in case of a ball complex, $\epsilon_j\in\{\pm 1 ,0\}$), then we set
$$\partial_\mathcal{E}(v\otimes e)=\sum_j \epsilon_j\; \rho(\mathcal{E}(e>e_j)) (v)\;\;\otimes e_j$$
where $v\in V$ is an arbitrary vector.
Functoriality of $\mathcal{E}$ implies that $\partial_{\mathcal{E}}^2=0$.

Consider the dual local system $\mathcal{E}^*$ on $X$, which is the same as $\mathcal{E}$ as a functor, but accompanied with the dual vector representation, 
$\rho^*=(\rho^{-1})^T:\,G\rightarrow V^*$. Then the twisted cochains on $X$, $C^\bullet(X,\mathcal{E})$, are constructed as the dual complex to $C_\bullet(X,\mathcal{E}^*)$, i.e. $C^k(X,\mathcal{E})=(C_k(X,\mathcal{E}^*))^*$, with differential $d_\mathcal{E}$ given by the transpose of $\partial_{\mathcal{E}^*}$.

\begin{definition}
We call two local systems $\mathcal{E}$ and $\mathcal{E}'$ on $X$ equivalent, if there exists a natural transformation between them, i.e. for every cell $e\subset X$ there is a group element $g(e)\in G$, so that for any pair of cells $e'\subset e$ we have $$\mathcal{E}'(e>e')=g(e)\;\mathcal{E}(e>e')\; g(e')^{-1}$$
\end{definition}

A local system $\mathcal{E}$ induces a holonomy functor from the fundamental groupoid of $X$ to $G\rightrightarrows \ast$, by associating to a path
$$\chi=(v_0<e_1>v_1<e_2>\cdots <e_N>v_N)$$
from $v_0$ to $v_N$,
a group element
$$\mathrm{hol}_\mathcal{E}(\chi)=\mathcal{E}(e_N>v_N)^{-1}\cdot\mathcal{E}(e_{N}>v_{N-1})\cdots\mathcal{E}(e_1>v_1)^{-1}\cdot \mathcal{E}(e_1>v_0)\quad \in G$$
Picking a base point $x_0$ -- a vertex of $X$, and restricting the construction to closed paths from $x_0$ to $x_0$ along $1$-cells of $X$, we get a representation of the fundamental group $\pi_1(X,x_0)$ in $G$.

Let $M$ be a
manifold (possibly, with boundary) endowed with a principal $G$-bundle $P\rightarrow M$ with a flat connection $\nabla_P$.
Let $E=P\times_G V$ be the associated vector bundle with the corresponding flat connection $\nabla_E$. If $X$ is a cellular decomposition of $M$, one can construct a local system $E_X$ on $X$ by marking a point (barycenter) $\dot{e}$ in each cell $e$ and setting
\begin{equation} E_X(e > e')=\mathrm{hol}_{\nabla_P}(\gamma_{\dot e'\rightarrow \dot e}) \qquad \in \mathrm{Hom}(P_{\dot e'}, P_{\dot e})\simeq G \label{cell local system from flat bundle}\end{equation}
-- the parallel transport of the connection $\nabla_P$ along any path $\gamma_{\dot e'\rightarrow \dot e}$ from the barycenter $\dot e'$ to $\dot e$, staying inside the cell $e$.\footnote{Note that functoriality in this construction corresponds to flatness of $\nabla_P$. 
}
 To identify the hom-space between fibers of $P$ over $\dot e'$ and $\dot e$ with the group, we assume that $P$ is trivialized over barycenters of all cells.

The twisted cochain complex $(C^\bullet(X,E_X),d_{E_X})$ is quasi-isomorphic to $(\Omega^\bullet(M,E),d_{\nabla_E})$ -- the de Rham complex of $M$ twisted by the flat bundle $E$.

In case of a manifold without boundary, the intersection pairing (\ref{intersection pairing closed}) together with the canonical pairing $V\otimes V^*\rightarrow \mathbb{R}$ induce a non-degenerate pairing
\begin{equation} \langle,\rangle:\quad C_k(X,E_X)\otimes C_{n-k}(X^\vee,E^*_{X^\vee})\rightarrow \mathbb{R} \label{intersection pairing closed twisted}\end{equation}
Similarly, in presence of a boundary, one has versions of cellular Poincar\'e-Lefschetz pairing (\ref{Lefschetz for chains +},\ref{Lefschetz for chains -},\ref{Lefschetz for chains mixed}) with coefficients in $E_X, E^*_{X^\vee}$.

The local system $E^*_{X^\vee}$ that we need in (\ref{intersection pairing closed twisted}) can be constructed from a flat principal bundle by applying construction (\ref{cell local system from flat bundle}) to $X^\vee$ and using the dual representation $\rho^*$. Alternatively, $E_{X^\vee}$ can be constructed directly on the combinatorial level, from $E_X$, by the construction below.

\subsection{Local system on the dual cellular decomposition: a combinatorial description}\label{sec: local systems on the dual cell decomp}
The local system $E_{X^\vee}$ on the dual cellular decomposition $X^\vee$ of a closed manifold $M$ can be described combinatorially in terms of $E_X$ as follows:
\begin{equation} E_{X^\vee}\left(\,\varkappa(e')>\varkappa(e)\,\right)= E_X(e>e')^{-1}\qquad \in G \label{dual loc system}\end{equation}
for $e,e'$ any pair of incident cells of $X$.
The dual local system $E^*_{X^\vee}$ on $X^\vee$, which appears in the intersection pairing (\ref{intersection pairing closed twisted}) is same as $E_{X^\vee}$, but accompanied by the dual representation $\rho^*:\, G\rightarrow V^*$.

Note that the combinatorial definition (\ref{dual loc system}) agrees with the construction of $E_{X^\vee}$ by calculating holonomies of the original flat $G$-bundle $P$ on $M$ between barycenters of cells of $X^\vee$, as in (\ref{cell local system from flat bundle}). For this to be true it is important that the barycenters are chosen in such a way that $\dot e = e\cap \varkappa(e) = \dot{\varkappa}(e)$.

In the case of a manifold $M$ with boundary, the local system on $X^{\vee_+}$ is constructed by (\ref{dual loc system}) supplemented by definitions
\begin{multline}\label{loc system on X^vee_+}
E_{X^{\vee_+}}\left(\,\varkappa_\partial(e')>\varkappa_\partial(e)\,\right) = E_X(e>e')^{-1},\quad E_{X^{\vee_+}}\left(\,\varkappa(e')>\varkappa_\partial(e)\,\right) =  E_X(e>e')^{-1},\\ E_{X^{\vee_+}}\left(\,\varkappa(e)>\varkappa_\partial(e)\,\right) = 1
\end{multline}
for $e,e'$ cells of $X_\partial$. The third equation above can be regarded as a special case of the second, with $e'=e$.


Assuming that $X$
is of product type near the boundary, the local system on $X^{\vee_-}$ is
obtained by restricting $E_{X^{\vee_+}}$ to the CW subcomplex $X^{\vee_-}\subset X^{\vee_+}$.

Associated to the inclusion $\iota_-:\, X_\partial^\vee\hookrightarrow X^{\vee_-}$ is the pull-back map for cochains
$$ \iota_-^*:\quad  C^k(X^{\vee_-},E_{X^{\vee_-}})\rightarrow  C^k(X^\vee_\partial,E_{X^\vee_\partial}) $$
defined as
\begin{equation} v\otimes \varkappa(e)^*\mapsto \left\{ \begin{array}{ll} \rho(E_X(e> \Tilde e)^{-1})(v)\otimes\varkappa_\partial(\Tilde e)^* & \mbox{if }e\mbox{ is adjacent to }\partial M\\
0 & \mbox{otherwise}\end{array} \right. \label{iota_-^* def}\end{equation}
extended by linearity to all cochains.
Here $e$ is a $k$-cell of $X-X_\partial$; for  $e$ adjacent to the boundary, $\Tilde e= \partial e\cap \partial M$ is a single $(k-1)$-cell, since $X$ is assumed to be of product type near the boundary; $v\in V$ is an arbitrary coefficient; for $e$ a $k$-cell of $X$, $e^*\in C^k(X,\mathbb{Z})$ denotes the corresponding basis integral cochain.
Defined as above, $\iota_-^*$ is a chain map. Parallel transport by the local system appears in (\ref{iota_-^* def}) to account for the collar $M-M_-$ (i.e. because we have to move from the local system trivialized at barycenters $\dot{\varkappa}(e)\in \partial M_-$ to trivialization at barycenters $\dot{\varkappa}_\partial(\Tilde{e})\in \partial M$).

In case of the dual $X^{\vee_+}$, the pull-back to the boundary $\iota_+^*:\quad  C^k(X^{\vee_+},E_{X^{\vee_+}})\rightarrow  C^k(X^\vee_\partial,E_{X^\vee_\partial})$ is simpler:
\begin{equation} \iota_+^*:\; v\otimes (e^\vee)^* \;\mapsto\; \left\{ \begin{array}{ll}v\otimes (e^\vee)^* & \mbox{if }e^\vee=\varkappa(e_\partial)\mbox{ for }e_\partial\subset X_\partial \\
0 & \mbox{otherwise} \end{array}\right. \label{iota_+^* def}\end{equation}
Absence of the transport by local system here, as opposed to (\ref{iota_-^* def}), corresponds to the fact that we implicitly gave the local system a trivial extension to the collar $M_+-M$ in (\ref{loc system on X^vee_+}).



\begin{comment}
and then applying the natural transformation of functors $\nu$, defined as follows:\footnote{
Morally, the twist by $\nu$ corresponds to extending the support of $X^{\vee_-}$ from $M_-\subset M$ to $M$ minus an infinitesimal collar at the boundary.
}
$$\nu:\,\varkappa(e)\mapsto E_X(e>\Tilde e)^{-1}$$ if the $k$-cell $e\subset X$ is adjacent to the boundary (i.e. $e\not\subset \partial M$, but $\partial e\cap \partial M\neq \varnothing$), where $\Tilde e=\partial e\cap \partial M$ -- a single $(k-1)$-cell an the boundary, cf. Definition \ref{def: product type}. For $e$ disjoint from the boundary, we set $\nu:\varkappa(e)\mapsto 1$.
In other words, for cells $e,e'$ disjoint from the boundary, $E_{X^{\vee_-}}$ is given by (\ref{dual loc system}). If $e$ is adjacent to the boundary and $e'\subset \partial e$ is not, then
$$E_{X^{\vee_-}}(\varkappa(e')>\varkappa(e))= E_{X}(e>e')^{-1}\; E_X(e>\Tilde e) $$
If both $e$ and $e'$ are adjacent to the boundary, then
$$E_{X^{\vee_-}}(\varkappa(e')>\varkappa(e))= E_X(e'>\Tilde e')^{-1}\; E_{X}(e>e')^{-1}\; E_X(e>\Tilde e)$$
\end{comment}

\begin{remark}
Let $M=M_I\cup_\Sigma M_{II}$ be a closed manifold cut into two, as in Section \ref{sec: cutting a closed mfd}, with cellular decompositions $X=X_I\cup_{X_\Sigma} X_{II}$, and assume that $X_I$ is of product type near $X_\Sigma$. Let also $E_X$ be a local system on $X$. We can restrict $E_X$ to $X_I,X_\Sigma,X_{II}$.
Then alongside the obvious fiber product diagram for cochains on $X$:
$$
\begin{CD}
C^k(X,E_X) @>>> C^k(X_I,E_{X_I}) \\
@VVV  @VVV \\
C^k(X_{II},E_{X_{II}}) @>>> C^k(X_\Sigma,E_{X_\Sigma})
\end{CD}
$$
we have the fiber product diagram for cochains on $X^\vee$:
$$
\begin{CD}
C^k(X^\vee,E_{X^\vee}) @>>> C^k(X_I^{\vee_-},E_{X_I^{\vee_-}}) \\
@VVV  @V\iota_{I+}^*VV \\
C^k(X_{II}^{\vee_+},E_{X_{II}^{\vee_+}}) @>\iota_{II-}^*>> C^k(X_\Sigma,E_{X_\Sigma})
\end{CD}
$$
   
   
    
   
\end{remark}

For $M$ a general cobordism with a cellular decomposition $X$ and a local system $E_X$, the corresponding local system on $X^\vee$ is given by  combining the two constructions above, for $E_{X^{\vee_+}}$ (used near $M_\mathrm{in}$) and $E_{X^{\vee_-}}$ (used near $M_\mathrm{out}$); we should assume that $X$ is of product type near $M_\mathrm{out}$.

\section{Reminder: homological perturbation theory}\label{sec: HPT}
\begin{definition}
Let $C^\bullet,d$ and $C'^\bullet,d'$ be two cochain complexes of vector spaces (e.g. over $\mathbb{R}$). We define the
\emph{induction data} from $C^\bullet$ to $C'^\bullet$  as a triple of linear maps $(i,p,K)$ with
$$
i: C'^\bullet \hookrightarrow C^\bullet, \qquad p: C^\bullet\twoheadrightarrow C'^\bullet,\qquad K: C^\bullet\rightarrow C^{\bullet-1}
$$
satisfying
\begin{equation} p\,i=\mathrm{id}_{C'},\quad di=id', \quad p\,d=d'p,\quad dK+Kd=\mathrm{id}_C-ip,\quad Ki=0,\quad p\,K=0,\quad K^2=0 \label{ind data equations}\end{equation}
\end{definition}

Induction data exist iff $i: C'\rightarrow C$ is a subcomplex such that $i_*$ is the identity in cohomology (i.e. $C'$ is a {\it deformation retract} of $C$).

We will use the notation
\begin{equation}\label{retraction} C^\bullet,d \wavy{(i,p,K)} C'^\bullet,d' \end{equation} for
induction data. We will also sometimes call the whole collection of data - a pair of complexes and the induction data between them - a {\it retraction}.

\begin{lemma}[Homological perturbation lemma \cite{GugenheimLambe}]\label{lemma: homological perturbation}
If $(i,p,K)$ are induction data from $C^\bullet,d$ to $C'^\bullet, d'$ and $\delta: C^\bullet\rightarrow C^{\bullet+1}$ is such that $(d+\delta)^2=0$, then the complex
$$C'^\bullet, d'+p\;(\delta-\delta K \delta+ \delta K \delta K \delta-\cdots)\;i $$
is a deformation retract of $C^\bullet, d+\delta$, with induction data given by
$$(i-K \delta i+K\delta K\delta i-\cdots ,\quad p-p\,\delta K+p\,\delta K \delta K-\cdots,\quad K - K\delta K+K\delta K\delta K-\cdots )$$
assuming all the series above converge.
\end{lemma}
\noindent For the proof, see e.g. \cite{GKR}.

Given induction data $(i,p,K)$, we have a splitting of $C$ into the image of $C'$ and an acyclic complement $C''=\ker p$:
$$C^\bullet=i(C'^\bullet)\oplus \underbrace{C''^\bullet}_{\ker p}$$
The second term can be in turn represented as a sum of images of $d$ and $K$. Putting these splittings together, we have a
(formal) {\it Hodge decomposition}
\begin{equation} C^\bullet=i(C'^\bullet)\oplus \underbrace{(\ker p\cap d(C^{\bullet-1}))\oplus K(C^{\bullet+1})}_{C''^\bullet} \label{HPT: Hodge decomp}\end{equation}

An important special case is when $C'^\bullet=H^\bullet(C)$ -- the cohomology of $C^\bullet$. Then, in addition to the axioms above, for the induction data from $C^\bullet$ to $H^\bullet(C)$ we require the following to hold.
\begin{assumption} \label{assumption on p}
The projection $p$ restricted to closed cochains $\ker d\subset C^\bullet$ agrees with the canonical projection associating to a closed cochain its cohomology class.
\end{assumption}
In this case the Hodge decomposition (\ref{HPT: Hodge decomp}) becomes
$$C^\bullet = i(H^\bullet)\oplus C^\bullet_\mathrm{exact}\oplus \underbrace{C^\bullet_{K\mathrm{-exact}}}_{\mathrm{im}(K)}$$
with the differential now being an isomorphism $d: C^\bullet_{K\mathrm{-exact}}\xrightarrow{\sim} C^{\bullet+1}_\mathrm{exact}$ and vanishing on the first two terms of the decomposition.

\subsection{Composition of induction data}
Two retractions
$$C^\bullet_{(0)},d_{(0)} \wavy{(i_{01},p_{01},K_{01})} C^\bullet_{(1)},d_{(1)},\qquad  C^\bullet_{(1)},d_{(1)} \wavy{(i_{12},p_{12},K_{12})} C^\bullet_{(2)},d_{(2)}$$
can be composed as follows:
$$ C^\bullet_{(0)},d_{(0)}
\wavy{(i_{02},p_{02},K_{02})}
C^\bullet_{(2)},d_{(2)} $$
with composed induction data
\begin{equation} (i_{02}=i_{01} i_{12},\; p_{02}= p_{12} p_{01},\; K_{02}=K_{01}+i_{01} K_{12} p_{01} ) \label{composition of ind data}\end{equation}

\subsection{Induction data for the dual complex and for the algebra of polynomial functions}
\label{sec: induction data for dual and sym}
For $C^\bullet,d$ a cochain complex, we can construct its dual -- the complex of dual vector spaces $C^{*\;k}=\mathrm{Hom}(C^{n-k},\mathbb{R})$ endowed with the transpose differential
$(d^*)_k=(-1)^{n-k-1}(d_{n-k-1})^T: C^{*\; k}\rightarrow C^{*\; k+1}$.\footnote{Having in mind Poincar\'e duality, we are incorporating the degree shift by $n$ in the definition of the dual (which is superfluous in purely algebraic setting). In our setup, the canonical pairing $\langle,\rangle: C^{*\;k}\otimes C^{n-k}\rightarrow \mathbb{R}$ has degree $-n$.}

If $(i,p,K)$ are induction data from $C,d$ to $C',d'$, then we have the {\it dual induction data}
$C^*\wavy{(i^*,p^*,K^*)}C'^*$
given by
\begin{equation} (i^*=p^T,\quad p^*=i^T,\quad (K^*)_k=(-1)^k (K_{n-k+1})^T) \label{dual ind data}\end{equation}


Given a finite set of retractions
\begin{equation} C_{j}^\bullet\wavy{(i_j,p_j,K_j)}C'^\bullet_j \label{C_j retraction}\end{equation}
for $1\leq j\leq r$, one can construct the induction data for the tensor product $\bigotimes_j C_j\wavy{(i^\otimes,p^\otimes,K^\otimes)} \bigotimes_j C'_j$ where
$$i^\otimes = \bigotimes_j i_j,\quad p^\otimes = \bigotimes_j p_j,\quad K^\otimes=\sum_j (i_1 p_1)\otimes\cdots\otimes (i_{j-1} p_{j-1})\otimes  K_j\otimes \mathrm{id}_{j+1}\otimes \cdots\otimes \mathrm{id}_{r}$$
The construction of $K^\otimes$ above corresponds to the composition of a sequence of retractions
$$\bigotimes_{j=1}^r C_j\wavy{}C'_1\otimes\bigotimes_{j=2}^r C_j\wavy{}C'_1\otimes C'_2\otimes\bigotimes_{j=3}^r C_j\wavy{}\cdots  \wavy{}\bigotimes_{j=1}^r C'_j$$
where on each step we use the data (\ref{C_j retraction}) tensored with the identity on the other factors.
One can choose instead to perform the retractions $C_j\wavy{}C'_j$ in a different order, given by a permutation $\sigma$ of $\{1,2,\ldots,r\}$, which yields another formula for $K^\otimes$, depending on the permutation $\sigma$.
Symmetrization over permutations $\sigma$ leads us to the next construction -- retraction between symmetric algebras. In the setting of the present work, we are more interested in the symmetric algebra of dual complexes.

The symmetric algebra of the dual complex $\mathrm{Sym}\, C^*$ is naturally a differential graded commutative algebra and can be seen as the algebra of polynomial functions on $C$. Induction data from $\mathrm{Sym}\, C^*$ to $\mathrm{Sym}\, C'^*$
can be constructed as follows:
\begin{equation}\label{HPT Sym}
i_\mathrm{Sym}\, = p^*,\quad p_\mathrm{Sym}\,=i^*, \quad K_\mathrm{Sym}\,=\int_0^1 ((1-t)+t\, ip+dt\, K)^* 
\end{equation}
Here asterisks stand for pullbacks.
The expression for $K_\mathrm{Sym}\,$ can be understood in terms of the diagram
$$
\begin{CD}
T[1] [0,1]\times C @>{\lambda=(1-t)+t\, ip+dt\, K}>> C  \\
@V\pi_2 VV \\
C
\end{CD}
$$
where $T[1][0,1]$ is the odd tangent bundle of the interval, with even coordinate $t$ and odd tangent coordinate $dt$. Map $\lambda$ has total degree $0$. Now $K_\mathrm{Sym}\,$ can be defined as a transgression
$$K_\mathrm{Sym}\,=(\pi_2)_* \lambda^*:\quad \mathrm{Sym}\, C^* \rightarrow \mathrm{Sym}\, C^*$$

Same formulae can be used for more general classes of functions than polynomials (e.g. smooth functions) on $C$, $C'$.

\subsection{Deformations of induction data}\label{sec: deformations of ind data}
Given a retraction $C^\bullet,d\wavy{(i,p,K)}C'^\bullet,d'$, one can analyze the possible infinitesimal deformations of the induction data $(i,p,K)$, as solutions of the system (\ref{ind data equations}). It turns out (see e.g. \cite{DiscrBF,CSinvar}) that a general infinitesimal deformation $(i,p,K)\mapsto (i+\delta i, p+\delta p, K+\delta K)$ is a sum of the following deformations.
\begin{enumerate}[(I)]
\item \label{HPT deform I} Deformation of $K$, not changing $i$ and $p$:
\begin{equation} \delta i=\delta p=0,\quad \delta K=d\Lambda-\Lambda d\label{ind data deformation I}\end{equation}
with generator $\Lambda:C''^\bullet_{\mathrm{exact}}\rightarrow C''^{\bullet-2}_{K-\mathrm{exact}}$, extended by zero to the first and third terms of the Hodge decomposition (\ref{HPT: Hodge decomp}).
\item \label{HPT deform II} Deformation of $i$, not changing $p$, and changing $K$ in the ``minimal'' way:
\begin{equation} \delta i=dI+Id',\quad \delta p=0,\quad \delta K=-I\; p\label{ind data deformation II}\end{equation}
with $I: C'^\bullet\rightarrow C''^{\bullet-1}_{K-\mathrm{exact}}$.
\item \label{HPT deform III} Deformation of $p$, not changing $i$, and changing $K$ in the ``minimal'' way:
\begin{equation} \delta i=0,\quad \delta p=d'P+Pd,\quad \delta K=-i\; P  \label{ind data deformation III}\end{equation}
with $P: C''^\bullet_\mathrm{exact}\rightarrow C'^{\bullet-1}$, extended by zero as in (\ref{HPT deform I}).
\item \label{HPT deform IV} Deformation, induced by an (infinitesimal) automorphism of $C',d$:
\begin{equation} \delta i=i\; \chi,\quad \delta p=-\chi\; p,\quad \delta K=0  \label{ind data deformation IV}\end{equation}
with $\chi:C'^\bullet\rightarrow C'^\bullet$ a chain map.
\end{enumerate}

In other words, if $\mathfrak{I}$ is the space of all induction data $C\wavy{} C'$, then the tangent space to $\mathfrak{I}$ at a point $(i,p,K)$ splits as a direct sum of four subspaces described by (\ref{ind data deformation I}--\ref{ind data deformation IV}):
$$T_{(i,p,K)}\mathfrak{I}=T_{(i,p,K)}^I\mathfrak{I}\oplus T_{(i,p,K)}^{II}\mathfrak{I}\oplus T_{(i,p,K)}^{III}\mathfrak{I}\oplus T_{(i,p,K)}^{IV}\mathfrak{I}$$

Note that in case of retraction to cohomology, $C^\bullet\wavy{}H^\bullet(C)$, deformations (\ref{ind data deformation IV}) are prohibited by Assumption \ref{assumption on p}.

Generally, the space of choices $\mathfrak{I}$ is homotopic to $\mathrm{Aut}(C'^\bullet,d')$. If we demand that the retraction induces a {\it fixed} isomorphism in cohomology $p_*=(i^*)^{-1}: H^\bullet(C)\rightarrow H^\bullet(C')$, the corresponding ``marked'' space of induction data $\mathfrak{I}^\mathrm{marked}$ is {\it contractible}


\section{Cellular abelian $BF$ theory on a closed manifold}\label{sec: closed}
\subsection{Classical theory in BV formalism}\label{sec: classical closed}
In this section we introduce the BV theory for the case at hand. This means an odd (degree $-1$) graded symplectic space together with an even
(degree $0$) function $S$ that Poisson commutes with itself. Such a function is usually called the BV action and the condition
$\{S,S\}=0$
 is called the classical master equation. In addition, we define the second order differential operator $\Delta$, called the BV Laplacian, that generates the Poisson bracket as the defect of the Leibniz identity and we show that the BV action also satisfies the quantum master equation 
 $\frac{1}{2} \{S,S\}-i\hbar \Delta S =0 $, where $\hbar$ is a parameter. The ``Planck constant'' $\hbar$ can be interpreted as the distance from the classical theory (or the strength of quantization). If $\hbar$ is a nonzero real number, instead of a formal parameter, the quantum master equation may also be equivalently written as $\Delta e^{\frac i\hbar S}=0$.

Let $M$ be a closed oriented
piecewise-linear
$n$-manifold and $X$ a cellular decomposition of $M$.

\begin{comment}
Let also $E$ be a rank $m$ vector bundle over $M$ with positive definite inner product $(,)_E$ in fibers and with a flat connection $\nabla_E$ preserving the inner product. One can view $E$ as the associated vector bundle $P\times_{O(m)} \mathbb{R}^m$ for some principal flat $O(m)$-bundle $P$. By abuse of notations, let $E$ also stand for the corresponding $O(m)$-local system on $X$.
\end{comment}

Let also $E$ be a rank $m$ vector bundle over $M$ endowed with a fiberwise density $\mu_E$ and with a flat connection $\nabla_E$, such that the parallel transport by $\nabla_E$ preserves the density. One can view $E$ as the associated vector bundle $P\times_{G} \mathbb{R}^m$ for some principal flat $G$-bundle $P$ with $G=SL_\pm (m,\mathbb{R})$ the group of $m\times m$ real matrices with determinant $1$ or $-1$.\footnote{A special case of this situation is a flat {\it Euclidean} vector bundle, i.e. with fiberwise scalar product $(,)_E$ and a flat connection preserving it. In this case the structure group reduces to $O(m)\subset SL_\pm(m)$.} By abuse of notations, let $E$ also stand for the corresponding $SL_\pm(m)$-local system on $X$ (i.e. we will suppress the subscripts in $E_X$ and $E^*_{X^\vee}$).


The space of fields is a $\mathbb{Z}$-graded vector space $\mathcal{F}^\bullet$, with degree $k$ component given by
\begin{equation} \mathcal{F}^k=C^{k+1}(X,E)\oplus C^{k+n-2}(X^\vee,E^*) \label{cell BF fields}\end{equation}
It is concentrated in degrees
$k\in \{-1,\ldots,n-1\}\cup \{2-n,\ldots,2\}$ and is
equipped with a degree $-1$ constant symplectic structure (the BV 2-form)
\begin{equation} \omega:\quad \mathcal{F}^k\otimes \mathcal{F}^{1-k}\rightarrow \mathbb{R} \label{omega}\end{equation}
coming from the intersection pairing, see (\ref{omega = <delta B,delta A>}) below.

Introduce the {\it superfields} -- the shifted identity maps pre-composed with projections from $\mathcal{F}$ to the two terms in the r.h.s. of (\ref{cell BF fields}):$$A:\quad \mathcal{F}\rightarrow  C^\bullet(X,E)[1] \rightarrow C^\bullet(X,E),\qquad  B:\quad \mathcal{F}\rightarrow  C^\bullet(X^\vee,E^*)[n-2] \rightarrow C^\bullet(X^\vee,E^*)$$
One can also regard
$A$ and $B$ as coordinate functions on $\mathcal{F}$ taking values in cochains of $X$ and $X^\vee$, respectively, so that the pair $(A,B)$ is a {\it universal} coordinate on $\mathcal{F}$ (i.e. a complete coordinate system).


We write $A=\sum_{e\subset X} e^* A_e$ -- sum over cells of $X$ of ``local'' superfields $A_e:\mathcal{F}\rightarrow E_{\dot e}$, taking values in the fiber of the local system over the barycenter $\dot e$ of the corresponding cell; $e^*\in C^\bullet(X,\mathbb{Z})$ stands for the standard basis integral cochain associated to the cell $e$. Similarly, for the second superfield one has $B=\sum_{e^\vee\subset X^\vee}  B_{e^\vee} (e^\vee)^*$, with local components $B_{e^\vee}:\mathcal{F}\rightarrow E^*_{\dot e^\vee}$. (Note that our  convention for ordering the cochain and the superfield component is different between superfields $A$ and $B$.) Internal degrees of field components are $|A_e|=1-\dim e$, $|B_{e^\vee}|=n-2-\dim e^\vee$; in particular, the \emph{total degree} (cellular cochain degree + internal degree) for the superfield $A$ is $1$ and for $B$ is $(n-2)$.

In terms of superfields, the symplectic form (\ref{omega}) is defined as
\begin{equation} \omega= \langle \delta B, \delta A \rangle\quad \in \Omega^2(\mathcal{F})_{-1} \label{omega = <delta B,delta A>}\end{equation}
where $\delta$ is the de Rham differential on the space of fields
and
$\langle,\rangle: C^{n-\bullet}(X^\vee,E^*)\otimes C^\bullet(X,E)\rightarrow \mathbb{R}$ is the inverse of the intersection pairing (\ref{intersection pairing closed twisted}) for chains.\footnote{
We will use the sign convention where the graded binary operation $\langle,\rangle$ is understood as taking a cochain on $X^\vee$ from the left side and a cochain on $X$ from the right side. In other words, the mnemonic rule is that, for the sake of Koszul signs, the {\it comma} separating the inputs in $\langle b,a\rangle$ carries degree $-n$. This pairing is related to the one which operates from the left on two inputs coming from the right by $\langle b,a \rangle=(-1)^{n\deg b}\langle b,a \rangle'$.
}
The symplectic form $\omega$ induces the degree $+1$ Poisson bracket $\{,\}$ and the BV Laplacian\footnote{\label{footnote: Delta_can vs Delta} Recall that, generally, to define the BV Laplacian on {\it functions} (as opposed to half-densities) on an odd-symplectic manifold $\mathcal{M}$, one needs a volume element on $\mathcal{M}$ \cite{SchwarzBV}. In our case, the space of fields is linear, and so possesses a canonical (constant) volume element determined up to normalization. Since the BV Laplacian is not sensitive to rescaling the volume element by a constant factor, we have a preferred BV Laplacian.} $\Delta=\left\langle\frac{\partial}{\partial A},\frac{\partial}{\partial B}\right\rangle$ on the appropriate space of functions on $\mathcal{F}$ which we denote by $\mathrm{C}^\infty(\mathcal{F})$. For the purpose of this paper we choose $\mathrm{C}^\infty(\mathcal{F})=\widehat{\mathrm{Sym}\,^\bullet}\mathcal{F}^*$ -- the algebra of polynomial functions on $\mathcal{F}$ completed to formal power series.\footnote{In the context of classical abelian $BF$ theory we could instead work with smooth functions on $\mathcal{F}$.}

\begin{remark}\label{rem: closed non-orientable case}
We can allow $M$ to be non-orientable as in Remark \ref{rem: orientability}: we twist the $B$-superfield by the orientation local system $\mathrm{Or}$ (which superfield to twist is an arbitrary choice). I.e. the space of fields becomes $\mathcal{F}=C^\bullet(X,E)[1]\oplus C^\bullet(X^\vee,E^*\otimes \mathrm{Or})[n-2]$ and the intersection pairing depends on a choice of primitive top class $\sigma\in H_n(M,\mathrm{Or})$.
\end{remark}

The BV action of the model is
\begin{equation} S=\langle B , dA \rangle \quad \in \mathrm{C}^\infty(\mathcal{F})_0 \label{S}\end{equation}
where $d$ is the
coboundary operator in $C^\bullet(X,E)$ twisted by the local system.
It satisfies the classical master equation
$$\{S,S\}=0$$
Indeed, the left hand side is $\{S,S\}=2\langle B, d^2 A\rangle=0$. Moreover, one has $\Delta S=\mathrm{Str}_{C^\bullet(X,E)} d=0$ (the supertrace of the coboundary operator vanishes since $d$ changes degree). This implies that the quantum master equation is also satisfied:
\begin{equation} \Delta e^{\frac{i}{\hbar} S}=0 \quad \Leftrightarrow \quad \frac{1}{2} \{S,S\}-i\hbar \Delta S =0 \label{QME}\end{equation}

The Hamiltonian vector field corresponding to $S$ is the degree $+1$ linear map
$d_X+ d_{X^\vee}: \mathcal{F}\rightarrow \mathcal{F}$
dualized to a map $\mathcal{F}^*\rightarrow \mathcal{F}^*$ and extended to $\mathrm{C}^\infty(\mathcal{F})$ as a derivation:
$$Q=\{S,\bullet\}=\langle dA,\frac{\partial}{\partial A} \rangle+ \langle dB,\frac{\partial}{\partial B} \rangle$$

The Euler-Lagrange 
equations\footnote{The Euler--Lagrange equations describe the critical locus of $S$ or, equivalently, the zero locus of $Q$.
}
for (\ref{S}) read $dA=0$, $dB=0$. The space of solutions
$$\mathcal{EL}=C^\bullet_\mathrm{closed}(X,E)[1]\oplus C^\bullet_\mathrm{closed}(X^\vee,E^*)[n-2]\qquad \subset \mathcal{F}$$
is coisotropic in $\mathcal{F}$ and its reduction
$$\underline \mathcal{EL}= H^\bullet(X,E)[1]\oplus H^\bullet(X^\vee,E^*)[n-2]\quad = H^\bullet(M,E)[1]\oplus H^\bullet(M,E^*)[n-2]$$
 is independent of the cellular decomposition $X$. We will use it as the space of {\it {residual fields}} for quantization (in the sense that the partition function will be defined using the framework of effective BV actions, as a fiber BV integral over the space of fields as fibered over {residual fields}, cf. \cite{DiscrBF,CSinvar,1DCS,CMRpert}).

\subsection{Quantization}\label{sec: quantization closed}
Our goal in this section is to construct the
 partition function $Z$ for cellular abelian $BF$ theory on a closed manifold $M$ with cell decomposition $X$, such that $Z$ is invariant under subdivisions of $X$. The
 partition function will be constructed as a half-density
 on the space of residual fields\ $\underline \mathcal{EL}$ via a finite-dimensional  fiber BV integral.

Recall that, for a
finite dimensional graded vector space $W^\bullet$,
one can define the {\it determinant line}
$$\mathrm{Det}\;W^\bullet :=  \bigotimes_{k} \left(\wedge^{\dim W^k} W^k\right)^{(-1)^k} $$
where for $L$ a line (i.e. a $1$-dimensional vector space), $L^{-1}$ denotes the dual line $L^*$. If furthermore $W^\bullet$ is based, with $w^k=(w^k_1,\ldots,w^k_{N_k})$ a basis in $W^k$, then one has an associated element
\begin{equation}\mu=\left(\bigotimes_{k\;\mathrm{even}}w^k_1\wedge\cdots \wedge w^k_{N_k}\right)\otimes \left(\bigotimes_{k\;\mathrm{odd}}(w^k_1)^*\wedge\cdots \wedge (w^k_{N_k})^*\right)\quad \in \mathrm{Det}\; W^\bullet \label{coord density}\end{equation}
where $(w^k)^*$ is the basis in $(W^*)^{-k}=(W^k)^*$ dual to $w^k$.

Tensoring the cellular basis in $C^k(X;\mathbb{Z})$ with
the standard  basis in $\mathbb{R}^m$ (or any {\it unimodular} basis, i.e. one on which the standard density on $\mathbb{R}^m$ evaluates to $1$),
we obtain a preferred basis in $C^\bullet(X,E)$. Associated to it by the construction above is an element
$\mu_C \in \mathrm{Det}\;C^\bullet(X,E)$ (well-defined modulo sign).

Passing to densities (for more details see Appendix \ref{AA} and \cite{MnevTorsions}), we have a canonical isomorphism
\begin{equation}\mathrm{Det}\; C^\bullet(X,E)\;/\{\pm 1\} \cong \mathrm{Dens}\;  C^\bullet(X,E)[1]
\xrightarrow{(\ast)^{\otimes 2}}
\mathrm{Dens}\;\mathcal{F}
\xrightarrow{\sqrt{\ast}}
\mathrm{Dens}^{\frac{1}{2}}\mathcal{F}  \label{det-dens}\end{equation}
where on the r.h.s. we have half-densities on $\mathcal{F}$.
The middle isomorphism comes from the fact that, for $W^\bullet$ a graded vector space,
\begin{equation}\mathrm{Det}\; (W\oplus W^*[-1])\cong (\mathrm{Det}\; W)^{\otimes 2}\label{Det(W+W^*)}\end{equation}
Denote by $\mu_\mathcal{F}^{1/2}\in \mathrm{Dens}^{\frac{1}{2}}\mathcal{F}$ the image of $\mu_C$ under the isomorphism (\ref{det-dens}).\footnote{The superscript in $\mu_\mathcal{F}^{1/2}$ stands for both the weight of the density and for the square root.}

One can combine the action $S$ with $\mu_\mathcal{F}^{1/2}$ into
a (coordinate-dependent) half-density $e^{\frac{i}{\hbar}S}\mu_\mathcal{F}^{1/2}
$ which, as a consequence of (\ref{QME}), satisfies the equation
$$\Delta_\mathrm{can}(e^{\frac{i}{\hbar}S}\mu_\mathcal{F}^{1/2} )=0$$
where $\Delta_\mathrm{can}$ is the canonical BV Laplacian on half-densities \cite{Khudaverdian,Severa}.\footnote{The canonical BV Laplacian is related to the BV Laplacian $\Delta=\Delta_{\mu_\mathcal{F}}$ on functions
by $\Delta_\mathrm{can} (f\, \mu_\mathcal{F}^{1/2})=\Delta(f)\,\mu_\mathcal{F}^{1/2}$, where $f\in \mathrm{C}^\infty(\mathcal{F})$.}

\subsubsection{Gauge fixing, perturbative partition function}
Choose representatives of cohomology classes $\mathbf{i}:H^\bullet(M,E)\hookrightarrow C^\bullet_\mathrm{closed}(X,E
$
and a right-splitting $\mathbf{K}: C^\bullet_\mathrm{exact}(X,E)\rightarrow C^{\bullet-1}(X,E)$ of the short exact sequence
$$C^\bullet_\mathrm{closed}(X,E)\rightarrow C^\bullet(X,E)\xrightarrow{d} C^{\bullet+1}_\mathrm{exact}(X,E)$$
Thus we have a Hodge decomposition
\begin{equation} C^\bullet(X,E)=\underbrace{\mathbf{i}(H^\bullet(M,E))\oplus C^\bullet_\mathrm{exact}(X,E)}_{C^\bullet_\mathrm{closed}(X,E)}\oplus
\;\mathrm{im}(\mathbf{K})
\label{Hodge decomp closed case}\end{equation}
We extend the domain of $\mathbf{K}$ to the whole of $C^\bullet(X,E)$ by defining it to be zero on the first and third terms of (\ref{Hodge decomp closed case}).

Hodge decomposition (\ref{Hodge decomp closed case}) together with the dual decomposition\footnote{Here the second term on the r.h.s. is nondegenerately paired to the third term on the r.h.s. of (\ref{Hodge decomp closed case}) by Poincar\'e duality and vice versa; the first terms are paired between themselves. The map $\mathbf{K}^\vee_k: C^k(X^\vee,E^*)\rightarrow C^{k-1}(X^\vee,E^*)$ is defined as the dual (transpose) of $\mathbf{K}_{n-k+1}: C^{n-k+1}(X,E)\rightarrow C^{n-k}(X,E)$, up to the sign $(-1)^{n-k}$.}
\begin{equation} C^\bullet(X^\vee,E^*)=\mathbf{i}^\vee(H^\bullet(M,E^*))\oplus C^\bullet_\mathrm{exact}(X^\vee,E^*)\oplus \mathrm{im}(\mathbf{K}^\vee)\label{dual Hodge decomp, closed}\end{equation}
gives the symplectic splitting
$$\mathcal{F}=\mathbf{i}(\underline\mathcal{EL})\oplus \mathcal{F}_\mathrm{fluct}$$
and produces the Lagrangian subspace $\mathcal{L}=\mathrm{im}(\mathbf{K})[1]\oplus \mathrm{im}(\mathbf{K}^\vee)[n-2]\subset \mathcal{F}_\mathrm{fluct}$.

For half-densities on $\mathcal{F}$, we have
$$\mathrm{Dens}^{\frac12}\mathcal{F}\cong \mathrm{Dens}^{\frac12}\underline\mathcal{EL}\;\otimes\;\underbrace{\mathrm{Dens}^{\frac12}\mathcal{F}_\mathrm{fluct}}_{\cong \mathrm{Dens}\;\mathcal{L}}$$
We are using the general fact \cite{Manin} that, for a Lagrangian subspace of an odd-symplectic space $L\subset V$, one has a canonical isomorphism $\mathrm{Dens}^{\frac12}V\rightarrow \mathrm{Dens}\, L$ arising from (\ref{Det(W+W^*)}).

\begin{remark}
We are free to rescale the  reference half-density $\mu_\mathcal{F}^{1/2}$ on fields by a factor  $\xi_\hbar$. The requirement of having the partition function invariant under subdivisions of $X$ can be achieved, as we will see in Section \ref{sec: normalization},  by introducing such a  factor $\xi_\hbar\in \mathbb{C}$, which
is a certain {\it extensive}\footnote{I.e. a product over cells of $X$ of certain universal elementary factors, depending only on the dimension of the cell, see Lemma \ref{lemma: zeta = xi/xi} below.} product of powers of $i$, $\hbar$ and $2\pi$.
\end{remark}

According to the BV quantization scheme, the gauge-fixed partition function on $X$ is defined as
the fiber BV integral\footnote{See \cite[Section 2.2.2]{CMRpert} for details on fiber BV integrals.}
\begin{multline}\label{Z fiber BV}
Z(X,E)=\int_\mathcal{L} e^{\frac{i}{\hbar}S(\mathbf{i}(A_\mathrm{res})+A_\mathrm{fluct},\mathbf{i}^\vee(B_\mathrm{res})+B_\mathrm{fluct})} \;\xi_\hbar\; \mu_\mathcal{F}^{1/2}
= \\ =\int_\mathcal{L} e^{\frac{i}{\hbar}S(A_\mathrm{fluct},B_\mathrm{fluct})}\;\xi_\hbar\;\mu_\mathcal{F}^{1/2}
\qquad
\in \mathbb{C}\otimes \mathrm{Dens}^{\frac12}(\underline{\mathcal{EL}})\cong \mathbb{C}\otimes \mathrm{Det}\; H^\bullet(M,E)\;/\{\pm 1\}
\end{multline}
where $A_\mathrm{res},B_\mathrm{res}$ are the superfields for $\underline{\mathcal{EL}}$ and $A_\mathrm{fluct},B_\mathrm{fluct}$ are the superfields for $\mathcal{F}_\mathrm{fluct}$. By BV-Stokes' theorem for fiber BV integrals, the value of the integral is independent of the choice of $\mathbf{i},\mathbf{K}$.
A special feature of the model at hand is that the value of the integral is a constant (coordinate-independent) half-density. 


\begin{remark}
A Berezin measure $\mathfrak{m}$ on a superspace $V=(V^\mathrm{even},V^\mathrm{odd})$ is not exactly the same as a density $\mu$ on $V$.
Indeed, for a parity-preserving automorphism of $V$, $g=\left(\begin{array}{cc} g^{even} & 0 \\ 0 & g^\mathrm{odd} \end{array}\right)$, with $g^\mathrm{even}\in GL(V^\mathrm{even})$, $g^\mathrm{odd}\in GL(V^\mathrm{odd})$, the Berezin integral behaves as
$$\int_V \mathfrak{m}\cdot f=\int_V \underbrace{|\det g^\mathrm{even}|\cdot (\det g^\mathrm{odd})^{-1}\;\mathfrak{m}}_{=:(g^{-1})_*\mathfrak{m}}\cdot g^*f$$
for $f\in \mathrm{C}^\infty(V)$ an integrable
function. On the other hand, a density on $V$ transforms as
$$\mu\mapsto |\det g^\mathrm{even}|\cdot |\det g^\mathrm{odd}|^{-1}\;\mu$$
(see Appendix \ref{appendix: det lines, densities, torsion}). Thus, a Berezin measure changes its sign when acted on by an automorphism which changes the orientation of $V^\mathrm{odd}$, whereas a density does not. In this work we are calculating partition functions modulo signs,
so we can identify Berezin measures with densities.
\end{remark}

Integral (\ref{Z fiber BV}) is a conditionally convergent\footnote{Convergence is due to the fact that, by construction, the point $(A,B)=0$ is an isolated critical point of the action $S$ restricted to $\mathcal{L}$.} Gaussian integral over a  finite dimensional superspace; we will show in Section \ref{sec: normalization}, Proposition \ref{prop: Z closed}, that its value
is
\begin{equation} Z(X,E)=\xi_\hbar^{H^\bullet}\tau(X,E) \label{Z=tau}\end{equation}
where $\tau(X,E)$ is the Reidemeister torsion (or, equivalently, ``$R$-torsion'', see, e.g. \cite{Milnor66, Turaev}) of the CW-complex $X$ with local system $E$ and the coefficient $\xi_\hbar^{H^\bullet}\in\mathbb{C}$ depends only on Betti numbers.
Note that the $R$-torsion for a non-acyclic local system is indeed an element of $\mathrm{Det}\; H^\bullet(M,E)\;/\{\pm 1\}$, not a number. By the combinatorial invariance property of the $R$-torsion, the partition function (\ref{Z fiber BV}) depends only on the manifold $M$ and the local system $E$, but not on a particular cellular decomposition $X$.

In the special case of an acyclic local system, $H^\bullet(M,E)=0$, the determinant line $\mathrm{Det}\;H^\bullet\cong \mathbb{R}$ is the trivial line and the partition function (\ref{Z fiber BV}) is an actual number, defined modulo sign.

Result (\ref{Z=tau}) can be viewed as a combinatorial version, generalized to possibly non-acyclic local systems, of the result of \cite{Schwarz79}, where analytic torsion was interpreted as a functional BV integral for abelian $BF$ theory.


\subsubsection{The propagator}
\label{rem: propagator, closed case}
Denote by $p_1, p_2$ the cellular projections from the product CW-complex $X\times X^\vee$ (a cellular decomposition of $M\times M$) to the first and second factor, respectively.
Let $\mathbb{K}\in C^{n-1}(X\times X^\vee,p_1^* E\otimes p_2^* E^*)$ be the {\it parametrix} for the operator $\mathbf{K}$, i.e. the image of $\mathbf{K}$ under the isomorphism
$$\underbrace{\mathrm{End}(C^\bullet(X,E))_{-1}}_{\ni\;\; \mathbf{K}}\simeq \bigoplus_{k=0}^{n-1} C^k(X,E)\otimes C^{n-k-1}(X^\vee,E^*) \simeq \underbrace{C^{n-1}(X\times X^\vee,p_1^* E\otimes p_2^* E^*)}_{\ni\;\; \mathbb{K}} $$
Here in the first isomorphism we use the Poincar\'e duality to identify $C^{n-k-1}(X^\vee,E^*)$ with the dual of $C^{k+1}(X,E)$. Then $\mathbb{K}$ is the propagator of the theory, i.e. (up to a factor of $i\hbar$) the normalized expectation value of the product of evaluations of fluctuations of fields at two cells:
\begin{multline} i\hbar\, \mathbb{K}(e,e^\vee)= \ll A_\mathrm{fluct}(e)\cdot B_\mathrm{fluct}(e^\vee)\gg:= \\ 
=\frac{1}{Z}\int_\mathcal{L} e^{\frac{i}{\hbar}S(A,B)} A_\mathrm{fluct}(e)\cdot B_\mathrm{fluct}(e^\vee)\; \xi_\hbar \mu_\mathcal{F}^{1/2}\quad \in E_{\dot e}\otimes E^*_{\dot e^\vee} 
\label{propagator}\end{multline}
Here $e\subset X$, $e^\vee\subset X^\vee$ are two arbitrary cells; $E_{\dot e}$, $E^*_{\dot e^\vee}$ are the fibers of $E$, $E^*$ over the corresponding barycenters; $A_\mathrm{fluct}(e): \mathcal{F}_\mathrm{fluct}\rightarrow E_{\dot e}$ and $B_\mathrm{fluct}(e^\vee): \mathcal{F}_\mathrm{fluct}\rightarrow E^*_{\dot e^\vee}$ are the fluctuations of fields evaluated at the cells $e,e^\vee$. Propagator (\ref{propagator}) between two cells vanishes unless the relation $\dim e+\dim e^\vee=n-1$ holds.
Let furthermore $[h_\alpha]$ be a basis in cohomology $H^\bullet(M,E)$, $[h^\vee_\alpha]$ the corresponding dual basis in $H^{n-\bullet}(M,E^*)$, and let $\chi_\alpha=\mathbf{i} [h_\alpha]$, $\chi^\vee_\alpha=\mathbf{i}^\vee [h^\vee_\alpha]$ be the representatives of cohomology in cochains. Then, due to the equations (\ref{ind data equations}) satisfied by $\mathbf{K}$, we have the following  equations satisfied by the the parametrix:
\begin{multline}\label{propagator equations}
d_{X\times X^\vee} \mathbb{K} = \sum_{e\subset X} e^*\otimes \varkappa(e)^*\otimes\mathbf{1}-\sum_\alpha \chi_\alpha\otimes \chi^\vee_\alpha, \\
\sum_{e'\subset X}\mathbb{K}(e,\varkappa(e'))\cdot \chi_\alpha(e') = 0,\quad
\sum_{e'\subset X}\chi^\vee_\alpha(\varkappa(e'))\cdot\mathbb{K}(e',e^\vee) = 0, \quad
\sum_{e'\subset X}\mathbb{K}(e,\varkappa(e'))\cdot\mathbb{K}(e',e^\vee) = 0
\end{multline}
Here $\mathbf{1}\in E_{\dot e}\otimes E^*_{\dot {\varkappa(e)}}$ is the element corresponding to the identity $\mathrm{id}\in \mathrm{End}(E_{\dot e})$; $\varkappa(e')$ is the cell dual to $e'$, as in Section \ref{sec: reminder on Poincare duality}. In the last three equations implicit in the notations is the convolution $\mathrm{tr}\,:\; E^*_{\dot{\varkappa(e')}}\otimes E_{\dot e}\rightarrow \mathbb{R}$.


\subsubsection{Fixing the normalization of densities}\label{sec: normalization}
Now we
will focus on
the factors $i$, $\hbar$ and $2\pi$ coming from the Gaussian integral (\ref{Z fiber BV}) and will fix the normalization factors $\xi_\hbar$, $\xi_\hbar^{H^\bullet}$ in (\ref{Z fiber BV},\ref{Z=tau}).

The model Gaussian integrals over a pair of even or odd variables are:
\begin{equation}
\int_{\mathbb{R}^2}dx\, dy\; e^{\frac{i}{\hbar}yx} = 2\pi\hbar,\qquad
\int_{\Pi\mathbb{R}^2}\mathcal{D}\theta\, \mathcal{D}\eta\; e^{\frac{i}{\hbar}\eta \theta}=\frac{i}{\hbar}
\label{model integrals}
\end{equation}
Note that the first integral is conditionally convergent. In the second integral
$\Pi\mathbb{R}^2$ stands for the odd plane, with Grassmann coordinates $\theta,\eta$; we write ``$\mathcal{D}$'' in $\mathcal{D}\theta$, $\mathcal{D}\eta$ to emphasize that the Berezin integration measure is not a differential form.

More generally, for $\mathsf{B}$ an even non-degenerate bilinear form on superspace $\mathbb{R}^{N|N'}$, we have
\begin{equation}\int_{\mathbb{R}^{2N|2N'}}
\prod_{j=1}^N d x^j_\mathrm{even}\; d y^j_\mathrm{even}\cdot \prod_{j'=1}^{N'} \mathcal{D} x^{j'}_\mathrm{odd}\; \mathcal{D} y^{j'}_\mathrm{odd}\quad
e^{\frac{i}{\hbar}\mathsf{B}(\vec{y},\vec{x})}= (2\pi\hbar)^N \left(\frac{i}{\hbar}\right)^{N'} 
\mathrm{Sdet}(\mathsf{B})^{-1
\label{model integral multi-dim}\end{equation}
Note that, if $\mathsf{B}_\mathrm{even}$, $\mathsf{B}_\mathrm{odd}$ denote the even-even and odd-odd blocks of the matrix of $\mathsf{B}$, i.e., if $\mathsf{B}=
\left(\begin{array}{c|c} \mathsf{B}_\mathrm{even} & 0 \\ \hline 0 & \mathsf{B}_\mathrm{odd} \end{array}\right)
$, then we have $\mathrm{Sdet}(\mathsf{B})=\frac{{\det}\mathsf{B}_\mathrm{even}}{ {\det}\mathsf{B}_\mathrm{odd}}$.

Therefore, for the fiber BV integral in (\ref{Z fiber BV}), without the factor $\xi_\hbar$ (which is yet to be specified), we have the following.
\begin{lemma}\label{lemma: torsion as BV integral}
\begin{equation} \int_\mathcal{L} e^{\frac{i}{\hbar}S} \mu_\mathcal{F}^{1/2}= \zeta_\hbar \tau(X,E) \label{fiber BV int with zeta}\end{equation}
where the factor is
\begin{equation} \zeta_\hbar=(2\pi\hbar)^{\frac{1}{2}\dim\mathcal{L}^\mathrm{even}}\left(\frac{i}{\hbar}\right)^{\frac{1}{2}\dim\mathcal{L}^\mathrm{odd}}=
(2\pi\hbar)^{\dim\mathrm{im}(K)^\mathrm{odd}}\left(\frac{i}{\hbar}\right)^{\dim\mathrm{im}(K)^\mathrm{even}} \label{zeta_hbar}\end{equation}
\end{lemma}

\begin{proof} Choose some bases for all terms in the r.h.s. of (\ref{Hodge decomp closed case}): a basis $c_H$ in cohomology $H^\bullet(X,E)$, $c_\mathrm{ex}$ in $C^\bullet_\mathrm{exact}$ and $c_\mathrm{coex}$ in $\mathrm{im}(K)$. We can assume that the product of the corresponding coordinate densities agrees with the density $\mu_C\in \mathrm{Det}\; C^\bullet(X,E)/\{\pm 1\}$ associated to the cellular basis in cochains:
\begin{equation} \mu_H\cdot\mu_\mathrm{ex}\cdot\mu_\mathrm{coex}=\mu_C \label{mu_H mu_ex mu_coex}\end{equation}
This can always be arranged,  e.g., by rescaling one of the basis vectors in $c_\mathrm{ex}$.

We have dual bases $c_H^\vee,c_\mathrm{ex}^\vee,c_\mathrm{coex}^\vee$ on the terms of the dual Hodge decomposition (\ref{dual Hodge decomp, closed}) for $C^\bullet(X^\vee,E^*)$. The corresponding densities $\mu_H^\vee\in\mathrm{Dens}\; H^\bullet(X^\vee,E^*)[n-2]$, $\mu_\mathrm{ex}^\vee\in\mathrm{Dens}\; C^\bullet_\mathrm{ex}(X^\vee,E)[n-2]$, $\mu_\mathrm{coex}^\vee\in \mathrm{Dens}\; \mathrm{im}(K^\vee)[n-2]$ are related to the ones on the l.h.s. of (\ref{mu_H mu_ex mu_coex}) by
$$\mu_H^\vee=\mu_H,\quad \mu_\mathrm{coex}^\vee=\mu_\mathrm{ex},\quad \mu_\mathrm{ex}^\vee=\mu_\mathrm{coex}$$

The integral on the l.h.s. of (\ref{fiber BV int with zeta}) yields
\begin{equation}\int e^{\frac i\hbar \langle B_\mathrm{coex},d A_\mathrm{coex}\rangle}\underbrace{\mathcal{D} A_\mathrm{coex}}_{\mu_\mathrm{coex}}\; \underbrace{\mathcal{D} B_\mathrm{coex}}_{\mu^\vee_\mathrm{coex}}\;\mu_H=\zeta_\hbar\cdot \mu_H\cdot \mathrm{Sdet}_{C^\bullet_\mathrm{coex}\rightarrow C^{\bullet+1}_\mathrm{ex}}(d)\label{BV int = torsion}\end{equation}
where the super-determinant appearing on the r.h.s., 
$$\mathrm{Sdet}(d)=\prod_{k=0}^{n-1}({\det}_{C^k_\mathrm{coex}\rightarrow C^{k+1}_\mathrm{ex}}(d))^{(-1)^k}$$ 
is the alternating product of determinants of matrices of isomorphisms $d: C^k_\mathrm{coex}(X,E)\rightarrow C^{k+1}_\mathrm{ex}(X,E)$ with respect to the chosen bases $c_\mathrm{coex}$, $c_\mathrm{ex}$.
In the last two terms on the r.h.s. of (\ref{BV int = torsion}) one recognizes one of the definitions of $R$-torsion. The coefficient $\zeta_\hbar$ arises as in (\ref{model integral multi-dim}).
\end{proof}

Consider the Hilbert polynomial, packaging the information on dimensions of cochain spaces into a generating function:
\begin{equation} \mathcal{P}_{C^\bullet}(t)=\sum_{k=0}^n t^k\cdot \dim C^k(X,E) \label{P_C}\end{equation}
and the polynomial, counting dimensions of $K$-exact cochains by degree:
$$\mathcal{Q}(t)=\sum_{k=0}^n t^k\cdot \dim\, \mathrm{im}(K)^k $$

Hodge decomposition (\ref{Hodge decomp closed case}) implies the relation $\mathcal{P}_{C^\bullet}(t)=\mathcal{P}_{H^\bullet}(t)+(1+t)\cdot \mathcal{Q}(t)$, or equivalently
\begin{equation} \mathcal{Q}(t)=\frac{\mathcal{P}_{C^\bullet}(t)-\mathcal{P}_{H^\bullet}(t)}{1+t} \label{Q via P}\end{equation}
where
\begin{equation}\label{P_H}\mathcal{P}_{H^\bullet}(t)=\sum_{k=0}^n t^k\cdot \dim H^k(M,E)\end{equation}
Note that $\mathcal{P}_{C^\bullet}(-1)=\mathcal{P}_{H^\bullet}(-1)$ is the Euler characteristic $\chi(C^\bullet(X,E))=\mathrm{rk}(E)\cdot\chi(M)$, and hence there is no singularity on the r.h.s. of (\ref{Q via P}).

Exponents in (\ref{zeta_hbar}) can be expressed in terms of values of $\mathcal{Q}$ at $t=\pm 1$:
\begin{multline}\label{dim im(K) via P,Q}
\dim\mathrm{im}(K)^\mathrm{even}=\frac{\mathcal{Q}(1)+\mathcal{Q}(-1)}{2}=\frac{1}{4}(\mathcal{P}_{C^\bullet}(1)-\mathcal{P}_{H^\bullet}(1))+ \frac{1}{2}(\mathcal{P}'_{C^\bullet}(-1)-\mathcal{P}'_{H^\bullet}(-1))\\
\dim\mathrm{im}(K)^\mathrm{odd}=\frac{\mathcal{Q}(1)-\mathcal{Q}(-1)}{2}=\frac{1}{4}(\mathcal{P}_{C^\bullet}(1)-\mathcal{P}_{H^\bullet}(1))- \frac{1}{2}(\mathcal{P}'_{C^\bullet}(-1)-\mathcal{P}'_{H^\bullet}(-1))
\end{multline}
where prime stands for the derivative in $t$ (emerging from evaluating $\mathcal{Q}(-1)$ by applying L'H\^{o}pital's rule to the r.h.s. of (\ref{Q via P})).

\begin{lemma} \label{lemma: zeta = xi/xi}
One can split the coefficient in (\ref{fiber BV int with zeta}) as
\begin{equation}\zeta_\hbar=\frac{\xi_\hbar^{H^\bullet}}{\xi_\hbar} \label{zeta via xi}\end{equation}
with
\begin{equation}\xi_\hbar=\prod_{k=0}^n (\xi_\hbar^k)^{\dim C^k(X,E)},\qquad \xi_\hbar^{H^\bullet}=\prod_{k=0}^n (\xi_\hbar^k)^{\dim H^k(M,E)}\label{xi_hbar}\end{equation}
where we denoted
\begin{equation} \xi_\hbar^k= (2\pi \hbar)^{-\frac14+\frac12\, k\,(-1)^{k-1}}(e^{-\frac{\pi i}{2}}\hbar)^{\frac14+\frac12 \,k\,(-1)^{k-1}} \label{xi_hbar^k}\end{equation}
\end{lemma}

\begin{proof}
Indeed, (\ref{zeta_hbar}) together with (\ref{dim im(K) via P,Q}) implies that one can write $\zeta_\hbar=\xi_\hbar^{H^\bullet}/\xi_\hbar$ with
$$\xi_\hbar=\xi_\hbar^{C^\bullet}=(2\pi\hbar)^{-\frac{1}{4}\mathcal{P}_{C^\bullet}(1)+\frac{1}{2}\mathcal{P}'_{C^\bullet}(-1)} \left(e^{-\frac{\pi i}{2}}\hbar\right)^{\frac{1}{4}\mathcal{P}_{C^\bullet}(1)+\frac{1}{2}\mathcal{P}'_{C^\bullet}(-1)}$$
and $\xi_\hbar^{H^\bullet}$ given by the same formula, replacing cochains by cohomology. Then formulae (\ref{xi_hbar}) follow immediately from the definitions (\ref{P_C},\ref{P_H}) of $\mathcal{P}_{C^\bullet}(t)$, $\mathcal{P}_{H^\bullet}(t)$.
\end{proof}

\begin{comment}
\begin{multline}\label{xi_hbar}
\xi_\hbar=\xi_\hbar^{C^\bullet}=(2\pi\hbar)^{-\frac{1}{4}\mathcal{P}_{C^\bullet}(1)+\frac{1}{2}\mathcal{P}'_{C^\bullet}(-1)} \left(e^{-\frac{\pi i}{2}}\hbar\right)^{\frac{1}{4}\mathcal{P}_{C^\bullet}(1)+\frac{1}{2}\mathcal{P}'_{C^\bullet}(-1)}=\\=
\prod_{k=0}^n
(\xi_\hbar^k)^{\dim C^k(X,E)}
\end{multline}
Here we denoted
\begin{equation} \xi_\hbar^k= (2\pi \hbar)^{-\frac14+\frac12\, k\,(-1)^{k-1}}(e^{-\frac{\pi i}{2}}\hbar)^{\frac14+\frac12 \,k\,(-1)^{k-1}} \label{xi_hbar^k}\end{equation}
Likewise, $\xi_\hbar^{H^\bullet}$ is given by the same formula as (\ref{xi_hbar}), replacing cochains by cohomology:
\begin{equation} \xi_\hbar^{H^\bullet}=\prod_{k=0}^n (\xi_\hbar^k)^{\dim H^k(X,E)} \end{equation}
\end{comment}

Note that $\xi_\hbar$ is a product over cells of $X$ of factors depending only on dimension of the cell. We define the normalized density
$$\mu_\hbar:=\xi_\hbar\cdot \mu\quad \in \mathbb{C}\otimes\mathrm{Det}\; C^\bullet(X,E)/\{\pm 1\}$$
which can be seen as a product of normalized elementary densities for individual cells of $X$,
\begin{equation} \mu_\hbar=\prod_{e\subset X}\underbrace{(\xi_\hbar^{\dim e})^{\mathrm{rk}E}\cdot\mathcal{D} A_e}_{=:\mathcal{D}_\hbar A_e}
\label{normalized density}\end{equation}
with $\mathcal{D} A_e\in\mathrm{Dens}\; E_{\dot e}[1-\dim e]
$ the elementary density for the cell $e$, associated to
a unimodular basis in the fiber of $E$ over the barycenter $\dot e$ of $e$.

On the other hand, $\xi_\hbar^{H^\bullet}$ depends exclusively on Betti numbers of cohomology, and as such is manifestly independent under subdivisions of $X$. In particular, for an acyclic local system, $\xi_\hbar^{H^\bullet}=1$.
Summarizing this discussion, the result (\ref{fiber BV int with zeta}) can be rewritten as follows.
\begin{Proposition}\label{prop: Z closed}
The perturbative partition function (\ref{Z fiber BV})
with normalization of integration measure fixed by (\ref{normalized density}) is
\begin{equation} Z(X,E)=\int_\mathcal{L} e^{\frac{i}{\hbar}S(A,B)}(\mu_\mathcal{F}^\hbar)^{1/2}=
\xi_\hbar^{H^\bullet}\cdot \tau(X,E)\qquad \in \mathbb{C}\otimes \mathrm{Dens}^{\frac12}(\underline\mathcal{EL}) \label{fiber BV int with xi^H}\end{equation}
with $\xi_\hbar^{H^\bullet}$ given by (\ref{xi_hbar}), (\ref{xi_hbar^k}). Here the normalized half-density on the space of fields is $(\mu_\mathcal{F}^\hbar)^{1/2}=\sqrt{(\mu_\hbar)^{\otimes 2}}|_\mathcal{L}=\xi_\hbar\cdot \mu_\mathcal{F}^{1/2}$. The partition function $Z$ is independent of the details of gauge-fixing and is invariant under subdivisions of $X$.
\end{Proposition}
Formula (\ref{fiber BV int with xi^H}) is indeed just the formula (\ref{Z=tau}), where we have identified the factor in front of the torsion by (\ref{xi_hbar}).

For the later use, alongside with the notation $\mathcal{D}_\hbar A_e$ introduced in (\ref{normalized density}), we also introduce the notation $\mathcal{D}_\hbar B_{e^\vee}=(\xi_\hbar^{n-\dim e^\vee})^{\mathrm{rk}E} \mathcal{D} B_{e^\vee}$ -- the normalized elementary density for the field $B$, associated to a cell $e^\vee\subset X^\vee$ of the dual CW-complex; $\mathcal{D} B_{e^\vee}\in \mathrm{Dens}\,E^*_{\dot e^\vee}[n-2-\dim e^\vee]$ is the elementary density associated to a unimodular basis in the fiber of $E^*$ over the barycenter of $e^\vee$. With these definitions, for the normalized half-density on bulk fields, appearing in (\ref{fiber BV int with xi^H}), we have
$$(\mu_\mathcal{F}^\hbar)^{1/2}=\prod_{e\subset X}(\mathcal{D}_\hbar A_e)^{1/2} (\mathcal{D}_\hbar B_{\varkappa(e)})^{1/2}$$
with $\varkappa(e)\subset X^\vee$ the dual cell for $e$, as in Section \ref{sec: reminder on Poincare duality}.

\begin{remark}[Phase of the partition function]\label{rem: phase}
By the discussion above, in the case of a non-acyclic local system $E$, the partition function $Z(X,E)$ attains a nontrivial complex phase of the form $e^{\pi i s/8}\in U(1)/\{\pm 1\}$, with
\begin{equation} s=\sum_k (-1+2k\,(-1)^{k})\cdot\dim H^k(M,E)\mod 8 \label{phase s}\end{equation}
(we do not take it $\mathrm{mod}\, 16$, since we anyway only define the partition function modulo sign). This looks surprising, since the model integrals (\ref{model integrals}) contain simpler phases (integer powers of $e^{\frac{\pi i}{2}}$). The complicated phase arises because we split the factor $\zeta_\hbar$ in (\ref{fiber BV int with zeta}), which contains only a simple phase, into a factor with cellular locality and a factor depending only on cohomology (\ref{zeta via xi}).
\end{remark}

\begin{remark}
For a closed  manifold of dimension $\dim M=3\;\mathrm{mod}\; 4$, the phase of the partition function is trivial, $e^{\pi i s/8}=\pm1$, as follows from (\ref{phase s}) and from Poincar\'e duality.
\end{remark}

\begin{remark}[Normalization ambiguities]
One can change the definition (\ref{xi_hbar}) of $\xi_\hbar$ by a factor $\exp(\nu \underbrace{\mathcal{P}(-1)}_{\chi(C^\bullet(X,E))})$ with $\nu\in\mathbb{C}$ a parameter. Performing the rescaling
\begin{equation} \xi_\hbar\wavy{} e^{\nu \mathcal{P}_{C^\bullet}(-1)}\cdot\xi_\hbar, \qquad \xi_\hbar^{H^\bullet}\wavy{} e^{\nu \mathcal{P}_{H^\bullet}(-1)}\cdot\xi_\hbar^{H^\bullet}\label{xi_hbar rescaling}\end{equation}
(or, equivalently, redefining $\xi_\hbar^k\wavy{}\xi_\hbar^k\cdot e^{(-1)^k\nu}$) does not change the quotient (\ref{zeta via xi}). E.g. one can choose $\nu=\frac{i\pi}{8}$, which has the effect of changing the phase of the partition function of Remark \ref{rem: phase} from $e^{\pi i s/8}$ to $e^{\pi i s'/4}$ with
$$s'= \sum_k \left(-\frac{1-(-1)^k}{2}+k\,(-1)^{k}\right)\cdot\dim H^k(M,E)\mod 4$$
Another ambiguity in the phase of Remark \ref{rem: phase} stems from the possibility to change values of the model integrals (\ref{model integrals}) by some integral powers of $e^{2\pi i}$, which results in the shift of $s$ in (\ref{phase s}) by a multiple of $4\cdot\sum_k\dim H^k(M,E)$. Since we only consider $s\;\mathrm{mod}\; 8$, this shift can be viewed as a special case of the transformation (\ref{xi_hbar rescaling}), with $\nu=r\cdot\frac{i\pi}{2}$ for some $r\in\mathbb{Z}$. 
\end{remark}

\section{Cellular abelian $BF$ theory on manifolds with boundary: classical theory}\label{sec: classical cell ab BF on mfd with bdry}

\subsection{Classical theory on a cobordism}

Let $M$ be a compact oriented piecewise-linear $n$-manifold with boundary $\partial M=\overline{M_\mathrm{in}}\sqcup M_\mathrm{out}$. Overline indicates that we take $M_\mathrm{in}$ with the orientation opposite to that induced from $M$, whereas the orientation of $M_\mathrm{out}$ agrees with that of $M$. Let $(E,\mu_E,\nabla_E)$ be a flat vector bundle over $M$ of rank $m$ with a horizontal fiberwise density $\mu_E$, and let $X$ be a cellular decomposition of $M$.

We define the space of fields to be the graded vector space
\begin{equation} \mathcal{F}=C^\bullet(X,E_X)[1]\oplus C^\bullet(X^\vee,E^*_X)[n-2] \label{cell BF fields on a cobordism}\end{equation}
where $X^{\vee}$ is defined as in Section \ref{sec: Lefschetz for cell decomp, cobordism}, $E_X$ is the cellular $SL_\pm(m)$-local system on $X$ induced by the vector bundle $E$, and $E^*_X$ is the dual local system on the dual cellular decomposition (cf. Section \ref{sec: local systems on the dual cell decomp}). We will suppress the local system in the notation for fields onwards: cochains on $X$ are always taken with coefficients in $E_X$, cochains on $X^\vee$ -- with coefficients in $E^*_X$.

The space of fields is equipped with a
constant pre-symplectic structure of degree $-1$,
$$\omega: \mathcal{F}^k\otimes \mathcal{F}^{1-k}\rightarrow \mathbb{R}$$
which is degenerate if and only if $\partial M$ is non-empty.
We construct $\omega$ by
combining
the non-degenerate pairing
\begin{equation}  C^{n-\bullet}(X^{\vee},X_\mathrm{in}^\vee)\otimes C^\bullet(X,X_\mathrm{out})\rightarrow \mathbb{R} \label{nondeg pairing cochains}\end{equation}
(the inverse of intersection pairing (\ref{Lefschetz for chains mixed})) with the zero maps
$$C^{n-\bullet}(X^{\vee})\otimes C^\bullet(X_\mathrm{out}) \xrightarrow{0} \mathbb{R},\qquad  C^{n-\bullet}(X^\vee_\mathrm{in}) \otimes C^\bullet(X) \xrightarrow{0}\mathbb{R}$$
to a
pairing
\begin{equation} \langle,\rangle:\quad  C^{n-\bullet}(X^{\vee})\otimes C^\bullet(X) \rightarrow \mathbb{R} \label{degen pairing for cochains}\end{equation}
In terms of superfields
\begin{equation} A: \mathcal{F}\rightarrow C^\bullet(X),\quad B: \mathcal{F}\rightarrow C^\bullet(X^{\vee}) \label{superfields}\end{equation}
the presymplectic form is
$$\omega=\langle \delta B, \delta A\rangle\quad \in \Omega^2(\mathcal{F})_{-1}$$



The space of boundary fields is defined as
\begin{equation} \mathcal{F}_\partial=C^\bullet(X_\partial)[1]\oplus C^\bullet(X_\partial^\vee)[n-2] \label{cell boundary fields}\end{equation}

with coefficients in
the pullback of the local system to the boundary); a (non-degenerate) degree $0$ symplectic form (the {\it BFV 2-form}) on $\mathcal{F}_\partial$ is given by
\begin{eqnarray}
\omega_\partial&=&\delta \alpha_\partial=\langle \delta B_\mathrm{out} , \delta A_\mathrm{out} \rangle_\mathrm{out} - \langle \delta B_\mathrm{in}, \delta A_\mathrm{in}\rangle_\mathrm{in}\quad \in \Omega^2(\mathcal{F}_\partial)_{0}, \label{omega_bdry}\\
\alpha_\partial&=&\langle  B_\mathrm{out} , \delta A_\mathrm{out} \rangle_\mathrm{out} - \langle \delta B_\mathrm{in}, A_\mathrm{in}\rangle_\mathrm{in}\quad \in \Omega^1(\mathcal{F}_\partial)_0 \label{alpha_bdry}
\end{eqnarray}
where $\langle,\rangle_{\mathrm{in/out}}: C^{n-1-k}(X_{\mathrm{in/out}}^\vee)\otimes C^k(X_{\mathrm{in/out}})\rightarrow \mathbb{R}$ is the inverse intersection pairing on the in/out boundary. Boundary superfields $A_\partial=(A_\mathrm{in},A_\mathrm{out}),B_\partial=(B_\mathrm{in},B_\mathrm{out})$ in the formulae above are defined similarly to (\ref{superfields}).
The projection
\begin{equation} \pi:\mathcal{F}\twoheadrightarrow \mathcal{F}_\partial\label{pi}\end{equation}
is defined as $\pi=\iota^*\oplus(\iota^\vee)^*$, where $\iota^\vee$ is defined to be $\iota_+$ for in-boundary and $\iota_-$ for the out-boundary (cf. Section \ref{sec: Lefschetz for cell decomp} for definition of cellular inclusions $\iota_\pm:X_{\mathrm{in/out}}\rightarrow X$), i.e. cochains of $X$ are restricted to $X_\partial$, whereas cochains of $X^{\vee}$ are first restricted to $\partial \widetilde M$ (i.e. $M$ with a collar at $M_\mathrm{out}$ removed and a collar at $M_\mathrm{in}$ added) and then parallel transported, using holonomy of $E^*$, to $\partial M$, cf. (\ref{iota_-^* def},\ref{iota_+^* def}) in Section \ref{sec: local systems on the dual cell decomp}.

We define the action as
\begin{equation} S=\langle B, dA\rangle+ \langle (\iota^\vee)^* B,\iota^* A \rangle_\mathrm{in}\quad \in \mathrm{C}^\infty(\mathcal{F})_0 \label{S with bdry term}\end{equation}


Since $\omega$ is degenerate in the presence of a boundary, one cannot invert it to construct a  Poisson bracket on $\mathcal{F}$. Instead, following the logic of the BV-BFV formalism \cite{CMR}, we introduce a degree $+1$ vector field $Q$ as the map $d_X+d_{X^{\vee}}:\mathcal{F}\rightarrow \mathcal{F}$ dualized to a map $\mathcal{F}^*\rightarrow \mathcal{F}^*$ and extended by Leibnitz rule as a derivation on $\mathrm{C}^\infty(\mathcal{F})$:
$$Q=\langle dA ,\frac{\partial}{\partial A}\rangle+\langle dB ,\frac{\partial}{\partial B}\rangle \quad \in \mathfrak{X}(\mathcal{F})_1$$
(i.e. $QA=dA$, $QB=dB$, where $Q$ acts on functions on $\mathcal{F}$ while $d$ acts on cochains where the superfields take values).
This vector field is cohomological, i.e. $Q^2=0$, and projects to a cohomological vector field on $\mathcal{F}_\partial$,
$$\pi_*Q =Q_\partial=\langle dA_\partial ,\frac{\partial}{\partial A_\partial}\rangle+\langle dB_\partial ,\frac{\partial}{\partial B_\partial}\rangle \quad \in \mathfrak{X}(\mathcal{F}_\partial)_1$$
The projected vector field on the boundary is Hamiltonian w.r.t. to the BFV 2-form $\omega_\partial$, with degree $1$ Hamiltonian
\begin{equation} S_\partial=\langle B_\mathrm{out}  , dA_\mathrm{out}  \rangle_\mathrm{out} -
\langle B_\mathrm{in} , dA_\mathrm{in} \rangle_\mathrm{in}
\quad \in \mathrm{C}^\infty(\mathcal{F}_\partial)_1 \label{BFV action}\end{equation}
-- the {\it BFV action} (i.e. the relation is: $\iota_{Q_\partial}\omega_\partial=\delta S_\partial$). On the other hand, $Q$ itself, instead of being the Hamiltonian vector field for $S$, satisfies the following.
\begin{Proposition}
\label{lemma: i_Q=dS+alpha_bdry}
The data of the cellular abelian $BF$ theory satisfy the equation
\begin{equation} \delta S= \iota_Q \omega-\pi^*\alpha_\partial \label{i_Q=dS+alpha_bdry}\end{equation}
\end{Proposition}
This relation
is a consequence of
the following.
\begin{lemma}[Cellular Stokes' formula]\label{lemma: Stokes}
\begin{equation} (-1)^{n+\deg b}\langle d b, a \rangle +\langle b, da \rangle= \langle (\iota^\vee)^* b, \iota^* a \rangle_\mathrm{out}  - \langle (\iota^\vee)^* b, \iota^* a \rangle_\mathrm{in} \label{Stokes}\end{equation}
with $a\in C^k(X)$, $b\in C^{n-k-1}(X^{\vee})$ any cochains.
\end{lemma}
\begin{proof}
For $a_\mathrm{out}\in C^k(X_\mathrm{out})$, denote $\widetilde {a_\mathrm{out}}\in C^k(X)$ the extension of $a_\mathrm{out}$ by zero on cells of $X-X_\mathrm{out}$. Likewise denote $\widetilde {b_\mathrm{in}}$ an extension of a cochain on $X^\vee_\mathrm{in}$ to $X^\vee$ by zero on cells of $X^\vee-X^\vee_\mathrm{in}$.
Define two degree $1$ maps
\begin{equation}\begin{array}{lllllllll}\phi: & C^k(X_\mathrm{out}) &\rightarrow & C^{k+1}(X,X_\mathrm{out})  &,\qquad&
\phi^\vee: & C^k(X^\vee_\mathrm{in}) &\rightarrow & C^{k+1}(X^\vee,X^\vee_\mathrm{in})\\
& a_\mathrm{out} &\mapsto  & d \widetilde {a_\mathrm{out}} -\widetilde{da_\mathrm{out}}   & & & b &\mapsto  & d \widetilde{b_\mathrm{in}} -\widetilde{db_\mathrm{in}} \end{array}
\label{phi def}\end{equation}
Note that $\phi,\phi^\vee$ are chain maps:
$$d\phi+\phi d=0,\quad  d\phi^\vee+\phi^\vee d=0$$
and induce on the level of cohomology the standard homomorphisms $\phi_*: H^\bullet(M_\mathrm{out})\rightarrow H^{\bullet+1}(M,M_\mathrm{out})$, $(\phi^\vee)_*: H^\bullet(M_\mathrm{in})\rightarrow H^{\bullet+1}(M,M_\mathrm{in})$ -- connecting homomorphisms in the two long exact sequences of cohomology of pairs $(M,M_\mathrm{out})$ and $(M,M_\mathrm{in})$.

Next, we have
$$\langle b, \phi(a_\mathrm{out}) \rangle = \langle b|_\mathrm{out}, a_\mathrm{out} \rangle_\mathrm{out}, \quad \langle \phi^\vee (b_\mathrm{in}), a\rangle = -(-1)^{n+\deg b}\langle b_\mathrm{in}, a|_\mathrm{in} \rangle_\mathrm{in}  $$
--- both right hand sides are sums of intersections in cells adjacent to the boundary and result in boundary terms on the left.\footnote{We are using the natural notations $a|_\mathrm{in}, a|_\mathrm{out}$ for the components of the image of a cochain $a$ under restriction $\iota^*:C^\bullet(X)\rightarrow C^{\bullet}(X_\mathrm{in})\oplus C^\bullet(X_\mathrm{out})$, and likewise $b|_\mathrm{in},b|_\mathrm{out}$ are the components of the image of $b$ under $(\iota^\vee)^*:C^\bullet(X^\vee)\rightarrow C^\bullet(X_\mathrm{in}^\vee)\oplus C^\bullet(X_\mathrm{out}^\vee)$.}

To prove (\ref{Stokes}), we calculate
\begin{multline*}
(-1)^{n+\deg b+1}\langle db, a\rangle= (-1)^{n+\deg b+1}\langle d(b-\widetilde{b|_\mathrm{in}})+\phi^\vee(b|_\mathrm{in}) \;,\; a- \widetilde{a|_\mathrm{out}} \rangle= \\ =
\langle b-\widetilde{b|_\mathrm{in}} \;,\; d(a- \widetilde{a|_\mathrm{out}} )\rangle_\mathrm{int}+ \langle b|_\mathrm{in} , a|_\mathrm{in} \rangle_\mathrm{in} \\
= \langle b,da \rangle-\langle b, \phi(a|_\mathrm{out})\rangle + \langle b|_\mathrm{in} , a|_\mathrm{in}\rangle_\mathrm{in} \\
=\langle b,da \rangle- \langle b|_\mathrm{out}  , a|_\mathrm{out} \rangle_\mathrm{out}+ \langle b|_\mathrm{in} , a|_\mathrm{in}\rangle_\mathrm{in}
\end{multline*}
We put the subscript ``int'' for the non-degenerate (inverse) intersection pairing (\ref{nondeg pairing cochains}) for which the respective coboundary maps $d_X$ and $d_{X^{\vee}}$ are mutually adjoint (up to a sign). 
\end{proof}

\begin{proof}[Proof of Proposition \ref{lemma: i_Q=dS+alpha_bdry}] Indeed, let us calculate the differential of the action (\ref{S with bdry term}) using cellular Stokes' theorem (\ref{Stokes}):
\begin{multline*}
\delta S=\langle \delta B,dA \rangle - \underbrace{\langle B,d\delta A \rangle}_{-\langle dB,\delta A \rangle+ \langle B|_\mathrm{out},\delta A|_\mathrm{out} \rangle_\mathrm{out}-\langle B|_\mathrm{in},\delta A|_\mathrm{in}\rangle_\mathrm{in}} + \\+
\langle \delta B|_\mathrm{in},A|_\mathrm{in} \rangle_\mathrm{in} - \langle B|_\mathrm{in},\delta A|_\mathrm{in}\rangle_\mathrm{in}=\\
=\underbrace{\langle\delta B,dA\rangle+\langle dB,\delta A\rangle}_{\iota_Q \omega}\underbrace{-\langle B|_\mathrm{out},\delta A|_\mathrm{out} \rangle_\mathrm{out}+\langle \delta B|_\mathrm{in},A_\mathrm{in} \rangle_\mathrm{in}}_{-\pi^*\alpha_\partial}
\end{multline*}
\end{proof}

\begin{remark} The boundary term in the action (\ref{S with bdry term}) was introduced so that equation (\ref{i_Q=dS+alpha_bdry}) is satisfied for the boundary primitive 1-form (\ref{alpha_bdry}). The latter is chosen so as to agree with $A$-polarization for the out-boundary and $B$-polarization for the in-boundary, which we are going to use in quantization of the model.
\end{remark}

\subsection{Euler-Lagrange spaces, reduction}
The Euler-Lagrange subspaces in $\mathcal{F}$, $\mathcal{F}_\partial$ are defined as zero-loci of $Q$, $Q_\partial$ respectively:
$$\mathcal{EL}= C^\bullet_\mathrm{closed}(X)[1]\oplus C^\bullet_\mathrm{closed}(X^{\vee})[n-2],\qquad
\mathcal{EL}_\partial= C^\bullet_\mathrm{closed}(X_\partial)[1]\oplus C^\bullet_\mathrm{closed}(X^{\vee}_\partial)[n-2]
$$
The respective EL moduli spaces ($Q$-reduced zero-loci of $Q$) are independent of the cellular decomposition:
$$
\begin{CD}
\mathcal{EL}/Q=H^\bullet(M)[1]\oplus H^\bullet(M)[n-2] \\
@V\pi_*VV \\
\mathcal{EL}_\partial/Q_\partial=\underline\mathcal{EL}_\partial=H^\bullet(\partial M)[1]\oplus H^\bullet(\partial M)[n-2]
\end{CD}
$$
The boundary moduli space inherits a (non-degenerate, degree $0$) symplectic structure $\underline\omega_\partial$, and the bulk moduli space inherits a degree $+1$ Poisson structure (cf. \cite{CMR}), with symplectic foliation given by fibers of $\pi_*$, which are isomorphic to
$$(\pi^*)^{-1}\{0\}=\frac{H^\bullet(M,\partial M)}{H^{\bullet-1}(\partial M)}[1]\oplus \frac{H^\bullet(M,\partial M)}{H^{\bullet-1}(\partial M)}[n-2]$$
Here quotients are over the image of the connecting homomorphism in the long exact sequence in cohomology of the pair $(M,\partial M)$.
Image of $\pi_*$ is a Lagrangian subspace of $\underline\mathcal{EL}_\partial$. The Hamilton-Jacobi action $S|_{\mathcal{EL}/Q}$ on the bulk moduli space is identically zero.

We refer the reader to  \cite{CMR} for generalities on Euler-Lagrange moduli spaces in the BV-BFV framework.

\begin{comment}
\subsubsection{Classical A-A gluing}\marginpar{Rewrite this subsection for $A/B$ boundary}
Let $M$ be a closed manifold cut into submanifolds $M_1$ and $M_2$ along a codimension $1$ submanifold $I$. Let $X$ be a cellular decomposition of $X$ restricting to a decomposition $X_I$ of $I$ and decompositions $X_{1,2}$ of $M_{1,2}$. Then $X=X_1\cup_I X_2$ and for the dual complexes we have
$$X^\vee=X^{\vee_-}_1 \;\cup_{M_{1-}}\; X_I^{\vee,\mathrm{collar}} \;\cup_{M_{2-}}\; X^{\vee_-}_2$$
where $X_I^{\vee,\mathrm{collar}}$ is a cellular decomposition of the 2-sided collar around $I$, $M-M_{1-}-M_{2-}\simeq I\times [-\epsilon,\epsilon]$; as a CW complex, it is the cylinder over $X^{\vee_-}_1\cap M_{1-}$.

For the space of fields on $X$,  we have the Meyer-Vietoris long exact sequence
\begin{equation}  \mathcal{F}\xrightarrow{(p_1,p_2)} \mathcal{F}_1 \oplus \mathcal{F}_2 \xrightarrow{\pi_1^A-\pi_2^A} \mathcal{F}_I \rightarrow \mathcal{F}[1] \label{Meyer-Vietoris, AA gluing}\end{equation}
with $\mathcal{F}$, $\mathcal{F}_{1,2}$ the spaces of fields for $X$, $X_{1,2}$, defined as in (\ref{cell BF fields},\ref{cell BF fields with A boundary}); $\mathcal{F}_I$ is the space of boundary fields on the interface $I$, defined as in (\ref{cell boundary fields}). First map in (\ref{Meyer-Vietoris, AA gluing}) consists in restricting cochains to respective CW subcomplexes. Second map restricts cochains on $X_1$, $X_2$ ($A$-fields) to the interface and takes the difference, $(A_1,B_1;A_2,B_2)\mapsto (\iota_1^*A_1-\iota_2^*A_2,0)$. The last map sends $(A_I,B_I)\mapsto (0, s B_I)$ where $s: C^\bullet(X_I^\vee)\rightarrow C^{\bullet+1}(X_I^{\vee,\mathrm{collar}})$ is associated to the map sending a $(k+1)$-cell of $X_I^{\vee,\mathrm{collar}}$ to the unique $k$-cell of $X_I^\vee$ contained in it.

The BV 2-form on $\mathcal{F}$ can be constructed out of the data for $\mathcal{F}_{1,2}$, $\mathcal{F}_I$ as
\begin{equation} \omega=p_1^*\omega_1+p_2^*\omega_2+\omega^\mathrm{collar}_I \label{gluing for omega}\end{equation}
where
$$\omega^\mathrm{collar}_
=\langle \delta B_I , \iota_1^*\delta A_1  \rangle_\partial
$$

\begin{remark}
Long exact sequence (\ref{Meyer-Vietoris, AA gluing}) replaces expressing fields on $M$ as the fiber product of spaces of fields for $M_1$ and $M_2$.
Also note that, for $M$ closed, the last (collar) term in \ref{gluing for omega} restores the non-degeneracy of $\omega$ (whereas the sum of first two terms is degenerate).
\end{remark}
\end{comment}

\subsection{Classical ``$A$-$B$'' gluing}\footnote{``$A$-$B$'' means that we stay in the setting of cobordisms and only allow attaching out-boundary (or ``$A$-boundary'', for the polarization we are going to put on it in the quantization procedure to follow) of one cobordism to in- (or ``$B$''-) boundary of the next one.}
\label{sec: class gluing}
Let $M$ be an $n$-dimensional cobordism from $M_1$ to $M_3$, cut by a codimension $1$ submanifold $M_2$ into cobordisms $M_1\cob{M_I} M_2$ and $M_2\cob{M_{II}}M_3$ (we use Roman numerals for $n$-manifolds and arabic numerals for $(n-1)$-manifolds). 

Let $X$ be a cellular decomposition of $M$ for which $M_2\cap X$ is a CW-subcomplex. Thus we have cellular decompositions $X_{1,2,3}, X_{I,II}$ of $M_{1,2,3}$ and $M_{I,II}$, respectively.
As usual, we assume that $X_I$ is of product type near $M_2$ and $X_{II}$ is of product type near $M_3$.
We also have Poincar\'e dual decompositions $X_{1,2,3}^\vee$ of $M_{1,2,3}$ and $X_I^\vee,X_{II}^\vee$ of $\widetilde M_I$, $\widetilde M_{II}$ - displaced versions of $M_{I,II}$ (cf. Section \ref{sec: Lefschetz for cell decomp, cobordism}). On the level of CW-complexes, we have both $X=X_I\cup_{X_2} X_{II}$ and $X^\vee=X^\vee_I\cup_{X_2^\vee} X_{II}^\vee$.

The space of fields associated to $(M,X)$ is expressed in terms of spaces of fields for $(M_I,X_I)$ and $(M_{II},X_{II})$ as
$$\mathcal{F}=\mathcal{F}_I\times_{\mathcal{F}_2} \mathcal{F}_{II}$$
-- the fiber product w.r.t. the projections $\mathcal{F}_I\stackrel{\pi_{I,2}}{\twoheadrightarrow}\mathcal{F}_2 \stackrel{\pi_{II,2}}{\twoheadleftarrow}\mathcal{F}_{II}$ -- ``out-part'' of projection (\ref{pi}) for $(M_I,X_I)$ and ``in-part'' of projection (\ref{pi}) for $(M_{II},X_{II})$, respectively. Recalling that we also have projections to boundary fields associated to $(M_{1,3},X_{1,3})$, we have the following diagram.
$$
\begin{CD}
\mathcal{F} @>>> \mathcal{F}_{II} @>\pi_{II,3}>> \mathcal{F}_3 \\
@VVV @V\pi_{II,2}VV \\
\mathcal{F}_{I} @>\pi_{I,2}>> \mathcal{F}_2 \\
@V\pi_{I,1}VV \\
\mathcal{F}_1
\end{CD}
$$

The presymplectic BV 2-form on $\mathcal{F}$ is recovered as the sum of pullbacks of presymplectic forms on $\mathcal{F}_I$ and $\mathcal{F}_{II}$.

For the action, we have
$$S=S_I+S_{II}-\langle B_2,A_2 \rangle$$
where the third term, associated to the gluing interface $(M_2,X_2)$, compensates for the boundary term in $S_{II}$.

\section{Quantization in $A/B$-polarization}
\label{sec: quantum cell ab BF on mfd with bdry}
We choose the following Lagrangian fibration of the space of boundary fields
\begin{equation}\label{polarization}
\begin{CD}
\mathcal{F}_\partial=C^\bullet(X_\partial)[1]\oplus C^\bullet(X^{\vee}_\partial)[n-2] \\
@VpVV  \\
\mathcal{B}_\partial=C^\bullet(X_\mathrm{out} )[1]\oplus C^\bullet(X_\mathrm{in}^\vee)[n-2]
\end{CD}
\end{equation}
Notation $\mathcal{B}_\partial$ comes from ``base'' of the fibration. Pre-composing with $\pi: \mathcal{F}\rightarrow \mathcal{F}_\partial$, we get the projection $p\circ \pi: \mathcal{F}\rightarrow \mathcal{B}_\partial$. The presymplectic structure $\omega$ restricts to a {\it symplectic} (non-degenerate) structure on the fibers of $p\circ\pi$ in $\mathcal{F}$. Thus, for $b=(A_\mathrm{out} ,B_\mathrm{in})\in \mathcal{B}_\partial$, the fiber
\begin{equation} \mathcal{F}_b=\pi^{-1}p^{-1}\{b\}\simeq C^\bullet(X,X_\mathrm{out} )[1]\oplus  C^\bullet(X^\vee,X^\vee_\mathrm{in})[n-2] \label{F_b}\end{equation}
carries the degree $-1$ symplectic structure $\omega_b=\omega|_{\mathcal{F}_b}=\langle \delta B_{X^\vee-X^\vee_\mathrm{in}},\delta A_{X-X_\mathrm{out}}\rangle_\mathrm{int}$ and  the BV Laplacian
$$\Delta_\mathrm{bulk}=\left\langle \frac{\partial}{\partial A_{X-X_\mathrm{out} }} \;,\; \frac{\partial}{\partial B_{X^{\vee}-X^\vee_\mathrm{in}}}\right\rangle_\mathrm{int}:\quad  \mathrm{C}^\infty(\mathcal{F}_b)_k\rightarrow \mathrm{C}^\infty(\mathcal{F}_b)_{k+1}$$
satisfying
$$\Delta_\mathrm{bulk}^2=0$$
As in the proof of Lemma \ref{lemma: Stokes}, we are emphasizing the non-degenerate intersection pairing, and the inverse one, with subscript ``int''.

Geometric (canonical) quantization of the
space of boundary fields $\mathcal{F}_\partial$ (with symplectic structure $\omega_\partial$ and the trivial prequantum line bundle with global connection $1$-form $\frac{i}{\hbar}\alpha_\partial$)
w.r.t. the real polarization given by the vertical tangent bundle  to the fibration (\ref{polarization}),
yields the {\it space of states}
\begin{equation}\mathcal{H}_\partial=\mathbb{C}\otimes \mathrm{C}^\infty(\mathcal{B}_\partial)
\label{H}\end{equation}
associated to the boundary.
\begin{remark} The splitting of the space of boundary fields $\mathcal{F}_\partial$ into contributions of in- and out-boundary induces a splitting of the space of states as
\begin{equation} \mathcal{H}_\partial=\underbrace{\mathcal{H}_\mathrm{in}^{(B)}}_{\mathrm{C}^\infty_\mathbb{C}(C^\bullet(X^\vee_\mathrm{in})[n-2])}\widehat\otimes \underbrace{\mathcal{H}_\mathrm{out}^{(A)}}_{\mathrm{C}^\infty_\mathbb{C}(C^\bullet(X_\mathrm{out})[1])} \label{H = H_in otimes H_out}\end{equation}
where the superscripts $(A)$, $(B)$ stand for the respective polarizations (``$A$ fixed'' on the out-boundary and ``$B$ fixed'' on the in-boundary). Subscript $\mathbb{C}$ corresponds to taking complex-valued functions
\end{remark}

\begin{remark}\label{rem: pairing H^A with H^B}
For $N$ a closed $(n-1)$-manifold with a cellular decomposition $Y$, one can introduce a pairing between the spaces of states corresponding to $A$- and $B$-polarizations on $Y$, $\mathcal{H}^{(A)}_Y\otimes \mathcal{H}^{(B)}_{\bar Y}\rightarrow \mathbb{C}$ given by
\begin{equation} (\phi(A_Y),\psi(B_Y))=\int_{\mathcal{B}^{(A)}_Y\times \mathcal{B}^{(B)}_Y} \phi(A_Y)\; \left(\mathcal{D}_\hbar A_Y\; e^{-\frac{i}{\hbar}\langle B_Y,A_Y \rangle}\; \mathcal{D}_\hbar B_Y\right)\; \psi(B_Y)\label{pairing H^A with H^B}\end{equation}
for a pair of states $\phi\in \mathcal{H}^{(A)}_Y=\mathrm{C}^\infty_\mathbb{C}(\mathcal{B}^{(A)}_Y)$, $\psi\in \mathcal{H}^{(B)}_{\bar Y}=\mathrm{C}^\infty_\mathbb{C}(\mathcal{B}^{(B)}_Y)$, where $\mathcal{B}^{A}_Y=C^\bullet(Y)[1]$, $\mathcal{B}^{(B)}_Y= C^\bullet(Y^\vee)[n-2]$ are the bases of $A$- and $B$-polarizations on the space $\mathcal{F}_Y$, respectively.
We use the bar to denote the orientation reversal\footnote{
We also understand that the orientation reversing identity map $Y\rightarrow \bar Y$ acts on states by complex conjugation $\phi(A_Y)\mapsto \overline{\phi(A_Y)}$, $\psi(B_Y)\mapsto \overline{\psi(B_Y)}$. In particular, we have a sesquilinear pairing $\mathcal{H}^{(A)}_Y\otimes \mathcal{H}^{(B)}_Y\rightarrow \mathbb{C}$ (note that here $Y$ has the same orientation in both factors), given by the formula (\ref{pairing H^A with H^B}) with $\psi$ replaced by the complex conjugate $\bar\psi$.
}; in these notations, the spaces appearing on the r.h.s. of (\ref{H = H_in otimes H_out}) are $\mathcal{H}^{(B)}_\mathrm{in}=\mathcal{H}^{(B)}_{\bar X_\mathrm{in}}$
and $\mathcal{H}^{(A)}_\mathrm{out}=\mathcal{H}^{(A)}_{X_\mathrm{out}}$.\footnote{
Recall that $\bar{X}_\mathrm{in}$ is the CW complex $X_\mathrm{in}$ endowed with the orientation induced from the orientation of $X$.
}\marginpar{Need to understand better the action of a change of orientation on $\xi$-phase. Phase $\mathbb{Z}_{16}$-bundle?}
The pairing (\ref{pairing H^A with H^B}) will play a role when we discuss the behavior of partition functions under gluing of cobordisms (Section \ref{sec: quantum gluing}, Proposition \ref{prop: gluing}) (with $N$ being the gluing interface between two cobordisms and $Y$ its cellular decomposition).
Using the pairing (\ref{pairing H^A with H^B}) for $N=M_\mathrm{in}$, $Y=X_\mathrm{in}$, the space of states associated to the boundary of a cobordism (\ref{H = H_in otimes H_out}) can be identified with the $\mathrm{Hom}$-space
\begin{equation}\label{HH as Hom-space}
\mathcal{H}_\partial=\mathrm{Hom}(\mathcal{H}^{(A)}_\mathrm{in},\mathcal{H}^{(A)}_\mathrm{out})
\end{equation}
\end{remark}
Quantization of boundary BFV action (\ref{BFV action}) yields
$$\widehat S_\partial= -i\hbar\;Q_{\mathcal{B}_\partial}\quad \in \mathrm{End}(\mathcal{H}_\partial)_1,\qquad\mbox{where}\quad Q_{\mathcal{B}_\partial}=\langle dA_\mathrm{out} ,\frac{\partial}{\partial A_\mathrm{out} }\rangle+
\langle dB_\mathrm{in},\frac{\partial}{\partial B_\mathrm{in}}\rangle\quad \in \mathfrak{X}(\mathcal{B}_\partial)_1$$
This odd, degree $+1$ operator on the space of states satisfies
$$\widehat S_\partial^2=0$$
Thus, $(\mathcal{H},\widehat S_\partial)$ is a cochain complex.


\begin{lemma}\label{lemma 7.3}
The action satisfies the following version of the quantum master equation modified by the boundary term:
\begin{equation} \left(\frac{i}{\hbar}\widehat S_\partial-i\hbar\; \Delta_\mathrm{bulk}\right)\;e^{\frac{i}{\hbar}S(A,B)}=0 \label{QME with bdry term}\end{equation}
where the exponential of the action is regarded as an element of $\mathrm{C}^\infty_\mathbb{C}(\mathcal{F})\cong\mathcal{H}_\partial\widehat\otimes\, \mathrm{C}^\infty(\mathcal{F}_b)$. (Here we are exploiting the fact that
all fibers $\mathcal{F}_b$ for different $b$ are isomorphic.)
\end{lemma}

\begin{proof}\footnote{This Lemma follows from the general treatment in \cite{CMRpert}, Section 2.4.1. For reader's convenience, we give an adapted proof here.}
First calculate the Poisson bracket (corresponding to the fiber symplectic structure $\omega_b$ for some $b\in\mathcal{B}_\partial$) of the action with itself:
\begin{multline*}
\frac{1}{2}\{S,S\}_{\omega_b}=\langle dB-\widetilde{dB} \;,\; dA-\widetilde{dA} \rangle_\mathrm{int}
=\\
=\langle dB , dA\rangl
=\underbrace{-\langle B,d^2A \rangle}_0+\langle B|_\mathrm{out},d A|_\mathrm{out}\rangle_\mathrm{out}-\langle B|_\mathrm{in}, dA|_\mathrm{in}\rangle_\mathrm{in}=\pi^*S_\partial
\end{multline*}
Consider the splitting of superfields into $\mathcal{B}_\partial$-components and ``bulk'' components (corresponding to fibers of $p\circ \pi:\mathcal{F}\rightarrow \mathcal{B}_\partial$):
$$A=\widetilde{A|_\mathrm{out}}+\underbrace{(A-\widetilde{A|_\mathrm{out}})}_{A_\mathrm{bulk}},\qquad B=\widetilde{B|_\mathrm{in}}+\underbrace{(B-\widetilde{B|_\mathrm{in}})}_{B_\mathrm{bulk}}$$
Substituting this splitting into the action, we have
$$S(A,B)=\langle B_\mathrm{bulk}, \phi(A|_\mathrm{out})+d A_\mathrm{bulk}\rangle+ \langle B|_\mathrm{in}, A_\mathrm{bulk}|_\mathrm{in} \rangle_\mathrm{in}$$
Next, calculate
$$Q_{\mathcal{B}_\partial} S=-\langle B_\mathrm{bulk}|_\mathrm{out}, dA|_\mathrm{out}\rangle_\mathrm{out}+\langle B|_\mathrm{in}, dA_\mathrm{bulk}|_\mathrm{in} \rangle_\mathrm{in}=-\pi^* S_\partial$$
Therefore, we have
$$\left(\frac{i}{\hbar}\widehat S_\partial-i\hbar\Delta_\mathrm{bulk}\right)e^{\frac{i}{\hbar}S(A,B)}=\frac{i}{\hbar}\left(\underbrace{Q_{\mathcal{B}_\partial} S}_{-\pi^* S_\partial}+\underbrace{\frac{1}{2}\{S,S\}_{\omega_b}}_{\pi^* S_\partial}\underbrace{-i\hbar \Delta_\mathrm{bulk} S}_0\right)\cdot e^{\frac{i}{\hbar}S(A,B)}=0$$
\end{proof}

Denote $\mu_{\mathcal{B}_\partial}=\mathcal{D} B_\mathrm{in}\cdot \mathcal{D} A_\mathrm{out}\in \mathrm{Dens}\; \mathcal{B}_\partial$ the density on $\mathcal{B}_\partial$ associated to the cellular basis.
The corresponding normalized density is
$$\mu_{\mathcal{B}_\partial}^\hbar=\mathcal{D}_\hbar B_\mathrm{in}\cdot \mathcal{D}_\hbar A_\mathrm{out}=\prod_{e^\vee_\mathrm{in}\subset X^\vee_\mathrm{in}}\mathcal{D}_\hbar B_{e^\vee_\mathrm{in}}\cdot \prod_{e_\mathrm{out}\subset X_\mathrm{out}}\mathcal{D}_\hbar A_{e_\mathrm{out}}$$
with $\mathcal{D}_\hbar B_{e^\vee}$, $\mathcal{D}_\hbar A_e$ defined as in Section \ref{sec: normalization}.

Denoting by $\mu_\mathrm{bulk}^{1/2}\in \mathrm{Dens}^{\frac12}\mathcal{F}_b$ the half-density on $\mathcal{F}_b$ associated to the cellular basis,
by $\mu^{1/2}=\mu_{\mathcal{B}_\partial}^{1/2
\cdot \mu_\mathrm{bulk}^{1/2}$ the half-density on $\mathcal{F}$,
and by $\mu_\hbar^{1/2}=(\mu_{\mathcal{B}_\partial}^\hbar)^{1/2}\cdot (\mu_\mathrm{bulk}^\hbar)^{1/2}$ the corresponding normalized half-density,
we can rewrite (\ref{QME with bdry term}) as
\begin{equation} \left(\frac{i}{\hbar}\widehat S_\partial^\mathrm{can}-i\hbar\; \Delta_\mathrm{bulk}^\mathrm{can}\right)\;\underbrace{\left(e^{\frac{i}{\hbar}S(A,B)}\mu^{1/2}_\hbar\right)}_{\in \mathcal{H}^\mathrm{can}_\partial\widehat\otimes \mathrm{Dens}^{\frac12,\mathrm{C}^\infty}_\mathbb{C}(\mathcal{F}_b)}=0\label{QME with bdry term, half-densities}\end{equation}
Here $\widehat S_\partial^\mathrm{can}$, $\Delta_\mathrm{bulk}^\mathrm{can}$ are the half-density (``canonical'') versions of the quantum BFV action and of the BV Laplacian, defined by
$$\widehat S_\partial^\mathrm{can}\left(\phi\cdot (\mu_\mathcal{B}^\hbar)^{1/2}\right)=\widehat S_\partial\left(\phi\right)\cdot (\mu_\mathcal{B}^\hbar)^{1/2},\qquad \Delta_\mathrm{bulk}^\mathrm{can}\left(f\cdot (\mu_\mathrm{bulk}^\hbar)^{1/2}\right)=\Delta_\mathrm{bulk}\left(f\right)\cdot (\mu_\mathrm{bulk}^\hbar)^{1/2}$$
for $\phi\in \mathcal{H}$ and $f\in \mathrm{C}^\infty(\mathcal{F}_b)$.
We denote by
$$\mathcal{H}^\mathrm{can}_\partial=\mathrm{Dens}^{\frac12,\mathrm{C}^\infty}_\mathbb{C}(\mathcal{B}_\partial)$$
the version of the space of states where states are regarded as half-densities on $\mathcal{B}_\partial$;
the superscript $\mathrm{C}^\infty$ means that we allow half-densities to depend on coordinates, the subscript $\mathbb{C}$ stands for tensoring the space of half-densities with complex numbers.

\subsection{Bulk gauge fixing}\label{sec 7.1 gauge-fixing}
Let us choose a realization of relative cohomology
$\mathbf{i}: H^\bullet(M,M_\mathrm{out})\rightarrow C^\bullet_\mathrm{closed}(X,X_\mathrm{out} )$
and a section $\mathbf{K}$ of $C^\bullet(X,X_\mathrm{out} )\xrightarrow{d} C^{\bullet+1}_\mathrm{exact}(X,X_\mathrm{out} )$. We have the Hodge decomposition
\begin{equation} C^\bullet(X,X_\mathrm{out} )=\mathrm{im}(\mathbf{i})\oplus C^\bullet_\mathrm{exact}(X,X_\mathrm{out} )\oplus \mathrm{im}(\mathbf{K}) \label{Hodge decomp}\end{equation}
We extend $\mathbf{K}$ by zero on the first two terms on the r.h.s. to a map $\mathbf{K}: C^\bullet(X,X_\mathrm{out} )\rightarrow C^{\bullet-1}(X,X_\mathrm{out} )$. Denote by $\mathbf{p}: C^\bullet(X,X_\mathrm{out} )\rightarrow H^\bullet(X,X_\mathrm{out} )$ the projection to cohomology arising from the decomposition (\ref{Hodge decomp}).
Using Poincar\'e-Lefschetz duality for cohomology and cochains, we construct the dual (transpose) maps
\begin{align*}
\mathbf{i}^\vee=\mathbf{p}^*:&\quad H^\bullet(M,M_\mathrm{in})\rightarrow C^\bullet_\mathrm{closed}(X^\vee,X^\vee_\mathrm{in}), \\
\mathbf{p}^\vee=\mathbf{i}^*:&\quad  C^\bullet(X^\vee,X^\vee_\mathrm{in})\rightarrow H^\bullet(M,M_\mathrm{in}), \\
\mathbf{K}^\vee_k=(-1)^{n-k} (\mathbf{K}_{n-k+1})^*:&\quad  C^k(X^\vee,X^\vee_\mathrm{in})\rightarrow C^{k-1}(X^\vee,X^\vee_\mathrm{in})
\end{align*}
Then we have the dual Hodge decomposition for cochains of the dual complex:
\begin{equation} C^\bullet(X^\vee,X^\vee_\mathrm{in})=\mathrm{im}(\mathbf{i}^\vee)\oplus C^\bullet_\mathrm{exact}(X^\vee,X^\vee_\mathrm{in})\oplus \mathrm{im}(\mathbf{K}^\vee) \label{Hodge decomp dual}\end{equation}

In other words, we chose some induction data $C^\bullet(X,X_\mathrm{out})\wavy{(\mathbf{i},\mathbf{p},\mathbf{K})} H^\bullet(M,M_\mathrm{out})$ and inferred the dual one $C^\bullet(X^\vee,X^\vee_\mathrm{in})\wavy{(\mathbf{i}^\vee,\mathbf{p}^\vee,\mathbf{K}^\vee)} H^\bullet(M,M_\mathrm{in})$ using the construction (\ref{dual ind data}).

Hodge decompositions (\ref{Hodge decomp},\ref{Hodge decomp dual}) together
yield the symplectic splitting
$$\mathcal{F}_b=(\mathbf{i}\oplus\mathbf{i}^\vee
\mathcal{F}^\mathrm{res}_
\oplus \mathcal{F}_\mathrm{fluct}$$
where
\begin{equation} \mathcal{F}^\mathrm{res}_b=H^\bullet(M,M_\mathrm{out})[1]\oplus H^\bullet(M,M_\mathrm{in})[n-2]\label{bulk zero-modes}\end{equation}
is our choice for the space of bulk {residual fields},
and we have a Lagrangian subspace $\mathcal{L}=\mathrm{im}(\mathbf{K})[1]\oplus \mathrm{im}(\mathbf{K}^\vee)[n-2]\subset \mathcal{F}_\mathrm{fluct}$.

\subsection{Perturbative partition function: integrating out bulk fields}
\label{sec 7.2 Z pert}

Substituting in the action (\ref{S with bdry term}) the decomposition of fields into coordinates on $\mathcal{B}_\partial$, bulk {residual fields} and fluctuations, we have
\begin{multline*}
S(A,B)=S(\widetilde{A_\mathrm{out}} +A_\mathrm{res}+A_\mathrm{fluct} \;,\; \widetilde{ B_\mathrm{in}}+B_\mathrm{res}+B_\mathrm{fluct}) = \\
=\langle B_\mathrm{res}, \phi(A_\mathrm{out}) \rangle - \langle \phi^\vee (B_\mathrm{in}), A_\mathrm{res}  \rangle+
\langle B_\mathrm{fluct}, \phi(A_\mathrm{out}) \rangle - \\
- \langle \phi^\vee (B_\mathrm{in}), A_\mathrm{fluct}  \rangle+
\langle B_\mathrm{fluct}, dA_\mathrm{fluct}\rangle= \\
=\langle \left.B_\mathrm{res}\right|_\mathrm{out}, A_\mathrm{out} \rangle_\mathrm{out} + \langle B_\mathrm{in}, \left.A_\mathrm{res}\right|_\mathrm{in}  \rangle_\mathrm{in} + \\ +
\left\langle B_\mathrm{fluct}+\mathbf{K}^\vee\phi^\vee(B_\mathrm{in}) \;,\;d(A_\mathrm{fluct}+\mathbf{K}\phi(A_\mathrm{out}))  \right\rangle-\langle \phi^\vee(B_\mathrm{in})\;,\; \mathbf{K}\phi(A_\mathrm{out})\rangle
\end{multline*}
We are suppressing the inclusions $\mathbf{i},\mathbf{i}^\vee$ in bulk residual fields\  $\mathbf{i}A_\mathrm{res},\mathbf{i}^\veeB_\mathrm{res}$ in the notation.

The fiber BV integral over bulk fields yields
\begin{multline}
Z(\underbrace{A_\mathrm{out} ,B_\mathrm{in}}_b; A_\mathrm{res},B_\mathrm{res})
\\
=\int_{\mathcal{L}\subset\mathcal{F}_\mathrm{fluct}\subset  \mathcal{F}_b} e^{\frac{i}{\hbar}S(\widetilde{A_\mathrm{out}} +A_\mathrm{res}+A_\mathrm{fluct} \;,\; \widetilde{ B_\mathrm{in}}+B_\mathrm{res}+B_\mathrm{fluct})}\mu^{1/2}_\hbar = \\
= e^{\frac{i}{\hbar} \langle  \left.B_\mathrm{res}\right|_\mathrm{out}, A_\mathrm{out}  \rangle_\mathrm{out} +
 \langle B_\mathrm{in}, \left. A_\mathrm{res}\right|_\mathrm{in}\rangle_\mathrm{in} - \langle \phi^\vee(B_\mathrm{in}) \;,\; \mathbf{K} \phi(A_\mathrm{out})  \rangle
}\cdot \\
\cdot \left(\int_\mathcal{L} e^{\frac{i}{\hbar}S(A_\mathrm{fluct}+\mathbf{K}\phi(A_\mathrm{out}),B_\mathrm{fluct}+\mathbf{K}^\vee\phi^\vee(B_\mathrm{in}))
} (\mu_\mathrm{bulk}^\hbar)^{1/2}\right) (\mu_\mathcal{B}^\hbar)^{1/2}
\label{Z integrating out bulk fields}
\end{multline}
\begin{Proposition}\label{prop: Z}
\begin{enumerate}[(i)]
\item \label{prop: Z (i)} Explicitly, the partition function (\ref{Z integrating out bulk fields}) is
\begin{multline} Z(B_\mathrm{in},A_\mathrm{out};A_\mathrm{res},B_\mathrm{res})= \\ =
e^{\frac{i}{\hbar}  \langle \left. B_\mathrm{res} \right|_\mathrm{out}, A_\mathrm{out}  \rangle_\mathrm{out} +
\langle B_\mathrm{in}, \left. A_\mathrm{res} \right|_\mathrm{in}\rangle_\mathrm{in}
- \langle \phi^\vee(B_\mathrm{in}) \;,\; \mathbf{K} \phi(A_\mathrm{out})  \rangle}
\;\xi_\hbar^{H^\bullet(M,M_\mathrm{out})}\cdot\underbrace{\tau(M,M_\mathrm{out})}_{\in \mathrm{Dens}^{\frac12}\mathcal{F}_b^\mathrm{res}}\cdot(\mu_{\mathcal{B}_\partial}^\hbar)^{1/2}\quad \in \\
\in \mathcal{H}^\mathrm{can}_\partial\widehat\otimes \mathrm{Dens}^{\frac12,\mathrm{C}^\infty}_\mathbb{C}(\mathcal{F}_b^\mathrm{res})
\label{Z integrating out bulk fields result}
\end{multline}
where $\tau(M,M_\mathrm{out} )\in \mathrm{Det}\; H^\bullet(M,M_\mathrm{out})/\{\pm 1\}$ is the R-torsion and normalization factor is $\xi_\hbar^{H^\bullet(M,M_\mathrm{out})}=\prod_{k=0}^n (\xi_\hbar^k)^{\dim H^k(M,M_\mathrm{out})}$ with $\xi_\hbar^k$ as in (\ref{xi_hbar^k}).
\item \label{prop: Z (ii)} The partition function satisfies the quantum master equation
\begin{equation}\left(\frac{i}{\hbar}\widehat S_\partial^\mathrm{can}-i\hbar\; \Delta_\mathrm{res}^\mathrm{can}\right) Z(A_\mathrm{out},B_\mathrm{in};A_\mathrm{res},B_\mathrm{res}) =0\label{QME with bdry term for Z}\end{equation}
where $\Delta_\mathrm{res}=\left\langle \frac{\partial}{\partial A_\mathrm{res}} , \frac{\partial}{\partial B_\mathrm{res}} \right\rangle$ is the BV Laplacian on $\mathrm{C}^\infty(\mathcal{F}_b^\mathrm{res})$ and $\Delta_\mathrm{res}^\mathrm{can}$ is the corresponding BV Laplacian on half-densities.
\item \label{prop: Z (iii)} Deformation of the induction data $C^\bullet(X,X_\mathrm{out})\wavy{(\mathbf{i},\mathbf{p},\mathbf{K})} H^\bullet(M,M_\mathrm{out})$ induces a 
transformation of the partition function of the form
    $$Z \;\mapsto\; Z+ \left(\frac{i}{\hbar}\widehat S_\partial^\mathrm{can}-i\hbar\; \Delta_\mathrm{res}^\mathrm{can}\right) (\cdots) $$
\end{enumerate}
\end{Proposition}

\begin{proof} Part (\ref{prop: Z (i)}) is a straightforward computation of the Gaussian integral over fluctuations in (\ref{Z integrating out bulk fields}).

Part (\ref{prop: Z (ii)}) is a consequence of (\ref{QME with bdry term, half-densities}) and the BV Stokes' theorem: one has
\begin{multline*}
\left(\frac{i}{\hbar}\widehat S_\partial^\mathrm{can}-i\hbar\; \Delta_\mathrm{res}^\mathrm{can}\right) Z = \int_{\mathcal{L}\subset\mathcal{F}_\mathrm{fluct}} \left(\frac{i}{\hbar}\widehat S_\partial^\mathrm{can}-i\hbar\; \Delta^\mathrm{can}_\mathrm{bulk}\right)\left(e^{\frac{i}{\hbar}S(A,B)}\mu_\hbar^{1/2}\right)+\\
+\int_{\mathcal{L}\subset\mathcal{F}_\mathrm{fluct}} i\hbar\;\Delta^\mathrm{can}_\mathrm{fluct} \left(e^{\frac{i}{\hbar}S(A,B)}\mu_\hbar^{1/2}\right) =0
\end{multline*}
with $\Delta^\mathrm{can}_\mathrm{fluct}=\left\langle \frac{\partial}{\partial A_\mathrm{fluct}} , \frac{\partial}{\partial B_\mathrm{fluct}} \right\rangle$ the BV Laplacian on coordinate-dependent half-densities on the space of bulk fluctuations.

For part (\ref{prop: Z (iii)}), it suffices to consider a general {\it infinitesimal} deformation of the induction data, given as a sum of deformations of the three types  (\ref{ind data deformation I},\ref{ind data deformation II},\ref{ind data deformation III}), cf. Section \ref{sec: deformations of ind data}, with
$\Lambda: C^\bullet_\mathrm{exact}(X,X_\mathrm{out})\rightarrow \mathrm{im}(\mathbf{K})^{\bullet-2}$,  $I: H^\bullet(M,M_\mathrm{out})\rightarrow \mathrm{im}(\mathbf{K})^{\bullet-1}$, $P:C^\bullet_\mathrm{exact}(X,X_\mathrm{out})\rightarrow H^{\bullet-1}(M,M_\mathrm{out})$ the corresponding generators. Using the explicit formula for the partition function (\ref{Z integrating out bulk fields result}), one can check directly that the effect of such a deformation on $Z$ is given by
$$
Z\;\mapsto Z +\left(\frac{i}{\hbar}\widehat S_\partial^\mathrm{can}-i\hbar\; \Delta_\mathrm{res}^\mathrm{can}\right) R
$$
with
$$
R= Z\cdot \left(-\langle \left. I^\vee(B_\mathrm{res}) \right|_\mathrm{out},A_\mathrm{out}  \rangle_\mathrm{out} +
\langle B_\mathrm{in}, \left. I(A_\mathrm{res}) \right|_\mathrm{in}\rangle_\mathrm{in}-\langle \phi^\vee(B_\mathrm{in}) \;,\; \widetilde\Lambda \phi(A_\mathrm{out})  \rangle \right)
$$
Here $\widetilde\Lambda=\Lambda d K: C^\bullet(X,X_\mathrm{out})\rightarrow C^{\bullet-2}(X,X_\mathrm{out})$ is the extension of $\Lambda$ from exact to all cochains, by zero on the first and third terms of (\ref{Hodge decomp}); the map $I^\vee:H^\bullet(M,M_\mathrm{in})\rightarrow \mathrm{im}(\mathbf{K})^{\bullet-1}$ is defined as $(I^\vee)_k=(-1)^{n-k} (P_{n-k+1})^*$.
\end{proof}

\begin{comment}
In the calculation of the Gaussian integral over fluctuations of fields, we use that
\begin{multline*}
S(A_\mathrm{fluct},B_\mathrm{fluct})+\langle (B_\mathrm{fluct}, \phi(A_\mathrm{out})  \rangle -(-1)^{n}
\langle \phi^\vee(B_\mathrm{in}), A_\mathrm{fluct}\rangle =\\
=S\left(A_\mathrm{fluct}+K\phi(A_\mathrm{out}) \,,\, B_\mathrm{fluct}+K^\vee\phi^\vee(B_\mathrm{in}) \right)+(-1)^n\langle \phi^\vee(B_\mathrm{in})\;,\; K\phi(A_\mathrm{out})\rangle
\end{multline*}
\end{comment}

\begin{remark}
Recall that, by Poincar\'e duality for torsions \cite{Milnor62}, one can relate the relative and absolute torsions as $\tau(M,M_\mathrm{out})=\tau(M,M_\mathrm{in})^{(-1)^{n-1}}$. In particular, a more symmetric way to write the evaluation of the Gaussian integral over the fluctuation part of fields in (\ref{Z integrating out bulk fields}) is:
$$(\tau(M,M_\mathrm{out})\cdot \tau(M,M_\mathrm{in})^{(-1)^{n-1}})^{\frac12}\in  \left(\mathrm{Det}\; H^\bullet(M,M_\mathrm{out})\otimes (\mathrm{Det}\; H^\bullet(M,M_\mathrm{in}))^{(-1)^{n-1}}\right)^{\otimes \frac{1}{2}}/\{\pm 1\}$$
\end{remark}


\begin{remark} In the case $H^\bullet(M,M_\mathrm{out})=0$ (and hence $H^\bullet(M,M_\mathrm{in})=0$, too), formula (\ref{Z integrating out bulk fields}) simplifies to
$$Z(A_\mathrm{out},B_\mathrm{in})=e^{-\frac{i}{\hbar}\langle \phi^\vee(B_\mathrm{in}) \;,\; \mathbf{K} \phi(A_\mathrm{out})  \rangle}  \cdot \underbrace{\tau(M,M_\mathrm{out})}_{\in \mathbb{R}/\{\pm 1\}}\cdot(\mu_{\mathcal{B}_\partial}^\hbar)^{1/2}$$
The $R$-torsion in this formula is a nonzero real number defined modulo sign. In the case $M_\mathrm{in}=\varnothing$, we also have a simplification:
$$Z(A_\mathrm{out}; A_\mathrm{res},B_\mathrm{res})=
e^{\frac{i}{\hbar} \langle \left.B_\mathrm{res}\right|_\mathrm{out}, A_\mathrm{out}  \rangle_\mathrm{out} }
\cdot\xi_\hbar^{H^\bullet(M,M_\mathrm{out})}\tau(M,M_\mathrm{out})\cdot(\mu_{\mathcal{B}_\partial}^\hbar)^{1/2}
$$
and similarly in case $M_\mathrm{out}=\varnothing$.
\end{remark}

\begin{remark}\label{rem: propagator cob}
The propagator can be introduced as the parametrix  $\mathbb{K}\in C^{n-1}(X\times X^\vee; p_1^* E_X\otimes p_2^* E^*_{X^\vee})$ for $\mathbf{K}$, exactly as in Section \ref{rem: propagator, closed case}. Equations (\ref{propagator},\ref{propagator equations}) hold without changes (with the correction that $\chi_\alpha$, $\chi^\vee_\alpha$ are now the representatives of relative cohomology $H^\bullet(M,M_\mathrm{out})$, $H^{n-\bullet}(M,M_\mathrm{in})$). Now the propagator satisfies additionally the boundary conditions
$$\mathbb{K}(e,e^\vee)=0\quad\mbox{ if }\; e \in X_\mathrm{out} \;\mbox{ or}\;\; e^\vee\in X_\mathrm{in}^\vee $$
\end{remark}

\begin{comment}
Note that changing the gauge fixing data (maps $\mathbf{i},K,\mathbf{i}^\vee,K^\vee$) induces a change of perturbative partition function $Z$ by an exact term (in the sense of the coboundary operator appearing in l.h.s. of (\ref{QME with bdry term for Z})). More precisely, if $\mathbf{i}^\vee_\mathrm{new}-\mathbf{i}^\vee_\mathrm{old}=d\circ \kappa$ with some map $\kappa: H^\bullet(M)\rightarrow C^{\bullet-1}(X^{\vee_-})$, we have
$$Z_\mathrm{new}-Z_\mathrm{old}= \left(-\frac{i}{\hbar}\widehat S_\partial^\mathrm{can}-i\hbar\; \Delta_\mathrm{z.m.}^\mathrm{can}\right)\left(\cdots\right)$$
\end{comment}


\subsection{Gluing}
\label{sec: quantum gluing}
Consider the situation of Section \ref{sec: class gluing}, i.e. a glued cobordism
\begin{equation} M_1\cob{M}M_3\quad =\quad M_1\cob{M_I}M_2\cob{M_{II}}M_3 \label{glued cobordism}\end{equation}
with a glued cellular decomposition
$$X_1\cob{X}X_3\quad =\quad X_1\cob{X_I}X_2\cob{X_{II}}X_3$$ (and the dual one).
Our goal of this Section is obtain an Atiyah-Segal-type gluing formula, expressing the partition function for $(M,X)$ in terms of partition functions for $(M_I,X_I)$ and $(M_{II},X_{II})$.

The zeroth approximation to the expected formula is:
$$Z(B_1,A_3)=\int_{\mathcal{B}_2^{(A)}\times \mathcal{B}_2^{(B)}} Z_I(B_1,A_2) \left[(\mathcal{D}_\hbar A_2)^{1/2}\cdot e^{-\frac{i}{\hbar}\langle B_2,A_2 \rangle} \cdot (\mathcal{D}_\hbar B_2)^{1/2}\right] Z_{II}(B_2,A_3) $$
where the integral is taken over the space of leaves (base) $\mathcal{B}_2^{(A)}$ of $A$-polarization on the interface $(M_2,X_2)$, parameterized by $A_2$, and over the space of leaves $\mathcal{B}_2^{B}$ of $B$-polarization on the interface, parameterized by $B_2$. In the formula above we are ignoring (for the moment) the issue that spaces of
residual fields 
on left and right hand sides are generally different.

Consider the expression\footnote{
We are putting asterisks on boundary conditions $A_2^*$, $B_2^*$ at $X_2$ to distinguish them from the components $A_2^{II},B_2^I$ of bulk fields -- coordinates on fibers of $\mathcal{F}_{II}\rightarrow \mathcal{B}_2^{(B)}$ and $\mathcal{F}_{I}\rightarrow \mathcal{B}_2^{(A)}$, respectively. In other words, in (\ref{S_I+S_II-(B,A)}) we are counting each cell of $X_2$, $X_2^\vee$ twice: once as a boundary condition and once as a part of bulk fields.}
\begin{equation} S(\underbrace{A_I}_{\mathrm{s.t.\;} A_I|_{X_2}=A_2^*},B_I) \;+\; S(A_{II},\underbrace{B_{II}}_{\mathrm{s.t.\;} B_{II}|_{X_2^\vee}=B_2^*})-\langle B_2^*,A_2^* \rangle \label{S_I+S_II-(B,A)}\end{equation}
The second term here 
contains a boundary term $\langle B_2^*,A_2^{II}\rangle$ and no other terms dependent on $B_2^*$. Therefore, integrating out $B_2^*$, we impose the constraint $A_2^*=A_2^{II}$.
Integrating out both $A_2^*$ and $B_2^*$, we obtain the action on the whole (glued) cobordism,
i.e.
\begin{equation} e^{\frac{i}{\hbar}S(A,B)}=\int_{\mathcal{B}_2^{(A)}\times \mathcal{B}_2^{(B)}} \mathcal{D}_\hbar A_2^*\; \mathcal{D}_\hbar B_2^*\;\; e^{-\frac{i}{\hbar}\langle B_2^*,A_2^* \rangle}\cdot e^{\frac{i}{\hbar} S(\widetilde A_2^*+p_I^\mathrm{rel}(A),p_I(B))}\cdot e^{\frac{i}{\hbar}S( p_{II}(A), \widetilde B_2^*+p_{II}^\mathrm{rel}(B) ) } \label{gluing e^S}\end{equation}
Here $p_I$, $p_{II}$ is the projection of fields on $X$ to fields on $X_I$, $X_{II}$, respectively (by restriction); $p_{I,II}^\mathrm{rel}$ is the projection to cochains on $X_I$ or $X_{II}$ (resp. the dual complexes)  vanishing on $X_2$, e.g. $p_I^\mathrm{rel}(A)=p_I(A)-\widetilde {A|_{X_2}}\in C^\bullet(X_I,X_2)$. Note that normalization of the integration measure coming from conventions of Section \ref{sec: normalization} works
correctly here.\footnote{\label{footnote: gluing normalization check}Indeed, for a $k$-cell $e\subset X_2$ we have $\int \mathcal{D}_\hbar B_{\varkappa_2(e)}^* \mathcal{D}_\hbar A_e^*\quad e^{-\frac{i}{\hbar} \langle B^*_{\varkappa_2(e)} , A^*_e \rangle_E}=(\underbrace{\xi_\hbar^{n-\dim \varkappa_2(e)} \xi_\hbar^{\dim e}}_{\xi_\hbar^{k+1}\xi_\hbar^k})^{\mathrm{rk} E}\cdot \left\{ \begin{array}{cl} (2\pi \hbar)^{\mathrm{rk}E} & \mathrm{if}\; k \;\mathrm{odd} \\ \left(\frac{i}{\hbar}\right)^{\mathrm{rk}E} & \mathrm{if}\; k \;\mathrm{even}\end{array} \right.=1$}

If we fix boundary conditions for fields in (\ref{gluing e^S}), $B_1$ on $X_1^\vee$ and $A_3$ on $X_3$, the l.h.s. of (\ref{gluing e^S}) becomes a function on $\mathcal{F}_{B_1,A_3}\simeq \mathcal{F}_{\mathcal{B}_1,0}^I\times \mathcal{F}_{0,A_3}^{II}$ (where subscripts denote the boundary conditions, as in (\ref{F_b}), and $\simeq$ is a symplectomorphism). Using the gauge-fixing on $X_I$, $X_{II}$, we can evaluate the fiber BV integral of (\ref{gluing e^S}), yielding a function of {\it composite} {residual fields} $\mathcal{F}^\mathrm{comp.\;\mathrm{res}}_{B_1, A_3}=\mathcal{F}^{I\;\mathrm{res}}_{B_1,0}\times \mathcal{F}^{II\;\mathrm{res}}_{0,A_3}$:
\begin{multline}\label{Z composite}
Z^\mathrm{comp.\;\mathrm{res}}(B_1,A_3;A_\mathrm{res}^I,A_\mathrm{res}^{II},B_\mathrm{res}^I,B_\mathrm{res}^{II})=\\
=\int_{\mathcal{B}^{(A)}_2\times \mathcal{B}^{(B)}_2} Z_I(B_1,A_2;A_\mathrm{res}^I,B_\mathrm{res}^I) \left[(\mathcal{D}_\hbar A_2)^{1/2}\cdot e^{-\frac{i}{\hbar}\langle B_2,A_2 \rangle} \cdot (\mathcal{D}_\hbar B_2)^{1/2}\right] Z_{II}(B_2,A_3;A_\mathrm{res}^{II},B_\mathrm{res}^{II})
\end{multline}
The next step is to pass from the composite {residual fields} in the expression above to standard bulk {residual fields} (\ref{bulk zero-modes}) on $X$.

\subsubsection{Gluing bulk {residual fields}}
Consider the cochain complex
\begin{equation} C^\bullet(X,X_3)\simeq C^\bullet(X_I,X_2)\oplus  C^\bullet(X_{II},X_3) \label{gluing cochains}\end{equation}
Note that this is an isomorphism of (based) graded vector spaces but not of cochain complexes: the differential on the l.h.s. has the block triangular form
\begin{equation} d_{C^\bullet(X,X_3)}=\left(\begin{array}{cc} d_I & \phi_I p_2 \\ 0 & d_{II} \end{array}\right) \label{d upper triangular}\end{equation}
where $p_2: C^\bullet(X_{II},X_3)\rightarrow C^\bullet(X_2)$ is the restriction to the interface; $\phi_I: C^\bullet(X_2)\rightarrow C^{\bullet+1}(X_I,X_2)$ is as in (\ref{phi def}). Similarly, for the dual cochain complex, we have
\begin{equation} C^\bullet(X^\vee,X_1^\vee)\simeq C^\bullet(X_I^\vee,X_1^\vee)\oplus C^\bullet(X_{II}^\vee,X_2^\vee),\qquad
d_{C^\bullet(X^\vee,X_1^\vee)}=\left(\begin{array}{cc} d_I^\vee & 0 \\ \phi_{II}^\vee p_2^\vee & d_{II}^\vee \end{array}\right) \label{gluing dual cochains}\end{equation}
with $p_2^\vee:C^\bullet(X_I^\vee,X_1^\vee)\rightarrow C^\bullet(X_2^\vee) $ and $\phi_{II}^\vee: C^\bullet(X_2^\vee)\rightarrow C^{\bullet+1}(X_{II}^\vee,X_2^\vee)$.

Returning to decomposition (\ref{gluing cochains}), we would like to view the total differential (\ref{d upper triangular}) as the diagonal part (the standard differential on the r.h.s. of (\ref{gluing cochains})) plus a strictly upper-triangular perturbation:

\begin{equation} d_{C^\bullet(X,X_3)}=\left(\begin{array}{cc} d_I & 0 \\ 0 & d_{II} \end{array}\right)+\left(\begin{array}{cc} 0 & \phi_I p_2 \\ 0 & 0 \end{array}\right) \label{d decomposition}\end{equation}
By homological perturbation lemma (Lemma \ref{lemma: homological perturbation}),
using the direct sum induction data
\begin{equation} C^\bullet(X_I,X_2)\oplus C^\bullet(X_{II},X_3),\;d_I\oplus d_{II}\quad \wavy{(\mathbf{i}_I\oplus \mathbf{i}_{II},\mathbf{p}_I\oplus \mathbf{p}_{II},\mathbf{K}_I\oplus \mathbf{K}_{II})}\quad H^\bullet(M_I,M_2)\oplus H^\bullet(M_{II},M_3) \label{C_I+C_II retraction}\end{equation}
we
construct the induced differential
\begin{equation} \mathfrak{D}=  \left(\begin{array}{cc} 0 & \mathbf{p}_I (\phi_I p_2) \mathbf{i}_{II} \\ 0 & 0 \end{array}\right) \label{delta}\end{equation}
on the cohomology $H^\bullet(M_I,M_2)\oplus H^\bullet(M_{II},M_3)$ of the first term in r.h.s. of (\ref{d decomposition}), such that cohomology of $\mathfrak{D}$ is isomorphic to $H^\bullet(M,M_3)$. Higher terms in the series for the induced differential vanish due to the special (upper-triangular) form of the perturbation of the differential.

In purely cohomological terms, without resorting to cochains, $\mathfrak{D}$ is the composition of the natural map $H^\bullet(M_{II},M_3)\rightarrow H^\bullet(M_2)$ (pullback by the inclusion $M_2\hookrightarrow M_{II}$ ) and the connecting homomorphism $H^\bullet(M_2)\rightarrow H^{\bullet+1}(M_I,M_2)$ in the long exact sequence of the pair $(M_I,M_2)$.

Choose some induction data
\begin{equation} H^\bullet(M_I,M_2)\oplus H^\bullet(M_{II},M_3),\;\mathfrak{D} \quad \wavy{(i_\mathrm{gres},p_\mathrm{gres},K_\mathrm{gres})} \quad  H^\bullet(M,M_3) \label{gzm retraction}\end{equation}
(``$\mathrm{gres}$'' stands for ``gluing of {residual fields}'').
This, together with the dual induction data (in the sense of Section \ref{sec: induction data for dual and sym}),
\begin{equation} H^\bullet(M_I,M_1)\oplus H^\bullet(M_{II},M_2),\;\mathfrak{D}^\vee \quad \wavy{(i_\mathrm{gres}^\vee,p_\mathrm{gres}^\vee,K_\mathrm{gres}^\vee)} \quad  H^\bullet(M,M_1) \label{gzm dual}\end{equation}
gives a splitting of the composite residual fields\  into standard residual fields\  plus a complement, and a Lagrangian in the complement:
$$
\mathcal{F}^\mathrm{comp.\;z.m.}_{B_1,A_3}=(i_\mathrm{gres}\oplus i_\mathrm{gres}^\vee)\mathcal{F}^\mathrm{res}_{B_1,A_3}\oplus
\rlap{$\overbrace{\phantom{\left(\mathrm{im}(\mathfrak{D})[1]\oplus \mathrm{im}(\mathfrak{D}^\vee)[n-2]\right)\oplus \left(\mathrm{im}(K_\mathrm{gres})[1]\oplus \mathrm{im}(K_\mathrm{gres}^\vee)[n-2]\right)}}^{\mathcal{F}_\mathrm{gres}^\mathrm{fluct}}$}
\left(\mathrm{im}(\mathfrak{D})[1]\oplus \mathrm{im}(\mathfrak{D}^\vee)[n-2]\right)\oplus \underbrace{\left(\mathrm{im}(K_\mathrm{gres})[1]\oplus \mathrm{im}(K_\mathrm{gres}^\vee)[n-2]\right)}_{\mathcal{L}_\mathrm{gres}} $$

Using this gauge-fixing data, we can construct the pushforward of (\ref{Z composite}) to the standard residual fields\ using the fiber BV integral.
\begin{Proposition}\label{prop: gluing}
The partition function of the glued cobordism $(M_1,X_1)\cob{(M,X)} (M_3,X_3)$ can be expressed in terms of the partition functions for constituent cobordisms $(M_1,X_1)\cob{(M_I,X_I)}(M_2,X_2)$, $(M_2,X_2)\cob{(M_{II},X_{II})}(M_3,X_3)$ as an integral over boundary conditions on the interface $(M_2,X_2)$ and the fiber BV integral for gluing the bulk residual fields:
\begin{multline}\label{gluing formula}
Z(B_1,A_3; A_\mathrm{res},B_\mathrm{res})= \\
=\int_{\mathcal{L}_\mathrm{gres}\subset \mathcal{F}_\mathrm{gres}^\mathrm{fluct}}
\int_{\mathcal{B}^{(A)}_2\times \mathcal{B}^{(B)}_2} Z_I\left(\rlap{$\phantom{e^{\frac{i}{\hbar}}}$}
B_1,A_2;i_\mathrm{gres}^I(A_\mathrm{res})+A_\mathrm{gres}^{\mathrm{fluct},I},i_\mathrm{gres}^{\vee,I}(B_\mathrm{res})+B_\mathrm{gres}^{\mathrm{fluct},I}\right)\cdot \\
\cdot\left[(\mathcal{D}_\hbar A_2)^{1/2}\cdot e^{-\frac{i}{\hbar}\langle B_2,A_2 \rangle} \cdot (\mathcal{D}_\hbar B_2)^{1/2}\right]\cdot \\
\cdot Z_{II}\left(
\rlap{$\phantom{e^{\frac{i}{\hbar}}}$}
B_2,A_3;i_\mathrm{gres}^{II}(A_\mathrm{res})+A_\mathrm{gres}^{\mathrm{fluct},II},i_\mathrm{gres}^{\vee,II}(B_\mathrm{res})+B_\mathrm{gres}^{\mathrm{fluct},II}\right)
\end{multline}
The equality is modulo $\left(\frac{i}{\hbar}\hat S_\partial^\mathrm{can}-i\hbar\,\Delta_\mathrm{res}^\mathrm{can}\right)$-coboundaries.
\end{Proposition}

Superscripts $I$, $II$ correspond to projections to the first and second terms of
the splittings in the l.h.s. of (\ref{gzm retraction},\ref{gzm dual}) in the obvious way. Schematically, the formula (\ref{gluing formula}) can be written as
$$Z=(p_\mathrm{gres})_*(Z_I\ast Z_{II})$$
where $Z_I\ast Z_{II}$ stands for the convolution as in (\ref{Z composite}) and $(p_\mathrm{gres})_*$ stands for the BV pushforward\footnote{We use the term BV pushforward as a synonym for the fiber BV integral.}
from composite {residual fields} to the standard {residual fields}.

The statement (\ref{gluing formula}) follows by construction from general properties of fiber BV integrals and from (\ref{gluing e^S}); we will give a proof by direct computation below, after describing the gluing on the level of induction data.

\begin{Proposition}\label{prop: glued ind data}
Induction data $ C^\bullet(X,X_3)\wavy{(\mathbf{i}_\mathrm{g},\mathbf{p}_\mathrm{g},\mathbf{K}_\mathrm{g})} H^\bullet(M,M_3)$ for the glued cobordism can be constructed in terms of the induction data for constituent cobordisms and the data (\ref{gzm retraction}) by the following formulae:
\begin{multline}\label{glued ind data}
\mathbf{i}_\mathrm{g}= \left(\begin{array}{cc} \mathbf{i}_I & -\mathbf{K}_I \phi_I p_2 \mathbf{i}_{II} \\ 0 & \mathbf{i}_{II} \end{array}\right) \left(\begin{array}{c} i_\mathrm{gres}^I \\ i_\mathrm{gres}^{II} \end{array}\right),\quad
\mathbf{p}_\mathrm{g}=\left(\begin{array}{cc} p_\mathrm{gres}^I & p_\mathrm{gres}^{II} \end{array}\right) \left(\begin{array}{cc} \mathbf{p}_I & -\mathbf{p}_I \phi_I p_2 \mathbf{K}_{II} \\ 0 & \mathbf{p}_{II} \end{array}\right),\\
\mathbf{K}_\mathrm{g}=\left(\begin{array}{cc} \mathbf{K}_I & -\mathbf{K}_I \phi_I p_2 \mathbf{K}_{II} \\ 0 & \mathbf{K}_{II} \end{array}\right)-\left(\begin{array}{cc} \mathbf{i}_I & -\mathbf{K}_I \phi_I p_2 \mathbf{i}_{II} \\ 0 & \mathbf{i}_{II} \end{array}\right) K_\mathrm{gres} \left(\begin{array}{cc} \mathbf{p}_I & -\mathbf{p}_I \phi_I p_2 \mathbf{K}_{II} \\ 0 & \mathbf{p}_{II} \end{array}\right)
\end{multline}
\end{Proposition}
(Subscript ``$\mathrm{g}$'' here stands for ``glued''.)

\begin{proof}
Indeed, we first deform the induction data in (\ref{C_I+C_II retraction}) by the upper-triangular perturbation of the differential in (\ref{d decomposition}), using the homological perturbation lemma, which yields a retraction $C^\bullet(X,X_3)\wavy{(\mathbf{i}_\mathrm{c},\mathbf{p}_\mathrm{c},\mathbf{K}_\mathrm{c})} H^\bullet(M_I,M_2)\oplus H^\bullet(M_{II},M_3),\mathfrak{D} $ with
\begin{equation} \mathbf{i}_\mathrm{c}=\left(\begin{array}{cc} \mathbf{i}_I & -\mathbf{K}_I \phi_I p_2 \mathbf{i}_{II} \\ 0 & \mathbf{i}_{II} \end{array}\right),\quad
\mathbf{p}_\mathrm{c}=\left(\begin{array}{cc} \mathbf{p}_I & -\mathbf{p}_I \phi_I p_2 \mathbf{K}_{II} \\ 0 & \mathbf{p}_{II} \end{array}\right),\quad
\mathbf{K}_\mathrm{c}=\left(\begin{array}{cc} \mathbf{K}_I & -\mathbf{K}_I \phi_I p_2 \mathbf{K}_{II} \\ 0 & \mathbf{K}_{II} \end{array}\right) \label{glued ind data (composite)}\end{equation}
(Subscript ``$\mathrm{c}$'' for stands for ``composite {residual fields}''.)
Then we compose it with  the retraction (\ref{gzm retraction}), using construction (\ref{composition of ind data}), which yields the retraction $ C^\bullet(X,X_3)\wavy{(\mathbf{i}_\mathrm{g},\mathbf{p}_\mathrm{g},\mathbf{K}_\mathrm{g})} H^\bullet(M,M_3)$ given by (\ref{glued ind data}).
\end{proof}

\begin{comment}
\begin{remark}\label{rem: glued ind data}
As follows from the construction, l.h.s and r.h.s. of (\ref{gluing formula}) coincide exactly (not modulo coboundaries)
for a special choice of gauge-fixing data in the integral (\ref{Z integrating out bulk fields}) on the glued cobordism,
namely, for the one corresponding to the induction data $C^\bullet(X,X_3)\wavy{} H^\bullet(M,M_3)$, constructed as follows. First we deform the induction data in (\ref{C_I+C_II retraction}) by the upper-triangular perturbation of the differential in (\ref{d decomposition}), using the homological perturbation lemma, which yields a retraction $C^\bullet(X,X_3)\wavy{(i_\mathrm{c},p_\mathrm{c},K_\mathrm{c})} H^\bullet(M_I,M_2)\oplus H^\bullet(M_{II},M_3),\mathfrak{D} $ with
$$i_\mathrm{c}=\left(\begin{array}{cc} \mathbf{i}_I & -K_I \phi_I p_2 \mathbf{i}_{II} \\ 0 & \mathbf{i}_{II} \end{array}\right),\quad
p_\mathrm{c}=\left(\begin{array}{cc} \mathbf{p}_I & -\mathbf{p}_I \phi_I p_2 K_{II} \\ 0 & \mathbf{p}_{II} \end{array}\right),\quad
K_\mathrm{c}=\left(\begin{array}{cc} K_I & -K_I \phi_I p_2 K_{II} \\ 0 & K_{II} \end{array}\right)$$
(Subscript ``$\mathrm{c}$'' for stands for ``composite residual fields\ ''.)
Then we compose it with  the retraction (\ref{gzm retraction}), using construction (\ref{composition of ind data}), which yields a retraction $ C^\bullet(X,X_3)\wavy{(i_\mathrm{g},p_\mathrm{g},K_\mathrm{g})} H^\bullet(M,M_3)$ with
\begin{multline*}
i_\mathrm{g}= \left(\begin{array}{cc} \mathbf{i}_I & -K_I \phi_I p_2 \mathbf{i}_{II} \\ 0 & \mathbf{i}_{II} \end{array}\right) \left(\begin{array}{c} i_\mathrm{gres}^I \\ i_\mathrm{gres}^{II} \end{array}\right),\quad
p_\mathrm{g}=\left(\begin{array}{cc} p_\mathrm{gres}^I & p_\mathrm{gres}^{II} \end{array}\right) \left(\begin{array}{cc} \mathbf{p}_I & -\mathbf{p}_I \phi_I p_2 K_{II} \\ 0 & \mathbf{p}_{II} \end{array}\right),\\
K_\mathrm{g}=\left(\begin{array}{cc} K_I & -K_I \phi_I p_2 K_{II} \\ 0 & K_{II} \end{array}\right)-\left(\begin{array}{cc} \mathbf{i}_I & -K_I \phi_I p_2 \mathbf{i}_{II} \\ 0 & \mathbf{i}_{II} \end{array}\right) K_\mathrm{gres} \left(\begin{array}{cc} \mathbf{p}_I & -\mathbf{p}_I \phi_I p_2 K_{II} \\ 0 & \mathbf{p}_{II} \end{array}\right)
\end{multline*}
(Subscript ``$\mathrm{g}$'' for ``glued''.)
\end{remark}
\end{comment}

\begin{proof}[Proof of Proposition \ref{prop: gluing}]
Let us check by a direct computation that the
l.h.s and r.h.s. of (\ref{gluing formula}) coincide exactly (not modulo coboundaries)
for a special choice of gauge-fixing data in the integral (\ref{Z integrating out bulk fields}) on the glued cobordism, -- the one associated to the induction data (\ref{glued ind data}).
Indeed, substituting explicit expressions (\ref{Z integrating out bulk fields}) into (\ref{Z composite}), we have
\begin{multline*}
Z^\mathrm{comp.\; \mathrm{res}}(B_1,A_3;A_\mathrm{res}^I,A_\mathrm{res}^{II},B_\mathrm{res}^I,B_\mathrm{res}^{II})=\\=
\int_{\mathcal{B}^{(A)}_2\times \mathcal{B}^{(B)}_2}
e^{\frac{i}{\hbar}\left(\langle \left.B^I_\mathrm{res}\right|_2,A_2 \rangle_2+\langle B_1 ,\left.A^I_\mathrm{res}\right|_1\rangle_1-\langle \phi^\vee_{1\rightarrow I}(B_1),\mathbf{K}_I\phi_{2\rightarrow I}(A_2)\rangle_I\right)}\cdot \\ \cdot
(\mathcal{D}_\hbar B_1)^{1/2}\cdot \tau_\hbar(M_I,M_2)\cdot (\mathcal{D}_\hbar A_2)^{1/2}
\cdot\left[(\mathcal{D}_\hbar A_2)^{1/2}\cdot e^{-\frac{i}{\hbar}\langle B_2,A_2 \rangle} \cdot (\mathcal{D}_\hbar B_2)^{1/2}\right]\cdot \\
\cdot e^{\frac{i}{\hbar}\left(\langle \left.B^{II}_\mathrm{res}\right|_3,A_3 \rangle_3+\langle B_2 ,\left.A^{II}_\mathrm{res}\right|_2\rangle_2-\langle \phi^\vee_{2\rightarrow II}(B_2),\mathbf{K}_{II}\phi_{3\rightarrow II}(A_3)\rangle_{II}\right)} \cdot \\
\cdot (\mathcal{D}_\hbar B_2)^{1/2}\cdot \tau_\hbar(M_{II},M_3)\cdot (\mathcal{D}_\hbar A_3)^{1/2}=
\\
=e^{\frac{i}{\hbar} \left(\langle B_1, \left.A^I_\mathrm{res}\right|_1\rangle_1+ \langle \left. B^{II}_\mathrm{res}\right|_3,A_3 \rangle_3+ \langle \left.\left(B^I_\mathrm{res}-\mathbf{K}_I^\vee\phi_{1\rightarrow I}^\vee(B_1)\right)\right|_2 , \left.\left( A^{II}_\mathrm{res}-\mathbf{K}_{II}\phi_{3\rightarrow II}(A_3) \right)\right|_2 \rangle_2 \right) }
\cdot \\
\cdot(\mathcal{D}_\hbar B_1)^{1/2}\cdot \tau_\hbar(M_I,M_2)\cdot \tau_\hbar(M_{II},M_3)\cdot (\mathcal{D}_\hbar A_3)^{1/2}
\end{multline*}
Here we use the notation $\tau_\hbar(M,M_\mathrm{out})=\xi_\hbar^{H^\bullet(M,M_\mathrm{out})}\tau(M,M_\mathrm{out})$.
Taking the Gaussian fiber BV integral over $\mathcal{L}_\mathrm{gres}\subset \mathcal{F}_\mathrm{gres}$, we obtain
\begin{multline}\label{Z glued}
Z(B_1,A_3;A_\mathrm{res},B_\mathrm{res})=\\
{\scriptstyle \exp \frac{i}{\hbar} \left( \left\langle B_1, \left.\left( i_\mathrm{gres}^I(A_\mathrm{res})- \mathbf{K}_I\phi_{2\rightarrow I} p_2 i^{II}_\mathrm{gres}(A_\mathrm{res}) \right)\right|_1 \right\rangle_1 + \left\langle  \left.\left( i^{\vee,II}_\mathrm{gres}(B_\mathrm{res})-\mathbf{K}_{II}^\vee\phi^\vee_{2\rightarrow II} p_2^\vee i_\mathrm{gres}^{\vee,I}(B_\mathrm{res}) \right)\right|_3  ,A_3 \right\rangle_3 + \right.} \\ {\scriptstyle\left. +
\langle \left.\mathbf{K}_I^\vee\phi_{1\rightarrow I}^\vee(B_1)\right|_2 , \left.\mathbf{K}_{II}\phi_{3\rightarrow II}(A_3)\right|_2 \rangle_2
-\right.} \\  {\scriptstyle \left. -\left\langle (\mathrm{id}-\phi_{2\rightarrow II}^\vee p^\vee_2 \mathbf{K}_I^\vee)\phi_{1\rightarrow I}^\vee(B_1),\;\; (\mathbf{i}_I\oplus \mathbf{i}_{II})K_\mathrm{gres} (\mathbf{p}_I\oplus \mathbf{p}_{II})\;\;(\mathrm{id}-\phi_{2\rightarrow I}p_2 \mathbf{K}_{II})\phi_{3\rightarrow II}(A_3)  \right\rangle_{I\cup II}
\right)  }\cdot\\
\cdot (\mathcal{D}_\hbar B_1)^{1/2}\cdot \underbrace{\frac{\xi_\hbar^{H^\bullet(M,M_3)}}{\xi_\hbar^{H^\bullet(M_I,M_2)}\cdot \xi_\hbar^{H^\bullet(M_{II},M_3)}}\;\mathbb{T}(\tau_\hbar(M_I,M_2)\cdot \tau_\hbar(M_{II},M_3))}_{\tau_\hbar(M,M_3)}\cdot (\mathcal{D}_\hbar A_3)^{1/2}
\end{multline}
Here $\mathbb{T}: \mathrm{Det} \left(H^\bullet(M_I,M_2)\oplus H^\bullet(M_{II},M_3)\right)\xrightarrow{\cong} \mathrm{Det} H^\bullet(M,M_3) $
is the canonical isomorphism between the determinant line of a cochain complex and the determinant line of cohomology, associated to the retraction (\ref{gzm retraction}). The factor $\frac{\xi}{\xi\cdot \xi}$  in front of $\mathbb{T}(\cdots)$ appears as in Lemma \ref{lemma: torsion as BV integral}. In the expression (\ref{Z glued}) one recognizes the r.h.s. of (\ref{Z integrating out bulk fields}) with the gauge-fixing associated to the induction data of Proposition \ref{prop: glued ind data}.
\end{proof}

\begin{remark}
Note that the formula for $\mathbf{K}_\mathrm{g}$ in (\ref{glued ind data}) is the gluing formula for propagators (cf. the analogous formula obtained in a different language in \cite{CMRpert}). In the special case $H^\bullet(M_I,M_2)=H^\bullet(M_{II},M_3)=0$ (or, more generally, $\mathfrak{D}=0$, or equivalently $H^\bullet(M,M_3)\simeq H^\bullet(M_I,M_2)\oplus H^\bullet(M_{II},M_3)$), the formula simplifies to $\mathbf{K}_\mathrm{c}$ of (\ref{glued ind data (composite)}). In terms of parametrices, in the latter case one has
\begin{multline*}
\mathbb{K}_\mathrm{c}(e_I,e_{I}^\vee)=\mathbb{K}_I(e_I,e_I^\vee), \quad \mathbb{K}_\mathrm{c}(e_{II},e_{II}^\vee)=\mathbb{K}_{II}(e_{II},e_{II}^\vee),\quad
\mathbb{K}_\mathrm{c}(e_{II},e_I^\vee)=0,\\ 
\mathbb{K}_\mathrm{c}(e_I,e_{II}^\vee)= - \sum_{e_2\in X_2} \mathbb{K}_I(e_I,\varkappa_2(e_2))\cdot \mathbb{K}_{II}(e_2,e_{II}^\vee)
\end{multline*}
\end{remark}

\subsection{Passing to the reduced space of states}\label{sec: reduced space of states}
If a state $\psi\in \mathcal{H}_\partial=\mathrm{C}^\infty_\mathbb{C}(\mathcal{B}_\partial)$ satisfies $\hat S_\partial \psi=0$, then it can be projected to the {\it reduced space of states} -- cohomology of the quantum BFV operator:
$$[\psi]\in\quad  \mathcal{H}^\mathrm{r}_\partial=H^\bullet_{\hat S_\partial}(\mathcal{H}_\partial)\cong \mathrm{C}^\infty_\mathbb{C}(
\mathcal{B}^\mathrm{r}_\partial
)$$
where $\mathcal{B}^\mathrm{r}_\partial=H^\bullet(M_\mathrm{out})[1]\oplus H^\bullet(M_\mathrm{in})[n-2]$ is the moduli space of the $Q$-manifold $(\mathcal{B}_\partial,Q_{\mathcal{B}_\partial})$, i.e. reduced zero-locus of the cohomological vector field $Q_{\mathcal{B}_\partial}$.

\begin{remark} Returning to the setup of Remark \ref{rem: pairing H^A with H^B}, let $N$ be a closed $(n-1)$-manifold with a cellular decomposition $Y$. Given two states $\phi\in \mathcal{H}^{(A)}_Y$, $\psi\in \mathcal{H}^{(B)}_{\bar Y}$ that are annihilated by respective quantum BFV operators $\widehat S_Y^{(A)}\in \mathrm{End}(\mathcal{H}^{(A)}_Y)_{1}$, $\widehat S_Y^{(B)}\in \mathrm{End}(\mathcal{H}^{(B)}_{\bar Y})_{1}$, the pairing (\ref{pairing H^A with H^B}) between them can be expressed in terms of classes of states $\phi$, $\psi$ in $\hat S_Y$-cohomology, $[\phi]\in \mathcal{H}^{(A),\mathrm{r}}_Y$, $[\psi]\in \mathcal{H}^{(B),\mathrm{r}}_{\bar Y}$:
\begin{equation} (\phi,\psi)=\int_{\mathcal{B}_Y^{(A),\mathrm{r}}\times \mathcal{B}_Y^{(B),\mathrm{r}}}[\phi]\cdot\left( \mathcal{D}_\hbar [A_Y]\; e^{-\frac{i}{\hbar}\langle [B_Y] , [A_Y] \rangle} \;\mathcal{D}_\hbar [B_Y] \right)\cdot  [\psi] \label{pairing H^A with H^B reduced}\end{equation}
with $[A_Y], [B_Y]$ the superfields for $\mathcal{B}^{(A),\mathrm{r}}_Y=H^\bullet(N)[1]$ and $\mathcal{B}^{(B),\mathrm{r}}_Y=H^\bullet(N)[n-2]$, respectively. Here the normalized densities on reduced spaces
$\mathcal{B}_Y^{(A),\mathrm{r}}$,  $\mathcal{B}_Y^{(B),\mathrm{r}}$ 
are defined as:
\begin{equation} \mathcal{D}_\hbar [A_Y]= \underbrace{\prod_{k=0}^{n-1}\left(\xi_\hbar^k\right)^{\dim H^k(N)}}_{\xi_\hbar^{H^\bullet(N)}}\cdot\tau(N),\qquad  \mathcal{D}_\hbar [B_Y]= \underbrace{\prod_{k=0}^{n-1}\left(\xi_\hbar^{n-k}\right)^{\dim H^k(N)}}_{\widetilde \xi_\hbar^{H^\bullet(N)}}\cdot\tau(N)^{(-1)^{n-1}} \label{normalized densities on Y}\end{equation}
with $\tau(N)\in \mathrm{Det}\, H^\bullet(N)/\{\pm 1\}\simeq \mathrm{Dens}\, B^{(A),\mathrm{r}}_Y$ the $R$-torsion of $N$ and factors $\xi_\hbar^k$ as in (\ref{xi_hbar^k}).\footnote{
Note that, using Poincar\'e duality on $N$, the factor $\widetilde\xi_\hbar^{H^\bullet(N)}$ in (\ref{normalized densities on Y}) can be expressed as $\prod_k \left(\xi_\hbar^k\right)^{\dim H^{k-1}(N)}=\xi_\hbar^{H^\bullet(N)[-1]}$.
} Equality (\ref{pairing H^A with H^B reduced}) is checked straightforwardly (cf. Footnote \ref{footnote: gluing normalization check}) for states of the ``plane wave'' form, $\phi=e^{\frac{i}{\hbar}\langle \beta_Y , A_Y \rangle_Y}$, $\psi=e^{\frac{i}{\hbar}\langle B_Y , \alpha_Y \rangle_Y}$, with parameters $\beta_Y$ a closed cochain on $Y^\vee$ and $\alpha_Y$ a closed cochain on $Y$. Then (\ref{pairing H^A with H^B reduced}) follows by extension by bilinearity to all pairs of $\widehat S_\partial$-closed states.
\end{remark}

\begin{comment}
Given two $\hat S_\partial$-closed states $\psi,\chi$, their inner product can be calculated in terms of the reduced space of states:
\begin{equation} (\psi,\chi)_\mathcal{H} =
\int_\mathcal{B} \mu_\mathcal{B}\; \overline\psi\cdot \chi=
\int_{\mathcal{B}^\mathrm{r}} \mu_{\mathcal{B}^\mathrm{r}} \overline{[\psi]}\cdot [\chi]
=([\psi],[\chi])_{\mathcal{H}^\mathrm{r}}
\label{pairing in H reduced}\end{equation}
where
$$\mu_{\mathcal{B}^\mathrm{r}}=\tau(M_\mathrm{out})\cdot \tau(M_\mathrm{in})^{(-1)^{n-1}}\in\quad \mathrm{Dens}\, \mathcal{B}^\mathrm{r}\cong \mathrm{Det} H^\bullet(M_\mathrm{out}) \otimes (\mathrm{Det} H^\bullet(M_\mathrm{in}))^{(-1)^{(n-1)}}/\{\pm 1\} $$
where $R$-torsions of the in/out boundaries of $M$ appear as the pushforward of the coordinate density $\mu_\mathcal{B}$ on $\mathcal{B}$ associated to cellular basis. Indeed, $\mu_{\mathcal{B}^\mathrm{r}}$ as defined above via torsions is the image of $\mu_\mathcal{B}$ w.r.t. the map
$$\underbrace{\mathrm{Det} C^\bullet(X_\mathrm{out})\otimes (\mathrm{Det} C^\bullet(X^\vee_\mathrm{in}))^{(-1)^{n-1}}/\{\pm1\}}_{\mathrm{Dens}\; \mathcal{B}}\quad \xrightarrow{\cong}\quad \underbrace{\mathrm{Det} H^\bullet(M_\mathrm{out}) \otimes (\mathrm{Det} H^\bullet(M_\mathrm{in}))^{(-1)^{(n-1)}}/\{\pm1\}}_{\mathrm{Dens}\; \mathcal{B}^\mathrm{r}}$$

\begin{remark}\label{rem: reduction on space of states, convergence problem} In fact, the integral over $\mathcal{B}$ in the l.h.s. of (\ref{pairing in H reduced}) is almost always ill-defined due to an $0\cdot\infty$ indeterminacy arising from the fact that the states $\psi,\chi$ are constant in directions of $Q_\mathcal{B}$ (i.e. invariant under shifts by exact cochains).\footnote{
Also, replacing states $\psi\mapsto \psi'=i_\mathcal{H} p_\mathcal{H} \psi=\psi+\hat S_\partial(\cdots)$, $\chi\mapsto \chi'=i_\mathcal{H} p_\mathcal{H} \chi$ (with $\mathcal{H}\wavy{(i_\mathcal{H},p_\mathcal{H},K_\mathcal{H})}\mathcal{H}^\mathrm{r}$ the induction data for the space of states obtained from the data $\mathcal{B}\wavy{(i_\mathcal{B},p_\mathcal{B},K_\mathcal{B})}\mathcal{B}^\mathrm{r}$ by the construction of Section \ref{sec: induction data for dual and sym}) formally does not change the integral, since the integrand shifts by an $\hat S_\partial$-exact term. States $\psi',\chi'$ have an additional symmetry, being constant in directions of $\mathrm{im}(K_\mathcal{B})$.
}
R.h.s. should be viewed as a regularization of this indeterminacy. This regularization is consistent with gluing, since, in the setup of Section \ref{sec: quantum gluing}, with a glued cobordism
\begin{equation} (M_1,X_1)\cob{(M_I,X_I)}(M_2,X_2)\cob{(M_{II},X_{II})}(M_3,X_3)\label{glued cobordism}\end{equation}
we have
\begin{multline} \label{gluing: AB reduction}
\int_{C^\bullet(X_2)[1]\oplus C^\bullet(X_2^\vee)[n-2]} \mathcal{D} A_2\, \mathcal{D} B_2\; e^{\frac{i}{\hbar} \langle B_2, A_2\rangle}\cdot e^{\frac{i}{\hbar} \langle b,A_2\rangle}\cdot e^{\frac{i}{\hbar} \langle B_2,a \rangle} = e^{\frac{i}{\hbar}\langle b,a \rangle}= \\=
\int_{H^\bullet(M_2)[1]\oplus H^\bullet(M_2^\vee)[n-2] } \underbrace{\mathcal{D} [A_2]\, \mathcal{D} [B_2]}_{=\tau(M_2)\cdot \tau(M_2)^{(-1)^{n-1}}} \; e^{\frac{i}{\hbar} \langle[B_2],[ A_2]\rangle}\cdot e^{\frac{i}{\hbar} \langle [b],[A_2]\rangle}\cdot e^{\frac{i}{\hbar} \langle [B_2],[a] \rangle}
\end{multline}
with $a,b$ any closed cochains on $X_2$, $X_2^\vee$, respectively, playing the role of sources. We are using the fact that for any (graded) vector space $V$, there is a canonical density of form $``\mathcal{D} x\,\mathcal{D} x^*"$ on the double $V\oplus V^*$. Expression on the left can be viewed as the pairing (in the space of states $\mathcal{H}_2$, corresponding to the gluing interface $X_2$) of the ``plane wave'' state $e^{\frac{i}{\hbar}\langle B_2, a\rangle}$ with a distributional state arising as the Fourier transform of $e^{\frac{i}{\hbar}\langle b, A_2\rangle}$ in variable $A_2$. This pairing is well-defined and calculation (\ref{gluing: AB reduction}) justifies the prescription (\ref{pairing in H reduced}).
\end{remark}

\begin{remark} One way to visualize the localization of the integral $(\psi,\chi)_\mathcal{H}=\int_\mathcal{B} \mu_\mathcal{B} \overline\psi\,\chi$ to the zero-locus of $Q_\mathcal{B}$ is to insert a factor $s=e^{-\frac{1}{\epsilon}||Q_\mathcal{B}||^2}$ in the integrand, with $||*||^2$ some positive norm on the tangent space $T\mathcal{B}$. On one hand, $s=1+Q_\mathcal{B}(\cdots)$, so inserting $s$ does not change the integral since states $\psi,\chi$ are $Q_\mathcal{B}$-closed and $Q_\mathcal{B}$ is divergence-free. On the other hand, taking the parameter $\epsilon$ to $+0$, we see explicitly that the integrand becomes supported near the zero-locus of $Q_\mathcal{B}$.
\end{remark}
\end{comment}


In terms of half-densities, the reduction sends
a $\hat S_\partial^\mathrm{can}$-closed state $\psi\cdot \left(\mu_{\mathcal{B}_\partial}^\hbar\right)^{1/2}\in \mathcal{H}^\mathrm{can}_\partial$ to
$$[\psi]\cdot \left(\mu^\hbar_{\mathcal{B}^\mathrm{r}_\partial}\right)^{1/2}
\quad \in \mathcal{H}^{\mathrm{r},\mathrm{can}}_\partial=\mathrm{Dens}^{\frac12,\mathrm{C}^\infty}_\mathbb{C}(\mathcal{B}^\mathrm{r}_\partial)$$
where we define the normalized density on $\mathcal{B}^\mathrm{r}_\partial$ as
$$\mu^\hbar_{\mathcal{B}^\mathrm{r}_\partial} = \mathcal{D}_\hbar [A_\mathrm{out}]\cdot \mathcal{D}_\hbar [B_\mathrm{in}] = \xi_\hbar^{H^\bullet(M_\mathrm{out})}\widetilde \xi_\hbar^{H^\bullet(M_\mathrm{in})}\cdot \tau(M_\mathrm{out})\cdot \tau(M_\mathrm{in})^{(-1)^{n-1}}$$
with normalization factors as in (\ref{normalized densities on Y}).

If the partition function (\ref{Z integrating out bulk fields result}) were a $\hat S_\partial$-cocycle, we could construct the reduced partition function as the $\hat S_\partial$-cohomology class of $Z$. However, $Z$ generally only satisfies $\left(\frac{i}{\hbar}\hat S_\partial - i\hbar\,\Delta_\mathrm{res}\right)Z=0$, but does not satisfy $\hat S_\partial Z =0$.
This problem is easily overcome as follows.


Fix some induction data
$(\mathcal{B}_\partial,d_{X_\mathrm{out}}\oplus d_{X^\vee_\mathrm{in}}) \wavy{(i_\mathcal{B},p_\mathcal{B},K_\mathcal{B})} \mathcal{B}^\mathrm{r}_\partial=H^\bullet(\mathcal{B}_\partial)$.
By the construction of Section \ref{sec: induction data for dual and sym}, we can infer the induction data $(i_\mathcal{H}=p_\mathcal{B}^*,p_\mathcal{H}=i_\mathcal{B}^*,K_\mathcal{H}=\cdots)$ from the space of states $(\mathcal{H}_\partial,\hat S_\partial)$ to the reduced space $\mathcal{H}^\mathrm{r}_\partial$.
(For the moment we are discussing the non-canonical picture, where states are functions on $\mathcal{B}_\partial$ or $\mathcal{B}^\mathrm{r}_\partial$; we will switch to half-densities later.)
Denote
$$Z^\mathrm{mod}=i_\mathcal{H} p_\mathcal{H} Z = Z-\hat S_\partial (K_\mathcal{H} Z)-K_\mathcal{H} (\underbrace{\hat S_\partial Z}_{\hbar^2\Delta_\mathrm{res} Z})=Z+\left(\frac{i}{\hbar}\hat S_\partial - i\hbar\,\Delta_\mathrm{res}\right)(\cdots)$$
where we used the quantum master equation (\ref{QME with bdry term for Z}) and $(\cdots) = i\hbar\; K_\mathcal{H} Z$.
By construction, $\hat S_\partial Z^\mathrm{mod}=0$. Also note that $Z^\mathrm{mod}$ differs from $Z$ by a
$\left(\frac{i}{\hbar}\hat S_\partial - i\hbar\,\Delta_\mathrm{res}\right)$-exact term, i.e. by a BV canonical transformation, and we are ultimately only interested in partition functions modulo BV canonical transformations.

In this sense, the reduced partition function is simply
$$Z^\mathrm{r}:=[Z^\mathrm{mod}]=p_\mathcal{H} Z\quad \in \mathcal{H}^\mathrm{r}_\partial\widehat\otimes\, \mathrm{C}^\infty_\mathbb{C}(\mathcal{F}_b^\mathrm{res})$$
i.e. the evaluation of (\ref{Z integrating out bulk fields result}) on chosen representatives of cohomology of $M_\mathrm{out}$, $M_\mathrm{in}$, as boundary fields $A_\mathrm{out},B_\mathrm{in}$.

In terms of half-densities, pushforward of $\left(\mu_\mathcal{B}^\hbar\right)^{1/2}$ to the reduced space of states results in appearance of square roots of torsions of the boundary in the canonical reduced partition function $Z^\mathrm{r}=(p_\mathcal{H})_*Z$. I.e. we have the following, as a corollary of Proposition \ref{prop: Z}.
\begin{Proposition}
The canonical reduced partition function is
\begin{multline}\label{Z reduced}
Z^\mathrm{r}([A_\mathrm{out}],[B_\mathrm{in}];A_\mathrm{res},B_\mathrm{res}
=\\
=
e^{\frac{i}{\hbar} \langle \left. B_\mathrm{res}\right|_\mathrm{out}, i_\mathcal{B}[A_\mathrm{out}]  \rangle_\mathrm{out} +
\langle i_\mathcal{B}[B_\mathrm{in}], \left. A_\mathrm{res} \right|_\mathrm{in}\rangle_\mathrm{in}
- \langle \phi^\vee(i_\mathcal{B}[B_\mathrm{in}]) \;,\; \mathbf{K} \phi(i_\mathcal{B}[A_\mathrm{out}])  \rangle} \cdot \\
\cdo
\xi_\hbar{\left(M_\mathrm{in} \cob{M} M_\mathrm{out}\right)}
\cdot\tau(M,M_\mathrm{out})\cdot \tau(M_\mathrm{out})^{\frac12}\cdot \tau(M_\mathrm{in})^{\frac{(-1)^{n-1}}{2}}\qquad\in\\
\in \mathcal{H}^{\mathrm{r},\mathrm{can}}_\partial\widehat\otimes\; \mathrm{Dens}^{\frac12,\mathrm{C}^\infty}_\mathbb{C}(\mathcal{F}_b^\mathrm{res})
\end{multline}
Here $[A_\mathrm{out}],[B_\mathrm{in}]$ are the superfields for $H^\bullet(M_\mathrm{out})[1]$, $H^\bullet(M_\mathrm{in})[n-2]$. The normalization factor is
\begin{multline*}
\xi_\hbar{\left(M_\mathrm{in} \cob{M} M_\mathrm{out}\right)}=\xi_\hbar^{H^\bullet(M,M_\mathrm{out})}\left(\xi_\hbar^{H^\bullet(M_\mathrm{out})}\right)^{\frac12}\left(\widetilde \xi_\hbar^{H^\bullet(M_\mathrm{in})}\right)^{\frac12}=\\
=\prod_{k=0}^n (\xi_\hbar^k)^{\dim H^k(M,M_\mathrm{out})+\frac12 \dim H^k(M_\mathrm{out})+\frac12 \dim H^{n-k}(M_\mathrm{in})}\quad \in\mathbb{C}
\end{multline*}
\end{Proposition}
The first term in the exponential in (\ref{Z reduced}) is the pairing of $H^k(M,M_\mathrm{in})$ with $H^{n-k-1}(M_\mathrm{out})$ via the natural map $H^k(M,M_\mathrm{in})\rightarrow H^k(M)\rightarrow H^k(M_\mathrm{out})$
and Poincar\'e pairing in cohomology of $M_\mathrm{out}$, and similarly for the second term in the exponential. Third term generally depends on the details of
 gauge-fixing.

\begin{remark}\label{rem: K term in case of no zero modes}
In the case $H^\bullet(M,M_\mathrm{out})=0$ (or equivalently, $H^\bullet(M,M_\mathrm{in})=0$), one has isomorphisms $H^\bullet(M)\xrightarrow{\sim} H^\bullet(M_\mathrm{out})$, $H^\bullet(M)\xrightarrow{\sim} H^\bullet(M_\mathrm{in})$ (arising from long exact sequences of pairs $(M,M_\mathrm{out})$ and $(M,M_\mathrm{in})$, respectively). In this case the pairing in the third term in the exponential in (\ref{Z reduced}) is the composition of the isomorphism $\theta:H^\bullet(M_\mathrm{out})\xrightarrow{\sim}H^\bullet(M)\xrightarrow{\sim} H^\bullet(M_\mathrm{in})$ with Poincar\'e pairing on $H^\bullet(M_\mathrm{in})$, i.e. $\langle [B_\mathrm{in}],\theta [A_\mathrm{out}]\rangle_\mathrm{in}$.
\end{remark}

\begin{example}\label{example: Z red for only out-bdry} For $M$ with $M_\mathrm{in}=\varnothing$,
$$Z^\mathrm{r}=e^{\frac{i}{\hbar}\langle \iota^*B_\mathrm{res}, [A_\mathrm{out}]\rangle}\cdot\xi_\hbar^{H^\bullet(M,M_\mathrm{out})}\left(\xi_\hbar^{H^\bullet(M_\mathrm{out})}\right)^{\frac12}\cdot\tau(M,M_\mathrm{out})\cdot\tau(M_\mathrm{out})^{1/2}$$
where $\iota^*:H^\bullet(M)\rightarrow H^\bullet(M_\mathrm{out})$ is the pullback by the inclusion $\iota: M_\mathrm{out}\hookrightarrow M$ in cohomology; $\langle,\rangle$ is the Poincar\'e pairing in boundary cohomology. An analogous consideration applies in the case $M_\mathrm{out}=\varnothing$.
\end{example}

\begin{example}[cylinder] Let $M=N\times [0,1]$, with in-boundary $M_\mathrm{in}=N\times \{0\}$ and out-boundary $M_\mathrm{out}=N\times \{1\}$, endowed with arbitrary cellular decomposition. Then there are no
residual fields
 and, by Remark \ref{rem: K term in case of no zero modes}, we have
\begin{equation} Z^\mathrm{r}=e^{\frac{i}{\hbar}\langle [B_\mathrm{in}],[A_\mathrm{out}]\rangle}\;(\mathcal{D}_\hbar[B_\mathrm{in}])^{1/2}\cdot(\mathcal{D}_\hbar[A_\mathrm{out}])^{1/2} \label{Z reduced cylinder}\end{equation}
with $\langle,\rangle$ the Poincar\'e pairing on $H^\bullet(N)$.
Note that this partition function represents the \emph{identity} in $\mathrm{Hom}(\mathcal{H}^{(A),\mathrm{r}}_N,\mathcal{H}^{(A),\mathrm{r}}_N)$, cf. (\ref{HH as Hom-space}).
\end{example}

\begin{remark}\label{rem 7.16}
By construction, the reduced partition function satisfies the quantum master equation without boundary term:
\begin{equation}\label{QME reduced}
\Delta_\mathrm{res}^\mathrm{can} Z^\mathrm{r}=0
\end{equation}
(which can be thought of as the equation (\ref{QME with bdry term for Z}) where the boundary BFV operator is killed by passing to the reduced space of states).
Changing the details of gauge-fixing, i.e. maps $\mathbf{i},\mathbf{p},\mathbf{K},i_\mathcal{B},p_\mathcal{B},K_\mathcal{B}$, results in a
transformation of the partition function of the form
$$Z^\mathrm{r}\mapsto Z^\mathrm{r}+\Delta_\mathrm{res}^\mathrm{can}(\cdots)$$
\end{remark}

\begin{remark}
Observe the similarity between integration over bulk fluctuations of fields (\ref{Z integrating out bulk fields}) and pushforward to the reduced space of states on the boundary (\ref{Z reduced}). Both procedures involve similar sets of gauge-fixing/induction data, both deal with half-densities and produce the $R$-torsion in bulk/boundary.
\end{remark}


Equality (\ref{pairing H^A with H^B reduced}) implies that the gluing formula (\ref{gluing formula}) holds also in the setting of reduced boundary states.
\begin{corollary}[of Proposition \ref{prop: gluing}]
For a glued cobordism (\ref{glued cobordism}), we have
\begin{multline}\label{gluing formula bdry reduced}
Z^\mathrm{r}([B_1],[A_3]; A_\mathrm{res},B_\mathrm{res})= \\
=\int_{\mathcal{L}_\mathrm{gres}\subset \mathcal{F}_\mathrm{gres}^\mathrm{fluct}}
\int_{\mathcal{B}^{(A),\mathrm{r}}_2\times \mathcal{B}^{(B),\mathrm{r}}_2} Z_I^\mathrm{r}\left(\rlap{$\phantom{e^{\frac{i}{\hbar}}}$}
[B_1],[A_2];i_\mathrm{gres}^I(A_\mathrm{res})+A_\mathrm{gres}^{\mathrm{fluct},I},i_\mathrm{gres}^{\vee,I}(B_\mathrm{res})+B_\mathrm{gres}^{\mathrm{fluct},I}\right)\cdot \\
\cdot\left[(\mathcal{D}_\hbar [A_2])^{1/2}\cdot e^{-\frac{i}{\hbar}\langle [B_2],[A_2] \rangle} \cdot (\mathcal{D}_\hbar [B_2])^{1/2}\right]\cdot \\
\cdot Z_{II}^\mathrm{r}\left(
\rlap{$\phantom{e^{\frac{i}{\hbar}}}$}
[B_2],[A_3];i_\mathrm{gres}^{II}(A_\mathrm{res})+A_\mathrm{gres}^{\mathrm{fluct},II},i_\mathrm{gres}^{\vee,II}(B_\mathrm{res})+B_\mathrm{gres}^{\mathrm{fluct},II}\right)
\end{multline}
modulo $\Delta^\mathrm{can}_\mathrm{res}$-coboundaries.
\end{corollary}

Note that $Z^\mathrm{r}$ is an element of the space which is expressed in terms of cohomology of $M$ and its boundary, and thus is manifestly independent on the cellular decomposition $X$ of $M$. More precisely, one has the following.
\begin{Proposition}
The class of $Z^\mathrm{r}$ in cohomology of $\Delta_\mathrm{res}^\mathrm{can}$ is independent of the cellular decomposition $X$.
\end{Proposition}

\begin{proof}
First, observe that if we glue to $(M_\mathrm{in},X_\mathrm{in})\cob{(M,X)}(M_\mathrm{out},X_\mathrm{out})$ at the in-boundary a cylinder 
(M_\mathrm{in},\cdots)\cob{(M_\mathrm{in}\times [0,1],\cdots)}(M_\mathrm{in},X_\mathrm{in})$ (with arbitrary cellular decomposition inducing $X_\mathrm{in}$ on the out-boundary of the cylinder), this procedure does not change the reduced partition function:
$$Z_{\mathrm{cylinder}\;\cup\; M}^\mathrm{r}=Z_M^\mathrm{r}$$
This follows directly from the gluing formula (\ref{gluing formula bdry reduced}) and the explicit result for the cylinder (\ref{Z reduced cylinder}).

Now, let $X$ be a cellular decomposition of a cobordism $M_\mathrm{in}\cob{M} M_\mathrm{out}$. Consider the ``out-out'' cylinder
$$\mathrm{Cyl}_\mathrm{out-out}\quad =\qquad \varnothing\cob{(M_\mathrm{in}\times [0,1],\cdots)} (M_\mathrm{in}\times\{0\},X_\mathrm{in})\sqcup (M_\mathrm{in}\times\{ 1 \},Y) $$
and attach its $M_\mathrm{in}\times\{0\}$-boundary to the in-boundary of $M$. The result is a cobordism $\widetilde M=\mathrm{Cyl}_\mathrm{out-out}\cup M$ with only out-boundary, thus for $\widetilde M$ the reduced partition function is independent of cellular decomposition (cf. Example \ref{example: Z red for only out-bdry}). On the other hand, we can attach to $M_\mathrm{in}\times\{1\}\subset \mathrm{Cyl}_\mathrm{out-out}$ an ``in-in'' cylinder
$$\mathrm{Cyl}_\mathrm{in-in}\quad =\qquad (M_\mathrm{in}\times\{0\},Y)\sqcup (M_\mathrm{in}\times\{ 1 \},\cdots) \cob{(M_\mathrm{in}\times [0,1],\cdots)} \varnothing $$

\begin{figure}[!htbp]
\begin{center}
\input{cobordism_plus_tail.pdftex_t}
\caption{A cobordism with a ``tail'' of two cylinders (out-out and in-in) attached.}
\end{center}
\end{figure}

The resulting cobordism $\widetilde{\widetilde M}=\mathrm{Cyl}_\mathrm{in-in}\cup\mathrm{Cyl}_\mathrm{out-out}\cup M$ differs from $M$ by attaching an ``in-out'' cylinder, thus $Z_{\widetilde{\widetilde M}}^\mathrm{r}=Z_M^\mathrm{r}$ by discussion above. On the other hand $Z_{\widetilde M}^\mathrm{r}$ is independent of cellular decomposition $X$, as is, of course, $Z_{\mathrm{Cyl}_\mathrm{in-in}}^\mathrm{r}$ (which is also a case of
Example \ref{example: Z red for only out-bdry}). Therefore $Z_M^\mathrm{r}=Z_{\widetilde{\widetilde M}}^\mathrm{r}=\mathrm{Gluing}(Z_{\mathrm{Cyl}_\mathrm{in-in}}^\mathrm{r},Z_{\widetilde M}^\mathrm{r})$ is independent on $X$.  ($\mathrm{Gluing}(-,-)$ is a schematic notation for the r.h.s. of (\ref{gluing formula bdry reduced}).)

\end{proof}

\begin{comment}
\subsection{Behavior with respect to cellular subdivision/aggregation}
\marginpar{Remove?}
Let $Y$ be a subdivision of the cellular decomposition $X_\mathrm{in}\xrightarrow{X}X_\mathrm{out}$ of the cobordism $M_\mathrm{in}\xrightarrow{M}M_\mathrm{out}$, inducing subdivisions $Y_\mathrm{in}$, $Y_\mathrm{out}$ on in/out boundary.
Fix some induction data for the bulk $C^\bullet(Y,Y_\mathrm{out})\wavy{(\mathbf{i}_{YX},\mathbf{p}_{YX},K_{YX})}C^\bullet(X,X_\mathrm{out})$ (which gives rise to the dual data $C^\bullet(Y^\vee,Y_\mathrm{in}^\vee)\wavy{(\mathbf{i}_{YX}^\vee,\mathbf{p}_{YX}^\vee,K_{YX}^\vee)}C^\bullet(X^\vee,X^\vee_\mathrm{in})$), and some induction data for the boundary
$$\underbrace{C^\bullet(Y_\mathrm{out})[1]\oplus C^\bullet(Y^\vee_\mathrm{in})[n-1]}_{\mathcal{B}_Y}\quad \wavy{(i^\mathcal{B}_{YX},p^\mathcal{B}_{YX},K^\mathcal{B}_{YX})}\quad  \underbrace{C^\bullet(X_\mathrm{out})[1]\oplus C^\bullet(X^\vee_\mathrm{in})[n-1]}_{\mathcal{B}_X}$$

These choices give rise to a decomposition of the space of bulk fields for $Y$ (i.e.fields with zero projection to $\mathcal{B}_Y$) as
$$\mathcal{F}_Y^\mathrm{bulk}=(\mathbf{i}_{YX}\oplus \mathbf{i}_{YX}^\vee)\mathcal{F}_X^\mathrm{bulk}\oplus \mathcal{F}_{YX}^\mathrm{fluct}$$
and a choice of a Lagrangian subspace $$\mathcal{L}_{YX}=\mathrm{im}(K_{YX})[1]\oplus \mathrm{im}(K^\vee_{YX})[n-2]\subset \mathcal{F}_{YX}^\mathrm{fluct}$$
Then we can consider the BV pushforward of the theory on $Y$ to $X$ (pushforward by the {\it aggregation} $Y\rightarrow X$ or, equivalently, effective theory induced on $X$)
$$ \int_{\mathcal{L}_{YX}\subset \mathcal{F}_{YX}^\mathrm{fluct}}e^{\frac{i}{\hbar}S_Y(i_{YX}^\mathcal{B}(A_\mathrm{out}^X)+)}\mu_Y^{1/2} $$
\end{comment}








\section{Non-abelian cellular $BF$ theory, I: ``canonical setting''}
\label{sec: non-ab BF I}



Throughout this section we adopt the formalism of \cite{SimpBF,DiscrBF} where the field $B$ of $BF$ theory is treated as covariant (as a cellular chain in discrete setting and as a de Rham current in continuous setting\footnote{This setting for (continuum) $BF$ theory is known as ``canonical $BF$ theory'' in the literature, cf. e.g. \cite{CR}.}) whereas the field $A$ is contravariant as usual. To reflect this, we denote the fields (and the space of fields) in a different font. Later, in Section \ref{sec: non-ab BF cobordism}, we will return to the formalism where both fields are contravariant.

Let $X$ be a finite CW
complex (it is not required to be a triangulation of a manifold) and let $\mathfrak{g}$ be a unimodular Lie algebra.
We introduce the graded vector space of fields $\mathsf{F}_{X}=C^\bullet(X,\mathfrak{g})[1]\oplus C_\bullet(X,\mathfrak{g}^*)[-2]$.\footnote{Here we are not introducing the twist by a local system and the notation is simply $C^\bullet(X,\mathfrak{g}):=\mathfrak{g}\otimes C^\bullet(X,\mathbb{R})$ -- cellular cochains with coefficients in $\mathfrak{g}$. Likewise, for the chains, $C_\bullet(X,\mathfrak{g}^*):=\mathfrak{g}^*\otimes C_\bullet(X,\mathbb{R})$.} As in Section \ref{sec: classical closed}, it is spanned by the superfields 
\begin{align*}
\mathsf{A}_X  =\sum_{e\subset X} e^*\cdot\mathsf{A}_e & \quad\in  \mathrm{Hom}_1(\mathsf{F}_X,C^\bullet(X,\mathfrak{g})),\\
\mathsf{B}_X  =\sum_{e\subset X} \mathsf{B}_e\cdot e & \quad \in  \mathrm{Hom}_{-2}(\mathsf{F}_X,C_\bullet(X,\mathfrak{g}^*))
\end{align*}
Here $e^*, e$ are the standard basis integral cochain and chain, respectively, associated to a cell $e\subset X$; components $\mathsf{A}_e$ are $\mathfrak{g}$-valued functions on $\mathsf{F}_X$ of degree $1-\dim e$ and components $\mathsf{B}_e$ are $\mathfrak{g}^*$-valued functions on $\mathcal{F}_X$ of degree $-2+\dim e$.

Note that here, unlike in the rest of the paper, the field $\mathsf{B}_X$ is a \textit{chain} of $X$, as opposed to a \textit{cochain} of $X^\vee$ (moreover, in the setup of this subsection, $X^\vee$ is meaningless, as $X$ is not required to be a cellular decomposition of a manifold).

The canonical pairing $\langle,\rangle$ between cochains and chains induces a degree $-1$ symplectic form 
$$\omega_X=\langle \delta \mathsf{B}_X, \delta \mathsf{A}_X \rangle=\sum_{e\subset X}(-1)^{\dim e}  \langle\delta \mathsf{B}_e\stackrel{\wedge}{,} \delta \mathsf{A}_e\rangle_\mathfrak{g}$$ and a BV Laplacian 
$$\Delta_X=\left\langle \frac{\partial}{\partial \mathsf{B}_X}, \frac{\partial}{\partial \mathsf{A}_X}\right\rangle=\sum_{e\subset X} (-1)^{\dim e} \left\langle\frac{\partial}{\partial \mathsf{B}_e},\frac{\partial}{\partial \mathsf{A}_e}\right\rangle_\mathfrak{g} $$ on $\mathrm{Fun}(\mathsf{F}_X)=\widehat{\mathrm{Sym}\,^\bullet}\mathsf{F}_X^*$ (the formal power series in fields). Symbol $\langle,\rangle_\mathfrak{g}$ stands for the canonical pairing between $\mathfrak{g}$ and $\mathfrak{g}^*$.

In our notation $e\subset X$ stands for an \textit{open} cell; its closure $\bar{e}=e\cup\partial e\subset X$ is a closed ball (for $X$ a ball CW complex, which we always assume unless stated otherwise) inheriting a structure of CW complex from $X$. Thus, e.g., $\mathsf{A}_e$ is a component of the superfield $\mathsf{A}_X$, whereas $\mathsf{A}_{\bar{e}}=\sum_{e'\subset \bar{e}}(e')^*\cdot \mathsf{A}_{e'}$ is the entire superfield for the subcomplex $\bar{e}\subset X$ containing components of $\mathsf{A}_X$ for the cell $e$ itself and cells belonging to the boundary $\partial e$. Likewise, $\partial e\subset X$ is a subcomplex and $\mathsf{A}_{\partial e}=\sum_{e\subset \partial e}(e')^*\cdot\mathsf{A}_{e'}$ is the corresponding $\mathsf{A}$-superfield, and we have $\mathsf{A}_{\bar e}=e^*\cdot \mathsf{A}_e+\mathsf{A}_{\partial e}$.

\subsection{Non-abelian $BF$ theory on a simplicial
complex, 
after \cite{SimpBF,DiscrBF}
}\label{sec: simp BF reminder}
Let $X$ be a simplicial complex.

We denote by $\bar{\mathbf{\Delta}}^N$ the standard closed simplex of dimension $N\geq 0$, endowed with standard triangulation We view it as a simplicial complex with the top cell the open simplex $\mathbf{\Delta}^N$.

Let $\Omega^\bullet(X)$ stand for the complex of continuous piecewise polynomial differential forms on (the geometric realization of) $X$. Cochains $C^\bullet(X,\mathbb{R})$ can be quasi-isomophically embedded into $\Omega^\bullet(X)$ as \textit{Whitney forms} (continuous piecewise linear forms, linear on every simplex of $X$ w.r.t. its barycentric coordinates), see \cite{Whitney,Getzler} for details. We denote $\mathsf{i}_X: C^\bullet(X)\hookrightarrow \Omega^\bullet(X)$ the realization  of cochains as Whitney forms. This embedding has a natural left inverse, the \textit{Poincar\'e map} $\mathsf{p}_X:\Omega^\bullet(X)\rightarrow C^\bullet(X)$ which integrates a form over simplices of $X$, i.e. maps $\alpha\mapsto \sum_{e\subset X} e^*\cdot \left(\int_e \alpha \right)$. Dupont has constructed an explicit chain homotopy operator $\mathsf{K}_X$, contracting $\Omega^\bullet(X)$ onto Whitney forms, see \cite{Dupont, Getzler}. Thus, in the terminology of Section \ref{sec: HPT}, we have a retraction $\Omega^\bullet(X)\wavy{(\mathsf{i}_X,\mathsf{p}_X,\mathsf{K}_X)}C^\bullet(X)$. It is glued (by fiber products) out of building blocks -- ``standard'' retractions for $\bar\mathbf{\Delta}^N$ for different $N$ (i.e.  when restricted to any simplex of $X$, it reduces to a ``standard'' retraction for a standard simplex).

We will denote by $\ast$ the pushforward of the wedge product of forms (defined piecewise on simplices of $X$) to cochains, $a\ast b:= \mathsf{p}_X (\mathsf{i}_X(a)\wedge \mathsf{i}_X(b))$ -- this is a
graded-commutative 
non-associative product on $C^\bullet(X)$. Tensoring this operation with the Lie bracket in $\mathfrak{g}$, one gets a bilinear operation $[-\stackrel{\ast}{,}-]$ on $C^\bullet(X,\mathfrak{g})$ defined by $[x\otimes a\stackrel{\ast}{,}y\otimes b]=[x,y]\otimes (a\ast b)$ for $x,y\in \mathfrak{g}$ and $a,b\in C^\bullet(X)$.

\begin{comment}
We will say that an element $f\in \mathrm{Fun}(\mathsf{F}_X)[[\hbar]]$ satisfies the ``$BF_\infty$ ansatz'' if it has the form
\begin{equation}\label{BF_infty ansatz}
f(\mathsf{A}_X,\mathsf{B}_X;\hbar)=\sum_{n\geq 1} \frac{1}{n!}\langle \mathsf{B}_X, \lambda_n(\underbrace{\mathsf{A}_X,\ldots,\mathsf{A}_X}_n) \rangle-i\hbar \sum_{n\geq 2} \frac{1}{n!} \rho_n(\underbrace{\mathsf{A}_X,\ldots,\mathsf{A}_X}_n) 
\end{equation}
with $\lambda_n: \wedge^n C^\bullet(X,\mathfrak{g})\rightarrow C^\bullet(X,\mathfrak{g})$ for $n\geq 1$ and $\rho_n: \wedge^n C^\bullet(X,\mathfrak{g})\rightarrow \mathbb{R}$ for $n\geq 2$ some multilinear operations. 
\end{comment}

The following is a reformulation of one of the main results of \cite{DiscrBF}.

\begin{theorem} \label{thm: simpBF}
There exists a sequence of elements
$\bar{S}_{\mathbf{\Delta}^N}\in \mathrm{Fun}(\mathsf{F}_{\bar\mathbf{\Delta}^N})[[\hbar]]$, for $N=0,1,2,\ldots$, of the form
\begin{multline} \label{Sbar}
\bar{S}_{\mathbf{\Delta}_N}(\mathsf{A}_{\bar\mathbf{\Delta}^N},\mathsf{B}_{\mathbf{\Delta}^N};\hbar)=\\
=\sum_{n=1}^\infty\sum_{\Gamma_0}\sum_{e_1,\ldots,e_n\subset \bar\mathbf{\Delta}^N}\frac{1}{|\mathrm{Aut}(\Gamma_0)|} C^{\mathbf{\Delta}^N}_{\Gamma_0,e_1,\ldots,e_n}
\left\langle \mathsf{B}_{\mathbf{\Delta}^N},\mathrm{Jacobi}_{\,\Gamma_0}(\mathsf{A}_{e_1},\ldots,\mathsf{A}_{e_n})\right\rangle_\mathfrak{g}-\\
-i\hbar \sum_{n= 2}^\infty \sum_{\Gamma_1} 
\sum_{e_1,\ldots,e_n\subset \bar\mathbf{\Delta}^N}\frac{1}{|\mathrm{Aut}(\Gamma_1)|} C^{\mathbf{\Delta}^N}_{\Gamma_1,e_1,\ldots,e_n}
\mathrm{Jacobi}_{\,\Gamma_1}(\mathsf{A}_{e_1},\ldots,\mathsf{A}_{e_n})
\end{multline}
for some values of ``structure constants'' $C^{\mathbf{\Delta}^N}_{\Gamma_l,e_0,\ldots,e_n}\in \mathbb{R}$, $l=0,1$, 
such that for any finite simplicial complex $X$ and any unimodular Lie algebra $\mathfrak{g}$ the element
\begin{equation}\label{simpBF locality}
S_X(\mathsf{A}_X,\mathsf{B}_X;\hbar)=\sum_{e\subset X}\bar{S}_e(\mathsf{A}_X|_{\bar{e}},\mathsf{B}_e;\hbar)\;\;\in \mathrm{Fun}(\mathsf{F}_X)[[\hbar]]
\end{equation}
satisfies
\begin{enumerate}[(a)]
\item\label{simpBF item QME} the quantum master equation $\Delta_X e^{\frac{i}{\hbar}S_X}=0$,
\item\label{simpBF item init cond} the
property 
\begin{equation}\label{simpBF init cond}
S_X(\mathsf{A}_X,\mathsf{B}_X;\hbar)=
\langle \mathsf{B}_X, d \mathsf{A}_X \rangle+ \frac12 \langle \mathsf{B}_X, [\mathsf{A}_X \stackrel{\ast}{,} \mathsf{A}_X] \rangle+ \mathcal{R}
\end{equation}
with the ``error term'' 
$\mathcal{R}\in \widehat{\mathrm{Sym}\,^{\geq 4}}\mathsf{F}_X^*\oplus \hbar\cdot \widehat{\mathrm{Sym}\,^{\geq 2}}\mathsf{F}_X^*$.
\end{enumerate}
Here the notations are:
\begin{itemize}
\item summation in (\ref{Sbar}) is over binary rooted trees $\Gamma_0$ (oriented towards the root) with $n$ leaves and 1-loop connected 3-valent graphs $\Gamma_1$ (with every vertex having two incoming and one outgoing half-edge) with $n$ leaves. Leaves of the graph are decorated by faces $e_1,\ldots, e_n$ (of arbitrary codimension) of $\bar\mathbf{\Delta}^N$.
\item $\mathrm{Jacobi}_{\,\Gamma_0}(\mathsf{A}_{e_1},\ldots, \mathsf{A}_{e_n})$ is the nested Lie bracket in $\mathfrak{g}$, associated to the tree $\Gamma_0$, evaluated on elements $\mathsf{A}_{e_1},\ldots, \mathsf{A}_{e_n}\in\mathfrak{g}$.
\item $\mathrm{Jacobi}_{\,\Gamma_1}(\mathsf{A}_{e_1},\ldots, \mathsf{A}_{e_n})$ is the number obtained by cutting the loop of $\Gamma_1$ anywhere (resulting in a tree $\widetilde{\Gamma_1}$ with $n+1$ leaves, one of which is marked) and taking the trace $\mathrm{tr}_\mathfrak{g}\,\mathrm{Jacobi}_{\,\widetilde{\Gamma_1}}(\mathsf{A}_{e_1},\ldots, \mathsf{A}_{e_n},\bullet) $ of the endomorphism of $\mathfrak{g}$ corresponding to the tree.
\end{itemize}

\end{theorem}

\begin{remark}
The proof we present below differs from \cite{SimpBF,DiscrBF} in its treatment of $S^{(1)}$: here we avoid using regularized infinite-dimensional supertraces over the space of forms $\Omega^\bullet(X)$ and instead construct $S^{(1)}$ by purely finite-dimensional methods, using homological perturbation theory. The proof is constructive and, in particular, we can make choices (the only ambiguity in the construction is the choice of induction data in part (\ref{simpBF (iv)}) in the proof below) that give \emph{rational} structure constants $C^{\mathbf{\Delta}^N}_{\Gamma_l,e_1,\ldots,e_n}\in \mathbb{Q}$, $l=0,1$.
\end{remark} 
 
\begin{proof}[Sketch of proof] We split $S_X$ as $S_X=S_X^{(0)}-i\hbar S_X^{(1)}$ and treat the components $S_X^{(0)}$, $S_X^{(1)}$ separately. Likewise, in (\ref{Sbar}) we split $\bar{S}_{\mathbf{\Delta}^N}=\bar{S}_{\mathbf{\Delta}^N}^{(0)}-i\hbar \bar{S}_{\mathbf{\Delta}^N}^{(1)}$. We break the proof in several steps; we address the construction and properties of $S^{(0)}$ in (\ref{simpBF (i)}--\ref{simpBF (iii)}), construction and properties of $S^{(1)}$ for a single simplex in (\ref{simpBF (iv)},\ref{simpBF (v)}), and finally we put everything together in (\ref{simpBF (vi)},\ref{simpBF (vii)})
\begin{enumerate}[(i)]
\item \label{simpBF (i)}
We construct $S_X^{(0)}:=\sum_{\Gamma_0}\Phi_X^{\Gamma_0}(\mathsf{A}_X,\mathsf{B}_X)$ where the sum is over binary rooted trees $\Gamma_0$ and the contributions $\Phi_X^{\Gamma_0}(\mathsf{A}_X,\mathsf{B}_X)$ are defined as follows, by putting decorations on half-edges of $\Gamma_0$ starting from leaves and going inductively to the root.\footnote{Our convention is that the leaves and the root are loose half-edges of the graph.}
\begin{itemize}
\item Leaves of $\Gamma_0$ are decorated by $\mathsf{i}_X(\mathsf{A}_X)$.
\item In the internal vertices of $\Gamma_0$ one  
calculates the Lie bracket on $\Omega^\bullet(X,\mathfrak{g})$ (coming from the wedge product on forms and the Lie bracket in $\mathfrak{g}$) applied to the decorations of the two incoming half-edges and puts the result on the outgoing half-edge.
\item On internal edges one evaluates $-\mathsf{K}_X$ applied to the decoration of the in-half-edge and puts the result on the out-half-edge.
\item Finally, we define $\Phi_X^{\Gamma_0}(\mathsf{A}_X,\mathsf{B}_X):=\frac{1}{|\mathrm{Aut}(\Gamma_0)|}\langle \mathsf{B}_X, \mathsf{p}_X ( \mathfrak{R}_X^{\Gamma_0}(\mathsf{A}_X) ) \rangle$ where $\mathfrak{R}_X^{\Gamma_0}(\mathsf{A}_X)$ is the decoration of the root coming from the assignments above.
\end{itemize}
By convention, the contribution of the ``trivial tree'' (with one leaf and no internal vertices or edges) is
$\Phi_X^{\mathrm{triv}}:= \langle \mathsf{B}_X, d\mathsf{A}_X \rangle$. We split $S_X^{(0)}
S_{X}^{(0),2}
+S_{X}^{(0),\geq 3}$  where $S_{X}^{(0),2}$ is another notation for $\Phi_X^{\mathrm{triv}}$ 
and the second term is the contribution of non-trivial trees (the new superscripts $2$, $\geq 3$ denote the degree in fields).

\item \label{simpBF (ii)}
It follows from the fact that the data $\Omega^\bullet(X)\wavy{(\mathsf{i}_X,\mathsf{p}_X,\mathsf{K}_X)} C^\bullet(X)$ are assembled from the standard building blocks $\Omega^\bullet(\bar\mathbf{\Delta}^N)\wavy{(\mathsf{i}_{\bar\mathbf{\Delta}^N},\mathsf{p}_{\bar\mathbf{\Delta}^N},\mathsf{K}_{\bar\mathbf{\Delta}^N})} C^\bullet(\bar\mathbf{\Delta}^N)$, 
and from the factorization $\Omega^\bullet(X,\mathfrak{g})=\Omega^\bullet(X)\otimes\mathfrak{g}$ into a tensor product of a cdga and a Lie algebra, 
that $S^{(0)}_X$ has the form
$S^{(0)}_X(\mathsf{A}_X,\mathsf{B}_X)=\sum_{e\subset X}\bar{S}^{(0)}_e(\mathsf{A}_X|_{\bar{e}},\mathsf{B}_e)$ where $\bar{S}^{(0)}_{\mathbf{\Delta}^N}$ satisfies the $\bmod\;\hbar$ part of the ansatz (\ref{Sbar}).

\item \label{simpBF (iii)}
Using Leibniz rule
in $\Omega^\bullet(X)$ and the identity $d\mathsf{K}_X+\mathsf{K}_X d=\mathrm{id}-\mathsf{i}_X\mathsf{p}_X$, one calculates the odd Poisson bracket 
$$\{\Phi_X^\mathrm{triv},\Phi_X^{\Gamma_0}\}=\sum_{\mathrm{edges}\;e\mathrm{\;of\;}\Gamma_0} \left(- \Phi_X^{\Gamma_0'} \frac{\overleftarrow{\partial}}{\partial \mathsf{A}_X} \frac{\overrightarrow{\partial}}{\partial \mathsf{B}_X} \Phi_X^{\Gamma_0''} +\Phi_X^{\Gamma_0,e} \right) $$ where on the r.h.s. we sum over edges $e$ of $\Gamma_0$; removing this edge splits $\Gamma_0$ into  trees $\Gamma_0'$ and $\Gamma_0''$. The term $\Phi_X^{\Gamma_0,e} $ is the contribution of $\Gamma_0$ with edge $e$ contracted; such contributions cancel when we sum over trees $\Gamma_0$ due to the combinatorics of trees and Jacobi identity in $C^\bullet(X,\mathfrak{g})$. As a result, summing over $\Gamma_0$, we obtain 
$\{S_{X}^{(0),2},S_{X}^{(0),\geq 3}\}=-\frac12 \{S_{X}^{(0),\geq 3},S_{X}^{(0),\geq 3}\}$ which together with the obvious identity $\{S_{X}^{(0),2},S_{X}^{(0),2}\}=0 $ (a guise of $d^2=0$ on cochains) gives the classical master equation
\begin{equation}\label{simpBF CME} 
\{ S^{(0)}_X,S^{(0)}_X \}=0 
\end{equation}

\item \label{simpBF (iv)} For $N\geq 0$, denote by $Q_{\bar\mathbf{\Delta}^N}=\{S_{\bar\mathbf{\Delta}^N}^{(0)},\bullet\}$ the cohomological vector field generated by $S_{\bar\mathbf{\Delta}^N}^{(0)}$ (the fact that it squares to zero follows from (\ref{simpBF CME}) for $X=\bar\mathbf{\Delta}^N$); it is tangent to $C^\bullet(\bar\mathbf{\Delta}^N,\mathfrak{g})[1]\subset \mathsf{F}_{\bar\mathbf{\Delta}^N}$. Observe that $\Delta S_{\bar\mathbf{\Delta}^N}^{(0)}\in \mathrm{Fun}_1(C^\bullet(\bar\mathbf{\Delta}^N,\mathfrak{g})[1])$ is $Q_{\bar\mathbf{\Delta}^N}$-closed, as follows from (\ref{simpBF CME})
and the fact that $\Delta$ is a bi-derivation of $\{\bullet,\bullet\}$. 
\begin{comment}
On the other hand, the cohomology $H^1_{Q_{\mathbf{\Delta}^N}}(\mathrm{Fun}(C^\bullet(\mathbf{\Delta}^N,\mathfrak{g})[1]))=0$ as can be shown e.g. by homological perturbation theory.\footnote{
One splits $Q_{\mathbf{\Delta}^N}=\{S_{\mathbf{\Delta}^N}^{(0),2},\bullet\}+\{S_{\mathbf{\Delta}^N}^{(0),\geq 3},\bullet\}$ and treats the second term as a perturbation of the differential by Lemma \ref{lemma: homological perturbation}. Cohomology of the first term is isomorphic to $\mathrm{Fun}(\mathfrak{g}[1])$ -- Chevalley-Eilenberg cochains of the Lie algebra $\mathfrak{g}$. The differential induced by the perturbation $\{S_{\mathbf{\Delta}^N}^{(0),\geq 3},\bullet\}$ on $\mathrm{Fun}(\mathfrak{g}[1])$ is the Chevalley-Eilenberg differential. Thus $H^k_{Q_{\mathbf{\Delta}^N}}(C^\bullet(\mathbf{\Delta}^N,\mathfrak{g})[1])\cong H^k_{CE}(\mathfrak{g})$ -- the Lie algebra cohomology of $\mathfrak{g}$. In particular $H^1$ vanishes.
}\marginpar{Or by a spectral sequence.}
\end{comment}
Using homological perturbation theory (Lemma \ref{lemma: homological perturbation}), one constructs a retraction $\mathrm{Fun}(C^\bullet(\bar\mathbf{\Delta}^N,\mathfrak{g})[1]),Q_{\bar\mathbf{\Delta}^N}\wavy{(\iota,\pi,\kappa)}\mathrm{Fun}(\mathfrak{g}[1]),d_{CE}$ where the retract is the Chevalley-Eilenberg cochain complex of the Lie algebra $\mathfrak{g}$.
By definition of chain homotopy, one has $Q_{\bar\mathbf{\Delta}^N}\,\kappa+\kappa\, Q_{\bar\mathbf{\Delta}^N}=\mathrm{id}-\iota\circ\pi$. Applying both sides of this equation to $\Delta S^{(0)}_{\bar\mathbf{\Delta}^N}$, and noticing that $\Delta S^{(0)}_{\bar\mathbf{\Delta}^N}$ is annihilated by $\pi$ (this follows from unimodularity of $\mathfrak{g}$) and is $Q_{\bar\mathbf{\Delta}^N}$-closed, we obtain $Q_{\bar\mathbf{\Delta}^N}\kappa \Delta S^{(0)}_{\bar\mathbf{\Delta}^N}= \Delta S^{(0)}_{\bar\mathbf{\Delta}^N}$. Therefore, the element 
$S_{\bar\mathbf{\Delta}^N}^{(1)}(\mathsf{A}_{\bar\mathbf{\Delta}^N})\in \mathrm{Fun}_0(C^\bullet(\bar\mathbf{\Delta}^N,\mathfrak{g})[1])$ constructed as 
\begin{equation}\label{simpBF S^1 on Delta^N}
S_{\bar\mathbf{\Delta}^N}^{(1)}:=-\kappa\Delta S_{\bar\mathbf{\Delta}^N}^{(0)} 
\end{equation}
is a solution  of the equation 
\begin{equation}\label{simpBF QME Delta^N}
\Delta S_{\bar\mathbf{\Delta}^N}^{(0)}+ \{S_{\bar\mathbf{\Delta}^N}^{(0)}, S_{\bar\mathbf{\Delta}^N}^{(1)}\}=0
\end{equation}
\begin{comment}
Hence, $\Delta S_{\mathbf{\Delta}^N}^{(0)}$ is $Q_{\mathbf{\Delta}^N}$-closed, i.e. there exists an element $S_{\mathbf{\Delta}^N}^{(1)}(\mathsf{A}_{\mathbf{\Delta}^N})\in \mathrm{Fun}_0(C^\bullet(\mathbf{\Delta}^N,\mathfrak{g})[1])$ solving the equation 
\begin{equation}\label{QME Delta^N}
\Delta S_{\mathbf{\Delta}^N}^{(0)}+ \{S_{\mathbf{\Delta}^N}^{(0)}, S_{\mathbf{\Delta}^N}^{(1)}\}=0
\end{equation}
One constructs $S^{(1)}_{\Delta^N}$ explicitly as follows. First one constructs a retraction of the complex $\mathrm{Fun}(C^\bullet(\Delta^N,\mathfrak{g})[1]),Q_{\mathbf{\Delta}^N}$ to the Lie algebra cohomology of $\mathfrak{g}$, using Lemma \ref{lemma: homological perturbation} composed with the construction (\ref{HPT Sym}); denote by $\kappa$ the resulting chain homotopy. Then one sets 
\begin{equation}\label{simpBF S^1 on Delta^N}
S_{\mathbf{\Delta}^N}^{(1)}:=-\kappa\Delta S_{\mathbf{\Delta}^N}^{(0)}
\end{equation} 
By constuction it satisfies the equation (\ref{QME Delta^N}).
\end{comment}

\item \label{simpBF (v)} One defines 
\begin{equation}\label{simpBF barS^1 via S^1}
\bar{S}_{\mathbf{\Delta}^N}^{(1)}(\mathsf{A}_{\bar\mathbf{\Delta}^N})=\sum_{e\subset \bar\mathbf{\Delta}^N} (-1)^{\mathrm{codim}(e)} S_{\bar{e}
}^{(1)}(\mathsf{A}_{\bar\mathbf{\Delta}^N}|_{\bar{e}})
\end{equation}
with summands as in (\ref{simpBF (iv)}) for faces $e$ of $\Delta^N$ of arbitrary codimension. One can check from the construction (\ref{simpBF S^1 on Delta^N}), that  $\bar{S}_{\mathbf{\Delta}^N}^{(1)}$ satisfies the part of ansatz (\ref{Sbar}) linear in $\hbar$; the property 
$S_{\bar\mathbf{\Delta}^N}^{(1)}=\sum_{e\subset \bar\mathbf{\Delta}^N} \bar{S}^{(1)}_e$ is obvious from (\ref{simpBF barS^1 via S^1}). 

\item \label{simpBF (vi)}
Assume that a simplicial complex $X$ is given as union of two simplicial subcomplexes $X_1$ and $X_2$ intersecting over $Y=X_1\cap X_2$ and assume that the elements $S_{X_1}$, $S_{X_2}$, $S_{Y}$ as defined by (\ref{simpBF locality}) satisfy the quantum master equation on $\mathsf{F}_{X_1}$, $\mathsf{F}_{X_2}$, $\mathsf{F}_{Y}$ respectively. Then it is straightforward to check that $S_X=S_{X_1}+S_{X_2}-S_{Y}$ (which indeed also satisfies the ansatz (\ref{simpBF locality})) is a solution of the quantum master equation on $\mathsf{F}_X$.\footnote{
Indeed, we already know by (\ref{simpBF CME}) that $\{S^{(0)}_X,S^{(0)}_X\}=0$; we are left to check that $\Delta S^{(0)}_X+\{S^{(0)}_X,S^{(1)}_X\}=0$. We calculate $\Delta S^{(0)}_X=\Delta_{X_1} S^{(0)}_{X_1}+\Delta_{X_2} S^{(0)}_{X_2}-\Delta_{Y} S^{(0)}_{Y}= -\{S^{(0)}_{X_1},S^{(1)}_{X_1}\}_{X_1}- \{S^{(0)}_{X_2},S^{(1)}_{X_2}\}_{X_2} +\{S^{(0)}_{Y},S^{(1)}_{Y}\}_{Y}=-\{S^{(0)}_X,S^{(1)}_{X_1}+S^{(1)}_{X_2}-S^{(1)}_Y\}=-\{S^{(0)}_X,S^{(1)}_X\}$. (Here we indicate explicitly where we calculate the odd Poisson brackets and BV Laplacians; no index means $X$.)
}

\begin{comment}
are given solutions of the quantum master equation $S_{X_1}$, $S_{X_2}$, $S_{Y}$ on $\mathcal{F}_{X_1}$, $\mathcal{F}_{X_2}$, $\mathcal{F}_{Y}$ respectively, satisfying the $BF_\infty$ ansatz (\ref{BF_infty ansatz}) and satifying $S_{X_i}|_Y=S_Y$ for $i=1,2$. Then a straightforward check shows that 
\begin{equation}\label{simpBF inclusion-exclusion}
S_X:=S_{X_1}+S_{X_2}-S_{Y}
\end{equation}
is a solution of the quantum master equation on $X$.
\end{comment}

\item \label{simpBF (vii)}
We break the simplicial complex $X$ into individual simplices $e$; on each of them we have a ``building block'' solution of the quantum master equation of form $S_{\bar\mathbf{\Delta}^N}:=S^{(0)}_{\bar\mathbf{\Delta}^N}-i\hbar S^{(1)}_{\bar\mathbf{\Delta}^N}$ as constucted in (\ref{simpBF (i)}) (setting $X=\bar\mathbf{\Delta}^N$) and (\ref{simpBF (iv)}), with $N=\dim(e)$. The fact that $S_{\bar\mathbf{\Delta}^N}$ satisfies the quantum master equation is (\ref{simpBF CME}) specialized to $\bar\mathbf{\Delta}^N$, put together with (\ref{simpBF QME Delta^N}). 
Then, by (\ref{simpBF (vi)}), the element $S_X$ as defined by (\ref{simpBF locality}) satisfies the quantum master equation on $\mathsf{F}_X$.
Finally, property (\ref{simpBF item init cond}) is obvious from the construction.
\end{enumerate}
\end{proof}

\begin{remark} Examples of values of structure constants $C$ for a simplex $\mathbf{\Delta}^N$ in Theorem \ref{thm: simpBF}:
\begin{center}
\begin{tabular}{c|l}
$\Gamma,\{e_i\}$ & $C^{\mathbf{\Delta}^N}_{\Gamma,\{e_i\}}$ \\
\hline
\input{tree_1-1.pdftex_t} & 
$\left\{\begin{array} {ll}
\pm 1 & \mathrm{if}\; \dim(e_1)=N-1 \\
0 & \mathrm{otherwise}
\end{array}\right.$
\\
$\vcenter{\hbox{\input{tree_2-1.pdftex_t}}}$ & 
$\left\{\begin{array} {ll}
\pm\frac{\dim(e_1)!\dim(e_2)!}{(N+1)!} & \mathrm{if}\; \dim(e_1)+\dim(e_2)=N\;\mathrm{and}\; \dim(e_1\cap e_2)=0 \\
0 & \mathrm{otherwise}
\end{array}\right.$
\\
$\vcenter{\hbox{\input{tree_3-1.pdftex_t}}}$ & 
$\left\{\begin{array} {ll}
\pm\frac{\dim(e_1)!\dim(e_2)!\dim(e_3)!}{(\dim(e_1)+\dim(e_2)+1)\cdot(N+2)!} & \mathrm{if}\; \dim(e_1)+\dim(e_2)+\dim(e_3)=N+1,\\ & \mathrm{and}\;\dim(e_1\cap e_2)=0,\\ &  \mathrm{and}\;\{\dim(e_1\cap e_3),\dim(e_2\cap e_3)\}=\{0,1\} \\
0 & \mathrm{otherwise}
\end{array}\right.$
\\
$\vcenter{\hbox{\input{loop_2.pdftex_t}}}\qquad$ &
$\left\{\begin{array} {ll}
\frac{(-1)^{N+1}}{(N+1)^2(N+2)} & \mathrm{if}\; e_1=e_2\;\mathrm{and}\dim(e_1)=1  \\
0 & \mathrm{otherwise}
\end{array}\right.$
\end{tabular}
\end{center}
Here the signs and nonvanishing conditions are formulated in terms of combinatorics and orientations of the $n$-tuple of (arbitrary codimension) faces $e_1,\ldots,e_n$ of $\bar\mathbf{\Delta}^N$. The top two graphs correspond, upon summing over the simplices, as in (\ref{simpBF locality}), to the cellular differential and the bracket $[\bullet\stackrel{*}{,}\bullet]$ (the projected wedge product of forms tensored with the Lie bracket in $\mathfrak{g}$) on cochains and thus to the first two terms of (\ref{simpBF init cond}). The two bottom graphs give first nontrivial contributions to $\mathcal{R}$ in (\ref{simpBF init cond}).
\end{remark}

\begin{remark} \label{rem: low dim simplices}
Building block (\ref{Sbar}) for a $0$-simplex $\mathbf{\Delta}^0$ is simply
$\bar{S}_{\mathbf{\Delta}^0}=\frac12 \left\langle \mathsf{B}_{[0]},[\mathsf{A}_{[0]},\mathsf{A}_{[0]}]\right\rangle$ where we denoted the only cell $[0]:=\mathbf{\Delta}^{0}$ (and we are suppressing the subscript $\mathfrak{g}$ in $\left\langle,\right\rangle$ and $\mathrm{tr}\;$). This corresponds to having a single nonvanishing structure constant $C^{\mathbf{\Delta}^0}_{\vcenter{\hbox{\includegraphics[scale=0.25]{tree_2-1.pdf}}},[0],[0]}=1$.

The nonvanishing structure constants $C$ of Theorem \ref{thm: simpBF} for the $1$-simplex are as follows. We denote the top $1$-cell as $[01]$ and the boundary $0$-cells as $[0]$ and $[1]$.
\begin{center}
\begin{tabular}{c|l}
$\Gamma,\{e_i\}$ & $C^{\mathbf{\Delta}^1}_{\Gamma,\{e_i\}}$ \\
\hline
$\vcenter{\hbox{\input{branch_e.pdftex_t}}}$ &
$\left\{\begin{array}{ll} 
(-1)^n\frac{B_n}{n!} & \mathrm{if}\; \{e_0,e_1\}=\{[1],[01]\},\;e_2=\cdots=e_n=[01] \\
-\frac{B_n}{n!} & \mathrm{if}\; \{e_0,e_1\}=\{[0],[01]\},\;e_2=\cdots=e_n=[01]\\
0 & \mathrm{otherwise}
\end{array}\right.$
\\
$\vcenter{\hbox{\input{loop_n.pdftex_t}}}\qquad$ &
$\left\{\begin{array}{ll}
\frac{B_n}{n!} & \mathrm{if}\; e_1=\cdots=e_n=[01]\\
0 & \mathrm{otherwise}
\end{array}\right.$
\end{tabular}
\end{center}
Here $B_n$ are the Bernoulli numbers, $B_0=1,\, B_1=-\frac12,\, B_2=\frac16,\, B_3=0, B_4=-\frac{1}{30},\ldots$ In particular, the building block 
(\ref{Sbar}) for $\mathbf{\Delta}^1$ is
\begin{multline}\label{Sbar interval} 
\bar{S}_{\mathbf{\Delta}^1}=\left\langle \mathsf{B}_{[01]}, \mathsf{A}_{[1]}-\mathsf{A}_{[0]} \right\rangle+\frac12 \left\langle \mathsf{B}_{[01]}, [\mathsf{A}_{[01]},\mathsf{A}_{[0]}+\mathsf{A}_{[1]}] \right\rangle-\frac{1}{12}\left\langle \mathsf{B}_{[01]}, [\mathsf{A}_{[01]},[\mathsf{A}_{[01]},\mathsf{A}_{[1]}-\mathsf{A}_{[0]}]] \right\rangle + \cdots -\\
-i\hbar\left(\frac{1}{24} \mathrm{tr}\, [\mathsf{A}_{[01]},[\mathsf{A}_{[01]},\bullet]]+\cdots \right)=\\
=\left\langle \mathsf{B}_{[01]}, \frac12\left[\mathsf{A}_{[01]},\mathsf{A}_{[0]}+\mathsf{A}_{[1]}\right]+\mathbb{F}(\mathrm{ad}_{\mathsf{A}_{[01]}})\circ (\mathsf{A}_{[1]}-\mathsf{A}_{[0]}) \right\rangle -i\hbar\; \mathrm{tr} \log \mathbb{G}(\mathrm{ad}_{\mathsf{A}_{[01]}}) 
\end{multline}
where we introduced the two functions 
\begin{equation}\label{simpBF interval F,G}
\mathbb{F}(x)=\frac{x}{2}\coth\frac{x}{2},\qquad \mathbb{G}(x)=\frac{2}{x}\sinh\frac{x}{2}
\end{equation}
\end{remark}

\begin{remark
\label{rem: prismatic}
We have required $X$ to be a \emph{simplicial} complex rather than a general $CW$ complex because for the 
Theorem \ref{thm: simpBF} we need retractions $\Omega^\bullet(\bar{e})\wavy{}C^\bullet(\bar{e})$ for cells $e$ of $X$, compatible with restriction to cells of $\partial e$ (if we want ``standard building blocks'' as in Theorem \ref{thm: simpBF}, we should also require that the retraction depends only on the combinatorial type of $\bar{e}$ and is compatible with combinatorial symmetries of the cell). In the case of simplices, such retractions are provided by Whitney forms and Dupont's chain homotopy operator (whereas Poincar\'e map works for cells of any type). More generally, we can allow $X$ to be a \emph{prismatic complex}, with cells $e=\sigma_1\times\cdots\times \sigma_r$ being \emph{prisms} -- products of simplices (of arbitrary dimension). The respective retraction $\Omega^\bullet(\bar{e})\wavy{}C^\bullet(\bar{e})$ is constructed from Whitney/Dupont retractions for simplices by the tensor product construction of Section \ref{sec: induction data for dual and sym} (whenever we have several simplices of same dimension in $e$, we average over the order in which we contract the factors, in order to have the retraction compatible with the symmetries of the prism). The special case when the prisms are \emph{cubes} (products of 1-simplices) was considered in detail in \cite{DiscrBF}. As a result, one can allow $X$ in Theorem \ref{thm: simpBF} to be a prismatic complex; the building blocks $\bar{S}_e$ then depend on the combinatorial type of the prism $e$ (dimensions of the simplex factors) and the structure constants $C^{e}_{\Gamma_0,e_1,\ldots,e_n}$, $C^e_{\Gamma_1,e_1,\ldots,e_n}$ depend on the combinatorics of an $n$-tuple of faces of the prism $e$. In Section \ref{sec: non-ab CW} we will construct a further generalization of Theorem \ref{thm: simpBF} to general (ball) CW complexes.
\end{remark}

\begin{comment}
\begin{definition} A \emph{unimodular $L_\infty$ algebra} is a graded vector space $V^\bullet$ endowed with two sequences of multilinear operations $l_n:\, \wedge^n V\rightarrow V$, $n\geq 1$ (\emph{classical $L_\infty$ operations}) and $q_n:\, \wedge^n V\rightarrow \mathbb{R}$, $n\geq 2$ (\emph{quantum operations}), satisfying the \emph{homotopy Jacobi identities}
$$\sum_{r+s=n}\frac{1}{r!s!}\,l_{r+1}(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_r,l_s(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_s))=0$$
and the \emph{homotopy unimodularity relations}
$$ \frac{1}{n!}\,\mathrm{Str}\;l_{n+1}(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_n,\bullet)+\sum_{r+s=n}\frac{1}{r!s!}\,q_{r+1}(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_r,l_s(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_s))=0 $$
where $\mathsf{A}: V[1]\rightarrow V$ is the shifted identity map.
\end{definition}
\end{comment}

\begin{comment}
\begin{remark}\label{rem: uL_infty}
The action $S_X$ constructed in Theorem \ref{thm: simpBF} can be written as
\begin{equation}\label{BF_infty ansatz}
S_X(\mathsf{A}_X,\mathsf{B}_X;\hbar)=\sum_{n\geq 1}\frac{1}{n!} \langle \mathsf{B}_X, l_n^X(\underbrace{\mathsf{A}_X,\ldots,\mathsf{A}_X}_n) \rangle- i\hbar \sum_{n\geq 2}\frac{1}{n!}q_n^X(\underbrace{\mathsf{A}_X,\ldots,\mathsf{A}_X}_n)
\end{equation}
where $l_n^X:\, \wedge^n C^\bullet(X,\mathfrak{g})\rightarrow C^\bullet(X,\mathfrak{g})$ and $q_n^X:\, \wedge^n C^\bullet(X,\mathfrak{g})\rightarrow \mathbb{R}$ are certain multilinear operations on $\mathfrak{g}$-valued cochains. 
They endow the space of cochains $C^\bullet(X,\mathfrak{g})$ with the structure of a \emph{unimodular $L_\infty$ algebra},\footnote{
This algebraic structure (and this example) was introduced in \cite{SimpBF,DiscrBF} under the name of a \emph{quantum} $L_\infty$ algebra. 
In \cite{Granaker} it was named a \emph{unimodular} $L_\infty$ algebra and was studied as an algebra over a particular Merkulov's wheeled operad.
} in particular $\{l_n^X\}_{n\geq 1}$ are the \emph{classical} $L_\infty$ operations; and the homotopy Jacobi identities 
\begin{equation}\label{L_infty relations}
\sum_{r+s=n}\frac{1}{r!s!}\,l_{r+1}(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_r,l_s(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_s))=0
\end{equation}
follow from the classical master equation (\ref{simpBF CME}). The \emph{quantum operations} $\{q_n^X\}_{n\geq 2}$ satisfy the homotopy unimodularity relations
\begin{equation} \label{uL_infty homotopy unimodularity}
\frac{1}{n!}\,\mathrm{Str}\;l_{n+1}(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_n,\bullet)+\sum_{r+s=n}\frac{1}{r!s!}\,q_{r+1}(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_r,l_s(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_s))=0 
\end{equation}
which are generated by the linear in $\hbar$ part of the quantum master equation.
\end{remark}
\end{comment}

\subsection{Case of general CW complexes}\label{sec: non-ab CW}
One can extend Theorem \ref{thm: simpBF} to a general ball CW complex, with cells not required to be simplices or prisms.

\begin{theorem}\label{thm: cellBF}
Let $X$ be a finite ball complex and $\mathfrak{g}$ be a unimodular Lie algebra. Then to every cell $e\subset X$ one can associate an element (a \emph{local building block})
$\bar{S}_e\in\mathrm{Fun}(\mathsf{F}_{\bar{e}})[[\hbar]]$ of the form
\begin{multline} \label{Sbar cell}
\bar{S}_{e}(\mathsf{A}_{\bar{e}},\mathsf{B}_{e};\hbar)=\\
=\sum_{n=1}^\infty\sum_{\Gamma_0}\sum_{e_1,\ldots,e_n\subset \bar{e}}\frac{1}{|\mathrm{Aut}(\Gamma_0)|} C^e_{\Gamma_0,e_1,\ldots,e_n}
\left\langle \mathsf{B}_{e},\mathrm{Jacobi}_{\,\Gamma_0}(\mathsf{A}_{e_1},\ldots,\mathsf{A}_{e_n})\right\rangle_\mathfrak{g}-\\
-i\hbar \sum_{n= 2}^\infty \sum_{\Gamma_1} 
\sum_{e_1,\ldots,e_n\subset \bar{e}}\frac{1}{|\mathrm{Aut}(\Gamma_1)|} C^e_{\Gamma_1,e_1,\ldots,e_n}
\mathrm{Jacobi}_{\,\Gamma_1}(\mathsf{A}_{e_1},\ldots,\mathsf{A}_{e_n})
\end{multline}
with some real coefficients $C^e_{\Gamma_l,e_1,\ldots,e_n}\in \mathbb{R}$ for $l=0,1$, in such a way that the element (the \emph{cellular action})
\begin{equation}\label{cellBF locality}
S_X(\mathsf{A}_X,\mathsf{B}_X;\hbar)=\sum_{e\subset X}\bar{S}_e(\mathsf{A}_X|_{\bar{e}},\mathsf{B}_e;\hbar)\;\;\in \mathrm{Fun}(\mathsf{F}_X)[[\hbar]]
\end{equation}
satisfies the quantum master equation $\Delta_X e^{\frac{i}{\hbar}S_X}=0$ and the following conditions:
\begin{enumerate}[(a)]
\item \label{cellBF thm a} the property 
\begin{equation}\label{cellBF: a eq}
S_X(\mathsf{A}_X,\mathsf{B}_X;\hbar)=\left\langle \mathsf{B}_X, d\mathsf{A}_X \right\rangle+\mathfrak{r}
\end{equation}
with $\mathfrak{r}\in \widehat{\mathrm{Sym}\,^{\geq 3}} \mathsf{F}_X^*\oplus \hbar\cdot \widehat{\mathrm{Sym}\,^{\geq 2}} \mathsf{F}^*_X$,
\item \label{cellBF thm b} for $e$ any $0$-cell of $X$, one has
\begin{equation}\label{cellBF S_pt}
\bar{S}_e=\left\langle \mathsf{B}_e,\frac12[\mathsf{A}_e,\mathsf{A}_e] \right\rangle_\mathfrak{g}
\end{equation}
\item \label{cellBF thm c} For $Y\subset X$ any subcomplex, $S_Y(\mathsf{A}_Y,\mathsf{B}_Y;\hbar):=\sum_{e\subset Y}\bar{S}_e\;\in\mathrm{Fun}(\mathsf{F}_Y)[[\hbar]]$ satisfies the quantum master equation on $\mathsf{F}_Y$.
\end{enumerate}
\end{theorem}


\begin{comment}
\begin{proof}
Let $Y$ be a simplicial refinement of $X$, i.e. every cell $e$ of $X$ is subdivided into simplices in $Y$. Let us choose an ordering of
the cells $e_1,\ldots,e_N$ of $X$ in such a way that $\dim e_1\leq\cdots\leq \dim e_N$. Then $X$ admits an increasing filtration by CW subcomplexes 
$$X_1\subset \cdots \subset X_{N-1}\subset X_N=X$$
with $X_k:=\cup_{i\leq k} e_i$. We denote $Y_k$ the simplicial refinement of $X_k$ obtained by restricting $Y$ to $X_k$. 

We construct, by induction in $k$, a sequence of induction data \begin{equation}\label{cellBF Y_k to X_k ind data}
C^\bullet(Y_k)\wavy{(i_k,p_k,K_k)} C^\bullet(X_k)
\end{equation}
The construction is as follows: $X_k$ differs from $X_{k-1}$ by adjoining a single cell $e_k$ (whose boundary is in $X_{k-1}$). Choose some induction data for relative cochains $C^\bullet(Y_k,Y_{k-1})\wavy{(\iota_k,\pi_k,\kappa_k)}C^\bullet(X_k,X_{k-1})=\mathrm{Span}(e_k^*)$ (here the map $\pi_k$ is canonical: it is the dual of the canonical inclusion $\mathrm{Span}(e_k)=C_\bullet(X_k,X_{k-1})\hookrightarrow C_\bullet(Y_k,Y_{k-1})$); we put it together with
the induction data $C^\bullet(Y_{k-1})\wavy{(i_{k-1},p_{k-1},K_{k-1})} C^\bullet(X_{k-1})$ (which we have by induction hypothesis), to obtain an induction data
$$C^\bullet(Y_{k-1})\oplus C^\bullet(Y_k,Y_{k-1})\wavy{} C^\bullet(X_{k-1})\oplus C^\bullet(X_k,X_{k-1}) $$ 
Here the l.h.s. and r.h.s. are isomorphic to $C^\bullet(Y)$ and $C^\bullet(X)$ as graded vector spaces but not as cochain complexes (cf. (\ref{gluing cochains},\ref{d upper triangular})).
We use homological perturbation lemma (Lemma \ref{lemma: homological perturbation}) to deform the differentials on l.h.s. and r.h.s. to standard cellular differentials on $C^\bullet(Y_k)$ and $C^\bullet(X_k)$, by adding perturbations  $d_{\partial e_k\rightarrow e_k}^Y: C^\bullet(Y|_{\partial e_k})\rightarrow C^\bullet(Y|_{e_k},Y_{\partial e_k})$ and $d_{\partial e_k\rightarrow e_k}^X: C^\bullet(\partial e_k)\rightarrow C^\bullet(e_k,\partial e_k)$, respectively. This yields, by Lemma \ref{lemma: homological perturbation}, induction data $C^\bullet(Y_k)\wavy{(i_k,p_k,K_k)} C^\bullet(X_k)$.

We construct $S_{X_k}\in \mathrm{Fun}(\mathsf{F}_{X_k})[[\hbar]]$ by a BV pushforward from $S_{Y_k}$ (which is in turn provided by Theorem \ref{thm: simpBF}), i.e. $S_{X_k}$ is defined by 
$$e^{\frac{i}{\hbar} S_{X_k}}(\mu^\hbar_{\mathsf{F}_{X_k}})^{1/2}=\int_{\mathcal{L}\subset \mathsf{F}_\mathrm{fluct}} e^{\frac{i}{\hbar} S_{Y_k}}(\mu^\hbar_{\mathsf{F}_{Y_k}})^{1/2} $$
(with reference half-densities as in Section \ref{sec: quantization closed}),
where the gauge-fixing is produced from the induction data (\ref{cellBF Y_k to X_k ind data}): fields split as $\mathsf{F}_{Y_k}=\mathsf{F}_{X_k}\oplus \mathsf{F}_\mathrm{fluct}$ with $\mathsf{F}_\mathrm{fluct}=\ker p_k \oplus \ker i_k^*$ and the Lagrangian in  $\mathsf{F}_\mathrm{fluct}$ is $\mathcal{L}=\mathrm{im}\,K_k\oplus \mathrm{im}\,K_k^*$. By the properties of BV pushforwards, $S_{X_k}$ satisfies the quantum master equation. 
By induction in $k$, and using that (\ref{cellBF Y_k to X_k ind data}) is backwards-compatible in $k$, i.e. restricts to $C^\bullet(Y_{k-1})\wavy{(i_{k-1},p_{k-1},K_{k-1})}C^\bullet(X_{k-1})$, one proves \marginpar{Expand?} that $$S_{X_k}=S_{X_{k-1}}+\bar{S}_{e_k}$$
with $\bar{S}_{e_k}$ satisfying the ansatz (\ref{Sbar cell}). Therefore, $S_{X_k}=\sum_{i\leq k} \bar{S}_{e_i}$ and in particular $S_X=S_{X_N}$ satisfies (\ref{cellBF locality}). 
Properties (\ref{cellBF thm a},\ref{cellBF thm b}) hold by construction.

\end{proof}
\end{comment}

\begin{proof}
Choose an ordering of
the cells $e_1,\ldots,e_N$ of $X$ in such a way that $\dim e_1\leq\cdots\leq \dim e_N$. Then $X$ admits an increasing filtration by CW subcomplexes 
\begin{equation}\label{cellBF CW filtration}
X_1\subset \cdots \subset X_{N-1}\subset X_N=X
\end{equation}
with $X_k:=\cup_{i\leq k} e_i$. Then $X_k=X_{k-1}\cup e_k$. I.e. $X_k$ is $X_{k-1}$ with a single new cell $e_k$ adjoined; its boundary $\partial e_k$ lies entirely in $X_{k-1}$.

Proceeding by induction in $k$, assume that a solution $S_{X_{k-1}}$ of the QME  on $\mathsf{F}_{X_{k-1}}$ is constructed and we want to extend it to $\mathsf{F}_{X_k}=\mathsf{F}_{X_{k-1}}[\mathsf{A}_{e},\mathsf{B}_{e}]$ (we temporarily denote $e:=e_k$). Denote $n=\dim e$. First, we look for a solution of the classical master equation $S^{(0)}_{X_k}$ of the following form
\begin{equation}\label{cellBF: S induction}
S^{(0)}_{X_k}=S^{(0)}_{X_{k-1}
+\underbrace
\sum_{j\geq 1} \left\langle \mathsf{B}_{e}, \sigma_{j}(\mathsf{A}_{e},\mathsf{A}_{\partial e}) \right\rangle}_{\bar{S}^{(0)}_{e}} 
\end{equation}
where $\sigma_j$ is of polynomial degree $j$ in $\mathsf{A}$-variables (we call this polynomial degree \textit{weight} to distinguish it from other gradings). We assume $n\geq 1$ (otherwise we simply set $\bar{S}_e=\left\langle \mathsf{B}_e,\frac12 [\mathsf{A}_e,\mathsf{A}_e] \right\rangle$ as prescribed by (\ref{cellBF thm b})).

We denote by
$$d_{\partial e\rightarrow e}= e^*\cdot \mathsf{d}_{\partial e\rightarrow e}:\quad  C^{n-1}(\partial e) \;\; \rightarrow \;\; C^{n}(\bar{e},\partial e)=\mathrm{Span}(e^*)$$ the component of the cellular coboundary operator on $X_k$ proportional to $e^*$ (and $\mathsf{d}_{\partial e\rightarrow e}: C^{n-1}(\partial e)\rightarrow \mathbb{R}$ picks the coefficient of $e^*$). Thus, the cellular coboundary operator on $C^\bullet(\bar{e})$ splits as $d_{\bar{e}}=d_{\partial e}+d_{\partial e\rightarrow e}$ with $d_{\partial e}$ the cellular coboundary operator on $C^\bullet(\partial e)$. 
Let us choose some induction data 
\begin{equation}\label{cellBF: cell ind data}
C^\bullet(\bar{e}),d_{\bar{e}} 
\wavy{(i,p,K)} H^\bullet(\bar{e})
=\left\{\begin{array}{ll} \mathbb{R}, & \bullet=0\\ 0,& \bullet\neq 0 \end{array}\right. 
\end{equation}
Consider the space 
$$\mathcal{E}^j:=\mathrm{Sym}\,^j(C^\bullet(\bar{e},\mathfrak{g})[1])^* \qquad \ni f(\mathsf{A}_{e},\mathsf{A}|_{\partial e})$$
The operator $d_{\partial e\rightarrow e}$ lifts to a weight zero operator\footnote{The sign is chosen in such a way that $D\mathsf{A}=d_{\partial e\rightarrow e}\mathsf{A}$ holds.} 
$$D=(-1)^n\left\langle  \mathsf{d}_{\partial e\rightarrow e}\; \mathsf{A}_{\partial e},\frac{\partial}{\partial \mathsf{A}_{e}} \right\rangle :\quad  \mathcal{E}^{\bullet}\rightarrow \mathcal{E}^{\bullet}$$
Denote by $Q_{\partial e}$ the differential on $\mathrm{Sym}\, (C^\bullet(\partial e,\mathfrak{g})[1])$ induced by $\{S_{X_{k-1}}^{(0)},\bullet\}$; it extends (via $Q_{\partial e}\mathsf{A}_e=0$) to $\mathcal{E}^\bullet$. We split $Q_{\partial e}$ according to weight as $Q_{\partial e}=Q_{\partial e}^0+Q_{\partial e}^1+\cdots$. In particular, $Q^0_{\partial e}+D$ is simply the lift of the cellular coboundary operator $d_{\bar{e}}$ to $\mathcal{E}^\bullet$.
Thus, using the construction (\ref{HPT Sym}), one produces, out of the triple $(i,p,K)$ chosen above, the induction data 
\begin{equation}\label{cellBF: E ind data}
\mathcal{E}^\bullet,Q^0_{\partial e}+D \wavy{(i_\mathcal{E},p_\mathcal{E},K_\mathcal{E})} H^\bullet(\mathcal{E})\cong \mathrm{Sym}\,^\bullet (\mathfrak{g}[1])^*
\end{equation} Note that $i$ in (\ref{cellBF: cell ind data}) is canonical: it has to represent $H^0(\bar{e})$ by constant $0$-cochains; thus $p_\mathcal{E}=i^*$ is also canonical and is given by evaluation on constant $0$-cochains.

We set in (\ref{cellBF: S induction}) the ``initial condition'' $\sigma_1:=\mathsf{d}_{\partial e\rightarrow e}\, \mathsf{A}_{\partial e}$, which is forced by (\ref{cellBF: a eq}).
The classical master equation $\{S^{(0)}_{X_k},S^{(0)}_{X_k}\}=0$ is equivalent to a sequence of equations for the functions $\sigma_j$ for $j\geq 2$:
\begin{equation}\label{cellBF CME induction}
(D+Q^0_{\partial e}) \sigma_{j}=-\sum_{i=1}^{j-1}Q^i_{\partial e}\sigma_{j-i}-(-1)^n\sum_{i=2}^{j-1} \left\langle \sigma_{j+1-i},\frac{\partial}{\partial \mathsf{A}_{e}} \right\rangle \sigma_{i} 
\end{equation}
Note that the r.h.s. of (\ref{cellBF CME induction}) depends only on $\sigma_1,\ldots,\sigma_{j-1}$. We solve (\ref{cellBF CME induction}), as an equation for $\sigma_{j}\in \mathfrak{g}\otimes \mathcal{E}^{j}$, by induction in $j$. The r.h.s. is $(D+Q^0_{\partial e})$-closed\footnote{
Indeed, using the induction hypothesis we calculate
{\Tiny
\begin{multline*}
(D+Q^0_{\partial e})\left(\mbox{r.h.s. of }(\ref{cellBF CME induction})
\right)=
\sum_{i=1}^{j-1}\sum_{l=0}^{i-1}Q^{i-l}_{\partial e}Q^{l}_{\partial e}\sigma_{j-i}+\sum_{i=1}^{j-1}Q_{\partial e}^i D \sigma_{j-i}-(-1)^n\sum_{i=1}^{j-1}\left\langle Q^i_{\partial e}\sigma_1, \frac{\partial}{\partial \mathsf{A}_e} \right\rangle \sigma_{j-i}-\\
-(-1)^n \sum_{i=2}^{j-1} \left\langle (D+Q^0_{\partial e})\sigma_{j+1-i},\frac{\partial}{\partial \mathsf{A}_e} \right\rangle \sigma_i 
+(-1)^n \sum_{i=2}^{j-1} \left\langle \sigma_{j+1-i},\frac{\partial}{\partial \mathsf{A}_e} \right\rangle (D+Q^0_{\partial e})\sigma_i=:a+b+c+d+e
\end{multline*}
}
Further, we have 
{\tiny
\begin{multline*}
a+b=\sum_{i=1}^{j-1}Q^i_{\partial e}\left((D+Q^0_{\partial e})\sigma_{j-i}+\sum_{l=1}^{j-i-1}Q_{\partial e}^l \sigma_{j-i-l}\right)=-(-1)^n\sum_{i=1}^{j-1}\,\sum_{r,s\geq 2,r+s=j-i+1}Q^i_{\partial e}\left( \left\langle \sigma_r, \frac{\partial}{\partial \mathsf{A}_e} \right\rangle \sigma_s \right)\\
= -(-1)^n\sum_{i=1}^{j-1}\,\sum_{r,s\geq 2,r+s=j-i+1}\left\langle Q^i_{\partial e}\sigma_r, \frac{\partial}{\partial \mathsf{A}_e} \right\rangle \sigma_s +(-1)^n\sum_{i=1}^{j-1}\,\sum_{r,s\geq 2,r+s=j-i+1}\left\langle \sigma_r, \frac{\partial}{\partial \mathsf{A}_e} \right\rangle Q^i_{\partial e}\sigma_s =:f+g
\end{multline*}
}
Next we note that $c+d+f=\sum\limits_{r,s,t\geq 2, r+s+t=j+2}\left\langle \left\langle \sigma_r ,\frac{\partial}{\partial \mathsf{A}_e} \right\rangle \sigma_s, \frac{\partial}{\partial \mathsf{A}_e}\right\rangle \sigma_t$ and
$e+g=-\sum\limits_{r,s,t\geq 2, r+s+t=j+2} \left\langle \sigma_r ,\frac{\partial}{\partial \mathsf{A}_e} \right\rangle \left( \left\langle\sigma_s, \frac{\partial}{\partial \mathsf{A}_e}\right\rangle \sigma_t\right)$, and thus 
$c+d+f+e+g=\sum\limits_{r,s,t\geq 2, r+s+t=j+2}  \left\langle\sigma_r \sigma_s, \frac{\partial}{\partial \mathsf{A}_e}\frac{\partial}{\partial \mathsf{A}_e} \right\rangle \sigma_t=0$ -- vanishes as a contraction of a symmetric and a skew-symmetric tensor. Thus we proved that $(D+Q^0_{\partial e})\left(\mbox{r.h.s. of }(\ref{cellBF CME induction})\right)=0$.
} and is annihilated by $p_\mathcal{E}$.\footnote{
To see that the r.h.s. of (\ref{cellBF CME induction}) is annihilated by $p_\mathcal{E}$, note that in $H^\bullet(\mathcal{E})$, the weight coincides with the internal degree. On the other hand, the weight of (\ref{cellBF CME induction}) is $j\geq 2$ while the internal degree is $3-n\leq 2$. Thus $p_\mathcal{E}(\mbox{r.h.s. of }(\ref{cellBF CME induction}))$ is zero for degree reasons, except for the case $n=1$ (i.e. $e$ is an interval) with $j=2$, where one sees explicitly that $-Q^1_{\partial e}\sigma_1=-\frac12 \left[\mathsf{A}_{[1]},\mathsf{A}_{[1]}\right]+\frac12 \left[\mathsf{A}_{[0]},\mathsf{A}_{[0]}\right]$ vanishes on constant $0$-cochains (we denoted the endpoints of the interval $e$ by $[0]$ and $[1]$, as in Remark \ref{rem: low dim simplices}).
} Therefore, it is exact, and one can construct the primitive as
$$\sigma_j:= K_\mathcal{E} \left(\mbox{r.h.s. of }(\ref{cellBF CME induction})\right)$$

Thus we have constructed a solution of the classical master equation  (\ref{cellBF: S induction}) on $X_k$ by extension of the known one (by induction hypothesis) on $X_{k-1}$. 

Next, we want to construct $S^{(1)}_{X_k}=S^{(1)}_{X_{k-1}}+\bar{S}^{(1)}_e(\mathsf{A}_e,\mathsf{A}_{\partial e})$ in such a way that $S_{X_k}=S^{(0)}_{X_k}-i\hbar\, S^{(1)}_{X_k}$ satisfies the quantum master equation; we assume that $S^{(1)}_{X_{k-1}}$ is already constructed. We use the strategy of (\ref{simpBF (iv)}) of the proof of Theorem \ref{thm: simpBF}: the QME can be written as 
\begin{equation}\label{cellBF QME on e}
Q_{\bar{e}} S^{(1)}_{\bar{e}}=-\Delta S^{(0)}_{\bar{e}}
\end{equation} 
where $Q_{\bar{e}}=Q_{\partial e}+D+(-1)^n\sum_{j\geq 2}\left\langle\sigma_j,\frac{\partial}{\partial \mathsf{A}_e}\right\rangle$ is the differential on $\mathcal{E}^\bullet$ induced by $\{S^{(0)}_{X_k},\bullet\}$ and $S^{(0,1)}_{\bar{e}}:=\sum_{e'\subset e}\bar{S}^{(0,1)}_{e'}$.  We deform the induction data (\ref{cellBF: E ind data}), using Lemma \ref{lemma: homological perturbation}, to
$$\mathcal{E}^\bullet,Q_{\bar{e}} \wavy{(\widetilde{i}_\mathcal{E},\widetilde{p}_\mathcal{E},\widetilde{K}_\mathcal{E})} \mathrm{Sym}\,^\bullet(\mathfrak{g}[1])^*,d_{CE}$$
The r.h.s. of (\ref{cellBF QME on e}) is $Q_{\bar{e}}$-closed, as follows from the classical master equation, and is annihilated by $\widetilde{p}_\mathcal{E}$ (from 
unimodularity of $\mathfrak{g}$), thus we construct a solution of (\ref{cellBF QME on e}) as
$S^{(1)}_{\bar{e}}:=-\widetilde{K}_\mathcal{E}\Delta S^{(0)}_{\bar{e}}$ and set $$\bar{S}^{(1)}_e:=S^{(1)}_{\bar{e}}-\sum_{e'\subset \partial e}\bar{S}^{(1)}_{e'}$$

This finishes the construction of a solution of the quantum master equation on $X_k$ of the form
$S_{X_k}=\sum_{i\leq k} \bar{S}_{e_i}$
with $\bar{S}_{e_i}=\bar{S}^{(0)}_{e_i}-i\hbar\,\bar{S}^{(1)}_{e_i}$; taking $k=N$ we obtain the statement of the Theorem. 

Property (\ref{cellBF thm c}) follows from the possibility to choose the ordering of cells $e_1,\ldots,e_N$ differently (preserving the nondecreasing dimension property) while preserving the choice of induction data (\ref{cellBF: cell ind data}) for the cells. Each $Y\subset X$ arises as $X_k$ for some ordering of cells and some $k$, which implies the QME on $Y$.
\end{proof}


\begin{lemma}\label{lemma: cellBF well-definedness}
Cellular action $S_X$ of the Theorem \ref{thm: cellBF} is well-defined up to a canonical BV transformation. More precisely, let $S_X$ and $S'_X$ be two cellular actions fulfilling the conditions of Theorem \ref{thm: cellBF} -- the quantum master equation,  the ansatz (\ref{cellBF locality},\ref{Sbar cell}) and  properties (\ref{cellBF thm a})--(\ref{cellBF thm c}). 
Then one can construct a family $S_{X,t}\in \mathrm{Fun}_0(\mathsf{F}_X)[[\hbar]]$ of solutions of QME for $t\in [0,1]$ together with a generator $R_{X,t}\in \mathrm{Fun}_{-1}(\mathsf{F}_X)[[\hbar]]$ such that
\begin{enumerate}[(i)]
\item \label{lemma 8.7 (i)} $S_{X,0}=S_X$, $S_{X, 1}=S'_X$,
\item \label{lemma 8.7 (ii)} $\frac{\partial}{\partial t}S_{X,t}=\{S_{X,t},R_{X,t}\}-i\hbar \Delta R_{X,t}$,
\item \label{lemma 8.7 (iii)} both $S_{X,t}$ and $R_{X,t}$ satisfy the ansatz (\ref{cellBF locality},\ref{Sbar cell}), with $t$-dependent structure constants $C^{S,e}_{\Gamma,e_1,\ldots, e_n}(t)$, $C^{R,e}_{\Gamma,e_1,\ldots, e_n}(t)$ for the action $S_{X,t}$ and the generator of infinitesimal canonical transformation $R_{X,t}$. 
Moreover, the \emph{trivial tree} $\Gamma_0^\mathrm{triv}$ with a single leaf and no internal vertices has coefficient $C^{R,e}_{\Gamma_0^\mathrm{triv},e_1}=0$).
\end{enumerate}
\end{lemma}

\begin{proof
Consider the filtration (\ref{cellBF CW filtration}). We proceed by induction in $X_k$: assuming that the Lemma holds for $X_{k-1}$, we aim to prove it for $X_k$. (Note that the Lemma holds trivially for $X_1$, since $S_{X_1}$ is fixed uniquely by (\ref{cellBF thm b}) of Theorem \ref{thm: cellBF}.) 
Set $S_{X_k}:=\sum_{l=1}^k \bar{S}_{e_l}$, $S'_{X_k}:=\sum_{l=1}^k \bar{S}'_{e_l}$. 
By induction hypothesis, cellular actions $S_{X_{k-1}}$ and $S'_{X_{k-1}}$ 
(defined 
as above, omitting the $k$-th term in the sums) 
are connected by a canonical BV transformation, which we denote schematically by $\mathcal{R}_{X_{k-1}}$, i.e.  $S'_{X_{k-1}}=\mathcal{R}_{X_{k-1}}\circ S_{X_{k-1}}$. 

Define 
\begin{equation}\label{cellBF lemma: S''}
S''_{X_k}:=\mathcal{R}_{X_{k-1}}^{-1}S'_{X_k}
\end{equation} 
We have then $S_{X_k}=S_{X_{k-1}}+\bar{S}_e$ and $S''_{X_k}=S_{X_{k-1}}+\bar{S}''_e$ (for some $\bar{S}''_e(\mathsf{A}_{\bar{e}},\mathsf{B}_e;\hbar)$ satisfying the ansatz (\ref{Sbar cell})). 
We can connect\footnote{
Indeed, the most general construction of extension of a solution of QME from $X_{k-1}$ to $X_k$ is as in our proof of Theorem \ref{thm: cellBF}, where on each step of induction in $j$ we can shift $\sigma_j\rightarrow \sigma_j+(D+Q^{(0)}_{\partial e})(\cdots)$, also we can shift $\bar{S}^{(1)}_e\rightarrow \bar{S}^{(1)}_e+Q_{\bar{e}}(\cdots)$. This amounts to a contractible space of choices. Thus the space of solutions of QME on $X_k$ of form $S_{X_{k-1}}+\bar{s}_{e}$, with a fixed solution $S_{X_{k-1}}$ of QME on $X_{k-1}$ and an indeterminate function $\bar{s}_{e}$ satisfying ansatz (\ref{Sbar cell}), is contractible; in particular, it is path-connected.
} $S_{X_k}$ and $S''_{X_k}$ by a path of solutions of QME on $\mathsf{F}_{X_k}$ of the form $S_{X_{k},t}=S_{X_{k-1}}+\bar{S}_{e,t}$ for $t\in [0,1]$, with $\bar{S}_{e,t}=\bar{S}_{e,t}^{(0)}-i\hbar\, \bar{S}_{e,t}^{(1)}=\left\langle \mathsf{B}_e, \sigma_t(\mathsf{A}_{\bar{e}}) \right\rangle-i\hbar \, \rho_t (\mathsf{A}_{\bar{e}})$ for some $t$-dependent functions $\sigma_t\in \mathfrak{g}\otimes \mathcal{E}^{\geq 2}$, $\rho_t\in \mathcal{E}^{\geq 2}$ of $\mathsf{A}$-variables of weight $\geq 2$. (We are borrowing the notations of the proof of Theorem \ref{thm: cellBF}, in particular $e:=e_k$.)

Differentiating QME for $S_{X_t}$ in $t$, we obtain
\begin{eqnarray}
\{S_{X_k,t}^{(0)},\dot{\bar{S}}_{e,t}^{(0)}\}&=&0 \label{cellBF lemma: CME} \\
\{S^{(1)}_{X_k,t},\dot{\bar{S}}_{e,t}^{(0)}\}+ \{S^{(0)}_{X_k,t},\dot{\bar{S}}_{e,t}^{(1)}\}+\Delta \dot{\bar{S}}_{e,t}^{(0)} &=& 0 \label{cellBF lemma: QME}
\end{eqnarray}
where the dot stands for the derivative in $t$.

Observe that: 
\begin{enumerate}[(a)]
\item\label{cellBF lemma: coh a} The cohomology of the differential $\{\left\langle \mathsf{B}_{X_k}, d\mathsf{A}_{X_k}\right\rangle,\bullet\}$ on the subcomplex $\Xi^{(0)}:=\{\left\langle \mathsf{B}_e, f(\mathsf{A}_{\bar{e}}) \right\rangle\,|\,f\in \mathfrak{g}\otimes\mathcal{E}^{\geq 2}\}\subset \mathrm{Fun}(\mathsf{F}_{X_k})$ vanishes in internal degree zero.\footnote{
For this we assume $\dim e\geq 1$; in the case of $\dim e=0$ the induction step of the Lemma works trivially as $\bar{S}_e$ is fixed uniquely by (\ref{cellBF thm b}) of Theorem \ref{thm: cellBF}.
} 
This implies, by homological perturbation theory, that degree zero cohomology of $\{S^{(0)}_{X_k,t},\bullet\}$ on $\Xi^{(0)}$ vanishes as well. 
\item\label{cellBF lemma: coh b} By a similar argument, degree zero cohomology of $\{S^{(0)}_{X_k,t},\bullet\}$ on $\Xi^{(1)}:=\{g(\mathsf{A}_{\bar{e}})\in \mathcal{E}^{\geq 2}\}\subset \mathrm{Fun}(\mathsf{F}_{X_k})$ also vanishes. 
\end{enumerate}

Thus, by (\ref{cellBF lemma: CME}) and (\ref{cellBF lemma: coh a}), we have $\dot{\bar{S}}_{e,t}^{(0)}=\{S_{X_k,t}^{(0)},r^{(0)}_{e,t}\}$ for some degree $-1$ element $r^{(0)}_{e,t}\in \Xi^{(0)}$. Substituting this into (\ref{cellBF lemma: QME}), we obtain, using Jacobi identity for $\{,\}$ and the QME on $S_{X_k,t}$, that
$\left\{S^{(0)}_{X_k,t},\dot{\bar{S}}_{e,t}^{(1)}-\{S^{(1)}_{X_k,t},r^{(0)}_{e,t}\}-\Delta r^{(0)}_{e,t}\right\}=0$. This implies, by (\ref{cellBF lemma: coh b}), that 
$\dot{\bar{S}}_{e,t}^{(1)}=\{S^{(1)}_{X_k,t},r^{(0)}_{e,t}\}+\Delta r^{(0)}_{e,t}+\{S^{(0)}_{X_k,t},r^{(1)}_{e,t}\}$
for some degree $-1$ element $r^{(1)}_{e,t}\in \Xi^{(1)}$. Thus we have proven that 
\begin{equation}\label{cellBF lemma: can transf}
\dot{S}_{X_k,t}=\{S_{X_k,t},r_{e,t}\}-i\hbar\,\Delta r_{e,t}
\end{equation}
with the generator $r_{e,t}=r^{(0)}_{e,t}-i\hbar\, r^{(1)}_{e,t}\in \, \Xi^{(0)}-i\hbar\,\Xi^{(1)}$. One can use homological perturbation theory to construct an explicit chain contractions of $\left(\Xi^{(0)},\{S^{(0)}_{X_k,t},\bullet\}\right)$ and $\left(\Xi^{(1)},\{S^{(0)}_{X_k,t},\bullet\}\right)$ and use them to construct $r^{(0)}_{e,t}$, $r^{(1)}_{e,t}$. By inspection of the construction, the resulting generator $r_{e,t}$ satisfies the ansatz (\ref{Sbar cell}) for some $t$-dependent structure constants $C^{r,e}_{\Gamma,e_1,\ldots,e_n}(t)$.

Combining (\ref{cellBF lemma: can transf}) and (\ref{cellBF lemma: S''}), we obtain that $S_{X_k}$ and $S'_{X_k}$ can be connected by a canonical transformation (\ref{lemma 8.7 (ii)}) with generator
$$R_{X_k,t}=\left\{\begin{array}{ll} 
2 r_{e,2t}, & t\in [0,\frac12) \\
2 R_{X_{k-1},2t-1}, & t\in [\frac12 ,1] 
\end{array} \right.$$
This proves the induction step $X_{k-1}\rightarrow X_k$.
\end{proof}

\begin{remark} One can put together $S_{X,t}$ and $R_{X,t}$ of Lemma \ref{lemma: cellBF well-definedness} into a single non-homogeneous differential form on the interval,
$$\widetilde{S}_X:=S_{X,t}+dt\cdot R_{X,t}\in \Omega^\bullet([0,1])\widehat{\otimes}\mathrm{Fun}(\mathsf{F}_X)[[\hbar]]$$ 
Then the quantum master equation on $S_{X,t}$ together with (\ref{lemma 8.7 (ii)}) can be packaged as an \emph{extended} quantum master equation for $\Tilde{S}_X$,
$$ (d_t-i\hbar\,\Delta)\, e^{\frac{i}{\hbar}\widetilde{S}_X}=0 $$
where $d_t=dt\cdot \frac{\partial}{\partial t}$ -- the de Rham differential in $t$. By the Lemma, $\widetilde{S}_{X}$ satisfies the ansatz (\ref{cellBF locality},\ref{Sbar cell}) with structure constants $C$ taking values in $\Omega^\bullet([0,1])$.
\end{remark}

\begin{remark}
The building block (\ref{Sbar cell}) of the cellular action is defined uniquely for $\dim e=0$ (fixed by (\ref{cellBF S_pt})) and for $\dim e=1$ (as follows from Lemma \ref{lemma: cellBF well-definedness}: for degree reasons, the generator of the canonical transformation has to vanish; $\bar{S}_e$ in this case is given by (\ref{Sbar interval})). For cells of dimension $\geq 2$, $\bar{S}_e$ is not uniquely defined. 
\end{remark}

\begin{remark}
A different approach to the proof of Theorem \ref{thm: cellBF} is to fix a simplicial refinement $W$ of $X$ (i.e. cells of $X$ are triangulated in $W$).
Then, proceeding again by induction in $X_k$, as in (\ref{cellBF CW filtration}), one constructs $S_{X_k}$ as a BV pushforward of $S_{W_k}$, as constructed in Theorem \ref{thm: simpBF} ($W_k$ here is the restriction of $W$ to $X_k$), using a choice of gauge-fixing compatible with one for the BV pushforward $W_{k-1}\rightarrow X_{k-1}$ used in the previous step and involving a choice of induction data for relative cochains $C^\bullet(W|_{e_k},\partial e_k)\wavy{}C^\bullet(\bar{e}_k,\partial e_k)$.
\end{remark}

\begin{remark}[Standard building blocks for cells]
\label{rem: standard building blocks}
Assume that we have fixed some ``standard'' choice of the induction data (\ref{cellBF: cell ind data}) for all possible ball CW decompositions $\bar{e}$ of a closed $n$-ball with single top cell, considered up to homeomorphisms, for $n\geq 1$. Denote this collection of choices $\theta$. Then, by the construction of Theorem \ref{thm: cellBF}, we have a ``standard building block'' $\bar{S}_e^\theta$ satisfying ansatz (\ref{Sbar cell}) for any possible combinatorics of $\bar{e}$. For any finite ball CW complex $X$, we then have a ``standard'' cellular action $S^\theta_X=\sum_{e\subset X}\bar{S}^\theta_e$ satisfying the quantum master equation and properties (\ref{cellBF thm a}--\ref{cellBF thm c}) of Theorem \ref{thm: cellBF}. In particular, we can choose $\theta$ on simplices (and, more generally, on prisms, see Remark \ref{rem: prismatic}) to give the building blocks (\ref{Sbar}) of Theorem \ref{thm: simpBF}, coming from Whitney forms/Dupont's chain homotopy. 
\end{remark}

\begin{remark}[Rationality] We can choose the induction data (\ref{cellBF: cell ind data}) for cells to be \emph{rational}, i.e. to factor through induction data $C^\bullet(\bar{e},\mathbb{Q})\wavy{(i_\mathbb{Q},p_\mathbb{Q},K_\mathbb{Q})}H^\bullet(\bar{e},\mathbb{Q})$. Then, by inspection of the proof of Theorem \ref{thm: cellBF}, all the structure constants of the cellular action -- coefficients $C^e_{\Gamma_0,e_1,\ldots,e_n}$, $C^e_{\Gamma_1,e_1,\ldots,e_n}$ in (\ref{Sbar cell}) -- are \emph{rational} as well.
\end{remark}

\subsubsection{Cellular $BF$ action as a ``generating function'' of a unimodular $L_\infty$ algebra on cochains}\label{sec: uL_infty}
\begin{definition}\footnote{
This algebraic structure (and the example coming from Theorem \ref{thm: simpBF}) was introduced in \cite{SimpBF,DiscrBF} under the name of a \emph{quantum} $L_\infty$ algebra.  
In \cite{Granaker} it was named a \emph{unimodular} $L_\infty$ algebra and was studied as an algebra over a particular Merkulov's wheeled operad.
} \label{def: uL_infty}
A \emph{unimodular $L_\infty$ algebra} is a graded vector space $V^\bullet$ endowed with two sequences of skew-symmetric multilinear operations,
\begin{itemize}
\item \emph{classical operations}  $l_n:\,\wedge^n V \rightarrow V$ for $n\geq 1$ of degree $2-n$ and
\item \emph{quantum operations} $q_n:\, \wedge^n V\rightarrow \mathbb{R}$ for $n\geq 1$ of degree $-n$,
\end{itemize}
such that the following two sequences of identities hold: homotopy Jacobi identities
\begin{equation}\label{L_infty relations}
\sum_{\sigma\in \Sigma_{n}}\sum_{r+s=n}\pm\frac{1}{r!s!}\,l_{r+1}(x_{\sigma_1},\ldots,x_{\sigma_r},l_s(x_{\sigma_{r+1}},\ldots,\sigma_{n}))=0
\end{equation}
and homotopy unimodularity relations
\begin{equation} \label{uL_infty homotopy unimodularity}
\sum_{\sigma\in\Sigma_n}\left(\pm\frac{1}{n!}\,\mathrm{Str}_V\;l_{n+1}(x_{\sigma_1},\ldots,x_{\sigma_n},\bullet)+\sum_{r+s=n}\pm\frac{1}{r!s!}\,q_{r+1}(x_{\sigma_1},\ldots,x_{\sigma_r},l_s(x_{\sigma_{r+1}},\ldots,x_{\sigma_n}))\right)=0 
\end{equation}
Here $x_1,\ldots,x_n$ is an $n$-tuple of elements of $V$ and $\sigma$ runs over permutations of this $n$-tuple; $\pm$ are the Koszul signs. 

\end{definition}


\begin{definition}[\cite{DiscrBF}] For $V^\bullet$ a graded vector space, consider the odd-symplectic space $\mathsf{F}=V[1]\oplus V^*[-2]$. We say that an element $f\in \mathrm{Fun}(\mathsf{F})[[\hbar]]$ satisfies the ``$BF_\infty$ ansatz'' if 
\begin{equation}\label{BF_infty ansatz general}
f=\left\langle \mathsf{B} , \alpha(\mathsf{A}) \right\rangle - i\hbar \beta(\mathsf{A})
\end{equation}
where $\mathsf{A}\in \mathrm{Hom}_1(\mathsf{F},V)$, $\mathsf{B}\in \mathrm{Hom}_{-2}(\mathsf{F},V^*)$ are the superfields (projections to summands of $\mathsf{F}$ composed with shifted identity map) and  $\alpha(\mathsf{A}) \in \widehat{\mathrm{Sym}\,^{\geq 1}}(V[1])\otimes V^*$, $\beta(\mathsf{A})\in \widehat{\mathrm{Sym}\,^{\geq 1}}(V[1])$ arbitrary elements.
\end{definition}
Note that 
\begin{enumerate}[(i)]
\item If $f$ and $g$ satisfy the $BF_\infty$ ansatz then $\{f,g\}$ and $\Delta f$ also satisfy it.
\item If $S$ satisfies the $BF_\infty$ ansatz and is of internal degree zero, then one can write 
\begin{equation}\label{BF_infty ansatz via l,q}
S(\mathsf{A},\mathsf{B};\hbar)=\sum_{n\geq 1}\frac{1}{n!} \langle \mathsf{B}, l_n(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_n) \rangle- i\hbar \sum_{n\geq 1}\frac{1}{n!}q_n(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_n)
\end{equation}
where $l_n:\, \wedge^n V\rightarrow V$ and $q_n:\, \wedge^n V\rightarrow \mathbb{R}$ are certain multilinear operations on $V$. They endow $V$ with the structure of a unimodular $L_\infty$ algebra, as in Definition \ref{def: uL_infty}. Relations (\ref{L_infty relations},\ref{uL_infty homotopy unimodularity}) can be conveniently written in terms of the superfield $\mathsf{A}_X$ as
\begin{align*}
\sum_{r+s=n}\frac{1}{r!s!}\,l_{r+1}(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_r,l_s(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_s))=0,\\
\frac{1}{n!}\,\mathrm{Str}\;l_{n+1}(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_n,\bullet)+\sum_{r+s=n}\frac{1}{r!s!}\,q_{r+1}(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_r,l_s(\underbrace{\mathsf{A},\ldots,\mathsf{A}}_s))=0 
\end{align*}
and are equivalent to the quantum master equation satisfied by $S$.
\item If $S_t$, for $t\in [0,1]$, is a family of solutions of the QME satisfying the $BF_\infty$ ansatz such that $S_t$ for different $t$ are related by a canonical BV transformation 
\begin{equation}\label{can transformation}
\frac{\partial}{\partial t}\, S_t=\{S_t,R_t\}-i\hbar\, R_t
\end{equation} 
then the degree $-1$ generator $R_t$ has to satisfy the $BF_\infty$ ansatz as well.
\item One can introduce a natural notion of \emph{equivalence of unimodular $L_\infty$ structures} on $V$: two structures $\{l_n,q_n\}$, $\{l'_n,q'_n\}$ are called \emph{equivalent} if the corresponding solutions (\ref{BF_infty ansatz via l,q}) of QME on $\mathsf{F}$ can be related by a canonical BV transformation (\ref{can transformation}).
\end{enumerate}

In particular, for $V=C^\bullet(X,\mathfrak{g})$, 
the action $S_X$ constructed in Theorem \ref{thm: cellBF} can be expanded as
\begin{equation}\label{BF_infty ansatz for S_cell}
S_X(\mathsf{A}_X,\mathsf{B}_X;\hbar)=\sum_{n\geq 1}\frac{1}{n!} \langle \mathsf{B}_X, l_n^X(\underbrace{\mathsf{A}_X,\ldots,\mathsf{A}_X}_n) \rangle- i\hbar \sum_{n\geq 2}\frac{1}{n!}q_n^X(\underbrace{\mathsf{A}_X,\ldots,\mathsf{A}_X}_n)
\end{equation}
where $l_n^X:\, \wedge^n C^\bullet(X,\mathfrak{g})\rightarrow C^\bullet(X,\mathfrak{g})$ and $q_n^X:\, \wedge^n C^\bullet(X,\mathfrak{g})\rightarrow \mathbb{R}$ are multilinear operations on $\mathfrak{g}$-valued cochains,  endowing the space of cochains $C^\bullet(X,\mathfrak{g})$ with the structure of a unimodular $L_\infty$ algebra.

We can split operations $l_n^X,q_n^X$ into contributions of individual cells:
$$l_n^X=\sum_{e\subset X} e^*\cdot l_n^e(\mathsf{A}_{\bar{e}},\ldots,\mathsf{A}_{\bar{e}}),\qquad q_n^X=\sum_{e\subset X} q_n^e(\mathsf{A}_{\bar{e}},\ldots,\mathsf{A}_{\bar{e}})$$
where $l_n^e:\, \wedge^n C^\bullet(\bar{e},\mathfrak{g})\rightarrow \mathfrak{g}$ and $q_n^e:\,\wedge^n C^\bullet(\bar{e},\mathfrak{g})\rightarrow \mathbb{R}$ are the terms of the Taylor expansion in $\mathsf{A}$-fields of the building block (\ref{Sbar cell}),
\begin{equation}\label{Sbar via l and q}
\bar{S}_e=\sum_{n\geq 1} \frac{1}{n!} \left\langle B_e, l_n^e(\mathsf{A}_{\bar{e}},\ldots,\mathsf{A}_{\bar{e}}) \right\rangle_\mathfrak{g} -i\hbar\, \sum_{n\geq 2}\frac{1}{n!}\, q_n^e(\mathsf{A}_{\bar{e}},\ldots,\mathsf{A}_{\bar{e}}) 
\end{equation}

\begin{remark
Theorem \ref{thm: cellBF} possesses a straightforward generalization whereby one replaces the unimodular Lie algebra $(\mathfrak{g},[,])$ of coefficients of cochains/chains by any finite-dimensional unimodular $L_\infty$ algebra $(\mathfrak{g},\{l_n^\mathfrak{g}\},\{q_n^\mathfrak{g}\})$. In this case, instead of (\ref{cellBF S_pt}), for $e$ a $0$-cell, we have $\bar{S}_{e}=\left\langle B_e,\sum_{n\geq 1}\frac{1}{n!}\,l_n^\mathfrak{g}(\mathsf{A}_e,\ldots,\mathsf{A}_e) \right\rangle_\mathfrak{g}-i\hbar\, \sum_{n\geq 1} \frac{1}{n!}\, q_n^\mathfrak{g}(\mathsf{A}_e,\ldots,\mathsf{A}_e)$; instead of (\ref{cellBF: a eq}) we have $S_X=\left\langle \mathsf{B}_X,(d+l_1^\mathfrak{g})\mathsf{A}_X \right\rangle+\mathfrak{r}$. In (\ref{Sbar cell}), we then allow $\Gamma_0$ to be any rooted tree with in-valencies $\geq 2$ at vertices (not necessarily binary), with $\mathrm{Jacobi}_{\Gamma_0}$ defined as an nested composition of operations $l_n^\mathfrak{g}$ (with $n$ the in-valence of a vertex of the tree) associated to $\Gamma_0$. Graph $\Gamma_1$ can be either a $1$-loop graph with every vertex having out-valency $1$ and in-valency $\geq 2$ (and then $\mathrm{Jacobi}_{\Gamma_1}$ is a supertrace of a nested classical operation), or a rooted tree with the root vertex decorated by $q_n^\mathfrak{g}$, with $n$ the valency of the root vertex.
\end{remark}

\subsection{BV pushforward to cohomology, simple-homotopy equivalence, cellular aggregations


Similarly to Section \ref{sec: quantization closed}, we consider the BV pushforward of the half-density $e^{\frac{i}{\hbar}S_X}(\mu^\hbar_{\mathsf{F}_X})^{1/2} \in \mathrm{Dens}^{\frac12,\mathrm{C}^\infty}_\mathbb{C}(\mathsf{F}_X)$ to residual fields $\mathsf{F}^{\mathrm{res}}=H^\bullet(X,\mathfrak{g})[1]\oplus H_\bullet(X,\mathfrak{g}^*)[-2]$. The factor $(\mu^\hbar_{\mathsf{F}_X})^{1/2}=\xi_\hbar\cdot \mu_{\mathsf{F}_X}^{\frac12}$ is the normalized cellular half-density on the space of fields as in Section \ref{sec: quantization closed} (for cochains with coefficients in a trivial local system
with fiber $\mathfrak{g}$).\footnote{
Half-density $\mu_{\mathsf{F}_X}^{\frac12}$ is constructed using an a priori fixed density (i.e. a fixed normalization of the Lebesgue measure) $\mu_\mathfrak{g}$ on $\mathfrak{g}$, instead of the standard density on $\mathbb{R}^m$ as in Section \ref{sec: quantization closed}.
} I.e. we define the partition function by the fiber BV integral
\begin{equation}\label{Z sec 8.3}
Z(\mathsf{A}_\mathrm{res},\mathsf{B}_\mathrm{res}):=\int_{\mathcal{L}\subset \mathsf{F}_\mathrm{fluct} } e^{\frac{i}{\hbar}S_X}(\mu^\hbar_{\mathsf{F}_X})^{1/2} \quad \in \mathrm{Dens}^{\frac12,\mathrm{C}^\infty}_\mathbb{C}(\mathsf{F}^\mathrm{res}) 
\end{equation}
where the gauge fixing data -- the splitting $\mathsf{F}_X=\mathsf{F}^\mathrm{res}\oplus \mathsf{F}_\mathrm{fluct}$ and the Lagrangian $\mathcal{L}\subset  \mathsf{F}_\mathrm{fluct}$ -- are constructed, as in Section \ref{sec: quantization closed}, from a choice of induction data $C^\bullet(X)\wavy{} H^\bullet(X) $ (tensored with identity in $\mathfrak{g}$). 

By the general properties of BV pushforwards and by Theorem \ref{thm: cellBF}, we have $\Delta_\mathrm{res} Z=0$ and a change of the data $C^\bullet(X)\wavy{} H^\bullet(X)$ changes $Z\mapsto Z+\Delta_\mathrm{res}(\cdots)$.\footnote{By an abuse of notations, throughout Sections \ref{sec: non-ab BF I} and \ref{sec: non-ab BF cobordism} we are suppressing the superscript $\mathrm{can}$ for the BV Laplacian on half-densities. Similarly, in Section \ref{sec: non-ab BF cobordism} we will suppress this superscript for the operator $\widehat{S}_\partial$ acting on half-densities.}
More precisely,
a change of induction data induces a canonical BV transformation,\footnote{This is a general property of BV pushforwards for a change of gauge-fixing data in a smooth family, cf e.g. \cite{CMRpert}, Section 2.2.2. Note that by the discussion of Section \ref{sec: deformations of ind data}, in our case the space of gauge-fixing data is contractible and in particular path-connected, thus any two choices of gauge-fixing can be connected by a smooth family.
We are slightly abusing the term ``canonical BV transformation'': for us it has  two related meanings -- for $\Delta$-closed half-densities, as in (\ref{Z non-ab can transf}), and for actions (functions solving QME), as in 
(\ref{can transformation}).
These meanings are equivalent for half-densities satisfying exponential ansatz $Z=e^{\frac{i}{\hbar}S}\mu^{1/2}$.
} i.e. if $Z$ and $Z'$ are constructed using two different gauge-fixings, we can construct a family $Z_t$, $t\in [0,1]$, such that $Z_0=Z$, $Z_1=Z'$ and 
\begin{equation}\label{Z non-ab can transf}
\frac{\partial}{\partial t}Z_t=\Delta_\mathrm{res}(Z_t\cdot R_t)
\end{equation} 
for some $t$-dependent generator $R_t\in \mathrm{Fun}_{-1}(\mathsf{F}_\mathrm{res})[[\hbar]]$ of form $R_t=\left\langle \mathsf{B}_\mathrm{res}, \alpha_t(\mathsf{A}_\mathrm{res}) \right\rangle-i\hbar\, \beta_t(\mathsf{A}_\mathrm{res})$.

Computing the BV pushforward yields the result of the following form:
$$Z(\mathsf{A}_\mathrm{res},\mathsf{B}_\mathrm{res})= e^{\frac{i}{\hbar}S_\mathrm{res}(\mathsf{A}_\mathrm{res},\mathsf{B}_\mathrm{res};\hbar)}\;\xi_\hbar^{H^\bullet(X,\mathfrak{g})}\underbrace{\tau(X,\mathfrak{g})}_{\in \mathrm{Dens}^{\frac12} \mathsf{F}^\mathrm{res}}$$
where the factor $\xi_\hbar^{H^\bullet}$ and the torsion $\tau(X,\mathfrak{g})$ are for a trivial local system on $X$ of rank $\dim\mathfrak{g}$. The effective action on residual fields $S_\mathrm{res}$ is computed as a sum of Feynman diagrams
and satisfies the $BF_\infty$ ansatz (\ref{BF_infty ansatz via l,q}) for some multilinear operations $l_n^\mathrm{res}:\, \wedge^n H^\bullet(X,\mathfrak{g})\rightarrow H^\bullet(X,\mathfrak{g})$ and $q_n^\mathrm{res}:\, \wedge^n H^\bullet(X,\mathfrak{g})\rightarrow\mathbb{R}$ which endow the cohomology $H^\bullet(X,\mathfrak{g})$ with the structure of a unimodular $L_\infty$ algebra. In particular, the classical operations $\{l_n\}$ encode the \textit{rational homotopy type} of $X$.

\begin{comment}
\begin{definition}[Whitehead \cite{Whitehead}]
\begin{enumerate}[(i)]
\item For a simplex $e$ and $\sigma\subset e$ a face of $e$ of arbitrary codimension, we call the subcomplex $h_\sigma$ of the boundary $\partial\sigma$ given by the union of all $\mathrm{codim}=1$ faces of $e$ containing $\sigma$ a \emph{horn}.\footnote{
Warning: this notion of a horn is slightly more general than the one appearing in the Kan condition where a horn is the boundary of a simplex with a single (codim=1) boundary face excluded. Kan's horns are $h_\sigma$ for $\sigma$ a \emph{vertex}.
}
\item Let $X\subset Y$ be a pair of simplicial complexes where $Y$ is obtained from $X$ by attaching a single simplex $e$ along a horn of $e$; then we say that $X$ is obtained from $Y$ by an \emph{elementary collapse}, or equivalently that $Y$ is obtained from $X$ by an \emph{elementary expansion}.\footnote{
For example, Pachner's moves of triangulations of an $n$-manifold can be realized as an elementary expansion by a single $(n+1)$-simplex followed by an elementary collapse.} 
\item Two simplicial complexes $X$ and $Y$ are called \emph{simple-homotopy equivalent} if they can be connected by a sequence of elementary expansions and collapses.
\end{enumerate}
\end{definition}
\begin{definition}[Whitehead \cite{Whitehead}, see also \cite{Cohen}]
\begin{enumerate}[(i)]
\item For a simplex $e$ and $e'\subset e$ a face of $e$ of codimension $1$, we call the subcomplex $h_{e,e'}$ of the boundary $\partial e$ given by removing the face $e'$ a \emph{horn}.
\item Let $X\subset Y$ be a pair of simplicial complexes where $Y$ is obtained from $X$ by attaching a single simplex $e$ along a horn of $e$; then we say that $X$ is obtained from $Y$ by an \emph{elementary collapse}, or equivalently that $Y$ is obtained from $X$ by an \emph{elementary expansion}. In this case we denote $X\prec Y$ or $Y\succ X$.\marginpar{Do we use this notation?}
\item Two simplicial complexes $X$ and $Y$ are called \emph{simple-homotopy equivalent} if they can be connected by a sequence of elementary expansions and collapses.\footnote{
For example, Pachner's moves of triangulations of an $n$-manifold can be realized as a sequence elementary expansions followed by a sequence of elementary collapses.}
\end{enumerate}
\end{definition}
Similarly, for $e=\sigma_1\times\cdots \times \sigma_r$ a prism, a horn is defined as the boundary of the prism with a single codimension $1$ face removed. 
The definition of elementary expansions/collapses and simple-homotopy equivalence of prismatic complexes is then the same as for simplicial complexes.
\end{comment}

\begin{definition}[Whitehead \cite{Whitehead}, see also \cite{Cohen}]
\begin{enumerate}[(i)]
\item Let $Y$ be a CW complex
containing an $n$-cell $e$ and an $(n-1)$-cell $e'\subset \partial e$ for some $n\geq 1$, such that $e'$ is a \emph{free face} of $e$, i.e. $e'$ is cobounded only by $e$. Let $X\subset Y$ be the subcomplex obtained by removing the pair $e,e'$ from $X$. Then one calls $X$ an \emph{elementary collapse} of $Y$ and  $Y$ an \emph{elementary expansion} of $X$. The customary notation is $X\nearrow Y$ or $Y\searrow X$.
\item Two CW complexes $X$ and $Y$ are called \emph{simple-homotopy equivalent} if they can be connected by a sequence of elementary expansions and collapses.\footnote{For example, Pachner's moves of triangulations of an $n$-manifold can be realized as a sequence of elementary expansions followed by a sequence of elementary collapses. Also, cellular subdivisions and aggregations can be realized as sequences of expansions and collapses.}
\end{enumerate}
\end{definition}


Let us assume that the collection $\theta$ of standard induction data on cells is chosen, as in Remark \ref{rem: standard building blocks}, so that we have standard cellular actions $S_X^\theta$. We will omit the superscript $\theta$, implying that $S_X$ always stands for $S_X^\theta$ (and similarly for the building block  $\bar{S}_e$) throughout this section.

\begin{lemma}\label{lemma: collapse}
Let $X$ and $Y$ be two ball complexes such that $Y$ is an elementary expansion of $X$ obtained by adjoining a pair of cells $e$, $e'\subset \partial e$.
Then the BV pushforward $P_*^{Y\rightarrow X}$ 
from $\mathsf{F}_Y$ to $\mathsf{F}_X$ relates the standard cellular actions (\ref{cellBF locality})
as follows:
\begin{equation}\label{collapse: P_*}
P_*^{Y\rightarrow X} \left( e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2}\right)=
e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}+\Delta_X(\rho)
\end{equation}
There is a preferred (canonical) choice of gauge-fixing for the BV pushforward $P_*^{Y\rightarrow X}$, for which 
the half-density $\rho\in\mathrm{Dens}^{\frac12,\mathrm{C}^\infty}_\mathbb{C}(\mathsf{F}_X)$ above attains the form
\begin{equation}\label{collapse: rho}
\rho= -i\hbar\; r\cdot e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}
\end{equation}
with $r\in \mathrm{Fun}_{-1}(C^\bullet(\partial e-e',\mathfrak{g})[1])$ -- a function of the $\mathsf{A}$-field on $\partial e-e'$.
\end{lemma}

\begin{proof}
Define $h:=\partial e-e'\subset X$. 
Let  $k:=\dim (e')=\dim(e)-1$. 
Our
preferred gauge-fixing for the BV pushforward $P_*^{Y\rightarrow X}$ is associated to the induction data $C^\bullet(Y)\simeq C^\bullet(X)\oplus \mathrm{Span}(e^*,(e')^*)\wavy{(i,p,K)}C^\bullet(X)$ with 
\begin{multline}\label{collapse ind data}
p=\left\{\begin{array}{ll} \mathrm{id} & \mathrm{on}\; C^\bullet(X)\\0 & \mathrm{on}\; e^*,(e')^* \end{array}\right.,\;
i:\; \varepsilon^*\mapsto \left\{\begin{array}{ll} \varepsilon^*-(e')^* & \mathrm{if}\; \varepsilon \;\mathrm{is\; a}\; k\mathrm{-cell\;of}\; h \\
\varepsilon^* & \mathrm{otherwise}  \end{array}\right.,\\
K:\;\left\{\begin{array}{l} e^* \mapsto (e')^* \\
C^\bullet(X)\oplus \mathrm{Span}((e')^*) \mapsto 0  \end{array}\right.
\end{multline}
Here $\varepsilon$ is a cell of $X$. The map $i$ is the pullback by the projection $C_\bullet(Y)\rightarrow C_\bullet(X)$ which sends $e'\mapsto -h$ and $e\mapsto 0$. 
The result of the BV pushforward has the form $e^{\frac{i}{\hbar}S'_X}(\mu^\hbar_{\mathsf{F}_X})^{1/2}$ with $S'_X$ that can be different from
the standard action $S_X$. 
However the difference $S'_X-S_X$ is a function of the form  $-i\hbar\, \phi(\mathsf{A}_h)$ depending only on the field $\mathsf{A}$ on cells of $h$. Thus we have two solutions of the quantum master equation $S_h$ (standard) and $S_h-i\hbar\, \phi$ (obtained by BV pushforward from $e$) on $\mathsf{F}_h$.
One can connect them by a path of solutions of the quantum master equation $S_{h,t}=S_h-i\hbar\, t\cdot \phi$ with $t\in [0,1]$ such that $S_{h,0}=S_h$, $S_{h,1}=S_h-i\hbar\,\phi$. Similarly to the argument in the proof of Lemma \ref{lemma: cellBF well-definedness}, the fact that $\partial_t S_{h,t}$ can be written as an infinitesimal canonical BV transformation
\begin{equation}\label{can transf horn}
\partial_t S_{h,t}=\{S_{h,t},R_t\}-i\hbar\,\Delta R_t
\end{equation}
for some 
generator $R_t\in \mathrm{Fun}_{-1}(\mathsf{F}_h)[[\hbar]]$ 
of form $R_t=-i\hbar\,\chi(\mathsf{A}_h)$,  
follows from the computation of the zeroth cohomology of $Q_h=\{S_h^{(0)},\bullet\}$ on functions of field $\mathsf{A}$:
\begin{align}
\label{Chevalley H^0} H^0_{Q_h}(\mathrm{Fun}(C^\bullet(h,\mathfrak{g})[1]))&\simeq H^0_{CE}(\mathfrak{g})=\mathbb{R}
\end{align}
where we use 
the contractibility of $h$.\footnote{
In more detail, the quantum master equation for $S_h$ and for $S_h-i\hbar\,\phi$ implies 
$Q_h\phi=0$. 
Function $\phi$ vanishes at $\mathsf{A}=0$ (this is the point where we use the normalization of the half-densities $(\mu^\hbar_{\mathsf{F}_Y})^{1/2},(\mu^\hbar_{\mathsf{F}_X})^{1/2}$) which implies, together with (\ref{Chevalley H^0}), that the obstruction to $Q_h$-exactness of $\phi$ vanishes, i.e. we have $\phi=Q_h \chi$ for some $\chi$, a function of $\mathsf{A}_h$ of degree $-1$. Thus we have proved (\ref{can transf horn}) for the generator $R_t=-i\hbar \chi$.
}
Equation (\ref{can transf horn}) is equivalent to $\frac{\partial}{\partial t}e^{\frac{i}{\hbar}S_{h,t}}=\Delta\left(e^{\frac{i}{\hbar}S_{h,t}}R_t\right)$; integrating over $t\in [0,1]$, we obtain $e^{\frac{i}{\hbar}(S_h-i\hbar\,\phi)}-e^{\frac{i}{\hbar}S_h}=\Delta\left(\int_0^1 dt\, e^{\frac{i}{\hbar}S_{h,t}}R_t \right)
=\Delta\left( e^{\frac{i}{\hbar}S_h}\frac{e^\phi-1}{\phi}(-i\hbar\,\chi)\right)
$. Therefore, returning to the pair of complexes $X,Y$, we have obtained that the BV pushforward $e^{\frac{i}{\hbar}S_Y}(\mu^\hbar_{\mathsf{F}_Y})^{1/2}$ to $\mathsf{F}_X$ differs from $e^{\frac{i}{\hbar}S_X}(\mu^\hbar_{\mathsf{F}_X})^{1/2}$ by $\Delta_X(\cdots)$ with $(\cdots)$ given by (\ref{collapse: rho}) with $r=\frac{e^\phi-1}{\phi}\,\chi
$.
By general properties of BV pushforwards, another choice of gauge-fixing for $P_*^{Y\rightarrow X}$ preserves the result (\ref{collapse: P_*}) but may change the ansatz for $\rho$.
\end{proof}

\begin{Proposition}\label{prop: non-ab BF I simple homotopy invariance}
Assume that two
ball complexes $X$ and $Y$ are simple-homotopy equivalent. 
Let $Z_X$ and $Z_Y$ be the respective partition functions on $\mathsf{F}^\mathrm{res}_X\cong \mathsf{F}^\mathrm{res}_Y$. Then
\begin{equation}\label{Z_Y-Z_X simple homotopy}
Z_Y-Z_X=\Delta_\mathrm{res}(\cdots)
\end{equation}
More precisely, $Z_X$ and $Z_Y$ can be connected by a canonical transformation, as in (\ref{Z non-ab can transf}).
\end{Proposition}

\begin{proof
We can assume without loss of generality that $Y$ is an elementary expansion of $X$ obtained by attaching a
pair of cells $e$, $e'\subset \partial e$. 
\begin{comment}
we denote the free face of $e$ by $e':=\partial e-h$. Consider the BV pushforward of $e^{\frac{i}{\hbar}S_Y}(\mu^\hbar_{\mathsf{F}_Y})^{1/2}$ to $\mathsf{F}_X$.
The BV pushforward is given by integration over fields $\mathsf{A}_{e'}$ and $\mathsf{B}_e$ and setting $\mathsf{A}_e=\mathsf{B}_{e'}=0$ (this is our choice of a convenient gauge-fixing). 
The result has the form $e^{\frac{i}{\hbar}S'_X}(\mu^\hbar_{\mathsf{F}_X})^{1/2}$ with $S'_X$ that can be different from the ``standard'' $S_X$ (the one constructed by Theorem \ref{thm: simpBF}), but the difference is by a function of the form  $-i\hbar\, \phi(\mathsf{A}_h)$ depending only on the field $\mathsf{A}$ on cells of the horn. Thus we have two solutions of quantum master equation $S_h$ (standard) and $S_h-i\hbar\, \phi$ (obtained by BV pushforward from $e$) on $\mathsf{F}_h$, both satisfying the ansatz (\ref{BF_infty ansatz}). One can connect them by a path of solutions of quantum master equation $S_h^t=S_h-i\hbar\, t\cdot \phi$ with $t\in [0,1]$ such that $S_h^0=S_h$, $S_h^1=S_h-i\hbar\,\phi$. The fact that $\partial_t S_h^t$ can be written as an \textit{infinitesimal canonical BV transformation}
\begin{equation}\label{can transf horn}
\partial_t S_h^t=\{S_h^t,R^t\}-i\hbar\Delta R^t
\end{equation}
for some
generator $R^t\in \mathrm{Fun}_{-1}(\mathsf{F}_h)[[\hbar]]$ 
of form $R^t=-i\hbar\,\chi(\mathsf{A}_h)$, 
follows from the computation of zeroth cohomology of $Q_h=\{S_h^{(0)},\bullet\}$ on functions of field $\mathsf{A}$:
\begin{align}
\label{Chevalley H^0} H^0_{Q_h}(\mathrm{Fun}(C^\bullet(h,\mathfrak{g})[1]))&\simeq H^0_{CE}(\mathfrak{g})=\mathbb{R}
\end{align}
where we use 
the contractibility of the horn.\footnote{
In more detail, the quantum master equation for $S_h$ and for $S_h-i\hbar\,\phi$ implies
$Q_h\phi=0$.
Function $\phi$ vanishes at $\mathsf{A}=0$ (this is the point where we use the normalization of the half-densities $(\mu^\hbar_{\mathsf{F}_Y})^{1/2},(\mu^\hbar_{\mathsf{F}_X})^{1/2}$) which implies, together with (\ref{Chevalley H^0}), that the obstruction to $Q_h$-exactness of $\phi$ vanishes, i.e. we have $\phi=Q_h \chi$ for some $\chi$, a function of $\mathsf{A}_h$ of degree $-1$. Thus we have proved (\ref{can transf horn}) for the generator $R^t=-i\hbar \chi$.
}
Equation (\ref{can transf horn}) is equivalent to $\frac{\partial}{\partial t}e^{\frac{i}{\hbar}S^t_h}=\Delta\left(e^{\frac{i}{\hbar}S^t_h}R^t\right)$; integrating over $t\in [0,1]$, we obtain $e^{\frac{i}{\hbar}(S_h+\phi)}-e^{\frac{i}{\hbar}S_h}=\Delta\left(\int_0^1 dt\, e^{\frac{i}{\hbar}S^t_h}R^t \right)
=\Delta\left( e^{\frac{i}{\hbar}S_h}\frac{e^\phi-1}{\phi}(-i\hbar\,\chi)\right)
$. Therefore, returning to the pair of complexes $X,Y$, we have obtained that the BV pushforward $e^{\frac{i}{\hbar}S_Y}(\mu^\hbar_{\mathsf{F}_Y})^{1/2}$ to $\mathsf{F}_X$ differs from $e^{\frac{i}{\hbar}S_X}(\mu^\hbar_{\mathsf{F}_X})^{1/2}$ by $\Delta_X(\cdots)$. 
\end{comment}
Since the value of the BV pushforward from $\mathsf{F}_Y$ to residual fields is independent of the gauge-fixing data
when considered modulo canonical transformations,
one can choose the gauge-fixing corresponding to first pushing forward from $\mathsf{F}_Y$ to $\mathsf{F}_X$ and then to $\mathsf{F}^\mathrm{res}$ (using the construction of composition of induction data (\ref{composition of ind data})). On the other hand, by Lemma \ref{lemma: collapse}, the pushforward $\mathsf{F}_Y\rightarrow \mathsf{F}_X$, $\zeta_1:=P_*^{Y\rightarrow X}\left(e^{\frac{i}{\hbar}S_Y}(\mu^\hbar_{\mathsf{F}_Y})^{1/2}\right)$, differs from $\zeta_0:=e^{\frac{i}{\hbar}S_X}(\mu^\hbar_{\mathsf{F}_X})^{1/2}$ by a canonical transformation,
i.e. we have a family of half-densities $\zeta_t$ on $\mathsf{F}_X$ with $\frac{\partial}{\partial t}\zeta_t=\Delta_X(\zeta_t R_{X,t})$. Hence, $P_*^{X\rightarrow \mathrm{res}}P_*^{Y\rightarrow X}\left(e^{\frac{i}{\hbar}S_Y}(\mu^\hbar_{\mathsf{F}_Y})^{1/2}\right)=P_*^{X\rightarrow \mathrm{res}}\zeta_1 $ is connected to $P_*^{X\rightarrow\mathrm{res}}\zeta_0$ by a family $Z_t=P_*^{X\rightarrow\mathrm{res}}\zeta_t$ satisfying $\frac{\partial}{\partial t}Z_t = \Delta_\mathrm{res}(Z_t R_t)$ with $R_t:=Z_t^{-1}P_*^{X\rightarrow \mathrm{res}}(\zeta_t R_{X,t})$.  We used here the property of BV pushforward that it commutes with BV Laplacians. This proves the Proposition.
\end{proof}

\begin{Proposition}\label{prop: aggregations}
Let $X,Y$ be two
ball
complexes such that $X$ is a \emph{cellular aggregation} of $Y$ (or, equivalently, $Y$ is a \emph{subdivision} of $X$). Then the BV pushforward $P_*^{Y\rightarrow X}$ from $\mathsf{F}_Y$ to $\mathsf{F}_X$ relates the standard cellular actions $S_Y$ and $S_X$ by
\begin{equation}\label{aggreg}
P_*^{Y\rightarrow X} \left( e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2} \right)
= e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}+\Delta_X(\cdots)
\end{equation}
More precisely,
the r.h.s. of (\ref{aggreg}) has the form $e^{\frac{i}{\hbar}S'_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}$ and for special ``geometric'' choices of gauge-fixing for the BV pusforward $P_*^{Y\rightarrow X}$, we have a canonical transformation
\begin{equation}\label{aggreg can transf}
S'_X=S_X-i\hbar\{S_X,R^{(1)}\}
\end{equation}
with the generator $R^{(1)}(\mathsf{A}_X)\in \mathrm{Fun}_{-1}(C^\bullet(X,\mathfrak{g})[1])$  given by the linear in $\hbar$ term of the ansatz (\ref{Sbar cell},\ref{cellBF locality}) with coefficients $C^e_{\Gamma_1,e_1,\ldots,e_n}$ for a cell $e\subset X$ depending on the combinatorics of $Y|_e$ and the particular choice of geometric gauge-fixing. In this case, the $\Delta_X(\cdots)$ term in (\ref{aggreg}) is in fact  $\Delta_X\left( \frac{e^\phi-1}{\phi}\cdot(-i\hbar\, R^{(1)})\cdot e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2} \right)$ where we denoted $-i\hbar\,\phi(\mathsf{A}_X):=S'_X-S_X$.
\end{Proposition}

\begin{proof}
Let us write $Y\succ X$ if $X$ an aggregation of $Y$. We can always decompose $Y\succ X$ as a sequence 
\begin{equation}\label{aggreg decomp into single-cell aggreg}
Y=X_m\succ X_{m-1}\succ\cdots \succ X_0=X 
\end{equation}
where for each $0\leq k<m$, $X_{k+1}$ is a subdivision of $X_k$ where only a single cell $e$ of $X_k$ is subdivided and others (including cells of $\partial e$) are untouched.\footnote{
To obtain such a decomposition, order the cells $e_1,\ldots, e_m$ of $X$ in the order of non-decreasing dimension, as in the proof of Theorem \ref{thm: cellBF}. Then set $X_k:=\left(\bigcup_{i\leq k} Y|_{e_i}\right)\cup \left(\bigcup_{i>k} e_i\right)$.
}

First consider the case when 
$Y$ is a subdivision of a single cell $e$ of $X$. Then we can represent the aggregation $Y\succ X$ as a simple-homotopy equivalence -- a single elementary expansion (given by adjoining to $Y$ the pair of cells $\widetilde{e},e\subset \partial\widetilde{e}$) followed by a sequence of collapses
\begin{equation}\label{aggreg via simple-homotopy}
Y\nearrow\; (W=W_0)\; \searrow W_1\searrow\cdots \searrow\; (W_p=X)
\end{equation}
\begin{figure}[!htbp]
\begin{center}
\input{aggreg_via_simple_homotopy.pdftex_t}
\caption{Example of a single-cell aggregation presented as an expansion followed by a sequence of collapses.}
\end{center}
\end{figure}
Here one can regard $W$ as $(Y\cup_{X-e} X)\cup \widetilde{e}$; the boundary of the cell $\widetilde{e}$ is $\partial \widetilde{e}=\bar{e}\cup_{\partial e} \bar{e}_Y$, where $e_Y=Y|_e$ is a copy $e$ subdivided in $Y$, which is glued to a non-subdivided copy of $e$ along the equator $\partial e=\partial e_Y$ in the sphere $\partial \widetilde{e}$.

Consider the standard cellular action $S_W$ for $W$. 
We have the standard induction data (\ref{collapse ind data}) for the collapses $W\searrow\cdots\searrow X$ which compose to $C^\bullet(W)\wavy{(i_{W\rightarrow X},p_{W\rightarrow X},K_{W\rightarrow X})} C^\bullet(X)$ and also a standard induction data $C^\bullet(W)\wavy{(i_{W\rightarrow Y},p_{W\rightarrow Y},K_{W\rightarrow Y})} C^\bullet(Y) $ for the collapse $W\searrow Y$. By Lemma \ref{lemma: collapse}, we have 
{\small
\begin{align}
\label{aggreg P_* W to X}
P_*^{W\rightarrow X}\left( e^{\frac{i}{\hbar}S_W}(\mu_{\mathsf{F}_W}^\hbar)^{1/2} \right) &= e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}+\Delta_X\left(-i\hbar\, 
r_{W\rightarrow X}\cdot e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}\right),\\
\label{aggreg P_* W to Y}
P_*^{W\rightarrow Y}\left( e^{\frac{i}{\hbar}S_W}(\mu_{\mathsf{F}_W}^\hbar)^{1/2} \right) &= e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2}+\Delta_Y\left(-i\hbar\, 
r_{W\rightarrow Y}\cdot e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2}\right)
\end{align}
}
for some degree $-1$ functions $r_{W\rightarrow X}(\mathsf{A}_X|_{\bar{e}})$ and $r_{W\rightarrow Y}(\mathsf{A}_Y|_{\bar{e}_Y})$. 
Here for the BV pushforwards we use the gauge-fixing associated with the standard induction data above. For the pushforward $P_*^{Y\rightarrow X}$ corresponding to the aggregation $Y\rightarrow X$, we will use the induction data 
\begin{equation}\label{aggreg ind data}
C^\bullet(Y)\wavy{(p_{W\rightarrow Y}\circ i_{W\rightarrow X}, p_{W\rightarrow X}\circ i_{W\rightarrow Y}, p_{W\rightarrow Y}\circ K_{W\rightarrow X}\circ i_{W\rightarrow Y})}C^\bullet(X)
\end{equation}
-- this is the ``geometric'' gauge-fixing mentioned in the Proposition; it depends on choosing a particular presentation (\ref{aggreg via simple-homotopy}) of an aggregation as a simple-homotopy equivalence.\footnote{
Note also that induction data (\ref{aggreg ind data}) factors through \emph{integral} cochains, $C^\bullet(Y,\mathbb{Z})\wavy{}C^\bullet(X,\mathbb{Z})$.
}

Composition of this data with $C^\bullet(W)\wavy{}C^\bullet(Y)$ above yields the data $C^\bullet(W)\wavy{} C^\bullet(X)$ above. Thus with these choices one has 
$P_*^{Y\rightarrow X}P_*^{W\rightarrow Y}=P_*^{W\rightarrow X}$ (a precise identity, not modulo canonical transformations); applying this to $e^{\frac{i}{\hbar}S_W}(\mu_{\mathsf{F}_W}^\hbar)^{1/2}$ and using (\ref{aggreg P_* W to X},\ref{aggreg P_* W to Y}), we obtain 
\begin{multline}\label{aggreg P_* Y to X}
P_*^{Y\rightarrow X}\left(e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2}\right)=\\= 
e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}+\Delta_X\left(-i\hbar\, r_{Y\rightarrow X}\cdot e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}\right)=: e^{\frac{i}{\hbar}S'_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}
\end{multline}
with $r_{Y\rightarrow X}(\mathsf{A}_X|_{\bar{e}}):=r_{W\rightarrow X}-e^{-\frac{i}{\hbar}S_X} P_*^{Y\rightarrow X}\left(r_{W\rightarrow Y}\cdot e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2}\right)\in \mathrm{Fun}_{-1}(C^\bullet(\bar{e},\mathfrak{g})[1])$.
We then define $R^{(1)}(\mathsf{A}_X|_{\bar{e}})$ as $R^{(1)}:=r_{Y\rightarrow X}\cdot\frac{\phi}{e^{\phi}-1}$ with $\phi(\mathsf{A}_X|_{\bar{e}}):=\frac{i}{\hbar}(S'_X-S_X)\in \mathrm{Fun}_0(C^\bullet(\bar{e},\mathfrak{g})[1])$. Then, by a calculation similar to the one in the proof of Lemma \ref{lemma: collapse}, (\ref{aggreg P_* Y to X}) is equivalent to (\ref{aggreg can transf}). 
This proves the Proposition in the case when $Y$ is a single-cell subdivision of $X$.

In the case of a general (non single-cell) aggregation (\ref{aggreg decomp into single-cell aggreg}),
we notice that $S'_X$, defined via $e^{\frac{i}{\hbar}S'_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}:= P_*^{Y\rightarrow X}\left(e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2}\right)$, with $P_*^{Y\rightarrow X}=P_*^{X_1\rightarrow X}\cdots P_*^{Y\rightarrow X_{m-1}}$, satisfies the assumptions of Lemma \ref{lemma: cellBF well-definedness} and thus is connected to $S_X$ by a canonical transformation with generator satisfying the ansatz (\ref{Sbar cell},\ref{cellBF locality}). From the single-cell aggregation case we infer that the generator has only the linear in $\hbar$ part (while the $\hbar$-independent part vanishes). Such a transformation with a $t$-dependent generator $-i\hbar\, R^{(1)}_t$, $t\in [0,1]$ is equivalent to a transformation with constant ($t$-independent) generator $-i\hbar\,R^{(1)}=-i\hbar\,\int_0^1 dt\, R^{(1)}_t$.
\begin{comment}
Since an aggregation can be represented by a simple-homotopy equivalence, we can assume, without loss of generality, that $X$ is obtained from $Y$ by a sequence of $m\geq 0$ elementary expansions followed by a sequence of elementary $n\geq 0$  collapses
$$ Y=Y_0\prec Y_1\prec\cdots\prec Y_m=W=W_0\succ W_1\succ\cdots \succ W_n=X  $$
By iterating Lemma \ref{lemma: collapse}, we have that BV pushforwards
of $e^{\frac{i}{\hbar}S_W}(\mu_{\mathsf{F}_W}^\hbar)^{1/2}$ from $\mathsf{F}_W$ to $\mathsf{F}_Y$ and $\mathsf{F}_X$, respectively, differ from $e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2}$ and $e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}$ by $\Delta_Y$- and $\Delta_X$-exact terms, respectively. Thus, the pushforward from $W$ to $X$ via $Y$ differs from $e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}$ by a $\Delta_X$-exact term and is, on the other hand, equal to $P_*^{Y\rightarrow X}\left(e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2}+\Delta_Y(\cdots) \right)$.  This proves (\ref{aggreg}).
\end{comment}
\end{proof}

\begin{comment}
\begin{remark}
Another approach to the proof of Proposition \ref{prop: aggregations} for a single-cell aggregation $Y\succ X$ is as follows. We construct the induction data $C^\bullet(Y)\wavy{}C^\bullet(X)$ from a choice of induction data for relative cochains $C^\bullet(Y|_{\bar{e}},\partial e)\wavy{} C^\bullet(\bar{e},\partial e)$.\footnote{
Note that the construction of our first proof of Proposition \ref{prop: aggregations} yields a collection of preferred induction data of this type, associated to different presentations (\ref{aggreg via simple-homotopy}) of a single-cell aggregation as an expansion followed by a sequence of collapses.
} Then we notice that, for the corresponding gauge-fixing, the cellular action $S'_X$ defined via $e^{\frac{i}{\hbar}S'_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}:=P_*^{Y\rightarrow X}\left(e^{\frac{i}{\hbar}S_Y}(\mu_{\mathsf{F}_Y}^\hbar)^{1/2}\right)$ satisfies the assumptions of Lemma \ref{lemma: cellBF well-definedness} and hence is connected to $S_X$ by a canonical transformation.
\end{remark}
\end{comment}

\subsection{Remarks}
\subsubsection{BV cohomology} 

\begin{definition}
Let $\mathsf{F},\omega$ be an odd-symplectic space and $S\in \mathrm{Fun}_0(\mathsf{F})[[-i\hbar]]$ a solution of the quantum master equation on $\mathsf{F}$. We define the \emph{perturbative BV cohomology at $S$}\footnote{We introduce this term to avoid confusion with the cohomology of the BV Laplacian $\Delta$ itself which is quite different (perturbative BV cohomology contains more information), see (\ref{BV coh 1}) vs. (\ref{BV coh 7}) below.} 
as the cohomology of the differential $\delta_S=\{S,\bullet\}-i\hbar \Delta = e^{-\frac{i}{\hbar}S} \Delta e^{\frac{i}{\hbar}S}$ on $\mathrm{Fun}(\mathsf{F})[[-i\hbar]]$.
\end{definition}

In particular, cohomology of $\delta_S$ in degree zero controls infinitesimal deformations of $S$ as a solution of QME modulo canonical transformations (or, in other words, gives observables $O\in \mathrm{Fun}_0 (\mathsf{F})[[-i\hbar]]$ such that $\Delta(O\, e^{\frac{i}{\hbar}S})=0$ considered modulo infinitesimal equivalence $O\,e^{\frac{i}{\hbar}S}\sim O\, e^{\frac{i}{\hbar}S}+\epsilon\,\Delta(-i\hbar\, R\, e^{\frac{i}{\hbar}S})$).

Assume that we are in the setting of Section \ref{sec: uL_infty}, with $\mathsf{F}=V[1]\oplus V^*[-2]$ for $V=V^\bullet$ a graded vector space and $S$ satisfying the $BF_\infty$ ansatz (\ref{BF_infty ansatz general}). We note the following.  
\begin{enumerate}[(i)]
\item \label{BV coh 1}
Cohomology of $\Delta$ on $\mathrm{Fun}(\mathsf{F})$ is a line spanned by the element $\nu\in \bigotimes_k \mathrm{Det}(V^{2k})^* \otimes \bigotimes_k \mathrm{Det}\, V^{2k+1}=\mathrm{Det}(\mathsf{F}^\mathrm{odd})^*$ given by the product of all components of $\mathsf{A}$ ,$\mathsf{B}$ of \emph{odd} internal degree, $H_\Delta (\mathrm{Fun}(\mathsf{F}))=\nu\cdot \mathbb{R}$, with $\nu$ having internal degree $|\nu|=\sum_{k}(1-2k)\dim V^{2k}+\sum_k (-2+ (2k+1))\dim V^{2k+1}$.\footnote{This follows from writing $\mathsf{F}$ as an odd cotangent bundle $T^*[-1]N$ of an evenly graded vector space $N=\bigoplus_k V^{2k+1}\oplus \bigoplus_k (V^{2k})^*$ spanned by \emph{even} components of $\mathsf{A}$, $\mathsf{B}$. Then $\mathrm{Fun}(\mathsf{F}),\Delta$ is identified with the space of polyvector fields on $N$ with differential given by the divergence operator; this complex in turn is isomorphic to the de Rham complex of $N$ via \emph{odd Fourier transform} \cite{SchwarzBV}. Since $N$ is a vector space, its de Rham cohomology is given by constant $0$-forms on $V$; their odd Fourier transform gives $\nu\cdot \mathbb{R}$.
}  This cohomology was considered in \cite{Gwilliam}.
\item \label{BV coh 2}
We have 
\begin{equation}\label{BV coh classical}
H^k_{\{S^{(0)},\bullet\}}(\mathrm{Fun}(\mathsf{F}))= H^k_{CE}(V,\mathrm{Sym}\, V[2])
\end{equation}
where on the r.h.s. we have the Chevalley-Eilenberg cohomology of the $L_\infty$ algebra $V,\{l_n\}$ (with $l_n$ the $L_\infty$ operations corresponding to the $O(\hbar^0)$ term in $S$ via (\ref{BF_infty ansatz via l,q})) with coefficients in the sum of  symmetric powers of the adjoint module. We denote the cohomology (\ref{BV coh classical}) by $\mathfrak{H}$ -- one can view it as the ``classical'' ($\hbar$-independent) counterpart of perturbative BV cohomology.
\item \label{BV coh 3}
The operator $\{S^{(1)},\bullet\}+\Delta$ can be viewed as a perturbation of the differential $\{S^{(0)},\bullet\}$ on $\mathrm{Fun}(\mathsf{F})$ and thus induces, by homological perturbation theory (HPT) a differential $\mathfrak{D}$ on $\mathfrak{H}$. We then have
\begin{equation}
H^\bullet_{\delta_S}(\mathrm{Fun}(\mathsf{F})[[-i\hbar]])=H^\bullet_{-i\hbar \mathfrak{D}}(\mathfrak{H}[[-i\hbar]])=\left(\mathfrak{H}^\bullet\cap \ker\mathfrak{D}\right)\oplus (-i\hbar)\cdot H^\bullet_{\mathfrak{D}}(\mathfrak{H})[[-i\hbar]]
\end{equation}
I.e. perturbative BV cohomology in the order $O(\hbar^0)$ is given by $\mathfrak{D}$-closed elements of classical BV cohomology (\ref{BV coh classical}), whereas in positive orders in $\hbar$ it is given by copies of cohomology of $\mathfrak{D}$, one copy per order.
\item \label{BV coh 4}
Consider the ``abelian $BF$'' action $S^\mathrm{ab}:=\left\langle \mathsf{B}, d\mathsf{A}\right\rangle $ on $\mathsf{F}$, for $d=l_1$ the differential on $V$, -- it is the quadratic $\hbar$-independent term of the full $BF_\infty$ action $S$. We have $H^\bullet_{\{S^\mathrm{ab},\bullet\}}(\mathrm{Fun}(\mathsf{F}))=\mathrm{Fun}(\mathsf{F}_\mathrm{res})$ with $\mathsf{F}_\mathrm{res}=H^\bullet(V)[1]\oplus (H^\bullet(V))^*[-2]$ and the perturbation of the differential  $\{S^\mathrm{ab},\bullet\} \mapsto \{S^\mathrm{ab},\bullet\}+\Delta$ produces, as the induced differential, the standard BV Laplacian $\Delta_\mathrm{res}$ on $\mathrm{Fun}(\mathsf{F}_\mathrm{res})$. In particular, we have 
\begin{equation}\label{BV coh abelian}
H^\bullet_{\{S^\mathrm{ab},\bullet\}-i\hbar \Delta}=H^\bullet_{-i\hbar \Delta_\mathrm{res}}(\mathrm{Fun}(\mathsf{F}_\mathrm{res})[[-i\hbar]])=\left(\mathrm{Fun}(\mathsf{F}_\mathrm{res})\cap \ker \Delta_\mathrm{res}\right)\oplus (-i\hbar)\nu_\mathrm{res}\cdot \mathbb{R}[[-i\hbar]]
\end{equation}
with $\nu_\mathrm{res}$ as in (\ref{BV coh 1}), with $V$ replaced by $H^\bullet(V)$.

\item \label{BV coh 5} Assume that $V',d'$ is a retract of the complex $V,d$ and assume that $S'$ is the effective action on  $\mathsf{F}'=V'[1]\oplus (V')^*[-2]$ induced from $S$ via BV pushforward. Note that $S'$ automatically satisfies $BF_\infty$ ansatz.
Then,
treating $\delta_S$ via HPT as a perturbation of the differential $\{S^\mathrm{ab},\bullet\}-i\hbar\Delta$ on  $\mathrm{Fun}(\mathsf{F})[[-i\hbar]]$, one can prove that the induced differential on $\mathrm{Fun}(\mathsf{F}')[[-i\hbar]]$ is precisely $\delta_{S'}$, with $S'$ given by Feynman diagrams for the BV pushforward (a
version of this observation was made in \cite{GJF}; this statement is not specific to $BF_\infty$ ansatz)
Therefore, we have 
\begin{equation}
H^\bullet_{\delta_S}(\mathrm{Fun}(\mathsf{F})[[-i\hbar]])=H^\bullet_{\delta_{S'}}(\mathrm{Fun}(\mathsf{F}')[[-i\hbar]])
\end{equation}

\item \label{BV coh 6} Let $S_\mathrm{res}=S_\mathrm{res}^{(0)}-i\hbar\, S_\mathrm{res}^{(1)}\in \mathrm{Fun}(\mathsf{F}_\mathrm{res})[[-i\hbar]]$ be the effective action induced on $\mathsf{F}_\mathrm{res}$ from $S$. Denote $w:=\left. S_\mathrm{res}\right|_{\hbar=i}= S_\mathrm{res}^{(0)}+ S_\mathrm{res}^{(1)} \in \mathrm{Fun}(\mathsf{F}_\mathrm{res})$. Using (\ref{BV coh 5}) and (\ref{BV coh 4}), we see that the cohomology
\begin{equation}
H^\bullet_{\mathfrak{D}}(\mathfrak{H})=H^\bullet_{\{w,\bullet\}+\Delta_\mathrm{res}}(\mathrm{Fun}(\mathsf{F}_\mathrm{res}))= e^{-w}\nu_\mathrm{res}\cdot\mathbb{R}
\end{equation}
has rank $1$ and is concentrated in degree $|\nu_\mathrm{res}|=\sum_k (1-2k)(\dim H^{2k}(V)-\dim H^{2k+1}(V))$.
\item \label{BV coh 7} 
Putting together (\ref{BV coh 3}) and (\ref{BV coh 6}), we obtain that
\begin{equation}
H^\bullet_{\delta_S}(\mathrm{Fun}(\mathsf{F})[[-i\hbar]])=(\mathfrak{H}^\bullet\cap\ker\mathfrak{D})\oplus (-i\hbar)e^{-w}\nu_\mathrm{res}\cdot \mathbb{R}[[-i\hbar]]
\end{equation}

\end{enumerate}

Summarizing the observations above and applying to the case of cellular action of Theorem \ref{thm: cellBF}, and using Proposition \ref{prop: non-ab BF I simple homotopy invariance}, we have the following.

\begin{Proposition} For $X$ a ball complex, perturbative BV cohomology associated to the cellular action (\ref{cellBF locality}) has the form
\begin{equation}
H^\bullet_{\delta_{S_X}}(\mathrm{Fun}(\mathsf{F}_X)[[-i\hbar]])=(\mathfrak{H}^\bullet_X\cap\ker\mathfrak{D}_X)\oplus (-i\hbar)\cdot \mathbb{R}[-\mathfrak{p}][[-i\hbar]]
\end{equation}
where 
\begin{itemize}
\item $\mathfrak{H}^\bullet=H^\bullet_{CE}(C(X,\mathfrak{g}),\mathrm{Sym}\, C(X,\mathfrak{g})[2])\cong H^\bullet_{CE}(H(X,\mathfrak{g}),\mathrm{Sym}\, H(X,\mathfrak{g})[2])$ -- Chevalley-Eilenberg cohomology of cellular cochains and cellular cohomology, understood as $L_\infty$ algebras, with coefficients in the sum of symmetric powers of the adjoint module.
\item $\mathfrak{D}_X$ is the differential on $\mathfrak{H}^\bullet$ induced by homological perturbation theory from the perturbation $\{S^{(0)},\bullet\}\mapsto \{S^{(0)},\bullet\}+\{S^{(1)}_X,\bullet\}+\Delta_X$ of the differential on $\mathrm{Fun}(\mathsf{F}_X)$.
Equivalently, $\mathfrak{D}_X$ is induced from the perturbation  $\{S^{(0)}_\mathrm{res},\bullet\}\mapsto \{S^{(0)}_\mathrm{res},\bullet\}+\{S^{(1)}_\mathrm{res},\bullet\}+\Delta_\mathrm{res}$ of the differential on $\mathrm{Fun}(\mathsf{F}_\mathrm{res})$.
\item Perturbative BV cohomology in higher orders in $\hbar$ has rank $1$ and is concentrated in degree
$$\mathfrak{p}=\sum_k (1-2k)\left(\dim H^{2k}(X,\mathfrak{g})-\dim H^{2k+1}(X,\mathfrak{g})\right)$$
\item The generator $1\in\mathbb{R}$ of perturbative BV cohomology in positive degree in $\hbar$ is represented in $\mathrm{Fun}(\mathsf{F}_X)$ by the element $p^* (e^{-w}\nu_\mathrm{res})$ where $p:\mathsf{F}_X\rightarrow \mathsf{F}_\mathrm{res}$ is the projection to residual fields 
used as a part of gauge-fixing in (\ref{Z sec 8.3}), $\nu_\mathrm{res}\in \bigotimes_k\mathrm{Det}(H^{2k}(X,\mathfrak{g}))^*\otimes \bigotimes_k \mathrm{Det}(H_{2k+1}(X,\mathfrak{g}^*))^*=\mathrm{Det}(\mathsf{F}_\mathrm{res}^\mathrm{odd})^*$ is the product of all components of fields $\mathsf{A}_\mathrm{res},\mathsf{B}_\mathrm{res}$ of odd internal degree; $w=S^{(0)}_\mathrm{res}+S^{(1)}_\mathrm{res}$ is the effective action on residual fields evaluated at $\hbar=i$.
\end{itemize}
If the complexes $X$ and $Y$ are simple-homotopy equivalent, the respective BV cohomology is canonically isomorphic,
$$H^\bullet_{\delta_{S_X}}(\mathrm{Fun}(\mathsf{F}_X)[[-i\hbar]])\cong H^\bullet_{\delta_{S_Y}}(\mathrm{Fun}(\mathsf{F}_Y)[[-i\hbar]])$$
\end{Proposition}

\begin{example}
For $X$ contractible, perturbative BV cohomology is the same as for $X$ a point, and thus we have $H^\bullet_{\delta_{S_X}}=(H^\bullet_{CE}(\mathfrak{g},\mathrm{Sym}\, \mathfrak{g}[2])\cap \ker \mathfrak{D})\oplus (-i\hbar)\mathbb{R}[-\dim\mathfrak{g}][[-i\hbar]]$. One can understand $H^\bullet_{CE}(\mathfrak{g},\mathrm{Sym}\, \mathfrak{g}[2])\cap \ker \mathfrak{D}$ as the subspace of \emph{unimodular classes} in Lie algebra cohomology. E.g., in degree zero we have
$H^0_{\delta_{S_X}}=\bigoplus_k H^{2k}_{CE}(\mathfrak{g},\mathrm{Sym}\,^k \mathfrak{g})\cap \ker \mathfrak{D}$. Contribution of $k=1$ here is the space of unimodular deformations of the Lie bracket on $\mathfrak{g}$ modulo inner automorphisms (note that for $\mathfrak{g}$ semi-simple, it vanishes since $H^2_{CE}(\mathfrak{g},\mathfrak{g})$ vanishes as a whole).
\end{example}

\begin{example} For $X$ arbitrary and $\mathfrak{g}$ an abelian Lie algebra, perturbative BV cohomology is given by (\ref{BV coh abelian}). If we identify $\mathrm{Fun}(\mathsf{F}_\mathrm{res})$ with polyvector fields on $H^\bullet(X,\mathfrak{g})[1]$, then $\mathrm{Fun}(\mathsf{F}_\mathrm{res})\cap \ker\Delta_\mathrm{res}$ is the subspace of \emph{divergence-free} polyvector fields.
\end{example}

Returning to the setup of Section \ref{sec: uL_infty}, we can introduce a subspace 
\begin{multline*}
\Xi:
\\:=\{\left\langle \mathsf{B}, \alpha(\mathsf{A})\right\rangle-i\hbar\, \beta (\mathsf{A})  \;\Big{|}\; \alpha(\mathsf{A})\in \widehat{\mathrm{Sym}\,^{\geq 2}} (V[1])^*\otimes V^*, \beta(\mathsf{A})\in \widehat{\mathrm{Sym}\,^{\geq 1}} (V[1])^* \}\\
=\Xi^{(0)}\oplus (-i\hbar)\cdot\Xi^{(1)}\quad \subset \mathrm{Fun}(\mathsf{F})[[-i\hbar]]
\end{multline*}
-- elements satisfying the $BF_\infty$ ansatz (\ref{BF_infty ansatz general}) with terms bi-linear in $\mathsf{A}$ and $\mathsf{B}$ prohibited. Note that $\Xi$ is a subcomplex w.r.t. $\delta_S$. Repeating the argument above, we obtain that the cohomology of $\delta_S$ on $\Xi$ is
$$H^\bullet_{\delta_S}(\Xi)=H^\bullet_{\{S^{(0)},\bullet\}}(\Xi^{(0)})\cap \ker \mathfrak{D}$$
with $\mathfrak{D}$ as above; note that this cohomology does not have $O(\hbar^{\geq 1})$ terms.

\begin{remark} Note that $-i\hbar\cdot 1$ is a $\delta_S$-exact element in $\mathrm{Fun}(\mathsf{F})[[-i\hbar]]$. By inspecting the HPT argument above, one can construct an explicit primitive $\phi(\mathsf{A},\mathsf{B})$ with 
$\delta_S(\phi)=-i\hbar\cdot 1$; this element necessarily contains a component bi-linear in $\mathsf{A}$ and $\mathsf{B}$. Therefore, for any $c\in\mathbb{R}$ one can connect $S$ and $S-i\hbar\cdot c$ (or, equivalently, half-densities $e^{\frac{i}{\hbar}S}(\mu_\mathsf{F}^\hbar)^{1/2}$ and $e^c\cdot e^{\frac{i}{\hbar}S}(\mu_\mathsf{F}^\hbar)^{1/2}$) by a canonical transformation. But if the generator of the canonical transformation is prohibited to have a term bi-linear in $\mathsf{A}$, $\mathsf{B}$, then such transformation is prohibited. Thus our rigid normalization of half-densities $e^{\frac{i}{\hbar}S_X}(\mu_{\mathsf{F}_X}^\hbar)^{1/2}$ and $Z$ (as defined by (\ref{Z sec 8.3})) is meaningful, since the restriction above for canonical transformations holds in all cases of relevance for us: in Lemmata \ref{lemma: cellBF well-definedness}, \ref{lemma: collapse}, in (\ref{Z non-ab can transf}) and Propositions \ref{prop: non-ab BF I simple homotopy invariance} and \ref{prop: aggregations}.
\end{remark}

\begin{comment}
and assume that $S$ satisfies $BF_\infty$ ansatz (\ref{BF_infty ansatz general}). Then functions satisfying $BF_\infty$ ansatz form a subcomplex $\Xi\subset \mathrm{Fun}(\mathsf{F})[[\hbar]]$ w.r.t. $\delta_S$. Cohomology of $\delta_S$ on $\Xi$ can be shown, using the argument we used in the proof of Lemma \ref{lemma: cellBF well-definedness}, to be
$$H^k_{\delta_S}(\Xi)=H^k_{\{S^{(0)},\bullet\}}(\Xi)\cong H_{CE}^{k+2}(V,V^*)\oplus (-i\hbar)\cdot H_{CE}^k(V)$$
where the first term is the Chevalley-Eilenberg cohomology of the $L_\infty$ algebra $V,\{l_n\}$ (with $l_n$ the $L_\infty$ operations corresponding to the $O(\hbar^0)$ term in $S$ via (\ref{BF_infty ansatz via l,q})) with coefficients in coadjoint module. The second term is the Chevalley-Eilenberg cohomology with trivial coefficients. Our convention here is to take \emph{reduced} Chevalley-Eilenberg cochains, i.e. of order $\geq 1$ in the exterior algebra of $V$.

\begin{example} In the case of \emph{abelian} $BF$ theory on $X$, $\mathfrak{g}=\mathbb{R}$, with $S=\left\langle \mathsf{B}, d\mathsf{A}\right\rangle$ we have
$$H_{\delta_S}(\Xi)\cong H_\bullet(X)[-2]\otimes \mathrm{Sym}\,^{\geq 1} (H^\bullet(X)[1])^*\oplus (-i\hbar)\cdot \mathrm{Sym}\,^{\geq 1} (H^\bullet(X)[1])^* $$
\end{example}

\begin{example} For $X$ contractible,
$$H^k_{\delta_S}(\Xi)\cong H^{k+2}_{C
}(\mathfrak{g},\mathrm{ad}^*)\oplus (-i\hbar)\cdot H^k_{C
}(\mathfrak{g})$$
In particular, for $\mathfrak{g}$ \emph{semi-simple}, we have $H^0_{\delta_S}(\Xi)=0$.
\end{example}

\end{comment}

\subsubsection{Continuum limit}\label{sss: cont limit}
Simplicial $BF$ action (\ref{simpBF locality}) approximates the standard action of non-abelian $BF$ theory defined on differential forms on a manifold, in the limit of ``dense'' triangulation,
in the following sense.

Let $M$ be a smooth compact oriented $n$-dimensional manifold endowed with a Riemannian metric $g$.
Let $\{X_N\}$ for $N=1,2,\ldots$ be a sequence of triangulations of $M$ with the property that metric diameters of simplices of $X_N$ are bounded from above by $c/N$ for $c$ a constant. Fix $(A,B)\in \Omega^\bullet(M,\mathfrak{g})[1]\oplus \Omega^\bullet(M,\mathfrak{g})[n-2]$ a pair of \emph{smooth} non-homogeneous differential forms. We project this pair to an element of the cellular space of fields, $(\mathsf{A}_N,\mathsf{B}_N)\in \mathsf{F}_{X_N}$, with $\mathsf{A}_N:=\sum_{e\subset X_N} e^*\cdot \left(\int_e A\right)$, $\mathsf{B}_N:=\sum_{e\subset X_N} \left(\int_M B\wedge \chi_e\right) \cdot e$ where $\chi_e$ is a piecewise-linear form on $M$ of degree $\dim e$ -- the Whitney form associated to $e$.

\begin{lemma} \label{lemma: cont limit}
We have the following asymptotics for the value of the $\hbar$-independent part of the simplicial action $S^{(0)}_{X_N}$  on $(\mathsf{A}_N,\mathsf{B}_N)$:
\begin{equation}
S_{X_N}^{(0)}(\mathsf{A}_N,\mathsf{B}_N)\underset{N\rightarrow \infty}{\sim} \int_M \left\langle B \stackrel{\wedge}{,}dA+\frac12 [A\stackrel{\wedge}{,}A] \right\rangle_\mathfrak{g} + O\left(\frac{1}{N}\right)
\end{equation}
\end{lemma}
The first term on the r.h.s. is the standard action of non-abelian $BF$ theory in BV formalism, see e.g. \cite{CR,SimpBF,CMR}.

\begin{proof}
Let $i_N:C^\bullet(X_N)\rightarrow \Omega^\bullet(M)$ be the inclusion of cellular cochains of the triangulation into piecewise-polynomial forms given by Whitney forms, and let $p_N:  \Omega^\bullet(M)\rightarrow C^\bullet(X_N)$ be the Poincar\'e projection, as in Section \ref{sec: simp BF reminder}. Then, for $\alpha$ any smooth form on $M$, we have 
\begin{equation}\label{cont limit eq1}
\alpha - i_N\circ p_N(\alpha)=O\left(\frac1N\right)
\end{equation}
In particular, $A-i_N(\mathsf{A}_N)=O\left(\frac1N\right)$ and $[A\stackrel{\wedge}{,}A]-i_N([\mathsf{A}_N,\stackrel{*}{,}\mathsf{A}_N])=O\left(\frac1N\right)$. 

Note that components of the cellular field $(\mathsf{A}_N,\mathsf{B}_N)$  on simplices of $X_N$ behave in the asymptotics $N\rightarrow\infty$ as $\mathsf{A}_e=O(N^{-\dim e})$, $\mathsf{B}_e=O(N^{-n+\dim e})$. The number of simplices $e$ of $X^N$ of any fixed dimension behaves as $O(N^n)$.  Thus, we can estimate the term 
$$S^{(0),k}:=\sum_{e\subset X_N}\sum_{\Gamma_0}\sum_{e_1,\ldots,e_k\subset \bar{e}} \frac{1}{|\mathrm{Aut}(\Gamma_0)|}C^{e}_{\Gamma_0,e_1,\ldots, e_k} \left\langle \mathsf{B}_e,\mathrm{Jacobi}_{\Gamma_0}(\mathsf{A}_{e_1},\ldots, \mathsf{A}_{e_k})\right\rangle $$
in the cellular action $S_{X_N}$ as $O(N^{n}\cdot N^{-n+\dim e- \dim e_1-\cdots - \dim e_k})=O(N^{2-k})$ (where we use the relation $\dim e-\dim e_1-\cdots - \dim e_k=2-k$ between dimensions of the $k$-tuple of faces of $e$, which arises from the fact that the associated monomial in components of fields, $\left\langle \mathsf{B}_e,\mathrm{Jacobi}_{\Gamma_0}(\mathsf{A}_{e_1},\ldots, \mathsf{A}_{e_k})\right\rangle$, should have internal degree zero). 
In particular, we have\footnote{For this, we observe that the bound above can be improved to be uniform in $k$: structure constants $C^{\mathbf{\Delta}^m}_{\Gamma_0,e_1,\ldots,e_k}$ (for a simplex of fixed dimension $m$) have at most exponential growth in $k$, as follows from analyzing the explicit integral expressions for the structure constants arising from the construction (\ref{simpBF (i)}) of the proof of Theorem \ref{thm: simpBF}. Thus, one has $|S^{(0),k}|<\gamma^k N^{2-k}$ for some $\gamma$ depending on $(A,B)$ but independent of $k$.} 
\begin{equation}\label{cont limit eq2}
\sum_{k\geq 3}S^{(0),k}(\mathsf{A}_N,\mathsf{B}_N)=O\left(\frac{1}{N}\right)
\end{equation}

On the other hand, by (\ref{simpBF init cond}) we have $S^{(0)}_{X_N}=\left\langle \mathsf{B}_N,d\mathsf{A}_N \right\rangle+\frac12 \left\langle \mathsf{B}_N,[\mathsf{A}_N\stackrel{*}{,} \mathsf{A}_N]\right\rangle+\sum_{k\geq 3}S^{(0),k}(\mathsf{A}_N,\mathsf{B}_N)$ and
\begin{multline*}
\left(\left\langle \mathsf{B}_N,d\mathsf{A}_N \right\rangle+\frac12 \left\langle \mathsf{B}_N,[\mathsf{A}_N\stackrel{*}{,} \mathsf{A}_N]\right\rangle \right)-
\int_M \left\langle B \stackrel{\wedge}{,}dA+\frac12 [A\stackrel{\wedge}{,}A] \right\rangle_\mathfrak{g}\\
=\int_M \left\langle B \stackrel{\wedge}{,} (i_N\circ p_N-\mathrm{id})\left(dA+\frac12 [A\stackrel{\wedge}{,}A]\right) \right\rangle_\mathfrak{g}\quad = O\left(\frac{1}{N}\right)
\end{multline*}
where we used (\ref{cont limit eq1}). Together with the estimate (\ref{cont limit eq2}), this finishes the proof of the Lemma.

\end{proof}

\begin{remark
For the linear in $\hbar$ part of the simplicial action $S^{(1)}_{X_N}$, similar estimates yield $S^{(1),k}(\mathsf{A}_N)=O(N^{n-k})$ (for the part of homogeneous degree $k$ in $\mathsf{A}_N$) and $S^{(1)}_{X_N}(\mathsf{A}_N)=O(N^{n-2})$ for the whole.
\end{remark}

\begin{remark}
In Lemma \ref{lemma: cont limit}, one can allow $X_N$ to be a sequence of prismatic cellular decompositions of $M$ instead of triangulations (with the same bound $c/N$ on the diameters of prisms), according to Remark \ref{rem: prismatic}.\footnote{
The argument we used to prove Lemma \ref{lemma: cont limit} uses Whitney forms, and it is not clear how to extend it to CW decompositions with arbitrary cells.
}
\end{remark}




\section{Non-abelian cellular $BF$ theory, II: case of a cobordism }
\label{sec: non-ab BF cobordism}
In this section we address the construction of non-abelian cellular $BF$ theory in the formalism of Section \ref{sec: classical cell ab BF on mfd with bdry}.

Fix $G$ a Lie group with Haar measure $\mu_G$. The Lie algebra $\mathfrak{g}=\mathrm{Lie}(G)$ is automatically unimodular and carries the induced density $\mu_\mathfrak{g}$.

Let $M$ be a compact oriented piecewise-linear $n$-manifold with boundary $\partial M=\overline{M_\mathrm{in}}\sqcup M_\mathrm{out}$. Let $(P,\nabla_P)$ be a flat $G$-bundle over $M$ and $(E,\nabla_E)$ the vector bundle associated to $P$ via adjoint representation, $E=\mathrm{Ad}(P)=P\times_G \mathfrak{g}$; by construction it carries a horizontal fiberwise density $\mu_E$ induced from $\mu_G$. Let $X$ be a cellular decomposition of $M$;  we assume that $X$ is a ball complex of product type near the boundary $X_\mathrm{out}$ (see Definition \ref{def: product type}).
We call such $X$ an \textit{admissible} cellular decomposition of $M$.



We import directly from Section \ref{sec: classical cell ab BF on mfd with bdry}, without changes, the construction of: 
\begin{itemize}
\item The space of fields 
$\mathcal{F}=C^\bullet(X,E)[1]\oplus C^\bullet(X^\vee,E^*)[n-2]$. (By a slight abuse of notation, we omit subscripts in $E_X$ and $E^*_{X^\vee}$.)
\item The superfields 
$$A=\sum_{e\subset X}e^*\cdot A_e:\;\mathcal{F}\rightarrow C^\bullet(X,E),\qquad B=\sum_{e^\vee\subset X^\vee} B_{e^\vee}\cdot (e^\vee)^*:\;\mathcal{F}\rightarrow C^\bullet(X^\vee,E^*)$$ 
Note that $B$ is again a cochain, unlike in the formalism of Section \ref{sec: simp BF reminder}
\item The presymplectic 2-form $\omega=\left\langle \delta B,\delta A\right\rangle$. 
\item The boundary fields $\mathcal{F}_\partial=C^\bullet(X_\partial,E)[1]\oplus C^\bullet(X_\partial^\vee,E^*)[n-2]$. 
\item The symplectic form $\omega_\partial$ and its primitive 1-form $\alpha_\partial$.
\item The projection $\pi:\mathcal{F}\twoheadrightarrow \mathcal{F}_\partial$. Later we will need to deform it, see (\ref{Pi^*}) below.
\end{itemize}

We define the action $S(A,B;\hbar)\in \mathrm{Fun}(\mathcal{F})_0[[\hbar]]$ as follows:
\begin{multline}\label{S cell non-ab}
S(A,B;\hbar):=
\sum_{e\subset X-X_\mathrm{out}} \bar{S}_e(A|_{\bar{e}}, B_{\varkappa(e)};\hbar)+ \left\langle B,A\right\rangle_\mathrm{in}\\
=\sum_{e\subset X-X_\mathrm{out}}\sum_{k\geq 1}\frac{1}{k!} \left\langle B_{\varkappa(e)}, l_k^e\left( 
A|_{\bar{e}},\cdots,  
A|_{\bar{e}}\right)\right\rangle
-i\hbar \sum_{e\subset X-X_\mathrm{out}}\sum_{k\geq 2}\frac{1}{k!} q_k^e\left( 
A|_{\bar{e}},\cdots,  
A|_{\bar{e}}\right)+ \left\langle B, A\right\rangle_\mathrm{in}
\end{multline}
with $\bar{S}_e$ the building blocks (\ref{Sbar cell}) 
of Theorem \ref{thm: cellBF} and $l_k^e,q_k^e$ the corresponding components of the operations of the unimodular $L_\infty$ algebra
coming from (\ref{Sbar via l and q}).
In (\ref{S cell non-ab}) we use the parallel transport $E(e>e')$  to trivialize the coefficient local system over the cell $e$ (see (\ref{cell local system from flat bundle})) and we set 
\begin{equation}\label{A|_e}
A|_{\bar{e}}:=\sum_{e'\subset e} (e')^*\cdot \mathrm{Ad}_{E(e>e')} A_{e'}:\quad \mathcal{F}\rightarrow C^\bullet(\bar{e})\otimes \mathfrak{g}
\end{equation}
We also use a shorthand notation $\left\langle B,A\right\rangle_\mathrm{in}:= \left\langle (\iota^\vee)^*B,\iota^* A\right\rangle_\mathrm{in}=\sum_{e\subset X_\mathrm{in}}\left\langle B_{\varkappa_\mathrm{in}(e)},A_e\right\rangle$ for the boundary term of the action, as in (\ref{S with bdry term}). As in Section \ref{sec: non-ab BF I}, the action has the structure  $S=S^{(0)}-i\hbar\, S^{(1)}$.

We also define $S_\partial=S_\mathrm{out}-S_\mathrm{in} \in \mathrm{Fun}_1(\mathcal{F}_\partial)$ by
\begin{equation}\label{S bdry non-ab}
\!\!\!\!\!\!\!\!
S_\partial(A_\partial,B_\partial):=\sum_{e\subset X_\mathrm{out}} \sum_{k\geq 1}\frac{1}{k!} 
\left\langle B_{\varkappa_\mathrm{out}(e)}, l_k^e\left( 
A|_{\bar{e}},\cdots,
A|_{\bar{e}}\right) \right\rangle-
\sum_{e\subset X_\mathrm{in}} \sum_{k\geq 1}\frac{1}{k!} 
\left\langle B_{\varkappa_\mathrm{in}(e)}, l_k^e\left( 
A|_{\bar{e}},\cdots,
A|_{\bar{e}}\right) \right\rangle
\end{equation}

Further, we introduce the vector field $Q^{(0)}\in \mathfrak{X}(\mathcal{F})_1$,
\begin{multline}\label{Q non-ab cob}
Q^{(0)}=\sum_{e\subset X}\sum_{k\geq 1}(-1)^{\dim e}\frac{1}{k!} \left\langle  l_k^{e}(A|_{\bar{e}},\cdots,A|_{\bar{e}}),\frac{\partial}{\partial A_e} \right\rangle-
\\-
\sum_{e\subset X-X_\mathrm{out}}\sum_{k\geq 0} \frac{1}{k!} \left\langle B_{\varkappa(e)}, l_{k+1}^e\left(A|_{\bar{e}},\cdots,A|_{\bar{e}},\sum_{e'\subset \bar{e}-X_\mathrm{out}}(e')^*\cdot \mathrm{Ad}_{E(e>e')}\frac{\partial}{\partial B_{\varkappa(e')}} \right) \right\rangle\\
+\sum_{e\subset X_\mathrm{in}}\sum_{k\geq 0} \frac{1}{k!} \left\langle B_{\varkappa_\mathrm{in}(e)}, l_{k+1}^e\left(A|_{\bar{e}},\cdots,A|_{\bar{e}},\sum_{e'\subset \bar{e}}(e')^*\cdot \mathrm{Ad}_{E(e>e')}\frac{\partial}{\partial B_{\varkappa_\mathrm{in}(e')}} \right) \right\rangle\\
-\sum_{e\subset X_\mathrm{in}} \left\langle B_{\varkappa_\mathrm{in}(e)},\frac{\partial}{\partial B_{\varkappa(e)}} \right\rangle
\end{multline}

Introduce the algebra homomorphism $\Pi^*:\; \mathrm{Fun}(\mathcal{F}_\partial)\rightarrow \mathrm{Fun}(\mathcal{F})$ deforming the pullback by the standard projection $\pi^*$, defined on the generators as follows:
\begin{equation}\label{Pi^*}
\Pi^*:\left\{\begin{array}{l}  
A_\mathrm{in}\mapsto A_\mathrm{in} \\
B_\mathrm{in} \mapsto B_\mathrm{in} \\
A_\mathrm{out} \mapsto A_\mathrm{out} \\
\left\langle B_\mathrm{out}, a\right\rangle_\mathrm{out} \mapsto 
\sum_{e\supset e'} \sum_{k\geq 0} \frac{1}{k!} \left\langle B_{\varkappa(e)},l_k^{e}(A|_{\bar{e}},\cdots, A|_{\bar{e}}, (e')^*\cdot \mathrm{Ad}_{E(e>e')} a_{e'}  ) \right\rangle  
\end{array}\right. 
\end{equation}
where $a=\sum_{e\subset X_\mathrm{out}}e^*\cdot a_e\in C^\bullet(X_\mathrm{out})$ is a test cochain; the sum is over pairs of cells $e\supset e'$ such that $e'\subset X_\mathrm{out}$ while $e\subset X-X_\mathrm{out}$. 

The following is proven by a straightforward (but lengthy) computation, using the $\bmod\,\hbar$ part of the result of Theorem \ref{thm: simpBF}.
\begin{Proposition}\label{prop: non-ab class BV-BFV}
The data $(\mathcal{F},\omega,Q^{(0)},S^{(0)},\Pi^*)$, $(\mathcal{F}_\partial,\alpha_\partial,S_\partial)$ define a classical BV-BFV theory \cite{CMR}, i.e.
the following relations hold:
\begin{enumerate}[(a)]
\item $(Q^{(0)})^2=0$.
\item $\iota_{Q^{(0)}}\omega = \delta S^{(0)}+\Pi^* \alpha_\partial$.
\item $Q^{(0)}\Pi^*=\Pi^* Q_\partial$ where $Q_\partial \in \mathfrak{X}(\mathcal{F}_\partial)_1$ is the Hamiltonian vector field generated by $S_\partial$, i.e. is defined by $\iota_{Q_\partial}\omega_\partial=\delta S_\partial$. 
\end{enumerate}
\end{Proposition}



The space of states $\mathcal{H}_\partial=\mathrm{Fun}_\mathbb{C}(\mathcal{B}_\partial)\ni \psi(B_\mathrm{in},A_\mathrm{out})$ is defined as in Section \ref{sec: quantum cell ab BF on mfd with bdry}, with the base of polarization $\mathcal{B}_\partial$ the same as in (\ref{polarization})
It splits as $\mathcal{H}_\partial=\mathcal{H}_\mathrm{in}^{(B)}\widehat{\otimes} \mathcal{H}_{\mathrm{out}}^{(A)}$, as in (\ref{H = H_in otimes H_out}). 

We define the degree $1$ operator $\widehat{S}_\partial=\widehat{S}_\mathrm{out}+\widehat{S}_\mathrm{in} $ on $\mathcal{H}_\partial$ as 
the quantization 
of $S_\partial$, obtained by replacing 
$B_{\varkappa_\mathrm{out}(e)}\mapsto -i\hbar (-1)^{\dim e}\frac{\partial}{\partial A_e}$ 
for $e\subset X_\mathrm{out}$ and $A_e\mapsto -i\hbar \frac{\partial}{\partial B_{\varkappa_\mathrm{in}(e)}}
$ for $e\subset X_\mathrm{in}$ in  (\ref{S bdry non-ab}) and putting 
all derivatives in $A$ or $B$ to the right.

Explicitly, for $\widehat{S}_\mathrm{out},\widehat{S}_\mathrm{in}$ we have
\begin{eqnarray}\label{Shat out}
\widehat{S}_\mathrm{out} &=& \sum_{e\subset X_\mathrm{out}} \sum_{k\geq 1}\frac{1}{k!} 
\left\langle  l_k^e\left( 
A|_{\bar{e}},\cdots,
A|_{\bar{e}}\right), -i\hbar\,(-1)^{\dim e}\frac{\partial}{\partial A_e} \right\rangle \\
\label{Shat in}
\widehat{S}_\mathrm{in} &=& \sum_{e\subset X_\mathrm{in}} \sum_{k\geq 1}
\frac{1}{k!} 
\left\langle B_{\varkappa_\mathrm{in}(e)}, l_k^e\left( 
\widehat{A}|_{\bar{e}},
\cdots,
\widehat{A}|_{\bar{e}}\right) \right\rangle
\end{eqnarray}
where $\widehat{A}|_{\bar{e}}:=-i\hbar\sum_{e'\subset \bar{e}} (e')^*\cdot \mathrm{Ad}_{E(e>e')}\frac{\partial}{\partial B_{\varkappa_\mathrm{in}(e')}}$.

It is convenient to introduce, alongside $\widehat{S}_\mathrm{out}$, its version acting on out-states \emph{from the right}, 
\begin{equation}\label{Shat out right}
\overleftarrow{\widehat{S}}_\mathrm{out}= \sum_{e\subset X_\mathrm{out}} \sum_{k\geq 1}\frac{1}{k!} 
\left\langle -i\hbar\,\frac{\overleftarrow\partial}{\partial A_e}, l_k^e\left( 
A|_{\bar{e}},\cdots,
A|_{\bar{e}}\right) \right\rangle
\end{equation} 
It satisfies $\widehat{S}_\mathrm{out} \psi=(-1)^{|\psi|+1}\psi \overleftarrow{\widehat{S}}_{\mathrm{out}}$ for any $\psi=\psi(A_\mathrm{out})\in \mathcal{H}_\mathrm{out}^{(A)}$.

\begin{remark} For $Y$ a cellular decomposition of a closed $(n-1)$-manifold, the operators  $\overleftarrow{\widehat{S}}_Y^{(A)}$ and $\widehat{S}_Y^{(B)}$ defined by formulae (\ref{Shat out right},\ref{Shat in}) on $Y$, are mutually adjoint w.r.t. the pairing (\ref{pairing H^A with H^B}): 
$$(\phi\circ \overleftarrow{\widehat{S}}^{(A)}_Y,\psi)=(\phi, \widehat{S}^{(B)}_Y\circ \psi)$$
for $\phi(A_Y)\in \mathcal{H}_Y^{(A)}$ and $\psi(B_Y)\in \mathcal{H}_Y^{(B)}$.
\end{remark}

\begin{Proposition}
\begin{enumerate}
[(a)]
\item \label{prop non-ab: item a} The operator $\widehat{S}_\partial$ defined as above squares to zero.
\item \label{prop non-ab: item b} The action (\ref{S cell non-ab}) on a  cobordism $M$ endowed with an admissible cellular decomposition $X$ satisfies the modified quantum master equation:
\begin{equation}\label{mQME non-ab}
\left(\frac{i}{\hbar}\widehat{S}_\partial-i\hbar\Delta_\mathrm{bulk}\right)\,e^{\frac{i}{\hbar}S} = 0
\end{equation}
\end{enumerate}
\end{Proposition}

\begin{proof} 
Part (\ref{prop non-ab: item a}) is an immediate consequence of the classical $L_\infty$ relations (\ref{L_infty relations}) for the boundary complex $X_\partial$, which in turn follow from Theorem \ref{thm: simpBF} applied to $X_\partial$.\footnote{
Note that in our case the cochains on $X_\partial$ are twisted by a local system but the action (\ref{cellBF locality}) still satisfies the master equation, with the new definition (\ref{A|_e}) of $A|_{\bar{e}}$, as can be seen by inspecting the proof of Theorem \ref{thm: cellBF}: we have quantum master equations on cells, where the local system is trivialized and this implies (by the gluing procedure (\ref{simpBF (vi)}) of the proof of Theorem \ref{thm: simpBF}) that (\ref{cellBF locality}) is a solution of the master equation.
}

Let us prove part (\ref{prop non-ab: item b}). First, observe from (\ref{S cell non-ab}) that $S$ depends on $B_\mathrm{in}$ only via the boundary term $\left\langle B,A\right\rangle_\mathrm{in}$. This implies that $  \widehat{S}_\mathrm{in}\circ e^{\frac{i}{\hbar}S}= S_\mathrm{in}\cdot e^{\frac{i}{\hbar}S}$.\footnote{
In more detail, 
we have
{\scriptsize
\begin{multline*}
\widehat{S}_\mathrm{in}\circ e^{\frac{i}{\hbar}S}= \left(\sum_{e\subset X_\mathrm{in}}\sum_{k\geq 1}\frac{1}{k!} 
\left\langle B_{\varkappa_\mathrm{in}(e)},l_k^e\left(\widehat{A}|_{\bar{e}},\cdots, \widehat{A}|_{\bar{e}}\right) \right\rangle
\right)\circ e^{\frac{i}{\hbar}S} \\=
\left(\sum_{e\subset X_\mathrm{in}}\sum_{k\geq 1}\frac{1}{k!} 
\left\langle B_{\varkappa_\mathrm{in}(e)},l_k^e\left(\widehat{A}|_{\bar{e}}\circ\frac{i}{\hbar}S,\cdots, \widehat{A}|_{\bar{e}}\circ\frac{i}{\hbar}S\right) \right\rangle
\right)\cdot e^{\frac{i}{\hbar}S} \\=
\left(\sum_{e\subset X_\mathrm{in}}\sum_{k\geq 1}\frac{1}{k!} \left\langle B_{\varkappa_\mathrm{in}(e)},l_k^e\left( A|_{\bar{e}},\cdots,  A|_{\bar{e}}\right) \right\rangle
\right)\cdot e^{\frac{i}{\hbar}S}= S_\mathrm{in}\cdot e^{\frac{i}{\hbar}S}.
\end{multline*}
}
} Also note that $\widehat{S}_\mathrm{out}$ is a first order differential operator.
Therefore, we have the following
\begin{multline}\label{prop 8.8 eq1}
-i\hbar\; e^{-\frac{i}{\hbar}S}\left(\frac{i}{\hbar}\widehat{S}_\partial-i\hbar\Delta_\mathrm{bulk}\right)\,e^{\frac{i}{\hbar}S}=\frac12 \{S,S\}_{\omega_b}-\frac{i}{\hbar} S\circ\overleftarrow{\widehat{S}}_\mathrm{out}+S_\mathrm{in}-i\hbar\Delta_\mathrm{bulk} S
\end{multline}
Here $\{,\}_{\omega_b}$ is the same Poisson bracket as in the proof of Lemma \ref{lemma 7.3}. 
We calculate 
\begin{multline*} 
\frac12 \{S^{(0)},S^{(0)}\}_{\omega_b}=
-\sum_{e\subset X-X_\mathrm{out}}S^{(0)}\left\langle \frac{\overleftarrow\partial}{\partial A_e} ,\frac{\overrightarrow\partial}{\partial B_{\varkappa(e)}} \right\rangle S^{(0)}
\\
=-\sum_{e, e' \subset X-X_\mathrm{out},\;e\subset \bar{e}'}\; \sum_{r,s\geq 1} \frac{1}{r!s!} \left\langle B_{\varkappa(e')}, l^{e'}_{r+1}(A|_{\bar{e}'},\cdots,A|_{\bar{e}'},e^*\cdot\mathrm{Ad}_{E(e'>e)} l_s^{e}(A|_{\bar{e}},\cdots, A|_{\bar{e}})) \right\rangle\\
-\underbrace{\sum_{e\subset X_\mathrm{in}}\left\langle B_{\varkappa_\mathrm{in}(e)} ,\frac{\overrightarrow \partial}{\partial B_{\varkappa(e)}} \right\rangle S^{(0)}}_{S_\mathrm{in}}
\end{multline*}
Last term on the right is the contribution of the in-boundary term in $S$ to the Poisson bracket. If the first sum above were over all pairs of $e'$ -- a cell of $X-X_\mathrm{out}$ and $e$ its (arbitrary codimension) face (which can be on $X_\mathrm{out}$), the sum would vanish by classical $L_\infty$ relations on $X$ following from Theorem \ref{thm: cellBF}. Therefore, we continue:
\begin{multline}\label{prop 8.8 eq2}
\frac12 \{S^{(0)},S^{(0)}\}_{\omega_b}=\\
=\sum_{e'\subset X-X_\mathrm{out}}\; \sum_{e\subset \bar{e}'\cap X_\mathrm{out}}\; \sum_{r,s\geq 1} \frac{1}{r!s!} \left\langle B_{\varkappa(e')}, l^{e'}_{r+1}(A|_{\bar{e}'},\cdots,A|_{\bar{e}'},e^*\cdot\mathrm{Ad}_{E(e'>e)}l_s^{e}(A|_{\bar{e}},\cdots, A|_{\bar{e}})) \right\rangle-S_\mathrm{in} \\
=\sum_{e\subset X_\mathrm{out}}S^{(0)}\left\langle \frac{\overleftarrow\partial}{\partial A_e} ,\frac{\overrightarrow\partial}{\partial B_{\varkappa_\mathrm{out}(e)}} \right\rangle S_\mathrm{out}-S_\mathrm{in}=\frac{i}{\hbar}S^{(0)}\circ \overleftarrow{\widehat{S}}_\mathrm{out}-S_\mathrm{in}
\end{multline}
Similarly, we have
\begin{multline*}
\{S^{(1)},S^{(0)}\}_{\omega_b}= -\sum_{e\subset X-X_\mathrm{out}}S^{(1)}\left\langle \frac{\overleftarrow\partial}{\partial A_e} ,\frac{\overrightarrow\partial}{\partial B_{\varkappa(e)}} \right\rangle S^{(0)}\\
=-\sum_{e, e' \subset X-X_\mathrm{out},\;e\subset \bar{e}'}\; \sum_{r,s\geq 1} \frac{1}{r!s!}\, q^{e'}_{r+1}(A|_{\bar{e}'},\cdots,A|_{\bar{e}'},e^*\cdot\mathrm{Ad}_{E(e'>e)}l_s^{e}(A|_{\bar{e}},\cdots, A|_{\bar{e}}))
\end{multline*}
Which, by the unimodular $L_\infty$ relations (\ref{uL_infty homotopy unimodularity}) on $X$, and the argument as above, yields
\begin{equation}\label{prop 8.8 eq3}
\{S^{(1)},S^{(0)}\}_{\omega_b}=-\Delta_\mathrm{bulk} S^{(0)}+\frac{i}{\hbar}S^{(1)}\circ \overleftarrow{\widehat{S}}_\mathrm{out}
\end{equation}
Putting (\ref{prop 8.8 eq2}) and (\ref{prop 8.8 eq3}) into (\ref{prop 8.8 eq1}), we obtain the modified quantum master equation (\ref{mQME non-ab}).

\end{proof}

\begin{example}
Consider $M$ an interval viewed as a cobordism between an in-point and an out-point, with $X$ a cellular decomposition with $N\geq 1$ $1$-cells which we denote  $[01],[12],\ldots,[N-1,N]$ and $N+1$ $0$-cells denoted $[0],[1],\ldots,[N]$. 
The dual CW complex $X^\vee$ has $0$-cells $[0]^\vee,\ldots, [N]^\vee$ and $1$-cells $[01]^\vee,\ldots, [N-1,N]^\vee$.
$$\input{triangulated_interval.pdftex_t}$$
The data of the local system $E_X$ is a collection of group elements 
$$u_k:= E([k,k+1]>[k])\;\in G,\qquad v_{k+1}:=E([k,k+1]>[k+1])\;\in G$$ 
for $k=0,1,\ldots,N-1$.
The superfields are:
$$ A= \sum_{k=0}^N [k]^* A_{[k]} + \sum_{k=0}^{N-1} [k,k+1]^* A_{[k,k+1]},\qquad
B=\sum_{k=0}^N ([k]^\vee)^* B_{[k]^\vee} + \sum_{k=0}^{N-1} ([k,k+1]^\vee)^* B_{[k,k+1]^\vee} $$
where $A_{[k]},A_{[k,k+1]}\in \mathfrak{g}$ have degrees $1$ and $0$, respectively; degrees of $B_{[k]^\vee},B_{[k,k+1]^\vee}\in\mathfrak{g}^*$ are $-1$ and $-2$, respectively.
We have 
\begin{multline*} 
S=\sum_{k=0}^{N-1} \left\langle B_{[k,k+1]^\vee},\frac12[A_{[k]},A_{[k]}] \right\rangle+\\ 
+\sum_{k=1}^N \left\langle B_{[k]^\vee},\left[A_{[k-1,k]},\frac{\mathrm{Ad}_{u_{k-1}}A_{[k-1]}+\mathrm{Ad}_{v_k} A_{[k]}}{2}\right]+\mathbb{F}(\mathrm{ad}_{A_{[k-1,k]}})\circ (\mathrm{Ad}_{v_k} A_{[k]}-\mathrm{Ad}_{u_{k-1}}A_{[k-1]}) \right\rangle\\
 -i\hbar \sum_{k=1}^N \mathrm{tr}\; \log
 \mathbb{G}(\mathrm{ad}_{A_{[k-1,k]}}) + \left\langle B_{[0]^\vee},A_{[0]} \right\rangle
\end{multline*}
with functions $\mathbb{F}$ and $\mathbb{G}$ as in (\ref{simpBF interval F,G}).
The nontrivial component of the map $\Pi^*$ (\ref{Pi^*}) is 
$$\Pi^*:\;\; B_{[N]^\vee}\mapsto \frac{\partial }{\partial A_{[N]}}S=\mathrm{Ad}^*_{v_N^{-1}}\mathbb{H}(\mathrm{ad}^*_{A_{[N-1,N]}}) B_{[N]^\vee}$$ where $\mathbb{H}(x):=-\frac{x}{2}+\mathbb{F}(-x)=\frac{x}{e^x-1}$.
Boundary action is
$$ S_\partial = \left\langle B_{[N]^\vee},\frac12 [A_{[N]},A_{[N]}] \right\rangle - 
\left\langle B_{[0]^\vee},\frac12 [A_{[0]},A_{[0]}] \right\rangle $$
\end{example}
The space of states
$$\mathcal{H}_\partial=\mathrm{Fun}(\mathfrak{g}^*[-1])\otimes \mathrm{Fun}(\mathfrak{g}[1]) =  C_{-\bullet}^{CE}(\mathfrak{g})\otimes C^\bullet_{CE}(\mathfrak{g})\quad \ni \psi(B_{[0]^\vee},A_{[N]})$$
can be identified with the Chevalley-Eilenberg cochain complex tensored with its dual (Lie algebra chains with opposite grading). The differential on states is
$$ \widehat{S}_\partial= -i\hbar\; \left\langle \frac12 [A_{[N]},A_{[N]}], \frac{\partial}{\partial A_{[N]}} \right\rangle 
-i\hbar \left\langle B_{[0]^\vee},\frac12 \left[\frac{\partial}{\partial B_{[0]^\vee}},\frac{\partial}{\partial B_{[0]^\vee}}\right] \right\rangle $$
-- the sum of standard Lie algebra cochain and chain differentials (up to normalization). Its cohomology is 
$H^i_{\widehat{S}_\partial}(\mathcal{H}_\partial)=\bigoplus_{-j+k=i} H_j^{CE}(\mathfrak{g})\otimes H^k_{CE}(\mathfrak{g}) $.


\subsection{Perturbative partition function on a cobordism: pushforward to cohomology in the bulk}\label{sec: non-ab quantization cob}
We proceed as in Sections \ref{sec 7.1 gauge-fixing}, \ref{sec 7.2 Z pert} to define the perturbative partition function as the BV pushforward of the non-abelian $BF$ theory on a cobordism $M$ endowed with admissible cellular decomposition $X$ from ``cellular bulk fields'' $\mathcal{F}_b=C^\bullet(X,X_\mathrm{out})[1]\oplus C^\bullet(X^\vee,X^\vee_\mathrm{in})[n-2]$ to $\mathcal{F}_b^\mathrm{res}=H^\bullet(M,M_\mathrm{out})[1]\oplus H^\bullet(M,M_\mathrm{in})[n-2]$, with gauge-fixing inferred from a choice of induction data $C^\bullet(X,X_\mathrm{out})\wavy{(\mathbf{i},\mathbf{p},\mathbf{K})}H^\bullet(M,M_\mathrm{out})$. Namely, we define 
$Z(B_\mathrm{in},A_\mathrm{out};A_\mathrm{res},B_\mathrm{res}) \in \mathcal{H}_\partial \widehat\otimes \mathrm{Dens}^{\frac12,\mathrm{C}^\infty}_\mathbb{C}(\mathcal{F}_b^\mathrm{res})$ -- thought of as a boundary state with coefficients in half-densities of bulk residual fields -- by formula (\ref{Z integrating out bulk fields}), for the non-abelian cellular action (\ref{S cell non-ab}).

The following statement generalizes (\ref{Z integrating out bulk fields result}) to the non-abelian setting and is the result of a straightforward perturbative computation of the fiber integral defining $Z$.
\begin{Proposition} \label{prop: Z non-ab}
For a cobordism $M$ endowed with an admissible cellular decomposition $X$ and a $G$-local system $E$ in adjoint representation, we have the following.
Explicitly, the partition function $Z$ has the form
\begin{equation}\label{Z non-ab cob explicit}
Z=e^{\frac{i}{\hbar}S_\mathrm{eff}(B_\mathrm{in},A_\mathrm{out};A_\mathrm{res},B_\mathrm{res})}\;\xi_\hbar^{H^\bullet(M,M_\mathrm{out})}\cdot \tau(M,M_\mathrm{out})\cdot (\mu_{\mathcal{B}_\partial}^\hbar)^{1/2}
\end{equation}
with the constant factor as in (\ref{Z integrating out bulk fields result}) and with 
\begin{equation}\label{S_eff non-ab cob}
S_\mathrm{eff}=\sum_{\Gamma}\frac{(-i\hbar)^{\mathrm{loops}(\Gamma)+V^q(\Gamma)}}{|\mathrm{Aut}(\Gamma)|}\;\varphi_\Gamma(B_\mathrm{in},A_\mathrm{out};A_\mathrm{res},B_\mathrm{res})
\end{equation}
where the sum runs over connected oriented graphs $\Gamma$ on $M$ with:
\begin{itemize}
\item Oriented edges, with source and target half-edge placed\footnote{We talk here about ``placing'' elements of the graph $\Gamma$ at cells and decorating them with particular tensors depending on the placement. In the end, to obtain the Feynman weight of the graph $\phi_\Gamma$, we sum over placements the contraction of the respective tensors. Sum over placements here is a cellular analog of configuration space integrals defining the weights of Feynman graphs in \cite{CMRpert}.} at cells $e^\vee\subset X^\vee-X_\mathrm{in}^\vee$ and $e\subset X-X_\mathrm{out}$ respectively, 
decorated with minus the propagator $-\mathbb{K}(e,e^\vee)\in E_{\dot{e}}\otimes E^*_{\dot{e}^\vee}$ (see Remark \ref{rem: propagator cob}).
\item  $V_\mathrm{out}$ univalent vertices (with outgoing half-edge), placed at cells $e\subset X_\mathrm{out}$ with the adjacent half-edge placed at $\varkappa_\mathrm{out}(e)$; such a vertex is decorated with $\mathrm{Ad}_{E(\varkappa^{-1}\varkappa_\mathrm{out}(e)>e)}\circ (A_\mathrm{out})_e$.  
\item $V_\mathrm{in}$ univalent vertices (with incoming half-edge), placed at cells $e^\vee\subset X_\mathrm{in}^\vee$ with the adjacent half-edge placed at $\varkappa_\mathrm{in}^{-1}(e^\vee)$; such a vertex is decorated with $(B_\mathrm{in})_{e^\vee}$.
\item $V^l$ 
bulk vertices placed at cells $e\subset X-X_\mathrm{out}$, with one outgoing half-edge also placed at $e$ and with $k\geq 2$ incoming half-edges placed at faces of arbitrary codimension $e_1,\ldots,e_k\subset e$; the decoration is: $$l^e_{k,e_1,\ldots,e_k}\circ(\mathrm{Ad}_{E(e>e_1)}\otimes\cdots \otimes \mathrm{Ad}_{E(e>e_k)}) \in \mathrm{Hom}(\bigotimes_{j=1}^k E_{\dot{e}_j}, E_{\dot{e}} )\cong E_{\dot{e}}\otimes \bigotimes_{j=1}^k E^*_{\dot{e}_j} $$
with $l^e_{k,e_1,\ldots,e_k}\in \mathrm{Hom}(\mathfrak{g}^{\otimes k},\mathfrak{g})$ a local component of the $k$-ary $L_\infty$ operation on $C^\bullet(X,\mathfrak{g})$ determined by (\ref{Sbar cell}).
\item $V^q\in\{0,1\}$ bulk vertices placed at cells $e\subset X-X_\mathrm{out}$, with no outgoing and $k\geq 2 $ incoming half-edges placed at faces of arbitrary codimension $e_1,\ldots, e_k\subset e$; the decoration is:
$$q^e_{k,e_1,\ldots,e_k}\circ(\mathrm{Ad}_{E(e>e_1)}\otimes\cdots \otimes \mathrm{Ad}_{E(e>e_k)}) \in \mathrm{Hom}(\bigotimes_{j=1}^k E_{\dot{e}_j}, \mathbb{R} )\cong \bigotimes_{j=1}^k E^*_{\dot{e}_j}$$
with $q^e_{k,e_1,\ldots,e_k}\in \mathrm{Hom}(\mathfrak{g}^{\otimes k},\mathbb{R})$ a local component of the $k$-ary \emph{unimodular} $L_\infty$ operation on $C^\bullet(X,\mathfrak{g})$ determined by (\ref{Sbar cell}).
\item $V_\mathrm{res}^A$ leaves (loose half-edges), oriented towards the vertex and placed at a cell $e$. Decoration: $(\mathbf{i} A_\mathrm{res})_e$,
\item $V_\mathrm{res}^B$ leaves, oriented from the vertex and placed at a cell $e^\vee$. Decoration: $(\mathbf{p}^\vee B_\mathrm{res})_{e^\vee}$,
\end{itemize}
The value of $\varphi_\Gamma$ in (\ref{S_eff non-ab cob}) is the sum over all placements of half-edges and vertices of the graph at cells of $X$ (subject to restrictions to boundary strata and local relations between placement of half-edges and vertices as above), 
of products of all decorations (with tensors in the fibers of the local system contracted in the way prescribed by the graph $\Gamma$).\footnote{
Note that $\varphi_\Gamma$ is a polynomial in the variables $(B_\mathrm{in},A_\mathrm{out},A_\mathrm{res},B_\mathrm{res})$ of degree $(V_\mathrm{in},V_\mathrm{out},V^A_\mathrm{res},V^B_\mathrm{res})$.}
\end{Proposition}

\begin{remark} Graphs contributing to (\ref{S_eff non-ab cob}) fall into four types (we provide each type with a picture of a typical example):
\begin{enumerate}[(I)]
\item Rooted trees with the root decorated with $B_\mathrm{in}$ and leaves either decorated by $A_\mathrm{res}$ or by $A_\mathrm{out}$.
$$\input{Feyn_graph_I.pdftex_t}$$
\item   Rooted trees with the root decorated with $B_\mathrm{res}$ and leaves decorated by $A_\mathrm{res}$ or  $A_\mathrm{out}$.
$$\input{Feyn_graph_II.pdftex_t}$$
\item Rooted trees with the root decorated with a quantum operation $q_k^e$ and leaves decorated by $A_\mathrm{res}$ or $A_\mathrm{out}$.
$$\input{Feyn_graph_III.pdftex_t}$$
\item One-loop graphs (a cycle with several trees attached to the cycle at the root) with leaves decorated by $A_\mathrm{res}$ or $A_\mathrm{out}$.
$$\input{Feyn_graph_IV.pdftex_t}$$
\end{enumerate}
This classification of graphs yields the following ansatz for $S_\mathrm{eff}$:
$$S_\mathrm{eff}=\left\langle B_\mathrm{in}, \varphi^\mathrm{I}(A_\mathrm{out},A_\mathrm{res})\right\rangle_{\mathrm{in}}+
\left\langle B_\mathrm{res}, \varphi^\mathrm{II}(A_\mathrm{out},A_\mathrm{res})\right\rangle_{\mathrm{res}}-i\hbar\; \varphi^\mathrm{III+IV}(A_\mathrm{out},A_\mathrm{res})
$$
with $\varphi^\mathrm{I},\varphi^\mathrm{II},\varphi^\mathrm{III+IV}$ generally of unbounded degree in the variables $A_\mathrm{out},A_\mathrm{res}$.
\end{remark}

\begin{theorem}
\label{prop 8.15}
\begin{enumerate}[(i)]
\item \label{prop 8.15 (i)} The partition function (\ref{Z non-ab cob explicit}) satisfies the modified quantum master equation
$$\left(\frac{i}{\hbar}\widehat{S}_\partial-i\hbar \Delta_\mathrm{res}\right)Z=0$$
\item \label{prop 8.15 (ii)} A change of gauge-fixing data $(\mathbf{i},\mathbf{p},\mathbf{K})$  changes $Z$ by a $\left(\frac{i}{\hbar}\widehat{S}_\partial-i\hbar \Delta_\mathrm{res}\right)$-exact term.
\item \label{prop 8.15 (iii)} Considered modulo $\left(\frac{i}{\hbar}\widehat{S}_\partial-i\hbar \Delta_\mathrm{res}\right)$-exact terms, $Z$ is independent of the cellular decomposition $X$ of $M$, provided that the cellular decomposition of the boundary is fixed.
\item \label{prop 8.15 (iv)} Assume, as in Proposition \ref{prop: gluing} that the cobordism $(M_1,X_1)\cob{(M,X)}(M_3,X_3)$ is obtained by composing (gluing) cobordisms $(M_1,X_1)\cob{(M_I,X_I)}(M_2,X_2)$ and $(M_2,X_2)\cob{(M_{II},X_{II})}(M_3,X_3)$. Then the partition function (\ref{Z non-ab cob explicit}) for the glued cobordism can be recovered from the partition functions for the constituent cobordisms by the same gluing formula (\ref{gluing formula}), as in abelian case. 

\end{enumerate}
\end{theorem}

\begin{proof}
Items (\ref{prop 8.15 (i)}), (\ref{prop 8.15 (ii)}) are an immediate consequence of (\ref{mQME non-ab}) and the general properties of finite-dimensional BV puhforwards (that the ``family over $\mathcal{B}$ version'' of BV pushforward is a chain map w.r.t. $\left(\frac{i}{\hbar}\Omega_\mathcal{B}-i\hbar\Delta\right)$ and that a change of gauge-fixing induces a change of the pushforward of a closed element by an exact element, see Theorem 2.14 in \cite{CMRpert}; in our case $\Omega_\mathcal{B}=\widehat{S}_\partial$).

To prove (\ref{prop 8.15 (iii)}), we (partially) switch back to the formalism of Section \ref{sec: simp BF reminder}. Let us regard the cellular action 
(\ref{S cell non-ab}) as a function on $\mathsf{F}_{X,X_\mathrm{out}}:=C^\bullet(X,X_\mathrm{out})[1]\oplus C_\bullet(X,X_\mathrm{out})[-2]$ (which is canonically symplectomorphic to $C^\bullet(X,X_\mathrm{out})[1]\oplus C^\bullet(X^\vee,X_\mathrm{in}^\vee)[n-2]$) with $A_\mathrm{out}$ and $B_\mathrm{in}$ as external parameters -- this point of view allows us to forget about the dual CW complex in the bulk. Then we can perform elementary expansions and collapses on $X-X_\partial$ and by Lemma \ref{lemma: collapse}, together with the chain map property of BV pushforwards ``in a family'' quoted above, we obtain (\ref{prop 8.15 (iii)}) for a change of $X$ by a simple-homotopy relative to $X_\partial$. Since such simple-homotopy allows one to pass between any two CW decompositions of $M$ restricting to $X_\partial$ at the boundary, this proves (\ref{prop 8.15 (iii)}).

For the item (\ref{prop 8.15 (iv)}), we note that the entire discussion of gluing of Section \ref{sec: quantum gluing}, starting with the gluing formula (\ref{gluing e^S}) for the exponential of cellular action, works in non-abelian case exactly as in abelian case.
\end{proof}

\subsubsection{Reduction of the spaces of states (passage to the cohomology of the abelian part of BFV operators)}
Let us split the boundary BFV operator as $\widehat S_\partial=\widehat S_\partial^\mathrm{ab}+\widehat S_\partial^\mathrm{pert}$ with $\widehat{S}_\partial^\mathrm{ab}$ the abelian part (i.e. $n=1$ term in (\ref{Shat in},\ref{Shat out})). We can pass to the reduced space of states $\mathcal{H}^\mathrm{r}_\partial:=H^\bullet_{\widehat{S}_\partial^\mathrm{ab}}(\mathcal{H}_\partial)=\mathrm{Dens}^{\frac12,\mathrm{C}^\infty}\left(H^\bullet(M_\mathrm{out},E)[1]\oplus H^\bullet(M_\mathrm{in},E^*)[n-2]\right)$ as in Section \ref{sec: reduced space of states}. Unlike in abelian case, we have a BFV operator $\widehat{S}_\partial^\mathrm{r}=\widehat{S}_\mathrm{out}^\mathrm{r}+\widehat{S}_\mathrm{in}^\mathrm{r}$ on $\mathcal{H}^\mathrm{r}_\partial$ induced from $\widehat S_\partial$ via homological perturbation theory, with $\widehat{S}_\mathrm{out}^\mathrm{r}$, $\widehat{S}_\mathrm{in}^\mathrm{r}$ satifying the ansatz
\begin{eqnarray*}
\widehat{S}_\mathrm{out}^\mathrm{r} &=&\sum_{k\geq 2}\frac{1}{k!} \left\langle l_k^{\mathrm{r},\mathrm{out}}([A_\mathrm{out}],\ldots, [A_\mathrm{out}]),-i\hbar \frac{\partial}{\partial [A_\mathrm{out}]} \right\rangle,\\
\widehat{S}_\mathrm{in}^\mathrm{r} &=& \sum_{k\geq 2} \frac{1}{k!} \left\langle [B_\mathrm{in}], l_k^{\mathrm{r},\mathrm{in}}(\widehat{[A_\mathrm{in}]},\ldots, \widehat{[A_\mathrm{in}]}) \right\rangle
\end{eqnarray*}
with $\widehat{[A_\mathrm{in}]}:=-i\hbar \frac{\partial}{\partial [B_\mathrm{in}]} $. 
Here $l_k^{\mathrm{r},\mathrm{out}}$ are the $L_\infty$ algebra operations on $H^\bullet(M_\mathrm{out},E)$ induced, via homotopy transfer, from the cellular $L_\infty$ structure on $C^\bullet(X_\mathrm{out},E)$ produced by Theorem \ref{thm: cellBF}. It can also be viewed as induced by homotopy transfer from dg Lie version of de Rham algebra $\Omega^\bullet(M_\mathrm{out},E)$; case of $L_\infty$ opertaions on in-boundary is similar. In particular, note that the cochain complex $(\mathcal{H}^\mathrm{r}_\partial,\widehat{S}^\mathrm{r}_\partial)$, regarded modulo chain isomorphisms, is independent on the cellular decomposition of the boundary.

\begin{remark}
Reduced BFV differential $\widehat{S}^\mathrm{r}_\partial$ can be viewed as a generating function for Massey operations on cohomology of the boundary and thus encodes the data of the rational homotopy type of the boundary (at least, in the case of simply-connected boundary).
\end{remark}

Theorem \ref{prop 8.15} holds for the reduced partition function $Z^\mathrm{r}([B_\mathrm{in}],[A_\mathrm{out}];A_\mathrm{res},B_\mathrm{res})\in \mathcal{H}_\partial^\mathrm{r}\widehat\otimes \mathrm{Dens}^{\frac12,\mathrm{C}^\infty}(\mathcal{F}_b^\mathrm{res})$ (defined by evaluating the partition function $Z$ on representatives of classes $[A_\mathrm{out}]$, $[B_\mathrm{in}]$ in cellular cochains of the boundary, as in Section \ref{sec: reduced space of states}. Here we replace the BFV operator by its reduced version $\widehat{S}^\mathrm{r}_\partial$. In part (\ref{prop 8.15 (ii)}) of the Theorem in addition to changes of $(\mathbf{i},\mathbf{p},\mathbf{K})$ we are now also allowing
changes of $(i_\mathcal{B},p_\mathcal{B},K_\mathcal{B})$ -- the HPT induction data from cellular cochains of the boundary to cohomology, as in Remark \ref{rem 7.16}.\footnote{Note that only $i_\mathcal{B}$ (choice of cellular representatives for cohomology classes) is relevant for the construction of $Z^\mathrm{r}= i_\mathcal{B}^* Z$ whereas $p_\mathcal{B}$ and $K_\mathcal{B}$ are manifestly irrelevant for $Z^\mathrm{r}$; however, the whole package $(i_\mathcal{B},p_\mathcal{B},K_\mathcal{B})$ is involved in the construction of $\widehat{S}^\mathrm{r}_\partial$.}

In part (\ref{prop 8.15 (iii)}) of the Theorem we can now allow changes of cellular decomposition of $X$ that change the decomposition of the boundary.\footnote{Sketch of proof: for $Y$ an arbitrary cell decomposition of the cylinder $\Sigma\times [0,1]$ (regarded as a cobordism from $\Sigma$ to $\Sigma$) the reduced partition function $Z^\mathrm{r}: \mathcal{H}^\mathrm{r}_{\Sigma}\rightarrow \mathcal{H}^\mathrm{r}_\Sigma$ is chain homotopic to identity (proven from the gluing property -- (\ref{prop 8.15 (iv)}) of Theorem \ref{prop 8.15}). Now let $X$ and $X'$ be two cellular decompositions of $M$. We can attach two cylinders at in- and out-boundaries of $X'$ to obtain a cell decomposition $\widetilde X$ of $\widetilde M$ -- a copy of $M$ with collars attached at in- and out-boundary, such that $\widetilde{X}_\mathrm{in}\simeq X_\mathrm{in}$ and $\widetilde{X}_\mathrm{out}\simeq X_\mathrm{out}$. By the previous observation about cylinders yielding identity up to homotopy, and by gluing formula, we have $Z_{\widetilde{X}}^\mathrm{r}\sim Z_{X'}^\mathrm{r}$ (where $\sim$ stands for
equality up to $(\frac{i}{\hbar}\widehat{S}_\partial^\mathrm{r}-i\hbar \Delta_\mathrm{res})$-exact terms). On the other hand, we can view $\widetilde{X}$ and $X$ as two cellular decompositions of $M$ coinciding on the boundary, thus (\ref{prop 8.15 (iii)}) of Theorem \ref{prop 8.15} applies and we have $Z_{\widetilde{X}}^\mathrm{r}\sim Z_X^\mathrm{r}$. Thus, we have $Z_{X}^\mathrm{r}\sim Z^\mathrm{r}_{X'}$.}




