I want to prove the following :
Let $V$ be an irreducible affine variety in $\mathbb{A}^n$ with $V \not=\mathbb{A}^n $. Then $dimV < n$.
I tried to prove this by contradiction but my proof doesn't work. I thought my choice of $y_i$ was enough to garantee algebraic independence but it isn't. Can someone help me modify my proof ?
This is what I tried so far:
Suppose $dimV \geq n$. Then there exists a strictly increasing chain of irreducible subvarieties of $V$ $$V_0 \varsubsetneq ... \varsubsetneq V_n \subset V \varsubsetneq \mathbb{A}^n$$ and a corresponding decreasing chain of prime ideals in $\mathbb{C}[x_1,...,x_n]$ $$I_0 \varsupsetneq ... \varsupsetneq I_n \supset I \varsupsetneq (0) $$ with $I_i = I(V_i)$ and $I = I(V)$. Now we choose any $y_n \in I_n \setminus (0)$ and for all the other $I_i$ choose a $y_i \in I_i\setminus (y_n,...,y_{i+1})$. By construction all the $\{y_0,...,y_n\}$ are $n+1$ independent elements of $\mathbb{C}[x_1,...,x_n]$ which is impossible.