AbstractWe present theorems which provide the existence of invariant whiskered tori in finite-dimensional exact symplectic maps and flows. The method is based on the study of a functional equation expressing that there is an invariant torus.We show that, given an approximate solution of the invariance equation which satisfies some non-degeneracy conditions, there is a true solution nearby. We call this an a posteriori approach.The proof of the main theorems is based on an iterative method to solve the functional equation.The theorems do not assume that the system is close to integrable nor that it is written in action-angle variables (hence we can deal in a unified way with primary and secondary tori). It also does not assume that the hyper...