Proof using.
destruct net. unfold deghost, reghost. simpl in *. f_equal.
rewrite map_map. map_id.
Qed.

Theorem ghost_invariant_lift :
forall P : _ -> Prop,
(forall net net' failed failed' out,
@step_failure _ _ failure_params (failed, net) (failed', net') out ->
P net ->
P net') ->
(forall net net' failed failed' out,
step_failure (failed, net) (failed', net') out ->
P (deghost net) ->
P (deghost net')).