Do classifying spaces determine categories of principal bundles?

If $$X$$ is a topological space, $$G$$ a topological group and $$E G \to BG$$ a universal bundle, isomorphism classes of numerable principal $$G$$-bundles over $$X$$ are in one-to-one correspondence with homotopy classes of maps $$X \to BG$$.

I am curious if this fact can be refined to obtain a homotopic description of the category of principal $$G$$-bundles over $$X$$. In other words, is there some category of maps $$X \to BG$$ (or a variation of this) equivalent to the category of principal $$G$$-bundles over $$X$$?

• When $G=(\mathbb R,+)$, then $BG$ is contractible. For example, we may take $BG$ to be a single point. You can't recover the category of principal bundles for the group $\mathbb R$ from the data of a single point. Jan 17 at 12:52
• Category of principal $\mathbb R$-bundles over $X$ is equivalent to a category with one object (trivial bundle $X \times \mathbb R$). Automorphisms of $X \times \mathbb R$ are identified with maps $X \to \mathbb R$. So some description in terms of maps from $X$ exists. Of course it can't be recovered from data of a single point, but maybe so from the universal bundle $\mathbb R \to \mathrm{pt}$? Jan 17 at 13:16
• If you interpret the whole question homotopy theoretically, then yes - the mapping space $map(X,BG)$ can be viewed as an $\infty$-groupoid, and this is the $\infty$-groupoid of principal $G$-bundles (morphisms are morphisms of $G$-bundles, and then you allow homotopies between those and so on and so forth). I'm not sure how this translates to the point-set topological setting though, so the answer will probably depend on what you're looking for Jan 17 at 14:28
• I think it's not going to work in a purely topological setting. But one also doesn't have to go to infinity: consider the classifying space to be the topological groupoid $BG$ with a single object. Then, principal $G$-bundles are the same as continuous anafunctors $X \to BG$. So this is your category of maps. Jan 17 at 14:33
• @MaximeRamzi This formalism works for groups in any topos, and in particular, in the topos of condensed sets (modulo cardinality issues), so if the topological space is nice enough (say, compactly generated weak Hausdorff), I think that this would lead to a satisfactory answer.
– Z. M
Jan 17 at 14:46