Not every function on $[0,1]$ is a pointwise limit of continuous functions on $[0,1]$ How to show that not every $\mathbb{R}$-valued function on $[0,1]$ is a pointwise limit of continuous $\mathbb{R}$-valued functions on $[0,1]$?
There is a theorem that states that the set of points of discontinuity of a pointwise limit of continuous $\mathbb{R}$-valued functions is Baire first category set. So we can take, for instance, function $f=\chi([0,1]\cap \mathbb{Q})$ and this would be the function that is not a pointwise limit of continuous functions, according to the theorem.
But the theorem is strong, it states more then we need and its proof is rather non-trivial. Is there more straightforward way to show that $f=\chi([0,1]\cap \mathbb{Q})$ (or any other function) is not a pointwise limit of continuous functions?
 A: EDIT: As a consequence of reading the question too quickly, everything I've written below is about functions $\mathbb{R}\rightarrow\mathbb{R}$, not $[0, 1]\rightarrow\mathbb{R}$ - as an exercise, show that this doesn't affect anything.

Easiest (if least illuminating) way: count them.
There are $2^{2^{\aleph_0}}$-many functions from $\mathbb{R}$ to $\mathbb{R}$, but only $2^{\aleph_0}$-many of those are continuous (exercise - as well as the worst proof imaginable that there exist discontinuous functions). And the number of sequences of continuous functions is no bigger: $(2^{\aleph_0})^{\aleph_0}=2^{\aleph_0}$.
Note that this proves a stronger result: the Baire hierarchy is the hierarchy of functions you get by starting with the continuous functions and iteratively taking pointwise limits. Baire class 1 is continuous, and for $\alpha>1$, Baire class $\alpha$ is the set of functions which are the limit of a sequence of functions each individually in some $<\alpha$-level of the Baire hierarchy. The Baire hierarchy goes on for $\omega_1$-many levels, and then you stop getting any new functions. The counting argument shows that there are functions which are not Baire class $\alpha$, for any fixed countable $\alpha$. And, if the continuum hypothesis fails -  that is, if $2^{\aleph_0}>\aleph_1$ - then this argument shows there are functions which aren't in any level of the Baire hierarchy!
(By the way, there's a similar hierarchy, the Borel hierarchy, and everything I've written about the Baire hierarchy holds of the Borel hierarchy too.)
We can actually show that there are some functions not in the Baire hierarchy, without any assumptions on cardinal arithmetic. But this is a bit more complicated. It goes as follows:


*

*Fix a bijection $f$ from $\omega_1\times\mathbb{R}$ to $\mathbb{R}$. Basically, to each countable ordinal $\alpha$, $f$ associates continuum-many reals.

*Separately, for each $\alpha\in\omega_1$, fix a bijection $g_\alpha$ between $\mathbb{R}$ and the set of functions of Baire class $\alpha$. (Such a bijection exists, by the argument above; this uses transfinite induction.)

*Now we combine these! Let $\mathbb{B}$ be the set of all functions in the Baire hierarchy. We can get a function $h:\mathbb{R}\rightarrow \mathbb{B}$ as follows: given $r$, let $f^{-1}(r)=(\alpha, s)$ - we let $h(r)$ be $g_\alpha(s)$.

*At this point, check that $h$ is in fact a surjection from $\mathbb{R}$ to $\mathbb{B}$.

*And now we diagonalize! Let $F(r)=h(r)(r)+1$. Then $F\not\in\mathbb{B}$. Done!

Note that this can be made explicit: there are lots of easily-describable (if a bit messy) bijections between $\mathbb{R}$ and the set of continuous functions. And there are also lots of reasonbly natural injections of $\mathbb{R}^\omega$ and $\mathbb{R}$. Combining these, we get an explicit bijection $\beta$ from $\mathbb{R}$ to the set $\mathcal{S}$ of sequences of continuous functions. Now, we can use this to define a function $F$ which is not a pointwise limit of continuous functions as follows. If $r$ is a real, we let $F(r)$ be


*

*$1+\lim_{n\rightarrow\infty} \beta(r)(n)(r)$, if that limit exists, and

*$0$, if that limit doesn't exist.
This $F$ has a perfectly explicit, if annoyingly messy, definition. And it diagonalizes against the sequences of continuous functions, so it's not Baire class 2. Similarly, we can find explicit-if-messy functions not in Baire class $\alpha$, for any fixed countable $\alpha$. Where this breaks down is in trying to get a function which isn't in the Baire hierarchy at all: it is consistent with ZF that every function is in the Baire hierarchy (this involves killing choice to a stupidly extreme degree, however - $\omega_1$ winds up being a countable union of countable sets!).
A: Notation: Define countable as not uncountable.For any function $f$ and any set $S$ define $f^{-1}S=\{x : f(x)\in S\}$. For any family $A$ of sets, $[A]^{\leq \omega}$ denotes the family of countable subsets of $A$.Define $F_{\sigma}(A)=\{\cup B : B\in [A]^{\leq \omega}\}$  and $G_{\delta} (A)=\{\cap B :B\in [A]^{\leq \omega}\}. $ The following can be shown briefly by the most elementary means : Let $A$ be a family of subsets of $R$ (the reals). Let $(f_n)_{n\in N}$ be a sequence of real functions converging point-wise to $f$. If every $f_n$ has the property that $f_n^{-1}V\in A$ for every open $V\subset R$ ,then $$\forall x\in R (f^{-1}\{x\}\in G_{\delta}(F_{\sigma}(A)).$$ and for every open $V\subset R$ $$f^{-1}V\in F_{\sigma}(G_{\delta}(F_{\sigma} (A))).$$ Of course if $A$ is the set of open subsets of $R$, then every $f_n$ is continuous and $F_{\sigma}( A)=A$ and every $f^{-1}\{x\}$ is a $G_{\delta}$  set.....Note that if $(f_n)_{n\in N}$ is a sequence of continuous functions from $[0.1]$ to $R$ we can extend them continuously to the domain $R$ by letting $f_n(x)=f_n(0)$ for $x<0$ and $f_n(x)=f(1)$ for $x>1$.
