Solution (source code)

= Solution

For the full prism <point group>, a threefold rotation eliminates any invariant basal component of a <polar vector>, while the horizontal mirror eliminates its axial component. Therefore the phase preserving all of $D_{3h}$ is nonpolar, despite lacking inversion. A polar phase would have to break some of these symmetries.

The indicated six vertex directions comprise three basal directions and their horizontal-mirror partners. Crucially, this orbit does not contain the negatives of those vectors. Choose $z$ along the prism and $x$ toward one basal vertex. The cubic polynomial
$$
\mathcal I_3=P_x(P_x^2-3P_y^2)
$$
is invariant under the prism's rotations and mirrors. Along a vertex direction $\mathbf P=P\widehat{\mathbf n}$ with a nonzero basal component, it is proportional to $P^3$, so odd scalar terms are symmetry-allowed. Along the prism axis the horizontal mirror instead sends $P_z\mapsto-P_z$, forcing an even <free energy>. Merely omitting inversion is insufficient to decide either polarity or the allowed invariants.