I thought I was generally getting my head around the sheaf structure defined by basic open sets for an affine scheme, but a line of a proof in Ravi Vakil's notes found here (page 130) has me confused. So for a ring $A$ with $s \in A$, $s$ defines a global section of the structure sheaf on $\text{spec}A$ given by taking $s \pmod{\mathfrak{p}}$. To show the identifying property for the structure sheaf, Vakil supposes that the restriction of $s$ to a basic open set, $D(f)$, is $0$. That is, he assumes, $$ \text{res}_{\text{specA}, D(f)}s = 0. $$ He then concludes that this means that there is some integer $m$ such that $f^{m}s = 0$. I am confused about why he draws this conclusion. My reasoning was as follows:
If $s$ is zero on the restriction to $D(f)$, then it means that every prime ideal not containing $f$ must contain $s$. This is equivalent to saying that every prime ideal contains $fs$. In other words, $fs$ is the zero function on $\text{spec}A$. In other words again, $fs$ is in the nilradical. But then why does Vakil say that there is an $m$ such that $f^{m}s = 0$? If he meant $fs$ as an element of $A$, then surely he means $(fs)^{m} = 0$, and if he was talking about $fs$ as a global section, then he meant $fs = 0$ as a function. So why $f^{m}s = 0$? What am I missing?
Thanks
This is just the definition of equality in the localization. Suppose $A$ is a commutative ring and $S \subseteq A$ is a multiplicative set. If $\frac{a}{b} = \frac{c}{d}$ in $S^{-1}A$, then there exists $s \in S$ such that $s(ad - bc) = 0$. Now let $S = \{f^m : m \in \mathbb{Z}_{\geq 0}\}$, $b = d = 1$ and $c = 0$: $$ \frac{a}{1} = \frac{0}{1} \implies 0= f^m(a - 0) = f^m a $$ for some $m$.