My question is the following; why $\displaystyle H^p\big(\coprod_{i\in I}X_i;G\big)$ is isomorphic to $\displaystyle\prod_{i\in I}H^p(X_i;G)$?
I have tried the following: one can prove the following fact:
If $(A_i)_{i\in I}$ is a family of abelian groups and $G$ is an abelian group, then we have an isomorphism:
$$\text{Hom}\big(\bigoplus_{i\in I}A_i,G\big)\cong\prod_{i\in I}\text{Hom}(A_i,G)$$
This can be easily proved by applying several times the Universal Property of the Direct Sum, or more generally, using the fact that the direct sum of a family of abelian groups constitutes its coproduct in the category of abelian groups.
We then have that:
$$C^p\big(\coprod_{i\in I}X_i,G\big)=\text{Hom}\big(C_p\big(\coprod_{i\in I}X_i\big),G\big)\cong\text{Hom}\big(\bigoplus_{i\in I}C_p(X_i),G\big)\cong\prod_{i\in I}\text{Hom}\big(C_p(X_i),G\big)=\quad \;\;\;\;\;=\prod_{i\in I}C^p(X_i,G)$$
In the first isomorphism we used that $\displaystyle C_p\big(\coprod_{i\in I}X_i\big)\cong\bigoplus_{i\in I}C_p(X_i)$, for obvious reasons; a singular chain is a finite sum of sinular simplices, all of which have to lie in one, and exactly one of the spaces $X_i$, otherwise the image of a simplex wouldn't be path connected, which is absurd.
However, I don't know how to pass from this:
$$C^p\big(\coprod_{i\in I}X_i,G\big)\cong\prod_{i\in I}C^p(X_i,G)$$
To this:
$$H^p(\coprod_{i\in I}X_i;G)\cong \prod_{i\in I}H^p(X_i;G)$$
Nor if that is even possible, via a direct argument.
Thanks in advance for your time.
Denote by $\pi_p^i$ the canonic projection of $\displaystyle\prod_{i\in I}C^p(X_i,G)$ onto $C^p(X_i,G)$. For $p\geq 0$ define $\prod_{i\in I}\text{res}_p^i$ as the unique homomorphism such that the diagram
$$\require{AMScd} \def\diaguparrow#1{\smash{ \raise.6em\rlap{\scriptstyle #1} \lower.3em{\mathord{\diagup}} \raise.52em{\!\mathord{\nearrow}} }} \begin{CD} && \prod_{i\in I}C^p(X_i,G)\\ & \diaguparrow{\prod_{i\in I}\text{res}_p^i} @VV \pi_p^i V \\ C^p\big(\coprod_{i\in I}X_i,G) @>> \text{res}_p^i> C^p(X_i,G) \end{CD}$$
Commutes, where $\text{res}_p^i$ is defined by: for each $\displaystyle\phi\in C^p\big(\coprod_{i\in I}X_i,G\big),\;\text{res}_p^i(\phi)=\phi|_{C_p(X_i)}$
Indeed, $\prod_{i\in I}\text{res}_p^i$ is a well-defined homomorphism, according to the universal property of the direct product of groups. Moreover, through several applications of this result, one can prove that this map is indeed an isomorphism, for each $p\geq 0$.
Define $\delta'_p$ as the unique homomorphism such that the diagram:
$$\require{AMScd} \def\diaguparrow#1{\smash{ \raise.6em\rlap{\scriptstyle #1} \lower.3em{\mathord{\diagup}} \raise.52em{\!\mathord{\nearrow}} }} \begin{CD} && \prod_{i\in I}C^{p+1}(X_i,G)\\ & \diaguparrow{\delta'_p} @VV \pi_{p+1}^i V \\ \prod_{i\in I}C^p(X_i,G) @>> \delta_p^i\circ\pi_p^i> C^{p+1}(X_i,G) \end{CD}$$
Commutes. In other words, $\delta'_p=\prod_{i\in I}\delta_p^i\circ\pi_p^i$, that is, $\delta'_p$ is the homomorphism defined by:
$$\delta'_p:\prod_{i\in I}C^p(X_i,G)\rightarrow\prod_{i\in I}C^{p+1}(X_i,G)$$
$$(\phi_i)_{i\in I}\;\;\longmapsto\;\;(\delta_p^i\circ\phi_i)_{i\in I}$$
Where $\delta_p^i:C^p(X_i,G)\longrightarrow C^{p+1}(X_i,G)$ is nothing but the retriction of $\displaystyle\delta_p:C^p(\coprod_{i\in I}X_i,G)\longrightarrow C^{p+1}(\coprod_{i\in I}X_i,G)$ to $C^p(X_i,G)$
On the one hand, $\delta'_{p+1}\circ\delta'_p=0$
Let $\displaystyle(\phi_i)_{i\in I}\in\prod_{i\in I}C^p(X_i,G)$. Then:
$$(\delta'_{p+1}\circ\delta'_p)((\phi_i)_{i\in I})=(\delta'_{p+1}((\delta_p^i\circ\phi_i)_{i\in I}))=(\delta_{p+1}^i\circ\delta_p^i\circ\phi_i)_{i\in I}=((\delta_{p+1}\circ\delta_p)|_{C^p(X_i,G)}\circ\phi_i)_{i\in I}=(0\circ\phi_i)_{i\in I}=(0)_{i\in I}$$
We have the following cochain complexes: $$\require{AMScd} \begin{CD} \dots@>\delta_{p-1}>>C^p\big(\coprod_{i\in I}X_i,G\big)@>\delta_p>>C^{p+1}\big(\coprod_{i\in I}X_i,G\big)@>\delta_{p+1}>>\dots\\ @.@V\prod_{i\in I}\text{res}_p^iV\cong V@V\prod_{i\in I}\text{res}_{p+1}^iV\cong V@. \\ \dots@>\delta'_{p-1}>>\prod_{i\in I}C^p(X_i,G)@>\delta'_p>>\prod_{i\in I}C^{p+1}(X_i,G)@>\delta'_{p+1}>>\dots \end{CD}$$
On the other hand we have that $\delta_p'\circ\prod_{i\in I}\text{res}_p^i=\prod_{i\in I}\text{res}_{p+1}^i\circ\delta_p$.
Let $\displaystyle\phi\in C^p\big(\coprod_{i\in I}X_i,G\big)$. Then:
$$(\delta'_p\circ\prod_{i\in I}\text{res}_p^i)(\phi)=\delta'_p((\phi|_{C_p(X_i)})_{i\in I})=(\delta_p^i\circ\phi|_{C_p(X_i)})_{i\in I}=(\delta_p|_{C^p(X_i,G)}\circ\phi|_{C_p(X_i)})_{i\in I}=((\delta_p\circ\phi)|_{C^{p+1}(X_i,G)})_{i\in I}=(\text{res}_{p+1}^i(\delta_p(\phi)))_{i\in I}=\big(\prod_{i\in I}\text{res}_{p+1}^i\circ\delta_p\big)(\phi)$$
Since $\prod_{i\in I}\text{res}_\bullet^i:C^\bullet\displaystyle\big(\coprod_{i\in I}X_i,G\big)\longrightarrow\prod_{i\in I}C^\bullet(X_i,G)$ is a cochain map, it induces homomorphisms in cohomology:
$$(\prod_{i\in I}\text{res}_p^i)^*:H^p\big(\coprod_{i\in I}X_i;G)\longrightarrow\frac{\text{Ker }\delta'_p}{\text{Im }\delta'_{p-1}}$$
For all $p\geq 0$. Since $\prod_{i\in I}\text{res}_p^i$ is an isomorphism for each $p\geq 0$, it follows that $(\prod_{i\in I}\text{res}_p^i)^*$ is an isomorphism as well. Now:
$$(*)\quad\frac{\text{Ker }\delta'_p}{\text{Im }\delta'_{p-1}}\cong\frac{\text{Ker }\prod_{i\in I}\delta_p^i\circ\pi_p^i}{\text{Im }\prod_{i\in I}\delta_{p-1}^i\circ\pi_{p-1}^i}\cong\frac{\prod_{i\in I}\text{Ker }\delta_p^i\circ\pi_p^i}{\prod_{i\in I}\text{Im }\delta_{p-1}^i\circ\pi_{p-1}^i}$$
Where the last isomorphism is due to the fact that the projections $\delta_p^i\circ\pi_p^i$ completely determine the map $\delta'_p$.
We must prove that:
$$\frac{\prod_{i\in I}\text{Ker }\delta_p^i\circ\pi_p^i}{\prod_{i\in I}\text{Im }\delta_{p-1}^i\circ\pi_{p-1}^i}\cong\prod_{i\in I}\frac{\text{Ker }\delta_p^i}{\text{Im }\delta_{p-1}^i}$$
To achieve that, we define the map:
$$F:\prod_{i\in I}\text{Ker }\delta_p^i\circ\pi_p^i\longrightarrow\prod_{i\in I}\frac{\text{Ker }\delta_p^i}{\text{Im }\delta_{p-1}^i}$$
$$(\phi)_{i\in I}\longmapsto([\phi_i])_{i\in I}$$
Clearly $F$ is well-defined, since being cohomologous is an equivalence relation. $F$ is also a group homomorphism; moreover, its kernel is $\displaystyle\prod_{i\in I}\text{Im }\delta_{p-1}^i\circ\pi_{p-1}^i$
To show that, first suppose that $\displaystyle(\phi_i)_{i\in I}\in\prod_{i\in I}\text{Im }\delta_{p-1}^i\circ\pi_{p-1}^i$. Then there exists $\displaystyle(\psi_i)_{i\in I}\in\prod_{i\in I}C^{p-1}(X_i,G)$ such that:
$$\phi_i=\delta_{p-1}^i\circ\psi_i$$
Therefore:
$$F((\phi_i)_{i\in I})=([\phi_i]_{i\in I})=([\delta_{p-1}^i\circ\psi_i])_{i\in I}=([0])_{i\in I}$$
On the other hand, if $(\phi_i)_{i\in I}\in\text{Ker }F$, then $([\phi_i])_{i\in I}=([0])_{i\in I}$, which can only happen if $[\phi_i]=[0]$ for all $i\in I$. But this implies that, for each $i\in I$, there exists a map $\psi_i:C_{p-1}(X_i)\longrightarrow G$ such that:
$$\phi_i=\delta_{p-1}^i\circ\psi_i$$
Therefore, $\phi_i\in\text{Im }\delta_{p-1}^i\circ\pi_{p-1}^i$ for each $i\in I$, or in other words, $\displaystyle(\phi_i)_{i\in I}\in\prod_{i\in I}\text{Im }\delta_{p-1}^i\circ\pi_{p-1}^i$
Now, according to the first isomorphism theorem, we can conclude that:
$$\frac{\prod_{i\in I}\text{Ker }\delta_p^i\circ\pi_p^i}{\text{Ker }F}\cong\frac{\prod_{i\in I}\text{Ker }\delta_p^i\circ\pi_p^i}{\prod_{i\in I}\text{Im }\delta_{p-1}^i\circ\pi_{p-1}^i}\cong\prod_{i\in I}\frac{\text{Ker }\delta_p^i}{\text{Im }\delta_{p-1}^i}\cong\prod_{i\in I}H^p(X_i;G)$$
Now, from $(*)$ we conclude that
$$H^p\big(\coprod_{i\in I}X_i;G\big)\cong\frac{\text{Ker }\delta'_p}{\text{Im }\delta'_{p-1}}\cong\prod_{i\in I}H^p(X_i;G)$$
As desired.