Solution (source code)

= Solution

A <Heegaard splitting> of a closed oriented <three-manifold> is a decomposition $Y=H_0\cup_\Sigma H_1$ into two <handlebodies>, with their common boundary the <Heegaard surface> $\Sigma$. With boundary present, the corresponding pieces are <compression bodies>, whose negative boundaries account for $\partial Y$.

For the given <triangulation>, take the <barycentric subdivision>. A regular neighbourhood $H_0$ of the original one-skeleton is a <handlebody>: thicken vertices to balls and edges to <one-handles>, then contract a spanning tree. The complementary region is a regular neighbourhood $H_1$ of the dual one-skeleton, whose vertices are tetrahedron centres and whose edges cross triangular faces. It too is a <handlebody>. Both graphs are connected, and their common boundary supplies the <Heegaard splitting>. If the original <triangulation> has $v$ vertices and $e$ edges, its <Heegaard surface> has <genus> $e-v+1$; the dual count gives the same number by $v-e+f-t=0$.

Choose an oriented <meridian of a knot> $\mu$ and the <Seifert longitude> $\lambda$ supplied by a <Seifert surface> for the null-homologous <knot>. For relatively prime integers $p,q$, <rational Dehn surgery> removes the interior of a <tubular neighborhood> and attaches a <solid torus> with its <meridian of a solid torus> on the unoriented slope $p\mu+q\lambda$. The choices $(p,q)$ and $(-p,-q)$ describe the same slope; $q=0$ is the original meridional filling. The boundary gluing reverses boundary orientation so that the oriented <three-manifold> extends across the filling.

For integral coefficients $n_i$, attach <two-handles> to $B^4$ along the components of the <framed link>, with their indicated <Seifert framing> shifts. The boundary operation removes $S^1\times D^2$ and inserts $D^2\times S^1$, with meridian $n_i\mu_i+\lambda_i$. Thus the compact oriented <surgery trace> satisfies
$$
\boxed{\partial W(L)=Y.}
$$
For a finite rational coefficient, use a negative <continued fraction>
$$
\frac pq=a_0-\frac1{a_1-\dfrac1{\cdots-1/a_k}}.
$$
Replace that component by an integrally framed chain of successive meridians with coefficients $a_0,\ldots,a_k$. Repeated <slam-dunk moves> give back $p/q$. Perform this replacement for every rationally framed component, leaving meridional fillings out. The resulting integral <framed link> has the same filled boundary, so its <surgery trace> proves that \b[every such rational filling bounds a compact oriented four-manifold].