I want to understand the following:
Let $\pi:X \to Y$ a fiber bundle and $\omega$ a closed smooth differential form. Define $I: Y\to \mathbb C$, $y\mapsto I(y)=\int_{\pi^{-1}(y)} \omega$. Then Stoke's theorem implies $I$ is constant.
This situation arises in a text I want to understand. There are more assumptions given (for example $\pi$ proper), but I think they are only needed to arive at this situation.
So far I noticed that if $\pi^{-1}(y)=\partial M$, then by Stoke's thm $$\int_{\pi^{-1}(y)} \omega=\int_M d\omega=0 .$$ So maybe I need to relate this integral with $dI$ or $\frac d {dy} I(y)$, but I don't know how to do that.
Because $\pi$ is proper (yes, this is very important), the fibers $\pi^{-1}(y)$ are compact $k$-dimensional submanifolds of $X$. You need, of course, also to add that $\omega$ is a closed $k$-form on $X$ and $Y$ is connected.
Suppose $y,y'\in Y$, and join them by a smooth path $\gamma$. Then $\pi^{-1}(\gamma)$ is a compact submanifold $W\subset X$ with $\partial W = \pi^{-1}(y') - \pi^{-1}(y)$. Can you finish now?