HNN extensions as fundamental groups I have heard that the Seifert–van Kampen theorem allows us to view HNN extensions as fundamental groups of suitably constructed spaces. I can understand the analogous statement for amalgamated free products, but have some difficulties understanding the case of HNN extensions. I would like to see how HNN extensions arise in some easy topological setting.
Let $X$ be my space, $Y \subseteq X$ and $f$ some selfhomeomorphism of $Y$. Then I consider $C=Y \times I$ and identify $C \times \{0\}$ with Y and $C\times \{1\}$ with $f(Y)$. I think that the fundamental group of the resulting space should have a presentation of the form
$$ \langle \pi_1(X),t | t g t^{-1} = f_*(g) \ \ \forall g\in \pi_1(Y)\rangle$$
(I omitted the relators which already appear in $\pi_1(X)$). This should follow from Seifert-van Kampen, but I can't see which are the open sets $U,V$ to which we are applying it (in the notations of the Wikipedia article). Probably the generator $t$ arises as the curve we obtain as we follow some basepoint $y\in Y$ going through $C$ and back, so maybe $U$ should be some sort of "tubular neighborhood$ of this curve; but I'm not sure how to formalize this (or even if this is true).
 A: The best reference for this (at least to me) is these lecture notes. Just go through the first 5 pages. There are many pictures also.
A: Since there are several base points involved, as mention by Lor, there is value in using groupoids for HNN extensions. An account of this is on p. 335 of Topology and Groupoids, as follows.  
Let $i_A:A \to G, i_B:B \to G$ be inclusions of two subgroups of $G$, and suppose given an isomorphism $\theta: A \to B$. Let $\mathbf I$ be the groupoid with two objects $0,1$ and exactly one arrow $\iota: 0 \to 1$, and let $\dot{\mathbf I}$  be the discrete subgroupoid of $\mathbf I$ on the elements $0,1$. Form the pushout of groupoids
$$ \begin{matrix} A \times \dot{\mathbf I} &\to^i & G \cr
\downarrow_j && \downarrow_\phi \cr
A \times {\mathbf I} & \to_\psi & H
\end{matrix} $$
where $i$ is the morphism $(a,0) \mapsto i_A a, (a,1)\mapsto i_B\theta a$, $j$ is the inclusion and $\phi, \psi$ are defined by the pushout. Let $t= \psi(e,\iota)$ where $e$ is the identity element of $A$.  Then one checks that this gives the usual presentation of an HNN extension. 
There is a general point here about modelling the topology.  For example, the trefoil group $T$ has the presentation $\mathcal P= \{x,y:x^2=y^3\}$. The topological model would seem to be the pushout of spaces determine by the two maps $f,g:S^1 \to S^1$ in which $f$ is $z \mapsto z^2$, and $g$ is $z \mapsto z^3$. However this pushout is not even Hausdorff! So we take the double mapping cylinder, or homotopy pushout,  $M(f,g)$ and its fundamental groupoid $$\mathbf T= \pi_1(M(f,g), \{0,1\})$$ on two points $0,1$ has generators $x$ at $0$, $y$ at $1$ and $\iota$ joining  $0$ to $1$ with one relation $x^2\iota=\iota y^3$. 
So if one wants homotopy pushouts in group theory it is convenient  to extend the area of discourse to groupoids. This analogy between homotopies of maps of spaces and homotopies of morphisms of groupoids was pointed out in the 1968, differently named,  edition  of "Topology and Groupoids". 
