Solution (source code)

= Solution

The base case $n=1$ is the <product rule>. Suppose the <Leibniz rule> holds at order $n$. Taking one more <derivative> of each term and collecting the coefficient of $f^{(n+1-r)}g^{(r)}$ gives
$$
(fg)^{(n+1)}=\sum_{r=0}^{n+1}\left[\binom nr+\binom n{r-1}\right]f^{(n+1-r)}g^{(r)}.
$$
Here <binomial coefficients> outside $0\le r\le n$ are zero. For $1\le r\le n$, the factorial definition proves <Pascal's identity> directly:
$$
\binom nr+\binom n{r-1}=\frac{n!}{r!(n-r)!}+\frac{n!}{(r-1)!(n-r+1)!}=\frac{(n+1)!}{r!(n+1-r)!}=\binom{n+1}r.
$$
At $r=0,n+1$, the identity is $1+0=1$. Substitution gives the required order-$n+1$ formula, completing the <induction>.