Prove that $S = \{ f: [0,1]\rightarrow \mathbb{R} \ \text{continuous} : x\in\mathbb{Q}\implies f(x) \in \mathbb{Q}\}$ is. uncountable Prove that
$$S = \{ f: [0,1]\rightarrow \mathbb{R} \ \text{continuous} : x\in\mathbb{Q}\implies f(x) \in \mathbb{Q}\}$$ is uncountable.
I know that reals are uncountable,  so I look for injection from reals to set $S$, i.e., if we can define a function as above for each real number, then we are done.
Am I going in the right direction?
Please help with some hint/solution.

*

*For any real function $f,$ if $a,b,f(a),f(b)\in \Bbb Q$ and $f$ is linear on $[a,b]$ then $\{f(x):x\in \Bbb Q\cap [a,b]\}\subset \Bbb Q.$


*Let $T$ be the set of strictly increasing sequences of $positive$ rationals that converge to $1$. Then $T$ is uncountable. Because (by a typical diagonal method) if $A=\{(q_{n,j})_{n\in \Bbb N}: j\in \Bbb N\}\subset T,$ then let $r_1\in \Bbb Q\cap (q_{1,1},1)$ and for $n\in \Bbb N$ let $r_{n+1}\in \Bbb Q\cap (\max (r_n,q_{n+1,n+1}),1).$ Then $(r_n)_{n\in \Bbb N}\in T$ \ $A.$


*For $t=(q_n)_{n\in \Bbb N}\in T$ and $n\in \Bbb N$ let $f_t(1-2^{-n})=q_n$ and let $f_t$ be linear on $[1-2^{-n}, 1-2^{-n-1}].$ Let $f_t(0)=0$ and let $f_t$ be linear on $[0,1/2].$ And let $f_t(1)=1.$  Then $\{f_t:t\in T\}$ is an uncountable subset of $X.$
