Let $X$ be an irreducible variety. Here are the definitions I'm working with (from Shafarevich).
A Weil divisor on $X$ is a formal finite sum of irreducible closed codimension 1 subvarieties of $X$. A Cartier divisor is "a system of rational functions $\{f_i\}$ corresponding to the open sets $U_i$ of a cover $X=\cup U_i$ satisfying both conditions: (1) the $f_i$ are not identically 0; (2) $f_i/f_j$ and $f_j/f_i$ are both regular on $U_i\cap U_j$."
I don't understand Shafarevich's description of how to define a Weil divisor from a Cartier divisor. He says that "any compatible system of functions defines a [Weil] divisor on $X$. Indeed, for a prime divisor $C$, we set $k_C=v_C(f_i)$ if $U_i\cap C\neq \emptyset $". He mentions that $k_C$ is independent of the choice of $i$ by compatibility, and thus we end up with a divisor $D=\sum k_C C$.
Does this mean that, given a Cartier divisor $(U_i, f_i)$, to define the Weil divisor we need only fix some $f=f_i$ and compute $v_C(f)$ for that $f$ only?
I was trying to do what I thought might be an easy example, but I'm having trouble with the computations. Can someone help or critique where I'm going wrong? Let $H\subseteq \mathbb{P}^2$ be a hyperplane defined by $F(X,Y,Z)=aX+bY+cZ=0$. Then $H$ is an irreducible codimension 1 subvariety and therefore $H$ is a Weil divisor. If $U_i=\mathbb A _i^2$ is the standard affine cover of $\mathbb P^2$ then we also have Cartier divisor $(U_i, f_i)$, where $f_0=F/X, f_1=F/Y, f_2=F/Z$. It would make a lot of sense that the Weil divisor determined by $(U_i, f_i)$ be equal to $H$, but it doesn't seem to be... By definition, it suffices to compute $k_C=v_C(f_0)$ for every prime divisor $C$. (What is the best way to do this?) I think the only prime divisors $C$ where $v_C(f_0)$ is nonzero are $C=H$ and $C=(X=0)$, where I've found $v_H(f_0)=1$ and $v_{(X=0)}(f_0)=-1$. Thus it seems like the Weil divisor determined by $(U_i, f_i)$ is $H-H_0$ (not $H$!), where $H_0=(X=0)$. This seems wrong to me... Can someone help?