# Why is this sum finite in the proof of the upper bound conjecture

I've been reading Richard Stanley's proof of the upper bound conjecture, but I haven't been able to make sense of one statement he makes near the start while defining the h-vector of a simplicial complex. Section in question

He defines a function H

$$H(m) = \begin{cases} 1 & m = 0 \newline \sum_{i=0}^{d-1} f_i {m-1 \choose i} & m > 0 \\ \end{cases}$$

And then claims the following equality to be elementary for some set of $$h_i$$s

$$(1-x)^d\sum_{m=0}^{\infty} H(m)x^m = h_0 + h_1x + \ldots + h_dx^d$$

It's unclear to me why this infinite sum would end up equal to a polynomial that only goes up to degree d when summing $$x^m$$ for $$m$$ going to infinity.

Here's a link to the full paper if more context is needed. https://math.mit.edu/~rstan/pubs/pubfiles/27.pdf

This is in general true for polynomials.

If $$p(n)$$ is a polynomial of degree $$d-1,$$ we can write it as a linear combination of the polynomials $$g_0(n)=1,$$ $$g_{i+1}(n)=(n+i+1)g_i(n).$$ So $$p(n)=\sum_{i=0}^{d-1} c_ig_i(n)$$

Now, for fixed $$i,$$ $$\sum_{n=0}^\infty g_{i}(n)x^n=\left(\frac{1}{1-x}\right)^{(i)}=\frac{i!}{(1-x)^{i+1}}$$

So:

$$(1-x)^d\sum_{n=0}^\infty p(n)x^n=\sum_{i=0}^{d-1}c_i\cdot i!\cdot (1-x)^{d-i-1},$$ which gives a polynomial of degree $$d-1.$$

If $$p$$ is an integer polynomial, we also get the $$c_i$$ are integers.

So you really only need to know how to show $$H(n)$$ is a polynomial of $$n$$ of degree $$d-1.$$

Example

So, for example, if $$p(n)=n^2,$$ then $$p(n)=1\cdot (n+1)(n+2)-3\cdot (n+1)+1=g_2(n)-3g_1(n)+g_0(n)$$ so:

$$\sum_{n =0}^\infty n^2x^n=1\cdot\frac{2!}{(1-x)^3}-3\cdot\frac{1!}{(1-x)^2}+\frac{0!}{1-x}$$

Multiplying both sides by $$(1-x)^3,$$ we get:

$$(1-x)^3\sum_{n=0}^\infty n^2x^n =2-3(1-x)+(1-x)^2=x+x^2$$