  The theory of gauge fields in Theoretical Physics poses several mathematical
problems of interest in Differential Geometry and in Field Theory. Below we
tackle one of these problems: The existence of a finite system of generators of
gauge-invariant Lagrangians and how to compute them. More precisely, if
$p\colon C\to M$ is the bundle of connections on a principal $G$-bundle
$\pi\colon P\to M$, then a finite number $L_1,\dotsc,L_{N^\prime }$ of
gauge-invariant Lagrangians defined on $J^1C$ is proved to exist such that for
any other gauge-invariant Lagrangian $L\in C^\infty (J^1C)$ there exists a
function $F\in C^\infty (\mathbb{R}^{N^\prime })$ such that
$L=F(L_1,\dotsc,L_{N^\prime})$. Several examples are dealt with explicitly.
