A similar question was posed in
Definition of lie bracket of vector fields
but I am still not sure about something.
In one definition of Lie bracket (Einstein summation notation) we read
$[X,Y] = (X^j (\partial_j(Y^i)) - Y^j (\partial_j(X^i)) ) \partial_i$
In another definition we read
$[X,Y](f) = X^j \partial_j(Y^i \partial_i(f)) - Y^j \partial_j(X^i \partial_i(f))$ (I am using extra parenthesis to emphasize how I am reading the first definition).
But if we apply the first definition to $f$ we get
$[X,Y](f) = X^j (\partial_j(Y^i))\partial_i(f) - Y^j (\partial_j(X^i))\partial_i(f)$
which seems to be different since, e.g., $\partial_j(X^i \partial_i(f)) \neq (\partial_j(X^i))\partial_i(f)$
What am I reading wrong here...?
The identification $X:=X^i\partial_i$ gives $XYf=X^i\partial_i(Y^j\partial_jf)=X^iY^j\partial_i\partial_jf+(X^i\partial_iY^j)\partial_jf$ so $$[X,\,Y]f=XYf-YXf=X^iY^j\partial_i\partial_jf+(X^i\partial_iY^j)\partial_jf-Y^iX^j\partial_i\partial_jf-(Y^i\partial_iX^j)\partial_jf.$$The $\partial_i\partial_jf$ terms cancel, since$$Y^iX^j\partial_i\partial_jf=Y^jX^i\partial_j\partial_if=X^iY^j\partial_j\partial_if=X^iY^j\partial_i\partial_jf,$$where the first $=$ exchanges dummy indices, the second commutes $X^i$ with $Y^j$, and the third commutes partial derivatives. So$$[X,\,Y]f=(X^i\partial_iY^j)\partial_jf-(Y^i\partial_iX^j)\partial_jf,$$which simplifies to $[X,\,Y]=(X^i\partial_iY^j-Y^i\partial_iX^j)\partial_j$.