I’m trying to calculate $\pi_1(\mathbb{R}P^2)$ using Van Kampen’s theorem. After choosing the two open sets (which I call $U$ and $V$) according to my lecture notes, I get $$\pi_1(\mathbb{R}P^2)=\pi_1(S^1)*_{\pi_1(S^1)}\pi_1(D^2)=\mathbb{Z}*_{\mathbb{Z}}\{e\}$$
I know this has to give $\mathbb{Z}_2$ as a result, but I’m not sure how to apply the definition of the amalgamated product in order to find this (the definition is still a bit obscure for me, as I just learnt about it). I think I should take a generator of $\mathbb{Z}$ and look at its images by the induced homomorphisms $(i_1)_*$ and $(i_2)_*$, where $i_1:U \cap V \rightarrow U$ and $i_2:U \cap V \rightarrow V$ are the inclusions, and find something like the condition $\langle b \mid b^2=1 \rangle$, but I don’t see exactly how to do that.
Could someone please guide me through the steps?
You might find this formulation of the almagamated product (pushout) in terms of group presentations useful. The fundamental group $\pi_1(U \cup V)$ is constructed as the quotient of the free product of $\pi_1(U) * \pi_1(V)$ by the smallest normal subgroup that identifies the images of the generators of $\pi_1(U \cap V)$ in the groups $\pi_1(U)$ and $\pi_1(V)$.
In your example, the free product is $$ \pi_1(U) * \pi_1(V) = \langle\, b \mid - \,\rangle * \langle\, - \mid - \,\rangle = \langle\, b \mid - \,\rangle \cong \mathbb{Z}, $$ where we use the symbol $-$ to indicate an empty set of generators or relations. Now suppose that $a$ freely generates the fundamental group of the intersection, i.e. $\pi_1(U \cap V) = \langle\, a \mid - \,\rangle \cong \mathbb{Z}$. The induced maps are $(i_1)_*(a) = b^2 \in \pi_1(U)$ and $(i_2)_*(a) = 1 \in \pi_1(V)$. Hence, in the amalgamated product, we have the relation $b^2 = 1$, so $$ \pi_1(X) = \pi_1(U \cup V) = \langle\, b \mid b^2 \,\rangle \cong \mathbb{Z}_2. $$