Proof using.
unfold minimal_contradicting_leader_log.
intros.
find_apply_lem_hyp argmin_elim. intuition.
- eauto using in_contradicting_leader_logs_on_leader_term_lt,
in_contradicting_leader_logs.
- eauto using in_contradicting_leader_logs,
in_contradicting_leader_logs_on_leader_in_leaderLog.
- eauto using in_contradicting_leader_logs,
in_contradicting_leader_logs_on_leader_not_in_log.
- destruct (le_lt_dec t'' t); auto.
destruct (le_lt_dec t' t''); auto.
destruct (in_dec entry_eq_dec e l'); auto.
find_eapply_lem_hyp contradicting_leader_logs_on_leader_complete; eauto.
find_eapply_lem_hyp contradicting_leader_logs_complete; [|solve [apply all_fin_all]].
find_apply_hyp_hyp. simpl in *. omega.
Qed.

(* Specifications: *)
Lemma maxTerm_zero_or_entry :
forall l,
maxTerm l = 0 \/ exists e, In e l /\ eTerm e = maxTerm l.