(** * Lists of integers. *)

Definition Zlist := list Z.(** allPos checks whether all members of a Zlist are non-negative. *)

Definition allPos : Zlist -> Prop := alllist Z (fun x : Z => (x >= 0)%Z).(** Multiply all elements of a Zlist *)

Fixpoint zproduct (l : Zlist) : Z :=
  match l with
  | Nil => 1%Z
  | Cons x t => (x * zproduct t)%Z
  end.

Lemma zproductproduct : forall l : Zlist, Zabs_nat (zproduct l) = product (map Z nat Zabs_nat l).