Proof using.
unfold refined_raft_net_invariant_init,
match_index_all_entries_inv,
match_index_all_entries_nw,
match_index_all_entries.
simpl. intros.
intuition.
Qed.

(* Specifications: *)
Theorem handleClientRequest_matchIndex_log :
forall h st client id c out st' ps,
handleClientRequest h st client id c = (out, st', ps) ->
ps = nil /\
(log st' = log st /\ matchIndex st' = matchIndex st \/
exists e,
log st' = e :: log st /\
eIndex e = S (maxIndex (log st)) /\
eTerm e = currentTerm st /\
eClient e = client /\
eInput e = c /\
eId e = id /\
type st = Leader /\
matchIndex st' = assoc_set name_eq_dec (matchIndex st) h (S (maxIndex (log st)))).