How do I work with a connection in $TM$ when the inputs are vector fields defined ONLY on an open subset of $M$? Let me introduce a definition first. If $M$ is a smooth $n$-manifold, then a connection in the tangent bundle $TM$ is a map $\nabla:\mathfrak{X}(M)\times\mathfrak{X}(M)\to\mathfrak{X}(M)$ that takes in smooth vector fields on $M$ and satisfies:

*

*$\nabla_{f_1 X_1+f_2 X_2}\ Y=f_1 \nabla_{X_1}\ Y+f_2 \nabla_{X_2}\ Y$

*$\nabla_X\ (a_1 Y_1+a_2 Y_2)=a_1\nabla_X Y_1+a_2\nabla_X Y_2$

*$\nabla_X\ (fY)=f\nabla_X\ Y+(Xf)Y$
with obvious meaning of each symbol. For your information, this definition of a connection in $TM$ can be found in Lee's RM. After ushering in the definition, Lee defines the connection coefficients $\Gamma_{ij}^k$ of $\nabla$ w.r.t. a smooth local frame $\{E_i\}_{i=1}^n$ for $TM$ over an open subset $U$ of $M$ by setting
$$\nabla_{E_i}\ E_j=\Gamma_{ij}^k E_k.$$
Now that's where my question comes in. What is meant by $\nabla_{E_i}\ E_j$? After all, these $E_i$'s are ONLY defined locally on $M$ (they may not live in $\mathfrak{X}(M)$). I'm stuck in this question for a long time and try to make it out. Please help me out if you know something about it. Thank you.
 A: Look at the second paragraph on page 91 of Introduction to Riemannian Manifolds (2nd edition). It says

Thanks to Propositions 4.3 and 4.5, we can make sense of the
expression $\nabla_v Y$ when $v$ is some element of $T_p M$ and $Y$ is a smooth local
section of $E$ defined only on some neighborhood of $p$. To evaluate it,
let $X$ be a vector field on a neighborhood of $p$ whose value at $p$ is $v$,
and set $\nabla_v Y = \nabla_X Y|_p$. Proposition 4.5 shows that the result does not
depend on the extension chosen. Henceforth, we will interpret
covariant derivatives of local sections of bundles in this way without
further comment.

Proposition 4.3 shows that a connection on a vector bundle $E\to M$ automatically determines a unique connection on the restriction of $E$ to any open subset of $M$; this is what justifies applying the connection to a vector field defined only on an open subset. Proposition 4.5 then says that the value of $\nabla_X Y$ at a point $p$ depends only on the value of $X$ at $p$; this is what justifies the notation $\nabla_v Y$ for a vector $v\in T_p M$.
To actually compute the value of $\nabla_v Y$ at a point $p\in M$, just choose a local frame defined on a neighborhood of $p$, compute the connection coefficients in that local frame, and use the formula you displayed in your post. There's no need to extend anything to a global vector field.
