(** Some results about the sign function. *)
#[global]
Instance sgn_wd : Proper (eq==>eq) sgn.

(* Specifications: *)
Lemma sgn_spec : forall n,
0 < n /\ sgn n == 1 \/
0 == n /\ sgn n == 0 \/
0 > n /\ sgn n == -1.
Lemma sgn_0 : sgn 0 == 0.
Lemma sgn_pos_iff : forall n, sgn n == 1 <-> 0<n.
Lemma sgn_null_iff : forall n, sgn n == 0 <-> n==0.
Lemma sgn_neg_iff : forall n, sgn n == -1 <-> n<0.
Lemma sgn_opp : forall n, sgn (-n) == - sgn n.
Lemma sgn_nonneg : forall n, 0 <= sgn n <-> 0 <= n.
Lemma sgn_nonpos : forall n, sgn n <= 0 <-> n <= 0.
Lemma sgn_mul : forall n m, sgn (n*m) == sgn n * sgn m.
Lemma sgn_abs : forall n, n * sgn n == abs n.
Lemma abs_sgn : forall n, abs n * sgn n == n.
Lemma sgn_sgn : forall x, sgn (sgn x) == sgn x.
End ZSgnAbsProp.