Section sec_exteq.
Variable T: Type.
CoInductive exteq : infseq T -> infseq T -> Prop :=
exteq_intro :
forall x s1 s2, exteq s1 s2 -> exteq (Cons x s1) (Cons x s2).
Proof using.
intros x1 s1 x2 s2 e.
change (hd (Cons x1 s1) = hd (Cons x2 s2) /\
exteq (tl (Cons x1 s1)) (tl (Cons x2 s2))).
case e; clear e x1 s1 x2 s2. simpl. intros; split; trivial.
Qed.

Lemma exteq_refl : forall s, exteq s s.