TITLE: The classifying space of a gauge group
QUESTION [13 upvotes]: Let $G$ be a Lie group and $P \to M$ a principal $G$-bundle over a closed Riemann surface. The gauge group $\mathcal{G}$ is defined by
$$\mathcal{G}=\lbrace f : P \to G \mid f(p \cdot g) = g^{-1}f(p)g\ (\forall g \in G, p \in P) \rbrace.$$
I want to understand the following statement which I found in Atiyah-Bott (Roy. Soc. London Ser. A 308).

PROPOSITION 2.4. Let $BG$ be the classifying space for $G$. Then in homotopy theory
  $$B\mathcal{G} = \mathrm{Map}_P(M,BG).$$ Here the subscript $P$
  denotes the component of a map of $M$ into $BG$ which induces $P$.

This is proved by showing that $\pi:\mathrm{Map}_G(P,EG) \to \mathrm{Map}_P(M,BG)$ is a universal $\mathcal{G}$-bundle. 
My questions: 

Why is $\mathrm{Map}_G(P,EG)$ contractible? 
How do we see that $\pi:\mathrm{Map}_G(P,EG) \to \mathrm{Map}_P(M,BG)$ is locally trivial? Here for a $G$-equivariant map $f:P \to EG$, $\pi(f)$ is the map $P/G \to EG/G$ which is canonically induced by $f$. 

Notes:

It is easy to see that $\mathrm{Map}(P,EG)$ is contractible, because $EG$ is contractible. But, because of the $G$-actions, it does not seem that we can apply the same discussion to $\mathrm{Map}_G(P,EG)$.
For the second question, Atiyah and Bott say the following. But I can not understand it and I want to understand the details.

If $BG$ is paracompact and locally contractible, which is easily arranged, $\pi$ will be a locally trivial principal fibring, as follows easily from the homotopy properties of fibrings.

If there is a good exposition of this problem, please let me know.

REPLY [2 votes]: Actually, $EG$ has more structure that just being contractible. You can endow it with a continuous group multiplication (for the compactly generated topology on the product) and there is a contraction $F\colon [0,1]\times EG\to EG$ such that each $F_t$ is a group homomorphisms. Moreover, $G$ is a closed subgroup and we have $F_t(g)\cdot F_t(x)\cdot F_t(g)^{-1}=g\cdot F_t(x)\cdot g^{-1}$. Putting this together you see that you can apply this contraction to get a contraction of the space of equivariant maps $C(P,EG)^G$. 
However, this is limited to locally contractible $G$ and spelling out the details is a bit involved since you have to use different models of $EG$ that are not entirely compatible with each other. For instance, the claimed equalities can be checked when considering $EG$ as left continuous step functions from $[0,1]$ to $G$ (cf. Brown-Morris "Embeddings in contractible or compact objects", ), but the topology is the one from taking $EG=|\mathcal{E}G|$ for $\mathcal{E}G$ the nerve of the pair groupoid of $G$ (cf. Segal "Classifying spaces and spectral sequences" and "Cohomology of topological groups"). These between these models there exists a bijection that you can use to verify the assertions.