Proof using rmri rri.
intros.
match goal with
| [ H : _, H' : _ |- _ ] => apply H in H'; clear H
end.
unfold maxIndex_sanity, maxIndex_lastApplied, maxIndex_commitIndex in *.
break_and.
repeat match goal with
| [ H : _ |- _ ] => specialize (H h)
end.
repeat find_rewrite_lem deghost_spec.
repeat find_rewrite_lem msg_deghost_spec'.
auto.
Qed.

Lemma haveNewEntries_log :
forall es st st',
log st = log st' ->
haveNewEntries st es = true ->
haveNewEntries st' es = true.