My complex analysis textbook stated the following proposition:
Let $\Gamma$ and $\Gamma'$ be two closed paths in the complex plain. If there exists an homotopy between these two paths, then: $$\oint_\Gamma f=\oint_{\Gamma'}f$$
I came up with the following example:
Let $$f = \frac{g(z)}{z - a}$$
Then we have that
$$\oint_\Gamma \frac{g(z)}{z - a} =\oint_{\Gamma'}\frac{g(z)}{z - a}$$
Using Cauchy integral formula we end up with:
$$2 \pi i\ g(a) \text{Ind}_\Gamma(a)= 2 \pi i\ g(a) \text{Ind}_{\Gamma'}(a)$$
Witch is equal to:
$$ \text{Ind}_\Gamma(a) = \text{Ind}_{\Gamma'}(a)$$
But this is not necessarily true. There could be some point $a$ that is in the interior of $\Gamma$, hence $\text{Ind}_\Gamma(a) = 1$ but after the homotopy it end up outside $\Gamma'$, hence $\text{Ind}_{\Gamma'}(a) = 0$. What is going on there? Did I make any mistake?