Borel hierarchy
In mathematical logic, the Borel hierarchy is a stratification of the Borel algebra generated by the open subsets of a Polish space; elements of this algebra are called Borel sets. Each Borel set is assigned a unique countable ordinal number called the rank of the Borel set. The Borel hierarchy is of particular interest in descriptive set theory. One common use of the Borel hierarchy is to prove facts about the Borel sets using transfinite induction on rank. Properties of sets of small finite ranks are important in measure theory and analysis. Borel sets. The Borel algebra in  an arbitrary topological space is the smallest collection of subsets of the space that contains the open sets and is closed under countable unions and complementation. It can be shown that the Borel algebra is closed under countable intersections as well. A short proof that the Borel algebra is well defined proceeds by showing that the entire powerset of the space is closed under complements and countable unions, and thus the Borel algebra is the intersection of all families of subsets of the space that have these closure properties. This proof does not give a simple procedure for determining whether  a set is Borel. A motivation for the Borel hierarchy is to provide a more explicit characterization of the Borel sets. Boldface Borel hierarchy. The Borel hierarchy or boldface Borel hierarchy on a space "X" consists of classes formula_1, formula_2, and formula_3 for every countable ordinal formula_4 greater than zero. Each of these classes consists of subsets of "X". The classes are defined inductively from the following rules: The motivation for the hierarchy is to follow the way in which a Borel set could be constructed from open sets using complementation and countable unions. A Borel set is said to  have finite rank if it is in formula_1 for some finite ordinal formula_4; otherwise it has infinite rank. If formula_21 then the hierarchy can be shown to have the following properties: Borel sets of small rank. The classes of small rank are known by alternate names in classical descriptive set theory. Lightface hierarchy. The lightface Borel hierarchy is an effective version of the boldface Borel hierarchy. It is important in effective descriptive set theory and recursion theory. The lightface Borel hierarchy extends the arithmetical hierarchy of subsets of an effective Polish space. It is closely related to the hyperarithmetical hierarchy . The lightface Borel hierarchy can be defined on any effective Polish space. It consists of classes formula_34, formula_35 and formula_36 for each nonzero countable ordinal formula_4 less than the Church–Kleene ordinal formula_38. Each class consists of subsets of the space. The classes, and codes for elements of the classes, are inductively defined as follows: A code for a lightface Borel set gives complete information about how to recover the set from sets of smaller rank. This contrasts with the boldface hierarchy, where no such effectivity is required. Each lightface Borel set has infinitely many distinct codes. Other coding systems  are possible; the crucial idea is that a code must effectively distinguish between effectively open sets, complements of sets represented by previous codes, and computable enumerations of sequences of codes. It can be shown that for each formula_50 there are sets in formula_51, and thus the hierarchy does not collapse. No new sets would be added at stage formula_38, however. A famous theorem due to Spector and Kleene states that a set is in the lightface Borel hierarchy if and only if it is at level formula_53 of the analytical hierarchy. These sets are also called hyperarithmetic. The code for  a lightface Borel set "A" can be used to inductively define a tree whose nodes are labeled by codes. The root of the tree is labeled by the code for "A". If a node is labeled by a code of the form "(1,c)" then it has a child node whose code is "c". If a node is labeled by a code of the form "(2,e)" then it has one child for each code enumerated by the program with index "e". If a node is labeled with a code of the form "(0,e)" then it has no children. This tree describes  how "A" is built from sets of smaller rank. The ordinals used in the construction of "A" ensure that this tree has no infinite path, because any infinite path through the tree would have to include infinitely many codes starting with "2", and thus would give an infinite decreasing sequence of ordinals. Conversely, if an arbitrary subtree of formula_54 has its nodes labeled by codes in a consistent way, and the tree has no infinite paths, then the code at the root of the tree is a code for a lightface Borel set. The rank of this set is bounded  by the order type of the tree in the Kleene–Brouwer order. Because the tree is arithmetically definable, this rank must be less than formula_38. This is the origin of the Church–Kleene ordinal in the definition of the lightface hierarchy.