(* Defining int *)
Variant int : Set := Posz of nat | Negz of nat.(* Defining int *)
Variant int : Set := Posz of nat | Negz of nat.(* Defining int *)
Variant int : Set := Posz of nat | Negz of nat.Local Notation "x * y" := (mulz x y) : int_scope.Notation "x ^ n" := (exprz x n) : ring_scope.Definition natsum_of_int (m : int) : nat + nat :=
  match m with Posz p => inl _ p | Negz n => inr _ n end.Definition int_of_natsum (m : nat + nat) :=
  match m with inl p => Posz p | inr n => Negz n end.

(* Specifications: *)
Lemma natsum_of_intK : cancel natsum_of_int int_of_natsum.