Proof using.
unfold doLeader.
intros.
repeat break_match; repeat find_inversion; simpl in *; intuition.
do_in_map. subst. simpl in *. find_inversion.
eauto using findGtIndex_in.
Qed.

Lemma handleInputs_aais :
forall client id h inp i net os d' ms e o,
~ applied_implies_input_state client id i net ->
handleInput h inp (nwState net h) = (os, d', ms) ->
correct_entry client id i e ->
In e (log d') ->
in_input_trace client id i [(h, inl inp); o].