Countable set Created 2026-09-24 Updated 2026-10-14
A countable set is a set that admits an injective function into the natural numbers. It is therefore either a finite set or a countably infinite set.
For a countably infinite set, countability means that its members can be arranged as a sequence in which every member occurs exactly once. The order need not resemble the order already present in the set. For example, the integers can be listed as . Simply increasing through positive values would never reach a negative one.
The Cartesian product needs a similar change of strategy. Listing a whole horizontal row first would never finish that row, so later rows would be missed. Instead list pairs by increasing coordinate sum , and within each finite diagonal by increasing :
Every pair has a finite coordinate sum and therefore appears after finitely many earlier pairs. This is the construction made explicit by the Cantor pairing function. It explains why having two infinite coordinates does not, by itself, mean a larger cardinality.
Figure 1.
Enumerating natural-number pairs along finite diagonals reaches every point of the infinite grid
. Details.
Counting measure Created 2026-09-29 Updated 2026-10-14
Counting measure makes integration into summation by giving every measurable singleton unit weight. On any measurable space , it is the measure defined by
Thus , a finite set has its usual cardinality, and every infinite set has the same value in the extended real number line. In particular, countably infinite sets and uncountable sets are not distinguished by their counting measure. Taking to be the power set makes every subset measurable; restricting the same rule to a smaller sigma-algebra is also allowed. [ref]
Why is this a countably additive measure? For pairwise disjoint measurable sets ,
If the union is finite, only finitely many are nonempty, and finite cardinality adds. If the union is infinite, either one is infinite or infinitely many are nonempty; in both cases the nonnegative series on the right is infinite. For example, and have counting measures and , and their union has counting measure . The singletons for positive natural numbers give the infinite case: .
With the power set as sigma-algebra, counting measure is a finite measure exactly when is finite, and a sigma-finite measure exactly when is at most countable. For the latter assertion, enumerate by measurable singletons; conversely, every finite-measure set is finite, and a countable union of finite sets is countable. Specifying the sigma-algebra matters: if and , counting measure is not a sigma-finite measure, since the only measurable finite-measure set is the empty set.
For a finite or countably infinite set equipped with its power set, every nonnegative function is a measurable function, and
The supremum allows an infinite result and avoids choosing an order for the terms. On a finite set, expand as a simple function using singleton indicator functions. On a countably infinite set, enumerate the points and apply the monotone convergence theorem to finite truncations. Real or complex functions are integrable functions for counting measure exactly when ; then their integral equals the absolutely convergent sum. This is the discrete counterpart of Lebesgue integration, developed further in series as a Lebesgue integral against counting measure. [ref]
For example, on the positive natural numbers has counting measure integral one, by the geometric series. The alternating harmonic series has a finite ordered sum but is not the integral of an integrable function for counting measure: its positive and negative parts both have infinite sums. Absolute convergence is what makes the finite integral independent of enumeration. In particular, the Lp spaces for counting measure on are the l-p sequence spaces, with their sums replacing continuous integrals.
Compare three measures on the same Borel sigma-algebra of the real numbers: counting measure , Dirac measure , and Lebesgue measure .
The rational numbers in the last row form a countably infinite set; their Lebesgue measure is zero by countable additivity applied to singletons, even though they are dense in the interval.
Figure 1.
The same Borel sets have different sizes under counting measure, Dirac measure, and Lebesgue measure
. Original analytical comparison on the real numbers, with the selected point marked in orange. Drawings show the finite sets and the interval; the rational numbers are named symbolically because finitely many plotted points cannot depict that infinite dense set. Green zero entries mark the null sets for each column's measure. Details.
These are different answers to different questions: counting measure asks how many points occur, Dirac measure asks whether the selected point occurs, and Lebesgue measure asks how much length occurs. A null set therefore depends on its measure. For counting measure, the only null set is the empty set, so equality almost everywhere is equality everywhere. For , a measurable set is a null set exactly when it misses ; for Lebesgue measure, even the infinite set is a null set. Integrating an indicator function recovers each table entry through . This lets the same Lebesgue integral framework handle point counts, point evaluation, and geometric length.
Hausdorff dimension 2026-10-14
The Hausdorff dimension is the critical exponent at which Hausdorff measure changes from infinite to zero:
with the standard endpoint convention for an empty supremum. This measures fine-scale geometric size rather than the number of coordinates used to describe the set. A line segment has Hausdorff dimension one; a square has dimension two; the middle-third Cantor set has dimension .
Why can a dimension be fractional? At a scale reduced by a factor of three, the Cantor set needs twice as many construction intervals. The balance gives , between the growth rates of finitely many points and a whole interval. Making this argument rigorous requires a cover upper bound and the mass distribution principle lower bound, as in Hausdorff dimension of the Cantor set.
At the critical exponent itself, Hausdorff measure can be zero, finite and positive, or infinite; dimension does not specify that endpoint value. For example, finite sets and countably infinite sets both have dimension zero, although their counting measures differ. Dimension is also different from a finite-resolution estimate: box-counting dimension is another asymptotic definition, and fitting a scaling slope over a handful of observed scales does not establish either dimension.
The metric matters. Multiplying every distance by a fixed positive constant multiplies by that constant to the power and preserves Hausdorff dimension. A Lipschitz map cannot increase it, because mapped cover diameters increase by at most a fixed factor. A bi-Lipschitz map therefore preserves it by applying this fact in both directions. These properties make Hausdorff dimension useful for comparing geometric models while controlling how their measurements change.
An infinite Dedekind-finite set is an infinite set with no subset that is a countably infinite set. The name Dedekind set is sometimes used for this combination of properties. Under the axiom of choice no such set exists; results about these sets must avoid obtaining arbitrary enumerations of finite subsets by unstated choices.
Infinite set 2026-10-03
An infinite set is a set with infinitely many elements. Equivalently, assuming the axiom of choice, it contains a countably infinite set.
Pairing function Created 2026-10-03 Updated 2026-10-14
A pairing function is a computable function that gives a bijection from the Cartesian product to , with two computable functions recovering its coordinates. Here consists of the natural numbers, including zero. If is the pairing function and its decoding functions, the requirements are
Every ordered pair has exactly one code, every code represents an ordered pair, and decoding always terminates. For a bijection given by a total computable function, computability of the inverse function also follows by enumerating all ordered pairs until the one with code appears. A primitive recursive pairing function makes the stronger requirement that both encoding and coordinate decoding are primitive recursive.
The Cantor pairing function makes this concrete through triangular numbers:
On the diagonal , list . There are ordered pairs there, and ordered pairs on earlier diagonals. Their codes therefore occupy precisely the consecutive natural numbers from through . These intervals touch without overlapping and cover all natural numbers; within each interval the offset determines the ordered pair. This proves both injectivity and surjectivity, hence the bijection. It also explains why the infinite grid is a countably infinite set: every ordered pair is reached after finitely many steps. A row-by-row listing would never finish its first infinite row. Authored treatments give the same diagonal construction with the coordinates exchanged.[ref]
For example, the Cantor pairing function gives
The order of the coordinates matters: and are different ordered pairs with different codes.
Figure 1.
The Cantor pairing function on a finite window: labels are codes, and the first 21 ordered pairs fill diagonals zero through five
. Details.
To decode a natural number , find the unique diagonal index satisfying
The inequality gives , so both recovered coordinates are natural numbers. At , , hence , , and . At , and both coordinates are zero. Solving the quadratic inequality gives the equivalent floor function expression
This is exact as a statement about the real numbers and their square roots. An implementation using floating-point arithmetic can round across a diagonal boundary, especially for large . Use an exact integer square root instead: with computed using integer arithmetic, . Alternatively, search for the diagonal using exact integer comparisons. The primitive recursive pairing function proof below uses bounded minimization and needs no approximate square root.
A pairing function is a reversible encoding: unlike a hash function mapping arbitrarily many inputs into a fixed finite range, it loses no coordinates. This works because the mathematical natural numbers have no upper bound. A machine word with binary digits has possible values, while two such words have possible ordered pairs; a bijection into one word of the same width is impossible. Evaluating the Cantor pairing function in a fixed-width integer type can overflow, including in the intermediate product . Exact implementation requires sufficiently large integer storage or an explicit restricted input range. One mathematical code need not occupy fewer binary digits than its two inputs.
Iterating a pairing function gives a reversible encoding of tuples of any fixed positive length. With the left-nesting convention, the Cantor pairing function encodes as
Decode the outer ordered pair first: gives . Decode its first coordinate to recover , giving the nested ordered pair and thus the original tuple .
Figure 2.
Decoding a known three-entry tuple: first unpair 257 into (18, 4), then unpair 18 into (2, 3)
. Details.
The tuple length and nesting convention must be known. The same code represents as a two-entry tuple and as a three-entry tuple; nesting alone does not make variable-length tuples self-describing. To encode variable-length tuples, supply their length or another explicit termination convention as part of the encoding. This simple change of representation is useful in computability theory and Gödel numbering: a function of several natural numbers can be studied through a single numerical input, while all coordinates remain recoverable. The striking fact is that a whole infinite grid can be serialized without omitting a point.
A historical reference for comparing sets through bijections is Georg Cantor's paper Ein Beitrag zur Mannigfaltigkeitslehre, published in 1878 in volume 84 of Journal für die reine und angewandte Mathematik, pages 242–258.[ref]
The final property concerns a pointwise periodic self-map. Such a map is a bijection: each point has a predecessor in its finite cycle, giving surjectivity; if , choose a common multiple of periods of and apply to get . Its finite cycles are therefore disjoint.
If is finite, choose the least common multiple of the finitely many cycle lengths. This positive integer gives . The empty set satisfies the property with .
Conversely, in the usual set theory with choice, every infinite contains a countably infinite set. Divide such a subset into disjoint finite blocks of sizes , , make a cyclic permutation on each block, and fix every other point. Every point returns to itself, but an identity iterate would have to be divisible by every block length . No positive integer has that property: take a block longer than that integer. Thus the uniform period criterion for pointwise periodic maps gives
The axiom of choice assumption is stated here because extracting a countably infinite subset of an arbitrary infinite set is not an unrestricted theorem in set theory without choice.
Let be the set of infinite binary sequences. Suppose it were countable and list all its members as , writing for the th entry of row . A finite listing could be repeated to make such a list as well. Define the binary sequence by . It differs from the th row in coordinate , for every . Thus it belongs to but is missing from the list, a contradiction. The set is uncountable, by Cantor's diagonal argument.
Write and enumerate . Each injective function is determined by the finite tuple . Thus these functions form a subset of the finite Cartesian product . A finite Cartesian power of a countable set is countable: for example, group the index tuples by the maximum of their coordinates, obtaining a countable union of countable sets consisting of finite groups.
There are also infinitely many such injective functions, since
defines pairwise distinct examples. Therefore is a countably infinite set.
A set is a countable set if there exists an injective function , with . Equivalently, it is a finite set or has a bijection with . An infinite countable set is called a countably infinite set.
The empty set is included: the empty function into is injective. This convention distinguishes “countable” from “countably infinite” and will also cover the finite threshold sets in the last part.
For each positive integer , consider the threshold set . If it were infinite, one could choose recursively a sequence of distinct elements from it. Every arithmetic average of that sequence would be at least , contradicting the assumed limit zero. Hence every is a finite set.
Every positive real number exceeds for some , by the Archimedean property. Therefore
A countable union of countable sets is countable, so . In fact, under the stipulated infinitude, is a countably infinite set. Positivity matters: it ensures that these thresholds cover . This is countability from vanishing averages of distinct sequences; ordinary Cesaro convergence of a sequence of one chosen enumeration would not suffice to control the whole set.
The bijections of a countably infinite set form an uncountable set. Partition an enumeration into disjoint pairs and encode an infinite binary sequence by independently fixing or swapping each pair.
If is a countably infinite set and is a finite set with at least two elements, the set of surjective functions is uncountable. Fix finitely many values to cover , then encode an arbitrary infinite binary sequence using two values of on the remaining inputs.