(* Trace refinement: *)

Lemma trace_refinement z z' c d d' m tm tm' tr0 ttr0 ttr cd j tn :
match_state cd j c m d tm ->
match_trace tr0 ttr0 ->
(forall n, safeN tr_source geS n (z,tr0,c) m) ->
corestepN tr_target geT tn (z,ttr0,d) tm (z',ttr,d') tm' ->
exists z'' c' m' tr n,
corestepN tr_source geS n (z,tr0,c) m (z'',tr,c') m'
/\ match_trace tr ttr.