The following is a lemma in Just/Weese on page 179:

Lemma 17: Let $\kappa$ be an infinite cardinal. Then $\kappa$ is singular iff there exist an $\alpha < \kappa$ and a set of cardinals $\{\kappa_\xi : \xi < \alpha \}$ such that $\kappa_\xi < \kappa$ for every $\xi < \alpha$ and $\kappa = \sum_{\xi < \alpha}\kappa_\xi$.

I think the following constitutes a proof of the $\implies$ direction, can you please tell me where it's wrong? Thank you!

Let $\alpha = \mathrm{cf}(\kappa) < \kappa$. Then by a previous exercise (23 (f)) there exists a strictly increasing function $f: \alpha \to \kappa$ such that the range of $f$ is cofinal in $\kappa$. Now for $\xi < \alpha$ define $\kappa_\xi = |f(\xi)|$. Now we want to show that $\kappa = \sum_{\xi < \alpha}\kappa_\xi$. To see this observe that "$\ge$" immediately follows from theorem 14 on the same page.

The part I need you to check starts here:

To show $\le$, assume that we have strict inequality $\sum_{\xi < \alpha}\kappa_\xi < \kappa$. We distinguish two cases: $\kappa$ is either an infinite successor cardinal or a limit cardinal. If $\kappa = \left ( \sum_{\xi < \alpha}\kappa_\xi \right )^+$ is an infinite successor cardinal then by corollary 15 (on the same page) $\kappa$ cannot be the union of fewer than $\kappa$ sets each of which has cardinality less than $\kappa$. But $\bigcup_{\xi < \alpha}f(\xi) = f[\alpha] = \kappa$ where $|f(\xi)| = \kappa_\xi < \kappa$ and $\alpha < \kappa$ which would be a contradiction. Hence $\kappa$ must be a limit cardinal so that there exists a cardinal $\eta$ with $\sum_{\xi < \alpha}\kappa_\xi < \eta < \kappa$. But $f$ is cofinal in $\kappa$ hence there is $\xi$ such that $f(\xi) \ge \eta$. Then $\kappa_\xi = |f(\xi)| \ge \eta$. Which is a contradiction.

We have:

And also, the reason why I am asking this question: in the proof in the book, $\kappa_\xi$ are defined as $\kappa_\xi = \left | f(\xi) \setminus \sum_{\eta < \xi} f(\eta) \right |$.

-
$\bigcup_{\xi<\alpha}f(\xi)=f(\alpha)=\kappa$ doesn’t make sense, since $\alpha\notin\operatorname{dom}f$. And how do you get from $\kappa$ being a limit cardinal to the existence of an $\eta$ such that $\sum_{\xi<\alpha}\kappa_\xi<\eta<\kappa$? You know that the sum is $\kappa$. –  Brian M. Scott Dec 15 '12 at 11:44
@BrianM.Scott But if $f: X \to Y$ is a function why can't I write $f(X)$ to mean the image of $f$? In any case: I think this points out one idiotic mistake: $f$ isn't surjective so that $f(\alpha)$ is not necessarily $\kappa$. –  Rudy the Reindeer Dec 15 '12 at 11:48
The definition $\kappa_\xi =\left | f(\xi)\setminus\sum_{\eta <\xi}f(\eta)\right |$ has the virtue of chopping $\kappa$ into disjoint pieces and taking their cardinalities. –  Brian M. Scott Dec 15 '12 at 11:50
If you want $\{f(\xi):\xi\in\alpha\}$, write $f[\alpha]$ to avoid ambiguity. –  Brian M. Scott Dec 15 '12 at 11:51
You’re right: I was temporarily confused when I wrote that about what you’d assumed at that point. –  Brian M. Scott Dec 15 '12 at 13:30

There is nothing wrong with your proof, except that "$\bigcup_{\xi < \alpha}f(\xi) = f[\alpha] = \kappa$" should be "$\bigcup_{\xi < \alpha}f(\xi) = \sup(f[\alpha]) = \kappa$."
However, a proof using $\kappa_\xi = \left | f(\xi) \setminus \sum_{\eta < \xi} f(\eta) \right |$ may have the advantages of not splitting into cases, and of not requiring the Axiom of Choice in successor cases. (Without AC, successor cardinals may be singular.)