For and , define
Changing or by an integer changes by left multiplication by an element of , so is independent of the chosen lifts. It also respects the mapping-torus seam because
which is exactly the identification
Every -orbit has a representative with its first coordinate in , so is surjective. If two such representatives lie in one orbit, the integer shift of their first coordinates is zero unless they are opposite endpoints; in the first case their torus coordinates agree, and in the endpoint case they are related by the displayed seam. Thus is injective. It is continuous, is compact, and is Hausdorff, so a continuous-bijection theorem gives
This realizes the Heisenberg nilmanifold as a torus mapping torus.