How would you go about creating a function that maps these sets? I understand that it exists and why it exists but I can't think of a way to accurately represent the function. Any help is appreciated.
-
The question was not exactly the same but in the first answer you can see a bijection between $\mathbb{Z}$ and $\mathbb{Q}$. – Mark Jul 23 '19 at 00:02
-
Easiest is to create injections in the two directions, then use the construction for the Schröder-Bernstein theorem. https://en.wikipedia.org/wiki/Schröder–Bernstein_theorem – GEdgar Jul 23 '19 at 00:05
-
"I understand that it exists and why it exists" Why does it exist? If you can explain why, you may get it. The standard is to muck around with a diangonal path between $\mathbb Q\to \mathbb N \times \mathbb N\to\mathbb N \to \mathbb Z$ via $\frac ab\to (a,b)\to$ number of steps to weave to $(a,b)$by following diagonals via taking sums$\to $ some manipulations to alternate negs and positive, and omit the ones where $\gcd(a,b)\ne 1$. – fleablood Jul 23 '19 at 00:19
-
Thank you all very much for your responses. They definitely help get me there! – learntomath Jul 23 '19 at 02:13
-
I think that the linked question in the comment of @Mark is pretty much exactly the same: instead of asking to "accurately represent the function" it asks to "produce an explicit formula for a bijection". Voting to close as a duplicate. – Lee Mosher Jul 23 '19 at 15:20
1 Answers
Bear with me. This one will be weird.
If $q\in \mathbb Q$ then either $q = 0$ or there are $a,b\in \mathbb N$ so that $q =\pm \frac ab$ and $\gcd(a,b) = 1$.
Now if $q=\pm ab\ne 0$, $a,b> 0$ then $a,b$ have unique prime factorizations and because $\gcd(a,b) =1$ then have no prime terms in common.
Let $a =\prod p_i^{k_i}$ and $b= \prod q_j^{m_j}$ be those prime factors.
Map $\pm \frac{\prod p_i^{k_i}}{\prod q_j^{m_j}}\mapsto \pm\prod p_i^{2k_i}q_j^{2m_j - 1}$.
And map $0 \mapsto 0$.
That'll do it. Because every positive non-zero integer has a unique prime factorization there is a positive rational that maps to it. And because $a,b$ share no factors in common and the factorizations of $a,b$ are unique each different rational is mapped to different integer.
Negative integers map from unique negative rationals as they are just negative "reflections" of their positive counterparts.
And $0$ maps to and and is the only rational that maps to $0$.
- 124,253
-
-
It's not the standard. The standard is the diagonal argument where you draw a grid and travel the diagonals one by one. – fleablood Jul 23 '19 at 02:31
-
I think you need to map $0$ to $0$ explicitly. Nice argument though. – Mitchell Spector Jul 23 '19 at 14:38
-