Linking methods with identical complete runs #
Changing a method's source syntax preserves a linked adaptive client when every method keeps its complete deterministic run: result, final state and lower-operation history. Equality of answers alone would not preserve the reached memories or the subsequent client behavior.
Main results #
StateTransitionSpec.runClient_link_congr: equality of complete method runs lifts to every adaptive client, retaining the entire lower-operation history and final state.
This is a semantic transport result. It assigns no native cost to calling or argument staging;
equal histories can be used with the existing totalCost function at any chosen charge.
theorem Cslib.DataStructure.StateTransitionSpec.runClient_link_congr {D E : StateTransitionSpec} {f : E.State → (o : E.Op) → E.State × E.Result o} [E.HasStepFn f] {α : Type w} (methods methods' : Methods D E) (hmethods : ∀ (s : E.State) (o : D.Op), E.runClient s (methods o) = E.runClient s (methods' o)) (p : D.Client α) (s : E.State) :
Methods with identical complete deterministic runs can replace one another under linking. The equality retains the lower history, including operations of every reached continuation.