My setting is this:
$X$ a smooth manifold. $\phi_t:X\rightarrow X$ a flow of a vector field. $f\in \mathcal C^{\infty}(X;\mathbb R)$ an element of the space of smooth functions on $X$ and
\begin{equation} \xi=\frac{d}{dt}\Big|_{0}f\circ \phi_t \end{equation}
a vector in $T_f C^{\infty}(X;\mathbb R)$. Now suppose I have two vector fields $w_1$ and $w_2$ on $X$ that span an involutive distribution $\mathcal D=\text{span}(w_1,w_2)$, i.e. such that $[w_1,w_2]\in\mathcal D$. I want to know whether this property is transferred to the function space. So let $\phi^1_t$ and $\phi^2_t$ be the respective flows of $w_1$ and $w_2$, what can I say about \begin{equation} \left[\;\;\frac{d}{dt}\Big|_{0}f\circ \phi^1_t\quad,\quad\frac{d}{dt}\Big|_{0}f\circ \phi^2_t\;\;\right] \end{equation} In particular I would like to know how to define tangent vectors on $C^{\infty}(X;\mathbb R)$. My first guess was that I endow it with a Frechet space structure and then the corresponding manifold would be a Frechet manifold whose tangent spaces are spanned by the Frechet derivative. But maybe that's not enough.