Definition UNION (X : Typ1) (A : Rel X) (a : X) (z' z : opt X) :=
  forall E : Prop,
  (forall x x' : X,
   eq (opt X) z' (some X x') -> eq (opt X) z (some X x) -> A x' x -> E) ->
  (forall x x' : X,
   eq (opt X) z' (some X x') -> eq (opt X) z (none X) -> A x' x -> A x a -> E) ->
  E.

(* Specifications: *)
Lemma UNION_in : forall (X : Typ1) (A : Rel X) (a x x' : X), A x' x -> UNION X A a (some X x') (some X x).
Lemma UNION_rt : forall (X : Typ1) (A : Rel X) (a x x' : X), A x' x -> A x a -> UNION X A a (some X x') (none X).
Lemma UNION_deloc : forall (X : Typ1) (A : Rel X) (a : X), deloc X A (opt X) (UNION X A a) (some X).
Lemma UNION_eqv : forall (X : Typ1) (A : Rel X) (a x : X), EQV X A x (opt X) (UNION X A a) (some X x).
Lemma union_intro : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y) (Z : Typ1) (C : Rel Z) (c : Z), ELT Y B b Z C c -> ELT Z C c X A a -> ELT Y B b (opt X) (UNION X A a) (none X).
Lemma union_elim : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), ELT Y B b (opt X) (UNION X A a) (none X) -> exG (fun Z C c => and (ELT Y B b Z C c) (ELT Z C c X A a)).
Lemma union : forall (X : Typ1) (A : Rel X) (a : X) (Y : Typ1) (B : Rel Y) (b : Y), iff (ELT Y B b (opt X) (UNION X A a) (none X)) (exG (fun Z C c => and (ELT Y B b Z C c) (ELT Z C c X A a))).