Proof using.
intros. unfold handleClientRequest in *.
break_match; find_inversion; subst; simpl in *; auto.
unfold assoc_default. break_match;
rewrite get_set_same in *; try congruence; find_inversion; auto.
Qed.

(* Specifications: *)
Theorem handleClientRequest_matchIndex :
forall h st client id c out st' ps,
handleClientRequest h st client id c = (out, st', ps) ->
(maxIndex (log st') = maxIndex (log st) /\
matchIndex st' = matchIndex st) \/
matchIndex st' = assoc_set name_eq_dec (matchIndex st) h (maxIndex (log st')) /\
maxIndex (log st') = S (maxIndex (log st)).