Proof using.
intros.
induction H.
- constructor.
- simpl in *.
pose proof (RIR_step_failure).
specialize (H1 failed (deghost net) failed' (deghost net') out).
apply H1; auto.
apply ghost_simulation_1; auto.
- unfold deghost in *. simpl in *.
eapply RIR_handleInput; eauto.
+ simpl in *. repeat break_match. simpl in *.
assert (nwState h = (g, d0)) by eauto.
repeat find_rewrite. 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.
- unfold deghost in *. simpl in *.
pose proof (RIR_handleMessage).
specialize
(H5 (@mkPacket _ multi_params
(pSrc p)
(pDst p)
(pBody p))).
eapply H5; eauto.
+ simpl in *. repeat break_match. simpl in *.
repeat find_rewrite. eauto.
+ simpl in *.
unfold raft_refined_base_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.
- unfold deghost in *. simpl in *.
eapply RIR_doLeader; eauto.
+ simpl in *. repeat break_match. simpl in *.
assert (nwState h = (g, d0)) by eauto.
repeat find_rewrite. repeat find_inversion. 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.
- unfold deghost in *. simpl in *.
eapply RIR_doGenericServer; eauto.
+ simpl in *. repeat break_match. simpl in *.
assert (nwState h = (g, d0)) by eauto.
repeat find_rewrite. repeat find_inversion. 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.
Qed.

(* Specifications: *)
Theorem lift_prop :
forall P,
(forall net, raft_intermediate_reachable net -> P net) ->
(forall net, refined_raft_intermediate_reachable net -> P (deghost net)).