Proof using rmri.
unfold msg_refined_raft_net_invariant_append_entries_reply, commit_invariant.
simpl. intros.
split.
- unfold commit_invariant_host in *.
simpl. intuition.
repeat find_higher_order_rewrite.
update_destruct_simplify.
+ eapply handleAppendEntriesReply_preserves_commit; eauto.
match goal with
| [ H : context [commitIndex] |- _ ] => erewrite handleAppendEntriesReply_same_commitIndex in H by eauto
end.
match goal with
| [ H : context [log] |- _ ] => erewrite handleAppendEntriesReply_same_log in H by eauto
end.
eapply lifted_committed_monotonic; [eauto|].
find_apply_lem_hyp handleAppendEntriesReply_type_term.
intuition; repeat find_rewrite; auto.
+ eapply handleAppendEntriesReply_preserves_commit; eauto.
- unfold commit_invariant_nw in *.
simpl. intros.
find_apply_hyp_hyp.
intuition.
+ eapply handleAppendEntriesReply_preserves_commit; eauto.
simpl. subst. auto.
+ do_in_map. unfold add_ghost_msg in *. do_in_map.
subst. simpl in *.
find_apply_lem_hyp handleAppendEntriesReply_packets.
subst. simpl in *. intuition.
Qed.

(* Specifications: *)
Lemma handleRequestVote_preserves_committed :
forall (net net' : ghost_log_network) h t c li lt st' ms e t',
handleRequestVote h (snd (nwState net h)) t c li lt = (st', ms) ->
(forall h', nwState net' h' = update name_eq_dec (nwState net) h (update_elections_data_requestVote h c t c li lt (nwState net h), st') h') ->
lifted_committed net e t' ->
lifted_committed net' e t'.