Riemann–Roch theorem for algebraic curves