residue formula for connections on curves

Let $X$ be a smooth, projective curve over a field $k$ (characteristic zero is enough for me) and $E$ a line bundle on $X$. Assume that $E$ is equipped with an integrable logarithmic connection $\nabla: E \to E \otimes \Omega^1_X(\log D)$, where $D$ is some reduced divisor on $X$. Then, for each point $x$ of $D$ there is a residue $\mathrm{Res}_x(\nabla)$ which belongs to the residue field of $x$. I am trying to figure out what the residue formula looks like in this situation. The obvious thing to consider is $$\sum_{x \in D} \mathrm{Tr}_{k(x)/ k} Res_x(\nabla)$$ but I don't have the impression that this is always zero. So is it possible that one has something like $$\sum_{x \in D} \mathrm{Tr}_{k(x)/ k} Res_x(\nabla)=-\sum_{x \in X-D} [k(x) \colon k] \mathrm{ord}_x(e) \quad \quad \quad (\ast)$$ for a rational section $e$ of $E$. If so, any idea how to prove it?

• Could you explain what you call a residue formula'' for a logarithmic connection on a curve, in the case $k=\mathbb{C}$ ? – abx Jul 1 '15 at 17:46
• I guess no, since this is what I'm trying to find. However, for $k=\mathbb{C}$, the local monodromy around $x$ is given by $\exp(-2\pi i \mathrm{Res}_x(\nabla))$ and since we know that the product of all of them is 1 (by the shape of the fundamental group of $X-D$), we have that $\sum_{x \in D} \mathrm{Res}_x(\nabla)$ is an integer. What I'm asking is (1) if it always zero, (2) if this is not the case, as I think, if there is a formula for this integer in terms of points in $X-D$. – rest Jul 1 '15 at 18:05
• Is it more clear now? At any rate, what I meant by "residue formula" is an expression of the form $(\ast)$. – rest Jul 1 '15 at 18:13
• Does mathoverflow.net/questions/132957/… not answer your question? – Pavel Safronov Jul 1 '15 at 19:27