Definition Zmax : forall x_ x_ : Z, Z :=
  fun n m : Z =>
  match (n ?= m)%Z with
  | Datatypes.Eq => m
  | Datatypes.Lt => m
  | Datatypes.Gt => n
  end.

Theorem Zeq_Zs : forall p q : Z, (p <= q)%Z -> (q < Zsucc p)%Z -> p = q.