1

How do I construct an injection from rational numbers $\mathbb{Q}$ to integers $\mathbb{Z}$? I need to write a proof and I'm not sure how to format it.

fadsfsa
  • 21
  • @JMoravitz, not really a duplicate because it is easier to find an injection than a bijection. – lhf Apr 28 '18 at 17:30
  • 1
    @lhf most of the answers there and down the rabbit hole of links from that page just briefly say "An injection from $\Bbb Z$ to $\Bbb Q$ is obvious" and go on to describe an injection in the other direction without bothering to build an explicit bijection. – JMoravitz Apr 28 '18 at 17:33
  • 1
    @ihf the other question doesn’t ask for an explicit bijection , it asks to prove the rationals are countable and proving the existence of an injection from an infinite set to a countable set is sufficient to conclude the existence of a bijection, as noted in the first comment on the other question – Prince M Apr 28 '18 at 18:06

1 Answers1

0

Write $q \in \mathbb Q$ as $s \frac ab$, where $s=\pm 1$ and $a,b \in \mathbb N$ coprime. Then send $q$ to $s 2^a 3^b$.

lhf
  • 216,483