I'm trying to solve this problem, which appears in Schimmerling's "A Course in Set Theory."
Problem. Find two functions
$$f:\omega\rightarrow\omega\cdot2$$
and
$$g:\omega\cdot2\rightarrow\omega\cdot3$$
such that $\sup\{f(\omega)\}=\omega\cdot2$ and $\sup\{g(\omega\cdot2)\}=\omega\cdot3$, but if $h=g\circ f$, then $\sup\{h(\omega)\}<\omega\cdot3$.
Setting $f(n)=n\cdot2=n+n$ for all $n<\omega$, as well as
\begin{aligned} g(m) & = m & \text{if $m<\omega$}\\ g(m) & = \omega+\omega +m & \text{otherwise} \end{aligned}
it seems that $g\circ f(n)=g(n\cdot2)=n\cdot2$ (since $n\cdot2<\omega~~\forall n<\omega$). Thus it follows that $\sup\{g\circ f(\omega)\}=\omega\cdot2<\omega\cdot3$.
So far so good. But it turns out that the next exercise requires us to show the following.
Theorem. Let $\kappa<\lambda<\mu$ be three limit ordinals and
$$f:\kappa\rightarrow\lambda$$
and
$$g:\lambda\rightarrow\mu.$$
Suppose $\sup\{f(\kappa)\}=\lambda$ and $\sup\{g(\lambda)\}=\mu$, and that $g$ is nondecreasing, i.e., if $\alpha\le\beta<\lambda$ then $g(\alpha)\le g(\beta)$. Then letting $h=g\circ f$ we must have $\sup\{h(\kappa)\}=\mu$.
It now seems that my construction for the first problem is a counterexample to the theorem to be proved in the second. Could someone explain to me the loophole in my argument? Thanks!
The main problem is that your first example doesn’t work: $f[\omega]$ isn’t cofinal in $\omega\cdot 2$. In fact $\sup f[\omega]=\omega$. Note that the theorem requires $g$ to be non-decreasing; this suggests that in the first problem you should look for functions $f$ and $g$ such that $g$ is not non-decreasing. Here’s one possibility: let $f(n)=\omega+n$, and then let
$$g(\alpha)=\begin{cases} \omega\cdot 2+\alpha,&\text{if }\alpha<\omega\\ 0,&\text{if }\alpha\ge\omega\;. \end{cases}$$
If you want to make $g$ injective, let $g(\omega+n)=n$ for $n\in\omega$.