Proof using.
start. split.
- unfold allEntries_log_matching. intros. simpl in *. intuition.
- unfold allEntries_log_matching_nw. intros. simpl in *. intuition.
Qed.
Definition leader_sublog (net : network) :=
forall leader e h,
type (snd (nwState net leader)) = Leader ->
In e (log (snd (nwState net h))) ->
eTerm e = currentTerm (snd (nwState net leader)) ->
In e (log (snd (nwState net leader))).

(* Specifications: *)
Lemma lifted_leader_sublog_invariant :
forall net,
refined_raft_intermediate_reachable net ->
leader_sublog net.