  We consider the $SU(N)$ Yang-Mills theory, whose topological sectors are
restricted to the instanton number with integer multiples of $p$. We can
formulate such a quantum field theory maintaining locality and unitarity, and
the model contains both $2\pi$-periodic scalar and $3$-form gauge fields. This
can be interpreted as coupling a topological theory to Yang-Mills theory, so
the local dynamics becomes identical with that of pure Yang-Mills theory. The
theory has not only $\mathbb{Z}_N$ $1$-form symmetry but also $\mathbb{Z}_p$
$3$-form symmetry, and we study the global nature of this theory from the
recent 't Hooft anomaly matching. The computation of 't Hooft anomaly
incorporates an intriguing higher-group structure. We also carefully examine
that how such kinematical constraint is realized in the dynamics by using the
large-$N$ and also the reliable semiclassics on $\mathbb{R}^3\times S^1$, and
we find that the topological susceptibility plays a role of the order parameter
for the $\mathbb{Z}_p$ $3$-form symmetry. Introducing a fermion in the
fundamental or adjoint representation, we find that the chiral symmetry becomes
larger than the usual case by $\mathbb{Z}_p$, and it leads to the extra $p$
vacua by discrete chiral symmetry breaking. No dynamical domain wall can
interpolate those extra vacua since such objects must be charged under the
$3$-form symmetry in order to match the 't Hooft anomaly.
