(* mem_seq and index. *)
(* mem_seq defines a predType for seq. *)

Fixpoint mem_seq (s : seq T) :=
  if s is y :: s' then xpredU1 y (mem_seq s') else xpred0.Definition eqseq_class := seq T.Identity Coercion seq_of_eqseq : eqseq_class >-> seq.Canonical seq_predType := @mkPredType T (seq T) pred_of_eq_seq.(* The line below makes mem_seq a canonical instance of topred. *)
Canonical mem_seq_predType := mkPredType mem_seq.

(* Specifications: *)
Lemma mem_rcons s y : rcons s y =i y :: s.
Lemma mem_behead s : {subset behead s <= s}.
Lemma mem_belast s y : {subset belast y s <= y :: s}.
Lemma eq_has_r s1 s2 : s1 =i s2 -> has^~ s1 =1 has^~ s2.
Lemma eq_all_r s1 s2 : s1 =i s2 -> all^~ s1 =1 all^~ s2.
Lemma has_sym s1 s2 : has (mem s1) s2 = has (mem s2) s1.
Lemma mem_rev s : rev s =i s.