Chain Rule for Formal Power Series In Gorodentsev's "Algebra - 1" (page 44), given a formal power series $f \in K[\![ x]\!]$, he defines its derivative as
$$
f(x+t) = f(x) + f'(x) \cdot t 
+ \bigl( \text{terms divisible by }t^2 \bigr).
$$
Then he wants to show the chain rule:
$$
\bigl( f(g(x)) \bigr)' = g'(x) \cdot f'(g(x)). 
$$
He does this as follows: let
$$
\tau(x, t) = g(x+t) - g(x) = t \cdot g'(x) 
+ \bigl( \text{terms divisible by }t^2 \bigr)
$$
and note that
\begin{align}
f(g(x+t)) &= f(g(x) + \tau(x, t)) \\
&= f(g(x)) + \tau(x, t) \cdot f'(g(x)) 
+ \bigl( \text{terms divisible by }\tau(x, t)^2 \bigr) \\
&= f(g(x)) + t \cdot g'(x) \cdot f'(g(x)) 
+ \bigl( \text{terms divisible by }t^2 \bigr). 
\end{align}
Therefore, the result follows from the definition.
Can anyone please explain why
$$
f(g(x) + \tau(x, t)) 
= f(g(x)) + \tau(x, t) \cdot f'(g(x)) 
+ \bigl( \text{terms divisible by }\tau(x, t)^2 \bigr)
$$
holds true? I'm really confused and I would appreciate any help. Thanks.
 A: It's useful to use a different variable name for the outer function in composition, e.g. write $y = f(u)$ and $u = g(x)$ so that $y = f(g(x))$.
Rewrite the definition of derivative in this way (replacing $t$ by the symbol $\tau$ as well):
$$
f(u + \tau) = f(u) + f'(u) \cdot \tau 
+ \bigl( \text{terms divisible by }\tau^2 \bigr).
$$
Now, make the substitutions $u = g(x)$ and $\tau = \tau(x, t)$:
\begin{align}
f(g(x) + \tau(x, t)) 
&= f(u) + f'(u) \cdot \tau 
+ \bigl( \text{terms divisible by }\tau^2 \bigr) \\
&= f(g(x)) + f'(g(x)) \cdot \tau(x, t) 
+ \bigl( \text{terms divisible by }\tau(x, t)^2 \bigr).
\end{align}
A: The equation
$$f(x+t) = f(x) + f'(x) \cdot t + \bigl( \text{terms divisible by }t^2 \bigr)$$
happens in $K[\![ x,t]\!]$, so $t$ is a formal variable. This means that you can replace (evaluate) $t$ by any element $a\in K[\![ x,t]\!]$ that has no constant term, and the formula will still be valid, ie
$$f(x+a) = f(x) + f'(x) \cdot a + \bigl( \text{terms divisible by }a^2 \bigr).$$
Now take $a=\tau(x,t)$.
