  In ab-initio indexing, for a given diffraction/scattering pattern, the
unit-cell parameters and the Miller indices assigned to reflections in the
pattern are determined simultaneously. "Ab-initio" means a process performed
without any good prior information on the crystal lattice. Newly developed
ab-initio indexing software is frequently reported in crystallography. However,
it is not widely recognized that use of a Bravais lattice determination method,
which is tolerant to experimental errors, can simplify indexing algorithms and
increase their success rates. One of the goals of this article is to collect
information on the lattice-basis reduction theory and its applications. The
main result is Bravais lattice determination algorithm for 2D lattices, along
with a mathematical proof that it works even for parameters containing large
observational errors. As in our error-stable algorithm for 3D lattices, it uses
two lattice-basis reduction methods that seem to be optimal for different
symmetries. In indexing, a method for error-stable unit-cell identification is
also required to exclude duplicate solutions. We introduce several methods to
measure the difference of unit cells known in crystallography and mathematics.
