Variant shorten_spec x p : T -> seq T -> Type :=
ShortenSpec p' of path e x p' & uniq (x :: p') & subpred (mem p') (mem p) :
shorten_spec x p (last x p') p'.

(* Specifications: *)
Lemma shortenP x p : path e x p -> shorten_spec x p (last x p) (shorten x p).
End EqPath.