Proof using.
red. unfold lastApplied_le_commitIndex. intros.
simpl in *. repeat find_higher_order_rewrite.
destruct_update; simpl in *; eauto.
rewrite handleRequestVoteReply_same_lastApplied.
rewrite handleRequestVoteReply_same_commitIndex. eauto.
Qed.

Lemma doLeader_same_lastApplied:
forall st (os : list raft_output) (d' : raft_data)
(ms : list (name * msg)) (h0 : name),
doLeader st h0 = (os, d', ms) ->
lastApplied d' = lastApplied st.