Proof using.
unfold handleAppendEntries, advanceCurrentTerm.
intros. repeat break_match; repeat find_inversion; simpl in *; repeat do_bool; eauto;
eexists; f_equal; eauto using NPeano.Nat.le_antisymm.
Qed.

Lemma not_empty_true_elim :
forall A (l : list A),
not_empty l = true -> l <> nil.