  Some scales of spaces of ultra-differentiable functions are introduced,
having good stability properties with respect to infinitely many derivatives
and compositions. They are well-suited for solving non-linear functional
equations by means of hard implicit function theorems. They comprise Gevrey
functions and thus, as a limiting case, analytic functions. Using majorizing
series, we manage to characterize them in terms of a real sequence M bounding
the growth of derivatives. In this functional setting, we prove two fundamental
results of Hamiltonian perturbation theory: the invariant torus theorem, where
the invariant torus remains ultra-differentiable under the assumption that its
frequency satisfies some arithmetic condition which we call BR M , and which
generalizes the Bruno-R{\"u}ssmann condition ; and Nekhoroshev's theorem, where
the stability time depends on the ultra-differentiable class of the
pertubation, through the same sequence M. Our proof uses periodic averaging,
while a substitute of the analyticity width allows us to bypass analytic
smoothing. We also prove converse statements on the destruction of invariant
tori and on the existence of diffusing orbits with ultra-differentiable
perturbations, by respectively mimicking a construction of Bessi (in the
analytic category) and Marco-Sauzin (in the Gevrey non-analytic category). When
the perturbation space satisfies some additional condition (we then call it
matching), we manage to narrow the gap between stability hypotheses (e.g. the
BR M condition) and instability hypotheses, thus circumbscribing the stability
threshold. The formulas relating the growth M of derivatives of the
perturbation on the one hand, and the arithmetics of robust frequencies or the
stability time on the other hand, bring light to the competition between
stability properties of nearly integrable systems and the distance to
integrability. Due to our method of proof using width of regularity as a
regularizing parameter, these formulas are closer to optimal as the the
regularity tends to analyticity.
