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.
Proof using taifoli rri.
intros.
pose proof (lift_prop _ terms_and_indices_from_one_log_nw_invariant).
match goal with
| [ H : _ |- _ ] => eapply H; eauto using ghost_packet
end.
Qed.

Lemma allEntries_indices_gt_0_append_entries :
refined_raft_net_invariant_append_entries allEntries_indices_gt_0.