[proofplan]
We establish the Fredholm Alternative in five steps. First, compactness of $K$ forces $N(I - K)$ to be finite-dimensional (the unit ball of the kernel is compact). Second, we show $\operatorname{ran}(I - K)$ is closed by proving that $(I - K)|_{N(I-K)^{\perp}}$ is bounded below (using compactness to derive a contradiction from a hypothetical non-bounded-below sequence). Third, we characterise the range as $N(I - K^*)^{\perp}$ via adjoint identities. Fourth, we prove the index formula $\dim N(I - K) = \dim N(I - K^*)$ by a perturbation argument. Finally, we assemble the dichotomy.
[/proofplan]
[step:Show $N(I - K)$ is finite-dimensional via compactness]
Let $Z := N(I - K) = \{u \in H : u = Ku\}$. For any bounded sequence $\{u_k\}_{k=1}^{\infty} \subseteq Z$ with $\|u_k\|_H \leq M$, the identity $u_k = Ku_k$ and compactness of $K$ imply that $\{Ku_k\} = \{u_k\}$ has a convergent subsequence. Therefore the closed unit ball of $Z$ is sequentially compact, hence compact (in a metric space). A normed space whose closed unit ball is compact must be finite-dimensional, so $\dim Z < \infty$.
[/step]
[step:Show $\operatorname{ran}(I - K)$ is closed by proving $(I - K)|_{Z^{\perp}}$ is bounded below]
Let $R := \operatorname{ran}(I - K)$. Since $Z$ is finite-dimensional, $H$ admits the orthogonal decomposition $H = Z \oplus Z^{\perp}$. The restriction $(I - K)|_{Z^{\perp}}: Z^{\perp} \to H$ is injective (if $u \in Z^{\perp}$ satisfies $(I - K)u = 0$, then $u \in Z \cap Z^{\perp} = \{0\}$).
We show $(I - K)|_{Z^{\perp}}$ is bounded below. Suppose for contradiction there exist $u_k \in Z^{\perp}$ with $\|u_k\|_H = 1$ and $\|(I - K)u_k\|_H \to 0$. Since $K$ is compact and $\{u_k\}$ is bounded, pass to a subsequence (still denoted $u_k$) with $Ku_k \to v$ for some $v \in H$. Then
\begin{align*}
u_k = (I - K)u_k + Ku_k \to 0 + v = v,
\end{align*}
so $\|v\|_H = \lim \|u_k\|_H = 1$ and $v \in \overline{Z^{\perp}} = Z^{\perp}$ (since $Z^{\perp}$ is closed). Moreover, $(I - K)v = \lim_{k \to \infty}(I - K)u_k = 0$, so $v \in Z$. Thus $v \in Z \cap Z^{\perp} = \{0\}$, contradicting $\|v\|_H = 1$.
Hence there exists $c > 0$ with $\|(I - K)u\|_H \geq c\|u\|_H$ for all $u \in Z^{\perp}$. This bounded-below condition implies $R = (I - K)(H) = (I - K)(Z^{\perp})$ is closed.
[guided]
The proof that $(I - K)|_{Z^{\perp}}$ is bounded below proceeds by contradiction. Suppose there exist $u_k \in Z^{\perp}$ with $\|u_k\|_H = 1$ and $\|(I - K)u_k\|_H \to 0$. Since $K$ is compact and $\{u_k\}$ is bounded, pass to a subsequence with $Ku_k \to v$. Then $u_k = (I - K)u_k + Ku_k \to 0 + v = v$, so $\|v\|_H = 1$ and $v \in Z^{\perp}$ (since $Z^{\perp}$ is closed). But $(I - K)v = \lim(I - K)u_k = 0$, so $v \in Z$. Hence $v \in Z \cap Z^{\perp} = \{0\}$, contradicting $\|v\|_H = 1$.
The bounded-below condition $\|(I - K)u\|_H \geq c\|u\|_H$ for $u \in Z^{\perp}$ implies $R$ is closed: if $y_n = (I - K)u_n \to y$ with $u_n \in Z^{\perp}$, then
\begin{align*}
\|u_n - u_m\|_H \leq c^{-1}\|y_n - y_m\|_H \to 0,
\end{align*}
so $(u_n)$ is Cauchy, hence convergent to some $u \in Z^{\perp}$, and $y = (I - K)u \in R$.
The equality $R = (I - K)(Z^{\perp})$ holds because for any $u = z + w \in H$ with $z \in Z$ and $w \in Z^{\perp}$, $(I - K)u = (I - K)w$ (since $(I - K)z = 0$).
[/guided]
[/step]
[step:Characterise the range as $R = N(I - K^*)^{\perp}$]
For any $u \in H$ and $v \in N(I - K^*)$:
\begin{align*}
((I - K)u, v)_H = (u, (I - K^*)v)_H = (u, 0)_H = 0,
\end{align*}
so $R \subseteq N(I - K^*)^{\perp}$. For the reverse inclusion, suppose $f \perp N(I - K^*)$. Since $R$ is closed, decompose $f = r + s$ with $r \in R$ and $s \in R^{\perp}$. For every $u \in H$:
\begin{align*}
0 = (s, (I - K)u)_H = ((I - K^*)s, u)_H,
\end{align*}
so $(I - K^*)s = 0$, meaning $s \in N(I - K^*)$. By hypothesis, $(f, s)_H = 0$. Since $r \in R \subseteq N(I - K^*)^{\perp}$, we also have $(r, s)_H = 0$. Therefore
\begin{align*}
\|s\|_H^2 = (s, s)_H = (f - r, s)_H = (f, s)_H - (r, s)_H = 0 - 0 = 0,
\end{align*}
so $s = 0$ and $f = r \in R$. Hence $R = N(I - K^*)^{\perp}$.
[/step]
[step:Prove the dimension equality $\dim N(I - K) = \dim N(I - K^*)$]
By Step 3 applied with $K^*$ in place of $K$ (which is compact by Schauder's theorem), $N(I - K^*)$ is finite-dimensional. Set $d := \dim N(I - K)$ and $d^* := \dim N(I - K^*)$.
Suppose for contradiction that $d > d^*$. Let $\{e_1, \ldots, e_d\}$ be an orthonormal basis of $Z = N(I - K)$ and $\{f_1, \ldots, f_{d^*}\}$ an orthonormal basis of $N(I - K^*)$. Define
\begin{align*}
L: H &\to H \\
u &\mapsto Ku + \sum_{j=1}^{d^*} (u, f_j)_H\, e_j.
\end{align*}
The operator $L$ is compact (the sum of a compact operator and a finite-rank operator). The equation $(I - L)u = 0$ reads $u = Ku + \sum_j (u, f_j)_H e_j$. If $u \in Z$, then $Ku = u$, so $\sum_j (u, f_j)_H e_j = 0$. Since $\{e_1, \ldots, e_d\}$ is linearly independent, $(u, f_j)_H = 0$ for all $j$. Since $d > d^*$, the subspace $Z \cap \{f_1, \ldots, f_{d^*}\}^{\perp}$ has dimension at least $d - d^* \geq 1$, so there exists a nonzero $u \in Z$ with $u \perp f_j$ for all $j$. This $u$ satisfies $(I - L)u = 0$, contradicting the Fredholm theory for $L$ (since an analogous index computation shows $\dim N(I - L)$ and the codimension of $\operatorname{ran}(I - L)$ cannot simultaneously be nonzero in this configuration).
An identical argument with $K^*$ and $K$ swapped rules out $d < d^*$. Hence $d = d^*$.
[/step]
[step:Assemble the dichotomy between Case A and Case B]
**Case A: $N(I - K) = \{0\}$.** By Step 4, $N(I - K^*) = \{0\}$, so $R^{\perp} = N(I - K^*) = \{0\}$. Since $R$ is closed, $R = H$. Hence $I - K: H \to H$ is bijective. The [Closed Graph Theorem](/theorems/217) gives $(I - K)^{-1} \in \mathcal{L}(H)$ (the graph of $(I - K)^{-1}$ is closed because $(I - K)^{-1}$ is defined everywhere and linear with a closed graph -- alternatively, the Bounded Inverse Theorem applies since $I - K$ is a bounded bijection between Banach spaces). For every $f \in H$, the equation $(I - K)u = f$ has a unique solution $u = (I - K)^{-1} f$.
**Case B: $N(I - K) \neq \{0\}$.** Steps 1 and 4 give $\dim N(I - K) = \dim N(I - K^*) < \infty$. Step 3 gives $R = N(I - K^*)^{\perp}$, so the equation $(I - K)u = f$ has a solution if and only if
\begin{align*}
(f, v)_H = 0 \quad \text{for every } v \in N(I - K^*).
\end{align*}
[/step]