Proof of Segner's lemma for the number of sign alternations in polynomials In the context of Descartes' Rule of Signs, Segner's lemma is often stated as follows:

The polynomial $(x-1)p(x)$ has more alternations of signs than $p(x)$, for any real polynomial $p(x)$.

This is discussed e.g. in arXiv:1309.6664, but I was looking for a more focused treatment about this particular aspect, possibly including images to better visualise what's going on with the argument.
 A: Write the polynomial as $P(x)=\sum_{k=0}^n a_k x^k$ with real coefficients $a_k\in\mathbb R$. We can always represent this polynomial via its sequence of coefficients $\boldsymbol a\equiv (a_0,...,a_n)$.
The number of alternations of signs, denoted with $v(P)$, is the number of times in the sequence $\boldsymbol a$ that we go from a positive to a negative sign, or vice versa. Equivalently, it's the number of indices $0\le k\le n-1$ such that $a_k a_{k+1}<0$.
This definition has to be somewhat adapted when $c_k=0$ for some $k$. Here we can simply ignore these so-called lacunary coefficients. This means that we count as an alternation of sign only a pair of successive nonzero coefficients with different signs. For example, $\boldsymbol a=(1,0,0,-1,1)$ has two alternations, as it is equivalent to $\boldsymbol a=(1,-1,1)$ for our purposes.
Multiplying by $(x-1)$ (or $(x-\alpha)$ for any $\alpha>0$ for that matter), gives the polynomial
$$(x-1)P(x) = -a_0 + (a_0-a_1)x + + \cdots + (a_{n-1}-a_n)x^n + a_n x^{n+1}.$$
Our question is thus how the number of alternations of signs in $(x-1)P(x)$ relates to $v(P)$.
Denote with $\boldsymbol a'$ the coefficients of $(x-1)P(x)$. Note that $a_k'=-a_k+a_{k-1}$, with the understanding that in this formula $a_{-1}=a_{n+1}=0$.
TL;DR

*

*We consider how the signs of the coefficients of $P(x)$ relate to the signs of the coefficients of $(x-1)P(x)$.

*We observe that trailing and leading zeros in the sequence of coefficients of $P$ can be neglected for the purpose of counting sign alternations. Similarly, we observe that we can replace any subset of repeated signs with a single one.

*We are left considering sequences made of $+1,-1,$ and $0$s, without repetitions. We observe that the $0$s can also be neglected as far as sign alternations are concerned.

*We are left with simple sequences of alternating $\pm1$ signs. For these we can easily count the number of sign alternations and reach the conclusion.

Full argument
Because we only really interested in the signs of the coefficients, let us denote with $\boldsymbol s$ and $\boldsymbol s'$ the signs corresponding to $\boldsymbol a$ and $\boldsymbol a'$. We chose $s_k,s_k'=\pm1$ if the corresponding coefficients $a_k,a_k'\lessgtr0$, or $s_k,s_k'=0$ if $a_k,a_k'=0$.
There are a few main observations we can make here:

*

*$s'_0=-s_0$

*If $s_k s_{k+1}<0$ (a sign alternation in the original sequence) then $s'_{k+1}=s_k$

*If $s_k s_{k+1}>0$ (a sign permanence in the original sequence) then $s'_{k+1}$ cannot be determined from $\boldsymbol s$ alone.

*If $s_k=0$, then $s'_{k}=s_{k-1}$ and $s'_{k+1}=-s_{k+1}$.

These rules convert the problem into a puzzle in which given a few ground rules we want to figure out how many sign changes are in the second sequence given those in the first one. Here is a bunch of examples of these rules applied to random $6$-elements sequences:

Here, each second row gives $\boldsymbol s'$ corresponding to the $\boldsymbol s$ reported in the first row. I'm denoting with a question mark the signs we cannot infer from $\boldsymbol s$.
A few things that are clear from observing these examples (or equivalently, from analysing the abovementioned rules) are:

*

*Leading and trailing zeros can be safely ignored, as they don't change the number of sign alternations.

*Similarly, repeated adjacent zeros can be replaced with a single zero

Let us then focus, without loss of generality, on the sequences without these features. Here's a few examples:

Observe now that, whenever we have repeated adjacent identical signs in the first row, we correspondingly get question marks in the second row. Question marks represent our inability to assess sign changes with the given knowledge. Still, these question marks can never decrease the number of sign changes in the second row, only possibly increase it. If we then forego trying to get an exact estimate, but limit ourselves to get a lower bound on the number of sign changes on the second row, we can ignore these question marks. This corresponds to ignoring sign permanences in the first rows. Let us then do this and consider sequences that do not have sign permanences. Here is a few examples:

We are almost there.
Focus now on the $0$ elements. Observe that we cannot simply remove these. For example, a $(+,0,+)$ pattern results in $(\square,+,-)$ (square denoting something that depends on the elements on the left of the pattern), while without the zero we would get a question mark due to the repeated $+$.
Instead, we can have two different types of patterns around a zero. Either $(s,0,s)$ with $s=\pm$, or $(s,0,-s)$ with $s=\pm$. In the former case, the second row has the pattern $(-s,s,-s)$, while in the latter case the second row has the pattern $(-s,s,s)$.
So when we have the pattern $(s,0,s)$, we get two additional sign changes in the second row, while with the pattern $(s,0,-s)$ there is no additional sign change.
All this is telling us that we can neglect all zeros from our sequences, and in the process only neglect zero or two additional sign changes.
Once the zeros have also been removed safely, we are left with simple sequences of alternating signs. More precisely, we have sequences of the form $(s,-s,s,-s,...,\pm s)$ of length $n$. Any such sequence has exactly $n-1$ sign alternations. Any such sequence becomes another sequence of the form $(-s,s,-s,s,...,\pm s)$ of length $n+1$, which has exactly $n$ sign alternations.
We thus proved that $(x-1)P(x)$ has at least one sign alternation more than $P(x)$.

To generate the images I used the following Mathematica snippet:
signsAfterProd[listOfSigns_] := ReplacePart[
    listOfSigns,
    {
     1 -> -listOfSigns[[1]],
     j_ :> Which[
        listOfSigns[[j]] == 0 && listOfSigns[[j - 1]] == 0, 0,
        listOfSigns[[j]] == 0, listOfSigns[[j - 1]],
        listOfSigns[[j - 1]] == 0, -listOfSigns[[j]],
        listOfSigns[[j]] == 1 && listOfSigns[[j - 1]] == -1, -1,
        listOfSigns[[j]] == -1 && listOfSigns[[j - 1]] == 1, +1,
        True, 5
        ] /; 1 < j <= Length@listOfSigns
     }
    ] // Append[#, Last@listOfSigns] &;

prettyDoubleRowGrid[listOfLists_] := listOfLists /. {
     1 -> Style["+", Red, Background -> LightRed],
     -1 -> Style["-", Blue, Background -> LightBlue],
     0 -> Style["0", Background -> LightGray],
     5 -> Style["?", Background -> LightPurple]
     } // 
   Grid[#, Frame -> All, ItemStyle -> Directive[Larger, Bold]] &;

makeNewSequence[sequence_] := {#, signsAfterProd@#} &@sequence;

Table[makeNewSequence@RandomChoice[{+1, 0, -1}, 6] // 
   prettyDoubleRowGrid, 5, 5] // Grid

Table[RandomChoice[{+1, 0, -1}, 6], 1000] // 
    Select[#[[1]] != 0 && #[[-1]] != 0 && 
       Not[Or @@ 
         Thread[Greater[Length /@ SequenceCases[#, {0 ..}], 1]]] &] //
    prettyDoubleRowGrid@*makeNewSequence /@ #[[;; 25]] & // 
  Partition[#, 5] & // Grid

Table[RandomChoice[{+1, 0, -1}, 6], 1000] // 
    Select[#[[1]] != 0 && #[[-1]] != 0 && 
       Not[Or @@ 
         Thread[Greater[
           Length /@ SequenceCases[#, {(0 .. | 1 .. | -1 ..)}], 
           1]]] &] // 
   prettyDoubleRowGrid@*makeNewSequence /@ #[[;; 25]] & // 
  Partition[#, 5] & // Grid

A: Here is how I think of it for the case where there are no zero coefficients. Let p(x) be such a polynomial. We can always restrict ourselves to having the leading coefficient as 1. Imagine replacing each coefficient of p(x) with a + or - according to whether the coefficient is positive or negative, and imagine organizing these pluses and minuses in blocks, giving something like:
[++++][----][+++++]....
The number of sign changes for p(x) is one less than the number of blocks.  It is easy to show that multiplying by (x-a) for a>0 will produce a negative term when a + block meets a - block and a positive term when a - block meets a + block.  Ignoring what happens in between, we have a number signs equal to the number of sign changes for p(x), meaning that we have a number of sign changes that is one less than for p(x).  There will additionally be a x^n+1 term adding a + at the beginning, and the constant term will be opposite to that of the last block, adding a sign change at the end, so in total there must be at least one more sign change in (x-a)p(x) than in p(x).
Working with zero coefficients is similar.  Think of including 0 blocks. A minus block after a zero block still gives a negative term at the beginning and a plus block following a zero block still gives a positive term at the beginning.  I will let you work out the details as to why the zero blocks can be removed and still get the same results.
