I am currently studying some topics in Algebraic Geometry, Algebraic Surfaces to be precise, and I have some doubts about the identity which I am going to write down. To fix notations, let $X$ be some manifold and $Y\subset X$ a submanifold of codimension 1. One defines the structural sheaf $ \mathcal{I}_Y$ by setting the following ideals $I_Y(U)=\{f\in\mathcal{O}_X(U)\ |\ f(y)=0\ \forall\ y\in Y\}$ and then the usual restriction maps. Now, one has that $Y$ is an effective divisor on $X$, that $\mathcal{I}_Y(U)$ consists of those functions having a zero along $Y$ and finally that locally each $f\in\mathcal{I}_Y(U)$ is such that $(f)-Y\ge0$.
I should conclude that $\mathcal{I}_Y=\mathcal{O}_X(-Y)$.
I am not even sure of what this identity implies. Does this mean that this sheaf is equal to the one built out of the sections of the line bundle $\mathcal{O}_X(-Y)$, the latter coming from the homomorphism $Div(X)\to Pic(X)$? Should I recall that $H^0(X,\mathcal{O}(-Y))\cong L(-Y)$, the latter being the Riemann-Roch space of $-Y$ and then use some isomorphism with $L(-Y)$?
Thanks in advance!