Definition contained (l: list ident) (g1 g2: generator) : Prop :=
forall id, In id l -> within id g1 g2.

Lemma contained_disjoint:
forall g1 l1 g2 l2 g3,
contained l1 g1 g2 -> contained l2 g2 g3 -> list_disjoint l1 l2.