  We establish Ecalle's mould calculus in an abstract Lie-theoretic setting and
use it to solve a normalization problem, which covers several formal normal
form problems in the theory of dynamical systems. The mould formalism allows us
to reduce the Lie-theoretic problem to a mould equation, the solutions of which
are remarkably explicit and can be fully described by means of a gauge
transformation group. The dynamical applications include the construction of
Poincar{\'e}-Dulac formal normal forms for a vector field around an equilibrium
point, a formal infinite-order multiphase averaging procedure for vector fields
with fast angular variables (Hamiltonian or not), or the construction of
Birkhoff normal forms both in classical and quantum situations. As a by-product
we obtain, in the case of harmonic oscillators, the convergence of the quantum
Birkhoff form to the classical one, without any Diophantine hypothesis on the
frequencies of the unperturbed Hamiltonians.
