Proof using.
unfold not_empty.
intros. break_match; congruence.
Qed.

(* Specifications: *)
Lemma not_empty_false_elim :
forall A (l : list A),
not_empty l = false -> l = nil.
Lemma handleAppendEntries_success_allEntries :
forall h st t n pli plt es ci st' t',
handleAppendEntries h st t n pli plt es ci = (st', AppendEntriesReply t' es true) ->
es <> nil ->
(forall e e' e'',
In e es ->
In e' (log st) ->
eIndex e = eIndex e' ->
eTerm e = eTerm e' ->
In e'' es ->
eIndex e'' <= eIndex e ->
In e'' (log st)) ->
sorted (log st) ->
exists e, In e (log st') /\ In e es /\
eIndex e = maxIndex es /\
eTerm e = maxTerm es.