In Coq, one can define the natural numbers inductively as follows:
Inductive nat :=
| zero : nat
| succ : nat -> nat.
I would like to know if it's possible to define the integers inductively, in a similar fashion? I can do something like
Inductive int :=
| zero : int
| succ : int -> int
| pred : int -> int.
but then I want to assert in the definition of int
that succ(pred x) = x
and pred(succ x) = x
, and I'm not sure how to do this.