Fixpoint relative_defined_type {A: Type} (l: list (ident * A)) (t: type): Prop :=
match t with
| Tarray t' _ _ => relative_defined_type l t'
| Tstruct id _ => In id (map fst l)
| Tunion id _ => In id (map fst l)
| _ => True
end.

(* Specifications: *)
Lemma relative_defined_type_mono: forall {A B: Type} (l1: list (ident * A)) (l2: list (ident * B)) (t: type),
(forall i, In i (map fst l1) -> In i (map fst l2)) ->
relative_defined_type l1 t ->
relative_defined_type l2 t.
Lemma relative_defined_type_equiv: forall {A B: Type} (l1: list (ident * A)) (l2: list (ident * B)) (t: type),
(forall i, In i (map fst l1) <-> In i (map fst l2)) ->
(relative_defined_type l1 t <-> relative_defined_type l2 t).