Proof using.
unfold raft_net_invariant_append_entries. intros.
unfold leader_sublog_invariant, leader_sublog_nw_invariant,
leader_sublog_host_invariant, handleAppendEntries, advanceCurrentTerm in *.
intuition idtac; simpl in *.
- repeat find_higher_order_rewrite; repeat break_match; repeat find_inversion;
subst; simpl in *;
intuition eauto; try solve_by_inversion;
do_in_app; intuition; eauto using removeAfterIndex_in.
- repeat find_higher_order_rewrite; repeat break_match; repeat find_inversion;
subst; simpl in *;
intuition eauto;
find_apply_hyp_hyp; intuition eauto; subst; try discriminate.
Qed.

(* Specifications: *)
Lemma leader_sublog_append_entries_reply :
raft_net_invariant_append_entries_reply
leader_sublog_invariant.