Ltac use_entries_match :=
    match goal with
      | [ _ : eIndex ?e1 = eIndex ?e2,
              H : context [entries_match]
                              |- _ ] =>
        first [ solve [eapply H with (e:=e2)(e':=e1); eauto; congruence] |
                solve [eapply H with (e:=e1)(e':=e2); eauto; congruence]]
    end.Ltac contradict_maxIndex :=
    match goal with
      | [ _ : S (maxIndex ?l) <= eIndex ?e,
              He : In ?e ?l |- _ ] =>
        exfalso; apply maxIndex_is_max in He; intuition; omega
    end.

Lemma handleClientRequest_log_matching_hosts_entries_match : forall h h' net client id c, h' <> h -> log_matching_hosts net -> leader_sublog_host_invariant net -> logs_sorted_host net -> type (nwState net h) = Leader -> entries_match ((mkEntry h client id (S (maxIndex (log (nwState net h)))) (currentTerm (nwState net h)) c) :: (log (nwState net h))) (log (nwState net h')).