The given homeomorphisms and homotopy invariance of homology give
because , while is path connected and is the disjoint union of two copies of . Hence
The degree-one and degree-zero part of the Mayer–Vietoris sequence is therefore
Taking the rank of an abelian group throughout this short exact sequence gives
so . Since the zeroth homology group is freely generated by the path components,