Definition Client_index := (fin num_Clients).Inductive Name :=
  | Client : Client_index -> Name
  | Server : Name.Inductive Name :=
  | Client : Client_index -> Name
  | Server : Name.Inductive Name :=
  | Client : Client_index -> Name
  | Server : Name.Definition list_Clients := map Client (all_fin num_Clients).Definition Name_eq_dec : forall a b : Name, {a = b} + {a <> b}.Inductive Msg :=
  | Lock   : Msg
  | Unlock : Msg
  | Locked : Msg.Inductive Msg :=
  | Lock   : Msg
  | Unlock : Msg
  | Locked : Msg.Inductive Msg :=
  | Lock   : Msg
  | Unlock : Msg
  | Locked : Msg.Inductive Msg :=
  | Lock   : Msg
  | Unlock : Msg
  | Locked : Msg.Definition Msg_eq_dec : forall a b : Msg, {a = b} + {a <> b}.Definition Input := Msg.Definition Output := Msg.Record Data := mkData { queue : list Client_index ; held : bool }.Record Data := mkData { queue : list Client_index ; held : bool }.Record Data := mkData { queue : list Client_index ; held : bool }.Record Data := mkData { queue : list Client_index ; held : bool }.Inductive Label :=
  | InputLock : Client_index -> Label
  | InputUnlock : Client_index -> Label
  | MsgUnlock : Label
  | MsgLock : Client_index -> Label
  | MsgLocked : Client_index -> Label
  | Nop
  | Silent.Inductive Label :=
  | InputLock : Client_index -> Label
  | InputUnlock : Client_index -> Label
  | MsgUnlock : Label
  | MsgLock : Client_index -> Label
  | MsgLocked : Client_index -> Label
  | Nop
  | Silent.Inductive Label :=
  | InputLock : Client_index -> Label
  | InputUnlock : Client_index -> Label
  | MsgUnlock : Label
  | MsgLock : Client_index -> Label
  | MsgLocked : Client_index -> Label
  | Nop
  | Silent.Inductive Label :=
  | InputLock : Client_index -> Label
  | InputUnlock : Client_index -> Label
  | MsgUnlock : Label
  | MsgLock : Client_index -> Label
  | MsgLocked : Client_index -> Label
  | Nop
  | Silent.Inductive Label :=
  | InputLock : Client_index -> Label
  | InputUnlock : Client_index -> Label
  | MsgUnlock : Label
  | MsgLock : Client_index -> Label
  | MsgLocked : Client_index -> Label
  | Nop
  | Silent.Inductive Label :=
  | InputLock : Client_index -> Label
  | InputUnlock : Client_index -> Label
  | MsgUnlock : Label
  | MsgLock : Client_index -> Label
  | MsgLocked : Client_index -> Label
  | Nop
  | Silent.Inductive Label :=
  | InputLock : Client_index -> Label
  | InputUnlock : Client_index -> Label
  | MsgUnlock : Label
  | MsgLock : Client_index -> Label
  | MsgLocked : Client_index -> Label
  | Nop
  | Silent.Inductive Label :=
  | InputLock : Client_index -> Label
  | InputUnlock : Client_index -> Label
  | MsgUnlock : Label
  | MsgLock : Client_index -> Label
  | MsgLocked : Client_index -> Label
  | Nop
  | Silent.Definition Handler (S : Type) := GenHandler (Name * Msg) S Output Label.Definition ServerIOHandler (m : Msg) : Handler Data := ret Nop.Definition NetHandler (nm src : Name) (m : Msg) : Handler Data :=
    match nm with
      | Client c => ClientNetHandler c m
      | Server   => ServerNetHandler src m
    end.Definition InputHandler (nm : Name) (m : Msg) : Handler Data :=
    match nm with
      | Client c => ClientIOHandler c m
      | Server   => ServerIOHandler m
    end.Ltac handler_unfold :=
    repeat (monad_unfold; unfold NetHandler,
                                 InputHandler,
                                 ServerNetHandler,
                                 ClientNetHandler,
                                 ClientIOHandler,
                                 ServerIOHandler in *).Definition Nodes := Server :: list_Clients.

Theorem In_n_Nodes : forall n : Name, In n Nodes.