Proof using.
unfold refined_raft_net_invariant_reboot, match_index_all_entries_inv.
intros. break_and. subst. split.
- unfold match_index_all_entries in *.
intros.
repeat find_higher_order_rewrite.
match goal with
| [ H : nwState ?net ?h = (?x, ?y) |- _ ] =>
replace x with (fst (nwState net h)) in * by (rewrite H; auto);
replace y with (snd (nwState net h)) in * by (rewrite H; auto);
clear H
end.
rewrite update_nop_fst.
update_destruct_simplify_hyp.
+ discriminate.
+ repeat find_reverse_rewrite.
eauto.
- unfold match_index_all_entries_nw in *.
intros.
repeat find_higher_order_rewrite.
match goal with
| [ H : nwState ?net ?h = (?x, ?y) |- _ ] =>
replace x with (fst (nwState net h)) in * by (rewrite H; auto);
replace y with (snd (nwState net h)) in * by (rewrite H; auto);
clear H
end.
rewrite update_nop_fst.
update_destruct_simplify_hyp.
+ discriminate.
+ repeat find_reverse_rewrite.
eauto.
Qed.

(* Specifications: *)
Lemma match_index_all_entries_invariant :
forall net,
refined_raft_intermediate_reachable net ->
match_index_all_entries_inv net.