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 inject_virtue_sub_map: forall {Sem1 Sem2} (st1 : ThreadPool.t(resources:=dryResources)(Sem:=Sem1)) (m1 : mem) (tid : nat) (st2 : ThreadPool.t(resources:=dryResources)(Sem:=Sem2)) (mu : meminj) (m2 : mem) (Htid1 : ThreadPool.containsThread st1 tid) (Htid2 : ThreadPool.containsThread st2 tid) {A} (virtue1 : PTree.t (Z -> option A)) (* H0 : concur_match cd mu st1 m1 st2 m2 *) (Hcmpt1: mem_compatible st1 m1)(Hcmpt2: mem_compatible st2 m2), Mem.inject mu (restrPermMap (proj1 (Hcmpt1 tid Htid1))) (restrPermMap (proj1 (Hcmpt2 tid Htid2))) -> bounded_maps.sub_map virtue1 (snd (getMaxPerm m1)) -> bounded_maps.sub_map (tree_map_inject_over_mem m2 mu virtue1) (snd (getMaxPerm m2)).