  When solitary waves are characterized as homoclinic orbits of a
finite-dimensional Hamiltonian system, they have an integer-valued topological
invariant, the Maslov index. We are interested in developing a robust numerical
algorithm to compute the Maslov index, to understand its properties, and to
study the implications for the stability of solitary waves. The algorithms
reported here are developed in the exterior algebra representation, which leads
to a robust and fast algorithm with some novel properties. We use two different
representations for the Maslov index, one based on an intersection index and
one based on approximating the homoclinic orbit by a sequence of periodic
orbits. New results on the Maslov index for solitary wave solutions of
reaction-diffusion equations, the fifth-order Korteweg-De Vries equation, and
the longwave-shortwave resonance equations are presented. Part 1 considers the
case of four-dimensional phase space, and Part 2 considers the case of
$2n-$dimensional phase space with $n>2$.
