# cup product in relative cohomology; why the subsets $A$ and $B$ of $X$ have to be open?

I have a question about cup products in relative cohomology. In lecture we defined the cup product on singular cohomology as follows:

Let $R$ be a commutative ring with unit $1_R$, let $X$ be a topolocial space. The cup product on singular cochain complexes is $$\smile: C^p(X;R)\otimes_R C^q(X;R)\to C^{p+q}(X;R)$$ $$\alpha \otimes \beta \mapsto \alpha \smile \beta$$ where $(\alpha \smile \beta )(\sigma):=(-1)^{pq}\alpha (\sigma_{|[0,..,p]})\beta (\sigma_{|[p,..,p+q]})$ für all $\sigma\in C_{p+q}(X;R)$ (or click here https://en.wikipedia.org/wiki/Cup_product ). This map induces a map in singular cohomology $$\smile: H^p(X;R)\otimes_R H^q(X;R)\to H^{p+q}(X;R)$$ $$[\alpha ] \otimes [\beta ] \mapsto [\alpha \smile \beta],$$which follows from the fact that the following formula holds:$$d^{p+q}(\alpha\smile \beta)=d^p(\alpha)\smile\beta + (-1)^p \alpha\smile d^P(\beta).$$

Now we stated that it's possible to define a cup product for relative homology:

Let $A$ and $B$ open subsets of $X$ then there is a relative cup-pruct in singular cohomology $$\smile: H^p(X,A;R)\otimes_R H^q(X,B;R)\to H^{p+q}(X,A\cup B;R)$$ $$[\alpha ] \otimes [\beta ] \mapsto [\alpha \smile \beta].$$ Essential steps in the construction which I know: The key point of the construction is that the inclusion map $$i_*:C^*(X,A\cup B;R)\hookrightarrow C^*(X,A+B;R)$$ is a cochain homotopy equivalence. Here $C^*(X,A+B;R)$ denotes the singular cochain complex with basis: all cochains in $X$ vanishing on chains in $A$ and $B$.

Next in the construction the essential step is to consider the composition of the maps $$i_A^*\times i_B^*: C^*(X,A;R)\times C^*(X,B;R)\to C^*(X;R)\times C^*(X;R)$$ and $$\smile: C^*(X;R)\otimes_R C^*q(X;R)\to C^{*}(X;R),$$ $\smile\circ i_A^*\times i_B^*$ (if nothing is wrong). The map $i_A^*$ is the incuced map of the inclusion $i_A:(X,\emptyset)\to (X,A)$ on singular cochain complexes. Then one can prove that $\smile\circ i_A^*\times i_B^*$ factorizes over $C^*(X,A+B;R)$, such that there exists a map $$\smile ': C^*(X,A;R)\times C^*(X,B;R)\to C^*(X,A+B;R)$$ which induces the desired cup product in relative cohomology (here we need the first step, that $H^*(X,A\cup B;R)\cong H^*(X,A+ B;R)$).

My question is: Where do we need that $A$ and $B$ are open in $X$? Why can't $A$, $B$ arbitrary subsets in $X$?

Best.

Observe that one of the crucial step is to prove that the inclusion map $C^*(X,A\cup B;R) \hookrightarrow C^*(X,A+B;R)$ induced isomorphism on co-homology. To prove this we need to use the five lemma, and the fact that the restriction maps $C^*(A\cup B;R)\to C^*(A+B;R)$ induced isomorphism on cohomology.
To prove the last claim, observe that $C^*(A+B)$ is the dual of the subgroup $C_*(A+B) \subset C_*(A\cup B)$ consists of sums of *-simplicies lying in $A$ or $B$. Now Excision Theorem says that if $X= \cup U_j$ s.t interior of $U_j$ covers $X$, then the inclusion map $i: C_n^U(X) \hookrightarrow C_n(X)$ is a chain homotopy equivalence. So by this theorem the inclusion is a chain homotopy equivalence, so dual restriction map $C^*(A\cup B;R)\to C^*(A+B;R)$ is also a chain homotopy equivalence, hence induced isomorphism on cohomology. And this complete the proof of our original claim.
NOTE To use excision we need the fact that $A$ abd $B$ are two open set, otherwise $A$ may not be an open set in $A\cup B$ or otherway.
Short time after asking for the relative cup product (the question above) I found this answer Construction of a relative cup product $H^p(X, A) \otimes H^q(X, B) \to H^{p + q}(X, A \cup B)$ (sorry, if it's possible I would delete my question). You need for the proof that $$i_*:C^*(X,A\cup B;R)\hookrightarrow C^*(X,A+B;R)$$ is a cochain homotopy equivalence that the inclusion map $$\gamma _*:C^{A,B}_*(A\cup B;R)\to C_*(A\cup B;R)$$ is a chain homotopy equivalence. For this we had a theorem in lecture but to use this theorem we need the assumption that $A$ and $B$ are open in $X$. $C^{A,B}_*(A\cup B;R)$ denotes the set of all linear combinations of simplices $\sigma$ in $A\cup B$ with the property that $\operatorname{im}(\sigma)\subseteq A$ or $\operatorname{im}(\sigma)\subseteq B$, but $\operatorname{im}(\sigma)$ is not in both $A$ and $B$.