Definition Annotation_sub (A1 A2: option Annotation):Prop :=
match A1, A2 with
_, None => True
| Some (StrongAnnotation _), Some (WeakAnnotation _) => True
| Some (StrongAnnotation X), Some (StrongAnnotation Y) => X=Y (*maybe have entailment here?*)
| X, Y => X=Y
end.

Lemma Annotation_sub_refl a: Annotation_sub a a.
Definition tycontext_sub (Delta Delta' : tycontext) : Prop :=
(forall id, match (temp_types Delta) ! id,  (temp_types Delta') ! id with
| None, _ => True
| Some t, None => False
| Some t, Some t' => t=t'
end)
/\ (forall id, (var_types Delta) ! id = (var_types Delta') ! id)
/\ ret_type Delta = ret_type Delta'
/\ (forall id, sub_option ((glob_types Delta) ! id) ((glob_types Delta') ! id))
/\ (forall id, sub_option ((glob_specs Delta) ! id) ((glob_specs Delta') ! id))
/\ (forall id, Annotation_sub ((annotations Delta) ! id) ((annotations Delta') ! id)).