We prove a generalization of Elkies' characterization of the ${\Bbb{Z}}^n$ lattice to nonunimodular definite forms (and lattices). Combined with inequalities of Fr{\o}yshov and of Ozsv\'{a}th and Szab\'{o}, this gives a simple test of whether a rational homology three-sphere may bound a definite four-manifold. As an example we show that small positive surgeries on torus knots do not bound negative-definite four-manifolds.