Let $X$ be a scheme. $U$ is an open subscheme of $X$. Assume $f$ is a global section on $X$ which is not a zero divisor, then the restriction of $f$ to $U$ is still a non-zero divisor?


If $X$ is affine, the answer is obvious true. I don't know the answer for a general scheme.


This is a question raised in the definition of sheaf of total fraction rings. Some author claim
 U|-> total fraction ring of sections over U
is a presheaf, but I can't see the reason.



The restriction of a global section which is not a zero divisor is still a non-zero divisor?
Here's a counterexample.


Let $P=\mathbb{P}^1$, $X=\mathbb{A}^1$, and attach $X$ to $P$ along a single point $\{x\}$. Then there is a global section $f$ which is nonzero on $X$ except at $x$, and is identically zero on $P$. Moreover, $f$ restricts to a zero divisor on the open subvariety $X\cup P/\lbrace y\rbrace$, where $y$ is any point of $P$ other than $x$. 


Now suppose $fg=0$. Then $g\equiv 0$ on $X/\lbrace x\rbrace$ implies $g(x)=0$. Since $g\mid\_P$ vanishes at one point, $g\mid\_P\equiv 0$, so $g= 0$. $\Box$


The correct definition of this presheaf is given in Hartshorne II.6. Basically, you only consider global sections which are not zero divisors in each local ring. 


