Section EqPath.
Variables (n0 : nat) (T : eqType) (e : rel T).
Implicit Type p : seq T.
Variant split x : seq T -> seq T -> seq T -> Type :=
Split p1 p2 : split x (rcons p1 x ++ p2) p1 p2.
Variant splitr x : seq T -> Type :=
Splitr p1 p2 : splitr x (p1 ++ x :: p2).
(* ucycleb is the boolean predicate, but ucycle is defined as a Prop *)
(* so that it can be used as a coercion target. *)
Definition ucycleb p := cycle e p && uniq p.
Definition ucycle p : Prop := cycle e p && uniq p.

Lemma mem2E s x y :
mem2 s x y = subseq (if x == y then [:: x] else [:: x; y]) s.