Proof using.
intros P s ev. induction ev.
- exists s; [ constructor | assumption].
- destruct IHev. exists s0.
* constructor; assumption.
* assumption.
Qed.
(* Extensional version *)
Inductive suff_exteq (s : infseq T) : infseq T -> Prop :=
| sb_eq : forall s', exteq s s' -> suff_exteq s s'
| sb_next : forall x s', suff_exteq s s' -> suff_exteq s (Cons x s').
Inductive suffb (x : T) (s : infseq T) : infseq T -> Prop :=
| sp_eqb : forall s', exteq (Cons x s) s' -> suffb x s s'
| sp_nextb : forall y s', suffb x s s' -> suffb x s (Cons y s').
CoInductive subseqb : infseq T -> infseq T -> Prop :=
| Subseqb : forall x s s', suffb x s s' -> subseqb s s' -> subseqb (Cons x s) s'.
Inductive mem (x : T) : infseq T -> Prop :=
| mem0 : forall s, mem x (Cons x s)
| mem_next : forall y s, mem x s -> mem x (Cons y s).

Lemma subseqb_included : forall x s, mem x s -> forall s', subseqb s s' -> mem x s'.
Proof using.