I'm trying to understand a calculation on the second page of https://sma.epfl.ch/~filipazz/notes/adjunction_and_inversion_of_adjunction.pdf, and I have a couple questions.
Here is the setup. $X$ is the cone of a projectively normal rational curve of degree $n$, $f:Y\to X$ is the resolution of singularities we get by blowing up the vertex, and $E$ is the exceptional divisor.
In short, it is claimed that the discrepancy of $f$ is $a=-1+2/n$. The calculation is as follows:
Adjunction gives us $K_E = (K_Y+E)|_E = (f^*K_X + (a+1)E)|_E$. Since $E$ is a rational curve, the degree of $K_E$ is $-2$. Then we calculate $$-2 =\text{deg}((f^*K_X + (a+1)E)|_E) = (f^*K_X + (a+1)E) \cdot E.$$
Why is the degree of this divisor the same as its intersection number with $E$?
Then
$$(f^*K_X + (a+1)E) \cdot E = f^*K_X\cdot E + (a+1)E \cdot E = -n(a+1).$$
Why is $f^*K_X\cdot E=0$? Thanks in advance.
For any smooth curve $C$ and any Cartier divisor $D$, we have $D.C = \deg(D|_C)$: for any closed point $c\in C$, we have that the coefficient of $c$ in $D.C$ is the valuation of the local equation cutting out $D$ at that point, which is the same contribution from the intersection product at that point.
The pullback of any divisor has zero intersection with the exceptional divisor: write your divisor as the difference of effective divisors missing the blown-up point and then you win.
Both of these topics are covered at a bit more length in Hartshorne chapter V - the first is contained in the discussion around V.1.1-V.1.3, the second is V.3.2.