Definition CandidateEntriesLowered_rvr net e p :=
    In p (nwPackets net) ->
    pBody p = RequestVoteReply (eTerm e) true ->
    currentTerm (nwState net (pDst p)) = eTerm e ->
    wonElection (dedup name_eq_dec (pSrc p :: votesReceived (nwState net (pDst p)))) = true ->
    type (nwState net (pDst p)) <> Candidate.

(* Specifications: *)
Lemma deghost_packet_exists : forall net p, In p (nwPackets (deghost net)) -> exists (q : packet (params := raft_refined_multi_params (raft_params := raft_params))), In q (nwPackets net) /\ p = deghost_packet q.
Lemma candidate_entries_lowered_rvr' : forall net, CandidateEntries net -> votes_correct net -> cronies_correct net -> forall p h e, In e (log (snd (nwState net h))) -> CandidateEntriesLowered_rvr (deghost net) e p.
Lemma candidate_entries_lowered_rvr : forall net, raft_intermediate_reachable net -> forall p h e, In e (log (nwState net h)) -> CandidateEntriesLowered_rvr net e p.
Lemma candidate_entries_lowered_nw' : forall net, CandidateEntries net -> votes_correct net -> cronies_correct net -> forall h p e t li pli plt es lc, pBody p = AppendEntries t li pli plt es lc -> In p (nwPackets (deghost net)) -> In e es -> CandidateEntriesLowered (deghost net) e h.
Lemma candidate_entries_lowered_nw : forall net, raft_intermediate_reachable net -> forall h p e t li pli plt es lc, pBody p = AppendEntries t li pli plt es lc -> In p (nwPackets net) -> In e es -> CandidateEntriesLowered net e h.
Lemma candidate_entries_lowered_nw_rvr' : forall net, CandidateEntries net -> votes_correct net -> cronies_correct net -> forall p' p e t li pli plt es lc, pBody p = AppendEntries t li pli plt es lc -> In p (nwPackets (deghost net)) -> In e es -> CandidateEntriesLowered_rvr (deghost net) e p'.
Lemma candidate_entries_lowered_nw_rvr : forall net, raft_intermediate_reachable net -> forall p' p e t li pli plt es lc, pBody p = AppendEntries t li pli plt es lc -> In p (nwPackets net) -> In e es -> CandidateEntriesLowered_rvr net e p'.
Lemma leader_sublog_request_vote_reply : raft_net_invariant_request_vote_reply leader_sublog_invariant.
Lemma leader_sublog_do_generic_server : raft_net_invariant_do_generic_server leader_sublog_invariant.
Lemma leader_sublog_state_same_packet_subset : raft_net_invariant_state_same_packet_subset leader_sublog_invariant.
Lemma leader_sublog_reboot : raft_net_invariant_reboot leader_sublog_invariant.
Theorem leader_sublog_init : raft_net_invariant_init leader_sublog_invariant.
Theorem leader_sublog_invariant_invariant : forall net, raft_intermediate_reachable net -> leader_sublog_invariant net.