I vaguely recall the following fact that I'd like to use in my research. It should be easy to see that this holds (if it does) but I can't seem to prove it.


Let $p:X\longrightarrow S$ be a (regular) arithmetic surface over a Dedekind scheme $S$.


Let $P:S\longrightarrow X$ be a section and let $\omega$ be a non-zero rational section of $\omega\_{X/S}$. Let $K\_{X} = \mathrm{div}(\omega) $ be the canonical divisor defined by $\omega$. (A better notation for $K\_X$ would be $K\_{X/S}$, maybe.)


By definition, the intersection number $(K\_X,P)$ is defined as $$\sum\_{s } i\_s (K\_{X}, P) \log( \mathrm{card}( k (s)) ), $$ where the sum runs over the closed points of $S$ and $$i\_s(K\_{X},P) = \sum\_{x} i\_x(K\_{X}, P) [k(x):k(s)],$$ where the sum runs over the closed points of $X\_s$ and $i\_x$ denotes the intersection number at $x$.


Now, I wonder if the following equality is trivial to see.


Write $\omega = df$ for some rational function $f\in K(X)$. (We assume this to be possible.) Do we have that 


$$(K\_{X}, P) = \sum\_{s} \mathrm{ord}\_s(P^\ast\omega) \log(\mathrm{card}(k(s)))?$$


To see this, it suffices to prove the following equality: $$\mathrm{ord}\_s(P^\ast \omega) =i\_s (K\_{X}, P) .$$ Does this hold?



intersection number 
This is correct if $P(S)$ is not contained in the support of $\mathrm{div}(\omega)$. It comes essentially from the definition of $i\_x(K\_X, P)$. You don't need $\omega$ to be an exact differential from. However the intersection number depends on the choice of $\omega$ (as well as the Weil divisor $K\_X$). You can check this by yourself by multiplying $\omega$ by a non-zero constant in $K(S)$ and see the effect on the total intersection number. If $P(S)$ is contained in the support of $K\_X$, then you can't define $i\_x(K\_X, P)$. 


**EDIT**. Let me add some more details. Denote by $K(X)$ the field of rational functions on $X$, viewed as a constant sheaf on $X$. Then $\omega\in \omega\_{X/S}\otimes K(X)$. Hence $\omega\cdot\omega\_{X/S}^{\vee}$ is a subsheaf of $K(X)$, hence equal (not only isomorphic) to $O\_X(-D)$ for some Cartier divisor $D$ on $X$. We have 
$$ \omega\_{X/S}=\omega\cdot O\_X(D).
$$ 
A straightforward local computation shows that $\mathrm{div}(\omega)=D$ as Cartier divisors. Let us identify $P$ with $P(S)$. Let $I\subset O\_X$ be the ideal sheaf defining $P$ in $X$. As $P$ is not contained in the support of $D$, $D|\_P$ is a well defined Cartier divisor on $P$. Namely, if a local equation of $D$ at some point $x\in P$ is given by $f\_x\in K(X)$, then we can write $f\_x=a/b$ with $a, b\notin I\_x$ (here we use the fact that $O\_{X,x}$ is a UFD). Then a local equation of $D$ restricted to $P$ is $\bar{a}/\bar{b}$ where $\bar{c}$ means the image of $c$ in $O\_{X,x}/I$. 


The above equality restricted to $P$ reads
$$P^{\*}(\omega\_{X/S})=P^{\*}(\omega) \cdot O\_P(D|\_P).$$ 
So $P^{\*}(\omega)$ is a rational section of 


$P^{\*}\omega\_{X/S}$ and its divisor on $S$ is $D|\_P$. 


To get an intersection number independent of the choice of a rational section $\omega$, you have to use Arakelov intersection theory. 


