Jump to content

Countable set: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
lead: simplify grammar
m c/e: comma splice
 
(45 intermediate revisions by 20 users not shown)
Line 1: Line 1:
{{Short description|Mathematical set that can be enumerated}}
{{hatnote group|
{{Redirect|Countable|the linguistic concept|Count noun|the statistical concept|Count data|the company|Countable (app)}}
{{Redirect|Countable|the linguistic concept|Count noun|the statistical concept|Count data|the company|Countable (app)}}
{{distinguish|text= [[recursively enumerable set|(recursively) enumerable sets]]}}
{{distinguish|text= [[recursively enumerable set|(recursively) enumerable sets]]}}
}}
{{Short description|Mathematical set that can be enumerated}}
In [[mathematics]], a [[Set (mathematics)|set]] is '''countable''' if it has the same [[cardinality]] (the [[cardinal number|number]] of elements of the set) as some [[subset]] of the set of [[natural number]]s '''N''' = {0, 1, 2, 3, ...}. Equivalently, a set ''S'' is ''countable'' if there exists an [[injective function]] ''f'' : ''S'' '''N''' from ''S'' to '''N'''; it simply means that every element in ''S'' corresponds to a different element in '''N'''.
In [[mathematics]], a [[Set (mathematics)|set]] is '''countable''' if either it is [[finite set|finite]] or it can be made in [[one to one correspondence]] with the set of [[natural number]]s.{{efn|name=ZeroN}} Equivalently, a set is ''countable'' if there exists an [[injective function]] from it into the natural numbers; this means that each element in the set may be associated to a unique natural number, or that the elements of the set can be counted one at a time, although the counting may never finish due to an infinite number of elements.


In more technical terms, assuming the [[axiom of countable choice]], a set is ''countable'' if its [[cardinality]] (the number of elements of the set) is not greater than that of the natural numbers. A countable set that is not finite is said to be '''countably infinite'''.
A countable set is either a [[finite set]] or a '''countably infinite''' set. Whether finite or infinite, the elements of a countable set can always be counted one at a time and — although the counting may never finish due to the infinite number of the elements to be counted — every element of the set is associated with a unique natural number.


[[Georg Cantor]] introduced the concept of countable sets, contrasting sets that are countable with those that are [[uncountable set|uncountable]]. Today, countable sets form the foundation of a branch of mathematics called [[discrete mathematics]].
The concept is attributed to [[Georg Cantor]], who proved the existence of [[uncountable set]]s, that is, sets that are not countable; for example the set of the [[real number]]s.


==A note on terminology {{anchor|Terminology}}==
==A note on terminology <span class="anchor" id="Terminology"></span>==
Although the terms "countable" and "countably infinite" as defined here are quite common, the terminology is not universal.<ref>{{cite book |last1=Manetti |first1=Marco |title=Topology |date=19 June 2015 |publisher=Springer |isbn=978-3-319-16958-3 |page=26 |url=https://www.google.com/books/edition/Topology/89zyCQAAQBAJ?hl=en&gbpv=1&pg=PA26 |language=en}}</ref> An alternative style uses ''countable'' to mean what is here called countably infinite, and ''at most countable'' to mean what is here called countable.<ref name="Rudin">{{Harvard citation no brackets|Rudin|1976|loc=Chapter 2}}</ref><ref>{{harvnb|Tao|2016|181}}</ref> To avoid ambiguity, one may limit oneself to the terms "at most countable" and "countably infinite", although with respect to [[concision]] this is the worst of both worlds.{{cn|date=September 2021}} The reader is advised to check the definition in use when encountering the term "countable" in the literature.
Although the terms "countable" and "countably infinite" as defined here are quite common, the terminology is not universal.<ref>{{cite book |last1=Manetti |first1=Marco |title=Topology |date=19 June 2015 |publisher=Springer |isbn=978-3-319-16958-3 |page=26 |url=https://books.google.com/books?id=89zyCQAAQBAJ&pg=PA26 |language=en}}</ref> An alternative style uses ''countable'' to mean what is here called countably infinite, and ''at most countable'' to mean what is here called countable.<ref name="Rudin">{{Harvard citation no brackets|Rudin|1976|loc=Chapter 2}}</ref><ref>{{harvnb|Tao|2016|p=181}}</ref>


The terms ''enumerable''<ref>{{Harvard citation no brackets|Kamke|1950|page=2}}</ref> and '''denumerable'''<ref name="Lang">{{Harvard citation no brackets|Lang|1993|loc=§2 of Chapter I}}</ref><ref name="Apostol">{{Harvard citation no brackets|Apostol|1969|loc=Chapter 1.14|p=23}}</ref> may also be used, e.g. referring to countable and countably infinite respectively,<ref>{{cite book |last1=Thierry |first1=Vialar |title=Handbook of Mathematics |date=4 April 2017 |publisher=BoD - Books on Demand |isbn=978-2-9551990-1-5 |page=24 |url=https://www.google.com/books/edition/Handbook_of_Mathematics/RkepDgAAQBAJ?hl=en&gbpv=1&pg=PA24 |language=en}}</ref> but as definitions vary the reader is once again advised to check the definition in use.<ref>{{cite book |last1=Mukherjee |first1=Subir Kumar |title=First Course in Real Analysis |date=2009 |publisher=Academic Publishers |isbn=978-81-89781-90-3 |page=22 |url=https://www.google.com/books/edition/First_Course_in_Real_Analysis/n5AhsN5UQ8IC?hl=en&gbpv=1&pg=PA22 |language=en}}</ref>
The terms ''enumerable''<ref>{{Harvard citation no brackets|Kamke|1950|page=2}}</ref> and '''denumerable'''<ref name="Lang">{{Harvard citation no brackets|Lang|1993|loc=§2 of Chapter I}}</ref><ref name="Apostol">{{Harvard citation no brackets|Apostol|1969|loc=Chapter 1.14|p=23}}</ref> may also be used, e.g. referring to countable and countably infinite respectively,<ref>{{cite book |last1=Thierry |first1=Vialar |title=Handbook of Mathematics |date=4 April 2017 |publisher=BoD - Books on Demand |isbn=978-2-9551990-1-5 |page=24 |url=https://books.google.com/books?id=RkepDgAAQBAJ&pg=PA24 |language=en}}</ref> definitions vary and care is needed respecting the difference with [[Recursively enumerable language|recursively enumerable]].<ref>{{cite book |last1=Mukherjee |first1=Subir Kumar |title=First Course in Real Analysis |date=2009 |publisher=Academic Publishers |isbn=978-81-89781-90-3 |page=22 |url=https://books.google.com/books?id=n5AhsN5UQ8IC&pg=PA22 |language=en}}</ref>


==Definition==
==Definition==


A set <math>S</math> is ''countable'' if:
The most concise definition is in terms of [[cardinality]]. A set {{mvar|S}} is ''countable'' if its cardinality |S| is less than or equal to <math>\aleph_0</math> ([[aleph-null]]), the cardinality of the set of [[natural numbers]] '''N'''. A set {{mvar|S}} is ''countably [[infinite set|infinite]]'' if <math>|S| = \aleph_0</math>. A set is ''[[uncountable]]'' if it is not countable, i.e. its cardinality is greater than <math>\aleph_0</math>; the reader is referred to [[Uncountable set]] for further discussion.<ref>{{cite book |last1=Yaqub |first1=Aladdin M. |title=An Introduction to Metalogic |date=24 October 2014 |publisher=Broadview Press |isbn=978-1-4604-0244-3 |url=https://www.google.com/books/edition/An_Introduction_to_Metalogic/cyljCAAAQBAJ?hl=en&gbpv=1&pg=PT187 |language=en}}</ref>
* Its [[cardinality]] <math>|S|</math> is less than or equal to <math>\aleph_0</math> ([[aleph-null]]), the cardinality of the set of [[natural numbers]] <math>\N</math>.<ref name=Yaqub/>
* There exists an [[injective function]] from <math>S</math> to <math>\N</math>.<ref name=Singh>{{cite book |last1=Singh |first1=Tej Bahadur |title=Introduction to Topology |date=17 May 2019 |publisher=Springer |isbn=978-981-13-6954-4 |page=422 |url=https://books.google.com/books?id=UQiZDwAAQBAJ&pg=PA422 |language=en}}</ref><ref name=Katzourakis>{{cite book |last1=Katzourakis |first1=Nikolaos |last2=Varvaruca |first2=Eugen |title=An Illustrative Introduction to Modern Analysis |date=2 January 2018 |publisher=CRC Press |isbn=978-1-351-76532-9 |url=https://books.google.com/books?id=jBFFDwAAQBAJ&pg=PT15 |language=en}}</ref>
* <math>S</math> is empty or there exists a [[surjective function]] from <math>\N</math> to <math>S</math>.<ref name=Katzourakis/>
* There exists a [[bijective]] mapping between <math>S</math> and a subset of <math>\N</math>.<ref>{{harvnb|Halmos|1960|loc=p. 91}}</ref>
* <math>S</math> is either [[Finite set|finite]] (<math>|S|<\aleph_0</math>) or countably infinite.<ref name="Lang"/>
All of these definitions are equivalent.


A set <math>S</math> is ''countably [[infinite set|infinite]]'' if:
For every set {{mvar|S}}, the following propositions are equivalent:
* {{mvar|S}} is countable.<ref name="Lang"/>
* Its cardinality <math>|S|</math> is exactly <math>\aleph_0</math>.<ref name=Yaqub/>
* There is an injective and surjective (and therefore [[bijection|bijective]]) mapping between <math>S</math> and <math>\N</math>.
* There exists an [[injective function]] from {{mvar|S}} to '''N'''.<ref name=Singh>{{cite book |last1=Singh |first1=Tej Bahadur |title=Introduction to Topology |date=17 May 2019 |publisher=Springer |isbn=978-981-13-6954-4 |page=422 |url=https://www.google.com/books/edition/Introduction_to_Topology/UQiZDwAAQBAJ?hl=en&gbpv=1&pg=PA422 |language=en}}</ref><ref name=Katzourakis>{{cite book |last1=Katzourakis |first1=Nikolaos |last2=Varvaruca |first2=Eugen |title=An Illustrative Introduction to Modern Analysis |date=2 January 2018 |publisher=CRC Press |isbn=978-1-351-76532-9 |url=https://www.google.com/books/edition/An_Illustrative_Introduction_to_Modern_A/jBFFDwAAQBAJ?hl=en&gbpv=1&pg=PT15 |language=en}}</ref>
* <math>S</math> has a [[One-one correspondence|one-to-one correspondence]] with <math>\N</math>.<ref>{{harvnb|Kamke|1950|loc=p. 2}}</ref>
* {{mvar|S}} is empty or there exists a [[surjective function]] from '''N''' to {{mvar|S}}.<ref name=Katzourakis/>
* The elements of <math>S</math> can be arranged in an infinite sequence <math>a_0, a_1, a_2, \ldots</math>, where <math>a_i</math> is distinct from <math>a_j</math> for <math>i\neq j</math> and every element of <math>S</math> is listed.<ref>{{cite book |last1=Dlab |first1=Vlastimil |last2=Williams |first2=Kenneth S. |title=Invitation To Algebra: A Resource Compendium For Teachers, Advanced Undergraduate Students And Graduate Students In Mathematics |date=9 June 2020 |publisher=World Scientific |isbn=978-981-12-1999-3 |page=8 |url=https://books.google.com/books?id=l9rrDwAAQBAJ&pg=PA8 |language=en}}</ref><ref>{{harvnb|Tao|2016|p=182}}</ref>
* There exists a [[bijective]] mapping between {{mvar|S}} and a subset of '''N'''.<ref>{{harvnb|Halmos|1960|loc=p. 91}}</ref>
* {{mvar|S}} is either [[Finite set|finite]] or countably infinite.<ref>{{Cite web|last=Weisstein|first=Eric W.|title=Countable Set |url=https://mathworld.wolfram.com/CountableSet.html|access-date=2020-09-06|website=mathworld.wolfram.com|language=en}}</ref>


A set is ''[[uncountable]]'' if it is not countable, i.e. its cardinality is greater than <math>\aleph_0</math>.<ref name=Yaqub>{{cite book |last1=Yaqub |first1=Aladdin M. |title=An Introduction to Metalogic |date=24 October 2014 |publisher=Broadview Press |isbn=978-1-4604-0244-3 |url=https://books.google.com/books?id=cyljCAAAQBAJ&pg=PT187 |language=en}}</ref>
Similarly, the following propositions are equivalent:
* {{mvar|S}} is countably infinite.
* There is an injective and surjective (and therefore [[bijection|bijective]]) mapping between {{mvar|S}} and '''N'''.
* {{mvar|S}} has a [[One-one correspondence|one-to-one correspondence]] with '''N'''.<ref>{{harvnb|Kamke|1950|loc=p. 2}}</ref>
* The elements of {{mvar|S}} can be arranged in an infinite sequence <math>a_0, a_1, a_2, \ldots</math>, where <math>a_i</math> is distinct from <math>a_j</math> for <math>i\neq j</math> and every element of {{mvar|S}} is listed.<ref>{{cite book |last1=Dlab |first1=Vlastimil |last2=Williams |first2=Kenneth S. |title=Invitation To Algebra: A Resource Compendium For Teachers, Advanced Undergraduate Students And Graduate Students In Mathematics |date=9 June 2020 |publisher=World Scientific |isbn=978-981-12-1999-3 |page=8 |url=https://www.google.com/books/edition/Invitation_To_Algebra_A_Resource_Compend/l9rrDwAAQBAJ?hl=en&gbpv=1&pg=PA8 |language=en}}</ref><ref>{{harvnb|Tao|2016|182}}</ref>


==History==
==History==
Line 34: Line 37:


==Introduction==
==Introduction==
A ''[[Set (mathematics)|set]]'' is a collection of ''elements'', and may be described in many ways. One way is simply to list all of its elements; for example, the set consisting of the integers 3, 4, and 5 may be denoted {3, 4, 5}, called roster form.<ref>{{Cite web|date=2021-05-09|title=What Are Sets and Roster Form?|url=https://www.expii.com/t/what-are-sets-and-roster-form-4300| url-status=live|website=expii|archive-url=https://web.archive.org/web/20200918224155/https://www.expii.com/t/what-are-sets-and-roster-form-4300 |archive-date=2020-09-18 }}</ref> This is only effective for small sets, however; for larger sets, this would be time-consuming and error-prone. Instead of listing every single element, sometimes an ellipsis ("...") is used to represent many elements between the starting element and the end element in a set, if the writer believes that the reader can easily guess what ... represents; for example, {1, 2, 3, ..., 100} presumably denotes the set of [[integer]]s from 1 to 100. Even in this case, however, it is still ''possible'' to list all the elements, because number of elements in the set is finite.
A ''[[Set (mathematics)|set]]'' is a collection of ''elements'', and may be described in many ways. One way is simply to list all of its elements; for example, the set consisting of the integers 3, 4, and 5 may be denoted <math>\{3, 4, 5\}</math>, called roster form.<ref>{{Cite web|date=2021-05-09|title=What Are Sets and Roster Form?|url=https://www.expii.com/t/what-are-sets-and-roster-form-4300| url-status=live|website=expii|archive-url=https://web.archive.org/web/20200918224155/https://www.expii.com/t/what-are-sets-and-roster-form-4300 |archive-date=2020-09-18 }}</ref> This is only effective for small sets, however; for larger sets, this would be time-consuming and error-prone. Instead of listing every single element, sometimes an ellipsis ("...") is used to represent many elements between the starting element and the end element in a set, if the writer believes that the reader can easily guess what ... represents; for example, <math>\{1, 2, 3, \dots, 100\}</math> presumably denotes the set of [[integer]]s from 1 to 100. Even in this case, however, it is still ''possible'' to list all the elements, because the number of elements in the set is finite. If we number the elements of the set 1, 2, and so on, up to <math>n</math>, this gives us the usual definition of "sets of size <math>n</math>".

Some sets are ''infinite''; these sets have more than ''n'' elements where ''n'' is any integer that can be specified. (No matter how large the specified integer ''n'' is, such as {{math|1=''n'' = {{val|9|e=32}}}}, infinite sets have more than ''n'' elements.) For example, the set of natural numbers, denotable by {0, 1, 2, 3, 4, 5, ...},{{efn|Since there is an obvious [[bijection]] between {{math|'''N'''}} and {{math|1='''N'''* = {1, 2, 3, ...}}}, it makes no difference whether one considers 0 a natural number or not. In any case, this article follows [[ISO 31-11]] and the standard convention in [[mathematical logic]], which takes 0 as a natural number.}} has infinitely many elements, and we cannot use any natural number to give its size. Nonetheless, it turns out that infinite sets do have a well-defined notion of size (or more properly, ''cardinality'', the technical term for the number of elements in a set), and not all infinite sets have the same cardinality.


[[File:Aplicación 2 inyectiva sobreyectiva02.svg|thumb|x100px|Bijective mapping from integer to even numbers]]
[[File:Aplicación 2 inyectiva sobreyectiva02.svg|thumb|x100px|Bijective mapping from integer to even numbers]]
Some sets are ''infinite''; these sets have more than <math>n</math> elements where <math>n</math> is any integer that can be specified. (No matter how large the specified integer <math>n</math> is, such as <math>n=10^{1000}</math>, infinite sets have more than <math>n</math> elements.) For example, the set of natural numbers, denotable by <math>\{0, 1, 2, 3, 4, 5,\dots\}</math>,{{efn|name=ZeroN|Since there is an obvious [[bijection]] between <math>\N</math> and <math>\N^*=\{1,2,3,\dots\}</math>, it makes no difference whether one considers 0 a natural number or not. In any case, this article follows [[ISO 31-11]] and the standard convention in [[mathematical logic]], which takes 0 as a natural number.}} has infinitely many elements, and we cannot use any natural number to give its size. It might seem natural to divide the sets into different classes: put all the sets containing one element together; all the sets containing two elements together; ...; finally, put together all infinite sets and consider them as having the same size. This view works well for countably infinite sets and was the prevailing assumption before Georg Cantor's work. For example, there are infinitely many odd integers, infinitely many even integers, and also infinitely many integers overall. We can consider all these sets to have the same "size" because we can arrange things such that, for every integer, there is a distinct even integer:
To understand what this means, we first examine what it ''does not'' mean. For example, there are infinitely many odd integers, infinitely many even integers, and (hence) infinitely many integers overall. However, it turns out that the number of even integers, which is the same as the number of odd integers, is also the same as the number of integers overall. This is because we can arrange things such that, for every integer, there is a distinct even integer:
<math display="block">\ldots \, -\! 2\! \rightarrow \! - \! 4, \, -\! 1\! \rightarrow \! - \! 2, \, 0\! \rightarrow \! 0, \, 1\! \rightarrow \! 2, \, 2\! \rightarrow \! 4 \, \cdots</math>
<math display="block">\ldots \, -\! 2\! \rightarrow \! - \! 4, \, -\! 1\! \rightarrow \! - \! 2, \, 0\! \rightarrow \! 0, \, 1\! \rightarrow \! 2, \, 2\! \rightarrow \! 4 \, \cdots</math>
or, more generally, <math>n \rightarrow 2n</math> (see picture). What we have done here is arrange the integers and the even integers into a ''one-to-one correspondence'' (or ''[[bijection]]''), which is a [[function (mathematics)|function]] that maps between two sets such that each element of each set corresponds to a single element in the other set.
or, more generally, <math>n \rightarrow 2n</math> (see picture). What we have done here is arrange the integers and the even integers into a ''one-to-one correspondence'' (or ''[[bijection]]''), which is a [[function (mathematics)|function]] that maps between two sets such that each element of each set corresponds to a single element in the other set. This mathematical notion of "size", cardinality, is that two sets are of the same size if and only if there is a bijection between them. We call all sets that are in one-to-one correspondence with the integers ''countably infinite'' and say they have cardinality <math>\aleph_0</math>.


However, not all infinite sets have the same cardinality. For example, [[Georg Cantor]] (who introduced this concept) demonstrated that the real numbers cannot be put into one-to-one correspondence with the natural numbers (non-negative integers), and therefore that the set of real numbers has a greater cardinality than the set of natural numbers.
[[Georg Cantor]] showed that not all infinite sets are countably infinite. For example, the real numbers cannot be put into one-to-one correspondence with the natural numbers (non-negative integers). The set of real numbers has a greater cardinality than the set of natural numbers and is said to be uncountable.


==Formal overview==
==Formal overview==
By definition, a set ''S'' is ''countable'' if there exists an [[injective function]] ''f'' : ''S'' → '''N''' from ''S'' to the [[natural numbers]] '''N''' = {0, 1, 2, 3, ...}. It simply means that every element in ''S'' has the correspondence to a different element in '''N'''''.''


By definition, a set <math>S</math> is ''countable'' if there exists a [[bijection]] between <math>S</math> and a subset of the [[natural numbers]] <math>\N=\{0,1,2,\dots\}</math>. For example, define the correspondence
It might seem natural to divide the sets into different classes: put all the sets containing one element together; all the sets containing two elements together; ...; finally, put together all infinite sets and consider them as having the same size.
<math display=block>
This view is not tenable, however, under the natural definition of size.
a \leftrightarrow 1,\ b \leftrightarrow 2,\ c \leftrightarrow 3
</math>
Since every element of <math>S=\{a,b,c\}</math> is paired with ''precisely one'' element of <math>\{1,2,3\}</math>, ''and'' vice versa, this defines a bijection, and shows that <math>S</math> is countable. Similarly we can show all finite sets are countable.


As for the case of infinite sets, a set <math>S</math> is countably infinite if there is a [[bijection]] between <math>S</math> and all of <math>\N</math>. As examples, consider the sets <math>A=\{1,2,3,\dots\}</math>, the set of positive [[integer]]s, and <math>B=\{0,2,4,6,\dots\}</math>, the set of even integers. We can show these sets are countably infinite by exhibiting a bijection to the natural numbers. This can be achieved using the assignments <math>n \leftrightarrow n+1</math> and <math>n \leftrightarrow 2n</math>, so that
To elaborate this, we need the concept of a [[bijection]]. Although a "bijection" may seem a more advanced concept than a number, the usual development of mathematics in terms of set theory defines functions before numbers, as they are based on much simpler sets. This is where the concept of a bijection comes in: define the correspondence
<math display=block>\begin{matrix}
{{block indent|em=1.5|text=''a'' ↔ 1, ''b'' ↔ 2, ''c'' ↔ 3}}
0 \leftrightarrow 1, & 1 \leftrightarrow 2, & 2 \leftrightarrow 3, & 3 \leftrightarrow 4, & 4 \leftrightarrow 5, & \ldots \\[6pt]
0 \leftrightarrow 0, & 1 \leftrightarrow 2, & 2 \leftrightarrow 4, & 3 \leftrightarrow 6, & 4 \leftrightarrow 8, & \ldots
\end{matrix}</math>
Every countably infinite set is countable, and every infinite countable set is countably infinite. Furthermore, any subset of the natural numbers is countable, and more generally:
{{math theorem | math_statement = A subset of a countable set is countable.<ref>{{harvnb|Halmos|1960|page=91}}</ref>}}


The set of all [[ordered pair]]s of natural numbers (the [[Cartesian product]] of two sets of natural numbers, <math>\N\times\N</math> is countably infinite, as can be seen by following a path like the one in the picture: [[File:Pairing natural.svg|thumb|300px|The [[Cantor pairing function]] assigns one natural number to each pair of natural numbers]] The resulting [[Map (mathematics)|mapping]] proceeds as follows:
Since every element of {''a'', ''b'', ''c''} is paired with ''precisely one'' element of {1, 2, 3}, ''and'' vice versa, this defines a bijection.
<math display=block>

0 \leftrightarrow (0, 0), 1 \leftrightarrow (1, 0), 2 \leftrightarrow (0, 1), 3 \leftrightarrow (2, 0), 4 \leftrightarrow (1, 1), 5 \leftrightarrow (0, 2), 6 \leftrightarrow (3, 0), \ldots
We now generalize this situation; we ''define'' that two sets are of the same size, if and only if there is a bijection between them. For all finite sets, this gives us the usual definition of "the same size".
</math>

As for the case of infinite sets, consider the sets ''A'' = {1, 2, 3, ... }, the set of positive [[integer]]s, and ''B'' = {2, 4, 6, ... }, the set of even positive integers. We claim that, under our definition, these sets have the same size, and that therefore ''B'' is countably infinite. Recall that to prove this, we need to exhibit a bijection between them. This can be achieved using the assignment ''n'' ↔ 2''n'', so that
{{block indent|em=1.5|text=1 ↔ 2, 2 ↔ 4, 3 ↔ 6, 4 ↔ 8, ....}}

As in the earlier example, every element of A has been paired off with precisely one element of B, and vice versa. Hence they have the same size. This is an example of a set of the same size as one of its [[proper subsets]], which is impossible for finite sets.

Likewise, the set of all [[ordered pair]]s of natural numbers (the [[Cartesian product]] of two sets of natural numbers, '''N''' × '''N''') is countably infinite, as can be seen by following a path like the one in the picture: [[File:Pairing natural.svg|thumb|300px|The [[Cantor pairing function]] assigns one natural number to each pair of natural numbers]] The resulting [[Map (mathematics)|mapping]] proceeds as follows:
{{block indent|em=1.5|text=0 ↔ (0, 0), 1 ↔ (1, 0), 2 ↔ (0, 1), 3 ↔ (2, 0), 4 ↔ (1, 1), 5 ↔ (0, 2), 6 ↔ (3, 0), ....}}
This mapping covers all such ordered pairs.
This mapping covers all such ordered pairs.


This form of triangular mapping [[recursion|recursively]] generalizes to ''n''-[[tuple]]s of natural numbers, i.e., (''a''<sub>1</sub>, ''a''<sub>2</sub>, ''a''<sub>3</sub>, ..., ''a''<sub>n</sub>) where ''a<sub>i</sub>'' and ''n'' are natural numbers, by repeatedly mapping the first two elements of a ''n''-tuple to a natural number. For example, (0, 2, 3) can be written as ((0, 2), 3). Then (0, 2) maps to 5 so ((0, 2), 3) maps to (5, 3), then (5, 3) maps to 39. Since a different 2-tuple, that is a pair such as (''a'', ''b''), maps to a different natural number, a difference between two n-tuples by a single element is enough to ensure the n-tuples being mapped to different natural numbers. So, an injection from the set of ''n''-tuples to the set of natural numbers '''N''' is proved. For the set of n-tuples made by the Cartesian product of finitely many different sets, each element in each tuple has the correspondence to a natural number, so every tuple can be written in natural numbers then the same logic is applied to prove the theorem.
This form of triangular mapping [[recursion|recursively]] generalizes to <math>n</math>-[[tuple]]s of natural numbers, i.e., <math>(a_1,a_2,a_3,\dots,a_n)</math> where <math>a_i</math> and <math>n</math> are natural numbers, by repeatedly mapping the first two elements of an <math>n</math>-tuple to a natural number. For example, <math>(0, 2, 3)</math> can be written as <math>((0, 2), 3)</math>. Then <math>(0, 2)</math> maps to 5 so <math>((0, 2), 3)</math> maps to <math>(5, 3)</math>, then <math>(5, 3)</math> maps to 39. Since a different 2-tuple, that is a pair such as <math>(a,b)</math>, maps to a different natural number, a difference between two n-tuples by a single element is enough to ensure the n-tuples being mapped to different natural numbers. So, an injection from the set of <math>n</math>-tuples to the set of natural numbers <math>\N</math> is proved. For the set of <math>n</math>-tuples made by the Cartesian product of finitely many different sets, each element in each tuple has the correspondence to a natural number, so every tuple can be written in natural numbers then the same logic is applied to prove the theorem.


{{math theorem | math_statement = The [[Cartesian product]] of finitely many countable sets is countable.<ref>{{Harvard citation no brackets|Halmos|1960|page=92}}</ref>{{efn|'''Proof:''' Observe that {{math|'''N''' × '''N'''}} is countable as a consequence of the definition because the function {{math|''f'' : '''N''' × '''N''' → '''N'''}} given by {{math|1=''f''(''m'', ''n'') = 2<sup>''m''</sup>3<sup>''n''</sup>}} is injective.<ref>{{Harvard citation no brackets|Avelsgaard|1990|page=182}}</ref> It then follows that the Cartesian product of any two countable sets is countable, because if {{mvar|A}} and {{mvar|B}} are two countable sets there are surjections {{math|''f'' : '''N''' → ''A''}} and {{math|''g'' : '''N''' → ''B''}}. So
{{math theorem | math_statement = The [[Cartesian product]] of finitely many countable sets is countable.<ref>{{Harvard citation no brackets|Halmos|1960|page=92}}</ref>{{efn|'''Proof:''' Observe that <math>\N\times\N</math> is countable as a consequence of the definition because the function <math>f:\N\times\N\to\N</math> given by <math>f(m,n)=2^m\cdot3^n</math> is injective.<ref>{{Harvard citation no brackets|Avelsgaard|1990|page=182}}</ref> It then follows that the Cartesian product of any two countable sets is countable, because if <math>A</math> and <math>B</math> are two countable sets there are surjections <math>f:\N\to A</math> and <math>g:\N\to B</math>. So <math>f\times g:\N\times\N\to A\times B</math>
is a surjection from the countable set <math>\N\times\N</math> to the set <math>A\times B</math> and the Corollary implies <math>A\times B</math> is countable. This result generalizes to the Cartesian product of any finite collection of countable sets and the proof follows by [[mathematical induction|induction]] on the number of sets in the collection.
{{block indent|em=1.5|text={{math|''f'' × ''g'' : '''N''' × '''N''' → ''A'' × ''B''}}}}
is a surjection from the countable set {{math|'''N''' × '''N'''}} to the set {{math|''A'' × ''B''}} and the Corollary implies {{math|''A'' × ''B''}} is countable. This result generalizes to the Cartesian product of any finite collection of countable sets and the proof follows by [[mathematical induction|induction]] on the number of sets in the collection.
}}}}
}}}}


The set of all [[integer]]s '''Z''' and the set of all [[rational number]]s '''Q''' may intuitively seem much bigger than '''N'''. But looks can be deceiving. If a pair is treated as the [[numerator]] and [[denominator]] of a [[vulgar fraction]] (a fraction in the form of ''a''/''b'' where ''a'' and ''b'' ≠ 0 are integers), then for every positive fraction, we can come up with a distinct natural number corresponding to it. This representation also includes the natural numbers, since every natural number is also a fraction ''N''/1. So we can conclude that there are exactly as many positive rational numbers as there are positive integers. This is also true for all rational numbers, as can be seen below.
The set of all [[integer]]s <math>\Z</math> and the set of all [[rational number]]s <math>\Q</math> may intuitively seem much bigger than <math>\N</math>. But looks can be deceiving. If a pair is treated as the [[numerator]] and [[denominator]] of a [[vulgar fraction]] (a fraction in the form of <math>a/b</math> where <math>a</math> and <math>b\neq 0</math> are integers), then for every positive fraction, we can come up with a distinct natural number corresponding to it. This representation also includes the natural numbers, since every natural number <math>n</math> is also a fraction <math>n/1</math>. So we can conclude that there are exactly as many positive rational numbers as there are positive integers. This is also true for all rational numbers, as can be seen below.


{{math theorem | math_statement = '''Z''' (the set of all integers) and '''Q''' (the set of all rational numbers) are countable.{{efn|'''Proof:''' The integers {{math|'''Z'''}} are countable because the function {{math|''f'' : '''Z''' → '''N'''}} given by {{math|1=''f''(''n'') = 2<sup>''n''</sup>}} if {{mvar|n}} is non-negative and {{math|1=''f''(''n'') = 3<sup>−''n''</sup>}} if {{mvar|n}} is negative, is an injective function. The rational numbers {{math|'''Q'''}} are countable because the function {{math|''g'' : '''Z''' × '''N''' → '''Q'''}} given by {{math|1=''g''(''m'', ''n'') = ''m''/(''n'' + 1)}} is a surjection from the countable set {{math|'''Z''' × '''N'''}} to the rationals {{math|'''Q'''}}.}}}}
{{math theorem | math_statement = <math>\Z</math> (the set of all integers) and <math>\Q</math> (the set of all rational numbers) are countable.{{efn|'''Proof:''' The integers <math>\Z</math> are countable because the function <math>f:\Z\to\N</math> given by <math>f(n)=2^n</math> if <math>n</math> is non-negative and <math>f(n)=3^{-n}</math> if <math>n</math> is negative, is an injective function. The rational numbers <math>\Q</math> are countable because the function <math>g:\Z\times\N\to\Q</math> given by <math>g(m,n)=m/(n+1)</math> is a surjection from the countable set <math>\Z\times\N</math> to the rationals <math>\Q</math>.}}}}


In a similar manner, the set of [[algebraic number]]s is countable.<ref>{{Harvard citation no brackets|Kamke|1950|pages=3–4}}</ref>{{efn|1='''Proof:''' Per definition, every algebraic number (including complex numbers) is a root of a polynomial with integer coefficients. Given an algebraic number <math>\alpha</math>, let <math>a_0x^0 + a_1 x^1 + a_2 x^2 + \cdots + a_n x^n</math> be a polynomial with integer coefficients such that <math>\alpha</math> is the ''k''th root of the polynomial, where the roots are sorted by absolute value from small to big, then sorted by argument from small to big. We can define an injection (i. e. one-to-one) function {{math|''f'' : '''A''' → '''Q'''}} given by <math>f(\alpha) = 2^{k-1} \cdot 3^{a_0} \cdot 5^{a_1} \cdot 7^{a_2} \cdots {p_{n+2}}^{a_n}</math>, while <math>p_n</math> is the ''n''-th [[prime number|prime]].}}
In a similar manner, the set of [[algebraic number]]s is countable.<ref>{{Harvard citation no brackets|Kamke|1950|pages=3–4}}</ref>{{efn|1='''Proof:''' Per definition, every algebraic number (including complex numbers) is a root of a polynomial with integer coefficients. Given an algebraic number <math>\alpha</math>, let <math>a_0x^0 + a_1 x^1 + a_2 x^2 + \cdots + a_n x^n</math> be a polynomial with integer coefficients such that <math>\alpha</math> is the <math>k</math>-th root of the polynomial, where the roots are sorted by absolute value from small to big, then sorted by argument from small to big. We can define an injection (i. e. one-to-one) function <math>f:\mathbb{A}\to\Q</math> given by <math>f(\alpha) = 2^{k-1} \cdot 3^{a_0} \cdot 5^{a_1} \cdot 7^{a_2} \cdots {p_{n+2}}^{a_n}</math>, where <math>p_n</math> is the <math>n</math>-th [[prime number|prime]].}}


Sometimes more than one mapping is useful: a set A to be shown as countable is one-to-one mapped (injection) to another set B, then A is proved as countable if B is one-to-one mapped to the set of natural numbers. For example, the set of positive [[rational number]]s can easily be one-to-one mapped to the set of natural number pairs (2-tuples) because ''p''/''q ''maps to (''p'', ''q''). Since the set of natural number pairs is one-to-one mapped (actually one-to-one correspondence or bijection) to the set of natural numbers as shown above, the positive rational number set is proved as countable.
Sometimes more than one mapping is useful: a set <math>A</math> to be shown as countable is one-to-one mapped (injection) to another set <math>B</math>, then <math>A</math> is proved as countable if <math>B</math> is one-to-one mapped to the set of natural numbers. For example, the set of positive [[rational number]]s can easily be one-to-one mapped to the set of natural number pairs (2-tuples) because <math>p/q</math> maps to <math>(p,q)</math>. Since the set of natural number pairs is one-to-one mapped (actually one-to-one correspondence or bijection) to the set of natural numbers as shown above, the positive rational number set is proved as countable.


{{math theorem | math_statement = Any finite [[union (set theory)|union]] of countable sets is countable.<ref>{{Harvard citation no brackets|Avelsgaard|1990|page=180}}</ref><ref>{{Harvard citation no brackets|Fletcher|Patty|1988|page=187}}</ref>{{efn|1='''Proof:''' If {{math|''A<sub>i</sub>''}} is a countable set for each {{mvar|i}} in ''I''={1,...,n}, then for each {{mvar|n}} there is a surjective function {{math|''g<sub>i</sub>'' : '''N''' → ''A<sub>i</sub>''}} and hence the function
{{math theorem | math_statement = Any finite [[union (set theory)|union]] of countable sets is countable.<ref>{{Harvard citation no brackets|Avelsgaard|1990|page=180}}</ref><ref>{{Harvard citation no brackets|Fletcher|Patty|1988|page=187}}</ref>{{efn|1='''Proof:''' If <math>A_i</math> is a countable set for each <math>i</math> in <math>I=\{1,\dots,n\}</math>, then for each <math>i</math> there is a surjective function <math>g_i:\N\to A_i</math> and hence the function
<math display="block">G : I \times \mathbf{N} \to \bigcup_{i \in I} A_i,</math>
<math display="block">G : I \times \mathbf{N} \to \bigcup_{i \in I} A_i,</math>
given by {{math|1=''G''(''i'', ''m'') = ''g<sub>i</sub>''(''m'')}} is a surjection. Since {{math|''I'' × '''N'''}} is countable, the union <math display="inline">\bigcup_{i \in I} A_i</math>is countable.
given by <math>G(i,m)=g_i(m)</math> is a surjection. Since <math>I\times \N</math> is countable, the union <math display="inline">\bigcup_{i \in I} A_i</math>is countable.
}}}}
}}}}


With the foresight of knowing that there are uncountable sets, we can wonder whether or not this last result can be pushed any further. The answer is "yes" and "no", we can extend it, but we need to assume a new axiom to do so.
With the foresight of knowing that there are uncountable sets, we can wonder whether or not this last result can be pushed any further. The answer is "yes" and "no", we can extend it, but we need to assume a new axiom to do so.


{{math theorem | math_statement = (Assuming the [[axiom of countable choice]]) The union of countably many countable sets is countable.{{efn|1='''Proof''': As in the finite case, but ''I''='''N''' and we use the [[axiom of countable choice]] to pick for each {{mvar|i}} in {{math|'''N'''}} a surjection {{math|''g<sub>i</sub>''}} from the non-empty collection of surjections from {{math|'''N'''}} to {{math|''A<sub>i</sub>''}}.}}}}
{{math theorem | math_statement = (Assuming the [[axiom of countable choice]]) The union of countably many countable sets is countable.{{efn|1='''Proof''': As in the finite case, but <math>I=\N</math> and we use the [[axiom of countable choice]] to pick for each <math>i</math> in <math>\N</math> a surjection <math>g_i</math> from the non-empty collection of surjections from <math>\N</math> to <math>A_i</math>.<ref>{{cite book |last1=Hrbacek |first1=Karel |last2=Jech |first2=Thomas |title=Introduction to Set Theory, Third Edition, Revised and Expanded |date=22 June 1999 |publisher=CRC Press |isbn=978-0-8247-7915-3 |page=141 |url=https://books.google.com/books?id=Er1r0n7VoSEC&pg=PA141 |language=en}}</ref> Note that since we are considering the surjection <math>G : \mathbf{N} \times \mathbf{N} \to \bigcup_{i \in I} A_i</math>, rather than an injection, there is no requirement that the sets be disjoint.}}}}

For example, given countable sets '''a''', '''b''', '''c''', ...


[[File:Countablepath.svg|thumb|300px|Enumeration for countable number of countable sets]]
[[File:Countablepath.svg|thumb|300px|Enumeration for countable number of countable sets]]
Using a variant of the triangular enumeration we saw above:
For example, given countable sets <math>\textbf{a},\textbf{b},\textbf{c},\dots</math>, we first assign each element of each set a tuple, then we assign each tuple an index using a variant of the triangular enumeration we saw above:
<math display=block>

\begin{array}{ c|c|c }
*''a''<sub>0</sub> maps to 0
\text{Index} & \text{Tuple} & \text {Element} \\ \hline
*''a''<sub>1</sub> maps to 1
0 & (0,0) & \textbf{a}_0 \\
*''b''<sub>0</sub> maps to 2
1 & (0,1) & \textbf{a}_1 \\
*''a''<sub>2</sub> maps to 3
2 & (1,0) & \textbf{b}_0 \\
*''b''<sub>1</sub> maps to 4
3 & (0,2) & \textbf{a}_2 \\
*''c''<sub>0</sub> maps to 5
4 & (1,1) & \textbf{b}_1 \\
*''a''<sub>3</sub> maps to 6
5 & (2,0) & \textbf{c}_0 \\
*''b''<sub>2</sub> maps to 7
6 & (0,3) & \textbf{a}_3 \\
*''c''<sub>1</sub> maps to 8
7 & (1,2) & \textbf{b}_2 \\
*''d''<sub>0</sub> maps to 9
8 & (2,1) & \textbf{c}_1 \\
*''a''<sub>4</sub> maps to 10
9 & (3,0) & \textbf{d}_0 \\
*...
10 & (0,4) & \textbf{a}_4 \\

\vdots & &
This only works if the sets '''a''', '''b''', '''c''', ... are [[disjoint sets|disjoint]]. If not, then the union is even smaller and is therefore also countable by a previous theorem.
\end{array}
</math>


We need the [[axiom of countable choice]] to index ''all'' the sets '''a''', '''b''', '''c''', ... simultaneously.
We need the [[axiom of countable choice]] to index ''all'' the sets <math>\textbf{a},\textbf{b},\textbf{c},\dots</math> simultaneously.


{{math theorem | math_statement = The set of all finite-length [[sequence]]s of natural numbers is countable.}}
{{math theorem | math_statement = The set of all finite-length [[sequence]]s of natural numbers is countable.}}
Line 121: Line 121:
The elements of any finite subset can be ordered into a finite sequence. There are only countably many finite sequences, so also there are only countably many finite subsets.
The elements of any finite subset can be ordered into a finite sequence. There are only countably many finite sequences, so also there are only countably many finite subsets.


{{math theorem | math_statement = Let ''S'' and ''T'' be sets.
{{math theorem | math_statement = Let <math>S</math> and <math>T</math> be sets.
# If the function ''f'' : ''S'' → ''T'' is injective and ''T'' is countable then ''S'' is countable.
# If the function <math>f:S\to T</math> is injective and <math>T</math> is countable then <math>S</math> is countable.
# If the function ''g'' : ''S'' → ''T'' is surjective and ''S'' is countable then ''T'' is countable.}}
# If the function <math>g:S\to T</math> is surjective and <math>S</math> is countable then <math>T</math> is countable.}}


These follow from the definitions of countable set as injective / surjective functions.{{efn|'''Proof''': For (1) observe that if ''T'' is countable there is an injective function ''h'' : ''T'' → '''N'''. Then if ''f'' : ''S'' → ''T'' is injective the composition ''h'' <small> o </small> ''f'' : ''S'' → '''N''' is injective, so ''S'' is countable.
These follow from the definitions of countable set as injective / surjective functions.{{efn|'''Proof''': For (1) observe that if <math>T</math> is countable there is an injective function <math>h:T\to\N</math>. Then if <math>f:S\to T</math> is injective the composition <math>h\circ f:S\to \N</math> is injective, so <math>S</math> is countable.


For (2) observe that if ''S'' is countable, either ''S'' is empty or there is a surjective function ''h'' : '''N''' → ''S''. Then if ''g'' : ''S'' → ''T'' is surjective, either ''S'' and ''T'' are both empty, or the composition ''g'' <small> o </small> ''h'' : '''N''' → ''T'' is surjective. In either case ''T'' is countable.
For (2) observe that if <math>S</math> is countable, either <math>S</math> is empty or there is a surjective function <math>h:\N\to S</math>. Then if <math>g:S\to T</math> is surjective, either <math>S</math> and <math>T</math> are both empty, or the composition <math>g\circ h:\N\to T</math> is surjective. In either case <math>T</math> is countable.
}}
}}


'''[[Cantor's theorem]]''' asserts that if ''A'' is a set and ''P''(''A'') is its [[power set]], i.e. the set of all subsets of ''A'', then there is no surjective function from ''A'' to ''P''(''A''). A proof is given in the article [[Cantor's theorem]]. As an immediate consequence of this and the Basic Theorem above we have:
'''[[Cantor's theorem]]''' asserts that if <math>A</math> is a set and <math>\mathcal{P}(A)</math> is its [[power set]], i.e. the set of all subsets of <math>A</math>, then there is no surjective function from <math>A</math> to <math>\mathcal{P}(A)</math>. A proof is given in the article [[Cantor's theorem]]. As an immediate consequence of this and the Basic Theorem above we have:
{{math theorem | name = Proposition | math_statement = The set ''P''('''N''') is not countable; i.e. it is [[uncountable]].}}
{{math theorem | name = Proposition | math_statement = The set <math>\mathcal{P}(\N)</math> is not countable; i.e. it is [[uncountable]].}}


For an elaboration of this result see [[Cantor's diagonal argument]].
For an elaboration of this result see [[Cantor's diagonal argument]].
Line 138: Line 138:


==Minimal model of set theory is countable==
==Minimal model of set theory is countable==
If there is a set that is a standard model (see [[inner model]]) of ZFC set theory, then there is a minimal standard model (''see'' [[Constructible universe]]). The [[Löwenheim–Skolem theorem]] can be used to show that this minimal model is countable. The fact that the notion of "uncountability" makes sense even in this model, and in particular that this model ''M'' contains elements that are:
If there is a set that is a standard model (see [[inner model]]) of ZFC set theory, then there is a minimal standard model (see [[Constructible universe]]). The [[Löwenheim–Skolem theorem]] can be used to show that this minimal model is countable. The fact that the notion of "uncountability" makes sense even in this model, and in particular that this model ''M'' contains elements that are:
* subsets of ''M'', hence countable,
* subsets of ''M'', hence countable,
* but uncountable from the point of view of ''M'',
* but uncountable from the point of view of ''M'',
was seen as paradoxical in the early days of set theory, see [[Skolem's paradox]] for more.
was seen as paradoxical in the early days of set theory; see [[Skolem's paradox]] for more.


The minimal standard model includes all the [[algebraic number]]s and all effectively computable [[transcendental number]]s, as well as many other kinds of numbers.
The minimal standard model includes all the [[algebraic number]]s and all effectively computable [[transcendental number]]s, as well as many other kinds of numbers.
Line 172: Line 172:
* {{Citation | first1=Tom M. | last1=Apostol | author-link=Tom M. Apostol | title=Multi-Variable Calculus and Linear Algebra with Applications | location=New York | publisher=John Wiley + Sons | edition=2nd | series=Calculus | volume=2 | isbn=978-0-471-00007-5 | date=June 1969 | url-access=registration | url=https://archive.org/details/calculus00apos }}
* {{Citation | first1=Tom M. | last1=Apostol | author-link=Tom M. Apostol | title=Multi-Variable Calculus and Linear Algebra with Applications | location=New York | publisher=John Wiley + Sons | edition=2nd | series=Calculus | volume=2 | isbn=978-0-471-00007-5 | date=June 1969 | url-access=registration | url=https://archive.org/details/calculus00apos }}
* {{citation | first=Carol|last=Avelsgaard|title=Foundations for Advanced Mathematics|year=1990|publisher=Scott, Foresman and Company|isbn=0-673-38152-8}}
* {{citation | first=Carol|last=Avelsgaard|title=Foundations for Advanced Mathematics|year=1990|publisher=Scott, Foresman and Company|isbn=0-673-38152-8}}
* {{Citation | first = Georg | last = Cantor | title = Ein Beitrag zur Mannigfaltigkeitslehre | url = http://www.digizeitschriften.de/dms/img/?PID=GDZPPN002156806 | volume = 1878 | issue = 84 | pages = 242&ndash;248 | journal = Journal für die Reine und Angewandte Mathematik | year = 1878 | doi = 10.1515/crelle-1878-18788413}}
* {{Citation | first = Georg | last = Cantor | title = Ein Beitrag zur Mannigfaltigkeitslehre | url = http://www.digizeitschriften.de/dms/img/?PID=GDZPPN002156806 | volume = 1878 | issue = 84 | pages = 242&ndash;248 | journal = Journal für die Reine und Angewandte Mathematik | year = 1878 | doi = 10.1515/crelle-1878-18788413| s2cid = 123695365 }}
* {{Citation | last = Ferreirós | first = José | title = Labyrinth of Thought: A History of Set Theory and Its Role in Mathematical Thought | publisher = Birkhäuser | year = 2007 | edition = 2nd revised | isbn = 978-3-7643-8349-7}}
* {{Citation | last = Ferreirós | first = José | title = Labyrinth of Thought: A History of Set Theory and Its Role in Mathematical Thought | publisher = Birkhäuser | year = 2007 | edition = 2nd revised | isbn = 978-3-7643-8349-7}}
* {{citation|first1=Peter|last1=Fletcher|first2=C. Wayne|last2=Patty|title=Foundations of Higher Mathematics|year=1988|publisher=PWS-KENT Publishing Company|location=Boston|isbn=0-87150-164-3}}
* {{citation|first1=Peter|last1=Fletcher|first2=C. Wayne|last2=Patty|title=Foundations of Higher Mathematics|year=1988|publisher=PWS-KENT Publishing Company|location=Boston|isbn=0-87150-164-3}}
Line 179: Line 179:
* {{Citation | last1=Lang | first1=Serge | author1-link=Serge Lang | title=Real and Functional Analysis | publisher=Springer-Verlag | location=Berlin, New York | isbn=0-387-94001-4 | year=1993}}
* {{Citation | last1=Lang | first1=Serge | author1-link=Serge Lang | title=Real and Functional Analysis | publisher=Springer-Verlag | location=Berlin, New York | isbn=0-387-94001-4 | year=1993}}
* {{Citation | last1=Rudin | first1=Walter | author1-link=Walter Rudin | title=Principles of Mathematical Analysis | publisher=McGraw-Hill| location=New York | isbn=0-07-054235-X | year=1976}}
* {{Citation | last1=Rudin | first1=Walter | author1-link=Walter Rudin | title=Principles of Mathematical Analysis | publisher=McGraw-Hill| location=New York | isbn=0-07-054235-X | year=1976}}
* {{cite book |last1=Tao |first1=Terence |title=Analysis I |date=2016 |publisher=Springer |location=Singapore |isbn=978-981-10-1789-6 |pages=181-210 |edition=Third |chapter-url=https://link.springer.com/chapter/10.1007/978-981-10-1789-6_8 |language=en |chapter=Infinite sets}}
* {{cite book |last1=Tao |first1=Terence |title=Analysis I |date=2016 |publisher=Springer |location=Singapore |isbn=978-981-10-1789-6 |pages=181–210 |edition=Third |chapter-url=https://link.springer.com/chapter/10.1007/978-981-10-1789-6_8 |language=en |chapter=Infinite sets|series=Texts and Readings in Mathematics |volume=37 |doi=10.1007/978-981-10-1789-6_8 }}
{{Wiktionary|countable}}{{Portal bar|Arithmetic|Mathematics}}
{{Wiktionary|countable}}{{Portal bar|Arithmetic|Mathematics}}
{{Number systems}}
{{Number systems}}

Latest revision as of 23:54, 20 May 2024

In mathematics, a set is countable if either it is finite or it can be made in one to one correspondence with the set of natural numbers.[a] Equivalently, a set is countable if there exists an injective function from it into the natural numbers; this means that each element in the set may be associated to a unique natural number, or that the elements of the set can be counted one at a time, although the counting may never finish due to an infinite number of elements.

In more technical terms, assuming the axiom of countable choice, a set is countable if its cardinality (the number of elements of the set) is not greater than that of the natural numbers. A countable set that is not finite is said to be countably infinite.

The concept is attributed to Georg Cantor, who proved the existence of uncountable sets, that is, sets that are not countable; for example the set of the real numbers.

A note on terminology [edit]

Although the terms "countable" and "countably infinite" as defined here are quite common, the terminology is not universal.[1] An alternative style uses countable to mean what is here called countably infinite, and at most countable to mean what is here called countable.[2][3]

The terms enumerable[4] and denumerable[5][6] may also be used, e.g. referring to countable and countably infinite respectively,[7] definitions vary and care is needed respecting the difference with recursively enumerable.[8]

Definition[edit]

A set is countable if:

  • Its cardinality is less than or equal to (aleph-null), the cardinality of the set of natural numbers .[9]
  • There exists an injective function from to .[10][11]
  • is empty or there exists a surjective function from to .[11]
  • There exists a bijective mapping between and a subset of .[12]
  • is either finite () or countably infinite.[5]

All of these definitions are equivalent.

A set is countably infinite if:

  • Its cardinality is exactly .[9]
  • There is an injective and surjective (and therefore bijective) mapping between and .
  • has a one-to-one correspondence with .[13]
  • The elements of can be arranged in an infinite sequence , where is distinct from for and every element of is listed.[14][15]

A set is uncountable if it is not countable, i.e. its cardinality is greater than .[9]

History[edit]

In 1874, in his first set theory article, Cantor proved that the set of real numbers is uncountable, thus showing that not all infinite sets are countable.[16] In 1878, he used one-to-one correspondences to define and compare cardinalities.[17] In 1883, he extended the natural numbers with his infinite ordinals, and used sets of ordinals to produce an infinity of sets having different infinite cardinalities.[18]

Introduction[edit]

A set is a collection of elements, and may be described in many ways. One way is simply to list all of its elements; for example, the set consisting of the integers 3, 4, and 5 may be denoted , called roster form.[19] This is only effective for small sets, however; for larger sets, this would be time-consuming and error-prone. Instead of listing every single element, sometimes an ellipsis ("...") is used to represent many elements between the starting element and the end element in a set, if the writer believes that the reader can easily guess what ... represents; for example, presumably denotes the set of integers from 1 to 100. Even in this case, however, it is still possible to list all the elements, because the number of elements in the set is finite. If we number the elements of the set 1, 2, and so on, up to , this gives us the usual definition of "sets of size ".

Bijective mapping from integer to even numbers

Some sets are infinite; these sets have more than elements where is any integer that can be specified. (No matter how large the specified integer is, such as , infinite sets have more than elements.) For example, the set of natural numbers, denotable by ,[a] has infinitely many elements, and we cannot use any natural number to give its size. It might seem natural to divide the sets into different classes: put all the sets containing one element together; all the sets containing two elements together; ...; finally, put together all infinite sets and consider them as having the same size. This view works well for countably infinite sets and was the prevailing assumption before Georg Cantor's work. For example, there are infinitely many odd integers, infinitely many even integers, and also infinitely many integers overall. We can consider all these sets to have the same "size" because we can arrange things such that, for every integer, there is a distinct even integer:

or, more generally, (see picture). What we have done here is arrange the integers and the even integers into a one-to-one correspondence (or bijection), which is a function that maps between two sets such that each element of each set corresponds to a single element in the other set. This mathematical notion of "size", cardinality, is that two sets are of the same size if and only if there is a bijection between them. We call all sets that are in one-to-one correspondence with the integers countably infinite and say they have cardinality .

Georg Cantor showed that not all infinite sets are countably infinite. For example, the real numbers cannot be put into one-to-one correspondence with the natural numbers (non-negative integers). The set of real numbers has a greater cardinality than the set of natural numbers and is said to be uncountable.

Formal overview[edit]

By definition, a set is countable if there exists a bijection between and a subset of the natural numbers . For example, define the correspondence

Since every element of is paired with precisely one element of , and vice versa, this defines a bijection, and shows that is countable. Similarly we can show all finite sets are countable.

As for the case of infinite sets, a set is countably infinite if there is a bijection between and all of . As examples, consider the sets , the set of positive integers, and , the set of even integers. We can show these sets are countably infinite by exhibiting a bijection to the natural numbers. This can be achieved using the assignments and , so that

Every countably infinite set is countable, and every infinite countable set is countably infinite. Furthermore, any subset of the natural numbers is countable, and more generally:

Theorem — A subset of a countable set is countable.[20]

The set of all ordered pairs of natural numbers (the Cartesian product of two sets of natural numbers, is countably infinite, as can be seen by following a path like the one in the picture:

The Cantor pairing function assigns one natural number to each pair of natural numbers

The resulting mapping proceeds as follows:

This mapping covers all such ordered pairs.

This form of triangular mapping recursively generalizes to -tuples of natural numbers, i.e., where and are natural numbers, by repeatedly mapping the first two elements of an -tuple to a natural number. For example, can be written as . Then maps to 5 so maps to , then maps to 39. Since a different 2-tuple, that is a pair such as , maps to a different natural number, a difference between two n-tuples by a single element is enough to ensure the n-tuples being mapped to different natural numbers. So, an injection from the set of -tuples to the set of natural numbers is proved. For the set of -tuples made by the Cartesian product of finitely many different sets, each element in each tuple has the correspondence to a natural number, so every tuple can be written in natural numbers then the same logic is applied to prove the theorem.

Theorem — The Cartesian product of finitely many countable sets is countable.[21][b]

The set of all integers and the set of all rational numbers may intuitively seem much bigger than . But looks can be deceiving. If a pair is treated as the numerator and denominator of a vulgar fraction (a fraction in the form of where and are integers), then for every positive fraction, we can come up with a distinct natural number corresponding to it. This representation also includes the natural numbers, since every natural number is also a fraction . So we can conclude that there are exactly as many positive rational numbers as there are positive integers. This is also true for all rational numbers, as can be seen below.

Theorem —  (the set of all integers) and (the set of all rational numbers) are countable.[c]

In a similar manner, the set of algebraic numbers is countable.[23][d]

Sometimes more than one mapping is useful: a set to be shown as countable is one-to-one mapped (injection) to another set , then is proved as countable if is one-to-one mapped to the set of natural numbers. For example, the set of positive rational numbers can easily be one-to-one mapped to the set of natural number pairs (2-tuples) because maps to . Since the set of natural number pairs is one-to-one mapped (actually one-to-one correspondence or bijection) to the set of natural numbers as shown above, the positive rational number set is proved as countable.

Theorem — Any finite union of countable sets is countable.[24][25][e]

With the foresight of knowing that there are uncountable sets, we can wonder whether or not this last result can be pushed any further. The answer is "yes" and "no", we can extend it, but we need to assume a new axiom to do so.

Theorem — (Assuming the axiom of countable choice) The union of countably many countable sets is countable.[f]

Enumeration for countable number of countable sets

For example, given countable sets , we first assign each element of each set a tuple, then we assign each tuple an index using a variant of the triangular enumeration we saw above:

We need the axiom of countable choice to index all the sets simultaneously.

Theorem — The set of all finite-length sequences of natural numbers is countable.

This set is the union of the length-1 sequences, the length-2 sequences, the length-3 sequences, each of which is a countable set (finite Cartesian product). So we are talking about a countable union of countable sets, which is countable by the previous theorem.

Theorem — The set of all finite subsets of the natural numbers is countable.

The elements of any finite subset can be ordered into a finite sequence. There are only countably many finite sequences, so also there are only countably many finite subsets.

Theorem — Let and be sets.

  1. If the function is injective and is countable then is countable.
  2. If the function is surjective and is countable then is countable.

These follow from the definitions of countable set as injective / surjective functions.[g]

Cantor's theorem asserts that if is a set and is its power set, i.e. the set of all subsets of , then there is no surjective function from to . A proof is given in the article Cantor's theorem. As an immediate consequence of this and the Basic Theorem above we have:

Proposition — The set is not countable; i.e. it is uncountable.

For an elaboration of this result see Cantor's diagonal argument.

The set of real numbers is uncountable,[h] and so is the set of all infinite sequences of natural numbers.

Minimal model of set theory is countable[edit]

If there is a set that is a standard model (see inner model) of ZFC set theory, then there is a minimal standard model (see Constructible universe). The Löwenheim–Skolem theorem can be used to show that this minimal model is countable. The fact that the notion of "uncountability" makes sense even in this model, and in particular that this model M contains elements that are:

  • subsets of M, hence countable,
  • but uncountable from the point of view of M,

was seen as paradoxical in the early days of set theory; see Skolem's paradox for more.

The minimal standard model includes all the algebraic numbers and all effectively computable transcendental numbers, as well as many other kinds of numbers.

Total orders[edit]

Countable sets can be totally ordered in various ways, for example:

  • Well-orders (see also ordinal number):
    • The usual order of natural numbers (0, 1, 2, 3, 4, 5, ...)
    • The integers in the order (0, 1, 2, 3, ...; −1, −2, −3, ...)
  • Other (not well orders):
    • The usual order of integers (..., −3, −2, −1, 0, 1, 2, 3, ...)
    • The usual order of rational numbers (Cannot be explicitly written as an ordered list!)

In both examples of well orders here, any subset has a least element; and in both examples of non-well orders, some subsets do not have a least element. This is the key definition that determines whether a total order is also a well order.

See also[edit]

Notes[edit]

  1. ^ a b Since there is an obvious bijection between and , it makes no difference whether one considers 0 a natural number or not. In any case, this article follows ISO 31-11 and the standard convention in mathematical logic, which takes 0 as a natural number.
  2. ^ Proof: Observe that is countable as a consequence of the definition because the function given by is injective.[22] It then follows that the Cartesian product of any two countable sets is countable, because if and are two countable sets there are surjections and . So is a surjection from the countable set to the set and the Corollary implies is countable. This result generalizes to the Cartesian product of any finite collection of countable sets and the proof follows by induction on the number of sets in the collection.
  3. ^ Proof: The integers are countable because the function given by if is non-negative and if is negative, is an injective function. The rational numbers are countable because the function given by is a surjection from the countable set to the rationals .
  4. ^ Proof: Per definition, every algebraic number (including complex numbers) is a root of a polynomial with integer coefficients. Given an algebraic number , let be a polynomial with integer coefficients such that is the -th root of the polynomial, where the roots are sorted by absolute value from small to big, then sorted by argument from small to big. We can define an injection (i. e. one-to-one) function given by , where is the -th prime.
  5. ^ Proof: If is a countable set for each in , then for each there is a surjective function and hence the function
    given by is a surjection. Since is countable, the union is countable.
  6. ^ Proof: As in the finite case, but and we use the axiom of countable choice to pick for each in a surjection from the non-empty collection of surjections from to .[26] Note that since we are considering the surjection , rather than an injection, there is no requirement that the sets be disjoint.
  7. ^ Proof: For (1) observe that if is countable there is an injective function . Then if is injective the composition is injective, so is countable. For (2) observe that if is countable, either is empty or there is a surjective function . Then if is surjective, either and are both empty, or the composition is surjective. In either case is countable.
  8. ^ See Cantor's first uncountability proof, and also Finite intersection property#Applications for a topological proof.

Citations[edit]

  1. ^ Manetti, Marco (19 June 2015). Topology. Springer. p. 26. ISBN 978-3-319-16958-3.
  2. ^ Rudin 1976, Chapter 2
  3. ^ Tao 2016, p. 181
  4. ^ Kamke 1950, p. 2
  5. ^ a b Lang 1993, §2 of Chapter I
  6. ^ Apostol 1969, p. 23, Chapter 1.14
  7. ^ Thierry, Vialar (4 April 2017). Handbook of Mathematics. BoD - Books on Demand. p. 24. ISBN 978-2-9551990-1-5.
  8. ^ Mukherjee, Subir Kumar (2009). First Course in Real Analysis. Academic Publishers. p. 22. ISBN 978-81-89781-90-3.
  9. ^ a b c Yaqub, Aladdin M. (24 October 2014). An Introduction to Metalogic. Broadview Press. ISBN 978-1-4604-0244-3.
  10. ^ Singh, Tej Bahadur (17 May 2019). Introduction to Topology. Springer. p. 422. ISBN 978-981-13-6954-4.
  11. ^ a b Katzourakis, Nikolaos; Varvaruca, Eugen (2 January 2018). An Illustrative Introduction to Modern Analysis. CRC Press. ISBN 978-1-351-76532-9.
  12. ^ Halmos 1960, p. 91
  13. ^ Kamke 1950, p. 2
  14. ^ Dlab, Vlastimil; Williams, Kenneth S. (9 June 2020). Invitation To Algebra: A Resource Compendium For Teachers, Advanced Undergraduate Students And Graduate Students In Mathematics. World Scientific. p. 8. ISBN 978-981-12-1999-3.
  15. ^ Tao 2016, p. 182
  16. ^ Stillwell, John C. (2010), Roads to Infinity: The Mathematics of Truth and Proof, CRC Press, p. 10, ISBN 9781439865507, Cantor's discovery of uncountable sets in 1874 was one of the most unexpected events in the history of mathematics. Before 1874, infinity was not even considered a legitimate mathematical subject by most people, so the need to distinguish between countable and uncountable infinities could not have been imagined.
  17. ^ Cantor 1878, p. 242.
  18. ^ Ferreirós 2007, pp. 268, 272–273.
  19. ^ "What Are Sets and Roster Form?". expii. 2021-05-09. Archived from the original on 2020-09-18.
  20. ^ Halmos 1960, p. 91
  21. ^ Halmos 1960, p. 92
  22. ^ Avelsgaard 1990, p. 182
  23. ^ Kamke 1950, pp. 3–4
  24. ^ Avelsgaard 1990, p. 180
  25. ^ Fletcher & Patty 1988, p. 187
  26. ^ Hrbacek, Karel; Jech, Thomas (22 June 1999). Introduction to Set Theory, Third Edition, Revised and Expanded. CRC Press. p. 141. ISBN 978-0-8247-7915-3.

References[edit]