Choose and put . The Riemann-Roch theorem gives
As constants supply only a one-dimensional subspace, the Riemann-Roch space contains a nonconstant rational function . It has no poles except possibly at . It must have a pole, since a global regular function on an irreducible projective variety is constant. Let its pole order at be ; then .
On the open set where is regular, define . At its pole use the other affine chart, . The local ring of a smooth algebraic curve is a discrete valuation ring, and the positive valuation of at makes the latter expression regular there. The two expressions agree on their overlap, so they give a regular map .
This map is nonconstant. It is proper because its source is projective and its target is separated, so its image is closed; a nonconstant image in the projective line must be the whole line. Each finite-value fibre consists of zeros of a nonzero rational function , and the infinity fibre is the finite pole set. Hence every fibre is finite, giving a quasi-finite morphism. The proper quasi-finite criterion therefore makes a finite morphism.
Finally its pullback of the infinity divisor is exactly the pole divisor . The degree of a morphism of curves equals the degree of this pullback, or equivalently the function-field extension degree . Thus
The argument includes inseparable maps: the degree here is the full field-extension degree, not just the separable degree. This proves the gonality bound from Riemann-Roch with an explicitly constructed finite regular map.