Necessary and sufficient conditions for a function of a specific type on the complement of the Cantor set The following is an exercise from Bruckner's Real Analysis:

For (a) right limit and left limit must be equal and equals $f(c_n)$ I think this is necessary and also sufficient.
For (b) because each $f_n(x)$ must be continuous be definition so the limit is of type mentioned in (a).
For (c) $\sum_1^∞ |f(c_n)| < ∞ $ is sufficient and necessary as for all $a_n$, $b_n$ we have $f(a_n)=f(b_n)=0$.
Is my explanation rigorous enough?
A detailed explanation for all parts of the question would be much appreciated.
 A: Let $\{(a_n,b_n)\}$ be the sequence of open intervals complementary to K in $(0,1)$.
Given any $f$ constructed in the way described. I will assume that for all $n \in \Bbb N$, $f(c_n) \in \Bbb R$, that is $-\infty < f(c_n) <+\infty$. (In fact, if for one $n$, $f(c_n) = \pm \infty$, then the proposed construction does not make sense.)
Consider, for each $k\in \Bbb N$ the function $f_k$ constructed in the same way but such that $f_k(c_i) = f(c_i)$, for $ i \leq k$ and $f_k(c_i) = 0$, for $i>k$.
For each $k \in \Bbb N$, $f_k$ is continuous on each of the pairwise disjoint open intervals $(a_1,b_1), \cdots, (a_k,b_k)$ (a finite collection of open sets), $f_k$ is zero on the end-points of those open intervals and it is zero elsewhere. So $f_k$ is continuous.
It is easy to see that $f_k$ converges pointwise to $f$ as $k \to \infty$.
So, $f$ is always a Baire 1 function.
This answers item (b). There is no necessary and suficient condition, because all the function $f$ constructed in the way described in the question are already Baire 1 functions.
Regarding item (c), it is easy to see that the total variation of $f$ is  $\sum_{n=1}^\infty 2|f(c_n)|$ , so the necessary and suficient condition for $f$ to be of bound variation is that $\sum_{n=1}^\infty |f(c_n)| < +\infty$.
Now, the "hard part" is item (a).
Let us prove that

$f$ is continuous  if and only if  $\forall \varepsilon > 0, \exists \delta >0 \, |\,  \forall n \in \Bbb N, b_n-a_n <\delta \Rightarrow |f(c_n)| <\varepsilon$.

Proof:
$(\Leftarrow)$. Suppose that $\forall \varepsilon > 0, \exists \delta >0 \, |\,  \forall n \in \Bbb N, b_n-a_n <\delta \Rightarrow |f(c_n)| <\varepsilon$.
Let $p \in [0,1]$ and let $\{p_n\}_n$ be a sequence converging to $p$. We have two possibilities:

*

*There is $k \in \Bbb N$ such that $p \in (a_k, b_k)$. Then it is immediate that $f(p_n)$ converges to $f(p)$.

*$p \in K$. In this case $f(p)=0$, and we want to show that, for all $\varepsilon >0$, there is $N \in \Bbb N$ such that $|f(p_n)|< \varepsilon$.

Given $\varepsilon >0$, let $\delta> 0$ be such that, for all $n\in \Bbb N$, if $b_n-a_n < \delta$ then $|f(c_n)|< \varepsilon$.
Let $A=\bigcup\{(a_n, b_n) : b_n-a_n \geq \delta\} $. Note that $A$ is the union of a finite collection of open intervals and $f$ restricted to $\overline{A}$ is continuous.
Now, let
$$I=\{ n \in \Bbb N : p_n \in A\}$$
$$J =  \{ n \in \Bbb N : p_n \in (a_k, b_k) \text{ for some } (a_k, b_k) \text{ with } b_k - a_k < \delta \}$$
$$L = \{n \in \Bbb N : p_n \in K \}$$
For each $n \in \Bbb N$, we have only three possibilities: $n \in I$, $n \in J $ or $n \in L$ and those possibilities are mutually exclusive.
It is immediate that, for all $n \in J$, $|f(p_n)| \leq |f(p_n)| < \varepsilon$.
It is also immediate that, for all $n \in L$, $|f(p_n)| = 0 < \varepsilon$.
Now consider $I$. If $I$ is finite, we can ignore it (since it can not affect the limit of $f(p_n)$. If $I$ is infinite, then $\{p_n\}_{n \in I}$ is a sub-sequence of $\{p_n\}_n$, so $\{p_n\}_{n \in I}$ converges to $p$. Since $f$ restricted to $\overline{A}$ is continuous, we have that  $\{f(p_n)\}_{n \in I}$ converges to $f(p)=0$. So,
there is $N \in \Bbb N$  such that for all $n \in I$ and $n>N$, $|f(p_n)| < \varepsilon$.
So, we have proved that, for all $\varepsilon >0$, there is $N \in \Bbb N$ such that $|f(p_n)|< \varepsilon$. That completes the proof of the $(\Leftarrow)$ part.
$(\Rightarrow)$. Suppose that $\forall \varepsilon > 0, \exists \delta >0 \, |\,  \forall n \in \Bbb N, b_n-a_n <\delta \Rightarrow |f(c_n)| <\varepsilon$ is false.
Then, there is $\varepsilon > 0$ such that, for all $\delta >0$, there is $n \in  \Bbb N$  such that $b_n-a_n < \delta$ and $|f(c_n)|> \varepsilon$.
So, for all $k \in \Bbb N$ ($k>0$), there is $n_k \in \Bbb N$ such that $b_{n_k}- a_{n_k} < \frac{1}{k}$ and $ |f(c_{n_k})|> \varepsilon $
Since $[0,1]$ is compact, there is a convergente sub-sequence $\{c_{n_{k_i}}\}_i$. Since $ b_{n_{k_i}} - a_{n_{k_i}}$ converges to $0$, we have that $\{c_{n_{k_i}}\}_i$ converges to some $q \in K$.
But we have, for all $i$, $|f(c_{n_{k_i}})| > \varepsilon$   and $f(q)=0$. So $f$ is not continuous.
So, by the counter-positive, we have proved the $(\Rightarrow)$ part.
This completes the proof. $\square$
