# Finiteness of intersection numbers

I'm trying to understand Shafarevich's definition of intersection numbers:

By definition, "$$D_1,...,D_n$$ general position at $$x$$" means that $$\bigcap_{i=1}^n\text{Supp}(D_i)$$ has finitely many points, say $$P_1,...,P_k$$ (one of them is $$x$$, say $$P_k=x$$).

I assume the neighbourhood $$U$$ is can be taken as the complement of $$\{P_1,...,P_{k-1}\}$$ so, by construction, $$Z(f_1,...,f_n)=\{P\}$$.

I don't understand how we can apply Nullstellensatz, since we are dealing with the local ring $$\mathcal{O}_x$$, and not the usual polynomial ring. I would get it if $$f_1,...,f_n$$ were polynomials, but that's not necessarily the case, so how do we justify that?

[Without loss of generality, assume $$U$$ is open in the affine variety $${\rm Spec \ }A$$. Then it is possible to express $$U$$ as a union of fundamental open sets of the form $$D(f) := {\rm Spec \ }A \setminus V(f)$$. (We say that the fundamental open sets form a basis for the Zariski topology on $${\rm Spec \ }A$$.) The standard way to prove this is to note that, since $$U$$ is open, it must be of the form $${\rm Spec \ } A \setminus V(I)$$ for some ideal $$I$$. So for any point $$x \in U$$, there exists some $$f \in I$$ such that $$f$$ does not vanish at $$x$$, i.e. $$x \in D(f) \subset U$$. Finally, note that $$D(f)$$ is actually affine: it is isomorphic to $${\rm Spec\ } A_f$$.]
Anyway, the point is that by making the open neighbourhood of $$x$$ small enough, we can assume that $$f_1, \dots, f_n$$ are polynomials in some polynomial ring $$B := k[x_1, \dots, x_m ] / J$$.
Then all that remains is to observe that $$x_1, \dots, x_m$$ generate the maximal ideal $$\mathfrak m_x$$, so each $$x_i$$ is in $$\sqrt{(f_1, \dots, f_m)}$$, i.e. $$x_i^{k_i} \in (f_1, \dots, f_n)$$ for a suitably high power $$k_i$$, by the Nullstellensatz. Then take $$k$$ to be the maximum of these $$k_i$$'s.