This application separates local density from the existence of a single enumeration. We use the following map conventions and then construct rational lists, algebraic root lists, and rational interval bases.
Density, countability and rational intervals
A set is dense if every nonempty open interval contains an element of . Rational density implies irrational density: fix an irrational and choose rational . Then is irrational. Thus a countable set can be dense, and two disjoint dense sets can coexist. Density and cardinality answer different questions.
An injection into the natural numbers gives an enumeration
Lemma. Use . If there is an injection , then is countable in the stated sense: finite or bijective with .
Proof. Put . The map is a bijection. If is finite, is finite as well, including the empty case. If is infinite, define and, for every ,
Removing finitely many members from an infinite set leaves a nonempty set, so each minimum exists by well-ordering. The choices are strictly increasing, and induction gives . They exhaust : if some were never selected, it would still be available at stage , so minimality would give , contradicting . Thus is a bijection . For each , take the unique with . Then is a bijection , since the list reaches every image value exactly once and is injective. This proves countability without choosing any unspecified family of enumerations.
Consequently, the least-index injections constructed below prove countability under the original finite-or-bijective definition, not merely a cardinal inequality.
Quick check
(Use the lemma to show that the set of all finite subsets of is countable. Give the injection explicitly.)
Read a finite set as the positions of the digits in a binary numeral.
Solution · Answer
Define by , with . The sum is finite, so . It is injective because binary representations are unique: if , let be the largest element lying in exactly one of the two sets, say . The terms above agree, and , so . By the lemma, is countable. In fact is a bijection onto , but injectivity is all the lemma needs.
Prerequisites and map conventions
Here , , , and . A set is countable if it is finite or bijective with . Equal cardinality means a bijection; means an injection . Countability does not mean that points are isolated, and density does not imply uncountability. An injection sends distinct inputs to distinct outputs; a bijection gives each codomain element exactly one preimage.
The definitions and proofs behind these conventions are in the following notes.
Functions used for comparing sets
Same cardinality and countability
Proof
(Worked checks on the prerequisite maps)
Worked example
(Checking the three properties)
Consider with
The map is not injective because although . It is not surjective because and are not outputs. This small example separates the two conditions: injectivity concerns repeated outputs, whereas surjectivity concerns omitted codomain elements.
Worked example
(Why the rational diagonal scan works)
Take . It is already in lowest terms and lies on the diagonal . Only finitely many diagonals precede diagonal , and diagonal contains only finitely many pairs. Thus is reached at a finite position. Conversely, retaining only coprime pairs means that two recorded pairs cannot represent the same positive rational: uniqueness of lowest terms forces to be the same pair. The scan is therefore both onto and one-to-one.
Worked example
(A finite comparison with unused codomain elements)
The map given by , , is injective. Thus . It is not surjective because is unused. The inequality is in fact strict, but for a different reason: finite sets with and elements admit no bijection. A single non-surjective injection does not by itself prove a strict inequality; on is injective and not surjective, yet .
Theorem 4.1.1
( is dense in )
Let and let . By the Archimedean property, choose such that
Choose the largest integer satisfying
Then
Dividing by gives
Thus
satisfies . Therefore is dense in .
The integer-part step also has a concrete justification. For , choose a positive integer . The set is nonempty by the Archimedean property. Its least member is positive, so minimality gives . Thus is an integer with , exactly the integer used above. This works for negative as well as positive .
With , the largest-integer step in this proof produces the decimal truncation of : . The builder below shows these rational brackets for and for at depths to , each of width ; any depth with supplies the rational of the theorem.
Build decimal approximations as shrinking intervals
Each extra decimal digit cuts the interval into tenths and keeps one. Watch the width shrink by a factor of 10.
- Integer part
1 ≤ x < 2
Interval width 1 - 1 decimal place
1.4 ≤ x < 1.5
Interval width 0.1 - 2 decimal places
1.41 ≤ x < 1.42
Interval width 0.01 - 3 decimal places
1.414 ≤ x < 1.415
Interval width 0.001
- Current interval
- 1.414 ≤ x < 1.415
- Lower bound
- 1.414 (included)
- Upper bound
- 1.415 (excluded)
- Interval width
- 0.001
The number lies in the current interval
1.414² = 1.999396 ≤ 2 < 2.002225 = 1.415², so √2 lies in this interval of width 0.001. Since √2 is irrational, no finite stage equals it; each stage only bounds it.
NoticeUsing sqrt(2) makes the link to irrational numbers explicit: no finite decimal stage reaches the exact number, but the intervals keep shrinking around it.
Quick check
(Follow the density proof for and : choose , find , and check that .)
For a negative number, the largest integer below it is the more negative neighbor.
Solution · Answer
The Archimedean step needs ; take . Then , and the largest integer is , not . Hence and . Indeed . The approximating rational lies below , as the inequality requires.
Countable unions of countable sets
Theorem 4.1.2
(A countable union of countable sets is countable)
Assuming the axiom of choice, if is a countable family of countable sets, then
is countable.
Common mistake
(Countable union is not the same as arbitrary union)
The theorem here is about a countable family . It does not say that an arbitrary union of countable sets must be countable.
The polynomial fact used here
A polynomial over a field is a finite-support coefficient list. The fact needed for the enumeration below is precise: a nonzero polynomial of degree over , or has at most distinct roots in that field (and a rational polynomial is also a real polynomial). A nonzero constant has no roots; the zero polynomial is excluded. Degree arithmetic, division by a nonzero polynomial, the remainder/factor theorem, and the complete root-bound induction are proved in the following notes.
Polynomials as finite formal sums
Addition, multiplication, and degree
How many roots can a nonzero polynomial have?
Countable products and unions with supplied enumerations
Let . For each , suppose a domain and a surjection are given together as one family of data. Empty sets use ; a finite list may use a finite . Under these hypotheses is countable. Likewise, the product of two sets with supplied enumerations is countable.
Proof. Fix the bijection given by
It scans successive finite diagonals. For a union, retain only pairs with and , and, in order of their -indices, output . Every member of the union occurs because its supplied map is surjective. For each output , the set of indices at which occurs is a nonempty subset of , so it has a unique least member. Assigning that least index is injective: one index corresponds to one pair and hence one output. Thus the union is countable; the empty union is immediate. This construction uses the supplied enumeration of each set.
For a product , use the supplied maps and and retain only pairs . The output reaches every product element; assigning the least valid -index of each output proves countability as above. If either factor is empty, the product is empty.
Proof X-ray
Where the supplied enumerations do the work
The argument has two separate jobs. Surjectivity of each supplied map is what makes the scan reach every member of the union; the diagonal bijection only fixes the order in which pairs are visited. Injectivity comes from a different move: the output list may repeat elements, so each element keeps only the least index at which it appears, and the well-ordering of makes that index unique. No choice occurs, because the maps are part of the data. Without such a family, picking one enumeration for every is exactly where the axiom of choice enters the earlier theorem.
Quick check
(For let , and let be the listing of . Supply surjections as in the theorem above and conclude that is countable without the axiom of choice.)
One explicit rule must define every at once.
Solution · Answer
Take , and . Each maps onto , because every integer equals some . One rule defines all the maps, so they form a single family of data, as the theorem requires. Every rational is with and , so , and the theorem makes countable. Repetitions such as are harmless: each rational keeps only its least index.
Uniform rational lists. Fix an enumeration of as . For each fixed , enumerate index tuples in by increasing coordinate sum and then lexicographically, and send to . Every tuple occurs; each diagonal is finite. For use the single empty tuple. These rules supply the lists simultaneously for all , so the union of finite rational strings is countable without choosing unspecified lists.
A nonzero rational-coefficient polynomial has finitely many real roots. For each nonzero polynomial in the supplied countable list, list its real roots in increasing order, using an empty list if it has none. Every finite subset of has a unique increasing listing, so this rule supplies the entire family of root lists without an arbitrary choice of enumerations. Their union is the set of real algebraic numbers, hence it is countable.
History of an idea
Countable algebraic numbers and uncountable reals in Cantor's 1874 paper
The enumeration just given, and the transcendence conclusion drawn from it below, follow the shape of Georg Cantor's first results on infinite sets. MacTutor's biography reports that in 1873 Cantor proved that the rational numbers can be placed in one-one correspondence with the natural numbers, and showed that the algebraic numbers, the roots of polynomial equations with integer coefficients, are countable as well. By December 1873 he had proved that the real numbers are not countable, and he published this in 1874. The idea of a one-one correspondence appears in that paper for the first time, but only implicitly; his paper of 1878 makes it precise, discussing denumerable sets and sets of equal power. Cantor exchanged letters with Richard Dedekind throughout this period, and the biography notes that his published proofs did not acknowledge significant contributions from Dedekind. The 1874 paper also changed what an existence proof for transcendental numbers could look like. Liouville had established in 1851 that transcendental numbers exist; Cantor's comparison showed that, in a certain sense, almost all real numbers are transcendental, without exhibiting a single one. This is the non-constructive conclusion of the section on transcendental numbers below.
Examples
Countable dense rational points. The rational points can be indexed even though every interval contains infinitely many of them. Listing them by denominator and numerator does not make them isolated.
Finite rational data. For each fixed , rational -tuples form a countable set by repeated products. The union over shows that all finite rational strings are countable; in particular, rational-coefficient polynomials are countable. Every nonzero polynomial has finitely many roots, so the algebraic real numbers are countable. Since is uncountable, transcendental numbers exist.
Transcendental numbers occur in every open interval
The polynomial enumeration above proves that the set of real algebraic numbers is countable. It does not locate any particular transcendental decimal, but it does give a stronger existence conclusion than a single example. Fix . The interval is uncountable, since an affine change carries it bijectively to , which the cardinality unit shows is in bijection with and hence uncountable. If were countable, it and the countable subset would have countable union , a contradiction. Thus every nonempty open interval contains uncountably many transcendental numbers.
Practice and full solution. Does density alone prove this conclusion? No: the algebraic numbers themselves contain all rationals and are dense, yet countable. The proof requires the uncountability of each interval and the independently established countability of the removed set. It proves abundance in every interval without asserting a specific cardinal equality for every uncountable subset or relying on CH.
Practice
P01. Let . Give an explicit listing of all integers and a bijection from to the even nonnegative integers.
P02. Show that removing a countable set from an uncountable set leaves an uncountable set.
P03. Prove that every interval with contains an irrational number, using rational density.
P04. Prove that the set of open intervals with rational endpoints is countable and that every open subset of is a union of a subcollection of those intervals.
Full solutions
P01. List the integers as . The map is a bijection from to the even nonnegative integers.
P02. If the removed set and the remainder were both countable, their union would be countable, contradicting the uncountability of the original set. If the removed set is not a subset of the original set, use its intersection with the original set instead.
P03. Fix an irrational , such as . Rational density gives . Then . If it were rational, subtracting would make rational, a contradiction.
P04. Pairs of rationals are countable, so the subset whose first coordinate is less than the second is countable. If is in an open set , choose with , then choose rationals and . The interval contains and lies in . The union of all such intervals is exactly ; for the union is empty.