Inductive GoodR (A : Set) (R : Rel A) : list A -> Set :=
  | FoundG :
      forall (a : A) (l : list A),
      ExistsL A (fun x : A => R x a) l -> GoodR A R (a :: l)
  | SearchG : forall (a : A) (l : list A), GoodR A R l -> GoodR A R (a :: l).Inductive GoodR (A : Set) (R : Rel A) : list A -> Set :=
  | FoundG :
      forall (a : A) (l : list A),
      ExistsL A (fun x : A => R x a) l -> GoodR A R (a :: l)
  | SearchG : forall (a : A) (l : list A), GoodR A R l -> GoodR A R (a :: l).Inductive GoodR (A : Set) (R : Rel A) : list A -> Set :=
  | FoundG :
      forall (a : A) (l : list A),
      ExistsL A (fun x : A => R x a) l -> GoodR A R (a :: l)
  | SearchG : forall (a : A) (l : list A), GoodR A R l -> GoodR A R (a :: l).

(* Specifications: *)
Lemma monGoodR1 : forall (A : Set) (R : Rel A) (xs bs : list A), GoodR A R bs -> GoodR A R (xs ++ bs).
Lemma monGoodR : forall (A : Set) (R : Rel A) (xs bs cs : list A), GoodR A R (xs ++ bs) -> GoodR A R (xs ++ cs ++ bs).
Lemma subPredExistsL : forall (A B : Set) (P : Pred A) (S : Pred B) (f : A -> B), (forall a : A, P a -> S (f a)) -> forall l : list A, ExistsL A P l -> ExistsL B S (map f l).
Lemma subRelGoodR : 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 l : list A, GoodR A R l -> GoodR B S (map f l).