# If a principal bundle has a global section, then it is the trivial bundle

Let be $$(P, M, \pi, G)$$ a principal G-bundle. Suppose that there is a section $$\sigma: M \to P$$. I want to prove that $$P \cong M \times G$$. I built $$f: M\times G \to P$$ such that $$f(p, g) = \sigma(p) \cdot g$$ where $$\cdot$$ is the right action on the bundle. I can prove that this is smooth and bijective, but I cannot prove that this is a diffeomorphism. My idea is to use the global rank theorem, but I can prove only that the map has constant rank on each fiber, where the action is transitive. How can I prove that the rank is the same everywhere?

You have to use the fact that $$P$$ is locally trivial. To check that $$f$$ is a diffeomorphism, we can work locally over $$M$$, and thus assume that $$P$$ is actually the trivial bundle $$M\times G$$. Our smooth section $$\sigma$$ then has the form $$\sigma(p)=(p,\tau(p))$$ for some smooth function $$\tau:M\to G$$, so then our putative diffeomorphism is the function $$f:M\times G\to M\times G$$ given by $$f(p,g)=(p,\tau(p)\cdot g)$$. You can then think about the rank of this map as you suggest, but the easiest way to see it is a diffeomorphism is to just write down its inverse: $$f^{-1}(p,g)=(p,\tau(p)^{-1}\cdot g)$$. This inverse function is smooth since $$\tau$$ and the inverse map on $$G$$ are both smooth.