Structure Group vs Gauge Group in Gauge Spontaneous Symmetry Breaking Recently I’ve been learning about spontaneous symmetry breaking (SSB) for gauge theories. I’ve stumbled across some really helpful resources, such as Hamilton’s Mathematical Gauge Theory – With Applications to the Standard Model.
However I think I’m getting confused about the symmetries involved. In particular, I’m getting mixed up about when we want something to be $G$-invariant vs $\mathcal{G}$-invariant.
Suppose we have a gauge theory involving:

*

*A principal $G$-bundle $P \rightarrow M$ with structure group given
by a compact Lie group $G$.

*A complex representation $\rho: G \rightarrow \text{GL} \left( W \right)$, where $W$ is a finite
complex vector space with the standard Hermitian form.

*The associated vector bundle $E \rightarrow M$ with $E = P \times_{\rho} W$.

*Gauge group $\mathcal{G}$ of $P$.

In general, my question is this:
when do we expect objects in our theory to be $G$-invariant vs $\mathcal{G}$-invariant?
Let me give some examples which have confused me. I know connection 1-forms describe our gauge fields, and sections of $E$ describe our Higgs fields.

*

*If we introduce a potential function $V: \Gamma \left( E \right) \rightarrow \mathbb{R}$ for our Higgs fields, should $V$ be $G$-invariant or $\mathcal{G}$-invariant?

*Should our Lagrangian be $G$-invariant or $\mathcal{G}$-invariant?

*Given a vacuum vector $w_0 \in W$, which minimizes $V$, we can define the unbroken subgroup to be the isotropy group / stabilizer $H$ of $w_0$. If $H \subset G$ is a proper subgroup, then we have a spontaneously broken symmetry. However I thought the full initial symmetry we expected of our system was $\mathcal{G}$, not $G$?

I thought $\mathcal{G}$ was the symmetry group for our theory, so we always should expect objects to be $\mathcal{G}$-invariant. However I've often seen authors assume $G$-invariance instead.
Perhaps I’ve got something basic wrong here. Or maybe I’m confused because I am interested in SSB for arbitrary gauge theories, while texts like Hamilton often make assumptions I’m not accustomed to (due to their interest in physical applications). For example, Hamilton assumes $G$ is compact and $M$ is Minkowski space (so connected and simply connected) so $P$ is trivial. In this case, I know $\mathcal{G} \simeq \text{Map} \left( M, G \right)$. Perhaps this is why some objects can be said to be $G$-invariant rather than $\mathcal{G}$-invariant?
 A: Before answering the full question, let me address the definition of $\mathcal{G}$ and connect to your last paragraph. For a generic principal $G$-bundle $\pi:P\to M$, the gauge group $\mathcal{G}(P)$ is defined as
$$\mathcal{G}(P) :=\left\{\vphantom{\int}\psi:P\to P\quad \middle|\quad \psi(p\, g) = \psi(p) g\quad  \text{and}\quad \pi(\psi(p)) = \pi(p),\ ^\forall p\in P,\ ^\forall g\in G\right\}.\tag{1}$$
You can see that if $P$ is the trivial bundle $P=M\times G$, then the equation
$$\psi(p) = (m, \varphi(m) g), \qquad ^\forall (m,g)\in P,$$
defines for all $\psi\in\mathcal{G}(P)$ a function $\varphi:M\to G$ and thus, indeed
$$\mathcal{G}(M\times G) \cong \operatorname{Maps}(M,G)\equiv C^\infty(M,G)\equiv \Omega^0(M;G).$$
Now, going back to the generic case, the subgroup of $\mathcal{G}(P)$ generated by constant maps1 is precisely $G$, the group of global transformations:
$$ \left\{\text{constant}\ \psi\in\mathcal{G}(P)\right\}\cong G \subset \mathcal{G}(P).$$
These are the global transformations.
Now, to answer your questions, the Lagrangian and hence also candidates for Higgs-type potentials, should be $\mathcal{G}(P)$-invariant. You can show, for example, from the definition (1) that the Yang-Mills action is $\mathcal{G}(P)$-invariant. This should always be the case when you're building a gauge theory.
Moving on to your last bullet, let me first make an aside on terminology. Gauge invariance is not a symmetry, but a redundancy in the description. It can therefore not break. The scenario you describe there is most commonly referred to as having Higgsed the gauge invariance, and the term spontaneous symmetry breaking is reserved for global symmetries. Nevertheless, in the usual treatment of Higgsing, in order to arrive at the Higgsed Lagrangian it was necessary to fix a gauge i.e. choose a very carefully picked $\psi\in\mathcal{G}(P)$ and stick with it. You no longer have a gauge transformation available and the remaining symmetry is exactly $H\subset G$, not a larger, infinite group of bundle isomorphisms over it.  This is explained (with a physics language) for example here.

1 in the trivial bundle case those are the ones that satisfy $\mathrm{d}\varphi = 0$, in the non-trivial case you can demand that patchwise and demand they glue nicely on overlaps
