5

I am stuck on understanding the solution of the (b)-part of this problem for quiet some time now. The (a)-part was very easy to solve. I still include the (a)-part, because Spivak uses it to solve the (b)-part.

(a) Suppose $g=h \circ f$. Prove that if $f(x)=f(y)$, then g(x)=g(y).

Solution: Let $f(x)=f(y)$, then $g(x)=h(f(x))=h(f(y))=g(y)$.

(b) Conversely, suppose that $f$ and $g$ are two functions such that $g(x)=g(y)$ whenever $f(x)=f(y)$. Prove that $g=h \circ f$ for some function h. Hint: Just try to define $h(z)$ when $z$ is of the form $z=f(x)$ (these are the only $z$ that matter) and use the hypothesis to show that your definition will not run into trouble.

I could not find a solution for this problem and looked up Spivak's solution which reads as follows:

(b) If $z=f(x)$, define $h(z)=g(x)$. This definition makes sense, because if $z=f(x')$, then $g(x)=g(x')$ by part (a). For $z$ not of the form $f(x)$, define $h$ any old way (or leave it undefined). Then for all $x$ in the domain of $f$ we have $g(x)=h(f(x))$.

Somehow, I find this very confusing and it seems to me that the thinking behind this proof is almost identical with the solution of the (a)-part (first suppose that $g=h \circ f$ and then let $g(x)=g(y)$ whenever $f(x)=f(y)$ to show that $g=h \circ f$ which would be absurd).

What am I missing? Why does Spivak's proof work?

  • 1
    Hint: in (b) you need to define the function $h$ in terms of $f$ and $g$, so this is quite different from (a) where $f$, $g$ and $h$ are all given. To understand Spivak's solutionto (b) better, try it out on an example. E.g., take $f, g : \Bbb{R} \to \Bbb{R}$ defined by $f(x) = 1 + x$ and $g(x) = 2 + x^3$. – Rob Arthan Aug 17 '20 at 22:53
  • Thank you very much! Does it follow from that, that $h:z\mapsto h(z)$ for all $z \in \mathbb{R}$ has to be injective for all $z \in f(\mathbb{R})$? – Carlevaro99 Aug 18 '20 at 13:54
  • No: take $g(x) = 0$ and $f(x) = x$, for all $x$. Then $h$ has to be equal to $g$ which is not injective on the range of $f$. – Rob Arthan Aug 18 '20 at 14:18
  • @RobArthan What about numbers that might be in the domain of $g$ but not $f$? From Spivak's hypotheses it seems we're only able to prove $g = h \circ f$ over the part of the domain of $g$ that is shared by $f$. – Ben Aug 25 '22 at 16:46
  • 1
    @Ben: Spivak's statement and proof as quoted here are indeed a bit loose about what the domain of $f$ and $g$ are intended to be. I suspect that Spivak may have meant the assumption "$g(x) = g(y)$ whenever $f(x) = f(y)$" to imply that the domains are the same, but that is not very compelling unless you read "iff" for "whenever". – Rob Arthan Aug 25 '22 at 20:30

0 Answers0