# Definition of a one-to-one correspondence

I'm currently reading "Naive Set Theory" by P.H. Halmos and I got confused with an exposition in the middle of the text. Here it is:

"If $f$ is an arbitrary function, from $X$ onto $Y$, then there is a natural way of defining an equivalence relation $R$ in $X$; write $aRb$ (where $a$ and $b$ are in $X$) in case $f(a)= f(b)$. For each element $y$ of $Y$, let $g(y)$ be the set of all those elements $x$ in $X$ for which $f(x)=y$. The definition of $R$ implies that $g(y)$ is, for each $y$, an equivalence class of the relation $R$; in other words, $g$ is a function from $Y$ onto the set $X/R$ of all equivalence classes of $R$."

Right after that he states that $g$ is a one-to-one correspondence.

As an example of this construction I tried $f: X \to Y$, $f(x)= x^{2}$, with $X=\{-3, -2, 2, 3\}$ and $Y=\{4, 9, 11\}$. In this case: $$R=\{(-3, -3), (-3, 3), (3,3), (3, -3), (-2, -2), (-2, 2), (2, 2), (2, -2)\}$$ and $$X/R=\{\{-3, 3\}, \{-2, 2\}\}.$$ And for each element $y$ in $Y$, $$g(4)=\{-2, 2\};$$ $$g(9)=\{-3, 3\};$$ $$g(11)=\{\}.$$ But then, $g(11)=\{\} \notin X/R$, when $g(11)$ should be an equivalence class of $R$.

Probably there's some gross mistake above. I'd appreciate if someone could point it to me. Thanks!

-

The text states that $f$ is a function from $X$ onto $Y$. This means that for every $y\in Y$, there is at least one $x\in X$ such that $f(x)=y$. The function you gave is not onto, hence the failure of the claim.
"$f$ is an arbitrary function, from $X$ onto $Y$"
The word onto means that $f$ is surjective, and hence why your counterexample fails.