Section LeaderLogsContiguous.
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 {lmi : log_matching_interface}.
Proof using.
unfold update_elections_data_client_request in *.
intros. repeat break_match; repeat find_inversion; auto.
Qed.
Proof using.
unfold update_elections_data_timeout.
intros.
repeat break_match; simpl in *; auto.
Qed.
Proof using.
intros.
unfold update_elections_data_appendEntries.
repeat break_match; subst; simpl in *; auto.
Qed.
Proof using.
unfold update_elections_data_requestVote.
intros.
repeat break_match; auto.
Qed.
Proof using.
intros.
unfold handleRequestVoteReply, advanceCurrentTerm in *.
repeat break_match; try find_inversion; subst; simpl in *; intuition;
do_bool; intuition.
Qed.
Proof using.
intros.
unfold update_elections_data_requestVoteReply in *.
repeat break_match; intuition.
simpl in *.
match goal with
| |- context [handleRequestVoteReply ?h ?s ?h' ?t ?r] =>
pose proof handleRequestVoteReply_spec
h s h' t r (handleRequestVoteReply h s h' t r)
end. intuition; repeat find_rewrite; intuition.
congruence.
Qed.
Proof using lmi rri.
intros.
eapply lift_prop; eauto using log_matching_invariant.
Qed.

Theorem logs_contiguous :
forall net h,
refined_raft_intermediate_reachable net ->
contiguous_range_exact_lo (log (snd (nwState net h))) 0.