Let be $k$ an algebraically closed field. We know that if $X$ is an irreducibile, normal variety, one can associate to every rational function $(f)\in k(X)^*$ a Weil principal divisor $$(f)=\sum_{Y} \nu_Y Y$$ where $Y$ varies among prime divisors of $X$ and $\nu_Y $ is the valutation morphism associated to the ring $\mathscr{O}_{X,Y}$.
As the theory of Weil divisors is developed over normal or locally factorial varieties, I wonder if there is an example where this correspondence fails.
Does anyone have an hint for a counter-example of rational function over a singular variety that can't be associated to a Weil divisor over $X$?
For any varieties over any field, you can associate the group of Weil divisor, that is the free abelian group generated by the codimension 1 irreductible subvarieties. It is denoted $Z^1(X)$. Now, if $f$ is a rational function and $V$ a subvariety of codimension 1, there are many ways to define the order of $f=a/b$ along $V$, some of them work only under some assumptions. Let $A=\mathcal{O}_{X,V}$ be the local ring at the generic point of $V$, then
When several of theses definitions make sense, they agree. The last one always work however. You can also show that the first definition determines the third using normalization.
There is also a notion of Cartier divisors, which form the group $\mathrm{Div}(X)$. There is always a map $\mathrm{Div}(X)\rightarrow Z^1(X)$. One can show that if $X$ is integral and normal, then this is injective. Moreover, it is an isomorphism if and only if the local rings of $X$ are unique factorization domain.