We say that $f:\mathbb{R}\to\mathbb{R}$ is of **Baire Class $1$** if it is a pointwise limit of a sequence of continuous functions. 


One can generalize the definition above by taking pointwise limit of each 'previous' level(s) to obtain 'next' level.
More precisely,



> 
> For any countable ordinal $\xi\geq 1,$ we say that $f:\mathbb{R}\to\mathbb{R}$ is of **Baire Class $\xi$** if it is a pointwise limit of a sequence of Baire Class $\zeta$ functions where $\zeta<\xi.$
> 
> 
> 


The generalization covers the case $\xi=1$ as every continuous function is of Baire Class $0.$


When $\xi = 2,$ it is well-known that $\chi\_\mathbb{Q}$ is of Baire Class $2$ as it is a pointwise limit of $(g\_n)\_{n=1}^\infty$ where $g\_n(x) = \max\{0,1-n d(x,K)\}$ and $K$ is a finite collection of rationals. ([extracted from Wiki](https://en.wikipedia.org/wiki/Baire_function#Baire_class_2))
Since $\chi\_\mathbb{Q}$ is discontinuous everywhere, so it is not of Baire Class $1.$


[This MSE post](https://math.stackexchange.com/questions/614429/examples-of-baire-class-2-functions) also contains other Baire Class $2$ functions.


However, I fail to obtain any Baire Class $3$ function and above.



> 
> *Question*: For each countable ordinal $\xi\geq 3,$ what are some examples of Baire Class $\xi+1$ but not $\xi$ function by using the pointwise limit definition?
> 
> 
> 



Examples of Baire Class $\xi+1$ but not $\xi$ functions for each countable ordinal $\xi.$
A somewhat concrete example of function which is Baire class $\zeta$ but not Baire class $\gamma$ for any $\gamma < \zeta$ is the $\zeta$-th Turing jump. This is essentially the iterated version of Shoenfield's limit lemma. The (iterated) Turing jump naturally gives us a function $J : \{0,1\}^\omega \to \{0,1\}^\omega$, but of course we can embed $\{0,1\}^\omega$ into $\mathbb{R}$ as the Cantor middle set and extend the function, if we prefer to work with $\mathbb{R}$.


Another approach is to piggy-back on the non-collapse of the Borel hierarchy: By the Banach-Lebesgue-Hausdorff theorem, Baire class $\zeta$ and the $\Sigma^0\_{1+\zeta}$-measurable functions coincide. So the characteristic function of a $\Sigma^0\_{1+\zeta}$-complete set is Baire class $\zeta+1$, but not Baire class $\zeta$.


The example given in the question is of course a special case of the second procedure. A general construction of $\Sigma^0\_{1+\zeta}$-complete sets is found eg [in this answer](https://math.stackexchange.com/questions/1614337/borel-set-that-is-not-countable-union-or-intersection-of-open-or-closed-sets/1614718#1614718)


