Let $X$ and $Y$ be topological spaces and a surjective map $f:X\rightarrow Y $. Suppose that a group $G$ acts on $X$. and let $\pi:X\rightarrow X/G$ be the quotient map.
1) Under what conditions $f$ factors through $X/G$? I mean there exists f':X/G\rightarrow Y such that f=f'\circ \pi
My guess is that if we have $f(gx)=f(x)$ for all $g\in G$ and $x\in X$ then this is the only required condition
2) Now suppose that another group $H$ acts also on $X$ and such that $f(gx)=gx$ for all $g\in G$ and $x\in X$ and $f(hx)=hx$ for all $h\in H$ and $x\in X$, then in this case how to factor $f$ in a way that takes into account the two actions of $G$ and $H$ and construct an injective induced map? for example consider a surjective map $f:S^1\times S^1\rightarrow Z$ where $Z$ is a given topological space. I want to construct an homeo to $Z$ by passing to the quotient: suppose we know that $f(y,x)=f(x,y)$ and $f(\bar x,\bar y)=f(x,y)$ this means that we have two actions:the action of the symmetric group $S_2$ permuting coordinates and the action of $\mathbb Z_2$ generated by "taking the conjugate" action how do we pass to the quotient by $S_2$ and $\mathbb Z_2$ to construct an injective map?