Ltac workhorse :=
    try match goal with
        | [ |- mkNetwork _ _ = mkNetwork _ _ ] => f_equal
      end;
    try match goal with
        | [ |- (fun _ => _) = (fun _ => _) ] => apply functional_extensionality; intros
      end;
      repeat break_match;
      repeat match goal with
               | [ H : (_, _) = (_, _) |- _ ] => invc H
             end;
      repeat (simpl in *; subst);
      repeat rewrite map_app;
      repeat rewrite map_map.Notation mgv_deghost := (@mgv_deghost _ _ ghost_log_params).

(* Specifications: *)
Theorem simulation_1 : forall net, msg_refined_raft_intermediate_reachable net -> refined_raft_intermediate_reachable (mgv_deghost net).
Theorem msg_lift_prop : forall P, (forall net, refined_raft_intermediate_reachable net -> P net) -> (forall net, msg_refined_raft_intermediate_reachable net -> P (mgv_deghost net)).
Lemma step_failure_star_raft_intermediate_reachable_extend : forall f net f' net' tr, @step_failure_star _ _ raft_msg_refined_failure_params (f, net) (f', net') tr -> msg_refined_raft_intermediate_reachable net -> msg_refined_raft_intermediate_reachable net'.
Lemma map_subset : forall A B (f : A -> B) l l', (forall x, In x (map f l') -> In x (map f l)) -> exists l'', map f l' = map f l'' /\ (forall x, In x l'' -> In x l).
Lemma mgv_deghost_packet_mgv_ghost_packet_partial_inverses : forall p, (@mgv_deghost_packet _ _ ghost_log_params (mgv_ghost_packet p)) = p.
Theorem simulation_2 : forall net, refined_raft_intermediate_reachable net -> exists rnet, net = mgv_deghost rnet /\ msg_refined_raft_intermediate_reachable rnet.
Theorem msg_lower_prop : forall P : _ -> Prop, (forall net, msg_refined_raft_intermediate_reachable net -> P (mgv_deghost net)) -> (forall net, refined_raft_intermediate_reachable net -> P net).
Lemma deghost_spec : forall (net : @network _ raft_msg_refined_multi_params) h, nwState (mgv_deghost net) h = (nwState net h).
Theorem lift_prop_all_the_way : forall (P : _ -> Prop), (forall net, raft_intermediate_reachable net -> P net) -> (forall (net : @network _ raft_msg_refined_multi_params), msg_refined_raft_intermediate_reachable net -> P (deghost (mgv_deghost net))).
Theorem lower_prop_all_the_way : forall P : _ -> Prop, (forall (net : @network _ raft_msg_refined_multi_params), msg_refined_raft_intermediate_reachable net -> P (deghost (mgv_deghost net))) -> (forall net, raft_intermediate_reachable net -> P net).