Inductive elemsR A B (R: A -> B -> Prop): list A -> list B -> Prop :=
  | eR_nil: elemsR R nil nil
  | eR_cons (a: A) (b: B): R a b -> forall l l', elemsR R l l' -> elemsR R (a :: l) (b :: l').Inductive elemsR A B (R: A -> B -> Prop): list A -> list B -> Prop :=
  | eR_nil: elemsR R nil nil
  | eR_cons (a: A) (b: B): R a b -> forall l l', elemsR R l l' -> elemsR R (a :: l) (b :: l').Inductive elemsR A B (R: A -> B -> Prop): list A -> list B -> Prop :=
  | eR_nil: elemsR R nil nil
  | eR_cons (a: A) (b: B): R a b -> forall l l', elemsR R l l' -> elemsR R (a :: l) (b :: l').Instance elemsR_trans A `{R: relation A} {TR: Transitive R}: Transitive (elemsR R).

(* Specifications: *)
Lemma elemsR_le_S a b: elemsR le a b -> elemsR le (map S a) (map S b).
Lemma elemsR_map A (R: relation A) f l: (forall x, In x l -> R (f x) x) -> elemsR R (map f l) l.
Lemma elemsR_map_map (X Y: Type) (f g: Y -> X) (l: list Y) (R: relation X): (forall x, In x l -> R (f x) (g x)) -> elemsR R (map f l) (map g l).
Lemma elemsR_impl A (R R' : relation A): (forall x y: A, R x y -> R' x y) -> forall l l', elemsR R l l' -> elemsR R' l l'.