  This is the first of a series of papers where we develop a theory of total
positivity for loop groups. In this paper, we completely describe the totally
nonnegative part of the polynomial loop group GL_n(\R[t,t^{-1}]), and for the
formal loop group GL_n(\R((t))) we describe the totally nonnegative points
which are not totally positive. Furthermore, we make the connection with
networks on the cylinder.
  Our approach involves the introduction of distinguished generators, called
whirls and curls, and we describe the commutation relations amongst them. These
matrices play the same role as the poles and zeroes of the Edrei-Thoma theorem
classifying totally positive functions (corresponding to our case n=1). We give
a solution to the ``factorization problem'' using limits of ratios of minors.
This is in a similar spirit to the Berenstein-Fomin-Zelevinsky Chamber Ansatz
where ratios of minors are used. A birational symmetric group action arising in
the commutation relation of curls appeared previously in Noumi-Yamada's study
of discrete Painlev\'{e} dynamical systems and Berenstein-Kazhdan's study of
geometric crystals.
