Proof using.
intros. unfold doLeader, advanceCommitIndex in *.
break_match; try solve [find_inversion; simpl in *; intuition].
break_if; try solve [find_inversion; simpl in *; intuition].
find_inversion. simpl. do_in_map. subst.
simpl in *. find_inversion.
eauto using findGtIndex_in.
Qed.

Lemma lifted_one_leader_per_term :
forall net h h',
refined_raft_intermediate_reachable net ->
currentTerm (snd (nwState net h)) = currentTerm (snd (nwState net h')) ->
type (snd (nwState net h)) = Leader ->
type (snd (nwState net h')) = Leader ->
h = h'.