Let $X$ be a connected compact complex manifold, $U$ an open subset of $X$ such that the complement of $U$ in $X$ is an analytic subset of codimension at least 2 in $X$. Let $O\_X$ (resp. $O\_U$) be the sheaf of holomorphic functions on $X$ (resp. on $U$). If $n$ is a nonnegative integer then there is a natural homomorphism of complex vector spaces


$$r\_n: H^n(X,O\_X) \to H^n(U,O\_U).$$


The second Riemann extension theorem actually asserts that $r\_n$ is an isomorphism for $n=0$. I am looking for a reference where it is proven that $r\_n$ is an isomorphism, say, for $n=1$ or $2$ (may be, under some additional assumptions). Thanks!



A cohomological variant of the second Riemann's extension theorem
For the first cohomology statement, you need the codimension to be at least three and for the first and second cohomology, codimension four. This theorem was proved by G Scheja in [1]. You can also find a proof in the book by Banica and Stanasila ([2] Chapter II, §II.3 pages 66-67).


**References**


[1] Constantin Banica, Octavian Stanasila, *Algebraic methods in the global theory of complex spaces*. Rev. English ed. (English) Bucuresti: Editura Academiei; London-New York-Sydney: John Wiley&Sons, pp. 296 (1976), [MR0463470](https://mathscinet.ams.org/mathscinet-getitem?mr=MR0463470), [Zbl 0334.32001](https://zbmath.org/?q=an%3A0334.32001).


[2] Günter Scheja, "Riemannsche Hebbarkeitssätze für Cohomologieklassen" (German) Mathematische Annalen 144, 345-360 (1961), [MR0148941](https://mathscinet.ams.org/mathscinet-getitem?mr=MR0148941), [Zbl 0112.38001](https://zbmath.org/?q=an%3A0112.38001).


