(* Return the list of of relative numbres from p to p+q if p=<q,
   otherwise the empty list *)
 
Definition mZlist (p q : Z) : list Z :=
  match (q - p)%Z with
  | Z0 => p :: nil
  | Zpos d => mZlist_aux p (nat_of_P d)
  | Zneg _ => nil (A:=Z)
  end.

Theorem mZlist_correct_rev2 : forall p q r : Z, In r (mZlist p q) -> (r <= q)%Z.