\begin{lemma}[Constructed loop-one return with fixed endpoints]
Let $d_0$ have count at most 768, decimal retained cells, positive head,
and retained length equal to its count. Suppose $-324\le p_0\le0$,
$e_0\ge0$, and
\[
 X/2^{e_0}=V(d_0)+\eta_0,\quad
 Y/2^{e_0}=V(d_0)+u_0,\quad
 0\le\eta_0<u_0,\quad d_0.\mathit{truncated}\iff\eta_0>0.
\]
The actual specialized loop-one call with infinity sentinel $(0,2047)$
and no early result returns normally to $(d_1,e_1,\mathsf{none})$.
There is a natural numerical bound witness $b\le21$ with
$e_0-60b\le e_1\le e_0$.
The output has point zero, nonzero count at most 768, decimal retained
cells, head in $[5,9]$ and exact retained length. It has ordered errors
\[
 X/2^{e_1}=V(d_1)+\eta_1,\quad
 Y/2^{e_1}=V(d_1)+u_1,\quad
 0\le\eta_1<u_1,\quad d_1.\mathit{truncated}\iff\eta_1>0.
\]
The witness $b$ is not asserted to be an execution count. This generic
contract makes no claim that $Y/2^{e_1}\le1$.
\end{lemma}
\begin{proof}
Use the actual loop definition in
\noderef{num_imp_dec2flt_slow_parse_long_mantissa}.
Track a proof-local natural counter $j$, initially zero, incremented on
each actual continuation. At record $a$, point $p$, exponent $e$ and
head $z$, maintain None, the input decimal shape,
$-324\le p\le0$, $e_0-60j\le e\le e_0$,
and the two stated endpoints at exponent $e$ with ordered errors and sticky.
Maintain also the simultaneous budgets
\[
\begin{array}{ll}
p\le-19&18j-p\le324,\\
-18\le p\le-2&j\le17,\\
p=-1,\ z<7&j\le18,\\
p=-1,\ z\ge7&j\le19,\\
p=0,\ z\le2&j\le19,\\
p=0,\ 3\le z<5&j\le20,\\
p=0,\ z\ge5&j\le21 .
\end{array}                                                    \tag{1}
\]
Initially the point bound proves the first budget and all others follow
from $j=0$. The hypotheses give every other invariant.
The regimes in (1) exhaust all states. In the first regime
$18j\le324+p\le305$, hence $j\le16$; the others explicitly imply
$j\le21$. Thus $e\ge e_0-60j\ge-1260$.

Apply \noderef{P529_T1_LeftLoopStep} to the current endpoints
$X/2^e,Y/2^e$. Its done alternative yields point zero, head at least five,
and the unchanged normal done state. Its continuation constructs the
actual body, shift and checked subtraction, with $e'=e-k$, $k\le60$.
Consequently $e_0-60(j+1)\le e'\le e_0$.
The point and decimal shape invariants persist by that principal.
Its endpoint equations become the required equations at $e'$ by
$2^k(X/2^e)=X/2^{e-k}$ and the same power law for $Y$.
The exact None result persists and its point bound excludes the infinity arm.

Apply \noderef{P857_T1_LeftLoopBudgetTransition} to the current
counter, points, heads, point bounds, seven budgets, and the step
principal's correlated transition clauses, omitting its unneeded shift
selection equality. It gives all seven successor budgets at $j+1$
and the seven-way current source-regime disjunction. Retain this
disjunction for the rank argument below and reconstruct the successor
invariant with the local shape and endpoint facts.

For termination use the natural rank
\[
 R(p,z)=
 \begin{cases}
 4(-p),&p<0,\ z\ge7,\\
 4(-p)+1,&p<0,\ z<7,\\
 2,&p=0,\ z\le2,\\
 1,&p=0,\ 3\le z<5,\\
 0,&p=0,\ z\ge5 .
 \end{cases}
\]
Large-negative points grow by at least 18, strictly reducing the rank
even if the last flag increases. Points $-18$ through $-2$ reach $-1$
or zero, whose rank is at most five, below the old rank at least eight.
A point-minus-one stall changes rank five to four; a move to zero
has rank at most two, below either four or five.
At point zero the two progress clauses reduce rank two to at most one,
or one to zero. Thus every normal continuation has smaller rank.
Well-founded induction on this rank, rewriting the loop by its defining
done/continuation equation, constructs a normal final result. The
preservation rule \noderef{ResultLoopPartial} gives the maintained
invariant on that result; the rank argument proves existence, not merely
a conditional postcondition.

A done result has point zero and head at least five, so its last budget
gives $j\le21$. Choose $b=j$ in the existential conclusion. This proves
the numerical bound without adding an execution-count assertion.
The terminal invariant gives the exact loop equation, $e_1\le e_0$,
nonempty exact-length decimal shape, head below ten, and both fixed
endpoint and sticky equations. No terminal-trim hypothesis on $d_0$
and no enclosing-success hypothesis is needed.
\end{proof}
