Section TermsAndIndicesFromOne.
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, terms_and_indices_from_one_vwl.
simpl. contradiction.
Qed.
Proof using taifoli rri.
intros.
pose proof (lift_prop _ terms_and_indices_from_one_log_invariant).
unfold terms_and_indices_from_one_log in *.
rewrite <- deghost_spec with (net := net0). auto.
Qed.
Proof using.
unfold refined_raft_net_invariant_client_request, terms_and_indices_from_one_vwl.
simpl. intuition. repeat find_higher_order_rewrite. update_destruct; subst; rewrite_update;
eauto using votesWithLog_update_elections_data_client_request.
Qed.
Proof using taifoli rri.
unfold refined_raft_net_invariant_timeout, terms_and_indices_from_one_vwl.
simpl. intuition. repeat find_higher_order_rewrite. update_destruct; subst; rewrite_update; eauto.
simpl in *. find_eapply_lem_hyp votesWithLog_update_elections_data_timeout; eauto.
intuition; eauto. subst. find_apply_lem_hyp handleTimeout_log_same. find_rewrite.
apply lifted_terms_and_indices_from_one_log; auto.
Qed.
Proof using.
unfold refined_raft_net_invariant_append_entries, terms_and_indices_from_one_vwl.
simpl. intuition. repeat find_higher_order_rewrite. update_destruct; subst; rewrite_update;
eauto using votesWithLog_update_elections_data_append_entries.
Qed.

Lemma terms_and_indices_from_one_vwl_append_entries_reply :
refined_raft_net_invariant_append_entries_reply terms_and_indices_from_one_vwl.