Program Instance Linker_composite_defs : Linker (list composite_definition) := {
link := link_composite_defs;
linkorder := @List.incl composite_definition
}.
Next Obligation.
apply incl_refl.
Defined.
Next Obligation.
red; intros; eauto.
Defined.
Next Obligation.
apply link_composite_def_inv in H; destruct H as (A & B & C).
split; red; intros; apply C; auto.
Defined.
(** Connections with [build_composite_env]. *)

Theorem link_build_composite_env:
forall l1 l2 l env1 env2,
build_composite_env l1 = OK env1 ->
build_composite_env l2 = OK env2 ->
link l1 l2 = Some l ->
{ env |
build_composite_env l = OK env
/\ (forall id co, env1!id = Some co -> env!id = Some co)
/\ (forall id co, env2!id = Some co -> env!id = Some co) }.