Definitions of Milnor number Let $f:\mathbb{C}^n\to\mathbb{C}$ be a function with an isolated singularity at $0$, by which I mean $f'(0)=0$ and there is some $\epsilon > 0$ such that $f'(p)\not = 0$ for all $p$ nonzero with $|p|<\epsilon$.
The $\textbf{Milnor number}$ of $f$ at $0$ can be defined in two ways:
i) The dimension, as a vector space over $\mathbb{C}$, of the 'local algebra' $\mathbb{C}[z_1,...,z_n]/\langle\frac{\partial{f}}{\partial z_1}, ..., \frac{\partial{f}}{\partial z_n}\rangle$ (the algebra of functions modulo the ideal generated by the partial derivatives of $f$).
ii) The degree of the map from $\mathbb{S}_\epsilon^{2n+1}\to \mathbb{S}_\epsilon^{2n+1}$ defined by $z\mapsto \epsilon \frac{\left(\frac{\partial{f}}{\partial z_1}, ..., \frac{\partial{f}}{\partial z_n}\right)}{\|\left(\frac{\partial{f}}{\partial z_1}, ..., \frac{\partial{f}}{\partial z_n}\right)\|}$ (the 'normalized gradient' of $f$).
Why are these two definitions equivalent? I am aware of how to get from (ii) to (iii) = 'the middle Betti number of the Milnor fiber', so I would also be happy with an answer relating this to (i).
Any hint or reference would be appreciated.
 A: Let $F$ be the Milnor fiber of the germ of $f$ near $0$. As you have assumed
that $0$ is an isolated critical point, it is known that $F$ is homotopy
equivalent to a wedge sum of spheres $S^{n-1}$. In particular, the cohomology of
$F$ is concentrated in degree $n-1$. Let $\mu'$ be this number.
The question is why this number is equal to the dimension of the artinian
algebra $\mathbb{C}[\![z_1,\ldots,z_n]\!]/J$, where $J$ is the ideal generated
by $\partial f/\partial z_i$, $i=1,2,\ldots,n$.
Note. in your question, you used polynomial ring instead of the power series
ring, which is not correct. The polynomial $f$ may have other critical points
other than $0$, which will contribute to the quotient (if other critical points
are not isolated, the quotient algebra is not finite dimensional). As an
example, check the polynomial $f(x,y)=xy(x+y-1)$. To get the correct answer,
there are some options, you could use: (i) the formal
power series ring as above; or (ii) the ring of germs of analytic functions
around $0$; or (iii) the ring of analytic functions on a small neighborhood $B$ of
$0$ in which there are no other critical points.
Morally, a topological argument goes as follows
(I believe this was Milnor's argument in his book
"singular points of complex hypersurfaces"):
one uses the interpretation (iii) above of the Milnor number $\mu$, and
deforms the function $f$ to $f_{\epsilon}$, such that

*

*the critical points of $f_{\epsilon}$ are at worst double points, and

*the dimension of the artin ring
$\mathcal{O}(B)/(\partial_{i}f_{\epsilon},i=1,2,\ldots,n)$
remains constant.

In this deformation the wedge sum of vanishing spheres "splits" into a disjoint union of spheres,
one for each critical point of $f_{\epsilon}$. Thus, it reduces to proving the theorem
for a Morse critical point, which is obvious.
Another proof, essentially an algebraization of the topological method,
is recorded in EGA 7, Exposé XVI.
Again, one first checks that the theorem holds if
$0$ is an ordinary double point, which is rather straightforward.
The "deformation" step in the topological argument is now replaced
by a "globalization", where one can use global theorems such as Gauss--Bonnet
and Grothendieck--Ogg--Shafarevich.
One can find a morphism
$$
g\colon X \to \mathbb{P}^{1}
$$
where $X$ is a nonsingular projective variety, $g$ a morphism,
such that (SGA 7, Exposé XVI, Proposition 2.5)

*

*$g$ has only isolated critical points,

*each fiber $g^{-1}(t)$ has at most one singular point,

*in the formal completion of one critical point $x_0$
(which is isomorphic to $\mathbb{C}[\![z_1,\ldots,z_n]\!]$)
the expansion of $g$ equals $f$,

*all the critical points other than $x_0$ are ordinary double points.

The construction of such a global model uses some algebraic geometry, but is
not difficult.
Now the upshot is to calculate the Euler characteristic of $X$ by two methods.
First one calculates $\int_X c_n(\Theta_X)$, and gets
(see SGA 7, Exposé XVI, Proposition 2.1)
$$
\chi(X) = \chi(f^{-1}\eta) \chi(\mathbb{P}^1) - (-1)^{n-1}\sum \mu_{x}
$$
where $\eta$ is a generic point of $\mathbb{P}^1$,
$x$ ranges in the set of all critical points of $g$.
On the other hand, we can invoke the Grothendieck--Ogg--Shafarevich formula,
which states
$$
\chi(X) = \chi(f^{-1}\eta) \chi(\mathbb{P}^1) - \sum \Phi_{x} 
$$
where $\Phi_x$ is the Euler characteristic of the "Milnor fiber" around $x$
(i.e., the Euler characteristic of the vanishing cycle complex).
Comparing the two displayed equation, using the condition (4)
and the equality for double points, the desired formula follows.
