\begin{lemma}
Let $q$ and $w$ be signed and unsigned 64-bit integers with
$w>0$ and $-342\le q\le308$.  If the extracted binary64
\texttt{compute\_float} call returns a biased pair $fp$ with nonnegative
biased exponent, then some binary64 carrier word is the unrestricted assembly
of $fp$ and is the nonnegative nearest-even rounding of the exact real number
$w10^q$.
\end{lemma}
\begin{proof}
Put $B=2^{64}$ and $U=2^{52}$.  The exact constants and every successful
constant computation are those of \noderef{ParserExponentConstants}: the
significand width is $52$, the minimum binary exponent is $-1022$, and the
infinite biased exponent is $2047$.

Let $l$ be the leading-zero count of $w$.  Because $w>0$, $0\le l\le63$ and
unfolding \noderef{num_imp_dec2flt_lemire_compute_float} shows that the
extracted left shift succeeds with
\[
                   W=w2^l,\qquad2^{63}\le W<B.            \tag{1}
\]
No set high bit is discarded; this is the bounded-shift behavior in
\noderef{ModelU64Shl}.  The cast of $52$ to 64-bit \texttt{usize} and the
checked addition by three give precision $55$.

Apply \noderef{IntegerPowerTableCertificate} at $q$.  With its notation,
the extracted exponent routine returns $q+e_q+63$, and its table value has
the exact directed error stated there.  The product call reached on the
assumed successful execution returns some $(lo,hi)$.  If $lo=B-1$ outside
$[-27,55]$, the extracted definition immediately returns $(0,-1)$; that
contradicts the hypothesis that the returned exponent is nonnegative.
Therefore the continuing-sentinel premise of
\noderef{IntegerProductApproximation} holds.  Apply that lemma to (1).  Put
\[
 R=WT_q/B,quad u=hi\mathbin{\mathtt{>>>}}63\in\{0,1\},
 \quad s=73+u,quad G=hi\mathbin{\mathtt{>>>}}(9+u).        \tag{2}
\]
It gives
\[
 G2^s\le R<(G+1)2^s                                      \tag{3}
\]
and proves that the extracted low-limb and reconstruction predicates are
equivalent to the exact lower-even midpoint condition.  Thus the refinement
correction, including both directed table-error cases, has already been
accounted for; no source comment is being used as an arithmetic premise.

The exact input is related to (2) by
\[
                    w10^q=R,2^{q+e_q-l-63}.              \tag{4}
\]
The extracted exponent calculations also have their literal mathematical
values.  The cast of $q$ to signed 32 bits succeeds; $l$ casts exactly; and
$u+64-52-3=9+u$.  In execution order their values and bounds are
\[
\begin{array}{c|c}
i14=q+e_q+63&[-1074,1086]\\
i15=i14+u&[-1074,1087]\\
i17=i15-l&[-1137,1087]\\
i19=i17-(-1022)&[-115,2109]\\
p=i19+1=q+e_q+u-l+1086&[-114,2110].
\end{array}                                               \tag{5}
\]
For the first row, use
$-74455452\le217706q\le67053448$, arithmetic right shift by $16$, and the
final addition of $63$.  The remaining rows use $u\in\{0,1\}$ and
$0\le l\le63$.  Every interval lies inside signed 32-bit range at the
corresponding addition or subtraction, so every checked operation in (5)
succeeds.  The shifts by $63$, $9$, and $10$ are all legal.  Hence $p$ is
exactly the extracted value called \texttt{power2}.

First suppose $p\le0$ and put $d=1-p$.  By (5), $1\le d\le115$; negation of
$p$ and both checked additions by one succeed.  If $d\ge64$, (3)--(5) imply
\[
                       0<w10^q<2^{-1075}.                 \tag{6}
\]
Equality is impossible because this branch has an uncancelled factor five in
the denominator, whereas $2^{-1075}$ is dyadic.  The extracted zero return is
therefore strictly nearer than the least subnormal.

If $d<64$, both right shifts are legal and the code computes
\[
 J=G\mathbin{\mathtt{>>>}}d,qquad
 M=(J+(J\mathbin{\mathtt{\&}}1))\mathbin{\mathtt{>>>}}1. \tag{7}
\]
The conjunction extracts the low bit by \noderef{ModelU64BitAnd}; the
addition cannot overflow because $J<2^{54}$.  Equations (4)--(5) show that
one unit of $J$ is half a subnormal ulp, so (7) selects the nearest subnormal
multiple.  A tie is impossible here: if $q\ge-27$, then the exponent formula
forces $p>0$, while if $q<-27$, the denominator has more factors five than a
64-bit $w$ can cancel ($5^{28}>B$).  The rounded $M$ is at most $U$.  The
Boolean cast returns exponent zero for $M<U$ and exponent one for $M=U$.
In the latter case the mantissa and exponent both contain bit $52$, so their
OR remains $U$ by \noderef{ModelU64BitOr}; this is exactly the carry from the
largest subnormal to the smallest normal.

Now suppose $p>0$.  By (3)--(5), $G$ comprises the retained 53-bit
significand and one guard bit, at normal spacing
$\Delta=2^{p-1075}$.  Write $R/2^s=G+\theta$ with $0\le\theta<1$.  If $G$ is
even, shifting selects the strictly nearer lower value.  If $G$ is odd and
$\theta>0$, adding one and shifting selects the strictly nearer upper value.
Only $G$ odd and $\theta=0$ is a tie.  The exact equivalence supplied by
\noderef{IntegerProductApproximation} says that the extracted nested tests
$-4\le q\le23$, $G\bmod4=1$, $lo\le1$, and reconstruction of $hi$ hold
exactly for a lower-even tie.  Clearing the guard bit then selects that even
lower candidate.  At a $G\bmod4=3$ tie, the ordinary increment selects the
even upper candidate.  Thus in every case
\[
 S=(G'+(G'\mathbin{\mathtt{\&}}1))
       \mathbin{\mathtt{>>>}}1                            \tag{8}
\]
is nearest with even low bit on equality.  The addend is at most one and
$G'<2^{54}$, so the checked addition succeeds.

If $S<2U$, the pair retains $S$ and exponent $p$.  Otherwise the bounds force
$S=2U$; the legal shifts by $52$ construct $U$ and $2U$, and the checked
increment to $p+1$ represents the identical value in the next binade.  The
final mask clears exactly the hidden bit.  If the resulting exponent is below
$2047$, unrestricted assembly is therefore the usual finite word
\[
              p_fU+(S_f-U),\qquad U\le S_f<2U.            \tag{9}
\]
There is no overlap between its exponent and fraction fields, so the bitwise
OR in \noderef{DecimalGoalVocabularyDefault} equals this sum.

If the final exponent is at least $2047$, the extracted branch returns
infinity.  The largest finite value is $2^{1024}-2^{971}$ and the next grid
endpoint is $2^{1024}$, so their midpoint is
$H=2^{1024}-2^{970}$.  Below $H$, (8) chooses the maximum finite word; at
$H$, the finite word is odd and the infinity word $2047U$ is even; above
$H$, infinity is the stipulated target.  This is exactly the overflow clause
of \noderef{DecimalGoalVocabularyDefault}.

Choose the \noderef{F64} word given by unrestricted assembly of $fp$.  In
the cases above it is respectively zero, a subnormal (possibly carried to the
first normal), the finite word (9), or positive infinity.  The finite values
in \noderef{DecimalGoalVocabularyDefault} form a strictly increasing adjacent
grid.  The local nearest and parity arguments therefore imply its quantified
comparison with every other finite word.  Equations (6)--(9) also establish
the overflow condition.  Hence the chosen word satisfies both
\texttt{assembledWord} and \texttt{roundsMagnitude} for the exact value
$w10^q$, as required.
\end{proof}
