Documentation

CslibFrontier.DataStructure.StateTransition.Composition

Composing verified interface implementations #

Modules compose by substituting method bodies and composing representation relations. The intermediate state remains hidden, so callers need not depend on either representation. This construction shares the same semantics across all backend and resource interpretations.

Main definitions #

Main results #

References #

theorem Cslib.DataStructure.Module.simulates_demonic {D E : StateTransitionSpec} {α : Type w} (M : Module D E) (p : D.Client α) {s : D.State} {e : E.State} (hr : M.rep s e) (hv : D.DemonicValid s p) :
E.DemonicValid e (link M.methods p) ∧ ∀ (a : α) (e' : E.State) (tr_E : E.Transcript), E.ClientRun e (link M.methods p) a e' tr_E → ∃ (s' : D.State) (tr_D : D.Transcript), D.ClientRun s p a s' tr_D ∧ M.rep s' e'

Per-operation relational simulations lift to any demonically admissible adaptive client.

theorem Cslib.DataStructure.Module.simulates_client {D E : StateTransitionSpec} {α : Type w} {fD : D.State → (o : D.Op) → D.State × D.Result o} {fE : E.State → (o : E.Op) → E.State × E.Result o} [D.HasStepFn fD] [E.HasStepFn fE] (M : Module D E) (p : D.Client α) {s : D.State} {e : E.State} (hr : M.rep s e) (hv : D.ValidHistory s (D.clientHistory s p)) :

Per-operation semantic simulations lift to the whole answer-dependent client on deterministic specifications.

Identity methods expose precisely one call and preserve the state representation.

Instances For

    Compose implementation proofs while hiding the intermediate representation.

    Instances For