Variant splitl x1 x : seq T -> Type :=
Splitl p1 p2 of last x1 p1 = x : splitl x1 x (p1 ++ p2).

Lemma splitPl x1 p x : x \in x1 :: p -> splitl x1 x p.
Variant splitr x : seq T -> Type :=
Splitr p1 p2 : splitr x (p1 ++ x :: p2).