Proof using rlmli rmri.
red. intros.
match goal with
| H : nwState ?net ?h = (?gd, ?d) |- _ =>
replace gd with (fst (nwState net h)) in * by (rewrite H; reflexivity);
replace d with (snd (nwState net h)) in * by (rewrite H; reflexivity);
clear H
end.
split; red; intros; simpl in *; intuition;
unfold ghost_log_entries_match in *; break_and.
- repeat find_higher_order_rewrite; destruct_update; simpl in *; eauto.
+ find_apply_hyp_hyp. intuition.
* erewrite doGenericServer_log; eauto.
* packet_simpl. eauto.
+ find_apply_hyp_hyp. intuition.
packet_simpl.
erewrite doGenericServer_log with (st'0 := d') by eauto.
eapply lifted_entries_match_invariant; eauto.
- find_apply_hyp_hyp.
find_apply_hyp_hyp.
intuition.
+ do_in_map. subst. unfold add_ghost_msg in *. do_in_map.
subst. simpl in *.
erewrite doGenericServer_log; eauto.
+ do_in_map. subst. unfold add_ghost_msg in *. do_in_map.
subst. simpl in *.
erewrite doGenericServer_log; eauto.
+ repeat do_in_map. subst. unfold add_ghost_msg in *. repeat do_in_map.
subst. simpl in *. auto.
Qed.

(* Specifications: *)
Lemma ghost_log_entries_match_reboot :
msg_refined_raft_net_invariant_reboot ghost_log_entries_match.