J.-P. Serre: Duality of regular differentials on singular curves I already asked this on math.stackexchange.com, but didn't get any responses. I hope it is appropriate here.
Let $X'$ be an irreducible singular algebraic curve over an algebraically closed field $k$, let $X \to X'$ be its normalization, and consider a singular point $Q \in X'$. Let $K = Q(X)$ be the function field of $X$ and $X'$.
Let $\mathcal{O}_Q' = \mathcal{O}_{X', Q}$ be the stalk of the structure sheaf of $X'$ at $Q$, and let $\mathcal{O}_Q = \bigcap_{P \mapsto Q} \mathcal{O}_P$ be its normalization. Here $\mathcal{O}_P$ is the stalk of the structure sheaf of $X$ at $P \in X$, and the intersection is over all points mapping to $Q$.
In Algebraic Groups and Class Fields by J.-P. Serre, chapter IV §3, Serre introduces the module $\underline{\Omega}_Q'$ of regular differentials at $Q$. A differential $\omega \in D_k(K)$ is called regular, iff
\begin{equation}\sum_{P \mapsto Q} \operatorname{Res}_P(f \omega) = 0 \quad \text{for all} \  f\in \mathcal{O}_Q'.\end{equation}
Similarly to $\mathcal{O}_Q$, Serre defines
$$ \underline{\Omega}_Q = \bigcap_{P \mapsto Q} \Omega_P.$$
Since every differential $\omega \in \underline{\Omega}_Q$ has no poles at any point $P \mapsto Q$, clearly $\operatorname{Res}_P(f \omega) = 0$ for $f \in \mathcal{O}_Q'$, so that $\underline{\Omega}_Q \subset \underline{\Omega}_Q'$.
Now to my question: The mapping
\begin{align}
\mathcal{O}_Q / \mathcal{O}_Q' \times \underline{\Omega}_Q' / \underline{\Omega}_Q & \to k \\
(f, \omega) & \mapsto \sum_{P \mapsto Q} \operatorname{Res}_P(f \omega)
\end{align}
is clearly bilinear and well-defined. Serre claims, that it is a perfect pairing, but I don't know why. I think we have to show two things:

*

*If $f \in \mathcal{O}_Q$, with the property that for each $\omega \in \underline{\Omega}_Q'$, one has $\sum_P \operatorname{Res}_P(f \omega) = 0$, then in fact $f \in \mathcal{O}_Q'$.

*If $\omega \in \underline{\Omega}_Q'$, such that for each $f \in \mathcal{O}_Q$, one has $\sum \operatorname{Res}_P(f \omega) = 0$, then $\omega \in \underline{\Omega}_Q$, i.e. $\omega$ is regular at every $P \mapsto Q$.

Any help would be appreciated :)
 A: In the algebraic setting, I solved the second case: Given $\omega \in \underline \Omega_Q' \setminus \underline \Omega_Q$, we want to find an $f \in \mathcal O_Q$, such that $\sum_P \operatorname{Res}_P(f \omega) \neq 0$. The basic idea is that, as $\omega \notin \underline\Omega_Q$, there exists a point $P_1 \mapsto Q$ such that $\omega$ has a pole of order $n > 0$ at $P_1$. So if $t$ is a local parameter at $P_1$, then $\operatorname{Res}_{P_1}(t^{n-1} \omega) \neq 0$. However it is not clear if $t \in \mathcal O_Q$, and we also have to control the residues at the other points.
To solve this, let $n_P$ be the order of the pole of $\omega$ at $P \mapsto Q$, which is possibly $0$ if $\omega$ does not have a pole at $P$. Then define a divisor
$$D = \left(\sum_{P\to Q} n_P [P]\right) - [P_1].$$
If we find a meromorphic function $f$ whose divisor of zeroes is exactly $D$, then $$\sum \operatorname{Res}_P(f\omega) = \operatorname{Res}_{P_1}(f \omega) \neq 0.\tag{1}$$
Pick any additional point $R \in X$, which does not map to $Q$. Then by Riemann-Roch, if $N \gg 0$, there exists a function
$$f \in H^0(\mathcal O(N[R] - D)) \setminus H^0(\mathcal O(N[R] - D - [P_1])),$$
which is exactly an $f$ such that (1) holds.

I think I can also show this in the analytic setting. The argument may possibly work in the algebraic setting if one considers completions, but I don't feel too familiar with completions, and my own interest in this is actually analytic.
Let $X'_1, \dotsc, X'_r$ be the irreducible components of $X'$ at $Q$. Then $X$ is the disjoint union of the normalizations $X_i \to X_i'$. Since we work in the analytic setting and the question is local in $X'$ we can assume that each $X_i$ contains exactly one point $P_i \mapsto Q$. Algebraically this means $\mathcal O_Q \cong \prod_i \mathcal O_{P_i}$. Since the $\mathcal O_{P_i}$ are regular rings, we can choose a local coordinate $\mathcal O_{P_i} \cong \mathbb C\{x_i\}$.

*

*Consider an element $f \in \mathcal O_Q \setminus \mathcal O_Q'$. We have to find a differential form $\omega \in \underline{\Omega}_Q'$ such that $\sum_P \operatorname{Res}_P(f \omega) \neq 0$.
1.1.  Suppose $f(P_i) \neq f(P_j)$
for some $i$ and $j$, consider the differential form $\omega$ which vanishes at all $P_k$ for $i \neq k \neq j$, and has simple poles at $P_i$ and $P_j$ with residues $$\operatorname{Res}_{P_i} = - \operatorname{Res}_{P_j} = 1.$$
Since each $g \in \mathcal O_Q'$ can be developed locally at $P_i$ in a power series, $\operatorname{Res}_{P_i}(g \omega) = g(Q)$, and similarly $\operatorname{Res}_{P_j}(g \omega) = - g(Q)$. Hence $\omega \in \underline{\Omega}_Q'$, but
$$\sum_{P \mapsto Q} \operatorname{Res}_P(f \omega) = f(P_i) - f(P_j) \neq 0.$$
1.2. If $f(P_i) = f(P_j)$ for all $i,j$, one irreducible component of $X'$ has to be singular.
Actually, that statement is not correct. As an example take $X'$ to be the union of three lines in $\mathbb C^2$, intersecting in zero. The normalisation map is given by
\begin{align*}
\mathbb C\{x,y\}/(x(x-y)y) & \to \mathbb C\{x\} \times \mathbb C\{y\} \times \mathbb C\{z\} \\
x & \mapsto (x,0,z/2) \\
y & \mapsto (0,y,z/2).
\end{align*}
The function $f = (x,y,0)$ takes the same value in all three points over the singularity, but does not come from the left: Any function $g$ which restricts to $x$ on $\{y = 0\}$ and to $y$ on $\{x = 0\}$ is of the form $g = x + y + xy h$, so that $g$ has a non-zero linear term in $z$.
It is sufficient to show the existence of $\omega$ on the irreducible component, so we might  suppose $X'$ itself is irreducible. This means we have an inclusion $\mathcal O_Q' \subset \mathbb C\{x\}$. Since the quotient
$$ 0 \to \mathcal O_Q' \to \mathbb C\{x\} \to \Bbb C^\delta \to 0$$
is finite-dimensional one has $x^k \in \mathcal O_Q'$ for some $k > \delta$, and so $\mathcal O_Q'$ is given by the vanishing of $\delta$ linear equations on the coefficients $a_1, \dotsc, a_{k-1}$ of a power series $\sum_n a_n x^n$. Let $$l = \gamma_1 a_1 + \dotsb + \gamma_{k-1} a_{k-1}$$ be one of those linear equations with $l(f) \neq 0$. Then define
$$ \omega = \left( \frac{\gamma_1x^{k-2} + \dotsb + \gamma_{k-2} x + \gamma_{k-1}}{x^{k}} \right) dx$$
such that for each power series $g \in \mathbb C\{x\}$ we have $\operatorname{Res}_0(g \omega) = l(g)$. Thus $\omega \in \underline{\Omega}_Q'$ and $\operatorname{Res}_0(f \omega) \neq 0$.


*Suppose $\omega \in \underline{\Omega}'_Q$, but $\omega \notin \underline{\Omega}_Q$. Then $\omega$ has a pole at some $P_i$, and we can write
$ \omega = h(x_i) dx_i$ for some Laurentseries
$$h(x_i) = \sum_{k \geq -n} h_k x^k_i, \quad h_{-n} \neq 0.$$
Thus $\operatorname{Res}_{P_i}(x_i^{n-1} \omega) = h_{-n} \neq 0$. So if we define
$$ f = (0, \dotsc, 0, x_i^{n-1}, 0, \dotsc, 0) \in \prod_j \mathcal O_{P_j}$$
then $\sum_j \operatorname{Res}_{P_j}(f \omega) = h_{-n} \neq 0$.
