Solution (source code)

= Solution

For a local parametrization $\phi:U\subset\mathbb R^k\to X$, the map $(q,w)\mapsto(\phi(q),d\phi_qw)$ parametrizes $TX$ locally. Its inverse uses the base chart and <derivative>, and its rank is $2k$. These charts make $TX$ a $2k$-manifold.