Solution (source code)

= Solution

We prove the vanishing by an <injective resolution of sheaves> and the <flasque-kernel section-lifting lemma>.

For a <short exact sequence of sheaves> $0\to\mathcal F\to\mathcal G\to\mathcal H\to0$ with flasque kernel, every section of $\mathcal H$ on an open set lifts to $\mathcal G$ there. Indeed choose a maximal partial lift by the <Zorn lemma>, using the <sheaf gluing axiom> on chains. At any point outside its domain choose a local lift. The difference on the overlap is a section of $\mathcal F$ and extends to the new open set by flasqueness; subtract that extension from the new lift and glue. Maximality forces the lift's domain to be the whole open set. Thus taking sections preserves this short exact sequence.

Every <injective sheaf> is flasque: for $U\subseteq V$, the monomorphism between the <extension by zero> sheaves $\mathbb Z_U\hookrightarrow\mathbb Z_V$ and the defining extension property of injectivity make the restriction $\mathcal J(V)\to\mathcal J(U)$ surjective. Embed $\mathcal F$ into an injective sheaf $\mathcal J$. The quotient $\mathcal Q$ is flasque as well: lift a section of $\mathcal Q$ on a smaller open to $\mathcal J$, extend it in $\mathcal J$, and project.

The <long exact sequence in sheaf cohomology> now gives $H^1(X,\mathcal F)=0$, since $\Gamma(X,\mathcal J)\to\Gamma(X,\mathcal Q)$ is surjective, and for $i\ge2$ gives $H^i(X,\mathcal F)\cong H^{i-1}(X,\mathcal Q)$, since injectives have zero positive-degree derived functors. Repeat the construction for the flasque quotient. After finitely many such shifts any specified positive degree reduces to a vanishing first group. Hence
$$
\boxed{H^i(X,\mathcal F)=0\qquad(i>0).}
$$
No separation, compactness or scheme hypothesis is used.