Changing the values of an integrable function $f:[a,b] \to \mathbb R$ countably infinitely many points not a dense subset of $[a,b]$
Let $f:[a,b] \to \mathbb R$ be a function Riemann integrable over $[a,b]$ . It is known that if we change its values at finitely many points of $[a,b]$ , then the changed function still remains Riemann integrable on $[a,b]$ . My question is , suppose we change its values at countably infinitely many points of $[a,b]$ such that the set of this points is not dense in $[a,b]$ ; then is it true that this changed function is Riemann integrable on $[a,b]$ ?
Let's say $E\subset [a,b]$ is "Riemann unnoticeable" (RU) if the values of any $f\in \mathcal R [a,b]$ on $E$ can be changed arbitrarily and still leave us with a function in $\mathcal R [a,b].$ Claim: $E$ is RU iff $m(\overline E )=0.$
Proof: Suppose $m(\overline E )=0.$ Set $U= [a,b]\setminus \overline E.$ Then $U$ is open in $[a,b].$ Let $f\in \mathcal R [a,b].$ Then $f$ is continuous a.e. in $[a,b]$, hence a.e. in $U.$ Since $U$ is open, that won't change no matter how we change $f$ on $E$ (or $\overline E$ for that matter). Because $U$ has full measure, the changed function is continuous a.e. in $[a,b].$ Thus all such changes leave us in $\mathcal R [a,b],$ hence $E$ is RU.
Suppose $m(\overline E )>0.$ Case 0: $E$ contains an interval. Then obviously $E$ is not RU. Case 1: $E$ contains no interval, but $\overline E$ contains an interval $I.$ Then $E\cap I, I\setminus E$ are both dense in $I.$ Suppose $f \equiv 0.$ Change $f$ to $\chi_E.$ Then $\chi_E$ is discontinuous at each point of $I,$ a set of postitive measure. Thus $\chi_E \not \in \mathcal R [a,b].$ Hence $E$ is not RU. Case 2: $\overline E$ contains no interval $I.$ Again set $U= [a,b]\setminus \overline E.$ Then $U$ is dense in $[a,b].$ Take $f \equiv 0$ and change it to $\chi_E.$ Since each $x \in \overline E$ is accessible from $E$ and from $U,$ $\chi_E$ is discontinuous at $x.$ Hence $E$ is not RU.