(* ucycleb is the boolean predicate, but ucycle is defined as a Prop *)
(* so that it can be used as a coercion target. *)
Definition ucycle p : Prop := cycle e p && uniq p.

(* Specifications: *)
(* Projections, used for creating local lemmas. *)
Lemma ucycle_cycle p : ucycle p -> cycle e p.
Lemma prev_cycle p x : cycle e p -> x \in p -> e (prev p x) x.
Lemma rot_ucycle p : ucycle (rot n0 p) = ucycle p.
Lemma mem2lf {p x y} : x \notin p -> mem2 p x y = false.
Lemma mem2rf {p x y} : y \notin p -> mem2 p x y = false.
Lemma mem2_splice p1 p3 x y p2 :
mem2 (p1 ++ p3) x y -> mem2 (p1 ++ p2 ++ p3) x y.
Lemma mem2_splice1 p1 p3 x y z :
mem2 (p1 ++ p3) x y -> mem2 (p1 ++ z :: p3) x y.
Lemma mem2l_cat {p1 p2 x} : x \notin p1 -> mem2 (p1 ++ p2) x =1 mem2 p2 x.
Lemma mem2lr_splice {p1 p2 p3 x y} :
x \notin p2 -> y \notin p2 -> mem2 (p1 ++ p2 ++ p3) x y = mem2 (p1 ++ p3) x y.