vEnhance's avatar

Oct 16, 2016

🖉 Formal vs Functional Series (OR: Generating Function Voodoo Magic)

Epistemic status: highly dubious. I found almost no literature doing anything quite like what follows, which unsettles me because it makes it likely that I’m overcomplicating things significantly.

1. Synopsis

Recently I was working on an elegant problem which was the original problem 6 for the 2015 International Math Olympiad, which reads as follows:

Problem [IMO Shortlist 2015 Problem C6]

Let SS be a nonempty set of positive integers. We say that a positive integer nn is clean if it has a unique representation as a sum of an odd number of distinct elements from SS. Prove that there exist infinitely many positive integers that are not clean.

Proceeding by contradiction, one can prove (try it!) that in fact all sufficiently large integers have exactly one representation as a sum of an even subset of SS. Then, the problem reduces to the following:

Problem

Show that if s1<s2<s_1 < s_2 < \dots is an increasing sequence of positive integers and P(x)P(x) is a nonzero polynomial then we cannot have j=1(1xsj)=P(x)\prod_{j=1}^\infty (1 - x^{s_j}) = P(x) as formal series.

To see this, note that all sufficiently large xNx^N have coefficient 1+(1)=01 + (-1) = 0. Now, the intuitive idea is obvious: the root 11 appears with finite multiplicity in PP so we can put P(x)=(1x)kQ(x)P(x) = (1-x)^k Q(x) where Q(1)0Q(1) \neq 0, and then we get that 1x1-x on the RHS divides PP too many times, right?

Well, there are some obvious issues with this “proof”: for example, consider the equality 1=(1x)(1+x)(1+x2)(1+x4)(1+x8).1 = (1-x)(1+x)(1+x^2)(1+x^4)(1+x^8) \dots. The right-hand side is “divisible” by 1x1-x, but the left-hand side is not (as a polynomial).

But we still want to use the idea of plugging x1x \rightarrow 1^-, so what is the right thing to do? It turns out that this is a complete minefield, and there are a lot of very subtle distinctions that seem to not be explicitly mentioned in many places. I think I have a complete answer now, but it’s long enough to warrant this entire blog post.

Here’s the short version: there’s actually two distinct notions of “generating function”, namely a “formal series” and “functional series”. They use exactly the same notation but are two different types of objects, and this ends up being the source of lots of errors, because “formal series” do not allow substituting xx, while “functional series” do.

Spoiler: we’ll need the asymptotic for the partition function p(n)p(n).

2. Formal Series \neq Functional Series

I’m assuming you’ve all heard the definition of kckxk\sum_k c_kx^k. It turns out unfortunately that this isn’t everything: there are actually two types of objects at play here. They are usually called formal power series and power series, but for this post I will use the more descriptive names formal series and functional series. I’ll do everything over C\mathbb C, but one can of course use R\mathbb R instead.

The formal series is easier to describe:

Definition 1. A formal series FF is an infinite sequence (an)n=(a0,a1,a2,)(a_n)_n = (a_0, a_1, a_2, \dots) of complex numbers. We often denote it by anxn=a0+a1x+a2x2+\sum a_nx^n = a_0 + a_1x + a_2x^2 + \dots. The set of formal series is denoted C[[x]]\mathbb C[[x]].

This is the “algebraic” viewpoint: it’s a sequence of coefficients. Note that there is no worry about convergence issues or “plugging in xx”.

On the other hand, a functional series is more involved, because it has to support substitution of values of xx and worry about convergence issues. So here are the necessary pieces of data:

Definition 2. A functional series GG (centered at zero) is a function G:UCG : U \rightarrow \mathbb C, where UU is an open disk centered at 00 or U=CU = \mathbb C. We require that there exists an infinite sequence (c0,c1,c2,)(c_0, c_1, c_2, \dots) of complex numbers satisfying zU:G(z)=limN(k=0Nckzk).\forall z \in U: \qquad G(z) = \lim_{N \rightarrow \infty} \left( \sum_{k=0}^N c_k z^k \right). (The limit is take in the usual metric of C\mathbb C.) In that case, the cic_i are unique and called the coefficients of GG.

This is often written as G(x)=ncnxnG(x) = \sum_n c_n x^n, with the open set UU suppressed.

Remark 3. Some remarks on the definition of functional series:

  • This is enough to imply that GG is holomorphic (and thus analytic) on UU.
  • For experts: note that I’m including the domain UU as part of the data required to specify GG, which makes the presentation cleaner. Most sources do something with “radius of convergence”; I will blissfully ignore this, leaving this data implicitly captured by UU.
  • For experts: Perhaps non-standard, U{0}U \neq \{0\}. Otherwise I can’t take derivatives, etc.

Thus formal and functional series, despite having the same notation, have different types: a formal series FF is a sequence, while a functional series GG is a function that happens to be expressible as an infinite sum within its domain.

Of course, from every functional series GG we can extract its coefficients and make them into a formal series FF. So, for lack of better notation:

Definition 4. If F=(an)nF = (a_n)_n is a formal series, and G:UCG : U \rightarrow \mathbb C is a functional series whose coefficients equal FF, then we write FGF \simeq G.

3. Finite operations

Now that we have formal and functional series, we can define sums. Since these are different types of objects, we will have to run definitions in parallel and then ideally check that they respect \simeq.

For formal series:

Definition 5. Let F1=(an)nF_1 = (a_n)_n and F2=(bn)nF_2 = (b_n)_n be formal series. Then we set

(an)n±(bn)n=(an±bn)n(an)n(bn)n=(j=0najbnj)n. \begin{aligned} (a_n)_n \pm (b_n)_n &= (a_n \pm b_n)_n \\ (a_n)_n \cdot (b_n)_n &= \left( \textstyle\sum_{j=0}^n a_jb_{n-j} \right)_n. \end{aligned}

This makes C[[x]]\mathbb C[[x]] into a ring, with identity (0,0,0,)(0,0,0,\dots) and (1,0,0,)(1,0,0,\dots).

We also define the derivative F=(an)nF = (a_n)_n by F=((n+1)an+1)nF' = ((n+1)a_{n+1})_n.

It’s probably more intuitive to write these definitions as

nanxn±nbnxn=n(an±bn)xn(nanxn)(nbnxn)=n(j=0najbnj)xn(nanxn)=nnanxn1 \begin{aligned} \sum_n a_n x^n \pm \sum_n b_n x^n &= \sum_n (a_n \pm b_n) x^n \\ \left( \sum_n a_n x^n \right) \left( \sum_n b_n x^n \right) &= \sum_n \left( \sum_{j=0}^n a_jb_{n-j} \right) x^n \\ \left( \sum_n a_n x^n \right)' &= \sum_n na_n x^{n-1} \end{aligned}

and in what follows I’ll start to use nanxn\sum_n a_nx^n more. But officially, all definitions for formal series are in terms of the coefficients alone; these presence of xx serves as motivation only.

Exercise 6. Show that if F=nanxnF = \sum_n a_nx^n is a formal series, then it has a multiplicative inverse if and only if a00a_0 \neq 0.

On the other hand, with functional series, the above operations are even simpler:

Definition 7. Let G1:UCG_1 : U \rightarrow \mathbb C and G2:UCG_2 : U \rightarrow \mathbb C be functional series with the same domain UU. Then G1±G2G_1 \pm G_2 and G1G2G_1 \cdot G_2 are defined pointwise.

If G:UCG : U \rightarrow \mathbb C is a functional series (hence holomorphic), then GG' is defined poinwise.

If GG is nonvanishing on UU, then 1/G:UC1/G : U \rightarrow \mathbb C is defined pointwise (and otherwise is not defined).

Now, for these finite operations, everything works as you expect:

Theorem 8 (Compatibility of finite operations)

Suppose FF, F1F_1, F2F_2 are formal series, and GG, G1G_1, G2G_2 are functional series UCU \rightarrow \mathbb C. Assume FGF \simeq G, F1G1F_1 \simeq G_1, F2G2F_2 \simeq G_2.

  • F1±F2G1±G2F_1 \pm F_2 \simeq G_1 \pm G_2, F1F2=G1G2F_1 \cdot F_2 = G_1 \cdot G_2.
  • FGF' \simeq G'.
  • If 1/G1/G is defined, then 1/F1/F is defined and 1/F1/G1/F \simeq 1/G.

So far so good: as long as we’re doing finite operations. But once we step beyond that, things begin to go haywire.

4. Limits

We need to start considering limits of (Fk)k(F_k)_k and (Gk)k(G_k)_k, since we are trying to make progress towards infinite sums and products. Once we do this, things start to burn.

Definition 9. Let F1=nanxnF_1 = \sum_n a_n x^n and F2=nbnxnF_2 = \sum_n b_n x^n be formal series, and define the difference by d(F1,F2)={2nanbn,n minimal0F1=F2.d(F_1, F_2) = \begin{cases} 2^{-n} & a_n \neq b_n, n \text{ minimal} \\ 0 & F_1 = F_2. \end{cases}

This function makes C[[x]]\mathbb C[[x]] into a metric space, so we can discuss limits in this space. Actually, it is a normed vector space obtained by F=d(F,0)\left\lVert F \right\rVert = d(F,0) above.

Thus, limkFk=F\lim_{k \rightarrow \infty} F_k = F if each coefficient of xnx^n eventually stabilizes as kk \rightarrow \infty. For example, as formal series we have that (1,1,0,0,)(1,-1,0,0,\dots), (1,0,1,0,)(1,0,-1,0,\dots), (1,0,0,1,)(1,0,0,-1,\dots) converges to 1=(1,0,0,0)1 = (1,0,0,0\dots), which we write as limk(1xk)=1as formal series.\lim_{k \rightarrow \infty} (1 - x^k) = 1 \qquad \text{as formal series}. As for functional series, since they are functions on the same open set UU, we can use pointwise convergence or the stronger uniform convergence; we’ll say explicitly which one we’re doing.

Example 10 (Limits don’t work at all)

In what follows, FkGkF_k \simeq G_k for every kk.

  • Here is an example showing that if limkFk=F\lim_k F_k = F, the functions GkG_k may not converge even pointwise. Indeed, just take Fk=1xkF_k = 1 - x^k as before, and let U={z:z<2}U = \{z : |z| < 2\}.
  • Here is an example showing that even if GkGG_k \rightarrow G uniformly, limkFk\lim_k F_k may not exist. Take Gk=11/kG_k = 1 - 1/k as constant functions. Then Gk1G_k \rightarrow 1, but limkFk\lim_k F_k doesn’t exist because the constant term never stabilizes (in the combinatorial sense).
  • The following example from this math.SE answer by Robert Israel shows that it’s possible that F=limkFkF = \lim_k F_k exists, and GkGG_k \rightarrow G pointwise, and still F≄GF \not\simeq G. Let UU be the open unit disk, and set Ak={z=reiθ2/kr1,  0θ2π1/k}Bk={z1/k} \begin{aligned} A_k &= \{z = r e^{i\theta} \mid 2/k \le r \le 1, \; 0 \le \theta \le 2\pi - 1/k\} \\ B_k &= \left\{ |z| \le 1/k \right\} \end{aligned} for k1k \ge 1. By Runge theorem there’s a polynomial pk(z)p_k(z) such that pk(z)1/zk<1/k on Akandpk(z)<1/k on Bk.|p_k(z) - 1/z^{k}| < 1/k \text{ on } A_k \qquad \text{and} \qquad |p_k(z)| < 1/k \text{ on }B_k. Then Gk(z)=zk+1pk(z)G_k(z) = z^{k+1} p_k(z) is the desired counterexample (with FkF_k being the sequence of coefficients from GG). Indeed by construction limkFk=0\lim_k F_k = 0, since Fk2k\left\lVert F_k \right\rVert \le 2^{-k} for each kk. Alas, gk(z)z2/k|g_k(z) - z| \le 2/k for zAkBkz \in A_k \cup B_k, so GkzG_k \rightarrow z converges pointwise to the identity function.

To be fair, we do have the following saving grace:

Theorem 11 (Uniform convergence and both limits exist is sufficient)

Suppose that GkGG_k \rightarrow G converges uniformly. Then if FkGkF_k \simeq G_k for every kk, and limkFk=F\lim_k F_k = F, then FGF \simeq G.

Proof: Here is a proof, copied from this math.SE answer by Joey Zhou. WLOG G=0G = 0, and let gn(z)=ak(n)zkg_n(z) = \sum{a^{(n)}_kz^k}. It suffices to show that ak=0a_k = 0 for all kk. Choose any 0<r<10<r<1. By Cauchy’s integral formula, we have

akak(n)=12πiz=rg(z)gn(z)zn+1 dz12π(2πr)1rn+1maxz=rg(z)gn(z)n0 \begin{aligned} \left|a_k - a^{(n)}_k\right| &= \left|\frac{1}{2\pi i} \int\limits_{|z|=r}{\frac{g(z)-g_n(z)}{z^{n+1}}\text{ d}z}\right| \\ &\le \frac{1}{2\pi}(2\pi r)\frac{1}{r^{n+1}}\max\limits_{|z|=r}{|g(z)-g_n(z)|} \xrightarrow{n\rightarrow\infty} 0 \end{aligned}

since gng_n converges uniformly to gg on UU. Hence, ak=limnak(n)a_k = \lim\limits_{n\rightarrow\infty}{a^{(n)}_k}. Since ak(n)=0a^{(n)}_k = 0 for nkn\ge k, the result follows. \Box

The take-away from this section is that limits are relatively poorly behaved.

5. Infinite sums and products

Naturally, infinite sums and products are defined by taking the limit of partial sums and limits. The following example (from math.SE again) shows the nuances of this behavior.

Example 12 (On e1+xe^{1+x})

The expression n=0(1+x)nn!=limNn=0N(1+x)nn!\sum_{n=0}^\infty \frac{(1+x)^n}{n!} = \lim_{N \rightarrow \infty} \sum_{n=0}^N \frac{(1+x)^n}{n!} does not make sense as a formal series: we observe that for every NN the constant term of the partial sum changes.

But this does converge (uniformly, even) to a functional series on U=CU = \mathbb C, namely to e1+xe^{1+x}.

Exercise 13. Let (Fk)k1(F_k)_{k \ge 1} be formal series.

  • Show that an infinite sum k=1Fk(x)\sum_{k=1}^\infty F_k(x) converges as formal series exactly when limkFk=0\lim_k \left\lVert F_k \right\rVert = 0.
  • Assume for convenience Fk(0)=1F_k(0) = 1 for each kk. Show that an infinite product k=0(1+Fk)\prod_{k=0}^{\infty} (1+F_k) converges as formal series exactly when limkFk1=0\lim_k \left\lVert F_k-1 \right\rVert = 0.

Now the upshot is that one example of a convergent formal sum is the expression limNn=0Nanxn\lim_{N} \sum_{n=0}^N a_nx^n itself! This means we can use standard “radius of convergence” arguments to transfer a formal series into functional one.

Theorem 14 (Constructing GG from FF)

Let F=anxnF = \sum a_nx^n be a formal series and let r=1lim supncnn.r = \frac{1}{\limsup_n \sqrt[n]{|c_n|}}. If r>0r > 0 then there exists a functional series GG on U={z<r}U = \{|z| < r\} such that FGF \simeq G.

Proof: Let FkF_k and GkG_k be the corresponding partial sums of c0x0c_0x^0 to ckxkc_kx^k. Then by Cauchy-Hadamard theorem, we have GkGG_k \rightarrow G uniformly on (compact subsets of) UU. Also, limkFk=F\lim_k F_k = F by construction. \Box

This works less well with products: for example we have 1(1x)j0(1+x2j)1 \equiv (1-x) \prod_{j \ge 0} (1+x^{2^j}) as formal series, but we can’t “plug in x=1x=1”, for example,

6. Finishing the original problem

We finally return to the original problem: we wish to show that the equality P(x)=j=1(1xsj)P(x) = \prod_{j=1}^\infty (1 - x^{s_j}) cannot hold as formal series. We know that tacitly, this just means limNj=1N(1xsj)=P(x)\lim_{N \rightarrow \infty} \prod_{j=1}^N\left( 1 - x^{s_j} \right) = P(x) as formal series.

Here is a solution obtained only by only considering coefficients, presented by Qiaochu Yuan from this MathOverflow question.

Both sides have constant coefficient 11, so we may invert them; thus it suffices to show we cannot have

1P(x)=1j=1(1xsj)\frac{1}{P(x)} = \frac{1}{\prod_{j=1}^{\infty} (1 - x^{s_j})}

as formal power series.

The coefficients on the LHS have asymptotic growth a polynomial times an exponential.

On the other hand, the coefficients of the RHS can be shown to have growth both strictly larger than any polynomial (by truncating the product) and strictly smaller than any exponential (by comparing to the growth rate in the case where sj=js_j = j, which gives the partition function p(n)p(n) mentioned before). So the two rates of growth can’t match.