Solution (source code)

= Solution

Let $\rho_3(P)=P\otimes P\otimes P$ act on the alternating coefficient <tensor> $\varphi$, and set
$$
H=\{P\in SO(7):\rho_3(P)\varphi=\varphi\}.
$$
The coefficient convention here is the one in the source's hint; using the usual covariant <pullback> gives the same <stabilizer subgroup>, since an invertible transformation preserves a <differential form> if and only if its inverse does. The <identity matrix> fixes $\varphi$. If $P,Q$ fix it, then $\rho_3(PQ)\varphi=\rho_3(P)\rho_3(Q)\varphi=\varphi$. Multiplying $\rho_3(P)\varphi=\varphi$ by $\rho_3(P^{-1})$ shows that $P^{-1}$ fixes it as well. Thus $H$ is a <subgroup> of $SO(7)$. Its defining equations are polynomial, so it is closed and hence a <Matrix Lie group>.

For $P(t)=I+tT+O(t^2)\in H$, differentiating $P^TP=I$ gives $T^T=-T$. Differentiating the three factors in $\rho_3(P(t))\varphi=\varphi$ gives
$$
\boxed{\mathfrak h=\left\{T\in\mathfrak{so}(7):
\sum_n\bigl(T_{kn}\varphi_{nlm}+T_{ln}\varphi_{knm}+T_{mn}\varphi_{kln}\bigr)=0
\text{ for all }k,l,m\right\}.}
$$
The <skew-symmetric matrix> condition records the ambient <special orthogonal group>; it must be included when differentiating that group's definition.

These linear conditions are sufficient as well as necessary. On the <tensor product>, the infinitesimal action is
$$
D(T)=T\otimes I\otimes I+I\otimes T\otimes I+I\otimes I\otimes T.
$$
Its three terms commute, so $\rho_3(e^{tT})=e^{tD(T)}$. If $D(T)\varphi=0$, every positive power of $D(T)$ annihilates $\varphi$, giving $e^{tD(T)}\varphi=\varphi$. Also $T\in\mathfrak{so}(7)$ implies $e^{tT}\in SO(7)$. Therefore $e^{tT}\in H$, proving the asserted <Lie algebra> description. For the given positive three-form this is the compact <G2 (mathematics)> <Lie algebra> $\mathfrak g_2$.