Solution (source code)

= Solution

Choose a <connected> proper <incompressible surface> $S$ with nonempty <boundary> as the first cut in a <three-manifold hierarchy> of $N$. Homotope $f$ relative to $\partial M$ into transverse position and let $F=f^{-1}(S)$.

We first make $F$ incompressible. If $D$ is a compression <disk> for $F$, its <boundary> maps to a loop in $S$ which is <null-homotopic> in $N$. Since $S$ is fundamental-group-injective, this loop is <null-homotopic> in $S$. Fill it in $S$ and alter $f$ in a small neighbourhood of $D$ so that its inverse image is obtained by compressing $F$ along $D$. The alteration is a <homotopy>: the filling and the old <disk> give a <sphere> map in $N$, which is <null-homotopic> by the asphericity proved above. A product collar of $S$ specifies the two sides of the modification. The integer $\sum_j\max(0,1-\chi(F_j))$ decreases at every essential compression; sphere components can be removed separately. A resulting <sphere> component of $F$ bounds a <three-ball> in $M$ by <three-manifold irreducibility>; move the map of that <three-ball> to one side of $S$ to remove it. The required extension and <homotopy> exist because the higher <homotopy groups> of $N$ vanish. Continuing leaves an incompressible $F$ with no spherical components.

For each component $F_j$, the map on <fundamental groups> to $S$ is <injective>. Indeed, its composition with the <injection> $\pi_1(S)\to\pi_1(N)$ equals the composition of $\pi_1(F_j)\to\pi_1(M)$ with the <isomorphism> $f_*$. Both maps in the latter composition are <injective>. A closed nonspherical <orientable> $F_j$ cannot occur: its <fundamental group> would inject into $\pi_1(S)$, a <free group>, whereas every subgroup of a <free group> is free and a closed positive-genus <surface> group is not free. Thus every component of $F$ has <boundary>.

Apply the permitted surface-map <homotopy> result to $F_j\to S$, fixing its <boundary>. A fundamental-group-injective map of <compact> <surfaces> is <homotopic> either to a covering or, in the <annulus> case here, to a map into one target <boundary> circle. The exceptional <annulus> case is impossible: its two distinct <boundary> circles would map onto the same circle of $\partial S$, contradicting the <injectivity> of the original <boundary> map. If $S$ is a <disk>, <injectivity> makes each $F_j$ a <disk>, and the unique <boundary> circle directly gives a single <disk> <homeomorphism>. Otherwise each component is <homotopic> to a cover of $S$.

Every point of $\partial S$ has exactly one preimage on $\partial F$, since $f|_{\partial M}$ is a <homeomorphism>. Every cover component contributes its positive degree to the number of preimages on every target <boundary> circle. Thus there is exactly one component and its covering degree is one. We have proved that \b[$F\to S$ can be homotoped to a <homeomorphism>, relative to its <boundary>].

Extend this <surface> <homotopy> to $M$, and use the two-sided collars to make $f$ a product <homeomorphism> on a neighbourhood of $F$. The transverse normal direction is a degree-one local crossing, so the collars on its two sides match the two sides of $S$; any superfluous folds can be removed in the normal interval. We may now cut $M$ along $F$ and $N$ along $S$, obtaining a map whose restriction to the entire cut <boundary> is a <homeomorphism>. The other hypotheses also survive: the cut manifolds are irreducible, have nonempty <boundary>, and the inclusion of every cut component into its uncut manifold is fundamental-group-injective by the normal form of the <van Kampen theorem>. A loop killed by the cut map is consequently killed by $f_*$ and hence is trivial in its source cut component.