If $M$ is a compact Riemann surface, then $H^1(M,\mathbb R)\cong H^1(M,\mathcal O)$ I am wondering why we have the isomorphism stated in the title. Concretely, we have the following exact sequences of sheaves:
$$0\rightarrow\mathbb R\rightarrow\mathcal O\rightarrow\mathcal O/\mathbb R\rightarrow 0$$
Where $\mathbb R$ denotes the constant sheaf over $M$ and the first map is the canonical inclusion. If we pass to the long exact sequence in cohomology, we have that
$$\dots\rightarrow H^0(M,\mathcal O/\mathbb R)\rightarrow H^1(M,\mathbb R)\rightarrow H^1(M,\mathcal O)\rightarrow H^1(M,\mathcal O/\mathbb R)\rightarrow\dots$$
is exact, but somehow, the groups at the extremes should be trivial whenever $M$ is a compact Riemann surface.
I know this has to do with Hodge theory over compact Kähler manifolds, but although I have been searching for a reference of this fact, I haven't found it.
How can we deduce this result from Hodge theory?
Thanks in advance for your answers.
 A: This is not a very natural isomorphism, I guess. I'm not sure where you found this. One is a real vector space and the other is a complex vector space, so in what sense are these isomorphic? I will give the argument to deduce that the two have the same dimension as real vector spaces. I will use the Dolbeault isomorphism $H^{p,q}(M) \cong H^q(M,\Omega^p)$.
If the genus of $M$ is $g$, then $\dim_{\Bbb R} H^1(M,\Bbb R) = 2g$ and $g=\dim_{\Bbb C} H^0(M,\Omega^1) = \dim_{\Bbb C} H^{1,0}(M)$. On the other hand, it follows from harmonic theory (taking complex conjugates of harmonic representatives) that $H^1(M,\mathscr O) \cong H^{0,1}(M) \cong \overline{H^{1,0}(M)}$, and so $\dim_{\Bbb C} H^1(M,\mathscr O) = g$, as well.
You can deduce the statement slightly more indirectly from the Hodge decomposition: $H^1(M,\Bbb C) \cong H^{1,0}(M)\oplus M^{0,1}(M)$. Then
$$H^1(M,\Bbb R)\otimes\Bbb C \cong H^1(M,\mathscr O)\oplus \overline{H^1(M,\mathscr O)}.$$
The claim on dimensions follows immediately from this.
A: The first three terms of the long exact sequence already form the short exact sequence $0 \rightarrow \mathbb{R} \rightarrow \mathbb{C} \rightarrow \mathbb{C}/\mathbb{R} \rightarrow 0$, since the global holomorphic functions on a compact complex manifold are constant. Therefore, the map $H^0(M,\mathcal{O}/\mathbb{R}) \rightarrow H^1(M,\mathbb{R})$ factors by $0$ and thus the map $H^1(M,\mathbb{R}) \rightarrow H^1(M,\mathcal{O})$ is injective. Hodge decomposition and Serre duality imply that both are vector spaces of the same dimension, therefore the map is an isomorphism.
