Proof using.
intros. unfold handleClientRequest in *.
break_match; find_inversion; subst; intuition.
simpl in *. eauto 10.
Qed.

Lemma handleClientRequest_log_ind :
forall {h st client id c out st' ps},
handleClientRequest h st client id c = (out, st', ps) ->
forall (P : list entry -> Prop),
P (log st) ->
(forall e, eIndex e = S (maxIndex (log st)) ->
eTerm e = currentTerm st ->
eClient e = client ->
eInput e = c ->
eId e = id ->
type st = Leader ->
P (e :: log st)) ->
P (log st').