Definition lifted_entries_gt_0 (net : ghost_log_network) : Prop :=
    forall h e,
      In e (log (snd (nwState net h))) -> eIndex e > 0.

(* Specifications: *)
Lemma lifted_entries_gt_0_invariant : forall net, msg_refined_raft_intermediate_reachable net -> lifted_entries_gt_0 net.
Lemma lifted_maxIndex_sanity_append_entries : forall xs (p : ghost_log_packet) ys (net : ghost_log_network) st' ps' gd d m t n pli plt es ci, handleAppendEntries (pDst p) (snd (nwState net (pDst p))) t n pli plt es ci = (d, m) -> gd = update_elections_data_appendEntries (pDst p) (nwState net (pDst p)) t n pli plt es ci -> snd (pBody p) = AppendEntries t n pli plt es ci -> lifted_maxIndex_sanity net -> state_machine_safety (deghost (mgv_deghost net)) -> msg_refined_raft_intermediate_reachable net -> nwPackets net = xs ++ p :: ys -> (forall h, st' h = update name_eq_dec (nwState net) (pDst p) (gd, d) h) -> (forall (p' : ghost_log_packet), In p' ps' -> In p' (xs ++ ys) \/ mgv_deghost_packet p' = mkPacket (params := raft_refined_multi_params) (pDst p) (pSrc p) m) -> lifted_maxIndex_sanity (mkNetwork ps' st').
Lemma lifted_maxIndex_sanity_append_entries_reply : msg_refined_raft_net_invariant_append_entries_reply lifted_maxIndex_sanity.
Lemma lifted_maxIndex_sanity_request_vote : msg_refined_raft_net_invariant_request_vote lifted_maxIndex_sanity.
Lemma lifted_maxIndex_sanity_request_vote_reply : msg_refined_raft_net_invariant_request_vote_reply lifted_maxIndex_sanity.
Lemma doLeader_same_lastApplied : forall st n os st' ms, doLeader st n = (os, st', ms) -> lastApplied st' = lastApplied st.
Lemma fold_left_maximum_le' : forall l x y, x <= y -> x <= fold_left max l y.
Lemma fold_left_maximum_le : forall l x, x <= fold_left max l x.
Lemma fold_left_maxmimum_increase_init : forall l x y, fold_left max l x = x -> x <= y -> fold_left max l y = y.
Lemma fold_left_maximum_cases : forall l x, fold_left max l x = x \/ exists y, In y l /\ fold_left max l x = y.
Lemma fold_left_maximum_ind : forall l x (P : nat -> Prop), P x -> (forall y, In y l -> P y) -> P (fold_left max l x).
Lemma doLeader_same_commitIndex : forall st n os st' ms, doLeader st n = (os, st', ms) -> sorted (log st) -> commitIndex st <= maxIndex (log st) -> commitIndex st' <= maxIndex (log st').
Lemma lifted_maxIndex_sanity_do_leader : msg_refined_raft_net_invariant_do_leader lifted_maxIndex_sanity.
Lemma doGenericServer_lastApplied : forall h st out st' ms, doGenericServer h st = (out, st', ms) -> lastApplied st' = lastApplied st \/ (lastApplied st < commitIndex st /\ lastApplied st' = commitIndex st).
Lemma lifted_maxIndex_sanity_do_generic_server : msg_refined_raft_net_invariant_do_generic_server lifted_maxIndex_sanity.
Lemma lifted_maxIndex_sanity_state_same_packet_subset : msg_refined_raft_net_invariant_state_same_packet_subset lifted_maxIndex_sanity.
Lemma lifted_maxIndex_sanity_reboot : msg_refined_raft_net_invariant_reboot lifted_maxIndex_sanity.