Structure theorem for etale maps

I have been trying to understand the structure theorem for etale maps for rings. Let $A\to B$ be a local homomorphism of Noetherian local rings which is etale. Then the structure theorem says that $B=A[T]_g/p(T)$, where $g\in A[T]$ is such that $p'(T)$ is a unit in $B$.

This theorem is given as Theorem 3.14 in Milne's book on etale cohomology. The way the proof proceeds, it seems that the degree of the polynomial $p$ is equal to field extension degree $[k(y):k(x)]$, where $y$ denotes the maximal ideal of $B$ and $x$ denotes the maximal ideal of $A$. This seems to be wrong since if we take $A$ and $B$ to be localizations of finitely generated algebras over an algebraically closed field, then this extension degree will always be 1, which would mean that $B$ is isomorphic to $A$.

-
A[T]/p(T) is an extension of A and inverting g has the effect of removing possibly ramified primes from the picture. –  Ray Hoobler Feb 18 '13 at 21:46
I haven't checked the notes, but an etale morphism should induce a map $i : k(x) \rightarrow k(y)$. The degree (I believe) should be $[k(y) : i(k(x))]$. This need not be one (as the map $\mathbb{A}^1 \rightarrow \mathbb{A}^1$ sending $x \rightarrow x^n$ shows). –  rghthndsd Feb 18 '13 at 22:00
Generally $A[T]_g/(p)$ is not local, and likewise an essentially finite type local map between local noetherian rings is virtually never finite type and hence cannot be etale. The correct statement is that if $A \rightarrow B$ is etale then after suitable Zariski-localization on both $A$ and $B$ (around any chosen point in Spec($B$) and its image in Spec($A$)) we reach the you describe with $p$ also monic. Typically $p$ has reducible specialization at points of Spec($A$), and its degree is controlled by the fiber degrees over Spec($A$), not by residual degrees on Spec($B$). –  user30379 Feb 19 '13 at 1:41
@pranavk : If $A$ is local, then $A[T]_g/p(T)$ can be local for the following reason. If $A$ is local, then $A[T]/p(T)$ is semi local and then if we invert an element which is contained in all but one of the maximal ideals, then $A[T]_g/p(T)$ is local. –  Rex Feb 19 '13 at 3:32
The degree is not $[k(y):k(x)]$ but the dimension of the affine ring of $f^{-1}(x)$ over $k(x)$. –  Leo Alonso Feb 19 '13 at 10:07

The degree is $1$ when $A,B$ are finitely generated algebras over an algebraically closed field, yes, but then they are not local (unless they are artinian), and the degree can be arbitrary if $A,B$ are just localizations of finitely generated algebras. Already the "trivial" direction of the classification of étale morphisms shows that your argument is not correct, every degree is possible.
Let $E\to \mathbb{P}^1$ be a degree 2 map over the complex numbers. Let $y\in E$ be a closed point which is unramified and let $x$ be the image of $y$. Then I would have thought that the ring homomorphism $\mathscr{O}_{\mathbb{P}^1,x}\to \mathscr{O}_{E,y}$ is etale. Both the local rings have residue field $\mathbb{C}$ and so the degree of the extension is 1, but clearly they are not isomorphic. –  Rex Feb 19 '13 at 3:36
@Rex: In your example, the ring homomorphism between the stalks is étale, but it is not finite. (The homomorphism from $\mathscr O_{\mathbb P^1, x}$ to the semi-local ring whose maximal ideals correspond to the two points in $E$ lying over $y$ is finite, but to get rid of the second point you need to localize.) –  Ulrich Goertz Feb 24 '13 at 14:53