finite etale morphism between curves and degree Let $X, Y$ be curves(integral, proper, of finite type) over an algebraically closed field $k$, and let $f:X \rightarrow Y$ be a finite etale morphism of degree $n$.
Then for a closed point $P \in X$ and $Q = f(P) \in Y$, the induced map $f^\# : O_{Y,Q} \rightarrow O_{X, P}$ is finite flat and $m_QO_ {X, P} = m_P$.
Here as an $O_{Y,Q}$-module, $O_{X,P}$ is free, and I wish to conclude that the rank must be $n$.
However, $k$ is algebraically closed, $O_{X,P}/m_QO_{X,P} = O_{X,P}/m_P = k = O_{Y,Q}/m_Q$; hence the rank is 1???
I am sure I have misunderstood something here, but I can't figure it out. Where did I go wrong?
Thanks in advance.
 A: I think it is a good idea to look at a book explaining this things like algebraic geometry of Gortz, or any algebraic number theory book. but let me try to explain: yes $[f_* O_X: O_Y]=n$ but it is not equal to $[O_P:O_Q]$, because $P$ is not the only point of $X$ over $Q$. if $f^{-1}(Q)=\{P_1,...,P_m\}$ then you have $$n=[O_X:O_Y]=\sum [O_{P_i}:O_{Q}]$$
(in algebraic number theory people talk about places over a given place, but the language of schemes gives a single framework for both cases.)
Now when you want to study $[O_P:O_Q]$ there are two-part: one part is $f_P=[O_P/m_P:O_Q:m_Q]$, which is always 1 if you look at closed points of the curve over an algebraically closed field. the other part is the ramifications index $e_P$.It is a little harder to define in general but if $Q$ is nonsingular,you just have to choose a generator $t$ for $m_Q$ and define $e_Q$ as the integer such that $t\in m_P^{e_Q}-m_P^{e_Q+1}$. $e_Q$ is by definition 1 for etale maps, and you have $$[O_P:O_Q]=e_Pf_P$$.
hence in your situation, it just means you have exactly $n$ point over $Q$(a n-layer covering in classic language) on the other hand for the generic point $m=0$, you have only one inverse image and hence $f_\eta=n$.
exercise: compute $e,f$ at different points for the map $P^1\to P^1$ which sends $[x,y]\to [x^2+y^2,y^2]$.
