Inductive Bar (A : Set) (P : list A -> Set) : list A -> Set :=
  | Base : forall l : list A, P l -> Bar A P l
  | Ind : forall l : list A, (forall a : A, Bar A P (a :: l)) -> Bar A P l.Inductive Bar (A : Set) (P : list A -> Set) : list A -> Set :=
  | Base : forall l : list A, P l -> Bar A P l
  | Ind : forall l : list A, (forall a : A, Bar A P (a :: l)) -> Bar A P l.Inductive Bar (A : Set) (P : list A -> Set) : list A -> Set :=
  | Base : forall l : list A, P l -> Bar A P l
  | Ind : forall l : list A, (forall a : A, Bar A P (a :: l)) -> Bar A P l.Definition GRBar (A : Set) (R : Rel A) := Bar A (GoodR A R).Definition WR (A : Set) (R : Rel A) := GRBar A R nil.

Lemma subRelGRBar : forall (A B : Set) (R : Rel A) (S : Rel B) (f : A -> B), (forall a b : A, R a b -> S (f a) (f b)) -> (forall b : B, {a : A | b = f a}) -> forall l : list A, GRBar A R l -> GRBar B S (map f l).