Use the inclusive convention: a set is countable if it admits an injective function into . This includes every finite set and the empty set. If is injective and , its restriction to is still injective, proving directly that every subset of a countable set is countable.
Enumerate pairs by diagonals. The positive-integer Cantor pairing function
is a bijection : on the diagonal , its values are through , each once, and these consecutive blocks partition . This proves countability without assuming any product theorem.
For a sequence of countable sets , choose injections . For in their union, let be the least index containing . The map
is injective: its encoded index and the injective within-set code recover . Thus a countable union of countable sets is countable. Selecting the injections for an arbitrary given family uses the usual axiom of countable choice; when the encodings are supplied, the displayed construction is entirely explicit.
For finite Cartesian powers, start with the identity injection on and recursively encode as . This proves that is countable for every positive integer and is the constructive proof of the finite Cartesian power of a countable set property.
For each positive integer , let consist of the functions for which is a period. Restriction to the residues is a bijection : any tuple extends uniquely to all of by taking residues modulo , including negative arguments. Hence is countable. Every periodic function belongs to some , so
There is no need to assume the chosen period is minimal; multiple descriptions only create overlap, which does not invalidate the union argument. This is an instance of the cardinality of integer-periodic function spaces principle.
For the cardinality of integer-periodic function spaces, fix a positive period first. A periodic function with that period is completely and uniquely determined by its values at , so this class is in bijection with . The integers are a countable set, and repeated pairing shows that a finite Cartesian product of countable sets is countable. Taking the union over positive and using the countable union of countable sets proves that the integer-domain periodic functions form a countable set.
For the rational domain, even period one leaves infinitely many independent choices. Let for ; these are distinct members of . For every subset , define
The fractional part is unchanged by adding one, so is an integer-valued periodic function on . Distinct subsets give distinct functions because records whether . Thus the uncountable power set of injects into these functions. The rational-domain periodic functions form an uncountable set. The difference is that has only finitely many residue classes modulo a fixed integer period, whereas has infinitely many.