(* 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.

Lemma has_sym s1 s2 : has (mem s1) s2 = has (mem s2) s1.