Proof using.
induction l; intros; simpl in *; intuition.
- find_inversion. simpl in *. intuition.
- repeat break_match.
+ subst.
find_inversion. do_in_app. intuition.
* do_in_map. find_inversion. eauto using has_key_own_key.
* { destruct (has_key client id' a) eqn:?; eauto.
exfalso.
unfold cacheApplyEntry, applyEntry in *.
find_apply_lem_hyp has_key_true_necessary. intuition.
repeat break_match; repeat find_rewrite; find_inversion; do_bool; subst_max.
- find_eapply_lem_hyp applyEntries_cache; eauto; omega.
- find_eapply_lem_hyp applyEntries_cache; eauto; omega.
- find_eapply_lem_hyp applyEntries_cache; eauto;
unfold getLastId in *; simpl in *; eauto using get_set_same.
- find_eapply_lem_hyp applyEntries_cache; eauto;
unfold getLastId in *; simpl in *; eauto using get_set_same.
}
+ simpl in *. find_inversion.
{ destruct (has_key client id' a) eqn:?; eauto.
exfalso.
unfold cacheApplyEntry, applyEntry in *.
find_apply_lem_hyp has_key_true_necessary. intuition.
repeat break_match; repeat find_rewrite; find_inversion; do_bool; subst.
- find_eapply_lem_hyp applyEntries_cache; eauto; omega.
- find_eapply_lem_hyp applyEntries_cache; eauto; omega.
- eapply applyEntries_cache in Heqp0; eauto;
unfold getLastId in *; simpl in *; eauto using get_set_same.
- eapply applyEntries_cache in Heqp0; eauto;
unfold getLastId in *; simpl in *; eauto using get_set_same.
}
Qed.

Lemma entries_contiguous :
forall net,
raft_intermediate_reachable net ->
(forall h, contiguous_range_exact_lo (log (nwState net h)) 0).