\begin{lemma}[Whole actual and embedded frame equality]
For any one total package $C$ of \noderef{P9_T1_AbstractComponents}
satisfying \noderef{DispatchContracts} and
\noderef{P9_T1_NormalComponentRefinement}, and every source-valid complete
Rust string $s$ of byte length at most $A=3458764513820540928$, as defined
in \noderef{DecimalGoalVocabularyDefault},
\[
 \mathrm{P9\_T1\_DispatchFrame}(\mathrm{P9\_T1\_ActualDispatchOperations},s)
 =
 \mathrm{P9\_T1\_DispatchFrame}(\mathrm{P9\_T1\_EmbedComponents}(C),s).
\]
This is equality of the whole outer Result: failure and divergence as well
as normal return, its Rust parsing result and every trace field.
There is no actual-call or public-success premise, no additional correctness
assumption, and no numeric-only or shortened-body restriction. The same $C$
is used at every call.
\end{lemma}
\begin{proof}
Fix $C,s$ and the stated hypotheses of \noderef{DispatchContracts},
\noderef{P9_T1_NormalComponentRefinement} and
\noderef{DecimalGoalVocabularyDefault}. Write $O$ for the actual operation
record of \noderef{P9_T1_ActualDispatchOperations}. Every operation in
\noderef{P9_T1_EmbedComponents} is $\mathrm{ok}$ of the corresponding value
of $C$. Throughout the proof apply \noderef{P661_T1_PrefixRealization}
with this fixed $C$, its two laws and the original complete-string
source-validity and A-bound. We build its reached-call premises using
exactly the constructors of \noderef{P9_T1_ReachedDispatchCall}.
No invocation of that lemma uses a current-call success assumption.

We use the following elementary Result-bind rule at fixed primitive binds.
For any $R$ and continuations $k,k'$, to prove $R\mathbin{\gg=}k
=R\mathbin{\gg=}k'$ it suffices to prove $k(v)=k'(v)$ whenever
$R=\mathrm{ok}(v)$. Indeed, for failure both binds return the same failure,
for divergence both return divergence, and for $\mathrm{ok}(v)$ they are
the two continuations at $v$. Also, an established equation
$O.f(a)=\mathrm{ok}(C.f(a))$ can be substituted through any Result-valued
continuation, without a success premise for that continuation. These rules
preserve complete returned pairs, not merely their first projections.

Unfold the fixed finite frame of \noderef{P9_T1_DispatchFrame} on both
sides. \noderef{ModelStrAsBytes} supplies the identical slice $s$, and
\noderef{ModelSliceFirst} supplies its optional head. On an empty list the
two remaining expressions, including the empty-error primitive and
EmptyInput trace, are identical, so their whole Results agree.
Otherwise write $s.\mathit{val}=c::t$. The two frames use the same
$\nu=\operatorname{decide}(c=45)$ and the same conditional range-index
expression. In either sign case the range starts at one and
$1\leq|s|$ follows from this cons equation. The installed Aeneas
range-index definition therefore returns the slice whose list is
$s.\mathit{val}.\mathrm{drop}(1)=t$. If $c$ is neither 45 nor 43,
the body is $s$ itself. Thus the common body $b$ satisfies
\[
 b.\mathit{val}=
 \begin{cases}t&c=45\text{ or }c=43,\\s.\mathit{val}&\text{otherwise}.
 \end{cases}
\]
The installed slice-empty definition returns the Boolean of $b$'s length
being zero. If $b$ is empty, both continuations are the identical invalid
error primitive followed by SignOnly$(b,\nu)$; their whole Results agree.
If $b$ is nonempty, the cons equation, displayed body equation and this
nonemptiness construct the number reach derivation. The number clause of
\noderef{P661_T1_PrefixRealization} now gives
$O.\mathrm{parseNumber}(b)=\mathrm{ok}(C.\mathrm{parseNumber}(b))$.
Substitute this equation in the actual frame and split the common option.

If it is None, the just established actual None equation and the number
reach derivation construct special reach. The special clause of
\noderef{P661_T1_PrefixRealization} gives the normal special equation with
the same body and separate $\nu$. Substitution aligns both special options.
On special None both expressions use the same invalid-error primitive,
Rust Err and Invalid trace with both helper options None. On special Some
$v$, both return Rust Ok of $v$ and the same Special trace containing
$b,\nu$, numeric None, special Some and $v$. These are direct returns:
neither side selects a pair, assembles it or negates $v$ again.

If the numeric option is Some $d$, its established actual Some equation
constructs native reach. The native clause of
\noderef{P661_T1_PrefixRealization} gives actual normal agreement with
$C.\mathrm{native}(\{d\text{ with negative}:=\nu\})$. This is precisely
the signed record in both frames, with every other field unchanged.
On native Some $v$, both return Rust Ok of $v$ and the same FastPath trace,
including the numeric Some, signed native input and native Some.
Again the return is direct and performs no final negation.
On native None, its actual equation constructs first-integer reach.
The first clause supplies the actual equation to
$f_1=C.\mathrm{integer}(d.e,d.w)$, at the original exponent and mantissa.
Substitution aligns the first result and the initial five-field tuple.

If $d.\mathit{many\_digits}$ is false, the tuple has false many flags and
false second guard, and the six-field second-stage tuple is
$(f_1,\mathrm{None},\mathrm{None},\mathrm{None},\mathrm{None},\mathrm{false})$
on both sides. The first equation and the false guard construct post-direct
reach to $f_1$. If many_digits is true but $f_1.p_{\rm biased}<0$, the
many flags are true, the second guard is still false, and the same six-field
tuple and post-direct reach result. The scalar comparisons here coincide
with the comparisons of the I32 values, so these cases are exactly the
negation of the increment constructor's conjunction.

In the remaining case many_digits is true and $f_1.p_{\rm biased}\geq0$.
Use this exact guard and the established first equation to construct
increment reach. The increment clause of
\noderef{P661_T1_PrefixRealization} supplies $d.w<10^{19}$ and an actual
checked normal successor $n$ with
$d.w+1=\mathrm{ok}(n)$ and $n.\mathit{val}=d.w.\mathit{val}+1$.
Substitute this SAME checked-addition equation on both sides; no modular
successor or overflow-to-deferral branch is substituted. Only now construct
second reach. Its prefix clause gives
$O.\mathrm{integer}(d.e,n)=\mathrm{ok}(C.\mathrm{integer}(d.e,n))$.
Put $f_2=C.\mathrm{integer}(d.e,n)$ and substitute this equation before
constructing compare reach. The compare clause gives the normal Boolean
\[
 \epsilon=\operatorname{decide}(f_1.m=f_2.m\ \land\
                                  f_1.p_{\rm biased}=f_2.p_{\rm biased}).
\]
Thus both complete fields are compared, not just the exponent or the
assembled rounding value. Substitute that comparison equation.
The pair/forced-flag tuple is $(f_1,\mathrm{false})$ when $\epsilon$ is
true and $(\{f_1\text{ with }p_{\rm biased}:=-1\},\mathrm{true})$ otherwise.
Inverting its normal tuple equation identifies the post pair with exactly
this conditional. The compare reach and comparison equation construct
post-compared reach. Both six-field tuples now contain this same post pair,
Some $d.e$, Some $n$, Some $f_2$, Some $\epsilon$, and the same forced flag.
In particular forced deferral changes only the first pair's exponent to -1.

For either post constructor let $p$ be its reached post pair. If
$p.p_{\rm biased}<0$, construct slow reach from this guard, then use the
slow clause of \noderef{P661_T1_PrefixRealization} to obtain
$O.\mathrm{slow}(b)=\mathrm{ok}(C.\mathrm{slow}(b))$ on the UNCHANGED body.
It supplies this current-call equation, rather than a conclusion conditional
on slow success. Substitution makes both selection tuples
$(C.\mathrm{slow}(b),\mathrm{true},\mathrm{Some}(C.\mathrm{slow}(b)))$.
Only after this equation construct assemble-slow reach to that selected
pair. If the post exponent is nonnegative, both selection tuples are
$(p,\mathrm{false},\mathrm{None})$ and the same guard constructs
assemble-direct reach. These two cases also prove selection transport for
arbitrary continuations that agree at each such reached assembly input.

Let $a$ be either common selected pair. The raw I32-to-U64 cast, the fixed
SIG_BITS computation, the checked shift and the raw OR lift appearing
before assembly in \noderef{P9_T1_DispatchFrame} have identical expressions
and inputs. Apply the Result-bind rule successively to these four binds.
A failure or divergence at any one is preserved automatically; in a normal
continuation their common values give the identical assembled_word field.
Equality does not require a new no-failure premise or a new range estimate
for these fixed primitives.

At the reached assembly call, \noderef{P661_T1_PrefixRealization} gives
$O.\mathrm{assemble}(a)=\mathrm{ok}(C.\mathrm{assemble}(a))$.
Write $m=C.\mathrm{assemble}(a)$ and substitute. If $c\ne45$, both frames
return this word with false negative and lexical_sign_applied flags.
If $c=45$, the assembly reach has sign true, and the actual assembly
equation just proved constructs negate reach at $m$. The negate clause of
the same prefix lemma gives $m.\mathit{val}<2^{63}$ and
$O.\mathrm{negate}(m)=\mathrm{ok}(C.\mathrm{negate}(m))$.
Substitution aligns the final word and the true lexical-sign flags.

In either assembled case, the complete Assembled record fields agree:
body, negative flag, numeric option with its retained many flag, signed
native input and native None, first operands and result, second guard and
all optional operands/results, both-field comparison, forced-deferral
flag, post pair, slow guard and optional replacement, selected pair,
assembled_word, pre-sign assembly word, lexical_sign_applied and final word.
All earlier tuple projections are the same on both sides, so record
construction gives literal equality of the traces and their Rust results.
The fixed primitive-bind rule also preserves every outer non-normal outcome.
The exhaustive finite branch analysis therefore proves the displayed
whole-Result equality without presupposing its normality.
\end{proof}
