From mathcomp
(*************************************************************)
(************ Some useful facts about sequences **************)
(*************************************************************)
Fixpoint remove_elem (xs : seq (nat * nat * seq nat)) e :=
match xs with
| x :: xs => if x == e then xs else x :: (remove_elem xs e)
| [::] => [::]
end.

(* Specifications: *)
Lemma remove_elem_all xs p e :
all p xs -> all p (remove_elem xs e).
Lemma remove_elem_in xs e :
if e \in xs
then perm_eq (e :: (remove_elem xs e)) xs = true
else (remove_elem xs e) = xs.