Proving a set to be countable












3














A set $S = leftlbrace left( x, y right) vert x^2 + y^2 = dfrac{1}{n^2}, text{ where } n in mathbb{N} text{ and either } x in mathbb{Q} text{ or } y in mathbb{Q} rightrbrace$ is given. I need to prove that this is countable.



I have tried looking for a bijection $f: mathbb{Q} rightarrow S$ as $f left( x right) = left( x, y right)$ where $y$ is a fixed real number such that the property of the set is satisfied.



Clearly, this function is not even a surjection.



How should we define our bijection so that we prove $S$ is countable?










share|cite|improve this question



























    3














    A set $S = leftlbrace left( x, y right) vert x^2 + y^2 = dfrac{1}{n^2}, text{ where } n in mathbb{N} text{ and either } x in mathbb{Q} text{ or } y in mathbb{Q} rightrbrace$ is given. I need to prove that this is countable.



    I have tried looking for a bijection $f: mathbb{Q} rightarrow S$ as $f left( x right) = left( x, y right)$ where $y$ is a fixed real number such that the property of the set is satisfied.



    Clearly, this function is not even a surjection.



    How should we define our bijection so that we prove $S$ is countable?










    share|cite|improve this question

























      3












      3








      3







      A set $S = leftlbrace left( x, y right) vert x^2 + y^2 = dfrac{1}{n^2}, text{ where } n in mathbb{N} text{ and either } x in mathbb{Q} text{ or } y in mathbb{Q} rightrbrace$ is given. I need to prove that this is countable.



      I have tried looking for a bijection $f: mathbb{Q} rightarrow S$ as $f left( x right) = left( x, y right)$ where $y$ is a fixed real number such that the property of the set is satisfied.



      Clearly, this function is not even a surjection.



      How should we define our bijection so that we prove $S$ is countable?










      share|cite|improve this question













      A set $S = leftlbrace left( x, y right) vert x^2 + y^2 = dfrac{1}{n^2}, text{ where } n in mathbb{N} text{ and either } x in mathbb{Q} text{ or } y in mathbb{Q} rightrbrace$ is given. I need to prove that this is countable.



      I have tried looking for a bijection $f: mathbb{Q} rightarrow S$ as $f left( x right) = left( x, y right)$ where $y$ is a fixed real number such that the property of the set is satisfied.



      Clearly, this function is not even a surjection.



      How should we define our bijection so that we prove $S$ is countable?







      real-analysis elementary-set-theory






      share|cite|improve this question













      share|cite|improve this question











      share|cite|improve this question




      share|cite|improve this question










      asked Dec 14 '18 at 4:37









      Aniruddha DeshmukhAniruddha Deshmukh

      934418




      934418






















          2 Answers
          2






          active

          oldest

          votes


















          4














          If you index on $x$ and $n$, you can do the following. Let
          $$
          E_n=mathbb Qcap left[-tfrac1{n^2},tfrac1{n^2}right].
          $$

          This sets $E_n$ are countable, because they are subsets of $mathbb Q$.
          Then $S=S_1cup S_2$, where
          $$
          S_1=bigcup_{ninmathbb N}bigcup_{xin E_n}left{left(x,sqrt{tfrac1{n^2}-x^2}right)right}cupleft{left(x,-sqrt{tfrac1{n^2}-x^2}right)right}
          $$

          $$
          S_2=bigcup_{ninmathbb N}bigcup_{yin E_n}left{left(sqrt{tfrac1{n^2}-y^2},yright)right}cupleft{left(-sqrt{tfrac1{n^2}-y^2},yright)right}
          $$

          We can map this to a subset of $(mathbb Ntimesmathbb Qtimes{1,2})^2$. And this last set is countable, so $S$ is countable.



          The key fact is that subsets of countable sets are countable, and that finite cartesian products of countable sets are countable.






          share|cite|improve this answer























          • The way you have written the union for $S$, only takes into consideration when $x$ is rational and $y$ can be anything. What if it goes the other way round?
            – Aniruddha Deshmukh
            Dec 14 '18 at 4:52










          • Or do you want to say that the final mapping would be $left( x, y right) mapsto left( n, x, 1 right)$ if $x$ is rational and $left( x, y right) mapsto left( n, y, 2 right)$ if $y$ is rational but $x$ is not.
            – Aniruddha Deshmukh
            Dec 14 '18 at 4:53












          • Yes, you are right. I needed to duplicate the sets. It's done now.
            – Martin Argerami
            Dec 14 '18 at 4:58










          • Why are we mapping it to $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)^2$? I think $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)$ should work with the mapping I defined in the comment.
            – Aniruddha Deshmukh
            Dec 14 '18 at 5:00










          • I'm using the 1 and 2 to count the positive and negative roots. There is some overlapping, but it's not a big deal. The maps as you say also work, I think.
            – Martin Argerami
            Dec 14 '18 at 5:04



















          6














          Note that $x^2=frac1{n^2}-y^2$ and $y^2=frac1{n^2}-x^2$. So if $y$ is rational, then $x^2$ is rational as well, and likewise for $y^2$ if $x$ is rational.



          Therefore you can define a surjection from the collection of all roots of rational numbers (which also includes all the rationals). So now comes the question, can you prove that this set is countable?






          share|cite|improve this answer





















            Your Answer





            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("mathjaxEditing", function () {
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            });
            });
            }, "mathjax-editing");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "69"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3038946%2fproving-a-set-to-be-countable%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            4














            If you index on $x$ and $n$, you can do the following. Let
            $$
            E_n=mathbb Qcap left[-tfrac1{n^2},tfrac1{n^2}right].
            $$

            This sets $E_n$ are countable, because they are subsets of $mathbb Q$.
            Then $S=S_1cup S_2$, where
            $$
            S_1=bigcup_{ninmathbb N}bigcup_{xin E_n}left{left(x,sqrt{tfrac1{n^2}-x^2}right)right}cupleft{left(x,-sqrt{tfrac1{n^2}-x^2}right)right}
            $$

            $$
            S_2=bigcup_{ninmathbb N}bigcup_{yin E_n}left{left(sqrt{tfrac1{n^2}-y^2},yright)right}cupleft{left(-sqrt{tfrac1{n^2}-y^2},yright)right}
            $$

            We can map this to a subset of $(mathbb Ntimesmathbb Qtimes{1,2})^2$. And this last set is countable, so $S$ is countable.



            The key fact is that subsets of countable sets are countable, and that finite cartesian products of countable sets are countable.






            share|cite|improve this answer























            • The way you have written the union for $S$, only takes into consideration when $x$ is rational and $y$ can be anything. What if it goes the other way round?
              – Aniruddha Deshmukh
              Dec 14 '18 at 4:52










            • Or do you want to say that the final mapping would be $left( x, y right) mapsto left( n, x, 1 right)$ if $x$ is rational and $left( x, y right) mapsto left( n, y, 2 right)$ if $y$ is rational but $x$ is not.
              – Aniruddha Deshmukh
              Dec 14 '18 at 4:53












            • Yes, you are right. I needed to duplicate the sets. It's done now.
              – Martin Argerami
              Dec 14 '18 at 4:58










            • Why are we mapping it to $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)^2$? I think $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)$ should work with the mapping I defined in the comment.
              – Aniruddha Deshmukh
              Dec 14 '18 at 5:00










            • I'm using the 1 and 2 to count the positive and negative roots. There is some overlapping, but it's not a big deal. The maps as you say also work, I think.
              – Martin Argerami
              Dec 14 '18 at 5:04
















            4














            If you index on $x$ and $n$, you can do the following. Let
            $$
            E_n=mathbb Qcap left[-tfrac1{n^2},tfrac1{n^2}right].
            $$

            This sets $E_n$ are countable, because they are subsets of $mathbb Q$.
            Then $S=S_1cup S_2$, where
            $$
            S_1=bigcup_{ninmathbb N}bigcup_{xin E_n}left{left(x,sqrt{tfrac1{n^2}-x^2}right)right}cupleft{left(x,-sqrt{tfrac1{n^2}-x^2}right)right}
            $$

            $$
            S_2=bigcup_{ninmathbb N}bigcup_{yin E_n}left{left(sqrt{tfrac1{n^2}-y^2},yright)right}cupleft{left(-sqrt{tfrac1{n^2}-y^2},yright)right}
            $$

            We can map this to a subset of $(mathbb Ntimesmathbb Qtimes{1,2})^2$. And this last set is countable, so $S$ is countable.



            The key fact is that subsets of countable sets are countable, and that finite cartesian products of countable sets are countable.






            share|cite|improve this answer























            • The way you have written the union for $S$, only takes into consideration when $x$ is rational and $y$ can be anything. What if it goes the other way round?
              – Aniruddha Deshmukh
              Dec 14 '18 at 4:52










            • Or do you want to say that the final mapping would be $left( x, y right) mapsto left( n, x, 1 right)$ if $x$ is rational and $left( x, y right) mapsto left( n, y, 2 right)$ if $y$ is rational but $x$ is not.
              – Aniruddha Deshmukh
              Dec 14 '18 at 4:53












            • Yes, you are right. I needed to duplicate the sets. It's done now.
              – Martin Argerami
              Dec 14 '18 at 4:58










            • Why are we mapping it to $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)^2$? I think $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)$ should work with the mapping I defined in the comment.
              – Aniruddha Deshmukh
              Dec 14 '18 at 5:00










            • I'm using the 1 and 2 to count the positive and negative roots. There is some overlapping, but it's not a big deal. The maps as you say also work, I think.
              – Martin Argerami
              Dec 14 '18 at 5:04














            4












            4








            4






            If you index on $x$ and $n$, you can do the following. Let
            $$
            E_n=mathbb Qcap left[-tfrac1{n^2},tfrac1{n^2}right].
            $$

            This sets $E_n$ are countable, because they are subsets of $mathbb Q$.
            Then $S=S_1cup S_2$, where
            $$
            S_1=bigcup_{ninmathbb N}bigcup_{xin E_n}left{left(x,sqrt{tfrac1{n^2}-x^2}right)right}cupleft{left(x,-sqrt{tfrac1{n^2}-x^2}right)right}
            $$

            $$
            S_2=bigcup_{ninmathbb N}bigcup_{yin E_n}left{left(sqrt{tfrac1{n^2}-y^2},yright)right}cupleft{left(-sqrt{tfrac1{n^2}-y^2},yright)right}
            $$

            We can map this to a subset of $(mathbb Ntimesmathbb Qtimes{1,2})^2$. And this last set is countable, so $S$ is countable.



            The key fact is that subsets of countable sets are countable, and that finite cartesian products of countable sets are countable.






            share|cite|improve this answer














            If you index on $x$ and $n$, you can do the following. Let
            $$
            E_n=mathbb Qcap left[-tfrac1{n^2},tfrac1{n^2}right].
            $$

            This sets $E_n$ are countable, because they are subsets of $mathbb Q$.
            Then $S=S_1cup S_2$, where
            $$
            S_1=bigcup_{ninmathbb N}bigcup_{xin E_n}left{left(x,sqrt{tfrac1{n^2}-x^2}right)right}cupleft{left(x,-sqrt{tfrac1{n^2}-x^2}right)right}
            $$

            $$
            S_2=bigcup_{ninmathbb N}bigcup_{yin E_n}left{left(sqrt{tfrac1{n^2}-y^2},yright)right}cupleft{left(-sqrt{tfrac1{n^2}-y^2},yright)right}
            $$

            We can map this to a subset of $(mathbb Ntimesmathbb Qtimes{1,2})^2$. And this last set is countable, so $S$ is countable.



            The key fact is that subsets of countable sets are countable, and that finite cartesian products of countable sets are countable.







            share|cite|improve this answer














            share|cite|improve this answer



            share|cite|improve this answer








            edited Dec 14 '18 at 12:15









            Mutantoe

            572412




            572412










            answered Dec 14 '18 at 4:50









            Martin ArgeramiMartin Argerami

            124k1176175




            124k1176175












            • The way you have written the union for $S$, only takes into consideration when $x$ is rational and $y$ can be anything. What if it goes the other way round?
              – Aniruddha Deshmukh
              Dec 14 '18 at 4:52










            • Or do you want to say that the final mapping would be $left( x, y right) mapsto left( n, x, 1 right)$ if $x$ is rational and $left( x, y right) mapsto left( n, y, 2 right)$ if $y$ is rational but $x$ is not.
              – Aniruddha Deshmukh
              Dec 14 '18 at 4:53












            • Yes, you are right. I needed to duplicate the sets. It's done now.
              – Martin Argerami
              Dec 14 '18 at 4:58










            • Why are we mapping it to $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)^2$? I think $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)$ should work with the mapping I defined in the comment.
              – Aniruddha Deshmukh
              Dec 14 '18 at 5:00










            • I'm using the 1 and 2 to count the positive and negative roots. There is some overlapping, but it's not a big deal. The maps as you say also work, I think.
              – Martin Argerami
              Dec 14 '18 at 5:04


















            • The way you have written the union for $S$, only takes into consideration when $x$ is rational and $y$ can be anything. What if it goes the other way round?
              – Aniruddha Deshmukh
              Dec 14 '18 at 4:52










            • Or do you want to say that the final mapping would be $left( x, y right) mapsto left( n, x, 1 right)$ if $x$ is rational and $left( x, y right) mapsto left( n, y, 2 right)$ if $y$ is rational but $x$ is not.
              – Aniruddha Deshmukh
              Dec 14 '18 at 4:53












            • Yes, you are right. I needed to duplicate the sets. It's done now.
              – Martin Argerami
              Dec 14 '18 at 4:58










            • Why are we mapping it to $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)^2$? I think $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)$ should work with the mapping I defined in the comment.
              – Aniruddha Deshmukh
              Dec 14 '18 at 5:00










            • I'm using the 1 and 2 to count the positive and negative roots. There is some overlapping, but it's not a big deal. The maps as you say also work, I think.
              – Martin Argerami
              Dec 14 '18 at 5:04
















            The way you have written the union for $S$, only takes into consideration when $x$ is rational and $y$ can be anything. What if it goes the other way round?
            – Aniruddha Deshmukh
            Dec 14 '18 at 4:52




            The way you have written the union for $S$, only takes into consideration when $x$ is rational and $y$ can be anything. What if it goes the other way round?
            – Aniruddha Deshmukh
            Dec 14 '18 at 4:52












            Or do you want to say that the final mapping would be $left( x, y right) mapsto left( n, x, 1 right)$ if $x$ is rational and $left( x, y right) mapsto left( n, y, 2 right)$ if $y$ is rational but $x$ is not.
            – Aniruddha Deshmukh
            Dec 14 '18 at 4:53






            Or do you want to say that the final mapping would be $left( x, y right) mapsto left( n, x, 1 right)$ if $x$ is rational and $left( x, y right) mapsto left( n, y, 2 right)$ if $y$ is rational but $x$ is not.
            – Aniruddha Deshmukh
            Dec 14 '18 at 4:53














            Yes, you are right. I needed to duplicate the sets. It's done now.
            – Martin Argerami
            Dec 14 '18 at 4:58




            Yes, you are right. I needed to duplicate the sets. It's done now.
            – Martin Argerami
            Dec 14 '18 at 4:58












            Why are we mapping it to $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)^2$? I think $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)$ should work with the mapping I defined in the comment.
            – Aniruddha Deshmukh
            Dec 14 '18 at 5:00




            Why are we mapping it to $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)^2$? I think $left( mathbb{N} times mathbb{Q} times leftlbrace 1, 2 rightrbrace right)$ should work with the mapping I defined in the comment.
            – Aniruddha Deshmukh
            Dec 14 '18 at 5:00












            I'm using the 1 and 2 to count the positive and negative roots. There is some overlapping, but it's not a big deal. The maps as you say also work, I think.
            – Martin Argerami
            Dec 14 '18 at 5:04




            I'm using the 1 and 2 to count the positive and negative roots. There is some overlapping, but it's not a big deal. The maps as you say also work, I think.
            – Martin Argerami
            Dec 14 '18 at 5:04











            6














            Note that $x^2=frac1{n^2}-y^2$ and $y^2=frac1{n^2}-x^2$. So if $y$ is rational, then $x^2$ is rational as well, and likewise for $y^2$ if $x$ is rational.



            Therefore you can define a surjection from the collection of all roots of rational numbers (which also includes all the rationals). So now comes the question, can you prove that this set is countable?






            share|cite|improve this answer


























              6














              Note that $x^2=frac1{n^2}-y^2$ and $y^2=frac1{n^2}-x^2$. So if $y$ is rational, then $x^2$ is rational as well, and likewise for $y^2$ if $x$ is rational.



              Therefore you can define a surjection from the collection of all roots of rational numbers (which also includes all the rationals). So now comes the question, can you prove that this set is countable?






              share|cite|improve this answer
























                6












                6








                6






                Note that $x^2=frac1{n^2}-y^2$ and $y^2=frac1{n^2}-x^2$. So if $y$ is rational, then $x^2$ is rational as well, and likewise for $y^2$ if $x$ is rational.



                Therefore you can define a surjection from the collection of all roots of rational numbers (which also includes all the rationals). So now comes the question, can you prove that this set is countable?






                share|cite|improve this answer












                Note that $x^2=frac1{n^2}-y^2$ and $y^2=frac1{n^2}-x^2$. So if $y$ is rational, then $x^2$ is rational as well, and likewise for $y^2$ if $x$ is rational.



                Therefore you can define a surjection from the collection of all roots of rational numbers (which also includes all the rationals). So now comes the question, can you prove that this set is countable?







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Dec 14 '18 at 4:46









                Asaf KaragilaAsaf Karagila

                302k32427757




                302k32427757






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Mathematics Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    Use MathJax to format equations. MathJax reference.


                    To learn more, see our tips on writing great answers.





                    Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                    Please pay close attention to the following guidance:


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3038946%2fproving-a-set-to-be-countable%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Plaza Victoria

                    In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                    How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...