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 termination_preservation: forall cd j c' m' rv1, match_state cd j c m d tm -> corestep_star source geS c m c' m' -> halted source c' = Some rv1 -> exists d' tm' rv2, corestep_star target geT d tm d' tm' /\ halted target d' = Some rv2.