We can write the Einstein-Hilbert action in first order formalism as follows:
$$S(g, \Gamma)=\int_M \sqrt{-g}g^{\mu \nu}(\Gamma^{\alpha}_{\mu \nu}\Gamma^{\lambda}_{\lambda \alpha}-\Gamma^{\alpha}_{\lambda \nu}\Gamma^{\lambda}_{\alpha \nu})+\int_M \partial_{\lambda}(w^{\lambda}\sqrt{-g})d^nx+$$ $$+\int_{M}\partial_{\nu}(\sqrt {-g}g^{\mu \nu})\Gamma^{\lambda}_{\lambda \mu}-\int_{M}\partial_{\lambda}(\sqrt {-g}g^{\mu \nu})\Gamma^{\lambda}_{\mu \nu}$$ where $$w_{\lambda}\equiv g^{\mu \nu}\Gamma^{\lambda}_{\mu \nu}-g^{\mu \lambda}\Gamma^{\nu}_{\nu \mu}$$ I kow that if $\Gamma$ is the the Levi civita connection, than the integral $$\int_M \partial_{\lambda}(w^{\lambda}\sqrt{-g})d^nx$$
can be reduced to an integral over the boundary $\partial M$ of the manifold M.
In fact, in this case we can use $$\partial_{\lambda}(\sqrt{-g})=\sqrt{-g}\, \Gamma^{\mu}_{\mu \lambda} \qquad (1)$$ so that $$\int_M \partial_{\lambda}(w^{\lambda}\sqrt{-g})d^nx=\int_M \nabla_{\lambda}w^{\lambda}\sqrt{-g}d^nx$$ Now we can use the Stokes theorem: $$\int_M \nabla_{\mu}V^{\mu}\sqrt{-g}d^nx=\int_{\partial_M}n_{\mu}V^{\mu}\sqrt{-\gamma}d^{n-1}x$$ where n is the 4-vector normal to $\partial M$ and $\gamma$ is the induced metric on $\partial M$
If $\Gamma$ is not the Levi-Civita connection, this proof breaks down because we cannot use (1) anymore.
In first order formalism, we treat $g$ and $\Gamma$ as two independent variables, so $\Gamma$ isn't the Levi-Civita connection until we solve the EOMs. Despite of this, we still consider the integral $\int_M \partial_{\lambda}(w^{\lambda}\sqrt{-g})d^nx$ as an integral on $\partial M$ in first order formalism, as far as I know. Why is it so?
- Is $\int_M \partial_{\lambda}(w^{\lambda}\sqrt{-g})d^nx$ a boundary integral if $\Gamma$ is a general connection?
- In particular, is this the case if $\Gamma$ is torsionless, but no metric compatibility is assumed?