Fixpoint Zlength_aux (acc:Z) (A:Type) (l:list A) : Z :=
  match l with
    | nil => acc
    | _ :: l => Zlength_aux (Z.succ acc) A l
  end.Definition Zlength := Zlength_aux 0.Implicit Type l : list A.

Lemma Zlength_nil : Zlength (A:=A) nil = 0.