(** We can deduce a [sgn] function from a [compare] function *)
Module Type ZDecAxiomsSig := ZAxiomsMiniSig <+ HasCompare.
Module Type ZDecAxiomsSig' := ZAxiomsMiniSig' <+ HasCompare.
Module Type GenericSgn (Import Z : ZDecAxiomsSig')
(Import ZP : ZMulOrderProp Z) <: HasSgn Z.
Definition sgn n :=
match compare 0 n with Eq => 0 | Lt => 1 | Gt => -1 end.

Lemma abs_idemp : forall n, abs (abs n) == abs n.
#[deprecated(since="8.19", note="Use abs_idemp")]
Notation abs_involutive := abs_idemp.