  The goal of this paper is to develop a KAM theory for tori with hyperbolic
directions, which applies to Hamiltonian partial differential equations, even
to some ill-posed ones. The main result has an \emph{a-posteriori} format,
i.e., we show that if there is an approximate solution of an invariance
equation which also satisfies some non-degeneracy conditions, then there is a
true solution nearby. The a-posteriori format also has other automatic
consequences (smooth dependence on parameters, bootstrap of regularity, etc.).
The method of proof is based on an iterative method to solve a functional
equation for the parameterization of the torus satisfying the invariance
equations and for parametrization of directions invariant under the
linearizatation. The iterative method does not use transformation theory or
action-angle variables. It does not assume that the system is close to
integrable. We first develop an abstract theorem. Then, we show how this
abstract result applies to some concrete examples, including the scalar
Boussinesq equation and the Boussinesq system so that we construct {\sl small
amplitude} tori for the equations, which are even in the spatial variable. Note
that the equations we use as examples are ill-posed.
