Proof
fun X A a P x' H1 H2 E _ e =>
e x' (eq_refl (opt X) (some X x')) (eq_refl (opt X) (none X)) H1 H2.

(* Specifications: *)
Lemma SELECT_deloc :
forall (X : Typ1) (A : Rel X) (a : X) (P : PRED),
deloc X A (opt X) (SELECT X A a P) (some X).
Lemma SELECT_eqv :
forall (X : Typ1) (A : Rel X) (a : X) (P : PRED) (x : X),
EQV X A x (opt X) (SELECT X A a P) (some X x).
Lemma selection_intro :
forall (X : Typ1) (A : Rel X) (a : X) (P : PRED),
Compat P ->
forall (Y : Typ1) (B : Rel Y) (b : Y),
ELT Y B b X A a -> P Y B b -> ELT Y B b (opt X) (SELECT X A a P) (none X).
Lemma selection_elim :
forall (X : Typ1) (A : Rel X) (a : X) (P : PRED),
Compat P ->
forall (Y : Typ1) (B : Rel Y) (b : Y),
ELT Y B b (opt X) (SELECT X A a P) (none X) ->
and (ELT Y B b X A a) (P Y B b).
Theorem selection :
forall (X : Typ1) (A : Rel X) (a : X) (P : PRED),
Compat P ->
forall (Y : Typ1) (B : Rel Y) (b : Y),
iff (ELT Y B b (opt X) (SELECT X A a P) (none X))
(and (ELT Y B b X A a) (P Y B b)).