Why is the Kaluza-Klein ansatz the natural choice? In Kaluza-Klein theory we can choose a parametrisation for the 5-dimensional metric: $$d\hat{s}^2 \equiv \hat{g}_{ab} dx^a dx^b = g_{\mu\nu}dx^\mu dx^\nu + \phi^2(dz + A_\mu dx^\mu)^2 $$
where $g_{\mu\nu}$ is the metric for the 4 "large" dimensions (the base manifold) and $z$ is the coordinate running along the fifth dimension (the fiber). Greek indices run from 0 to 3 while latin indices run from 0 to 4 ($z\equiv x^4$). The scalar $\phi$ parametrises the size of the extra dimension.
I have heard that this choice of metric is "natural" from the fiber bundle perspective, within which the 5D spacetime is considered as a $U(1)$-principle bundle and $A_\mu$ are the components of a connection 1-form defined on that bundle. For example, here the author says that this choice of metric:

*

*Preserves the split between vertical and horizontal vectors

*Has metric on the horizontal subspace isomorphic to the metric on the base space

*Has metric on the vertical subspace isomorphic to some metric on the Lie algebra of the structure group ($U(1)$ in this case)

First question: I am not sure I understand these conditions properly so would appreciate any further explanation. I believe that the connection $A$ is defined to vanish on horizontal vectors so my best guess for the first point is that $\hat{g}_{a\nu} V^a = g_{\mu\nu}V^\mu$ and $\hat{g}_{a4} V^a = 0$ for a horizontal vector $V$. And $\hat{g}_{ab}V^a = \hat{g}_{4b}V^4$ for a vertical vector $V$. For the second and third points I don't know what the definition of an isomorphism between metrics is. I would guess $\phi^2 dz^2$ is the metric on the vertical subspace and $g_{\mu\nu}$ is the metric on the horizontal subspace, so can see that these are equivalent in some sense to what they're supposed to be equivalent to, though I am shaky on the formalities.
Second question: My understanding is that there is a difference between a connection defined on the whole bundle, and the "local connection" defined on the base manifold (see e.g. "Pull back via trivializing section" here). Which one of these is $A$ technically?
Third question: The term $dz + A$ in the metric looks very similar to a gauge covariant derivative (but with $dz$ replacing a partial derivative). What's the explicit connection between the two?
Final question: What are the differences between Kaluza-Klein theory and regular electromagnetism, considered from the fiber bundle perspective?
(Have reposted from the physics stack exchange as the question could be more relevant here)
 A: One way to illustrates where the components $A_\mu$ come from is to define the induced metric $\hat{g}$ without reference to coordinates.
Let $\pi:P\to M$ be a principal $G$-bundle. (Recall that this is a fiber bundle with a fiber preserving right $G$-action that is free and transitive on each fiber.) Let $VP:=\ker(d\pi)$ be the vertical subbundle of the tangent bundle of $P$. Note that by differentiating the $G$-action, we can identify the vertical bundle with a trivial $\mathfrak{g}$-bundle $VP\cong P\times\mathfrak{g}$. One can define a Principal connection on $P$ in a several equivalet ways:

*

*A principal connection is a choice of horizontal subbundle $HP\subseteq TP$ which is complementary to $VP$ and invariant under the $G$-action.


*A principal connection is a choice of $\mathfrak{g}$-valued one-form $\omega\in\Omega^1(P,\mathfrak{g})$ which is invariant under the $G$-action, and restricts to the identity on $VP\cong P\times\mathfrak{g}$.
The Wikipedia article goes into a bit more detail on these definitions; basically $HP=\ker(\omega)$, and $\omega$ is the vertical projection $TP\cong VP\oplus HP\to VP$, taking values in $\mathfrak{g}$ via the identification $VP\cong P\times\mathfrak{g}$.
Suppose $P$ has a principal connection $\omega$, $M$ has a metric $g$, and $G$ has a bi-invariant metric $b$ (equivalently, an $\operatorname{Ad}$-invariant inner product $b$ on $\mathfrak{g}$). There is a unique metric $\hat{g}$ on $P$ satisfying the following:

*

*$VP$ and $HP=\ker(\omega)$ are orthogoal w.r.t. $\hat{g}$.

*$\pi$ is a Riemannian submsersion w.r.t. $\hat{g}$ and $g$.

*The restriction of $\hat{g}$ to any fiber is equal to $b$. (This makes sense because each fiber is canonically diffeomorphic to $G$ up to translation).

From these conditions, one can show that $\hat{g}$ must have the following form for $X,Y\in T_pP$:
$$
\hat{g}(X,Y)=\pi^*g(X,Y)+b(\omega(X),\omega(Y))
$$
Your equation is the coordinate form of this expression.
In the case of a $U(1)$ bundle, you can use the standard identification $\mathfrak{u}(1)\cong\mathbb{R}$ to write the connection form as a $\mathbb{R}$-valued one form $\omega$. Using adapted coordinates which restrict to "angular" coordinates $x^4\mapsto e^{i(x^4+c)}$ on each fiber, $\omega$ has the form $\omega=dx^4+A_\mu dx^\mu$, where $A_\mu$ depend only on $x^0\cdots,x^3$. This allows us to interpret $A_\mu dx^\mu$ as a local coordinate-dependent $1$-form $A$ on $M$, and $A=\sigma^*\omega$ where $\sigma$ is any constant local section in these coordinates. Still, the connection form, in the usual terminology, is the coordinate independent object $\omega$, not $A$.
Your other sub-questions are probably better suited to physics stackechange. The term "exterior covariant derivative" isn't standard in mathematics to my knowledge ("covariant derivative" tends to be reserved for vector bundles), and while it's possible to recover the standard Maxwell/Einstein equations from an action on $P$ (see here), the relationship between the two theories is no doubt more nuanced.
