Proof using.
intros. unfold handleAppendEntries in *.
break_if; [find_inversion; subst; eauto|].
break_if;
[do_bool; break_if; find_inversion; subst;
try find_apply_lem_hyp haveNewEntries_true;
simpl in *; intuition eauto using advanceCurrentTerm_log, advanceCurrentTerm_commitIndex, some_none, advanceCurrentTerm_term|].
simpl in *. intuition eauto using advanceCurrentTerm_log, advanceCurrentTerm_commitIndex.
break_match; [|find_inversion; subst; eauto].
break_if; [find_inversion; subst; eauto|].
break_if; [|find_inversion; subst; eauto using advanceCurrentTerm_log, advanceCurrentTerm_commitIndex].
find_inversion; subst; simpl in *.
right. right.
find_apply_lem_hyp findAtIndex_elim.
intuition; do_bool; find_apply_lem_hyp haveNewEntries_true;
intuition eauto using advanceCurrentTerm_term; congruence.
Qed.
Definition lifted_entries_gt_0_nw (net : ghost_log_network) : Prop :=
forall p t n pli plt es ci e,
In p (nwPackets net) ->
snd (pBody p) = AppendEntries t n pli plt es ci ->
In e es ->
eIndex e > 0.

Lemma lifted_entries_gt_0_nw_invariant :
forall net,
msg_refined_raft_intermediate_reachable net ->
lifted_entries_gt_0_nw net.