(** Drop an element from a Zlist *)

Fixpoint zdrop (x : Z) (l : Zlist) {struct l} : Zlist :=
  match l with
  | Nil => Nil Z
  | Cons h t => if Zeq_bool x h then t else Cons Z h (zdrop x t)
  end.

Lemma zdrop_inlist_swap : forall (x y : Z) (l : Zlist), inlist Z y l -> inlist Z x (zdrop y l) -> inlist Z y (zdrop x l).