(** * Lemmas about the Dry Machine*)
From mathcomp.ssreflect Require Import ssreflect ssrbool ssrnat seq ssrfun eqtype fintype finfun.
Set Implicit Arguments.
(*NOTE: because of redefinition of [val], these imports must appear after Ssreflect eqtype.*)
(* Require Import compcert.common.Events. *)
Global Notation "a # b" := (Maps.PMap.get b a) (at level 1).
(** This file holds various results about the dry machine*)
(* Find other lemmas in dry_machine_step_lemmas.v        *)
Module ThreadPoolWF.
Section ThreadPoolWF.
Context {Sem : Semantics}.
Existing Instance DryHybridMachine.dryResources.
Existing Instance OrdinalPool.OrdinalThreadPool.
(** Take an instance of the Dry Machine *)
Existing Instance DryHybridMachine.DryHybridMachineSig.

Lemma mem_compatible_invalid_block:
forall tp m b ofs
(Hcomp: mem_compatible tp m)
(Hinvalid: ~ Mem.valid_block m b),
(forall i (cnti: containsThread tp i),
(getThreadR cnti).1 !! b ofs = None /\
(getThreadR cnti).2 !! b ofs = None) /\
(forall laddr rmap,
lockRes tp laddr = Some rmap ->
rmap.1 !! b ofs = None /\
rmap.2 !! b ofs = None).