Solution (source code)

= Solution

A <simple Riemannian manifold> has strictly convex boundary, no <conjugate points>, and a unique connecting <geodesic> depending smoothly on its endpoints. In particular its unit-speed geodesics are nontrapping. Write $\nu$ for the inward unit normal, and identify inward and outward parts of its boundary <unit tangent bundle> by
$$
\partial_+SM=\{(x,v):x\in\partial M,\ |v|_g=1,\ \langle v,\nu\rangle\ge0\},
\qquad
\partial_-SM=\{(x,v):\langle v,\nu\rangle\le0\}.
$$
The signs are a convention; here $+$ means inward. If $(x,v)$ is strictly inward, let $\tau(x,v)>0$ be its first exit time. The <geodesic scattering relation> is
$$
\boxed{\alpha(x,v)=\phi_{\tau(x,v)}(x,v)
=\bigl(\gamma_{x,v}(\tau),\dot\gamma_{x,v}(\tau)\bigr)\in\partial_-SM.}
$$
Thus it records both the exit point and the outward unit velocity, not just the exit point. On strictly outward vectors extend $\alpha$ by following the same <geodesic flow> backwards to its previous entry point, retaining the velocity orientation. On tangential vectors set $\alpha(x,v)=(x,v)$. The extended <scattering relation> is an involution on the full boundary unit bundle, since its forward and backward constructions undo one another. On a <simple Riemannian manifold>, the travel time equals the <boundary distance function> between the two endpoints; travel time is often recorded separately as lens data.