Proof
fun X Y Z x y R z e =>
e (fun u => u (fun _ _ _ _ => top) -> bot) (fun p => p) top_intro.
(** On the other hand, proving the injectivity of the constructor  (foo_in X Y Z) : (x:X; y:Y)(Rel (Z x y))->(Z x y)->(foo X Y Z)  (of arity 4) is a little bit more tricky, since the types of its last two arguments actually depend on the values of its first two arguments.  (This is the same problem as for the dependent pair.)  For this reason, we express the injectivity of the constructor (foo_in X Y Z) by using a dependent equality which is close to John Major's equality: *)

(* Specifications: *)
Lemma eq_foo_in_in :
forall (X Y : Typ1) (Z : X -> Y -> Typ1) (x1 x2 : X)
(y1 y2 : Y) (R1 : Rel (Z x1 y1)) (R2 : Rel (Z x2 y2))
(z1 : Z x1 y1) (z2 : Z x2 y2),
eq (foo X Y Z) (foo_in X Y Z x1 y1 R1 z1) (foo_in X Y Z x2 y2 R2 z2)
->
forall P : forall (x : X) (y : Y), Rel (Z x y) -> Z x y -> Prop,
P x1 y1 R1 z1 -> P x2 y2 R2 z2.