Definition halt_match c m d tm :=
  exists rv trv,
    halted source c = Some rv
    /\ halted target d = Some trv
    /\ P rv m
    /\ P trv tm.

Lemma safety_preservation: forall (sim : Forward_simulation_inject source target geS geT entry_points data match_state ord) (c : C) (d : D) (m : mem) (tm: mem) (P : val -> mem -> Prop) (P_good : forall j v tv m tm, val_inject j v tv -> Mem.inject j m tm -> P v m -> P tv tm) (MATCH : exists (cd: data) (j: meminj), match_state cd j c m d tm) (source_safe : forall n, safeN source geS P n c m), forall n, safeN target geT P n d tm.