How to prove that the product of two $C^\infty$ functions is also a $C^\infty$ function rigorously? How to prove that the product of two $C^\infty$ functions is also a $C^\infty$ function?
I guess it is easy to prove the above fact by induction, but I cannot prove that.
Let $f, g$ be $C^\infty$ functions from an open set $U \subset \mathbb{R}^n \to \mathbb{R}$.
Prove that $f g$ is also a $C^\infty$ function from an open set $U \subset \mathbb{R}^n \to \mathbb{R}$.
My attemp is here:

$D_i f$ is also a $C^\infty$ function for any $i \in \{1, 2, \cdots, n\}$.
$D_i g$ is also a $C^\infty$ function for any $i \in \{1, 2, \cdots, n\}$.
$D_i (f g) = D_i(f) g + f D_i(g)$ and $D_i f, D_i g$ are $C^\infty$ functions.
It is enough to prove that $D_i(f) g$ and $f D_i(g)$ are $C^\infty$ functions.
But to prove that $D_i(f) g$ and $f D_i(g)$ are $C^\infty$ functions, we need to prove the product of two $C^\infty$ functions is also a $C^\infty$ function.
A circular argument?


Let $S := \{f | f = \sum_{i = 1}^n g_i h_i \text{ for some } n, g_i \text{ and } h_i \text{ are } C^\infty \text{ functions.}\}$.
Let $f \in S$. Then, we can write $f = \sum_{i = 1}^n g_i h_i$ for some $n$, where $g_i$ and $h_i$ are $C^\infty$ functions.
Then $f$ is differentiable and $\frac{d}{dx} f = \sum_{i = 1}^n g_i^{'} h_i + \sum_{i = 1}^n g_i h_i^{'}$ and $g_i^{'}$ and $h_i^{'}$ are $C^\infty$ functions.
So, $\frac{d}{dx} f \in S$.
So, $S$ is closed under the operation $\frac{d}{dx}$.
If $f$ and $g$ are $C^\infty$ functions, then $f g \in S$.
Since any element of $S$ is differentiable and $S$ is closed under the operation $\frac{d}{dx}$, $f g$ is a $C^\infty$ function.
