Proof using.
intros.
induction H.
- constructor.
- simpl in *.
pose proof (RRIR_step_failure).
specialize (H1 failed (mgv_deghost net) failed' (mgv_deghost net') out).
apply H1; auto.
apply (@mgv_ghost_simulation_1 _ _ _ ghost_log_params); auto.
- unfold mgv_deghost in *. simpl in *.
eapply RRIR_handleInput; eauto.
+ simpl in *. repeat break_match. simpl in *. eauto.
+ intros. simpl in *.
repeat break_match; subst; simpl in *;
repeat find_higher_order_rewrite; break_if; subst; simpl in *;
congruence.
+ intros. simpl in *. in_crush.
find_apply_hyp_hyp.
in_crush.
right.
unfold add_ghost_msg in *.
do_in_map. subst. simpl in *.
apply in_map_iff. eauto.
- unfold mgv_deghost in *. simpl in *.
pose proof (RRIR_handleMessage).
specialize
(H5 (@mkPacket _ raft_refined_multi_params
(pSrc p)
(pDst p)
(snd (pBody p)))).
eapply H5; eauto.
+ simpl in *. repeat break_match. simpl in *.
repeat find_rewrite. eauto.
+ simpl in *.
unfold mgv_refined_base_params, raft_refined_base_params, refined_base_params, raft_msg_refined_multi_params, raft_refined_multi_params in *.
simpl in *.
unfold mgv_refined_base_params, raft_refined_base_params, refined_base_params, raft_msg_refined_multi_params, raft_refined_multi_params in *.
simpl in *. repeat find_rewrite.
map_crush. eauto.
+ intros. repeat break_match. simpl in *.
repeat find_higher_order_rewrite.
repeat break_match; congruence.
+ in_crush.
find_apply_hyp_hyp. in_crush.
right.
unfold add_ghost_msg in *.
do_in_map. subst. simpl in *.
apply in_map_iff. eauto.
- unfold mgv_deghost in *. simpl in *.
eapply RRIR_doLeader; eauto.
+ simpl in *. repeat break_match. simpl in *. eauto.
+ simpl in *.
intros. repeat break_match; simpl in *;
repeat find_higher_order_rewrite;
repeat break_match; congruence.
+ in_crush.
find_apply_hyp_hyp. in_crush.
right.
unfold add_ghost_msg in *.
do_in_map. subst. simpl in *.
apply in_map_iff. eauto.
- unfold mgv_deghost in *. simpl in *.
eapply RRIR_doGenericServer; eauto.
+ simpl in *. repeat break_match. simpl in *. eauto.
+ simpl in *.
intros. repeat break_match; simpl in *;
repeat find_higher_order_rewrite;
repeat break_match; congruence.
+ in_crush.
find_apply_hyp_hyp. in_crush.
right.
unfold add_ghost_msg in *.
do_in_map. subst. simpl in *.
apply in_map_iff. eauto.
Qed.

Theorem msg_lift_prop :
forall P,
(forall net, refined_raft_intermediate_reachable net -> P net) ->
(forall net, msg_refined_raft_intermediate_reachable net -> P (mgv_deghost net)).