Definition cycle p := if p is x :: p' then path x (rcons p' x) else true.

(* Specifications: *)
Lemma cycle_path p : cycle p = path (last x0_cycle p) p.
Lemma rot_cycle p : cycle (rot n0 p) = cycle p.
Lemma rotr_cycle p : cycle (rotr n0 p) = cycle p.
Lemma eq_path e e' : e =2 e' -> path e =2 path e'.
Lemma eq_cycle e e' : e =2 e' -> cycle e =1 cycle e'.
Lemma sub_path e e' : subrel e e' -> forall x p, path e x p -> path e' x p.
Lemma rev_path e x p : path e (last x p) (rev (belast x p)) = path (fun z => e^~ z) x p.