Proof for rotation number $\operatorname{rot}(K) = \sum \limits_C \omega_C(K) - \sum \limits_p \operatorname{ind}_p(K)$? I need the following statement for a proof I am working on. It seems so simple and I'd rather have it ready to be cited instead of spending a page proving it (I found one for this statement), but different geometers at my university agreed that is probably true, but couldn't find any paper that I could cite it from:
The rotation number is equal to the sum over the winding numbers of the connected components minus the sum over the indices of the double points, so
$$\operatorname{rot}(K) = \sum \limits_C \omega_C(K) - \sum \limits_p \operatorname{ind}_p(K) ,$$
with

*

*$\operatorname{rot}$ the rotation number of a regular closed curve (see Wikipedia: Rotation Number)

*$K$ is an an arbitrary closed generic (at most double point intersections, no tangent intersections) regular (smooth, non-vanishing derivative) curve in the plane

*The sum $\sum \limits_C$ is over all connected components of $\mathbb{R}^2 \setminus K$ (we denote the image of our curve as $K$ here)

*$\omega_C(K)$ is the winding number of $K$ around an arbitrary point in $C$ (see Wikipedia: Winding Number)

*The sum $\sum \limits_p$ is over all double points of $K$

*$\operatorname{ind}_p(K)$ is the arithmetic mean of the winding numbers of the four connected components around $p .$ Sometimes there is a single connected component with two of its corners equal to $p.$ Count its winding number twice for the arithmetic mean.

In the original theorem that I am trying to prove (about connections of immersions and the resulting value of Arnold's $J^+$-invariant) I first had a lemma with a pretty wonky proof. Then I realized that from my theorem the above statement about the rotation number follows. Which started my interest in the statement and made me realize that if I use this, I won't need the cheesily proven lemma and that it actually is a direct corollary from it.
Please if you know where this statement is already proven let me know. I don't want to believe that no one has proven this yet. The proof took me some hours to get, so it can't be that hard. Or maybe noone cares about double point indices enough? :-)
 A: Your equality follows the one appearing on the third line of page 159 of the paper A new formula for winding number, written by McIntyre and Cairns, published in Geometriae Dedicata in 1993.

To see this, we need a definition.  Suppose that $\gamma$ is a closed generic regular curve in the plane. For each double point $p$ of $\gamma$ we choose $D_p$ be a very small round disk about $p$.  We chose the disks $D_p$ so that they are disjoint and so that they meet every component $C$ of $\mathbb{R}^2 - \gamma$ in either one or two "wedges" (that is, quarter-disks).
We define the index of a component $C$ to be
$$\mathrm{index}(C) = \chi(C) - \frac{\mbox{the number of wedges in $C$}}{4}$$
That is, the index is a variant of the Euler characteristic that takes the (combinatorial) geodesic curvature of $\partial C$ into account.
We now have the following.
$$\mathrm{rot}(\gamma) = \sum_C \omega_C(\gamma) \cdot \mathrm{index}(C)$$
From this, we can obtain your formula by expanding the definition of index and then rearranging the sum over the double points.
Alternatively, from this, we can obtain the McIntyre and Cairns formula, by "smoothing" each double point to (a) connect regions with equal winding number and (b) separate regions with winding number differing by $\pm 2$.
