aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/ZArith/BinInt.v
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-02-09 17:44:37 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2010-02-09 17:44:37 +0000
commit959b8555351fcf30bd747b47167dd0dca96d34c6 (patch)
treeaddfbecca5220e560e544d289fcf9c249aadeec8 /theories/ZArith/BinInt.v
parent911c50439abdedd0f75856d43ff12e9615ec9980 (diff)
ZBinary (impl of Numbers via Z) reworked, comes earlier, subsumes ZOrderedType
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12714 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/ZArith/BinInt.v')
-rw-r--r--theories/ZArith/BinInt.v15
1 files changed, 15 insertions, 0 deletions
diff --git a/theories/ZArith/BinInt.v b/theories/ZArith/BinInt.v
index d976b01c6..2807532ca 100644
--- a/theories/ZArith/BinInt.v
+++ b/theories/ZArith/BinInt.v
@@ -1118,6 +1118,21 @@ Notation "x < y < z" := (x < y /\ y < z) : Z_scope.
Notation "x < y <= z" := (x < y /\ y <= z) : Z_scope.
(**********************************************************************)
+(** * Minimum and maximum *)
+
+Unboxed Definition Zmax (n m:Z) :=
+ match n ?= m with
+ | Eq | Gt => n
+ | Lt => m
+ end.
+
+Unboxed Definition Zmin (n m:Z) :=
+ match n ?= m with
+ | Eq | Lt => n
+ | Gt => m
+ end.
+
+(**********************************************************************)
(** * Absolute value on integers *)
Definition Zabs_nat (x:Z) : nat :=