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 halted_safe: forall c m c' m' (P: val -> mem -> Prop) rv, corestep_star source geS c m c' m' -> halted source c = Some rv -> P rv m' -> (forall n, safeN source geS P n c m).