Solution (source code)

= Solution

Throughout the hyperbolic discussion take curvature $-1$ and $g\geq2$. A <Y-piece> is a <pair of pants (mathematics)> with a <hyperbolic metric> and three <geodesic> boundary components. Three labelled positive boundary lengths $\ell_1,\ell_2,\ell_3$ determine it up to <isometry>. To see existence and uniqueness, cut along the three shortest perpendicular seams. The two resulting <right-angled hyperbolic hexagons> have alternating side lengths $\ell_i/2$, which determine each hexagon. Conversely, any three positive alternating lengths produce such a hexagon, and doubling along the other sides produces the desired <Y-piece>. In particular the seam opposite $\ell_i$ satisfies
$$
\cosh s_i=\frac{\cosh(\ell_i/2)+\cosh(\ell_j/2)\cosh(\ell_k/2)}{\sinh(\ell_j/2)\sinh(\ell_k/2)}.
$$

An <X-piece> is a four-holed hyperbolic sphere with <geodesic> boundaries, obtained by joining two <Y-pieces> along one pair of equal-length boundaries. For a chosen separating curve, it is determined by
$$
\boxed{\ell_1,\ell_2,\ell_3,\ell_4>0,\quad s>0,\quad\tau},
$$
where $s$ is the common gluing length and $\tau$ is the relative arclength twist, measured between chosen seam endpoints. The identification reverses <boundary orientation> so that the surface is oriented. For an unmarked gluing, $\tau$ is periodic modulo $s$; a marking retains $\tau\in\mathbb R$, because a full <Dehn twist> changes the marking. These six parameters describe the <X-piece> with its chosen separating curve; different curve choices or boundary symmetries can describe the same unmarked surface.

Choose a <pants decomposition> of a closed oriented <genus>-$g$ surface. Each <Y-piece> has <Euler characteristic> $-1$, and gluing boundary circles does not change the total <Euler characteristic>. Thus there are $2g-2$ pieces. Their $3(2g-2)$ boundary circles are paired, giving $3g-3$ gluing curves. Choose their disjoint <geodesic> representatives, then prescribe each cuff length and its relative twist. The <Fenchel–Nielsen coordinates> are
$$
\boxed{(\ell_i,\tau_i)_{i=1}^{3g-3}\in(0,\infty)^{3g-3}\times\mathbb R^{3g-3}}.
$$
They determine the marked <hyperbolic surface> and hence its unmarked <isometry> class, with $6g-6$ real parameters. One must also fix the combinatorial gluing pattern of the chosen <pants decomposition>. Full twists and other changes of marking identify some parameter sets in unmarked <moduli space of Riemann surfaces>. The <genus> restriction matters: a sphere and a torus do not admit a closed curvature-$-1$ metric or such a decomposition into <geodesic> <Y-pieces>.

For a fixed oriented topological surface $S_g$, <Teichmüller space> $\mathcal T_g$ consists of marked <Riemann surfaces> $(X,f:S_g\to X)$. Two markings represent the same point when a <conformal isomorphism> between the surfaces carries one marking to the other up to <homotopy>. By the <uniformization theorem>, for $g\geq2$ these are equivalently marked curvature-$-1$ metrics. The displayed <Fenchel–Nielsen coordinates> identify $\mathcal T_g$ with a cell of real dimension $6g-6$; the <mapping class group> quotient gives the unmarked <moduli space of Riemann surfaces>.

The spectral version of the <Wolpert generic spectral rigidity theorem> says that \b[outside a closed proper real-analytic exceptional subset of $\mathcal T_g$, the Laplace spectrum determines the <hyperbolic surface> up to <isometry>]. The exceptional subset has positive codimension and is invariant under changes of marking. <Orientation> reversal must be allowed, since the <Laplacian> cannot detect <orientation>. Equivalently, a generic surface is determined by its unmarked <length spectrum>, counted with multiplicities. This is a generic uniqueness statement, not a claim that every isospectral pair is isometric; the construction in Question 4 lies in the exceptional locus.

Three major ingredients and their roles are as follows.

* The <Selberg trace formula> converts the <Laplacian> spectrum into the lengths and multiplicities of closed <geodesics>, and conversely. It moves the problem from <eigenvalues> to geometric length data, where pants and twists can be used.
* <Finite length coordinates for hyperbolic surfaces> and real-analytic length functions reduce candidate spectral matchings to finitely many local analytic systems. The cuff lengths fix the <Y-pieces>; two transverse curves at each cuff fix its twist, giving $9g-9$ labelled length functions. Hyperbolic holonomy gives $2\cosh(\ell_\gamma/2)=|\operatorname{tr}\rho(\gamma)|$, so these lengths obey analytic <trace> relations. Discreteness of bounded length data, compactness in the thick part, and finite determination of those <trace> relations control the locally possible unlabelled matchings. A matching that is not an identity therefore lies in a proper analytic zero set.
* Geometric decoding of the persistent identities uses the <collar lemma> and variations of <Fenchel–Nielsen coordinates>. Pinching a cuff makes crossing curves long while disjoint ones remain bounded; twisting controls the transverse length relations. These behaviours recover the pants incidence and the twist data, and show that a matching persisting on an open parameter set comes from a change of marking, possibly with <orientation> reversal. Thus any genuinely nonisometric matching is confined to the lower-dimensional exceptional analytic locus.

For completeness, a related finiteness statement sometimes grouped with this theorem is that a fixed closed <hyperbolic surface> has only finitely many isospectral <isometry> classes. Its short proof uses three particularly concrete tools: a common discrete <length spectrum>; <Mumford's compactness theorem>, applied to the common positive systole; and finitely many determining marked lengths. Compactness would give an accumulation point if an isospectral family were infinite. Nearby markings make each determining length converge, while discreteness of the fixed spectrum makes it eventually constant. The determining lengths then force eventual equality of the marked surfaces, a contradiction. This <finiteness of isospectral hyperbolic surfaces> statement does not replace the stronger generic uniqueness assertion above.