Proof using lmi si.
intros.
find_copy_apply_lem_hyp logs_sorted_invariant.
pose proof log_matching_invariant.
eapply_prop_hyp raft_intermediate_reachable raft_intermediate_reachable.
unfold log_matching, log_matching_hosts, logs_sorted in *.
intuition.
match goal with
| H : forall _ _, _ <= _ <= _ -> _ |- _ =>
specialize (H h i);
conclude H ltac:(intuition; find_apply_lem_hyp maxIndex_is_max; eauto; omega)
end.
break_exists_exists. intuition. apply findAtIndex_intro; eauto using sorted_uniqueIndices.
Qed.

(* Specifications: *)
Lemma entries_max_thing :
forall net p es,
raft_intermediate_reachable net ->
In p (nwPackets net) ->
mEntries (pBody p) = Some es ->
es <> nil ->
1 <= maxIndex es.
Lemma entries_max_thing :
forall net p es,
raft_intermediate_reachable net ->
In p (nwPackets net) ->
mEntries (pBody p) = Some es ->
es <> nil ->
1 <= maxIndex es.