Section CombineGreeters.
Variables (l1 l2 : Label) (nodes : seq nid) (this : nid).
Variable (lab_disj : l2 != l1).
Definition gp1 := GreeterProtocol nodes l1.
Definition gp2 := GreeterProtocol nodes l2.
Definition V := (W l1 nodes) \+ (W l2 nodes).
Notation loc i k := (getLocal this (getStatelet i k)).
Notation msgs i k := (dsoup (getStatelet i k)).
Hypothesis T : this \in nodes.
Definition greet_prog1 := greet2 l1 T.
Definition greet_prog2 := greet2 l2 T.
Definition greeter_spec3 n1 n2 to :=
DHT [this, V]
(fun i =>
[/\ loc i l1 = counter :-> n1,
loc i l2 = counter :-> n2 &
to \in nodes],
fun r m =>
[/\ loc m l1 = counter :-> n1.+2,
loc m l2 = counter :-> n2.+2 &
r = n1 + n2 + 2]).

Lemma hook_complete_unit (c : context) : hook_complete (c, Unit).