(** This kind of equality is actually sufficent for proving the
    expected delocation property (cf Lemma FOO_deloc below). *)

(** ** Building the edge relation of the super-powerset **)

(** The edge relation (FOO X Y Z) : (Rel (foo X Y Z)) of the super-powerset
    of the family of small types Z : X->Y->Typ1 is defined by the following
    clauses:

    1.  (Delocation of pointed graph structures:)

        For any x:X and y:Y, for any relation R:(Rel (Z x y)) and
        for any pair of vertices z,z':(Z x y),  (R z' z) implies
        (FOO X Y Z (foo_in X Y Z x y R z') (foo_in X Y Z x y R z))

    2.  (Connecting vertices to the new root:)

        For any x:X and y:Y, for any relation R:(Rel (Z x y)) and
        for any vertex z:(Z x y), then
        (FOO X Y Z (foo_in X Y Z x y R z) (foo_rt X Y Z)).

    Formally, we define this relation as follows: *)

Definition FOO (X Y : Typ1) (Z : X -> Y -> Typ1) (u' u : foo X Y Z) : Prop :=
  forall E : Prop,
  (forall (x : X) (y : Y) (R : Rel (Z x y)) (z' z : Z x y),
   eq (foo X Y Z) u' (foo_in X Y Z x y R z') ->
   eq (foo X Y Z) u (foo_in X Y Z x y R z) -> R z' z -> E) ->
  (forall (x : X) (y : Y) (R : Rel (Z x y)) (z' : Z x y),
   eq (foo X Y Z) u' (foo_in X Y Z x y R z') ->
   eq (foo X Y Z) u (foo_rt X Y Z) -> E) -> E.

Lemma FOO_deloc : forall (X Y : Typ1) (Z : X -> Y -> Typ1) (x : X) (y : Y) (R : Rel (Z x y)), deloc (Z x y) R (foo X Y Z) (FOO X Y Z) (foo_in X Y Z x y R).