Proof using map_congr.
move => H_net_eq net net' failed failed' tr tr' H_star H_step d H_eq d' H_eq'.
invcs H_step.
- left.
have H_neq: h <> me.
move => H_n.
rewrite -H_n in H_eq.
have H_eq_n := ordered_dynamic_uninitialized_state H_star _ H4.
by congruence.
move: H_eq'.
rewrite /update.
break_if; first by find_rewrite.
by congruence.
- move: H_eq'.
rewrite /update.
break_if => H_eq'; last by left; congruence.
right.
find_injection.
rewrite H_eq in H5.
find_injection.
destruct (input_handler (tot_s_map_msg me from m) (tot_s_map_data d0)) eqn:?.
have H_eq_st := H_net_eq _ _ _ _ _ _ _ _ _ _ _ _ H_star H6 H3 H_eq H7 Heqp.
break_and.
exists (inl (tot_s_map_msg me from m) :: (map inr l0)).
apply: SST_deliver => //=.
by rewrite Heqp H0.
- move: H_eq'.
rewrite /update.
break_if => H_eq'; last by left; rewrite H_eq in H_eq'; find_injection.
right.
find_injection.
rewrite H_eq in H5.
find_injection.
destruct (input_handler (tot_s_map_input me inp) (tot_s_map_data d0)) eqn:?.
have H_eq_inp := @tot_s_input_handlers_eq _ _ _ _ _ _ map_congr _ _ _ _ _ _ _ H6 Heqp.
break_and.
exists (inl (tot_s_map_input me inp) :: map inr l0).
apply: SST_deliver => //=.
by rewrite Heqp H0.
- left.
find_rewrite.
by find_injection.
Qed.

(* Specifications: *)
Lemma step_ordered_dynamic_failure_tot_one_mapped_simulation_1_init :
forall net net' failed failed' tr,
step_ordered_dynamic_failure (failed, net) (failed', net') tr ->
net.(odnwState) me = None ->
forall d, net'.(odnwState) me = Some d ->
tot_s_map_data d = init_handler.