(** * 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.

(* Specifications: *)
Lemma productzproduct :
forall l : natlist, Z_of_nat (product l) = zproduct (map nat Z Z_of_nat l).
Lemma zproductproduct :
forall l : Zlist, Zabs_nat (zproduct l) = product (map Z nat Zabs_nat l).