Library Stdlib.ZArith.Zabs
Binary Integers : properties of absolute value Initial author : Pierre Crégut (CNET, Lannion, France)
THIS FILE IS DEPRECATED.
It is now almost entirely made of compatibility formulations
for results already present in BinInt.Z.
From Stdlib Require Import Arith_base.
From Stdlib Require Import BinPos.
From Stdlib Require Import BinInt.
From Stdlib Require Import Zcompare.
From Stdlib Require Import Zorder.
From Stdlib Require Import Znat.
From Stdlib Require Import ZArith_dec.
#[local] Open Scope Z_scope.
Lemma Zabs_ind :
forall (P:Z -> Prop) (n:Z),
(n >= 0 -> P n) -> (n <= 0 -> P (- n)) -> P (Z.abs n).
Theorem Zabs_intro : forall P (n:Z), P (- n) -> P n -> P (Z.abs n).
Definition Zabs_dec : forall x:Z, {x = Z.abs x} + {x = - Z.abs x}.
Lemma Zabs_spec x :
0 <= x /\ Z.abs x = x \/
0 > x /\ Z.abs x = -x.
A characterization of the sign function:
Compatibility