# Baire space (set theory)

In set theory, the Baire space is the set of all infinite sequences of natural numbers with a certain topology, called the product topology. This space is commonly used in descriptive set theory, to the extent that its elements are often called "reals". It is denoted by $\mathbb {N} ^{\mathbb {N} }$, or $^ω$ω, or by the symbol ${\mathcal {N}}$ or sometimes by ω$^ω$ (not to be confused with the countable ordinal obtained by ordinal exponentiation).
The Baire space is defined to be the Cartesian product of countably infinitely many copies of the set of natural numbers, and is given the product topology (where each copy of the set of natural numbers is given the discrete topology). The Baire space is often represented using the tree of finite sequences of natural numbers.
(This space should also not be confused with the concept of a Baire space, which is a certain kind of topological space.)
The Baire space can be contrasted with Cantor space, the set of infinite sequences of binary digits.

## Topology and trees

The product topology used to define the Baire space can be described in one of two equivalent ways: in terms of a basis consisting of cylinder sets, or of a basis of trees.

### Cylinder set basis

The basic open sets of the product topology are cylinder sets. These can be characterized as:
    If any finite set of natural number coordinates I={i} is selected, and for each i a particular natural number value v$_i$ is selected, then the set of all infinite sequences of natural numbers that have value v$_i$ at position i is a basic open set. Every open set is a countable union of a collection of these.
Using more formal notation, one can define the individual cylinders as
    $C_{n}[v]=\{(a_{1},a_{2},\cdots )\in \omega ^{\omega }:a_{n}=v\}$
for a fixed integer location n and integer value v. The cylinders are then the generators for the cylinder sets: the cylinder sets then consist of all intersections of a finite number of cylinders. That is, given any finite set of natural number coordinates $I\subseteq \omega$ and corresponding natural number values $v_{i}$ for each $i\in I$, one considers the finite intersection of cylinders
    $\bigcap _{i\in I}C_{i}[v_{i}]$
This intersection is called a cylinder set, and the set of all such cylinder sets provides a basis for the product topology. Every open set is a countable union of such cylinder sets.

### Tree basis

An alternative basis for the product topology can be given in terms of trees. The basic open sets can be characterized as:
    If a finite sequence of natural numbers {w$_i$ : i < n} is selected, then the set of all infinite sequences of natural numbers that have value w$_i$ at position i for all i < n is a basic open set. Every open set is a countable union of a collection of these.
Thus a basic open set in the Baire space is the set of all infinite sequences of natural numbers extending a common finite initial segment σ. This leads to a representation of the Baire space as the set of all infinite paths passing through the full tree ω$^{<ω}$ of finite sequences of natural numbers ordered by extension. Each finite initial segment σ is a node of the tree of finite sequences. Each open set is determined by a countable union S of nodes of that tree. A point in Baire space is in an open set if and only if its path goes through one of the nodes in its determining union. Conversely, each open set corresponds to a subtree S of the full tree ω$^{<ω}$, consisting of at most a countable number of nodes.
The representation of the Baire space as paths through a tree also gives a characterization of closed sets as complements of subtrees defining the open sets. Every point in Baire space passes through a sequence of nodes of ω$^{<ω}$. Closed sets are complements of open sets. This defines a subtree T of the full tree ω$^{<ω}$, in which the nodes of S defining the open set are missing. The subtree T consists of all nodes in ω$^{<ω}$ that are not in S. This subtree T defines a closed subset C of Baire space such that any point x is in C if and only if x is a path through T. Conversely, for any closed subset C of Baire space there is a subtree T which consists of all of ω$^{<ω}$ with at most a countable number of nodes removed.
Since the full tree ω$^{<ω}$ is itself countable, this implies the closed sets correspond to any subtree of the full tree, including finite subtrees. Thus, the topology consists of clopen sets. This implies that the Baire space is zero-dimensional with respect to the small inductive dimension (as are all spaces whose base consists of clopen sets.)
The above definitions of open and closed sets provide the first two sets $\mathbf {\Sigma } _{1}^{0}$ and $\mathbf {\Pi } _{1}^{0}$ of the boldface Borel hierarchy.

### Box topology

Cartesian products also have an alternate topology, the box topology. This topology is much finer than the product topology as it does not limit the indicator set $I=\{i\in \omega \}$ to be finite. Conventionally, Baire space does not refer to this topology; it only refers to the product topology.

## Weight

The above definition of the Baire space generalizes to one where the elements $x_{i}$ of the countably infinite sequence $(x_{1},x_{2},\cdots )$ are chosen from a set $D(\kappa )$ of cardinality $\kappa$. Such a space is called a Baire space of weight $\kappa$ and can be denoted as $B(\kappa )$. With this definition, the Baire spaces of finite weight would correspond to the Cantor space. The first Baire space of infinite weight is then $B(\aleph _{0})$; it is homeomorphic to $\omega ^{\omega }$ defined above.

## Metric

Given two sequences $x=(x_{1},x_{2},\cdots )$ and $y=(y_{1},y_{2},\cdots )$, a metric $\rho (x,y)$ may be defined as $\rho (x,y)=1/k$ where $k$ is the least integer such that $x_{k}\neq y_{k}.$ With this metric, the basic open sets of the tree basis are balls of radius $1/k$.
A metric space $X$ embeds into the Baire space $B(\kappa )$ if and only if $X$ poses a base ${\mathcal {B}}$ of clopen sets, where the cardinality of ${\mathcal {B}}$ is less than or equal to $\kappa$.

## Properties

The Baire space has the following properties:
* It is a perfect Polish space, which means it is a completely metrizable second countable space with no isolated points. As such, it has the same cardinality as the real line and is a Baire space in the topological sense of the term.
* It is zero-dimensional and totally disconnected.
* It is not locally compact.
* It is universal for Polish spaces in the sense that it can be mapped continuously onto any non-empty Polish space. Moreover, any Polish space has a dense G$_δ$ subspace homeomorphic to a G$_δ$ subspace of the Baire space.
* The Baire space is homeomorphic to the product of any finite or countable number of copies of itself.
* It is the automorphism group of a countably infinite saturated model $M$ of some complete theory $T$.

## Relation to the real line

The Baire space is homeomorphic to the set of irrational numbers when they are given the subspace topology inherited from the real line. A homeomorphism between Baire space and the irrationals can be constructed using continued fractions. That is, given a sequence of natural numbers $(a_{0},a_{1},a_{2},\cdots )\in \omega ^{\omega }$, we can assign a corresponding irrational number greater than 1
    $x=[a_{0};a_{1},a_{2},\cdots ]=a_{0}+{\frac {1}{a_{1}+{\frac {1}{a_{2}+\cdots }}}}$
Using $x\mapsto {\frac {1}{x}}$ we get another homeomorphism from $\omega ^{\omega }$ to the irrationals in the open unit interval $(0,1)$ and we can do the same for the negative irrationals. We see that the irrationals are the topological sum of four spaces homeomorphic to the Baire space and therefore also homeomorphic to the Baire space.
From the point of view of descriptive set theory, Baire spaces are more flexible than the real line in the following sense. Because the real line is path-connected, so is every continuous image of a real line. In contrast, every Polish space is the continuous image of Baire space. This difference makes the real line "slightly awkward to use", despite the focus of descriptive set theory on sets of reals. Instead, it is often possible to prove results about arbitrary Polish spaces by showing that these properties hold for Baire space and are preserved by continuous functions.
ω$^ω$ is also of independent, but minor, interest in real analysis, where it is considered as a uniform space. The uniform structures of ω$^ω$ and Ir (the irrationals) are different, however: ω$^ω$ is complete in its usual metric while Ir is not (although these spaces are homeomorphic).

## The shift operator

The shift operator on Baire space, when mapped to the unit interval of the reals, becomes the Gauss–Kuzmin–Wirsing operator $h(x)=1/x-\lfloor 1/x\rfloor$. That is, given a sequence $(a_{1},a_{2},\cdots )$, the shift operator T returns $T(a_{1},a_{2},\cdots )=(a_{2},\cdots )$. Likewise, given the continued fraction $x=[a_{1},a_{2},\cdots ]$, the Gauss map returns $h(x)=[a_{2},\cdots ]$. The corresponding operator for functions from Baire space to the complex plane is the Gauss–Kuzmin–Wirsing operator; it is the transfer operator of the Gauss map. That is, one considers maps $\omega ^{\omega }\to \mathbb {C}$ from Baire space to the complex plane $\mathbb {C}$. This space of maps inherits a topology from the product topology on Baire space; for example, one may consider functions having uniform convergence. The shift map, acting on this space of functions, is then the GKW operator.
The Haar measure of the shift operator, that is, a function that is invariant under shifts, is given by the Minkowski measure $(...)'$. That is, one has that $(TE)'=E'$, where T is the shift and E any measurable subset of ω$^ω$.