Section ListRelations.
Variable (X : Type) (R: X -> X -> Prop).
Inductive lstep: list X -> list X -> Prop :=
| stepHead s s' A: R s s' -> lstep (s :: A) (s' :: A)
| stepTail s A A': lstep A A' -> lstep (s :: A) (s :: A').
Hint Constructors lstep : core.
Global Instance lsteps_cons :
Proper (star R ++> star lstep ++> star lstep) cons.
Hint Resolve confluence_lstep : core.
Global Instance equiv_lstep_cons_proper:
Proper (equiv R ++> equiv lstep ++> equiv lstep) cons.

Lemma list_equiv_ind (P: list X -> list X -> Prop):
P nil nil ->
(forall s t S T, equiv R s t -> equiv lstep S T -> P S T -> P (s :: S) (t :: T)) ->
forall S T, equiv lstep S T -> P S T.