Proof using lsi rri.
pose proof lift_prop _ leader_sublog_invariant_invariant.
unfold leader_sublog, leader_sublog_invariant, leader_sublog_host_invariant in *.
intuition.
unfold raft_refined_base_params in *.
repeat rewrite <- deghost_spec in *.
repeat match goal with
| [ H : _ |- _ ] => rewrite <- deghost_spec in H
end.
find_apply_hyp_hyp. intuition.
eauto.
Qed.

Lemma lifted_leader_sublog_nw_invariant :
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 ->
type (snd (nwState net h)) = Leader ->
eTerm e = currentTerm (snd (nwState net h)) ->
In e es ->
In e (log (snd (nwState net h))).