Ltac exploit_match:=
      unfold match_thread_target,match_thread_source,match_thread_compiled in *;
      match goal with
      | [ H: getThreadC ?i = _ ?c,
             H0: context[match_state2match_thread] |- _ ] =>
        rewrite H in H0; inversion H0; subst; simpl in *; clear H0
      end;
      fold match_thread_target in *;
      fold match_thread_source in *;
      fold match_thread_compiled in *.(* Build the concur_match *)
    Ltac destroy_ev_step_sum:=
      match goal with
      | [ H: ev_step_sum _ _ _ _ _ _ _ |- _ ] => inversion H; clear H
      end.

Lemma setPermBlock_inject_permMapLt: forall {Sem1 Sem2} n (NZ: 0 < n) (st1 : t(resources:=dryResources)(Sem:=Sem1)) (m1 : mem) (tid : nat) (cd : option compiler_index) (st2 : t(resources:=dryResources)(Sem:=Sem2)) (mu : meminj) (m2 : mem) (Htid1 : containsThread st1 tid) (b : block) (ofs : ptrofs), permMapLt (setPermBlock (Some Writable) b (intval ofs) (snd (getThreadR Htid1)) n) (getMaxPerm m1) -> Mem.inject mu m1 m2 -> forall (b' : block) (delt : Z), mu b = Some (b', delt) -> forall Htid2 : containsThread st2 tid, permMapLt (snd (getThreadR Htid2)) (getMaxPerm m2) -> permMapLt (setPermBlock (Some Writable) b' (intval ofs + delt) (snd (getThreadR Htid2)) n) (getMaxPerm m2).