Section DryHybridMachine.
(** Assume some threadwise semantics *)
Context {Sem: Semantics}
{tpool : @ThreadPool.ThreadPool dryResources Sem}.
Notation C:= (@semC Sem).
Notation G:= (@semG Sem).
Notation semSem:= (@semSem Sem).
Notation thread_pool := (@t dryResources Sem).
(** Memories*)
Definition richMem: Type:= mem.
Definition dryMem: richMem -> mem:= fun x => x.
(** The state respects the memory*)
Record mem_compatible (tp: thread_pool) m : Prop :=
{ compat_th :> forall {tid} (cnt: containsThread tp tid),
permMapLt (getThreadR cnt).1 (getMaxPerm m) /\
permMapLt (getThreadR cnt).2 (getMaxPerm m);
compat_lp : forall l pmaps, lockRes tp l = Some pmaps ->
permMapLt pmaps.1 (getMaxPerm m) /\
permMapLt pmaps.2 (getMaxPerm m);
lockRes_blocks: forall l rmap, lockRes tp l = Some rmap ->
Mem.valid_block m l.1}.

Lemma  mem_compat_restrPermMap:
forall m perms st
(permMapLt: permMapLt perms (getMaxPerm m)),
(mem_compatible st m) ->
(mem_compatible st (restrPermMap permMapLt)).