  Systems with a first integral (i.e., constant of motion) or a Lyapunov
function can be written as ``linear-gradient systems'' $\dot x= L(x)\nabla
V(x)$ for an appropriate matrix function $L$, with a generalization to several
integrals or Lyapunov functions. The discrete-time analogue, $\Delta x/\Delta t
= L \bar\nabla V$ where $\bar\nabla$ is a ``discrete gradient,'' preserves $V$
as an integral or Lyapunov function, respectively.
