Group object in category of topological spaces over a fixed space Let $X$ be a topological space and $\mathcal{C}$ be category of topological spaces over $X$. 


*

*Objects are topological space with map $\pi:Y\rightarrow X$.

*Morphisms are continuous maps compatible with the $\pi$ maps.


I am trying to see what are group objects in this category. 
To say an object $\pi:G\rightarrow X$ is a group object I need to give multiplication morphism, identity morphism, inverse morphism.
When defining group object, we assume that category has finite products. In this category, product of $\pi_1: G_1\rightarrow X$ and $\pi_2:G_2\rightarrow X$ is $\eta:G_1\times_X G_2\rightarrow X$ where 
$$G_1\times_X G_2=\{(g_1,g_2):\pi_1(g_1)=\pi_2(g_2)\}$$
and $\eta(g_1,g_2)=\pi_1(g_1)=\pi_2(g_2)$.
In case when $G_1=G_2$, product is just $G\times G$. So, I am guessing group objects are just topological groups with continuous maps to $X$.
Am I missing anything?? This does not seem to be correct.
 A: The terminal object of $\mathbf{Top}/X$ is $\mathrm{id}_X : X \to X$, and product is given by pullback. With this in mind, a group object in $\mathbf{Top}/X$ consists of:


*

*An object $\pi : G \to X$;

*A morphism $e : X \to G$ such that $\pi \circ e = \mathrm{id}_X$;

*A morphism $i : G \to G$ such that $\pi \circ i = \pi$;

*A morphism $m : G \times_X G \to G$ such that $\pi \circ m = \pi \times_X \pi$;


such that the usual group axioms hold.
As I suggested in the comments above, it helps to think of objects of $\mathbf{Top}/X$ as $X$-indexed families of topological spaces, in which case you can think of $\pi,e,i,m$ as:


*

*A family $(G_x \mid x \in X)$ of topological spaces;

*A family $(e_x \in G_x \mid x \in X)$ of elements of the spaces;

*A family $(i_x : G_x \to G_x \mid x \in X)$ of continuous maps; and

*A family $(m_x : G_x \times G_x \to G_x \mid x \in X)$ of continuous maps.


The group axioms can then simply be interpreted componentwise, so that you can draw the conclusion that a group object in $\mathbf{Top}/X$ is an $X$-indexed family of topological groups.
Translating back to the 'usual' setting, a group object in $\mathbf{Top}/X$ is a continuous map $\pi : G \to X$ together with maps $e,i,m$ as above, such that for each $x \in X$, the fibre $\pi^{-1}(x)$ is a topological group under the restrictions of $e,i,m$ to the appropriate domains.
