A question about the vector space spanned by shifts of a given function 
Let $E$ be the space of continuous real functions and $f\in E$
Let $T_t$ denote the shift operator: $T_t(f)(x)=f(t+x)$
Let $T(f)$ be the linear span of the set $\{T_t(f) \;|\; t\in \mathbb R\}$
Suppose $T(f)$ is finite-dimensional.
Prove that $f$ is differentiable and that $f'\in T(f)$

I have very few clues about what should be done to solve this problem.
Here's my work so far.
Let $T_{a_1}(f),\ldots,T_{a_n}(f)$ be a basis of $T(f)$.
Let $x\in \mathbb R$. There exists $\lambda_1,\ldots,\lambda_n$ such that $T_{x}(f)=\sum_{k=1}^n \lambda_i T_{a_i}(f)$
Since $\displaystyle \frac{f(x+h)-f(x)}{h}=\frac{T_{x}(f)(h)-T_{x}(f)(0)}{h}=\sum_{k=1}^n \lambda_i \frac{T_{a_i}(f)(h)-T_{a_i}(f)(0)}{h}$, it suffices to prove that $f$ is differentiable at $ a_1,\ldots,a_n$, but that's still difficult.
 A: Let $f_1, \cdots f_n$ be basis of $T(f)$, where $f_i := f_{a_i}$ for simplicity. For any $h \in \mathbb R$, we have 
$$(*)\ \ f_i(x+ h) = \sum_j A(h)_{ij} f_j(x) $$
Note that we have $A(h+ g) = A(h) A(g)$ (matrix multiplication). Thus $A(h)$ is invertible and $A :\mathbb R \to GL(n, \mathbb R)$, $h\mapsto A(h)$ is a one parameter group in $GL(n, \mathbb R)$. I wish to show that it is continuous. 
Lemma: Let $f_1, \cdots, f_n$ be linearly independent functions. Then there are $x_1, \cdots, x_n$ such that the matrix
$$F = \begin{bmatrix} f_1(x_1) & \cdots & f_1(x_n) \\ \vdots & & \vdots \\ f_n(x_1) & \cdots & f_n(x_n)
\end{bmatrix}$$
is invertible. 
Proof of lemma: We proceed by induction on $n$. When $n=1$, it is true as $f$ must be nonzero at some point. Assume the claim is true for $n-1$ and $x_1, \cdots, x_{n-1}$ is chosen. Consider the function
$$x \mapsto \det \begin{bmatrix} f_1(x_1) & \cdots & f_1(x_{n-1}) & f_1(x) \\ \vdots & & & \vdots \\ f_n(x_1) & \cdots & f_n(x_{n-1}) & f_n(x)
\end{bmatrix}$$
If this function is identically zero, then 
$$ A_n f_n(x) + A_{n-1} f_{n-1}(x) + \cdots A_1 f_1(x) = 0$$
(by calculate the determinant by expanding the last column) and $A_n\neq 0$ (by induction hypothesis), which is a contradiction. Thus the lemma is proved. 
By the lemma, we have $A(h)F = \tilde F(h)$, where $\tilde F(h)$ is continuous in $h$. Thus $A(h) = \tilde F(h) F^{-1}$ is continuous in $h$. 
Now comes the black box: Any continuous homomorphism between Lie groups are indeed smooth, thus $A$ is smooth. Now put $x=0$ into $(*)$, then
$$f_i(h) = \sum_j A(h)_{ij} f_j(0) $$
thus all $f_i$ are smooth functions. 
Lastly, we have 
$$f_i'(x) = \sum_j D_{ij} f_j (x),$$
where $D = \frac{d}{dt} A(h)\bigg|_{h=0}$. Thus $f_i'$ and so $f' \in T(f)$. 
A: With a little use of Functional Analysis.
First observe that $T(\,f)$ is a closed subspace of $C(\mathbb R)$, equipped with the topology of locally uniform convergence, as it is finite-dimensional.
Let $j(x)$ be a non-negative $C^\infty$ function supported in $\big[-\frac{1}{2},\frac{1}{2}\big]$, with $\int_{-1/2}^{1/2}j(x)\,dx=1$. Then the convolution $j*f$ is equal to
$$
j*f=\lim_{n\to\infty}\sum_{k=1}^nj(t_{k,n})T_{-t_{k,n}}f,
$$
where $t_{k,n}=-\frac12+\frac{k}{n}$, and hence $j*f\in T(\,f)$. Let $$\hat T(\,f)=T(\,f)\cap C^\infty(\mathbb R).$$
Now if we set $j_\varepsilon(x)=\frac{1}{\varepsilon}j\big(\frac{x}{\varepsilon}\big)$, then $j_\varepsilon*f\to f$, locally uniformly, as $\varepsilon\to 0$. Thus every element of $T(f)$ lies in the closure of $\hat T(\,f)$. But as $\hat T(\,f)$ is finite dimensional, it is closed, and hence $\hat T(\,f)=T(\,f)$. Likewise the limit $f'=\lim_{h\to 0}\frac{1}{h}(T_hf-f)$ is locally uniform,  as $f\in C^\infty$ and as $\frac{1}{h}(T_hf-f)\in T(f)$ so is $f'$.
