For a Lie group $G$, let $\pi \colon P \rightarrow M$ be a principal $G$ bundle over a smooth manifold $M$. There is a canonical shear map $ S \colon P \times G \rightarrow P \times_{M} P$ defined as $(p,g) \mapsto (p,pg)$. In https://ncatlab.org/nlab/show/principal+bundle#idea, it is given that for a principal bundle, $S$ is an "isomorphism". Although from the action of $G$ on $P$, I could show that $S$ is bijective and smooth, I am not able to show that the inverse of $S$ is smooth.
My question:
Is $S$ always a diffeomorphism or just a bijective smooth map?
The shear map is a diffeomorphism: A local section $s:U\to P$ induces diffeomorphisms $$ U\times G\times G\to P_{|U}\times G,\;\;\;\;(x,h,g)\mapsto (s(x)h,g) $$ $$ U\times G\times G\to (P \times_{M} P)_{|U},\;\;\;\;(x,h,g)\mapsto (s(x)h,s(x)g) $$
Under this diffeomorphism the shear map becomes
$$ U\times G\times G\to U\times G\times G,\;\;\;\;(x,h,g)\mapsto(x,h,hg) $$
which has a smooth inverse $(x,h,g)\mapsto(x,h,h^{-1}g)$.