Ltac do_doLeader_same_log :=
    match goal with
      | [ H : doLeader _ _ = (_, ?d, _) |- _ ] =>
        erewrite doLeader_same_log with (st':=d) in *; try apply H; eauto
    end.Ltac do_tryToBecomeLeader_same_log :=
    match goal with
      | [ H : tryToBecomeLeader _ _ = (?d, _) |- _ ] =>
        erewrite tryToBecomeLeader_same_log with (st':=d); try apply H; eauto
    end.

Lemma doLeader_doesn't_touch_log : forall d h out d' ms, doLeader d h = (out, d', ms) -> log d' = log d.