Proof using lmi.
intros. find_apply_lem_hyp log_matching_invariant.
unfold log_matching, log_matching_hosts in *.
intuition.
unfold contiguous_range_exact_lo. intuition; eauto.
find_apply_hyp_hyp. omega.
Qed.

(* Specifications: *)
Lemma doGenericServer_output_correct :
forall h ps sigma os st' ms,
raft_intermediate_reachable (mkNetwork ps sigma) ->
doGenericServer h (sigma h) = (os, st', ms) ->
in_output_list client id out os ->
output_correct client id out (applied_entries (update name_eq_dec sigma h st')).
Lemma doGenericServer_key_in_output_list :
forall net h os st' ms id' client id,
raft_intermediate_reachable net ->
doGenericServer h (nwState net h) = (os, st', ms) ->
key_in_output_list client id os ->
id < id' ->
before_func (has_key client id) (has_key client id') (applied_entries (update name_eq_dec (nwState net) h st')).