Exact physical continuation push/pop recovering the finite return label and restoring all cells and heads
ProvedIntMul.FiniteContinuationStack.round_trip_correctLet q be one of n finite continuation labels. From a fresh stack suffix at an arbitrary boundary rho with an arbitrary saved older prefix, the fixed service table physically pushes q, dispatches to pop, recovers q into its finite resume state and erases the complete record in exactly
actual transitions. Its final state is resume(q), and every tape cell and every head position equals the complete initial frame. Push uses n+1 transitions, the physical push-to-pop dispatch uses one, and pop uses n+2. Older records are retained exactly, while root input, caller buffers and work banks are unchanged throughout. The same finite table works at arbitrary stack depths; n is a fixed control-size parameter. This supplies actual continuation storage and recovery for a later scheduler, rather than a host-language stack or a free return instruction.
import Definitions.Def_IntMul_FiniteContinuationStack import Mathlib.Tactic open IntMul IntMul.FiniteContinuationStack
theorem IntMul.FiniteContinuationStack.round_trip_correct (M : MultitapeTM) (n : ℕ) (base : (machine M n).Cfg) (rho : ℕ) (q : Fin n) :
(machine M n).step^[2 * n + 4] (pushStartFrame M n base rho q) = finalFrame M n base rho q ∧
((machine M n).step^[2 * n + 4] (pushStartFrame M n base rho q)).state = .resume q ∧
((machine M n).step^[2 * n + 4] (pushStartFrame M n base rho q)).cells =
(pushStartFrame M n base rho q).cells ∧
((machine M n).step^[2 * n + 4] (pushStartFrame M n base rho q)).head =
(pushStartFrame M n base rho q).head := by sorry