I'm struggling either proving or disproving the following statement:

Let $K\subset \mathbb{R}$ be compact, and $S = \mathrm{span}\{p_k, k = 0, 1, \ldots\}$, where $p_k$'s are polynomials over $K$. If $S$ is dense in $C^1(K)$ with respect to sup-norm, then for any $f\in C^1(K)$, there exists $\{g_n\} \subset S$ such that $g_n$ uniformly approximates $f$ with $f'$ uniformly approximated by $g_n'$.

This statement seems to be true, although $S$ is only a subset of all polynomials over $K$. If the statement appears false, is there any prior assumption that makes it true? Any reference or direct answer would greatly help me.

7more comments