On Fredholm operator on Hilbert spaces Let $u: H \to H'$ be a continuous linear operator and $H,H'$ be Hilbert spaces. Let $u^\ast$ denotes its adjoint. 
By definition, an operator $u$ is called Fredholm if and only if $\ker u$ has finite dimension and $\mathrm{im}(u)$ has finite codimension.
My book states that
"...$u$ is Fredholm if and only if $u(H)$ is closed and $\ker u$ and $\ker u^\ast$ are both finite dimensional"
I am not sure but I beleive that closedness of $u(H)$ is redundant, that is, the following is true:
$u$ is Fredholm if and only if $\ker u$ and $\ker u^\ast$ are finite-dimensional.
My proof:
$\implies$: If $u$ is Fredholm then by definition $\ker u$ is finite dimensional. Also, $(u(H))^\bot =\ker u^\ast$. If $V$ is a vector space and $U$ a subspace then the dimension of all complements of $U$ are equal, in particular, equal to the orthogonal complement. Hence $\ker u^\ast$ is finite dimensional. 
$\Longleftarrow$: Let $\ker u$ and $\ker u^\ast$ be finite dimensional. By the same argument as before, $u(H)$ has finite codimension. Since $\ker u$ is finite dimensional it follows that $u$ is Fredholm.

Where is the mistake in my proof? What am I missing here?

 A: The problem is that "$u(H)^\perp$ has finite dimension" does not imply "$u(H)$ has finite codimension".
"Codimension" is meant in the algebraic sense.  For a (not necessarily closed) linear subspace $E \subset H$, "$E$ has finite codimension" means (among other equivalent definitions) "there exists a finite dimensional subspace $F \subset H$ such that for every $x \in H$, there exist unique $y \in E$, $z \in F$ such that $x=y+z$".  In other words, $H = E \oplus F$ as a direct sum of vector spaces.
Let's consider the example I gave in my comment: $H = L^2((0,1))$ (it's simpler if we leave off the endpoints) and $u$ defined by $(uf)(x) = xf(x)$.  Note that $u$ is injective since if $uf = 0$ we have $x f(x) = 0$ and hence $f(x) = 0$ for almost every $x \in (0,1)$.  So $\ker u = 0$ which is finite dimensional.
It's easy to check that $u$ is self-adjoint, so we have $\ker u^* = \ker u = 0$ as well.
Also, we can see directly that $u(H)^\perp = 0$.  Suppose $g \in u(H)^\perp$; then in particular $\langle ug, g \rangle = 0$.  This says that $\int_0^1 x g(x)^2\,dx = 0$, so that $x g(x)^2 = 0$ and hence $g(x) = 0$ almost everywhere.
But $u(H)$ has infinite codimension.  For $0 < p < 1/2$, let $f_p(x) = x^{-p}$.  Note that $f_p \notin u(H)$ since if we had $u g_p = f_p$, we would have to have $g_p(x) = x^{-p-1}$ almost everywhere; but those functions are not in $L^2((0,1))$.  Moreover, the uncountable set of functions $\{f_p\}$ is linearly independent.  So if we let $F$ be the linear span of all the $\{f_p\}$, then $F$ has infinite (even uncountable) dimension and $u(H) \cap F = 0$; the codimension of $u(H)$ is infinite (even uncountable).
So for this operator $u$, we have that $\ker u$ and $\ker u^*$ are both finite dimensional (actually zero dimensional) but $u$ is not Fredholm.
Another way to think about the issue is that the orthogonal complement $E^\perp$ is not in general an algebraic complement of $E$; it's an algebraic complement of the closure of $E$.  (You may be confused since in finite dimensions, $E^\perp$ is an algebraic complement of $E$; but in finite dimensions all linear subspaces are closed.)  In particular, having $E^\perp = 0$ does not imply $E = H$; it only implies that $E$ is dense in $H$, but dense subspaces can still have large codimension.
As a final remark, it is not true in general that a linear subspace $E$ with finite codimension is closed (consider the kernel of a discontinuous linear functional, which has codimension 1).  However, it is true in the special case that $E$ is the image of a continuous operator on a complete space.
A: Although your proof is not right, your statement that closedness of u(H) is redundant in the definition of Fredholm operator is true, in that 

$H/uH$ is finite-dimensional implies $uH$ is closed.

Proof. Suppose that $[e_1],\cdots,[e_n]$ is a basis of $H/uH$, and $H_0=\operatorname{span}\{e_1,\cdots,e_n\}\subset H.$ Then $H=uH\oplus H_0$.($e_1,\cdots,e_n\notin uH$, so $H_0\cap uH=\{0\};$ for any $h\in  H$, suppose $[h]=k_1[e_1]+\cdots+ k_n[e_n]$, then $h-k_1e_1-\cdots-k_ne_n\in uH$ because $[h-k_1e_1-\cdots-k_ne_n]=[h]-[h]=0$, thus $H=uH+H_0$.)
Let $\Phi: H/\ker u\times H_0\to H(=uH\oplus H_0), (h+\ker u,k)\mapsto uh+k$, then $\Phi$ is a continuous linear bijection: 
(1)$\Phi$ is well-defined. If $(h+\ker u, k)=(h'+\ker u, k')$, then $h-h'\in \ker u$ and $k=k'$, so $u(h)+k=u(h')+k'$.
(2)$\Phi$ is injective. If $h\in H$ and $k\in H_0$ satisfy $uh+k=0$, then $uh=0$ and $k=0$ for $H=uH\oplus H_0$, i.e., $(h+\ker u,k)=0$
(3)$\Phi$ is surjective. Of course.
Since that $H_0$ is finite-dimensional, $H/\ker u\oplus H_0$ is a Banach space, so we can apply the Open Mapping Theorem to $\Phi$, $\Phi$ has a continuous linear invert $\Phi^{-1}$, and thus is bounded below. Hence $uH=\Phi(H/\ker u\times \{0\})$ is closed.
