Section HybDryMachineLemmas.
(* Lemmas that don't need semantics/threadpool*)
(** Assume some threadwise semantics *)
Context {Sem: Semantics}
{tpool : @ThreadPool.ThreadPool dryResources Sem}.
intros.
destruct (compat_th _ _ H cnt);
eauto using canonical_lt.
Qed.
(** most of these lemmas are in DryMachinLemmas*)
(** *Invariant Lemmas*)
(** ** Updating the machine state**)
(* Many invaraint lemmas were removed from here. *)
Notation thread_perms st i cnt:= (fst (@getThreadR _ _ _ st i cnt)).
Notation lock_perms st i cnt:= (snd (@getThreadR  _ _ _ st i cnt)).
Record thread_compat st i
(cnt:containsThread st i) m:=
{ th_comp: permMapLt (thread_perms _ _ cnt) (getMaxPerm m);
lock_comp: permMapLt (lock_perms _ _ cnt) (getMaxPerm m)}.
Instance thread_compat_proper st i:
Proper (Logic.eq ==> Max_equiv ==> iff) (@thread_compat st i).

Lemma mem_compatible_thread_compat:
forall (st1 : ThreadPool.t) (m1 : mem) (tid : nat)
(cnt1 : containsThread st1 tid),
mem_compatible st1 m1 -> thread_compat _ _ cnt1 m1.