Proof using lsi rri.
intros.
pose proof (lift_prop _ leader_sublog_invariant_invariant _ ltac:(eauto)) as Hinv.
unfold leader_sublog_invariant, leader_sublog_nw_invariant in *.
destruct Hinv as [Hhost Hnw].
find_apply_lem_hyp ghost_packet.
eapply_prop_hyp In In; eauto; try find_rewrite_lem deghost_spec; try rewrite deghost_spec; eauto.
Qed.

(* Specifications: *)
Lemma invalid_index :
forall net h e,
refined_raft_intermediate_reachable net ->
In e (log (snd (nwState net h))) ->
eIndex e = S (maxIndex (log (snd (nwState net h)))) ->
False.
Lemma appendEntries_sublog :
forall net p t n pli plt es ci h e,
refined_raft_intermediate_reachable net ->
In p (nwPackets net) ->
pBody p = AppendEntries t n pli plt es ci ->
currentTerm (snd (nwState net h)) = t ->
type (snd (nwState net h)) = Leader ->
In e es ->
In e (log (snd (nwState net h))).
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'.