I am having problem with the proof in Serre's Vanishing Theorem. If we were to translation line 9 of the proof of Lemma 29.3.1 in generality it seems to say that:
Let $X$ be scheme, $I$ a sheaf of ideals supported in $U \subseteq X$. If $I(U)=J$, then $I(X)=J$.
Is this true?
(To start, note that $U$ should be an affine open.)
No, this is nowhere close to being true. Consider $X=\Bbb P^1_k$, $U=\Bbb A^1_k\subset \Bbb P^1_k$, and $I$ the sheaf of ideals of a closed point in $\Bbb A^1_k$, which WLOG we can take to be $0$. $I(U)=(x)$, which is infinite-dimensional as a $k$-vector space. On the other hand $0\to I\to \mathcal{O}_{\Bbb P^1_k} \to \mathcal{O}_{\{0\}} \to 0$ is exact, which means that $0\to I(X) \to \mathcal{O}_{\Bbb P^1_k}(X) \to \mathcal{O}_{\{0\}}(X)$ is exact so $I(X)$ injects in to $k$, and is in particular finite dimensional as a $k$-vector space, contradicting $I(U)=I(X)$. In fact, for any quasicompact non-affine scheme, one can find counterexamples like this - pick some $I$ with nonvanishing $H^1$ (which exists as otherwise the scheme would be affine by the proposition) and play the same game. The real hero of the story here is $H^1(I)=0$: this says that you can solve any extension problem you want - I'd recommend re-reading the proof and carefully examining how it's used.