[proofplan]
We work entirely in the formal [power series](/page/Power%20Series) ring $R[[X]]$, so no convergence question is involved. The operations in $R[[X]]$ are defined coefficientwise for addition and for multiplication by a scalar from $R$. Therefore the coefficient of $X^n$ in $A(X)+B(X)$ is $a_n+b_n$, and the coefficient of $X^n$ in $\lambda A(X)$ is $\lambda a_n$. These coefficient identities are exactly the assertion that the two resulting formal power series are the ordinary generating functions of the stated sequences.
[/proofplan]
custom_env
admin
[step:Compute the coefficients of the sum by coefficientwise addition]Define $C(X)\in R[[X]]$ by
\begin{align*}
C(X)=A(X)+B(X).
\end{align*}
Let $n\geq 0$ be an integer. Since addition in $R[[X]]$ is defined coefficientwise, the coefficient of $X^n$ in $C(X)$ is
\begin{align*}
[X^n]C(X)=[X^n]A(X)+[X^n]B(X).
\end{align*}
By the definitions of $A(X)$ and $B(X)$, this gives
\begin{align*}
[X^n]C(X)=a_n+b_n.
\end{align*}
Since this holds for every $n\geq 0$, the formal power series $C(X)=A(X)+B(X)$ is the ordinary [generating function](/page/Generating%20Function) of the sequence $(a_n+b_n)_{n\geq 0}$.[/step]
custom_env
admin
[guided]Define the formal power series $C(X)\in R[[X]]$ by
\begin{align*}
C(X)=A(X)+B(X).
\end{align*}
The point of introducing $C(X)$ is to name the series whose coefficients we want to identify. In the formal power series ring $R[[X]]$, addition is not an analytic operation involving values of $X$; it is defined coefficient by coefficient.
Let $n\geq 0$ be an integer. By coefficientwise addition in $R[[X]]$, the coefficient of $X^n$ in the sum $A(X)+B(X)$ is the sum in $R$ of the two $X^n$-coefficients:
\begin{align*}
[X^n]C(X)=[X^n]A(X)+[X^n]B(X).
\end{align*}
The definitions of $A(X)$ and $B(X)$ give
\begin{align*}
[X^n]A(X)=a_n
\end{align*}
and
\begin{align*}
[X^n]B(X)=b_n.
\end{align*}
Substituting these two coefficient identities into the coefficient formula for $C(X)$ yields
\begin{align*}
[X^n]C(X)=a_n+b_n.
\end{align*}
Because the integer $n\geq 0$ was arbitrary, every coefficient of $C(X)$ agrees with the corresponding term of the sequence $(a_n+b_n)_{n\geq 0}$. By the definition of an ordinary generating function, $C(X)=A(X)+B(X)$ is therefore the ordinary generating function of $(a_n+b_n)_{n\geq 0}$.[/guided]
custom_env
admin
[step:Compute the coefficients of the scalar multiple by coefficientwise scalar multiplication]
Define $D(X)\in R[[X]]$ by
\begin{align*}
D(X)=\lambda A(X).
\end{align*}
Let $n\geq 0$ be an integer. Since scalar multiplication of a formal power series by an element of $R$ is defined coefficientwise, we have
\begin{align*}
[X^n]D(X)=\lambda [X^n]A(X).
\end{align*}
Using $[X^n]A(X)=a_n$, we obtain
\begin{align*}
[X^n]D(X)=\lambda a_n.
\end{align*}
Since this holds for every $n\geq 0$, the formal power series $D(X)=\lambda A(X)$ is the ordinary generating function of the sequence $(\lambda a_n)_{n\geq 0}$. This proves both asserted linearity properties.
[/step]