Flawed argument and when is a sheaf that can be associated to any complete, normal variety a birational invariant? Theorem 8.19 of Hartshorne states the following:
Let $ X $ and $ X^{'} $ be two birationally equivalent nonsingular projective varieties over $ k $.  Then $ p_{g}(X) = p_{g}(X^{'}) $.
I thought of the following generalization, which turned out to be wrong.
``Generalization'':
Let $ \pi $ be a presheaf of invertible sheaves over the category of normal varieties over $ k $ (an example would be the map which assigns such a variety its canonical divisor or anticanonical divisor).  If $ X $ and $ X^{'} $ are two birationally equivalent, normal, complete varieties over $ k $, then $ h^{0}(X, \pi(X)) = h^{0}(X^{'}, \pi(X^{'})) $.
P``r''oof:
Let $ V \subseteq X $ be the largest open set for which there is a morphism $ f: X \to X^{'} $.  There is a map $ \pi(f): \pi(X^{'}) \to \pi(V) $.  This map induces a map of global sections $ H^{0}(X^{'}, \pi(X^{'})) \to H^{0}(V, \pi(V)) $.  Since $ X $ and $ X^{'} $ are birational, there is a dense open set $ U \subseteq V $ such that $ f(U) $ is open in $ X^{'} $, and $ f $ induces an isomorphism from $ U $ to $ f(U) $.  Therefore $ \pi(V)\mid_{U} \cong \pi(X^{'}) \mid_{U} $ via $ f $.  Since a nonzero global section of an invertible sheaf cannot vanish on a dense open set, we conclude that the map of vector spaces $ H^{0}(X^{'}, \pi(X^{'})) \to H^{0}(V, \pi(V)) $ must be injective.
We claim that $ X \setminus V $ has codimension greater than or equal to two in $ X $.  If $ x \in X $ is a point of codimension one, then because $ X $ is normal and thus regular in codimension one, $ \mathcal{O}_{X,x} $ is a DVR.  We already have a morphism of the generic point of $ X $ to $ X^{'} $ , and because $ X^{'} $ is proper over $ k $ there exists a unique morphism $ \operatorname{Spec}(\mathcal{O}_{X,x}) \to X^{'} $ which is compatible with the given birational map.  This extends to some neighborhood of $ x $, so we must have that $ x \in V $.
For any affine subset $ U \subseteq X $ such that $ \pi(X)\mid_{U} \cong \mathcal{O}_{U} $ we see that $ H^{0}(U, \mathcal{O}_{U}) \to H^{0}(U \cap V, \mathcal{O}_{U \cap V}) $ is bijective because $ X $ is normal, and $ U \setminus U \cap V $ has codimension greater than or equal to two in $ U $.  This shows that $ h^{0}(X^{'}, \pi(X^{'})) \le h^{0}(X, \pi(X)) $.  By symmetry $ h^{0}(X^{'}, \pi(X^{'})) = h^{0}(X, \pi(X)) $.  IAQE, or Ita argumentor quasi ebrios (thus I argue like a drunken man).
I know something is wrong with this argument for the following reason.  Let $ X $ be a non-singular, degree two, hypersurface of $ \mathbb{P}^{3}_{k} $.  The variety $ X $ is rational by Castelnuovo's criterion.  Therefore, if this generalization was correct, then $ h^{0}(X, -K_{X}) $ would be equal to $ h^{0}(\mathbb{P}^{2}_{k}, -K_{\mathbb{P}^{2}_{k}}) $.
If $ \iota_{X} $ is the inclusion of $ X $ in $ \mathbb{P}^{3}_{k} $, then $ -K_{X} \cong \iota_{X}^{\ast}(\mathcal{O}_{\mathbb{P}^{3}_{k}}(2)) $.  If one tensors the exact sequence for the ideal sheaf of $ X $, then one can use that sequence as follows:
\begin{align*}
h^{0}(X,-K_{X}) & = h^{0}(\mathbb{P}^{3}_{k}, \iota_{X,\ast}(\mathcal{O}_{X}) \otimes \mathcal{O}_{\mathbb{P}^{3}_{k}}(2)) \\
&= h^{0}(\mathbb{P}^{3}_{k}, \mathcal{O}_{\mathbb{P}^{3}_{k}}(2))- h^{0}(\mathbb{P}^{3}_{k}, \mathcal{O}_{\mathbb{P}^{3}_{k}}) \\
&= \binom{5}{2}-1 \\
&= 9
\end{align*}
whereas $ h^{0}(\mathbb{P}^{2}_{k}, -K_{\mathbb{P}^{2}_{k}}) $ is equal to ten.  Why does this argument fail, and when are such sheaves birational invariants?
 A: "This shows that $h^0(X′,π(X′))≤h^0(X,π(X))$" why? you have only shown that they both inject into the same, maybe larger space. Concretely, if you blow up a point on a surface there are many different line bundles on the resulting surface that restrict to the same line bundle on the complement of the blowm-up point. The difference is precisely related to the problem of extending sections to the exceptional divisor. This is what happens here. 
A: I saw something that may answer when the global sections of such a pre-sheaf is a birational invariant.  Let me know if this is a correct generalization of Theorem 8.19 in Hartshorne.  Also, if I am correct it is not just the above generalization that shares this error, but also the proof of Theorem 8.19 listed in Hartshorne's book.  I don't know if this has been fixed.
Let $ \mathcal{F} $ be a pre-sheaf of quasi-coherent sheaves over the 2-category of integral schemes over varieties over $ k $ such that if $ f: X \to Y $ is a 1-morphism, then there is a right exact sequence $ f^{\ast}(\mathcal{F}(Y/k)) \to \mathcal{F}(X/k) \to \mathcal{F}(X/Y) \to 0 $.  If $ X $ and $ X^{'} $ are two birntionally equivalent, locally factorial, projective varieties, then $ h^{0}(X, \mathcal{F}(X/k)) = h^{0}(X^{'}, \mathcal{F}(X^{'}/k)) $.  Moreover if $ \mathcal{F}(X/k) $ is locally free sheaves of rank $ n = \dim(X) $ for any non-singular variety $ X $, then $ H^{0}(X, \wedge^{n}(\mathcal{F}(X/k))) \cong H^{0}(X^{'}, \wedge^{n}(\mathcal{F}(X^{'}/k))) $.
Proof?:  Let $ V $ be the largest open sub-set of $ X $ such that there is a morphism $ f: V \to X^{'} $.  There is a map $ f^{\ast}(\mathcal{F}(X^{'}/k)) \to \mathcal{F}(V/k) $.  Because $ f $ is a projective morphism, $ H^{0}(V, f^{\ast}(\mathcal{F}(X^{'}/k))) $ is equal to $ H^{0}(X^{'}, \mathcal{F}(X^{'}/k) \otimes f_{\ast}(\mathcal{O}_{V})) = H^{0}(X^{'}, \mathcal{F}(X^{'}/k)) $.  Therefore there exists a map $ H^{0}(X^{'}, \mathcal{F}(X^{'}/k)) \to H^{0}(V, \mathcal{F}(V/k)) $ and a map $ H^{0}(X^{'}, \wedge^{n}(\mathcal{F}(X^{'}/k))) \to H^{0}(V, \wedge^{n}(\mathcal{F}(V/k))) $ if $ \mathcal{F}(X^{'}/k) $ and $ \mathcal{F}(X/k) $ are locally free of rank $ n $.  These maps are injective, because if $ s $ is a section of a quasi-coherent sheaf which is zero over a dense open sub-variety of $ V $, then it must equal zero itself.
If $ X \setminus V $ has codimension one, and $ X^{'} \setminus f(V) $ is equal to $ Y $, then there is a morphism $ \phi: \operatorname{Bl}_{Y}(X^{'}) \to X $.  The varieties $ \operatorname{Bl}_{Y}(X^{'}) $ and $ X $ are normal varieties which are isomorphic over the complement of a codimension one sub-variety.  If $ Z $ is equal to $ \operatorname{Bl}_{Y}(X^{'}) $, then let $ U $ be the largest sub-variety of $ Z $ such that $ \phi(U) \cong U $.  Because a section of $ H^{0}(U, \mathcal{F}(U/k)) $ extends to a section of $ H^{0}(Z, \mathcal{F}(Z/k)) $ and a section of $ H^{0}(\phi(U), \mathcal{F}(\phi(U)/k)) $ extends to a section of $ H^{0}(X, \mathcal{F}(X/k)) $; we find that $ H^{0}(X, \mathcal{F}(X/k)) \cong H^{0}(Z,\mathcal{F}(Z/k)) $.  A similar conclusion holds for the wedge products if $ \mathcal{F}(X/k) $ and $ \mathcal{F}(Z/k) $ are locally free of rank $ n $.
Because any global section of $ H^{0}(Z, \mathcal{F}(Z/X^{'})) $ vanishes on $ V $, we see that $ H^{0}(Z, \mathcal{F}(Z/X^{'})) $ is equal to zero.  So $ H^{0}(Z, \mathcal{F}(Z/k)) \cong H^{0}(X^{'}, \mathcal{F}(X^{'}/k)) $.  Therefore,
\begin{align*}
    H^{0}(X, \mathcal{F}(X/k)) & \cong H^{0}(Z,\mathcal{F}(Z/k)) \\
    & \cong H^{0}(X^{'}, \mathcal{F}(X^{'}/k)).
\end{align*}
Likewise if $ \mathcal{F}(X/k) $ is locally free of rank $ n $ for any non-singular variety $ X $:
\begin{align*}
    H^{0}(X, \wedge^{n}(\mathcal{F}(X/k))) & \cong H^{0}(Z, \wedge^{n}(\mathcal{F}(Z/k))) \\
    &\cong H^{0}(X^{'}, \wedge^{n}(\mathcal{F}(X^{'}/k))).
\end{align*}
If $ X \setminus V $ has codimension two or greater, then any global section of $ \mathcal{F}(V/k) $ extends to an element of $ H^{0}(X, \mathcal{F}(X/k)) $ and any global section of $ \mathcal{F}(f(V)/k) $ extends to an element of $ H^{0}(X^{'}, \mathcal{F}(X^{'}/k)) $.  Therefore $ H^{0}(X, \mathcal{F}(X/k)) \cong H^{0}(X^{'}, \mathcal{F}(X^{'}/k)) $.  A similar statement holds for the wedge products.  QED?
Theorem 8.19 of Hartshorne is a corollary of this generalization.  However, one notices that the pre-sheaf of coherent sheaves over the 2-category of integral schemes over varieties over $ k $ which assigns a variety $ X $ the tangent sheaf of $ X $ does not have the required properties because the desired exact sequence is the dual of the one for the cotangent sheaf.   Therefore, this theorem does not hold for the anticanonical divisor.
