Definition state S X := dist (X * S).Definition State S X := S -> state S X.Definition ret {S X} := @StateT_ret S dist _ X.Definition bind {S X} := @StateT_bind S dist _ X.Definition get : forall {S}, State S S := fun S => get.Definition put : forall {S}, S -> State S unit := fun S => put.Global Instance PoramConfig : Config := {LOP := C.LOP}.Definition K := block_id.Definition V := nat.Definition S : Type := state.Module M := Dist_State.Definition bind {X Y} := @M.bind S X Y.Definition ret {X} := @M.ret S X.Definition get := @M.get S.Definition put := @M.put S.Definition well_formed s := 
    well_formed s.Definition read : K -> M.State S V := read.Definition write : K -> V -> M.State S unit := write.Definition equiv : forall {X}, M.State S X -> M.State S X -> Prop :=
    fun X => poram_equiv eq.

Theorem write_read : forall (k : K) (v : V), equiv (bind (write k v) (fun _ => ret v)) (bind (write k v) (fun _ => read k)).