  This is the first in a series of papers on the construction of explicit
solutions to the stationary axisymmetric Einstein equations which describe
counter-rotating disks of dust. These disks can serve as models for certain
galaxies and accretion disks in astrophysics. We review the Newtonian theory
for disks using Riemann-Hilbert methods which can be extended to some extent to
the relativistic case where they lead to modular functions on Riemann surfaces.
In the case of compact surfaces these are Korotkin's finite gap solutions which
we will discuss in this paper. On the axis we establish for general genus
relations between the metric functions and hence the multipoles which are
enforced by the underlying hyperelliptic Riemann surface. Generalizing these
results to the whole spacetime we are able in principle to study the classes of
boundary value problems which can be solved on a given Riemann surface. We
investigate the cases of genus 1 and 2 of the Riemann surface in detail and
construct the explicit solution for a family of disks with constant angular
velocity and constant relative energy density which was announced in a previous
Physical Review Letter.
