Proof using.
move => lb_step step init H_r.
case => e s H_star.
move: e s H_star.
cofix cf.
move => e.
case => e' s H_star H_exec'.
constructor; first by [].
apply cf.
inversion H_exec'; subst_max.
simpl in *.
rewrite /event_step_star /=.
rewrite /event_step_star /= in H_star.
rewrite /step_star_lb_step_reachable in H_r.
have H_d := H_r _ _ _ _ _ H_star H2.
rewrite H3.
exact: H_r _ _ _ _ _ H_star H2.
move: H_exec'.
apply: lb_step_execution_invar.
Qed.
End LabeledStepExecution.
Section LabeledStepAsync.
Context `{labeled_multi_params : LabeledMultiParams}.
Inductive lb_step_async : lb_step_relation network label (name * (input + list output)) :=
| LabeledStepAsync_deliver : forall net net' p xs ys out d l lb,
nwPackets net = xs ++ p :: ys ->
lb_net_handlers (pDst p) (pSrc p) (pBody p) (nwState net (pDst p)) = (lb, out, d, l) ->
net' = mkNetwork (send_packets (pDst p) l ++ xs ++ ys)
(update name_eq_dec (nwState net) (pDst p) d) ->
lb_step_async net lb net' [(pDst p, inr out)]
| LabeledStepAsync_input : forall h net net' out inp d l lb,
lb_input_handlers h inp (nwState net h) = (lb, out, d, l) ->
net' = mkNetwork (send_packets h l ++ nwPackets net)
(update name_eq_dec (nwState net) h d) ->
lb_step_async net lb net' [(h, inl inp); (h, inr out)]
| LabeledStepAsync_stutter : forall net, lb_step_async net label_silent net [].

(* Specifications: *)
Lemma step_async_star_lb_step_reachable :
step_star_lb_step_reachable lb_step_async step_async step_async_init.