Regular local ring that is not isomorphic to $k[T_1, \dots, T_n]$ Let $k$ be a field, $A$ a regular local $k$-algebra such that $A / \mathfrak{m} = k$ and that is a localization of a finitely generated $k$-algebra of dimension $d$, and $f_1, \dots, f_d$ be a system of parameters.
Then I know that $\phi : k[T_1, \dots, T_d]_\mathfrak{n} \to A ,\ T_i \mapsto f_i$ induces an isomorphism $k[[T_1, \dots, T_d]] \simeq \hat{A}$ (where $\mathfrak{n}$ is the maximal ideal $(T_1, \dots, T_d)$ of $k[T_1, \dots, T_d]$).
I don't understand why $\phi$ is not isomorphism.
I know that $\phi$ is in general not injective: a polynomial in $f_i$'s may be $0$.
So is there an example of a ring $A$ such that $\phi$ is not injective (or not surjective)?
 A: One reason that you should believe this $\phi$ isn't always an isomorphism is that if it were, every integral smooth variety of the same dimension would be birational - if $\phi$ is an isomorphism, this says that the fraction fields of all these varieties are isomorphic to $k(T_1,\cdots,T_d)$, which would imply that they are all birational. But this is really badly not true already in dimension one: two smooth curves of different genus can't be birational. 
Consider $R=(k[x,y]/(y^2=x^3-x))_{(x,y)}$, which is the local ring at the origin of the elliptic curve with affine model $k[x,y]/(y^2=x^3-x)$. This is a counterexample (you can see the other answer for a reasonable proof - I originally had something wrong here and I'm thinking about the best way to correct it at present).
A: First off, $\phi$ must be injective, since then natural map $k[T_1,\dots,T_d]_\mathfrak{n}\to k[[T_1,\dots,T_d]]$ is injective so anything in the kernel of $\phi$ would also give an element of the kernel of the map $k[[T_1,\dots,T_d]]\to\hat{A}$.  On the other hand, there's no reason to think $\phi$ is surjective.  Identifying $\hat{A}$ with $k[[T_1,\dots,T_d]]$ and thus $A$ with a subring of $k[[T_1,\dots,T_d]]$, we know $A$ contains $k[T_1,\dots,T_d]_{\mathfrak{n}}$, but it could also contain more elements of $k[[T_1,\dots,T_d]]$ which are not rational functions of $T_1,\dots,T_d$.
Let's look at a concrete example.  Let $A$ be the local ring of the point $(0,0)$ on the elliptic curve $y^2=x^3+x$ (so, $A$ is the localization of $k[x,y]/(y^2-x^3-x)$ at the maximal ideal $(x,y)$).  Since $y$ is a local parameter at this point, we have a homomorphism $\phi:k[T]_{(T)}\to A$ sending $T$ to $y$ which induces an isomorphism of completions $k[[T]]\to \hat{A}$.  But notice that besides $y$, which corresponds to $T$, $A$ also contains an element $x$ which satisfies $y^2=x^3+x$.  There is no rational function $x$ in $T$ which satisfies $T^2=x^3+x$, so this element cannot be in the image of $\phi$.  On the other hand, we can find a power series in $T$ which satisfies $T^2=x^3+x$ (solve for its coefficients one by one), which is how $x$ is in the image of $k[[T]]$ after completing.
