How to calculate a TQFT Gaussian path integral from Seiberg's "fun with free field theory"? In his talk "Fun with Free Field Theory", Seiberg discusses a topological quantum field theory in $d+1$ dimensions with the action
$$ S = \frac{n}{2\pi} \int \phi\, \mathrm{d} a \tag{1}$$
where $\phi$ is a periodic scalar ($\phi \sim \phi + 2\pi$), $a$ is a $d$-form gauge field quantised such that $\int_M a \in 2\pi\mathbb{Z}$ for any $d$-cycle $M$, and $n$ is an integer. He writes down the correlation function
$$ \left\langle \mathrm{e}^{\mathrm{i}\phi(p)} \mathrm{e}^{\mathrm{i}\oint_M a}\right\rangle = \mathrm{e}^{\frac{2\pi\mathrm{i}}{n} \ell}\tag{2} $$
where $p$ is a point, $M$ is a closed $d$-dimensional hypersurface, and $\ell$ is the linking number of $p$ and $M$. He says that since the theory is Gaussian (that is, free), it is straightforward to compute the partition function and get the above result by performing a Gaussian integral.

I don't understand how to do this. My main concern is that the path integral
$$Z = \int \mathscr{D}\phi \mathscr{D}a\,
\mathrm{e}^{-S}\tag{3}$$
doesn't look Gaussian to me. To me, the Gaussian integral is
$$ \int\mathrm{d}^n\Phi\, \mathrm{e}^{-\frac{1}{2} \Phi^T M \Phi} = \frac{1}{\sqrt{\det(M/2\pi)}} \tag{4}$$
where $M$ is symmetric and positive definite,
but if I try to define (in 1+1 dimensions for concreteness) $\Phi = (\phi, a_0, a_1)$, I get
$$ \begin{align} S &= \frac{n}{2\pi} \int \mathrm{d}^2 x\, \mathrm{d}^2 y\, \frac{1}{2} \phi(\partial_0 a_1 - \partial_1 a_0) \\
&= \int \mathrm{d}^2 x\, \mathrm{d}^2 y\, \frac{1}{2} \Phi^T  \underbrace{\frac{n}{4\pi} \delta^{(2)}(x - y)
\begin{pmatrix} 0 & -\partial_1 & \partial_0 \\
\partial_1 & 0 & 0 \\
-\partial_0 & 0 & 0\end{pmatrix}}_{M(x,y)} \Phi
\end{align}\tag{5} $$
and it seems like this operator $M$ surely has determinant $0$. Therefore, the path integral doesn't make sense, and in particular, I can't compute correlators by the standard method of introducing source terms and completing the square, because this would require inverting $M$.
I can think of three problems with what I have said:

*

*My $M$ doesn't look symmetric because I performed partial integrations $\phi \partial_\mu a_1 \to -a_1 \partial_\mu \phi$ (but it is Hermitian?)


*I haven't performed any gauge fixing or regularisation of the path integral, and


*since $\phi$ is periodic and $a$ is quantised, the ordinary way of doing Gaussian integrals may not work.

Is the path integral really Gaussian? How would you go about computing it? Would taking the above "problems" into account solve the issue?
Any help is greatly appreciated!
Related: How does this Gaussian integral over the auxiliary field in 2D topological gauge theory work?
 A: Here is one way to derive OP's correlator (2):

*

*One can think of the Wilson-lines/vertex operators in eq. (2) as part of an extended action
$$\begin{align}\tilde{S}~=~& S + \phi (p) + \int_M\! a\cr
~=~&\frac{n}{2\pi} \int\! \phi~ \mathrm{d} a+\int \! \phi (x)~\delta^{d+1}(x,p)~(\star 1)(x) + \int a \wedge \mathrm{d}1_N(x) ,\end{align}\tag{A}$$
where $\star 1$ is the volume-form on $\mathbb{R}^{d+1}$ and $1_N$ is the indicator/characteristic function. Here we have for simplicity assumed that the cycle $M=\partial N$ is a boundary and we have made some implicit choices of orientation. The action is called Gaussian/free because each term only contain (up to) 2 fields.


*The EOM for $\phi$ is$^1$
$$ \frac{n}{2\pi} \mathrm{d} a(x)+\delta^{d+1}(x,p)~(\star 1)(x)~\approx~0,\tag{B}$$
while the EOM for $a$ is
$$ \mathrm{d}(\frac{n}{2\pi}\phi - 1_N)~\approx~0 \qquad\Rightarrow\qquad \frac{n}{2\pi}\phi - 1_N~\approx {\rm const} .\tag{C}$$


*The classical on-shell action becomes (after neglecting a boundary term)
$$\tilde{S}_{\rm cl}~=~\frac{2\pi}{n}\int\! 1_N(x) ~\delta^{d+1}(x,p)~(\star 1)(x)~=~\frac{2\pi}{n}\ell.\tag{D}$$


*A similar calculation for the original action $S$ yields
$$S_{\rm cl}~=~0.\tag{E}$$


*OP's correlator (2) can be calculated via 2 Gaussian integrals$^2$
$$\begin{align} \left\langle \mathrm{e}^{\mathrm{i}\phi(p)} \mathrm{e}^{\mathrm{i}\oint_M a}\right\rangle 
~=~\frac{\tilde{Z}}{Z} 
~=~\frac{\int\!\mathscr{D}\phi \mathscr{D}a~
\mathrm{e}^{\mathrm{i}\tilde{S}}}{\int\!\mathscr{D}\phi \mathscr{D}a~
\mathrm{e}^{\mathrm{i}S}} ~=~\frac{\mathrm{e}^{\mathrm{i}\tilde{S}_{\rm cl}}}{\mathrm{e}^{\mathrm{i}S_{\rm cl}}} 
~\stackrel{(D)+(E)}{=}~ \mathrm{e}^{\frac{2\pi\mathrm{i}}{n} \ell}.\end{align}\tag{F}$$
(One should analytically continue the Gaussian integrals to make them convergent.) Completing the square yields the classical on-shell actions. Note that the 2 Gaussian determinants cancel.
--
$^1$ Here the $\approx$ sign means equal modulo the EOMs.
$^2$ Here we ignore for simplicity gauge-fixing. Gauge-fixing would lead to extra terms in the 2 actions, which cancel in the correlator (F).
A: A slightly more general version of your Gaussian integral is
$$ \int \mathrm{D}\phi \exp\left(-\frac{1}{2}\left<\phi,\Omega \phi\right> \right) = \frac{1}{\sqrt{\det\Omega}}.$$
In this case, your inner product is
$$\left<\bullet,\circ\right>:= \int \bullet\wedge\star\circ, $$
where $\star$ is the Hodge-star. Another formula that's usually associated to Gaussian integrals is
$$ \int \mathrm{D}\phi\;\mathrm{D}\psi \exp\!\big(-\left<\phi,\Omega \psi\right>\big) = \frac{1}{\det\Omega},$$
which you can prove either by making $(\phi,\psi)$ into a vector and obtaining an ordinary Gaussian integral for the differential operator $$\frac{1}{2}\left(\begin{array}{cc}  & \Omega \\ \Omega & \end{array}\right),$$
or by being a bit careless with factors of $i$ and thinking of one of the two integrals as making a (functional) delta function for the other field and then using properties of the (functional) delta functions.
In any case, here you get
$$ \int\mathrm{D}\phi\mathrm{D}a \exp\left(-\frac{n}{2\pi}\int\phi\wedge \mathrm{d}a\right)= \int\mathrm{D}\phi\mathrm{D}a \exp\left(-\frac{n}{2\pi}\int\phi\wedge \star\star\mathrm{d}a\right) =\left[\det\left(\frac{n}{2\pi}\star\mathrm{d}\right)\right]^{-1}=\left[\det\left(\frac{n}{2\pi}\partial\right)\right]^{-1},$$
where $\star\star=1$ because it's acting on a $(d+1)$-form in $d+1$ dimensions and I wrote $\star\mathrm{d}$ as $\partial$ because it is acting on $d$-forms.
With a bit more work, you should be able to get the linking number out of that two-point function.
About the comments at the end of your question:

*

*It not being symmetric is not a problem.

*That is a good point. In my answer I have totally ignored gauge invariance, just to showcase how the desired integral is indeed a Gaussian integral. However, taking gauge invariance into account, morally would yield a (n infinite) factor of $\mathrm{vol}(\mathcal{G})^{-1}$, where $\mathcal{G}$ is the gauge group (Here it would be $\mathcal{G}=\mathrm{Maps}(X,\mathrm{B}^d\mathrm{U}(1))$, where $X$ is the manifold of your theory and $\mathrm{B}^d$ is denoting that you have a higher-form gauge symmetry). Looking at correlation functions though, this factor should cancel, if you include a division by the partition function in your definition of correlation functions. Regularisation would affect the precise value of the determinant, which would anyway again cancel out once you compute correlation functions.

*This is also a good point. Generically it again affects the value of the determinant, and possibly extra things coming from the zero modes. So if you were interested in the partition function you would have to be more careful. But again these cancel out in the correlation function.

