Understanding a proof of the pentagon problem From
this blog concerning the pentagon problem (problem statement summarized below but is also in the link):
To each vertex of a regular pentagon an integer is assigned, so that the sum of all five numbers is positive. If three consecutive vertices are assigned the numbers $x, y, z$ respectively, and $y$ is negative, you may replace $x, y, z$ by $x+y, -y, z+y$, respectively. Such an operation is performed repeatedly as long as at least one of the five numbers is negative. Determine whether this procedure necessarily comes to an end after a finite number of steps.

In the proof in the blog that starts in the paragraph above the second image on the main text of the blog page (the paragraph starts: "My favorite solution to the Pentagon Problem appears in Peter Winkler’s great book "):
Why is it the case that $i^{+}$ is reduced by exactly $1$ when $x(i+1)$ is switched?
Since $i^{+}$ is all indices $j > i$ such that $b(j) < b(i)$, wouldn't switching $x(i+1)$ to be negative mean that:
If we define $b'(i)$ as $b(i)$ with $x(i)$ receiving the flip treatment (meaning make it positive and subtract it from the two surrounding $x$ values), then $$b'(i) = x(1) + \dots + x(i-1) + [x(i) + x(i+1)]$$ and $$b'(i+1) = x(1) + \dots + [x(i) + x(i+1)] - x(i+1) = b(i) > b'(i)$$
Since we're comparing all the other sums $b'(j > i+1)$  in $i^{+}$ to $b'(i)$ why isn't it the case that one $b'(j > i+1)$ which was previously smaller than $b(i)$ is now larger than $b'(i)$ and therefore not in $i^{+}$ making an additional decrement to $i^{+}$?
 A: 
When $x(i+1)$ is flipped, $i^+$ decreases by $1$ and every other $j^+$ is unchanged, so $P$ goes down by exactly $1$.

The statement above appears in that blog as well as the book "Mathematical Puzzles: A Connoisseur's Collection" by Peter Winkler. That statement is wrong since, as you suspected, $i^+$ can decrease by more than $1$.
The following illustration appears in the book as well as on that blog.

Let the vertices of each pentagon be indexed $0$, $1$, $2$, $3$, $4$ clockwise with vertex $0$ being the top left vertex that is assigned number 3.

*

*Initially, the numbers assigned to vertices are $3, 1, -2, 0, -1$.
The sequence $b(0), b(1), \cdots$ is $0, 1, -1, -1, -2, 1, 2, 0, 0, -1, 2, 3, 1, 1, 0, 3, 4, 2, 2, 1, \cdots$.
Hence $1^+=7$


*After the flipping at vertex $2$ that changes its assignment from $-2$ to $2$ and decreases both adjacent vertices by $2$,  the numbers assigned to vertices are $3, -1, 2, -2, -1$.
The sequence $b(0), b(1), \cdots$ becomes $0, -1, 1, -1, -2, 1, 0, 2, 0, -1, 2, 1, 3, 1, 0, 3, 2, 4, 2, 1, \cdots$.
Hence $1^+=1$
Note the decrease of $1^+$ is $7-1=6>1$.
However, the idea and the argument in the blog and the book is essentially correct. The following explains what is happening.

The case of $2$-gon is trivial to verify.
Suppose we have a $n$-gon with $n\ge3$.
To describe clearly the change brought by the flipping at vertex $i+1$ where $x(i+1)<0$, let us use $x'(\cdot), b'(\cdot), k^{+'}(\cdot), P'$ to denote the map $x(\cdot), b(\cdot), k^{+}(\cdot)$ and the number $P$ after the flipping, respectively.
Assume $i\not=0$ and $i\not= n-1$ first.
The sequence $b'$ is the same as sequence $b$ except that $b'(i)=b(i+1)$ and $b'(i+1)=b(i)$ as well as when indices differ from $i$ or $i+1$ by a multiple of $n$.
Then we have

*

*$i^{+'} = (i+1)^{+}$,

*$(i+1)^{+'} = i^{+} - 1$, and

*$k^{+'} = k^{+}$ for all $k\not\in\{i, i+1\}$.

Hence $\sum_{k=0}^{n-1}k^{+'} = (\sum_{k=0}^{n-1}k^{+}) -1$. That is, $P-P'=1$, which leads to the claim "$P$ goes down by exactly $1$...".
Now assume $i=0$ or $i=n-1$. It can happen that $b'(\cdot)$ differs from $b(\cdot)$ everywhere. The argument above breaks down.
However, we can observe that the value of $P$ does not depend on the choice of vertex that is indexed $0$. Ditto for $P'$. So we can re-index the vertices so that the vertex $v_{i+1}$ by the original indexing, at which we make the flipping, is the vertex $v_2$ by the new indexing. We are back to the first case with $i=1$.
