For example, for a fixed point P we may look at functions having a pole only at P. There is an increasing sequence of vector spaces: functions allowed a simple pole at P, functions allowed a double pole at P, a triple pole, ... The corresponding dimensions are all finite. In case g=0 we can see that the sequence starts 1, 2, 3, ... when we begin with constant functions, then simple poles and so on (this can be read off from the theory of partial fractions). Conversely if this sequence starts 1, 2 then g must be zero (the so-called Gauss sphere[?]). In the theory of elliptic functions it is shown that this sequence is 1, 1, 2, 3, 4, 5 ... ; and this characterises the case g=1. For g > 2 there is no set initial segment; but we can say what the tail of the sequence must be. We can also see why g = 2 is somewhat special.
The reason that the results take the form they do goes back to the formulation (Roch's part) of the theorem: as a difference of two such dimensions. When one of those can be set to zero, we get an exact formula, which is linear in the genus and the degree (i.e. number of degrees of freedom). Already the examples given allow a reconstruction in the shape
dimension - correction = degree - g + 1.
Here the correction is 1 for g = 1 and degree 0, 1; and otherwise 0. The full theorem explains the correction as the dimension associated to a further, 'complementary' space of functions. In now-accepted notation, the statement is
l(D) - l(K - D) = deg(D) - g + 1.
This applies to divisors D, elements of the free abelian group on the points P. The divisor K is a distinguished, fixed divisor. For g = 1 we can take K = 0, while for g = 0 we can take K = -2P (any P). In general K has degree 2g - 2. As long as D has degree (i.e. now sum of coefficients) at least 2g- 1 we can be sure that the correction term is 0.
Going back therefore to the case g = 2 we see that the sequence mentioned above is 1, 1, ?, 2, 3, ... . It is shown from this that the ? term of degree 2 is in fact 2, characterising degree 2 Riemann surfaces as hyperelliptic curves[?]. For g > 2 it is no longer enough to know the genus: some surfaces will be hyperelliptic and some not.
The Riemann-Roch theorem for curves discussed above is foundational: the subsequent theory for curves tries to refine the information it yields.
There are versions in higher dimensions. Their formulation depends on splitting the theorem into two parts. One, which would now be called Serre duality[?], interprets the l(K - D) term as a dimension of a first cohomology group; with l(D) the dimension of a zeroth cohomology group, the left-hand side of the theorem becomes a Euler characteristic, and the right-hnad side a computation of it as a degree corrected according to the topology of the Riemann surface.
To summarise what happened later: in algebraic geometry of dimension two such a formula was found by the geometers of the Italian school. So matter rested before about 1950.
An n-dimensional generalisation was found and proved by Hirzebruch, as an application of characteristic classes[?] in algebraic topology. At about the same time Jean-Pierre Serre was giving the general form of Serre duality[?], as we now know it. Alexander Grothendieck gave a general and influential proof of the Riemann-Roch theorem in algebraic geometry. Finally a general version was found in algebraic topology, too. These developments were essentially all carried out between 1950 and 1960.
What results is that the Euler characteristic (of a coherent sheaf[?]) is something reasonably computable as a left-hand side. If one is interested, as is usually the case, in just one summand within the alternating sum, further arguments must be brought to bear.