Inductive list_eq : list T -> list T -> Prop :=
  | nil_eq : list_eq nil nil
  | cons_eq : forall x xs y ys, equal x y -> list_eq xs ys -> list_eq (x :: xs) (y :: ys).Inductive list_eq : list T -> list T -> Prop :=
  | nil_eq : list_eq nil nil
  | cons_eq : forall x xs y ys, equal x y -> list_eq xs ys -> list_eq (x :: xs) (y :: ys).Inductive list_eq : list T -> list T -> Prop :=
  | nil_eq : list_eq nil nil
  | cons_eq : forall x xs y ys, equal x y -> list_eq xs ys -> list_eq (x :: xs) (y :: ys).Instance type_list : type (list T) :=
  { equal := list_eq
  ; proper := Forall proper
  }.Instance typeOk_list : typeOk type_list.Global Instance EqDec_list : EquivDec.EqDec _ (@eq (list T)).

Lemma list_rev_ind : forall T (P : list T -> Prop), P nil -> (forall l ls, P ls -> P (ls ++ l :: nil)) -> forall ls, P ls.