Section AllEntriesIndicesGt0.
Context {orig_base_params : BaseParams}.
Context {one_node_params : OneNodeParams orig_base_params}.
Context {raft_params : RaftParams orig_base_params}.
Context {rri : raft_refinement_interface}.
Context {taifoli : terms_and_indices_from_one_log_interface}.
Proof using.
unfold refined_raft_net_invariant_init, allEntries_indices_gt_0.
simpl. intuition.
Qed.
Proof using.
unfold refined_raft_net_invariant_client_request, allEntries_indices_gt_0.
intros. simpl in *.
repeat find_higher_order_rewrite.
update_destruct_max_simplify; eauto.
find_apply_lem_hyp update_elections_data_client_request_allEntries.
intuition.
- find_rewrite. eauto.
- break_exists. break_and. find_rewrite. simpl in *.
intuition eauto.
subst. lia.
Qed.
Proof using.
unfold refined_raft_net_invariant_timeout, allEntries_indices_gt_0.
intros. simpl in *.
repeat find_higher_order_rewrite.
update_destruct_max_simplify; eauto.
find_rewrite_lem update_elections_data_timeout_allEntries.
eauto.
Qed.
Proof using.
unfold deghost.
simpl. intuition.
apply in_map_iff.
eexists; eauto.
Qed.

Lemma lifted_taifol_nw :
forall net,
refined_raft_intermediate_reachable net ->
forall p t leaderId prevLogIndex prevLogTerm entries leaderCommit,
In p (nwPackets net) ->
pBody p = AppendEntries t leaderId prevLogIndex prevLogTerm entries leaderCommit ->
terms_and_indices_from_one entries.